Skip to content

Commit

Permalink
[Cloud Posture] Trendline query changes (elastic#132680)
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanSh authored and emilioalvap committed May 23, 2022
1 parent fe6190f commit a06e334
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,12 @@ const ComplianceTrendChart = ({ trend }: { trend: PostureTrend[] }) => {
xAccessor={'timestamp'}
yAccessors={['postureScore']}
/>
<Axis id="bottom-axis" position="bottom" tickFormat={timeFormatter(niceTimeFormatByDay(2))} />
<Axis
id="bottom-axis"
position="bottom"
tickFormat={timeFormatter(niceTimeFormatByDay(2))}
ticks={4}
/>
<Axis
ticks={3}
id="left-axis"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,20 @@ export interface ScoreTrendDoc {

export const getTrendsQuery = () => ({
index: BENCHMARK_SCORE_INDEX_DEFAULT_NS,
size: 5,
size: 99,
sort: '@timestamp:desc',
query: {
bool: {
must: {
range: {
'@timestamp': {
gte: 'now-1d',
lte: 'now',
},
},
},
},
},
});

export type Trends = Array<{
Expand Down

0 comments on commit a06e334

Please sign in to comment.