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:
parent
842b37dc33
commit
6da252aa20
1 changed files with 5 additions and 1 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue