Error pages: 404, 403, crash and server-rendered pages in the app's style
In the app: an unknown address shows a 404 inside the menu with the address, "Maybe you were looking for" suggestions (misspellings, partial names, moved pages) and a Ctrl+K search button; a page the role can't open shows a 403 "No access"; a render crash is caught by an error boundary (menu stays, clears on navigation, outer boundary for the sign-in and wall); missing servers, incidents and dead status links use the same page. On the server: unknown /api, /auth, /agent and /metrics addresses and missing files now get a JSON 404 instead of the app's front page with a 200; browsers get self-contained 404, 500 and sign-in-failed pages in the sign-in card's look, light or dark, English or Swedish. Swedish translations added. Tests in server/test/errorPages.test.ts. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b8ce337dfb
commit
8ffae62281
16 files changed
+662
-31
No files matched your search
@@ -1101,6 +1101,8 @@ install one-liner on a host to pick that up.
|
||||
|
||||
**Ports named by their containers.** When a server's Docker host is in Dockhand (the Docker integration), the ports its running containers publish are named after the container — 8096 → *jellyfin* — on the server's Ports card, in the agent table on the Network → Ports page (hover for the image) and in the new-port alert ("a new port is listening — 8096/tcp jellyfin (container)"). It is automatic: nothing to set up beyond the Docker host in Dockhand having the same name as the server (the short name, the hostname or an address — the match Uptime Kuma targets use), and it is only a name beside the port. A label you wrote wins; a container's name wins over a port preset's; it is never written onto the port notes, so a published port is still a new port to be noted, and a container that starts publishing something is still news — now with its name. It is read on the health pass from the container list Dockhand already gives (every 15 minutes, and at start-up, whether or not the container alerts are on); a Docker host Dockhand can't reach keeps its names, and names not refreshed for a day are dropped. Containers on the host network publish nothing Docker lists, so their ports aren't named.
|
||||
|
||||
**Error pages** (404, 403, 500). An address that leads nowhere shows a *Page not found* page inside the menu — the address, the pages of the menu it most looks like (a misspelling like `/sevrers` offers *Servers*), and buttons for the dashboard, back and the search (Ctrl+K) — instead of an empty page. A page your role doesn't open says *No access* (403). A page that fails while it is drawn is caught, so the menu stays and the rest of the app keeps working (*Something went wrong*, with the details folded away); going to another page clears it. A server or an incident that is gone, and a status-page link that no longer works, say so in the same style. The server's own answers match: an address under `/api`, `/auth`, `/agent` or `/metrics` that doesn't exist is a JSON 404 (it used to be answered with the app's front page and a 200), a browser opening such an address, a missing file, or a failed sign-in is shown a page in the look of the sign-in card — light or dark as you last chose, English or Swedish from the browser's language — and a server error shown to a browser is a page rather than raw JSON.
|
||||
|
||||
**Port presets** (Network → Ports → the *Presets* tab). A preset is a named list of ports written once — *Remote access* (SSH, RDP, VNC, WinRM), *Databases* (MySQL, PostgreSQL, Redis, MongoDB …), *Web*, *File sharing*, *Homelab tools*, and what a machine has open out of the box — *Windows client*, *Windows server* (with the Active Directory ports) and *Debian / Ubuntu* — and for the network, *Network services* (DNS, DHCP, NTP, SNMP, syslog, RADIUS, VPNs, MikroTik, iperf3) and *Tailscale*, come ready-made, and are ordinary presets you can change or delete. The ones added later are added once to an install that already had presets (a preset of the same name is left alone, a deleted one is not put back). Add your own by typing one port to a line (`3389 RDP`, `53/udp DNS`). A preset does three things: it **names ports** — a port in any preset shows its name (3389 → RDP) on every server's Ports card, in the agent table and in the new-port alert ("a new port is listening — 3389/tcp RDP"), without a label typed for each host, and a name you write yourself always wins; it **checks hosts** — pick any number of servers and see in one table which of the preset's TCP ports are open on each, from a scan from the app (private addresses only, at the server's first known address; what it finds is remembered like any scan); and it **names the open ports on all of them** in one go, keeping names somebody already wrote unless you say to replace them. Note that a port with a name counts as noted, so writing names also quiets the new-port alert for those ports. A scan only looks at TCP; a UDP port in a preset is only given its name. Operators change presets; everyone sees them.
|
||||
|
||||
**Network → Ports** is the cross-server counterpart: one page listing every
|
||||
|
||||
Reference in new issue
Block a user