Fix tests

pull/10616/head
Andrew Watkins 2017-10-09 12:59:01 -07:00
parent fc57e88133
commit 0565a24e0a
2 changed files with 3 additions and 3 deletions

View File

@ -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)
})
})

View File

@ -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}