From 2cc03e60d29a39337a104e5b227bfdd55ab805ff Mon Sep 17 00:00:00 2001 From: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com> Date: Thu, 5 Dec 2024 18:30:29 +0100 Subject: [PATCH] Alerting: Fix using stacks- prefix instead of stack- for checking the namespace in boot data (#97492) * Fix using stacks- prefix instead of stack- for checking the namespace in config boot data * use config directly for namespace --- public/app/features/alerting/unified/home/Insights.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/features/alerting/unified/home/Insights.tsx b/public/app/features/alerting/unified/home/Insights.tsx index 2bf21799cc2..f98cd51622e 100644 --- a/public/app/features/alerting/unified/home/Insights.tsx +++ b/public/app/features/alerting/unified/home/Insights.tsx @@ -95,9 +95,9 @@ export const PANEL_STYLES = { minHeight: 300 }; const THIS_WEEK_TIME_RANGE = new SceneTimeRange({ from: 'now-1w', to: 'now' }); -const namespace = config.bootData.settings.namespace; +const namespace = config.namespace; -export const INSTANCE_ID = namespace.includes('stack-') ? namespace.replace('stack-', '') : undefined; +export const INSTANCE_ID = namespace.includes('stacks-') ? namespace.replace('stacks-', '') : undefined; const getInsightsDataSources = () => { const dataSourceSrv = getDataSourceSrv();