Phone card layout, status symbols, breadcrumbs, integration cards and server trends
Tables stack into labelled cards on a phone. Green, red and amber badges carry a check, cross or triangle as well as their colour. Pages inside a menu group show a breadcrumb, with the thing's name on a server's page. Integrations are cards with an Open button and a live status (working, failing, not checked yet, disabled). Agent-reported servers keep a short history of load, memory and disk use (migration 0019, one sample per ten minutes for 35 days) and show it as a Trends card with a days-until-full forecast for a filling disk. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
617dc1ea2f
commit
9965d94036
22 files changed
+3000
-84
No files matched your search
@@ -43,6 +43,8 @@ import { DENSITIES, getDensity, setDensity, type Density } from "../utils/densit
|
||||
import CommandPalette from "../components/CommandPalette";
|
||||
import { isLightColor, useEnvironment } from "../utils/environment";
|
||||
import { alertBadge, useAlertsReport } from "../hooks/useAlertsReport";
|
||||
import { useStackedTables } from "../hooks/useStackedTables";
|
||||
import { useBreadcrumbTailValue } from "../utils/breadcrumb";
|
||||
|
||||
interface NavBadge {
|
||||
text: string;
|
||||
@@ -182,6 +184,8 @@ export default function AppShell({ user, children }: { user: CurrentUser; childr
|
||||
const [density, setDensityState] = useState<Density>(() => getDensity());
|
||||
const [maintenance, setMaintenance] = useState<MaintenanceWindow[]>([]);
|
||||
const environment = useEnvironment();
|
||||
useStackedTables();
|
||||
const breadcrumbTail = useBreadcrumbTailValue();
|
||||
const { report } = useAlertsReport();
|
||||
const [menuOpen, setMenuOpen] = useState(false);
|
||||
const menuRef = useRef<HTMLDivElement>(null);
|
||||
@@ -223,6 +227,17 @@ export default function AppShell({ user, children }: { user: CurrentUser; childr
|
||||
|
||||
const nav = visibleNav(user.role);
|
||||
const { pathname } = useLocation();
|
||||
|
||||
// Where this page sits in the menu: "Infrastructure › Servers", and on a page about one thing, that thing's name as well.
|
||||
const crumbs: { label: string; to?: string }[] = [];
|
||||
for (const entry of nav) {
|
||||
if (!isGroup(entry)) continue;
|
||||
const leaf = entry.items.find((item) => isCurrent(pathname, item.to));
|
||||
if (!leaf) continue;
|
||||
crumbs.push({ label: entry.label }, breadcrumbTail ? { label: leaf.label, to: leaf.to } : { label: leaf.label });
|
||||
if (breadcrumbTail) crumbs.push({ label: breadcrumbTail });
|
||||
break;
|
||||
}
|
||||
const [openGroups, setOpenGroups] = useState<Set<string>>(loadOpenGroups);
|
||||
|
||||
// The group holding the current page is always open, so you can see where you are (others stay as you left them).
|
||||
@@ -437,6 +452,17 @@ export default function AppShell({ user, children }: { user: CurrentUser; childr
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{crumbs.length > 0 && (
|
||||
<nav aria-label="breadcrumb" className="mb-2">
|
||||
<ol className="breadcrumb breadcrumb-arrows mb-0">
|
||||
{crumbs.map((c, i) => (
|
||||
<li key={i} className={`breadcrumb-item ${i === crumbs.length - 1 ? "active" : ""}`} aria-current={i === crumbs.length - 1 ? "page" : undefined}>
|
||||
{c.to ? <Link to={c.to}>{c.label}</Link> : c.label}
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
</nav>
|
||||
)}
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user