From 07ce2b030509ba3748ff37194c397ecb8eaabe62 Mon Sep 17 00:00:00 2001 From: Bobban Rydh Date: Tue, 3 Nov 2026 20:19:24 +0100 Subject: [PATCH] Put Backup coverage and Proxmox Backup Server on one page, in two tabs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backups → Proxmox backups has a Backup coverage tab and a Proxmox Backup Server tab (?view=pbs), each keeping its own title and buttons. /pbs redirects to the second tab so old links and favourites still work; the sidebar's two entries become one, and the Backup Server's alert and integration links go to the tab. Docs updated. Co-Authored-By: Claude Sonnet 5.5 --- INTEGRATIONS.md | 1 + README.md | 4 +++- ROLES.md | 3 +-- server/src/services/alerts.ts | 2 +- web/src/App.tsx | 7 +++---- web/src/layout/nav.tsx | 4 +--- web/src/pages/Backups.tsx | 5 +++-- web/src/pages/BackupsHub.tsx | 24 ++++++++++++++++++++++++ web/src/pages/PbsBackup.tsx | 5 +++-- web/src/utils/integrationTypes.ts | 2 +- 10 files changed, 41 insertions(+), 16 deletions(-) create mode 100644 web/src/pages/BackupsHub.tsx diff --git a/INTEGRATIONS.md b/INTEGRATIONS.md index e108fe1..85049dd 100644 --- a/INTEGRATIONS.md +++ b/INTEGRATIONS.md @@ -153,6 +153,7 @@ That works on every Duplicati version, needs no login handshake and leaves nothi ### Proxmox Backup Server - **Config fields:** Proxmox Backup Server URL, API token ID, API token secret, allow self-signed certificate +- **Where it shows:** **Backups → Proxmox backups → *Proxmox Backup Server*** tab, next to the *Backup coverage* tab (`/backups?view=pbs`; the old `/pbs` address goes there). - **Auth:** `PBSAPIToken=:` header — note the **colon** between the token id and secret; Proxmox VE's own token header uses `=` there instead, so a PVE token/secret pair copied verbatim into this integration's fields will still format correctly (the adapter supplies the colon itself) as long as the id/secret values diff --git a/README.md b/README.md index 87a84f4..da05888 100644 --- a/README.md +++ b/README.md @@ -682,7 +682,9 @@ every few hours, with each day as an all-day event and maintenance with its star calendar; *with names* also gives the name and a link back. Like any share link the address is shown once and can be removed. Tailscale keys are asked for at most every ten minutes, and only those the integration reports as expiring soon are listed. -**Backup coverage** (Backups → Backup coverage) answers "what isn't backed +**Proxmox backups** (Backups → Proxmox backups) is one page with two tabs: *Backup coverage* and +*Proxmox Backup Server* (the integration's datastores and verification; the old `/pbs` address goes to +that tab). **Backup coverage** answers "what isn't backed up?" for every Proxmox guest: is a backup job covering it, when was it last backed up (from the newest snapshot on a Proxmox Backup Server, or the last successful Proxmox backup task that names the guest), and did that go well — Recent backup, Stale (older diff --git a/ROLES.md b/ROLES.md index b2e1ba2..a5f2524 100644 --- a/ROLES.md +++ b/ROLES.md @@ -41,8 +41,7 @@ page's own top-level link. | Nextcloud | `/nextcloud` | ✅ | ✅ | ✅ | | Authentik | `/authentik` | ✅ | ✅ | ✅ | | **Backups** | | | | | -| Backup coverage | `/backups` | ✅ | ✅ | ✅ | -| Proxmox Backup | `/pbs` | ✅ | ✅ | ✅ | +| Proxmox backups (tabs: Backup coverage, Proxmox Backup Server) | `/backups` | ✅ | ✅ | ✅ | | Duplicati | `/duplicati` | ✅ | ✅ | ✅ | | **Network** | | | | | | DNS (and Domains) | `/dns` | ✅ | ✅ | ✅ | diff --git a/server/src/services/alerts.ts b/server/src/services/alerts.ts index 339d636..8aa71c1 100644 --- a/server/src/services/alerts.ts +++ b/server/src/services/alerts.ts @@ -66,7 +66,7 @@ const SOURCES: Record = { dockhand: { label: "Docker", link: "/docker" }, tailscale: { label: "Tailscale", link: "/tailscale" }, homelab: { label: "Homelab Manager", link: "/settings/data" }, - pbs: { label: "Proxmox Backup", link: "/pbs" }, + pbs: { label: "Proxmox Backup", link: "/backups?view=pbs" }, uptimekuma: { label: "Uptime Kuma", link: "/uptime-kuma" }, osticket: { label: "osTicket", link: "/osticket" }, unifi: { label: "UniFi", link: "/network/devices" }, diff --git a/web/src/App.tsx b/web/src/App.tsx index 72d4f3c..85c41d7 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -46,7 +46,6 @@ import Gitea from "./pages/Gitea"; import Proxmox from "./pages/Proxmox"; import Synology from "./pages/Synology"; import UptimeKuma from "./pages/UptimeKuma"; -import PbsBackup from "./pages/PbsBackup"; import OsTicket from "./pages/OsTicket"; import AdminLinks from "./pages/AdminLinks"; import Alerts from "./pages/Alerts"; @@ -63,7 +62,7 @@ import Heartbeats from "./pages/Heartbeats"; import ComingUp from "./pages/ComingUp"; import MonthlyReport from "./pages/MonthlyReport"; import ChangeLog from "./pages/ChangeLog"; -import Backups from "./pages/Backups"; +import BackupsHub from "./pages/BackupsHub"; import Consistency from "./pages/Consistency"; import Privacy from "./pages/Privacy"; import Settings from "./pages/Settings"; @@ -217,7 +216,7 @@ function Shelled({ user }: { user: CurrentUser }) { } /> } /> : } /> - } /> + } /> } /> } /> } /> @@ -225,7 +224,7 @@ function Shelled({ user }: { user: CurrentUser }) { } /> } /> } /> - } /> + } /> } /> } /> } /> diff --git a/web/src/layout/nav.tsx b/web/src/layout/nav.tsx index 7a0b248..3442f44 100644 --- a/web/src/layout/nav.tsx +++ b/web/src/layout/nav.tsx @@ -47,7 +47,6 @@ import { IconBox, IconHeartbeat, IconGitCommit, - IconShieldCheck, IconShieldLock, IconWorldWww, IconVersions, @@ -126,8 +125,7 @@ export const NAV: NavEntry[] = [ label: "Backups", icon: , items: [ - { to: "/backups", label: "Backup coverage", icon: }, - { to: "/pbs", label: "Proxmox Backup", icon: }, + { to: "/backups", label: "Proxmox backups", icon: }, { to: "/duplicati", label: "Duplicati", icon: }, ], }, diff --git a/web/src/pages/Backups.tsx b/web/src/pages/Backups.tsx index 976524b..3cee3af 100644 --- a/web/src/pages/Backups.tsx +++ b/web/src/pages/Backups.tsx @@ -1,5 +1,5 @@ import { removeWithUndo } from "../utils/undoable"; -import { useEffect, useState } from "react"; +import { useEffect, useState, type ReactNode } from "react"; import { Link, useSearchParams } from "react-router-dom"; import { api, type BackupCoverage, type CoverageGuest, type CoverageStatus, type CurrentUser, type RestoreInfo, type RestoreResult, type RestoreStatus, type RestoreTestEntry } from "../api/client"; import { toast } from "../utils/toast"; @@ -59,7 +59,7 @@ const ageWords = (r: RestoreInfo) => (r.ageDays === null ? "" : r.ageDays === 0 * What is and isn't backed up: every Proxmox guest, whether a backup job covers it, when it was last backed up (from Proxmox Backup Server * snapshots and Proxmox's own backup tasks), and whether that went well — one page instead of an alert per gap. */ -export default function Backups({ user }: { user?: CurrentUser }) { +export default function Backups({ user, tabs }: { user?: CurrentUser; /** The tabs of the page this is one view of (see BackupsHub), shown under the title. */ tabs?: ReactNode }) { const canRecord = user?.role === "admin" || user?.role === "operator"; const isAdmin = user?.role === "admin"; const [tests, setTests] = useState(null); @@ -178,6 +178,7 @@ export default function Backups({ user }: { user?: CurrentUser }) { {checking ? "Checking…" : "Check now"} + {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.` : ""}

diff --git a/web/src/pages/BackupsHub.tsx b/web/src/pages/BackupsHub.tsx new file mode 100644 index 0000000..f37c490 --- /dev/null +++ b/web/src/pages/BackupsHub.tsx @@ -0,0 +1,24 @@ +import { useSearchParams } from "react-router-dom"; +import type { CurrentUser } from "../api/client"; +import ViewTabs from "../components/ViewTabs"; +import Backups from "./Backups"; +import PbsBackup from "./PbsBackup"; + +/** + * The Proxmox backups, on one page with a tab for each view: **Backup coverage** (is every guest in a backup job, and when was it last backed up) and **Proxmox Backup Server** (its datastores, + * what is stored and whether it verifies). The second is `?view=pbs`; `/pbs` goes there, so a link or a favourite made before they were one page still works. + */ +export default function BackupsHub({ user }: { user: CurrentUser }) { + const [params] = useSearchParams(); + const view = params.get("view") === "pbs" ? "pbs" : "coverage"; + const tabs = ( + + ); + return view === "pbs" ? : ; +} diff --git a/web/src/pages/PbsBackup.tsx b/web/src/pages/PbsBackup.tsx index 7239b85..d69c0c8 100644 --- a/web/src/pages/PbsBackup.tsx +++ b/web/src/pages/PbsBackup.tsx @@ -1,4 +1,4 @@ -import { useEffect, useState } from "react"; +import { useEffect, useState, type ReactNode } from "react"; import { Link } from "react-router-dom"; import { api, @@ -53,7 +53,7 @@ function verificationBadge(d: PbsDatastore) { return All verified; } -export default function PbsBackup({ user: _user }: { user: CurrentUser }) { +export default function PbsBackup({ user: _user, tabs }: { user: CurrentUser; /** The tabs of the page this is one view of (see BackupsHub), shown under the title. */ tabs?: ReactNode }) { const [integrations, setIntegrations] = useState(null); const [selectedId, setSelectedId] = useState(null); const [error, setError] = useState(null); @@ -132,6 +132,7 @@ export default function PbsBackup({ user: _user }: { user: CurrentUser }) { return ( <> + {tabs} {integrations?.length === 0 ? ( diff --git a/web/src/utils/integrationTypes.ts b/web/src/utils/integrationTypes.ts index 5cb07a5..801b3e3 100644 --- a/web/src/utils/integrationTypes.ts +++ b/web/src/utils/integrationTypes.ts @@ -47,7 +47,7 @@ export const TYPE_PAGES: Record = { dockhand: "/docker", uptimekuma: "/uptime-kuma", phpipam: "/ipam", - pbs: "/pbs", + pbs: "/backups?view=pbs", osticket: "/osticket", unifi: "/network/devices", npm: "/proxy-hosts",