diff --git a/frontend-modern/src/stores/alertsActivation.ts b/frontend-modern/src/stores/alertsActivation.ts index 0f8b3fcd6..74888fcbf 100644 --- a/frontend-modern/src/stores/alertsActivation.ts +++ b/frontend-modern/src/stores/alertsActivation.ts @@ -10,6 +10,7 @@ import { type DisplayMetricType, resolveMetricDisplayThresholds, } from '@/utils/metricThresholds'; +import { eventBus } from './events'; // Create signals for activation state const [config, setConfig] = createSignal(null); @@ -146,6 +147,14 @@ const getMetricThresholds = ( return resolveMetricDisplayThresholds(config(), scope, metric, resourceIds); }; +eventBus.on('org_switched', () => { + setConfig(null); + applyActivationState(null); + setActiveAlerts([]); + setLastError(null); + setIsLoading(false); +}); + // Export the store export const useAlertsActivation = () => ({ // Signals