UniFi integration: network devices, Wi-Fi and networks, as part of the dependency map

A UniFi controller (API key on Network 9+, or a read-only local login on any
version) is read every five minutes. Its switches, access points and gateways
are kept with state, IP, uptime, firmware and uplink; its networks and Wi-Fi
names beside them (passphrases are never read). Nothing is written to the
controller.

Network > Network devices lists them. Devices are a new node type in the
dependency map: uplinks become dependencies by themselves, others can be
written by hand. A device offline past a limit is an offline alert, folds what
depends on it, can be silenced with maintenance and have runbooks.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-20 00:35:48 +02:00
1 parent 73a06ebe63
commit 396e074108
48 files changed
+6893 -102

No files matched your search

+4 -2
View File
@@ -1,5 +1,6 @@
import { useEffect, useState } from "react";
import { api, type IntegrationField, type IntegrationType } from "../api/client";
import { readableError } from "../utils/errors";
const TYPE_LABELS: Record<IntegrationType, string> = {
tailscale: "Tailscale",
@@ -12,6 +13,7 @@ const TYPE_LABELS: Record<IntegrationType, string> = {
phpipam: "phpIPAM",
pbs: "Proxmox Backup Server",
osticket: "osTicket",
unifi: "UniFi",
};
export default function IntegrationForm({ onCreated, onCancel }: { onCreated: () => void; onCancel: () => void }) {
@@ -52,7 +54,7 @@ export default function IntegrationForm({ onCreated, onCancel }: { onCreated: ()
const result = await api.integrations.test({ type, config: values });
setTestResult(result);
} catch (err) {
setTestResult({ ok: false, error: err instanceof Error ? err.message : String(err) });
setTestResult({ ok: false, error: readableError(err) });
} finally {
setTesting(false);
}
@@ -67,7 +69,7 @@ export default function IntegrationForm({ onCreated, onCancel }: { onCreated: ()
await api.integrations.create({ type, name, config: values });
onCreated();
} catch (err) {
setError(err instanceof Error ? err.message : String(err));
setError(readableError(err));
} finally {
setSaving(false);
}