feat(ui): use v.timeRangeStart in add filter

pull/5688/head
Pavel Zavora 2021-03-07 08:08:54 +01:00
parent 28548a1db9
commit 577f84675e
1 changed files with 2 additions and 1 deletions

View File

@ -69,6 +69,7 @@ import {
} from 'src/types/dashboards'
import {ColorString, ColorNumber} from 'src/types/colors'
import recordProperty from 'src/flux/helpers/recordProperty'
import {TIMERANGE_START} from 'src/flux/helpers/templates'
const LOCAL_STORAGE_DELAY_MS = 1000
@ -195,7 +196,7 @@ export class TimeMachineContainer extends Container<TimeMachineState> {
.join(' and ')
if (_.isEmpty(draftScript)) {
draftScript = `from(bucket: "${db}")\n |> range(start: dashboardTime)`
draftScript = `from(bucket: "${db}")\n |> range(start: ${TIMERANGE_START})`
}
const newDraftScript = `${draftScript}\n |> filter(fn: (r) => ${body})`