From ea7b37441b364778a42120143dfefccbe732b179 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Tue, 21 Jun 2022 11:16:49 +0200 Subject: [PATCH] feat(ui) - metric type check for alert --- .../Dashboard/components/WidgetWrapper/WidgetWrapper.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/app/components/Dashboard/components/WidgetWrapper/WidgetWrapper.tsx b/frontend/app/components/Dashboard/components/WidgetWrapper/WidgetWrapper.tsx index 0c9716870..da83150aa 100644 --- a/frontend/app/components/Dashboard/components/WidgetWrapper/WidgetWrapper.tsx +++ b/frontend/app/components/Dashboard/components/WidgetWrapper/WidgetWrapper.tsx @@ -29,6 +29,7 @@ function WidgetWrapper(props: Props) { const { dashboardStore } = useStore(); const { isWidget = false, active = false, index = 0, moveListItem = null, isPreview = false, isTemplate = false, dashboardId, siteId } = props; const widget: any = useObserver(() => props.widget); + const isTimeSeries = widget.metricType === 'timeseries'; const isPredefined = widget.metricType === 'predefined'; const dashboard = useObserver(() => dashboardStore.selectedDashboard); @@ -113,7 +114,7 @@ function WidgetWrapper(props: Props) {
{widget.name}
{isWidget && (
- {!isPredefined && ( + {!isPredefined && isTimeSeries && ( <>