fix(ui/src/alerting): reduce points per check from 300 to 100

This was done to reduce amount of data returned to the client. This is
problematic when there are a large number of series that get returned
from a query. Long term we will want to limit the topN tables so that
this is not an issue.
pull/17237/head
Michael Desa 2020-03-12 15:33:46 -07:00
parent 1ce19b520d
commit de252b3017
2 changed files with 4 additions and 4 deletions

View File

@ -2,13 +2,13 @@ import {getCheckVisTimeRange} from 'src/alerting/utils/vis'
const duration = 'duration' as 'duration'
const TESTS = [
['5s', {type: duration, lower: 'now() - 1500s', upper: null}],
['1m', {type: duration, lower: 'now() - 300m', upper: null}],
['5s', {type: duration, lower: 'now() - 500s', upper: null}],
['1m', {type: duration, lower: 'now() - 100m', upper: null}],
[
'1m5s',
{
type: duration,
lower: 'now() - 300m1500s',
lower: 'now() - 100m500s',
upper: null,
},
],

View File

@ -11,7 +11,7 @@ import {flatMap} from 'lodash'
// Types
import {Threshold, DurationTimeRange} from 'src/types'
const POINTS_PER_CHECK_PLOT = 300
const POINTS_PER_CHECK_PLOT = 100
/*
Given the duration in a check's `every` field, return a `TimeRange` suitable