Skip to content

Commit d000966

Browse files
committed
Fix alerts and reports not honouring execution time when opened (#7369)
1 parent 51f8e6e commit d000966

File tree

1 file changed

+6
-1
lines changed
  • web-admin/src/features/dashboards/query-mappers

1 file changed

+6
-1
lines changed

web-admin/src/features/dashboards/query-mappers/utils.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { createInExpression } from "@rilldata/web-common/features/dashboards/stores/filter-utils";
21
import type { ExploreState } from "@rilldata/web-common/features/dashboards/stores/explore-state";
2+
import { createInExpression } from "@rilldata/web-common/features/dashboards/stores/filter-utils";
33
import { getTimeControlState } from "@rilldata/web-common/features/dashboards/time-controls/time-control-store";
44
import { PreviousCompleteRangeMap } from "@rilldata/web-common/features/dashboards/time-controls/time-range-mappers";
55
import { convertPartialExploreStateToUrlParams } from "@rilldata/web-common/features/dashboards/url-state/convert-partial-explore-state-to-url-params";
@@ -115,6 +115,11 @@ export function getSelectedTimeRange(
115115
new Date(timeRangeSummary.min),
116116
new Date(executionTime),
117117
);
118+
// Convert the range to a custom one with resolved start and end.
119+
// This retains the resolved range with `executionTime` incorporated into the range.
120+
// TODO: Once we have rill-time do `<syntax> as of <executionTime>` as time range.
121+
// Note we need to have the new drop down out of feature flag as well.
122+
selectedTimeRange.name = TimeRangePreset.CUSTOM;
118123
} else {
119124
return undefined;
120125
}

0 commit comments

Comments
 (0)