diff --git a/ui/spec/data_explorer/utils/influxql/selectSpec.js b/ui/spec/data_explorer/utils/influxql/selectSpec.js index 70a4635099..f70f0e3d20 100644 --- a/ui/spec/data_explorer/utils/influxql/selectSpec.js +++ b/ui/spec/data_explorer/utils/influxql/selectSpec.js @@ -156,7 +156,7 @@ describe('buildInfluxQLQuery', () => { it('builds the right query', () => { const expected = - 'SELECT min("value") AS "min_value" FROM "db1"."rp1"."m0" WHERE time > now() - 12h GROUP BY time(10m), "t1", "t2"' + 'SELECT min("value") AS "min_value" FROM "db1"."rp1"."m0" WHERE time > now() - 12h GROUP BY time(10m), "t1", "t2" FILL(null)' expect(buildInfluxQLQuery(timeBounds, config)).to.equal(expected) }) }) diff --git a/ui/src/dashboards/reducers/dashTimeV1.js b/ui/src/dashboards/reducers/dashTimeV1.js index 0bedd3f439..4d8c81d278 100644 --- a/ui/src/dashboards/reducers/dashTimeV1.js +++ b/ui/src/dashboards/reducers/dashTimeV1.js @@ -20,8 +20,8 @@ const dashTimeV1 = (state = initialState, action) => { } case 'SET_DASHBOARD_TIME_V1': { - const {dashboardID, timeRange: {upper, lower, format}} = action.payload - const newTimeRange = [{dashboardID, upper, lower, format}] + const {dashboardID, timeRange} = action.payload + const newTimeRange = [{dashboardID, ...timeRange}] const ranges = _.unionBy(newTimeRange, state.ranges, 'dashboardID') return {...state, ranges}