Add rotation to the wall display: overview, what needs attention, and one page per group of integrations

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-11-07 01:44:27 +01:00
1 parent fa7cc282bb
commit d980c12a04
8 files changed
+398 -4

No files matched your search

+2
View File
@@ -444,6 +444,8 @@ the problems themselves, and each integration's status, refreshing every 30
seconds with the screen kept awake where the browser allows. Esc returns to the seconds with the screen kept awake where the browser allows. Esc returns to the
app. app.
**Rotating the wall display.** A spare screen can show more than one board: choose **Rotate → every 15 / 30 / 60 / 120 s** in the footer (or open `/wall?rotate=45`; `?rotate=on` is 30 s, `?rotate=off` stops it) and the lower half of the board changes page by page while the status line, the clock and the figures at the top stay put. The pages are the **Overview** (as before), **Needs attention** (the open alerts and what is in maintenance, in full — only while there is something), and one page for each group of the menu that has integrations (Infrastructure, Apps …) listing them, the failing ones first. The footer says which page it is on and **Pause** / **Resume** holds one on screen; the left and right arrow keys step by hand. The choice is in the address, so a TV's bookmark carries it, and this browser remembers the last one chosen on the board itself; without either the wall stays on the overview, as it always was. A share link's wall rotates the same way (add `?rotate=30` to its address) when it shows names; one that shows numbers only has a single page and offers nothing to rotate.
**Alerts folded under their host.** A server can say which server it runs on (a **Alerts folded under their host.** A server can say which server it runs on (a
virtual machine on its Proxmox host): on its page, "Runs on" — and left alone it virtual machine on its Proxmox host): on its page, "Runs on" — and left alone it
is worked out when the server is linked to a Proxmox guest and exactly one is worked out when the server is linked to a Proxmox guest and exactly one
+87
View File
@@ -0,0 +1,87 @@
import { test } from "node:test";
import assert from "node:assert/strict";
import { groupMembers, pageOrOverview, rotateSeconds, ROTATE_DEFAULT, ROTATE_MAX, ROTATE_MIN, stepPage, wallPages } from "../../web/src/utils/wallPages.js";
const integ = (type: string, name = type, status = "ok") => ({ id: name, type, name, status });
test("the overview is always the first page, and the only one when there is nothing by name", () => {
assert.deepEqual(wallPages({ problems: null, integrations: null }).map((p) => p.id), ["overview"]);
assert.deepEqual(wallPages({ problems: [], integrations: [] }).map((p) => p.id), ["overview"]);
});
test("the attention page exists only while something needs attention", () => {
assert.deepEqual(wallPages({ problems: [{}], integrations: [] }).map((p) => p.id), ["overview", "alerts"]);
assert.ok(!wallPages({ problems: [], integrations: [integ("proxmox")] }).some((p) => p.id === "alerts"));
});
test("a page for each group that has integrations, in the order of the menu, skipping empty ones", () => {
const pages = wallPages({ problems: [], integrations: [integ("grafana"), integ("proxmox"), integ("jellyfin"), integ("proxmox", "pve2")] });
assert.deepEqual(pages.map((p) => p.id), ["overview", "group:infrastructure", "group:apps", "group:monitoring"]);
assert.deepEqual(pages.map((p) => p.label), ["Overview", "Infrastructure", "Apps", "Monitoring"]);
assert.equal(pages[1].groupId, "infrastructure");
});
test("a kind in no group gets an Other page last", () => {
const pages = wallPages({ problems: [], integrations: [integ("proxmox"), integ("mystery")] });
assert.deepEqual(pages.map((p) => p.id), ["overview", "group:infrastructure", "group:other"]);
});
test("stepping goes on and wraps round, both ways", () => {
const pages = wallPages({ problems: [{}], integrations: [integ("proxmox")] }); // overview, alerts, infrastructure
assert.equal(stepPage(pages, "overview", 1).id, "alerts");
assert.equal(stepPage(pages, "group:infrastructure", 1).id, "overview");
assert.equal(stepPage(pages, "overview", -1).id, "group:infrastructure");
assert.equal(stepPage(pages, "alerts", -1).id, "overview");
});
test("a page that has gone sends the board to the overview", () => {
const pages = wallPages({ problems: [], integrations: [integ("proxmox")] });
assert.equal(stepPage(pages, "alerts", 1).id, "overview");
assert.equal(pageOrOverview(pages, "alerts").id, "overview");
assert.equal(pageOrOverview(pages, "group:infrastructure").id, "group:infrastructure");
});
test("a board with one page stays on it", () => {
const pages = wallPages({ problems: null, integrations: null });
assert.equal(stepPage(pages, "overview", 1).id, "overview");
assert.equal(stepPage(pages, "overview", -1).id, "overview");
});
test("rotation is off unless asked for", () => {
assert.equal(rotateSeconds(null, null), null);
assert.equal(rotateSeconds("", ""), null);
});
test("the address says how long each page stays, and beats what the browser remembered", () => {
assert.equal(rotateSeconds("45", "15"), 45);
assert.equal(rotateSeconds("on", null), ROTATE_DEFAULT);
assert.equal(rotateSeconds("true", null), ROTATE_DEFAULT);
assert.equal(rotateSeconds("off", "30"), null);
assert.equal(rotateSeconds("0", "30"), null);
});
test("without an address, the browser's last choice is used", () => {
assert.equal(rotateSeconds(null, "60"), 60);
assert.equal(rotateSeconds(null, "off"), null);
});
test("a number out of range is brought into it, and anything else means off", () => {
assert.equal(rotateSeconds("2", null), ROTATE_MIN);
assert.equal(rotateSeconds("99999", null), ROTATE_MAX);
assert.equal(rotateSeconds("abc", "30"), null);
assert.equal(rotateSeconds("-5", null), null);
assert.equal(rotateSeconds("1e3", null), null);
});
test("a group's page lists the failing ones first, then by name, and only its own", () => {
const list = [integ("proxmox", "pve-b", "ok"), integ("synology", "nas", "failing"), integ("jellyfin", "media"), integ("proxmox", "pve-a", "ok"), integ("tailscale", "ts", "unknown")];
assert.deepEqual(groupMembers(list, "infrastructure").map((i) => i.name), ["nas", "pve-a", "pve-b", "ts"]);
assert.deepEqual(groupMembers(list, "apps").map((i) => i.name), ["media"]);
assert.deepEqual(groupMembers(list, "backups"), []);
});
test("grouping does not change the list it is given", () => {
const list = [integ("proxmox", "b"), integ("proxmox", "a")];
groupMembers(list, "infrastructure");
assert.deepEqual(list.map((i) => i.name), ["b", "a"]);
});
+155 -4
View File
@@ -2,6 +2,7 @@ import { useEffect, useState, type ReactNode } from "react";
import type { WallGroup, WallTile } from "../api/client"; import type { WallGroup, WallTile } from "../api/client";
import { formatDate, formatTime } from "../utils/date"; import { formatDate, formatTime } from "../utils/date";
import { formatRemaining } from "../utils/duration"; import { formatRemaining } from "../utils/duration";
import { groupMembers, pageOrOverview, ROTATE_CHOICES, stepPage, wallPages } from "../utils/wallPages";
export const REFRESH_MS = 30_000; export const REFRESH_MS = 30_000;
@@ -108,9 +109,49 @@ function useWakeLock() {
* The board itself: a full-screen status picture in type big enough to read across a room. It only draws what it is given, so the * The board itself: a full-screen status picture in type big enough to read across a room. It only draws what it is given, so the
* signed-in wall and the one a share link opens look the same and can't drift apart. * signed-in wall and the one a share link opens look the same and can't drift apart.
*/ */
export default function WallView({ data, idle, footerActions }: { data: WallData; idle: boolean; footerActions: ReactNode }) { export default function WallView({
data,
idle,
footerActions,
rotation,
}: {
data: WallData;
idle: boolean;
footerActions: ReactNode;
/** How the pages rotate (seconds each, null for the overview alone) and how to change it; absent on a board that does not rotate. */
rotation?: { seconds: number | null; onChange: (seconds: number | null) => void };
}) {
const now = useClock(); const now = useClock();
useWakeLock(); useWakeLock();
// The pages: the overview, what needs attention (while something does), and one for each group of integrations.
const rotating = !!rotation && rotation.seconds !== null;
const pages = wallPages(data);
const pagesKey = pages.map((p) => p.id).join(",");
const [pageId, setPageId] = useState("overview");
const [paused, setPaused] = useState(false);
const page = rotating ? pageOrOverview(pages, pageId) : pages[0];
const seconds = rotation?.seconds ?? null;
useEffect(() => {
if (!rotating || paused || pages.length < 2 || seconds === null) return;
const t = setTimeout(() => setPageId(stepPage(pages, page.id, 1).id), seconds * 1000);
return () => clearTimeout(t);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [rotating, paused, seconds, page.id, pagesKey]);
// The arrow keys step through the pages by hand (and start the wait again).
useEffect(() => {
if (!rotating) return;
const onKey = (e: KeyboardEvent) => {
const el = e.target as HTMLElement | null;
if (el && (el.tagName === "SELECT" || el.tagName === "INPUT")) return;
if (e.key === "ArrowRight") setPageId(stepPage(pages, page.id, 1).id);
else if (e.key === "ArrowLeft") setPageId(stepPage(pages, page.id, -1).id);
};
window.addEventListener("keydown", onKey);
return () => window.removeEventListener("keydown", onKey);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [rotating, page.id, pagesKey]);
const { level } = data; const { level } = data;
const offline = data.servers ? data.servers.total - data.servers.online : 0; const offline = data.servers ? data.servers.total - data.servers.online : 0;
const alertCount = data.alerts ? data.alerts.critical + data.alerts.warning : 0; const alertCount = data.alerts ? data.alerts.critical + data.alerts.warning : 0;
@@ -161,7 +202,10 @@ export default function WallView({ data, idle, footerActions }: { data: WallData
))} ))}
</section> </section>
{(data.groups ?? []).length > 0 && ( {page.kind === "alerts" && <AlertsPage data={data} now={now} />}
{page.kind === "group" && <GroupPage data={data} groupId={page.groupId ?? ""} label={page.label} />}
{page.kind === "overview" && (data.groups ?? []).length > 0 && (
<section className="wall-groups" aria-label="By area"> <section className="wall-groups" aria-label="By area">
{(data.groups ?? []).map((g) => { {(data.groups ?? []).map((g) => {
const alerts = g.alerts.critical + g.alerts.warning; const alerts = g.alerts.critical + g.alerts.warning;
@@ -177,7 +221,7 @@ export default function WallView({ data, idle, footerActions }: { data: WallData
</section> </section>
)} )}
{showsDetail ? ( {page.kind !== "overview" ? null : showsDetail ? (
<section className="wall-columns"> <section className="wall-columns">
<div> <div>
{data.problems && ( {data.problems && (
@@ -243,9 +287,116 @@ export default function WallView({ data, idle, footerActions }: { data: WallData
<footer className="wall-footer"> <footer className="wall-footer">
<span> <span>
{data.updatedAt ? `Updated ${formatTime(data.updatedAt)}` : "Loading…"} · refreshes every {REFRESH_MS / 1000} s {data.updatedAt ? `Updated ${formatTime(data.updatedAt)}` : "Loading…"} · refreshes every {REFRESH_MS / 1000} s
{rotating && pages.length > 1 && (
<span className="wall-pager" aria-label={`Page ${pages.findIndex((p) => p.id === page.id) + 1} of ${pages.length}: ${page.label}`}>
{" "}
· {page.label}{" "}
{pages.map((p) => (
<span key={p.id} aria-hidden="true" className={p.id === page.id ? "wall-pager-on" : ""}>
{p.id === page.id ? "●" : "○"}
</span>
))}
</span>
)}
</span>
<span className="wall-footer-actions">
{rotation && pages.length > 1 && (
<>
<label className="wall-rotate">
Rotate{" "}
<select
aria-label="Rotate through the pages every"
value={rotation.seconds === null ? "off" : String(rotation.seconds)}
onChange={(e) => {
setPaused(false);
setPageId("overview");
rotation.onChange(e.target.value === "off" ? null : Number(e.target.value));
}}
>
<option value="off">off</option>
{[...new Set([...ROTATE_CHOICES, ...(rotation.seconds !== null ? [rotation.seconds] : [])])]
.sort((a, b) => a - b)
.map((s) => (
<option key={s} value={s}>
every {s} s
</option>
))}
</select>
</label>
{rotating && pages.length > 1 && (
<button type="button" className="wall-link" onClick={() => setPaused((p) => !p)} aria-pressed={paused}>
{paused ? "Resume" : "Pause"}
</button>
)}
</>
)}
{footerActions}
</span> </span>
<span className="wall-footer-actions">{footerActions}</span>
</footer> </footer>
</div> </div>
); );
} }
/** What needs attention, in the whole screen's type: the open alerts, and what is in maintenance. */
function AlertsPage({ data, now }: { data: WallData; now: Date }) {
const problems = data.problems ?? [];
const alertCount = data.alerts ? data.alerts.critical + data.alerts.warning : problems.length;
const shown = problems.slice(0, 12);
return (
<section className="wall-page" aria-label="Needs attention">
<h2 className="wall-heading">Needs attention</h2>
<ul className="wall-list wall-list-cols">
{shown.map((a) => (
<li key={a.id} className={a.severity === "critical" ? "wall-bad" : "wall-warn"}>
<span aria-hidden="true">{a.severity === "critical" ? "✕" : "▲"}</span> <span className="visually-hidden">{a.severity}: </span>
{a.message}
</li>
))}
{alertCount > shown.length && <li className="wall-more">and {alertCount - shown.length} more</li>}
</ul>
{data.windows && data.windows.length > 0 && (
<>
<h2 className="wall-heading mt-4">In maintenance</h2>
<ul className="wall-list wall-list-small wall-list-cols">
{data.windows.slice(0, 8).map((w) => (
<li key={w.id}>
{w.name} <span className="wall-dim">· {formatRemaining(w.endsAt, now.getTime())} left</span>
</li>
))}
</ul>
</>
)}
</section>
);
}
/** One group of integrations (Infrastructure, Apps …): how it is, and each of them with its status. */
function GroupPage({ data, groupId, label }: { data: WallData; groupId: string; label: string }) {
const members = groupMembers(data.integrations ?? [], groupId);
const summary = (data.groups ?? []).find((g) => g.id === groupId);
const alerts = summary ? summary.alerts.critical + summary.alerts.warning : 0;
const failing = members.filter((m) => m.status === "failing").length;
const level = failing > 0 || (summary?.alerts.critical ?? 0) > 0 ? "bad" : alerts > 0 ? "warn" : "ok";
return (
<section className="wall-page" aria-label={label}>
<h2 className="wall-heading">
{label}{" "}
<span className={`wall-group-${level}`}>
<span aria-hidden="true">{level === "bad" ? "✕" : level === "warn" ? "▲" : "✓"}</span>{" "}
{failing > 0 ? `${failing} of ${members.length} failing` : `${members.length} connected`}
{alerts > 0 ? ` · ${alerts} ${alerts === 1 ? "alert" : "alerts"}` : ""}
</span>
</h2>
<ul className="wall-list wall-list-cols">
{members.map((i) => (
<li key={i.id} className={i.status === "failing" ? "wall-bad" : i.status === "ok" ? "wall-good" : "wall-dim"}>
<span aria-hidden="true">{i.status === "failing" ? "✕" : i.status === "ok" ? "✓" : "·"}</span> {i.name}{" "}
<span className="wall-dim">
{TYPE_LABELS[i.type] ?? i.type} — {i.status === "failing" ? "failing" : i.status === "ok" ? "working" : "not checked yet"}
</span>
</li>
))}
</ul>
</section>
);
}
+41
View File
@@ -0,0 +1,41 @@
import { useCallback } from "react";
import { useSearchParams } from "react-router-dom";
import { rotateSeconds } from "../utils/wallPages";
const KEY = "wall.rotate";
function stored(): string | null {
try {
return localStorage.getItem(KEY);
} catch {
return null;
}
}
/**
* How the wall display rotates: how many seconds each page stays, or null for the overview alone. It lives in the address (`?rotate=30`),
* so a TV's bookmark carries it, and this browser remembers the last choice made on the board itself.
*/
export function useWallRotation() {
const [params, setParams] = useSearchParams();
const seconds = rotateSeconds(params.get("rotate"), stored());
const setSeconds = useCallback(
(next: number | null) => {
try {
localStorage.setItem(KEY, next === null ? "off" : String(next));
} catch {
/* a private window: the address alone carries it */
}
setParams(
(prev) => {
const p = new URLSearchParams(prev);
p.set("rotate", next === null ? "off" : String(next));
return p;
},
{ replace: true },
);
},
[setParams],
);
return { seconds, setSeconds };
}
+3
View File
@@ -3,6 +3,7 @@ import { useParams } from "react-router-dom";
import { api, type PublicWall } from "../api/client"; import { api, type PublicWall } from "../api/client";
import WallView, { REFRESH_MS, wallHeadline, type WallData } from "../components/WallView"; import WallView, { REFRESH_MS, wallHeadline, type WallData } from "../components/WallView";
import { setDateTimeSettings } from "../utils/date"; import { setDateTimeSettings } from "../utils/date";
import { useWallRotation } from "../hooks/useWallRotation";
/** /**
* The wall display behind a share link: the same board, read-only and without signing in. The address carries the secret, and the * The wall display behind a share link: the same board, read-only and without signing in. The address carries the secret, and the
@@ -15,6 +16,7 @@ export default function SharedWall() {
const [state, setState] = useState<"loading" | "ok" | "dead" | "unreachable">("loading"); const [state, setState] = useState<"loading" | "ok" | "dead" | "unreachable">("loading");
const [updatedAt, setUpdatedAt] = useState<Date | null>(null); const [updatedAt, setUpdatedAt] = useState<Date | null>(null);
const [idle, setIdle] = useState(false); const [idle, setIdle] = useState(false);
const rotation = useWallRotation();
useEffect(() => { useEffect(() => {
let alive = true; let alive = true;
@@ -101,6 +103,7 @@ export default function SharedWall() {
<WallView <WallView
data={data} data={data}
idle={idle} idle={idle}
rotation={{ seconds: rotation.seconds, onChange: rotation.setSeconds }}
footerActions={ footerActions={
<button type="button" className="wall-link" onClick={() => void document.documentElement.requestFullscreen?.().catch(() => {})}> <button type="button" className="wall-link" onClick={() => void document.documentElement.requestFullscreen?.().catch(() => {})}>
Full screen Full screen
+3
View File
@@ -3,6 +3,7 @@ import { Link, useNavigate } from "react-router-dom";
import { api, type IntegrationSummary, type MaintenanceWindow, type ServerSummary, type WallGroup, type WallTile } from "../api/client"; import { api, type IntegrationSummary, type MaintenanceWindow, type ServerSummary, type WallGroup, type WallTile } from "../api/client";
import { alertBadge, useAlertsReport } from "../hooks/useAlertsReport"; import { alertBadge, useAlertsReport } from "../hooks/useAlertsReport";
import { useEnvironment } from "../utils/environment"; import { useEnvironment } from "../utils/environment";
import { useWallRotation } from "../hooks/useWallRotation";
import WallView, { REFRESH_MS, wallHeadline, type WallData } from "../components/WallView"; import WallView, { REFRESH_MS, wallHeadline, type WallData } from "../components/WallView";
/** /**
@@ -19,6 +20,7 @@ export default function Wall() {
const [extras, setExtras] = useState<{ tiles: WallTile[]; groups: WallGroup[] } | null>(null); const [extras, setExtras] = useState<{ tiles: WallTile[]; groups: WallGroup[] } | null>(null);
const [updatedAt, setUpdatedAt] = useState<Date | null>(null); const [updatedAt, setUpdatedAt] = useState<Date | null>(null);
const [idle, setIdle] = useState(false); const [idle, setIdle] = useState(false);
const rotation = useWallRotation();
useEffect(() => { useEffect(() => {
let alive = true; let alive = true;
@@ -91,6 +93,7 @@ export default function Wall() {
<WallView <WallView
data={data} data={data}
idle={idle} idle={idle}
rotation={{ seconds: rotation.seconds, onChange: rotation.setSeconds }}
footerActions={ footerActions={
<> <>
<button type="button" className="wall-link" onClick={() => void document.documentElement.requestFullscreen?.().catch(() => {})}> <button type="button" className="wall-link" onClick={() => void document.documentElement.requestFullscreen?.().catch(() => {})}>
+29
View File
@@ -963,6 +963,35 @@ main:focus {
opacity: 0.65; opacity: 0.65;
} }
.wall-list-cols {
columns: 2 22em;
column-gap: clamp(1rem, 3vw, 3rem);
}
.wall-list-cols li {
break-inside: avoid;
}
.wall-rotate select {
padding: 0 0.25rem;
color: inherit;
background: transparent;
border: 1px solid rgb(255 255 255 / 0.3);
border-radius: 0.25rem;
}
.wall-rotate option {
color: #0b1220;
}
.wall-pager {
letter-spacing: 0.15em;
}
.wall-pager-on {
color: #e6edf7;
}
.wall-link { .wall-link {
padding: 0 0.5rem; padding: 0 0.5rem;
color: inherit; color: inherit;
+78
View File
@@ -0,0 +1,78 @@
import type { IntegrationType } from "../api/client";
import { groupOfType, TYPE_GROUPS } from "./integrationTypes";
/** One screen of the rotating wall display: the overview, the list of what needs attention, or one group of integrations. */
export interface WallPage {
id: string;
/** What the footer calls it. */
label: string;
kind: "overview" | "alerts" | "group";
groupId?: string;
}
export interface WallPagesInput {
/** Null on a board that shows numbers only (it has no names to put on a page). */
problems: unknown[] | null;
integrations: { type: string }[] | null;
}
/** The longest and shortest a page may stay, in seconds. */
export const ROTATE_MIN = 10;
export const ROTATE_MAX = 600;
export const ROTATE_DEFAULT = 30;
/** The choices the footer offers; an address may ask for any number in range. */
export const ROTATE_CHOICES = [15, 30, 60, 120];
/**
* Pure: the pages a board can rotate through, from what it has to show — always the overview first; then what needs attention (only
* while something does); then one page for each group of integrations that has any, in the order of the menu. A board that shows numbers
* only has just the overview, since there is nothing by name to put on another page.
*/
export function wallPages(d: WallPagesInput): WallPage[] {
const pages: WallPage[] = [{ id: "overview", label: "Overview", kind: "overview" }];
if (d.problems && d.problems.length > 0) pages.push({ id: "alerts", label: "Needs attention", kind: "alerts" });
if (d.integrations) {
const present = new Set(d.integrations.map((i) => groupOfType(i.type as IntegrationType).id));
const order = [...TYPE_GROUPS.map((g) => ({ id: g.id, label: g.label })), { id: "other", label: "Other" }];
for (const g of order) if (present.has(g.id)) pages.push({ id: `group:${g.id}`, label: g.label, kind: "group", groupId: g.id });
}
return pages;
}
/** Pure: the page `step` places on from the current one (wrapping round); a page that is gone (its alerts cleared) sends it to the overview. */
export function stepPage(pages: WallPage[], currentId: string, step: number): WallPage {
const at = pages.findIndex((p) => p.id === currentId);
if (at < 0) return pages[0];
return pages[(((at + step) % pages.length) + pages.length) % pages.length];
}
/** Pure: whether the page still exists in the list — a page whose reason went away is replaced by the overview. */
export function pageOrOverview(pages: WallPage[], currentId: string): WallPage {
return pages.find((p) => p.id === currentId) ?? pages[0];
}
/**
* Pure: how long each page stays, in seconds, or null for no rotation. The address wins (`?rotate=45`; `?rotate=on` for the default; `?rotate=off`),
* then what this browser last chose, else no rotation. A number out of range is brought into it; anything else means off.
*/
export function rotateSeconds(param: string | null, stored: string | null): number | null {
const read = (v: string | null): number | null | undefined => {
if (v === null || v === "") return undefined;
const t = v.trim().toLowerCase();
if (t === "on" || t === "true" || t === "1") return ROTATE_DEFAULT;
if (t === "off" || t === "false" || t === "0") return null;
if (!/^\d{1,5}$/.test(t)) return null;
return Math.min(ROTATE_MAX, Math.max(ROTATE_MIN, Number(t)));
};
const fromAddress = read(param);
if (fromAddress !== undefined) return fromAddress;
return read(stored) ?? null;
}
/** Pure: a group's integrations for its page — the failing ones first, then by name. */
export function groupMembers<T extends { type: string; name: string; status: string }>(integrations: T[], groupId: string): T[] {
return integrations
.filter((i) => groupOfType(i.type as IntegrationType).id === groupId)
.sort((a, b) => Number(b.status === "failing") - Number(a.status === "failing") || a.name.localeCompare(b.name));
}