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

+9 -8
View File
@@ -1,3 +1,4 @@
import { removeWithUndo } from "../utils/undoable";
import { useEffect, useState, type FormEvent } from "react";
import TimeAgo from "../components/TimeAgo";
import { Link } from "react-router-dom";
@@ -15,7 +16,6 @@ import { usePagination } from "../hooks/usePagination";
import Pagination from "../components/Pagination";
import { downloadCsv } from "../utils/csv";
import { formatAgo } from "../utils/duration";
import { confirmDialog } from "../utils/dialogs";
import { ErrorNotice } from "../components/Notice";
import { EmptyRow, LoadingRow } from "../components/EmptyState";
@@ -167,14 +167,15 @@ export default function Ports({ user }: { user: CurrentUser }) {
}
async function remove(fwd: PortForward) {
if (!(await confirmDialog({ title: "Delete port opening", message: `Delete port opening "${fwd.label}"?`, confirmLabel: "Delete", danger: true }))) return;
setForwardError(null);
try {
await api.ports.forwards.remove(fwd.id);
loadForwards();
} catch (err) {
setForwardError(err instanceof Error ? err.message : String(err));
}
await removeWithUndo({
remove: () => api.ports.forwards.remove(fwd.id),
restore: () =>
api.ports.forwards.create({ label: fwd.label, externalPort: fwd.externalPort, protocol: fwd.protocol, serverId: fwd.serverId, destination: fwd.destination, internalPort: fwd.internalPort, source: fwd.source, comment: fwd.comment }),
message: `Deleted the port opening "${fwd.label}".`,
reload: loadForwards,
onError: setForwardError,
});
}
const showForm = adding || editing;