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,3 +1,4 @@
|
||||
import { useMyWork } from "../hooks/useMyWork";
|
||||
import { isValidElement, useEffect, useState, type ReactNode } from "react";
|
||||
import { IconArrowLeft, IconArrowRight, IconEye, IconEyeOff } from "@tabler/icons-react";
|
||||
import TimeAgo from "../components/TimeAgo";
|
||||
@@ -324,6 +325,22 @@ function formatBytes(bytes: number | null): string {
|
||||
return `${value.toFixed(1)} ${units[unit]}`;
|
||||
}
|
||||
|
||||
/** One line above the cards for those who follow things: how many of theirs want a look, and where to see them. Says nothing when none do. */
|
||||
function MyWorkStrip() {
|
||||
const { work } = useMyWork();
|
||||
if (!work || work.needsAttention === 0) return null;
|
||||
return (
|
||||
<div className="alert alert-info d-flex flex-wrap align-items-center gap-2 py-2" role="status">
|
||||
<span>
|
||||
<strong>{work.needsAttention}</strong> {work.needsAttention === 1 ? "thing" : "things"} of yours {work.needsAttention === 1 ? "wants" : "want"} a look — alerts handed to you or about to run out, maintenance about to end, update runs still going.
|
||||
</span>
|
||||
<Link to="/my-work" className="btn btn-sm btn-primary ms-auto">
|
||||
My work
|
||||
</Link>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function Dashboard({ user }: { user: CurrentUser }) {
|
||||
const { editing } = useDashboardLayout();
|
||||
const problemsFirst = useProblemsFirst();
|
||||
@@ -687,6 +704,7 @@ export default function Dashboard({ user }: { user: CurrentUser }) {
|
||||
Welcome back, {user.name ?? user.email ?? user.sub}.
|
||||
</p>
|
||||
<StatusStrip />
|
||||
{(user.role === "admin" || user.role === "operator") && <MyWorkStrip />}
|
||||
<WhatChanged role={user.role} />
|
||||
{isAdmin && integrations !== null && dnsStats !== null && serverSummary !== null && secrets !== null && notifyConfigured !== null && (
|
||||
<SetupGuide steps={setupSteps} />
|
||||
|
||||
Reference in new issue
Block a user