Don't show notification when no lower time range in URL query

Update validTimeRange to make having no lower acceptable

Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
Co-authored-by: Deniz Kusefoglu <denizk@gmail.com>
pull/10616/head
Jared Scheib 2018-06-01 16:42:10 -07:00
parent 48e46c0f31
commit be97ff2159
2 changed files with 6 additions and 8 deletions

View File

@ -60,10 +60,6 @@ export const validAbsoluteTimeRange = (
}
export const validTimeRange = (timeRange: TimeRange): TimeRange | null => {
if (!timeRange.lower) {
return null
}
let timeRangeOrNull = validRelativeTimeRange(timeRange)
if (!timeRangeOrNull) {
timeRangeOrNull = validAbsoluteTimeRange(timeRange)

View File

@ -43,11 +43,13 @@ export const queryStringConfig = store => {
timeRange = dashboardTimeRange || defaultTimeRange
dispatch(
notifyAction(
notifyInvalidTimeRangeValueInURLQuery(timeRangeFromQueries)
if (timeRangeFromQueries.lower || timeRangeFromQueries.upper) {
dispatch(
notifyAction(
notifyInvalidTimeRangeValueInURLQuery(timeRangeFromQueries)
)
)
)
}
}
dispatch(setDashTimeV1(+dashboardID, timeRange))