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

+12 -2
View File
@@ -265,9 +265,10 @@ export default function Maintenance({ user }: { user: CurrentUser }) {
<label className="form-label">What are you working on?</label>
<select className="form-select" required value={target} onChange={(e) => setTarget(e.target.value)}>
<option value="">Choose…</option>
{targets && targets.servers.length + targets.integrations.length + targets.dnsProviders.length > 1 && (
{targets && targets.servers.length + targets.integrations.length + targets.dnsProviders.length + targets.devices.length > 1 && (
<optgroup label="Many at once">
<option value="all:everything">Everything — every server, integration and DNS provider</option>
<option value="all:everything">Everything — every server, integration, network device and DNS provider</option>
{targets.devices.length > 1 && <option value="all:devices">All network devices ({targets.devices.length})</option>}
{targets.servers.length > 1 && <option value="all:servers">All servers ({targets.servers.length})</option>}
{targets.integrations.length > 1 && <option value="all:integrations">All integrations (the enabled ones)</option>}
{targets.dnsProviders.length > 1 && <option value="all:dns_providers">All DNS providers (the enabled ones)</option>}
@@ -291,6 +292,15 @@ export default function Maintenance({ user }: { user: CurrentUser }) {
))}
</optgroup>
)}
{targets && targets.devices.length > 0 && (
<optgroup label="Network devices">
{targets.devices.map((d) => (
<option key={`n${d.id}`} value={`device:${d.id}`}>
{d.name} ({d.kind.replace("_", " ")})
</option>
))}
</optgroup>
)}
{targets && targets.dnsProviders.length > 0 && (
<optgroup label="DNS providers">
{targets.dnsProviders.map((p) => (