swarm-ui: a header bell with the count of firing alerts opens a list of them and a link to Grafana
This commit is contained in:
parent
ffcba2b026
commit
70e5de5571
1 changed files with 218 additions and 5 deletions
|
|
@ -6,6 +6,7 @@ import { test } from "node:test";
|
|||
import {
|
||||
activeSinceMs,
|
||||
alertKey,
|
||||
alertsLabel,
|
||||
firingAlerts,
|
||||
listedAlerts,
|
||||
} from "../src/pages/alerts.ts";
|
||||
|
|
@ -87,3 +88,8 @@ test("instances of one rule get different keys, whatever the label order", () =>
|
|||
assert.equal(alertKey(a), alertKey(b));
|
||||
assert.notEqual(alertKey(a), alertKey(c));
|
||||
});
|
||||
|
||||
test("the alert button's name counts the firing alerts", () => {
|
||||
assert.equal(alertsLabel(1), "1 alert firing");
|
||||
assert.equal(alertsLabel(3), "3 alerts firing");
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue