From 6f845f5e91b6072d3e2b010962ddb744a3dc5adc Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Mon, 16 Dec 2024 12:03:22 +0100 Subject: [PATCH] ui: fix exclusion component for path --- .../CustomMetricLineChart.tsx | 2 +- .../FilterSeries/ExcludeFilters.tsx | 4 +- .../components/FilterSeries/FilterSeries.tsx | 52 ++++++++++--------- .../components/WidgetChart/WidgetChart.tsx | 3 ++ .../components/WidgetForm/WidgetFormNew.tsx | 3 +- 5 files changed, 36 insertions(+), 28 deletions(-) diff --git a/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/CustomMetricLineChart/CustomMetricLineChart.tsx b/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/CustomMetricLineChart/CustomMetricLineChart.tsx index 15b30e9ff..514b05081 100644 --- a/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/CustomMetricLineChart/CustomMetricLineChart.tsx +++ b/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/CustomMetricLineChart/CustomMetricLineChart.tsx @@ -85,7 +85,7 @@ function CustomMetricLineChart(props: Props) { activeDot={{ fill: colors[index]}} /> ) : null)} - {compData?.namesMap.map((key, i) => data.namesMap[i] ? ( + {compData?.namesMap?.map((key, i) => data.namesMap[i] ? ( +
{filter.excludes.length > 0 ? ( -
+
EXCLUDES
{filter.excludes.map((f: any, index: number) => ( - - + {removeEvents ? null : + + } + ) : null}
diff --git a/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx b/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx index a9124efdb..c3b9fc887 100644 --- a/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx +++ b/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx @@ -191,7 +191,10 @@ function WidgetChart(props: Props) { loadComparisonData(); }, [dashboardStore.comparisonPeriod]); useEffect(() => { + dashboardStore.setComparisonPeriod(null) + setCompData(null); _metric.updateKey('page', 1); + _metric.updateKey() loadPage(); }, [ drillDownPeriod, diff --git a/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx b/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx index d2fd50393..04c8f34a3 100644 --- a/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx +++ b/frontend/app/components/Dashboard/components/WidgetForm/WidgetFormNew.tsx @@ -55,10 +55,11 @@ const FilterSection = observer(({ metric, excludeFilterKeys }: any) => { metric.series .slice(0, isSingleSeries ? 1 : metric.series.length) .map((series: any, index: number) => ( -
+
metric.updateKey('hasChanged', true)}