From 9937ab2202cd9f57388ebdebef77cc544f6d2f59 Mon Sep 17 00:00:00 2001 From: Bobban Rydh Date: Tue, 10 Nov 2026 19:42:34 +0100 Subject: [PATCH] Fold long page introductions to two lines with Show more One component, PageIntro, for the text under a page's title: shown as it is when it fits in two lines, otherwise folded with a Show more, remembered per page in this browser, opened by tabbing to a link in it, unfolded in print. Used on 41 pages. Co-Authored-By: Claude Sonnet 5.5 --- README.md | 2 + server/test/pageIntro.test.ts | 68 +++++++++++++++++++++++++++ web/src/components/PageIntro.tsx | 54 +++++++++++++++++++++ web/src/pages/AdguardHome.tsx | 5 +- web/src/pages/AdminLinks.tsx | 5 +- web/src/pages/ApiTokens.tsx | 5 +- web/src/pages/Authentik.tsx | 5 +- web/src/pages/Backups.tsx | 5 +- web/src/pages/ComingUp.tsx | 5 +- web/src/pages/Consistency.tsx | 5 +- web/src/pages/Costs.tsx | 5 +- web/src/pages/Downloads.tsx | 5 +- web/src/pages/Duplicati.tsx | 5 +- web/src/pages/Endpoints.tsx | 5 +- web/src/pages/GameServers.tsx | 5 +- web/src/pages/Generator.tsx | 5 +- web/src/pages/Grafana.tsx | 5 +- web/src/pages/Heartbeats.tsx | 5 +- web/src/pages/Hetzner.tsx | 5 +- web/src/pages/HetznerRobot.tsx | 5 +- web/src/pages/HomeAssistant.tsx | 5 +- web/src/pages/Immich.tsx | 5 +- web/src/pages/Integrations.tsx | 5 +- web/src/pages/InventoryLifecycle.tsx | 5 +- web/src/pages/InventoryRacks.tsx | 5 +- web/src/pages/Jellyfin.tsx | 5 +- web/src/pages/Maintenance.tsx | 5 +- web/src/pages/Map.tsx | 5 +- web/src/pages/Media.tsx | 5 +- web/src/pages/MonthlyReport.tsx | 5 +- web/src/pages/MyWork.tsx | 5 +- web/src/pages/N8n.tsx | 5 +- web/src/pages/NetBox.tsx | 5 +- web/src/pages/NetworkDevices.tsx | 5 +- web/src/pages/Nextcloud.tsx | 5 +- web/src/pages/NotificationHistory.tsx | 5 +- web/src/pages/Paperless.tsx | 5 +- web/src/pages/Prometheus.tsx | 5 +- web/src/pages/ProxyHosts.tsx | 5 +- web/src/pages/Speedtest.tsx | 5 +- web/src/pages/TechnitiumDns.tsx | 5 +- web/src/pages/Todo.tsx | 5 +- web/src/pages/Ups.tsx | 5 +- web/src/pages/Versions.tsx | 5 +- web/src/styles.css | 24 ++++++++++ web/src/utils/pageIntro.ts | 36 ++++++++++++++ 46 files changed, 307 insertions(+), 82 deletions(-) create mode 100644 server/test/pageIntro.test.ts create mode 100644 web/src/components/PageIntro.tsx create mode 100644 web/src/utils/pageIntro.ts diff --git a/README.md b/README.md index a9316da..54209b7 100644 --- a/README.md +++ b/README.md @@ -950,6 +950,8 @@ switched by `?view=`, so a section can be linked to: an alert about a failing se **The status strip.** Under a server's name, on every section of its page, a row of figures says how it is at a glance: **Status** (online, with when it last reported — or *offline*, with when it did, and a note when Proxmox says the guest is still running, so a stopped agent is not read as a dead machine; for a server with no agent report, what Proxmox says, or that nothing has reported), **Maintenance** (only while a window on this server is on, with when it ends and why), **Alerts** (how many are open about this server and how bad — what a maintenance window, a snooze or a closing has put aside is not counted, but said — and a link to the Alerts page), **Updates** (what is waiting, how many of them security fixes, whether a reboot is needed), **Disk** (the fullest, against its own limit: green, yellow within ten points of it, red at it; a mount with its own limit is judged by that, and an ignored mount is left out), **CPU · memory** and **how long it has run** (for a guest Proxmox reads, or from an agent of version 8 on Linux, 7 on Windows, which say it in every report; left out while the server is offline, since it is then no longer how long it has been up). A figure nothing is known for is left out or says so — it is never filled in. It uses what the page already has plus the alerts and the maintenance windows, read again whenever the page is (the *Refresh* button). Everyone signed in sees it. +**Shorter page introductions.** The few lines under a page’s title that say what the page is are folded to two lines when they are longer than that, with **Show more** under them, so the page’s own content starts higher up. What you choose is remembered for that page in this browser; a short one is shown as it is, a link inside the folded part opens it when you tab to it, and a printout shows all of it. + **Notification history.** Records → Notifications lists every notification that was sent, with how it went through each channel (or why it was not sent: held for quiet hours, a routing rule said nobody, no channel switched on), the error a channel gave when it refused, a filter and a search, and **Send again**. Kept 30 days. See NOTIFICATIONS.md. **A shorter menu for a smaller homelab.** The menu has a page for every kind of integration the app can read, whether or not you run it. **Settings → Display → Menu → Hide the pages of integrations I have not added** (off until you switch it on, the same for everyone) leaves out of the menu, the command palette and the `g`-shortcuts the pages whose integrations are not in **Administration → Integrations**: Gitea, n8n, Grafana … as the list under the switch says (a disabled integration still counts as added; any one of Sonarr, Radarr, Lidarr, Readarr or Prowlarr keeps *Media managers*, and a Proxmox or a Backup Server keeps *Proxmox backups*). Pages that are useful without an integration — Servers, Alerts, DNS, Endpoints, Secrets, Inventory and the rest — always stay, a group with nothing left disappears, and a hidden page is still there by its address. Adding an integration brings its page back at once. diff --git a/server/test/pageIntro.test.ts b/server/test/pageIntro.test.ts new file mode 100644 index 0000000..ecbd35c --- /dev/null +++ b/server/test/pageIntro.test.ts @@ -0,0 +1,68 @@ +/** + * The folded introductions under page titles: what is remembered about which ones the person has opened out, kept as a short list of page paths — and that every page that has such a text + * uses the one component for it, so they all fold the same way. + * + * Run with: npm test --workspace server + */ +import { test, describe } from "node:test"; +import assert from "node:assert/strict"; +import { readdirSync, readFileSync } from "node:fs"; +import { join } from "node:path"; + +const { parseOpen, withOpen } = await import("../../web/src/utils/pageIntro.js"); + +describe("what is remembered", () => { + test("a list of paths as stored; anything else is an empty list", () => { + assert.deepEqual(parseOpen('["/duplicati","/technitium"]'), ["/duplicati", "/technitium"]); + for (const junk of [null, "", "nope", "{}", "5", '"x"']) assert.deepEqual(parseOpen(junk), [], String(junk)); + assert.deepEqual(parseOpen('["/a", 5, null, "/b"]'), ["/a", "/b"], "what is not a path is dropped"); + }); + + test("opening a page adds it once; folding it takes it away; the others are left as they were", () => { + const one = withOpen([], "/duplicati", true); + assert.deepEqual(one, ["/duplicati"]); + assert.deepEqual(withOpen(one, "/duplicati", true), ["/duplicati"], "not twice"); + assert.deepEqual(withOpen(withOpen(one, "/technitium", true), "/duplicati", false), ["/technitium"]); + }); + + test("the list never grows past 200: the newest are kept", () => { + let list: string[] = []; + for (let i = 0; i < 250; i++) list = withOpen(list, `/page-${i}`, true); + assert.equal(list.length, 200); + assert.equal(list[0], "/page-50"); + assert.equal(list.at(-1), "/page-249"); + }); +}); + +describe("the pages", () => { + const pages = join(import.meta.dirname, "..", "..", "web", "src", "pages"); + const files = readdirSync(pages).filter((f) => f.endsWith(".tsx")); + const read = (f: string) => readFileSync(join(pages, f), "utf8"); + + test("the long introductions that were converted use the component, with its import, and no page is left with a long one in a bare paragraph", () => { + const using = files.filter((f) => read(f).includes("= 38, `${using.length} pages use it`); + for (const f of using) assert.match(read(f), /import PageIntro from "\.\.\/components\/PageIntro";/, f); + // After a page's title, the first block of secondary text of any length (but a short note) is the component's. + const bare: string[] = []; + for (const f of files) { + const s = read(f).replace(/\r\n/g, "\n"); + const t = s.indexOf("page-title"); + if (t < 0 || s.slice(t, t + 3500).includes("([\s\S]*?)<\/\1>/.exec(s.slice(t, t + 3500)); + const text = m ? m[2].replace(/<[^>]+>/g, "").replace(/\{[^}]*\}/g, "x").replace(/\s+/g, " ").trim() : ""; + if (text.length >= 200 && !/card-body/.test(m![0].slice(0, 80))) bare.push(`${f} (${text.length})`); + } + // The few that follow their title with a note of another kind (a card, a field's hint) are not introductions. + assert.deepEqual(bare.filter((b) => !/^(Ipam|Servers|InventoryLabels|Privacy)\.tsx/.test(b)), []); + }); + + test("the component keeps all of the text (it is folded with the styles, never cut from the page) and is printed unfolded", () => { + const component = readFileSync(join(import.meta.dirname, "..", "..", "web", "src", "components", "PageIntro.tsx"), "utf8"); + assert.match(component, /aria-expanded=\{open\}/); + assert.match(component, /\{children\}/); + const css = readFileSync(join(import.meta.dirname, "..", "..", "web", "src", "styles.css"), "utf8"); + assert.match(css, /\.page-intro-clamp[\s\S]*?-webkit-line-clamp:\s*2/); + assert.match(css, /@media print[\s\S]*?\.page-intro-clamp[\s\S]*?overflow:\s*visible/); + }); +}); diff --git a/web/src/components/PageIntro.tsx b/web/src/components/PageIntro.tsx new file mode 100644 index 0000000..a7fff21 --- /dev/null +++ b/web/src/components/PageIntro.tsx @@ -0,0 +1,54 @@ +import { useId, useLayoutEffect, useRef, useState, type ReactNode } from "react"; +import { useLocation } from "react-router-dom"; +import { isIntroOpen, rememberIntroOpen } from "../utils/pageIntro"; + +/** + * The few lines under a page's title that say what the page is. Short ones show as they are; one that runs to more than two lines is folded to two with a "Show more" under it, so the page's + * own content starts higher up, and what the person chose is remembered for that page in this browser. All of the text is in the page either way (a screen reader reads it all, a printout + * shows it all, and tabbing to a link in the folded part opens it). + */ +export default function PageIntro({ children, className = "mb-3" }: { children: ReactNode; className?: string }) { + const { pathname } = useLocation(); + const id = useId(); + const ref = useRef(null); + const [open, setOpen] = useState(() => isIntroOpen(pathname)); + const [overflowing, setOverflowing] = useState(false); + + // Whether it is more than two lines at this width: measured against the line height, so it holds both folded and opened out. + useLayoutEffect(() => { + const el = ref.current; + if (!el) return; + const measure = () => { + const line = parseFloat(getComputedStyle(el).lineHeight) || 22; + setOverflowing(el.scrollHeight > line * 2 + 2); + }; + measure(); + if (typeof ResizeObserver === "undefined") return; + const watch = new ResizeObserver(measure); + watch.observe(el); + return () => watch.disconnect(); + }, [children]); + + const folded = overflowing && !open; + return ( +
+
folded && setOpen(true)}> + {children} +
+ {overflowing && ( + + )} +
+ ); +} diff --git a/web/src/pages/AdguardHome.tsx b/web/src/pages/AdguardHome.tsx index a717084..468d402 100644 --- a/web/src/pages/AdguardHome.tsx +++ b/web/src/pages/AdguardHome.tsx @@ -8,6 +8,7 @@ import { BlockSkeleton } from "../components/Skeleton"; import { ErrorNotice } from "../components/Notice"; import { formatAgo } from "../utils/duration"; import { readableError } from "../utils/errors"; +import PageIntro from "../components/PageIntro"; function Badge({ a }: { a: AdguardInstance }) { if (!a.enabled) return Off; @@ -166,10 +167,10 @@ export default function AdguardHome({ user }: { user: CurrentUser }) { return ( <>

AdGuard Home

-

+ Read every two minutes (see Integrations), with a real DNS question put to it each time — its web interface can be up while DNS is not. Nothing is changed. DNS that stops answering, a DNS server that is not running,{" "} protection left off for an hour and filter lists that stopped updating are alerts — see Alerts. -

+ {!data && !error && } {data && data.length === 0 && ( diff --git a/web/src/pages/AdminLinks.tsx b/web/src/pages/AdminLinks.tsx index feec90e..4d55196 100644 --- a/web/src/pages/AdminLinks.tsx +++ b/web/src/pages/AdminLinks.tsx @@ -9,6 +9,7 @@ import { guessAdminUrl, portOptionLabel } from "../utils/adminLinkUrl"; import { ErrorNotice } from "../components/Notice"; import TableToolbar from "../components/TableToolbar"; import { EmptyRow, LoadingRow } from "../components/EmptyState"; +import PageIntro from "../components/PageIntro"; interface LinkForm { serverId: number | ""; @@ -152,10 +153,10 @@ export default function AdminLinks({ user }: { user: CurrentUser }) { return ( <>

Admin Links

-

+ Every admin bookmark added to a server's own page (Infrastructure → Servers → a server → Admin Links) — Dockge, Webmin, Cockpit, and the like — in one place, instead of visiting each server to find them. -

+ {canEdit && showForm && ( diff --git a/web/src/pages/ApiTokens.tsx b/web/src/pages/ApiTokens.tsx index f7d7260..7b59423 100644 --- a/web/src/pages/ApiTokens.tsx +++ b/web/src/pages/ApiTokens.tsx @@ -9,6 +9,7 @@ import { confirmDialog } from "../utils/dialogs"; import { formatDate } from "../utils/date"; import { readableError } from "../utils/errors"; import { toast } from "../utils/toast"; +import PageIntro from "../components/PageIntro"; const EXPIRY = [ { value: "90", label: "90 days" }, @@ -87,9 +88,9 @@ export default function ApiTokens() {

API tokens

-
+ Read-only access to your installation’s data for scripts, Home Assistant and dashboards. A token can only read, sees what you see, and stops working when you are removed. Make one for each thing that reads, so each can be removed on its own. -
+ {fresh && ( diff --git a/web/src/pages/Authentik.tsx b/web/src/pages/Authentik.tsx index 223c10d..512f39e 100644 --- a/web/src/pages/Authentik.tsx +++ b/web/src/pages/Authentik.tsx @@ -10,6 +10,7 @@ import TimeAgo from "../components/TimeAgo"; import { BlockSkeleton } from "../components/Skeleton"; import { ErrorNotice } from "../components/Notice"; import { readableError } from "../utils/errors"; +import PageIntro from "../components/PageIntro"; function Badge({ a }: { a: AuthentikInfo }) { if (!a.enabled) return Off; @@ -194,7 +195,7 @@ export default function Authentik({ user }: { user: CurrentUser }) { /> )} {view === "status" ? ( -

+ The sign-in in front of everything else. It is read every few minutes with an API token (see Integrations). An outpost that goes quiet (the apps it guards stop letting anyone in), a certificate or an{" "} API token that is about to run out, no worker and a burst of failed sign-ins are alerts — see Alerts. {isAdmin && ( @@ -203,7 +204,7 @@ export default function Authentik({ user }: { user: CurrentUser }) { Making users and looking after users and groups is under Users and groups. )} -

+ ) : (

Make a user — with a one-time link for them to choose their own password — switch users off, edit or delete them, and make and rename groups and change who is in them. It needs a token that may do that on the integration (Integrations → edit), diff --git a/web/src/pages/Backups.tsx b/web/src/pages/Backups.tsx index 3cee3af..42b9739 100644 --- a/web/src/pages/Backups.tsx +++ b/web/src/pages/Backups.tsx @@ -15,6 +15,7 @@ import { useTableSearch } from "../hooks/useTableSearch"; import { downloadCsv } from "../utils/csv"; import { readableError } from "../utils/errors"; import { EmptyRow } from "../components/EmptyState"; +import PageIntro from "../components/PageIntro"; interface Row extends CoverageGuest { /** Worst first, so a default sort puts what needs attention at the top. */ @@ -179,9 +180,9 @@ export default function Backups({ user, tabs }: { user?: CurrentUser; /** The ta {tabs} -

+ Every Proxmox guest: is a backup job covering it, when was it last backed up, and did that go well. {report && trouble > 0 ? `${trouble} need a look.` : ""} -

+ {badSources.length > 0 && (
diff --git a/web/src/pages/ComingUp.tsx b/web/src/pages/ComingUp.tsx index 3b2563a..8443c22 100644 --- a/web/src/pages/ComingUp.tsx +++ b/web/src/pages/ComingUp.tsx @@ -7,6 +7,7 @@ import EmptyState from "../components/EmptyState"; import { downloadCsv } from "../utils/csv"; import { formatDate, formatTime } from "../utils/date"; import { readableError } from "../utils/errors"; +import PageIntro from "../components/PageIntro"; const KINDS: { id: AgendaKind; label: string }[] = [ { id: "secret", label: "Secrets" }, @@ -195,7 +196,7 @@ export default function ComingUp({ user }: { user: CurrentUser }) { Export CSV
-

+ What is about to need attention, nearest first: things that expire, hardware that ages out, planned maintenance, restore tests that are due. Each also raises its own alert when it gets close. {user.role === "admin" ? ( <> @@ -205,7 +206,7 @@ export default function ComingUp({ user }: { user: CurrentUser }) { ) : ( " An administrator can make a calendar feed of it for your phone." )} -

+ {agenda && agenda.notes.length > 0 && (
diff --git a/web/src/pages/Consistency.tsx b/web/src/pages/Consistency.tsx index 7a34a17..d15dc4f 100644 --- a/web/src/pages/Consistency.tsx +++ b/web/src/pages/Consistency.tsx @@ -8,6 +8,7 @@ import { formatAgo } from "../utils/duration"; import { readableError } from "../utils/errors"; import { promptDialog } from "../utils/dialogs"; import { ErrorNotice, SuccessNotice } from "../components/Notice"; +import PageIntro from "../components/PageIntro"; const KINDS: { kind: ConsistencyKind; title: string; blurb: string }[] = [ { kind: "ip_conflict", title: "Address conflicts", blurb: "The same address reported by more than one server." }, @@ -167,10 +168,10 @@ export default function Consistency({ user }: { user: CurrentUser }) {
-
+ Where IPAM, DNS and your servers disagree about what lives at an address. It compares what's already stored — nothing is fetched from the servers or DNS providers when you open this page. -
+ diff --git a/web/src/pages/Costs.tsx b/web/src/pages/Costs.tsx index 13d9219..abafd8e 100644 --- a/web/src/pages/Costs.tsx +++ b/web/src/pages/Costs.tsx @@ -9,6 +9,7 @@ import { confirmDialog } from "../utils/dialogs"; import { formatDate } from "../utils/date"; import { readableError } from "../utils/errors"; import { toast } from "../utils/toast"; +import PageIntro from "../components/PageIntro"; const money = (n: number, currency: string) => { try { @@ -140,9 +141,9 @@ export default function Costs({ user }: { user: CurrentUser }) {

Costs

-
+ What the homelab costs, in one place: what you pay for by hand and what can be read (a Hetzner project’s estimate — see Hetzner Cloud). Each currency has its own total; none is converted into another. A day a bill falls on shows under Coming up. -
+
{isAdmin && !form && ( )}
-

+ Whether the backups Duplicati makes are being made. Duplicati tells this app how each backup went (its own send-http-url option), so nothing here calls Duplicati and no password for it is kept. A backup that fails, or has not succeeded for longer than it should, is an alert — see Alerts. A run that finishes with warnings still counts as a good backup; open a job’s warnings to see what they said, and switch on Alert on warnings for the jobs where they matter. -

+ {fresh &&
setFresh(null)} />} diff --git a/web/src/pages/Endpoints.tsx b/web/src/pages/Endpoints.tsx index ea127ec..d6cf173 100644 --- a/web/src/pages/Endpoints.tsx +++ b/web/src/pages/Endpoints.tsx @@ -17,6 +17,7 @@ import { toast } from "../utils/toast"; import { EmptyRow } from "../components/EmptyState"; import EndpointSuggestions from "../components/EndpointSuggestions"; import EndpointHistory from "../components/EndpointHistory"; +import PageIntro from "../components/PageIntro"; const KIND_LABELS: Record = { http: "Web address", tcp: "Port", tls: "Certificate" }; const KIND_HINTS: Record = { @@ -255,10 +256,10 @@ export default function Endpoints({ user }: { user: CurrentUser }) { )} -

+ The app asks a web address, a port or a certificate whether it is fine, every few minutes, and says so on the Alerts page and in notifications when it keeps failing or a certificate is about to run out. -

+
diff --git a/web/src/pages/GameServers.tsx b/web/src/pages/GameServers.tsx index 94cd32e..eae99e3 100644 --- a/web/src/pages/GameServers.tsx +++ b/web/src/pages/GameServers.tsx @@ -12,6 +12,7 @@ import { readableError } from "../utils/errors"; import { toast } from "../utils/toast"; import { barPosition, eventText, onHeadline } from "../utils/gamePower"; import { formatDateTime } from "../utils/date"; +import PageIntro from "../components/PageIntro"; type Server = FragnetServerInfo; @@ -538,10 +539,10 @@ export default function GameServers({ user }: { user: CurrentUser }) { return ( <>

Game servers

-

+ What Fragnet’s game panel says about your servers, read every few minutes (see Integrations). A backup that is late and a disk or memory nearly full are alerts — see Alerts; a server that is stopped is not, since a game server is often stopped on purpose. {canAct ? " Start, stop and restart are sent to the panel when you press them; nothing else is ever changed." : " Operators can start, stop and restart them from here."} What they cost is added by hand under Costs. -

+ {!data && !error && } {data && data.length === 0 && ( diff --git a/web/src/pages/Generator.tsx b/web/src/pages/Generator.tsx index 4ab2cc7..02aaba2 100644 --- a/web/src/pages/Generator.tsx +++ b/web/src/pages/Generator.tsx @@ -14,6 +14,7 @@ import { type PasswordOptions, } from "../utils/generators"; import { ErrorNotice } from "../components/Notice"; +import PageIntro from "../components/PageIntro"; const MIXED = "mixed"; @@ -85,10 +86,10 @@ export default function Generator({ user }: { user: CurrentUser }) { return ( <>

Generator

-
+ Usernames and passwords are generated locally in your browser — nothing is sent to or stored on the server. Server names are picked in your browser too, from name lists the server hands out. -
+
diff --git a/web/src/pages/Grafana.tsx b/web/src/pages/Grafana.tsx index 6d9bb21..9f75bd4 100644 --- a/web/src/pages/Grafana.tsx +++ b/web/src/pages/Grafana.tsx @@ -7,6 +7,7 @@ import TimeAgo from "../components/TimeAgo"; import { BlockSkeleton } from "../components/Skeleton"; import { ErrorNotice } from "../components/Notice"; import { readableError } from "../utils/errors"; +import PageIntro from "../components/PageIntro"; function Badge({ g }: { g: GrafanaInstance }) { if (!g.enabled) return Off; @@ -149,10 +150,10 @@ export default function Grafana({ user }: { user: CurrentUser }) { return ( <>

Grafana

-

+ Read every few minutes (see Integrations) — nothing is silenced, paused or changed. A rule that is firing, a rule Grafana cannot evaluate and a data source that fails its check are alerts — see Alerts. Grafana can notify about its own alerts too; with both you hear twice. -

+ {!data && !error && } {data && data.length === 0 && ( diff --git a/web/src/pages/Heartbeats.tsx b/web/src/pages/Heartbeats.tsx index de54db3..ed63bd6 100644 --- a/web/src/pages/Heartbeats.tsx +++ b/web/src/pages/Heartbeats.tsx @@ -17,6 +17,7 @@ import { confirmDialog } from "../utils/dialogs"; import { formatDateTime } from "../utils/date"; import { readableError } from "../utils/errors"; import { toast } from "../utils/toast"; +import PageIntro from "../components/PageIntro"; const STATE_BADGE: Record = { waiting: { label: "Waiting for the first call", badge: "bg-secondary-lt text-secondary" }, @@ -237,10 +238,10 @@ export default function Heartbeats({ user }: { user: CurrentUser }) { )}
-

+ For jobs that should run on their own — a backup, a sync, a cleanup. The job calls an address when it finishes; if the call doesn’t come in time, or the job says it failed, it appears on the{" "} Alerts page and in notifications. -

+ {showing && setShowing(null)} />} diff --git a/web/src/pages/Hetzner.tsx b/web/src/pages/Hetzner.tsx index 11967b5..84c202a 100644 --- a/web/src/pages/Hetzner.tsx +++ b/web/src/pages/Hetzner.tsx @@ -8,6 +8,7 @@ import { BlockSkeleton } from "../components/Skeleton"; import { ErrorNotice } from "../components/Notice"; import { formatBytes } from "./settings/StorageSettings"; import { readableError } from "../utils/errors"; +import PageIntro from "../components/PageIntro"; function Badge({ p }: { p: HetznerProject }) { if (!p.enabled) return Off; @@ -352,10 +353,10 @@ export default function Hetzner({ user }: { user: CurrentUser }) { return ( <>

Hetzner Cloud

-

+ One project per integration, read every few minutes (see Integrations) — nothing is started, stopped or changed. A server that was running and is now off, traffic close to the month’s quota,{" "} rescue mode left on, backups that are late, a traffic quota the month is on course to pass, unhealthy load balancer targets, certificates about to end and floating IPs that point at nothing are alerts — see Alerts. -

+ {!data && !error && } {data && data.length === 0 && ( diff --git a/web/src/pages/HetznerRobot.tsx b/web/src/pages/HetznerRobot.tsx index 15f4f0d..1e17ba8 100644 --- a/web/src/pages/HetznerRobot.tsx +++ b/web/src/pages/HetznerRobot.tsx @@ -7,6 +7,7 @@ import TimeAgo from "../components/TimeAgo"; import { BlockSkeleton } from "../components/Skeleton"; import { ErrorNotice } from "../components/Notice"; import { readableError } from "../utils/errors"; +import PageIntro from "../components/PageIntro"; function Badge({ a }: { a: RobotAccount }) { if (!a.enabled) return Off; @@ -207,10 +208,10 @@ export default function HetznerRobot({ user }: { user: CurrentUser }) { return ( <>

Hetzner Robot

-

+ Dedicated servers and storage boxes at Hetzner (Robot — the cloud servers are on Hetzner Cloud), read every fifteen minutes (see Integrations) — nothing is reset, ordered or cancelled.{" "} A server or storage box that is cancelled and about to shut down, a locked storage box, a rescue system left on and a server stuck being set up are alerts — see Alerts. -

+ {!data && !error && } {data && data.length === 0 && ( diff --git a/web/src/pages/HomeAssistant.tsx b/web/src/pages/HomeAssistant.tsx index 795f559..e000693 100644 --- a/web/src/pages/HomeAssistant.tsx +++ b/web/src/pages/HomeAssistant.tsx @@ -10,6 +10,7 @@ import { ErrorNotice } from "../components/Notice"; import { useChartRange } from "../utils/chartRanges"; import { readableError } from "../utils/errors"; import { toast } from "../utils/toast"; +import PageIntro from "../components/PageIntro"; type Integration = HaOverview["integrations"][number]; @@ -284,10 +285,10 @@ export default function HomeAssistant({ user }: { user: CurrentUser }) {
)}
-
+ The few things worth an alert in Home Assistant — a UPS battery, a freezer, a pump — chosen here rather than every entity it has. Each is read every five minutes and its history is kept for 35 days. It only reads; nothing is ever sent to Home Assistant. -
+ {data === null && !error && } {data && live.length === 0 && ( diff --git a/web/src/pages/Immich.tsx b/web/src/pages/Immich.tsx index 551b75c..acc5b85 100644 --- a/web/src/pages/Immich.tsx +++ b/web/src/pages/Immich.tsx @@ -7,6 +7,7 @@ import { BlockSkeleton } from "../components/Skeleton"; import { ErrorNotice } from "../components/Notice"; import { formatBytes } from "./settings/StorageSettings"; import { readableError } from "../utils/errors"; +import PageIntro from "../components/PageIntro"; function Badge({ i }: { i: ImmichInfo }) { if (!i.enabled) return Off; @@ -148,10 +149,10 @@ export default function Immich() { return ( <>

Immich

-

+ Photos are what cannot be made again, and Immich fails quietly. It is read every few minutes with an API key (see Integrations). A disk under the library that is filling up and background jobs that have failed (thumbnails and metadata that were never made) are alerts — see Alerts. -

+ {!data && !error && } {data && data.length === 0 && ( diff --git a/web/src/pages/Integrations.tsx b/web/src/pages/Integrations.tsx index ac0a0d8..cc41667 100644 --- a/web/src/pages/Integrations.tsx +++ b/web/src/pages/Integrations.tsx @@ -20,6 +20,7 @@ import { groupOfType, INSPECTABLE, TYPE_GROUPS, TYPE_LABELS, TYPE_PAGES } from " import { hostOf, integrationRow, integrationStatus, type IntegrationRow } from "../utils/integrationRows"; import { useSortable } from "../hooks/useSortable"; import SortableTh from "../components/SortableTh"; +import PageIntro from "../components/PageIntro"; function HealthBadge({ i }: { i: IntegrationSummary }) { const status = integrationStatus(i); @@ -246,9 +247,9 @@ function IntegrationsList({ user, tabs }: { user: CurrentUser; tabs: ReactNode }

Integrations

-
+ Each connected system gets its own page — open it from here or from the sidebar, in the group shown. Add and manage credentials here. -
+
{isAdmin && !adding && !editingIntegration && (
-

+ What ages out, year by year, and roughly what replacing it will cost. Give a piece of hardware an end of support and a replacement cost in the inventory; until it has an end of support, the end of its warranty stands in, and until it has a replacement cost, what it was bought for. -

+ {!report && !error && } diff --git a/web/src/pages/InventoryRacks.tsx b/web/src/pages/InventoryRacks.tsx index 1d14a9b..3ea4d86 100644 --- a/web/src/pages/InventoryRacks.tsx +++ b/web/src/pages/InventoryRacks.tsx @@ -6,6 +6,7 @@ import { ErrorNotice } from "../components/Notice"; import { BlockSkeleton } from "../components/Skeleton"; import { readableError } from "../utils/errors"; import { KIND_LABELS } from "../utils/inventory"; +import PageIntro from "../components/PageIntro"; type Rack = Awaited>["racks"][number]; @@ -79,9 +80,9 @@ export default function InventoryRacks() { -
+ Each piece of hardware that gives a unit (“U12”, or “U12-13” for a tall one) and the rack’s name as its location is drawn where it sits, from the bottom up. Two pieces in the same unit are shown in red. -
+ {racks === null && !error && } {racks !== null && racks.length === 0 && ( diff --git a/web/src/pages/Jellyfin.tsx b/web/src/pages/Jellyfin.tsx index 67e42cc..d5597a5 100644 --- a/web/src/pages/Jellyfin.tsx +++ b/web/src/pages/Jellyfin.tsx @@ -9,6 +9,7 @@ import { BlockSkeleton } from "../components/Skeleton"; import { ErrorNotice } from "../components/Notice"; import { useChartRange } from "../utils/chartRanges"; import { readableError } from "../utils/errors"; +import PageIntro from "../components/PageIntro"; function Badge({ j }: { j: JellyfinInfo }) { if (!j.enabled) return Off; @@ -180,10 +181,10 @@ export default function Jellyfin() { return ( <>

Jellyfin

-

+ Whether Jellyfin is up and who is watching. It is read every couple of minutes with an API key (see Integrations). A Jellyfin that wants a restart, a scheduled task that failed or a burst of{" "} failed sign-ins is an alert; and an update run on the machine it lives on asks first when somebody is streaming. -

+ {!data && !error && } {data && data.length === 0 && ( diff --git a/web/src/pages/Maintenance.tsx b/web/src/pages/Maintenance.tsx index c9690d5..dbeea37 100644 --- a/web/src/pages/Maintenance.tsx +++ b/web/src/pages/Maintenance.tsx @@ -22,6 +22,7 @@ import MaintenanceTimeline from "../components/MaintenanceTimeline"; import RecurringMaintenance from "../components/RecurringMaintenance"; import ExportTableButton from "../components/ExportTableButton"; import { EmptyRow, LoadingRow } from "../components/EmptyState"; +import PageIntro from "../components/PageIntro"; const DURATIONS: { minutes: number; label: string }[] = [ { minutes: 30, label: "30 minutes" }, @@ -248,10 +249,10 @@ export default function Maintenance({ user }: { user: CurrentUser }) { return ( <>

Maintenance

-
+ Silence alerts about one server or integration while you work on it. Every window ends on its own — anything still wrong when it ends alerts then, so nothing stays hidden. -
+ {canEdit && ( diff --git a/web/src/pages/Map.tsx b/web/src/pages/Map.tsx index fdea7eb..f521686 100644 --- a/web/src/pages/Map.tsx +++ b/web/src/pages/Map.tsx @@ -7,6 +7,7 @@ import { api, type MapData, type MapNode } from "../api/client"; import { ErrorNotice } from "../components/Notice"; import { PageSkeleton } from "../components/Skeleton"; import { readableError } from "../utils/errors"; +import PageIntro from "../components/PageIntro"; const NODE_W = 210; const NODE_H = 46; @@ -115,9 +116,9 @@ export default function MapPage({ user }: { user: CurrentUser }) { ) : ( <> -

+ A server that runs on another, a service that needs the server it is installed on. Pick a box to see what would go down with it before you reboot it. -

+

Say what needs what

diff --git a/web/src/pages/Media.tsx b/web/src/pages/Media.tsx index 68cbb3a..44bda28 100644 --- a/web/src/pages/Media.tsx +++ b/web/src/pages/Media.tsx @@ -8,6 +8,7 @@ import { BlockSkeleton } from "../components/Skeleton"; import { ErrorNotice } from "../components/Notice"; import { formatBytes } from "./settings/StorageSettings"; import { readableError } from "../utils/errors"; +import PageIntro from "../components/PageIntro"; const KIND_NAMES: Record = { sonarr: "Sonarr", radarr: "Radarr", prowlarr: "Prowlarr", lidarr: "Lidarr", readarr: "Readarr" }; const QUEUE_SHOWN = 25; @@ -218,10 +219,10 @@ export default function Media({ user }: { user: CurrentUser }) { return ( <>

Media managers

-

+ Sonarr, Radarr, Prowlarr, Lidarr and Readarr, read every few minutes (see Integrations) — nothing is searched, grabbed or changed. What an application says is wrong with itself, downloads stuck for two hours and{" "} a disk nearly full are alerts — see Alerts. -

+ {!data && !error && } {data && data.length === 0 && ( diff --git a/web/src/pages/MonthlyReport.tsx b/web/src/pages/MonthlyReport.tsx index 26604c5..81e1df0 100644 --- a/web/src/pages/MonthlyReport.tsx +++ b/web/src/pages/MonthlyReport.tsx @@ -8,6 +8,7 @@ import { CATEGORY_NAMES, incidentPath, SEVERITY_BADGE } from "../components/Inci import { formatDate, formatDateTime } from "../utils/date"; import { readableError } from "../utils/errors"; import { toast } from "../utils/toast"; +import PageIntro from "../components/PageIntro"; /** "2 h 40 min", "35 min", "3 d 4 h". */ function span(minutes: number): string { @@ -196,7 +197,7 @@ export default function MonthlyReport({ user }: { user: CurrentUser }) { -

+ How the {stretch} went, in one page: availability, how each service-level target did, incidents and how long they took, updates applied, restore tests and backups, and what was renewed. {user.role === "admin" ? ( <> @@ -204,7 +205,7 @@ export default function MonthlyReport({ user }: { user: CurrentUser }) { It can be sent on a day of the month, and a quarter's and year's report after the month that ends it: Settings → Notifications. ) : null} -

+ {!data && !error && } diff --git a/web/src/pages/MyWork.tsx b/web/src/pages/MyWork.tsx index 3ab3fc9..c247045 100644 --- a/web/src/pages/MyWork.tsx +++ b/web/src/pages/MyWork.tsx @@ -10,6 +10,7 @@ import { useMyWork } from "../hooks/useMyWork"; import { formatRemaining } from "../utils/duration"; import { readableError } from "../utils/errors"; import { toast } from "../utils/toast"; +import PageIntro from "../components/PageIntro"; const SEVERITY: Record = { critical: "bg-red-lt text-red", warning: "bg-yellow-lt text-yellow", info: "bg-blue-lt text-blue" }; @@ -102,9 +103,9 @@ export default function MyWorkPage({ user }: { user: CurrentUser }) {

My work

-
+ What has your name on it: alerts you acknowledged or were handed, maintenance you started and update runs you started, and jobs handed to you. Whatever is about to run out is marked, and listed first. -
+ {work === null && } diff --git a/web/src/pages/N8n.tsx b/web/src/pages/N8n.tsx index 28a3543..91c4473 100644 --- a/web/src/pages/N8n.tsx +++ b/web/src/pages/N8n.tsx @@ -6,6 +6,7 @@ import TimeAgo from "../components/TimeAgo"; import { BlockSkeleton } from "../components/Skeleton"; import { ErrorNotice } from "../components/Notice"; import { readableError } from "../utils/errors"; +import PageIntro from "../components/PageIntro"; function Badge({ n }: { n: N8nInfo }) { if (!n.enabled) return Off; @@ -108,9 +109,9 @@ export default function N8n() { return ( <>

n8n

-

+ Which automations have quietly stopped working. It is read every few minutes with an API key (see Integrations). A workflow that is switched on and failed on its last run is an alert — see Alerts; it clears when the workflow next succeeds. -

+ {!data && !error && } {data && data.length === 0 && ( diff --git a/web/src/pages/NetBox.tsx b/web/src/pages/NetBox.tsx index af33857..2ead7a7 100644 --- a/web/src/pages/NetBox.tsx +++ b/web/src/pages/NetBox.tsx @@ -6,6 +6,7 @@ import TimeAgo from "../components/TimeAgo"; import { BlockSkeleton } from "../components/Skeleton"; import { ErrorNotice } from "../components/Notice"; import { readableError } from "../utils/errors"; +import PageIntro from "../components/PageIntro"; function Badge({ n }: { n: NetBoxInfo }) { if (!n.enabled) return Off; @@ -105,9 +106,9 @@ export default function NetBox() { return ( <>

NetBox

-

+ Whether NetBox is working, and whether it is complete. It is read every few minutes with an API token (see Integrations). No background worker running is an alert — see Alerts; the servers missing from NetBox are only listed. -

+ {!data && !error && } {data && data.length === 0 && ( diff --git a/web/src/pages/NetworkDevices.tsx b/web/src/pages/NetworkDevices.tsx index c34f985..0af4281 100644 --- a/web/src/pages/NetworkDevices.tsx +++ b/web/src/pages/NetworkDevices.tsx @@ -22,6 +22,7 @@ import { usePagination } from "../hooks/usePagination"; import { downloadCsv } from "../utils/csv"; import { readableError } from "../utils/errors"; import { toast } from "../utils/toast"; +import PageIntro from "../components/PageIntro"; const KIND_LABELS: Record = { gateway: "Gateway", switch: "Switch", access_point: "Access point", other: "Other" }; @@ -155,10 +156,10 @@ export default function NetworkDevices({ user }: { user: CurrentUser }) { )} {tabs} -
+ Switches, access points and gateways from your UniFi controller: whether each is up, its address, how long it has been running, and what it is connected through. The same devices take part in the dependency map, so when one is down what hangs off it is folded under its alert. -
+ {data === null && !error && } diff --git a/web/src/pages/Nextcloud.tsx b/web/src/pages/Nextcloud.tsx index d6103db..1783e2e 100644 --- a/web/src/pages/Nextcloud.tsx +++ b/web/src/pages/Nextcloud.tsx @@ -7,6 +7,7 @@ import { BlockSkeleton } from "../components/Skeleton"; import { ErrorNotice } from "../components/Notice"; import { formatBytes } from "./settings/StorageSettings"; import { readableError } from "../utils/errors"; +import PageIntro from "../components/PageIntro"; function Badge({ n }: { n: NextcloudInfo }) { if (!n.enabled) return Off; @@ -135,9 +136,9 @@ export default function Nextcloud() { return ( <>

Nextcloud

-

+ Whether people can sign in. It is read every few minutes (see Integrations). Maintenance mode left on, a database that wants upgrading, background jobs that have stopped and the data disk running low are alerts — see Alerts. -

+ {!data && !error && } {data && data.length === 0 && ( diff --git a/web/src/pages/NotificationHistory.tsx b/web/src/pages/NotificationHistory.tsx index 520c58e..07860a8 100644 --- a/web/src/pages/NotificationHistory.tsx +++ b/web/src/pages/NotificationHistory.tsx @@ -9,6 +9,7 @@ import { formatDateTime } from "../utils/date"; import { readableError } from "../utils/errors"; import { channelName, isLogStatus, STATUS_BADGE, STATUS_HINT, STATUS_LABEL, STATUS_ORDER, type LogStatus } from "../utils/notificationLog"; import { toast } from "../utils/toast"; +import PageIntro from "../components/PageIntro"; /** * What was sent: every notification, newest first, with how it went through each channel — or why it did not: held for quiet hours, a routing rule said nobody, no channel to send it to. @@ -77,9 +78,9 @@ export default function NotificationHistory() {

Notification history

-

+ What was sent, to which channel, and whether it got through — or why it was not sent. Kept 30 days. The channels are set up under Settings → Notifications. -

+