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:
bobbanandClaude Sonnet 5.5 committed 2026-10-20 19:35:45 +02:00
1 parent 396e074108
commit 5e26e77340
45 files changed
+6224 -194

No files matched your search

+10 -10
View File
@@ -3,7 +3,7 @@ import { Link } from "react-router-dom";
import { api, type CurrentUser, type DependenciesResponse, type DependencyNode } from "../api/client";
import { ErrorNotice } from "../components/Notice";
import { BlockSkeleton } from "../components/Skeleton";
import { confirmDialog } from "../utils/dialogs";
import { removeWithUndo } from "../utils/undoable";
import { readableError } from "../utils/errors";
import { toast } from "../utils/toast";
import { EmptyRow } from "../components/EmptyState";
@@ -84,13 +84,13 @@ export default function DependencyEditor({ user }: { user: CurrentUser }) {
}
async function remove(d: DependenciesResponse["dependencies"][number]) {
if (!(await confirmDialog({ title: "Remove a dependency", message: `${d.from.name} no longer needs ${d.to.name}?`, confirmLabel: "Remove", danger: true }))) return;
try {
await api.dependencies.remove(d.id);
load();
} catch (err) {
setError(readableError(err));
}
await removeWithUndo({
remove: () => api.dependencies.remove(d.id),
restore: () => api.dependencies.create({ fromType: d.from.type, fromId: d.from.id, toType: d.to.type, toId: d.to.id }),
message: `${d.from.name} no longer needs ${d.to.name}.`,
reload: load,
onError: setError,
});
}
return (
@@ -174,7 +174,7 @@ export default function DependencyEditor({ user }: { user: CurrentUser }) {
<h3 className="card-title">Set elsewhere</h3>
</div>
<div className="card-body text-secondary small pb-0">
A server&rsquo;s &ldquo;runs on&rdquo; is set on the server itself, or worked out from the Proxmox node it is a guest of. A network device&rsquo;s &ldquo;connected through&rdquo; is what its UniFi controller says. They count here too.
A server&rsquo;s &ldquo;runs on&rdquo; is set on the server itself, or worked out from the Proxmox node it is a guest of. What a network device or a server is &ldquo;connected through&rdquo; is what its UniFi controller says (a server is matched by its IP address). They count here too.
</div>
<div className="table-responsive">
<table className="table table-vcenter card-table">
@@ -182,7 +182,7 @@ export default function DependencyEditor({ user }: { user: CurrentUser }) {
{data.runsOn.map((r) => (
<tr key={`${r.from.key}>${r.to.key}`}>
<td>{r.from.name}</td>
<td className="text-secondary">{r.from.key.startsWith("device:") && r.to.key.startsWith("device:") ? "is connected through" : "runs on"}</td>
<td className="text-secondary">{r.to.key.startsWith("device:") ? "is connected through" : "runs on"}</td>
<td>{r.to.name}</td>
</tr>
))}