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
@@ -10,6 +10,7 @@ import { getAlerts } from "./alerts.js";
|
||||
import { getSourceStatus } from "./integrationHealthMonitor.js";
|
||||
import { describeTarget, listActiveWindows, activeSubjects } from "./maintenance.js";
|
||||
import { buildServerSummary } from "./serverSummary.js";
|
||||
import { buildWallExtras, type WallGroup, type WallTile } from "./wallExtras.js";
|
||||
import { getSettings } from "./settingsStore.js";
|
||||
import type { ShareLinkDetail } from "../db/schema.js";
|
||||
|
||||
@@ -23,6 +24,9 @@ export interface PublicWall {
|
||||
/** Windows running now. */
|
||||
maintenance: number;
|
||||
integrationsFailing: number;
|
||||
/** What else is worth a glance (Hetzner servers running, critical vulnerabilities …) and a summary for each group of integrations — numbers and group names only, so every detail level has them. */
|
||||
tiles: WallTile[];
|
||||
groups: WallGroup[];
|
||||
/** Only with detail "names". */
|
||||
problems?: { id: string; severity: "critical" | "warning"; message: string }[];
|
||||
maintenanceWindows?: { id: number; name: string; endsAt: string }[];
|
||||
@@ -54,6 +58,8 @@ export async function buildPublicWall(detail: ShareLinkDetail, now: Date = new D
|
||||
const warning = report.counts.warning;
|
||||
const level: PublicWall["level"] = critical > 0 ? "critical" : warning > 0 ? "warning" : report.couldntCheck.length > 0 ? "unsure" : "ok";
|
||||
|
||||
const extras = await buildWallExtras(enabled.map((i) => ({ id: i.id, type: i.type })), new Set(failing.map((i) => i.type)), report.alerts, now.getTime());
|
||||
|
||||
const out: PublicWall = {
|
||||
detail,
|
||||
level,
|
||||
@@ -62,6 +68,8 @@ export async function buildPublicWall(detail: ShareLinkDetail, now: Date = new D
|
||||
alerts: { critical, warning },
|
||||
maintenance: windows.length,
|
||||
integrationsFailing: failing.length,
|
||||
tiles: extras.tiles,
|
||||
groups: extras.groups,
|
||||
generatedAt: now.toISOString(),
|
||||
display: { dateFormat: settings.display.dateFormat, timeFormat: settings.display.timeFormat },
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user