Add Proxmox snapshots: list, take, roll back, delete

A guest's drawer on the Proxmox page now has a Snapshots section. Everyone
signed in sees them, operators take them, administrators roll back and delete
(each behind a confirmation). Proxmox does each as a task, followed for up to
20 seconds. Audit log and change log entries for all three. An http:// Proxmox
address is now allowed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-11-10 23:25:47 +01:00
1 parent 12e9fee7af
commit 97df28c6dc
11 files changed
+733 -11

No files matched your search

+13
View File
@@ -123,6 +123,13 @@ function settingsSummary(detail: Record<string, unknown>): string | null {
}
/** What is left of the detail once the name and what is already in the sentence are taken out. */
/** "guest 105 on pve1", from what an audit entry about a Proxmox guest says. */
function guestWords(detail: Record<string, unknown>): string {
const id = typeof detail.vmid === "number" ? ` ${detail.vmid}` : "";
const node = typeof detail.node === "string" ? ` on ${detail.node}` : "";
return `guest${id}${node}`;
}
function genericSummary(detail: Record<string, unknown>, skip: string[] = []): string | null {
const parts = Object.entries(detail)
.filter(([k, v]) => !["name", "message", ...skip].includes(k) && v !== null && v !== undefined && v !== "" && !(Array.isArray(v) && v.length === 0))
@@ -195,6 +202,12 @@ export function describeChange(category: string, action: string, detail: Record<
return { title: `${typeof detail.changed === "number" ? detail.changed : "Several"} snoozed alert${detail.changed === 1 ? "" : "s"} woken at once`, tone: "neutral", detail: null };
case "inventory/bulk_change":
return { title: detail.change === "undo" ? "A change to several pieces of hardware was undone" : `${typeof detail.changed === "number" ? detail.changed : "Several"} piece${detail.changed === 1 ? "" : "s"} of hardware changed at once`, tone: "neutral", detail: genericSummary(detail, ["ids", "changed", "change"]) };
case "integration/create_snapshot":
return { title: `A snapshot was taken of ${guestWords(detail)}`, tone: "neutral", detail: str(detail.snapshot) ? `${str(detail.snapshot)}${detail.withRam ? " (with memory)" : ""}` : null };
case "integration/rollback_snapshot":
return { title: `${guestWords(detail)[0].toUpperCase()}${guestWords(detail).slice(1)} was rolled back to a snapshot`, tone: "bad", detail: str(detail.snapshot) };
case "integration/delete_snapshot":
return { title: `A snapshot was deleted from ${guestWords(detail)}`, tone: "neutral", detail: str(detail.snapshot) };
case "notification/resend":
return { title: "A notification was sent again", tone: "neutral", detail: null };
case "webhook/retry":