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
parent
48e46c0f31
commit
be97ff2159
|
@ -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)
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue