Put Backup coverage and Proxmox Backup Server on one page, in two tabs

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 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-11-03 20:19:24 +01:00
1 parent 4dd7901f1c
commit 07ce2b0305
10 files changed
+41 -16

No files matched your search

+3 -4
View File
@@ -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 }) {
<Route path="/coming-up" element={<ComingUp user={user} />} />
<Route path="/reports" element={<MonthlyReport user={user} />} />
<Route path="/changes" element={user.role === "viewer" ? <Navigate to="/" replace /> : <ChangeLog />} />
<Route path="/backups" element={<Backups user={user} />} />
<Route path="/backups" element={<BackupsHub user={user} />} />
<Route path="/docker" element={<Docker user={user} />} />
<Route path="/tailscale" element={<Tailscale user={user} />} />
<Route path="/semaphore" element={<Semaphore user={user} />} />
@@ -225,7 +224,7 @@ function Shelled({ user }: { user: CurrentUser }) {
<Route path="/proxmox" element={<Proxmox user={user} />} />
<Route path="/synology" element={<Synology user={user} />} />
<Route path="/uptime-kuma" element={<UptimeKuma user={user} />} />
<Route path="/pbs" element={<PbsBackup user={user} />} />
<Route path="/pbs" element={<Navigate to="/backups?view=pbs" replace />} />
<Route path="/osticket" element={<OsTicket user={user} />} />
<Route path="/admin-links" element={<AdminLinks user={user} />} />
<Route path="/alerts" element={<Alerts user={user} />} />
+1 -3
View File
@@ -47,7 +47,6 @@ import {
IconBox,
IconHeartbeat,
IconGitCommit,
IconShieldCheck,
IconShieldLock,
IconWorldWww,
IconVersions,
@@ -126,8 +125,7 @@ export const NAV: NavEntry[] = [
label: "Backups",
icon: <IconCopyCheck size={20} />,
items: [
{ to: "/backups", label: "Backup coverage", icon: <IconCopyCheck size={20} /> },
{ to: "/pbs", label: "Proxmox Backup", icon: <IconShieldCheck size={20} /> },
{ to: "/backups", label: "Proxmox backups", icon: <IconCopyCheck size={20} /> },
{ to: "/duplicati", label: "Duplicati", icon: <IconDatabaseExport size={20} /> },
],
},
+3 -2
View File
@@ -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<RestoreTestEntry[] | null>(null);
@@ -178,6 +178,7 @@ export default function Backups({ user }: { user?: CurrentUser }) {
{checking ? "Checking…" : "Check now"}
</button>
</div>
{tabs}
<p className="text-secondary">
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.` : ""}
</p>
+24
View File
@@ -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 = (
<ViewTabs
label="Backup view"
tabs={[
{ to: "/backups", label: "Backup coverage", active: view === "coverage" },
{ to: "/backups?view=pbs", label: "Proxmox Backup Server", active: view === "pbs" },
]}
/>
);
return view === "pbs" ? <PbsBackup user={user} tabs={tabs} /> : <Backups user={user} tabs={tabs} />;
}
+3 -2
View File
@@ -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 <span className="badge bg-green-lt text-green">All verified</span>;
}
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<IntegrationSummary[] | null>(null);
const [selectedId, setSelectedId] = useState<number | null>(null);
const [error, setError] = useState<string | null>(null);
@@ -132,6 +132,7 @@ export default function PbsBackup({ user: _user }: { user: CurrentUser }) {
return (
<>
<IntegrationPageTitle title="Proxmox Backup Server" integration={selected} />
{tabs}
<ErrorNotice error={error} />
{integrations?.length === 0 ? (
+1 -1
View File
@@ -47,7 +47,7 @@ export const TYPE_PAGES: Record<IntegrationType, string> = {
dockhand: "/docker",
uptimekuma: "/uptime-kuma",
phpipam: "/ipam",
pbs: "/pbs",
pbs: "/backups?view=pbs",
osticket: "/osticket",
unifi: "/network/devices",
npm: "/proxy-hosts",