Runbooks per alert kind, high-vulnerability threshold, wall display extras
A "What to do" note (text and/or link) can be written once for a whole kind of alert and shows beside every alert of that kind; alerts now carry their kind and source type. New optional setting: warn when a Docker host has N or more high vulnerabilities (off by default). The wall display gains tiles (Hetzner and game servers running, critical vulnerabilities, stuck downloads) and a summary line for each group of integrations, also in share links. Migration 0074; docs and tests included. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d9083adb5b
commit
3d9a2310bb
35 files changed
+9129
-30
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { useEffect, useState, type ReactNode } from "react";
|
||||
import type { WallGroup, WallTile } from "../api/client";
|
||||
import { formatDate, formatTime } from "../utils/date";
|
||||
import { formatRemaining } from "../utils/duration";
|
||||
|
||||
@@ -48,6 +49,9 @@ export interface WallData {
|
||||
problems: { id: string; severity: "critical" | "warning"; message: string }[] | null;
|
||||
windows: { id: number; name: string; endsAt: string }[] | null;
|
||||
integrations: { id: number; name: string; type: string; status: "ok" | "failing" | "unknown" }[] | null;
|
||||
/** What else is worth a glance, and a summary of each group of integrations; absent on a board that has none. */
|
||||
tiles?: WallTile[];
|
||||
groups?: WallGroup[];
|
||||
environmentName: string | null;
|
||||
updatedAt: Date | null;
|
||||
}
|
||||
@@ -141,8 +145,30 @@ export default function WallView({ data, idle, footerActions }: { data: WallData
|
||||
<div className="wall-tile-figure">{data.integrationsFailing === null ? "…" : data.integrationsFailing}</div>
|
||||
<div className="wall-tile-label">integrations failing</div>
|
||||
</div>
|
||||
{(data.tiles ?? []).map((t) => (
|
||||
<div key={t.id} className={`wall-tile ${t.state === "bad" ? "wall-tile-bad" : t.state === "warn" ? "wall-tile-warn" : t.state === "info" ? "wall-tile-info" : ""}`}>
|
||||
<div className="wall-tile-figure">{t.figure}</div>
|
||||
<div className="wall-tile-label">{t.label}</div>
|
||||
</div>
|
||||
))}
|
||||
</section>
|
||||
|
||||
{(data.groups ?? []).length > 0 && (
|
||||
<section className="wall-groups" aria-label="By area">
|
||||
{(data.groups ?? []).map((g) => {
|
||||
const alerts = g.alerts.critical + g.alerts.warning;
|
||||
const level = g.failing > 0 || g.alerts.critical > 0 ? "bad" : alerts > 0 ? "warn" : "ok";
|
||||
const parts = [g.failing > 0 ? `${g.failing} of ${g.integrations} failing` : null, alerts > 0 ? `${alerts} ${alerts === 1 ? "alert" : "alerts"}` : null].filter(Boolean);
|
||||
return (
|
||||
<div key={g.id} className={`wall-group wall-group-${level}`}>
|
||||
<span aria-hidden="true">{level === "bad" ? "✕" : level === "warn" ? "▲" : "✓"}</span> <strong>{g.label}</strong>{" "}
|
||||
<span className="wall-dim">{parts.length > 0 ? parts.join(" · ") : `${g.integrations} connected`}</span>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</section>
|
||||
)}
|
||||
|
||||
{showsDetail ? (
|
||||
<section className="wall-columns">
|
||||
<div>
|
||||
|
||||
Reference in new issue
Block a user