From e5b892c98bf3b78265b34920b8503bd5bcefd471 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Wed, 14 Sep 2022 13:15:18 +0530 Subject: [PATCH] fix(ui) - add metric button --- .../components/DashboardView/DashboardView.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/frontend/app/components/Dashboard/components/DashboardView/DashboardView.tsx b/frontend/app/components/Dashboard/components/DashboardView/DashboardView.tsx index 470a43cb0..cd6083e66 100644 --- a/frontend/app/components/Dashboard/components/DashboardView/DashboardView.tsx +++ b/frontend/app/components/Dashboard/components/DashboardView/DashboardView.tsx @@ -18,6 +18,7 @@ import SelectDateRange from 'Shared/SelectDateRange'; import { Tooltip } from 'react-tippy'; import Breadcrumb from 'Shared/Breadcrumb'; import AddMetricContainer from '../DashboardWidgetGrid/AddMetricContainer'; +import AddPredefinedMetric from '../DashboardWidgetGrid/AddPredefinedMetric'; interface IProps { siteId: string; @@ -97,6 +98,18 @@ function DashboardView(props: Props) { } }; + const onAddPredefinedMetrics = () => { + dashboardStore.initDashboard(dashboardStore.selectedDashboard); + showModal( + , + { right: true } + ); + }; + if (!dashboard) return null; return ( @@ -136,7 +149,7 @@ function DashboardView(props: Props) { distance={20} html={
} > -