Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: version the alerts table's saved-filters key

The state column stopped being a filter, so a saved "not Pending" selection
under the old key would hide every row. A new key makes the page ignore it.
This commit is contained in:
iris 2026-10-18 13:10:53 +02:00 • committed by mara
commit 6da252aa20

View file

@ -32,6 +32,10 @@ const GRAFANA_ALERTS_URL =
const FIRING = "Alerting";
// Versioned: the state column used to be a filter, and a saved "not Pending"
// selection under the old key would now hide every row.
const FILTERS_STORAGE_KEY = "swarm-ui:alerts:table-filters:v2";
// Grafana reports an instance that never became active with the zero time,
// which `Date.parse` reads as year 1.
function activeSinceMs(a: Alert): number | null {
@ -139,7 +143,7 @@ export function AlertsPage() {
columns={COLUMNS}
rows={firing}
rowKey={alertKey}
storageKey="swarm-ui:alerts:table-filters"
storageKey={FILTERS_STORAGE_KEY}
/>
) : null}
</Panel>