diff --git a/Dashboard/src/Components/Monitor/MonitorMetrics.tsx b/Dashboard/src/Components/Monitor/MonitorMetrics.tsx index 5d8fa99abb..668590d308 100644 --- a/Dashboard/src/Components/Monitor/MonitorMetrics.tsx +++ b/Dashboard/src/Components/Monitor/MonitorMetrics.tsx @@ -85,8 +85,6 @@ const MonitorMetricsElement: FunctionComponent = ( const monitorMetricTypesByMonitor: Array = MonitorMetricTypeUtil.getMonitorMetricTypesByMonitorType(monitorType); - - // set it to past 1 hour const endDate: Date = OneUptimeDate.getCurrentDate(); const startDate: Date = OneUptimeDate.addRemoveHours(endDate, -1); @@ -276,7 +274,6 @@ const MonitorMetricsElement: FunctionComponent = ( formulaConfigs: [], }); - if (isLoading) { return ; } @@ -295,7 +292,11 @@ const MonitorMetricsElement: FunctionComponent = ( data={metricViewData} hideQueryElements={true} onChange={(data: MetricViewData) => { - setMetricViewData(data); + setMetricViewData({ + ...data, + queryConfigs: getQueryConfigByMonitorMetricTypes(), + formulaConfigs: [], + }); }} />