mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 16:11:12 -05:00
Invalidate all system-alerts queries on resolve
Update PipelineHealthAlerts resolve flow to invalidate all severity-specific system_alerts queries (not just the base key), ensuring resolved alerts disappear from UI. Adds broad invalidation pattern and preserves loading state handling.
This commit is contained in:
@@ -72,9 +72,9 @@ export function PipelineHealthAlerts() {
|
||||
console.log('✅ Alert resolved successfully');
|
||||
toast.success('Alert resolved');
|
||||
|
||||
// Invalidate queries to refresh the UI
|
||||
// Invalidate all system-alerts queries (critical, high, medium, etc.)
|
||||
await Promise.all([
|
||||
queryClient.invalidateQueries({ queryKey: queryKeys.monitoring.systemAlerts() }),
|
||||
queryClient.invalidateQueries({ queryKey: ['system-alerts'] }),
|
||||
queryClient.invalidateQueries({ queryKey: queryKeys.monitoring.systemHealth() })
|
||||
]);
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user