diff --git a/public/app/features/dashboard-scene/scene/AlertStatesDataLayer.ts b/public/app/features/dashboard-scene/scene/AlertStatesDataLayer.ts index 834b95b28ef..54f0a7264f8 100644 --- a/public/app/features/dashboard-scene/scene/AlertStatesDataLayer.ts +++ b/public/app/features/dashboard-scene/scene/AlertStatesDataLayer.ts @@ -73,10 +73,13 @@ export class AlertStatesDataLayer } const fetchData: () => Promise = async () => { const promRules = await dispatch( - alertRuleApi.endpoints.prometheusRuleNamespaces.initiate({ - ruleSourceName: GRAFANA_RULES_SOURCE_NAME, - dashboardUid: uid, - }) + alertRuleApi.endpoints.prometheusRuleNamespaces.initiate( + { + ruleSourceName: GRAFANA_RULES_SOURCE_NAME, + dashboardUid: uid, + }, + { forceRefetch: true } + ) ); if (promRules.error) { throw new Error(`Unexpected alert rules response.`); diff --git a/public/app/features/query/state/DashboardQueryRunner/UnifiedAlertStatesWorker.ts b/public/app/features/query/state/DashboardQueryRunner/UnifiedAlertStatesWorker.ts index bc750ffe8d8..8e352896e54 100644 --- a/public/app/features/query/state/DashboardQueryRunner/UnifiedAlertStatesWorker.ts +++ b/public/app/features/query/state/DashboardQueryRunner/UnifiedAlertStatesWorker.ts @@ -61,10 +61,13 @@ export class UnifiedAlertStatesWorker implements DashboardQueryRunnerWorker { const { dashboard } = options; const fetchData: () => Promise = async () => { const promRules = await dispatch( - alertRuleApi.endpoints.prometheusRuleNamespaces.initiate({ - ruleSourceName: GRAFANA_RULES_SOURCE_NAME, - dashboardUid: dashboard.uid, - }) + alertRuleApi.endpoints.prometheusRuleNamespaces.initiate( + { + ruleSourceName: GRAFANA_RULES_SOURCE_NAME, + dashboardUid: dashboard.uid, + }, + { forceRefetch: true } + ) ); return promRules.data; };