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 May 23, 2022
1 parent 7591fb6 commit 2cddced
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 2cddced

Please sign in to comment.