From 71aea9b0dbd03487752ae34a61205c4ea5116f19 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Thu, 27 Jun 2024 18:15:06 +0200 Subject: [PATCH] change(ui): path analysis filter card --- .../components/WidgetForm/CardBuilder.tsx | 35 ++++++++++-------- .../components/WidgetForm/WidgetFormNew.tsx | 36 +++++++++++-------- 2 files changed, 42 insertions(+), 29 deletions(-) diff --git a/frontend/app/components/Dashboard/components/WidgetForm/CardBuilder.tsx b/frontend/app/components/Dashboard/components/WidgetForm/CardBuilder.tsx index 867cb03c3..b7066b5d8 100644 --- a/frontend/app/components/Dashboard/components/WidgetForm/CardBuilder.tsx +++ b/frontend/app/components/Dashboard/components/WidgetForm/CardBuilder.tsx @@ -53,7 +53,7 @@ const MetricTabs = ({metric, writeOption}: any) => { } return ( - + ) } @@ -138,19 +138,26 @@ const MetricOptions = ({metric, writeOption}: any) => { ); }; -const PathAnalysisFilter = ({metric}) => ( -
- {metric.startType === 'start' ? 'Start Point' : 'End Point'} - metric.updateStartPoint(val)} - onRemoveFilter={() => { - }} - /> -
-); +const PathAnalysisFilter = observer(({metric}: any) => ( + +
+ {/*{metric.startType === 'start' ? 'Start Point' : 'End Point'}*/} + metric.updateStartPoint(val)} + onRemoveFilter={() => { + }} + /> +
+
+)); const SeriesList = observer(() => { const {metricStore, dashboardStore, aiFiltersStore} = useStore(); diff --git a/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx b/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx index 3050acb94..014d0f6bb 100644 --- a/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx +++ b/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx @@ -35,7 +35,7 @@ function WidgetFormNew() { const isPredefined = [ERRORS, PERFORMANCE, RESOURCE_MONITORING, WEB_VITALS].includes(metric.metricType); return isPredefined ? : ( - <> + )} - + ); } @@ -140,17 +140,23 @@ const FilterSection = observer(({metric, excludeFilterKeys}: any) => { const PathAnalysisFilter = observer(({metric}: any) => ( -
- {metric.startType === 'start' ? 'Start Point' : 'End Point'} - metric.updateStartPoint(val)} - onRemoveFilter={() => { - }} - /> -
+ +
+ metric.updateStartPoint(val)} + onRemoveFilter={() => { + }} + /> +
+
)); const AdditionalFilters = observer(() => { @@ -158,9 +164,9 @@ const AdditionalFilters = observer(() => { const metric: any = metricStore.instance; return ( - <> + {metric.metricType === USER_PATH && } - + ) });