diff --git a/App/FeatureSet/Dashboard/src/Components/Logs/LogsViewer.tsx b/App/FeatureSet/Dashboard/src/Components/Logs/LogsViewer.tsx index 9f1f836a7c..4eb9318ba9 100644 --- a/App/FeatureSet/Dashboard/src/Components/Logs/LogsViewer.tsx +++ b/App/FeatureSet/Dashboard/src/Components/Logs/LogsViewer.tsx @@ -249,6 +249,22 @@ const DashboardLogsViewer: FunctionComponent = ( (requestData as any)["serviceIds"] = serviceIdStrings; } + // Pass active facet filters to the histogram so it reflects the current view + const severityValues: Set | undefined = + appliedFacetFilters.get("severityText"); + + if (severityValues && severityValues.size > 0) { + (requestData as any)["severityTexts"] = Array.from(severityValues); + } + + const serviceFilterValues: Set | undefined = + appliedFacetFilters.get("serviceId"); + + if (serviceFilterValues && serviceFilterValues.size > 0) { + // Merge with prop-level serviceIds (facet filter overrides/narrows) + (requestData as any)["serviceIds"] = Array.from(serviceFilterValues); + } + const response: HTTPResponse = await postApi( "/telemetry/logs/histogram", requestData, @@ -264,7 +280,7 @@ const DashboardLogsViewer: FunctionComponent = ( } finally { setHistogramLoading(false); } - }, [serviceIdStrings]); + }, [serviceIdStrings, appliedFacetFilters]); // --- Fetch facets ---