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:
1 parent
4dd7901f1c
commit
07ce2b0305
10 files changed
+41
-16
No files matched your search
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user