UniFi: servers plugged into switches; server page in sections; My work; settings search and undo
UniFi: the controller's client list is matched to servers by IP address, so a server is connected through a switch or access point (and port). That is a dependency made by itself, shown on the server page, the Network devices page and the Connections map. IP Addresses can sync the devices' addresses. A server's page is split into Overview, Health, Network, History, Tasks and Settings, by ?view=; alerts link to the section they are about. My work lists what has your name on it: alerts you have, maintenance you started (extend, end with undo) and update runs you started, with a badge. Settings has a search box (and the command palette lists every setting). Removing a dependency, admin link, runbook, hand-made IP address, port opening or restore test is undone from the message instead of asked about first. Two backup tests used a fixed date and failed as days passed; they follow the real clock now. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
396e074108
commit
5e26e77340
45 files changed
+6224
-194
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { removeWithUndo } from "../utils/undoable";
|
||||
import { useEffect, useState } 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 { confirmDialog } from "../utils/dialogs";
|
||||
import { toast } from "../utils/toast";
|
||||
import Pagination from "../components/Pagination";
|
||||
import SortableTh from "../components/SortableTh";
|
||||
@@ -96,14 +96,16 @@ export default function Backups({ user }: { user?: CurrentUser }) {
|
||||
}
|
||||
|
||||
async function removeTest(t: RestoreTestEntry) {
|
||||
if (!(await confirmDialog({ title: "Remove a restore test", message: `Remove the test of "${t.label}" from ${t.testedAt}?`, confirmLabel: "Remove", danger: true }))) return;
|
||||
try {
|
||||
await api.backups.removeRestoreTest(t.id);
|
||||
loadTests();
|
||||
load();
|
||||
} catch (err) {
|
||||
setError(readableError(err));
|
||||
}
|
||||
await removeWithUndo({
|
||||
remove: () => api.backups.removeRestoreTest(t.id),
|
||||
restore: () => api.backups.recordRestoreTest({ key: t.subjectKey, label: t.label, testedAt: t.testedAt, result: t.result, note: t.note ?? undefined }),
|
||||
message: `Removed the test of "${t.label}" from ${t.testedAt}.`,
|
||||
reload: () => {
|
||||
loadTests();
|
||||
load();
|
||||
},
|
||||
onError: setError,
|
||||
});
|
||||
}
|
||||
|
||||
const [params, setParams] = useSearchParams();
|
||||
|
||||
Reference in new issue
Block a user