feat(dashboard): set initial drill down period

Change default drill down period from LAST_7_DAYS to LAST_24_HOURS
and preserve current period when drilling down on chart click
This commit is contained in:
Shekar Siri 2025-04-11 10:47:32 +02:00
parent 8a6f8fe91f
commit 6777d5ce2a
2 changed files with 2 additions and 1 deletions

View file

@ -83,6 +83,7 @@ function WidgetWrapperNew(props: Props & RouteComponentProps) {
});
const onChartClick = () => {
dashboardStore.setDrillDownPeriod(dashboardStore.period);
// if (!isWidget || isPredefined) return;
props.history.push(
withSiteId(

View file

@ -34,7 +34,7 @@ export default class DashboardStore {
comparisonFilter: Filter = new Filter();
drillDownPeriod: Record<string, any> = Period({ rangeName: LAST_7_DAYS });
drillDownPeriod: Record<string, any> = Period({ rangeName: LAST_24_HOURS });
selectedDensity: number = 7; // depends on default drilldown, 7 points here!!!;