Fix tests
parent
fc57e88133
commit
0565a24e0a
|
@ -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)
|
||||
})
|
||||
})
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue