Watch
0
0
Fork
You've already forked hyperhive
0

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:
iris 2026-11-21 15:01:16 +01:00
commit 70e5de5571

View file

@ -2,6 +2,15 @@
// instance from swarm-controller's `GET /api/alerts` and which of them count
// as firing.
// Grafana's own alert list, for what the swarm UI does not show.
export const GRAFANA_ALERTS_URL =
"https://grafana.constellation.darkest.space/alerting/groups";
// What the header's alert button is called for `count` firing alerts.
export function alertsLabel(count: number): string {
return count === 1 ? "1 alert firing" : `${count} alerts firing`;
}
export interface Alert {
name: string;
// Grafana's state for the instance: `Alerting`, `Pending`, `NoData` or