Fold four pages into the pages they belong to; add a Backups menu group
Dependencies become a view of the Map (graph with the editor under it), Sessions the 'Signed in now' tab of Users, the Audit Log the 'Raw audit log' tab of the Change log, and the Diagnostic Log the 'Call log' tab of Integrations (admins). Backup coverage and Proxmox Backup move to a new Backups group. Old addresses redirect; a shared ViewTabs component does the tabs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4e0c6927b2
commit
1432b148e9
19 files changed
+177
-102
No files matched your search
+6
-30
@@ -4,9 +4,6 @@ import { api, type CurrentUser, type UserRole, UnauthorizedError } from "./api/c
|
||||
import Login from "./pages/Login";
|
||||
import Dashboard from "./pages/Dashboard";
|
||||
import Users from "./pages/Users";
|
||||
import Sessions from "./pages/Sessions";
|
||||
import AuditLog from "./pages/AuditLog";
|
||||
import DiagLog from "./pages/DiagLog";
|
||||
import Secrets from "./pages/Secrets";
|
||||
import Ipam from "./pages/Ipam";
|
||||
import Ports from "./pages/Ports";
|
||||
@@ -33,7 +30,6 @@ import IncidentDetail from "./pages/IncidentDetail";
|
||||
import Inventory from "./pages/Inventory";
|
||||
import InventoryLabels from "./pages/InventoryLabels";
|
||||
import InventoryLifecycle from "./pages/InventoryLifecycle";
|
||||
import Dependencies from "./pages/Dependencies";
|
||||
import Endpoints from "./pages/Endpoints";
|
||||
import Heartbeats from "./pages/Heartbeats";
|
||||
import ComingUp from "./pages/ComingUp";
|
||||
@@ -143,7 +139,7 @@ function Shelled({ user }: { user: CurrentUser }) {
|
||||
<AppShell user={user}>
|
||||
<Routes>
|
||||
<Route path="/" element={<Dashboard user={user} />} />
|
||||
<Route path="/map" element={<MapPage />} />
|
||||
<Route path="/map" element={<MapPage user={user} />} />
|
||||
<Route path="/servers" element={<Servers user={user} />} />
|
||||
<Route path="/servers/compare" element={<ServerCompare />} />
|
||||
<Route path="/servers/:id" element={<ServerDetail user={user} />} />
|
||||
@@ -161,7 +157,11 @@ function Shelled({ user }: { user: CurrentUser }) {
|
||||
<Route path="/inventory" element={<Inventory user={user} />} />
|
||||
<Route path="/inventory/labels" element={<InventoryLabels />} />
|
||||
<Route path="/inventory/lifecycle" element={<InventoryLifecycle />} />
|
||||
<Route path="/dependencies" element={<Dependencies user={user} />} />
|
||||
{/* These were pages of their own; they are sections of other pages now, and old links, bookmarks and notifications still arrive. */}
|
||||
<Route path="/dependencies" element={<Navigate to="/map?view=dependencies" replace />} />
|
||||
<Route path="/sessions" element={<Navigate to="/users?view=sessions" replace />} />
|
||||
<Route path="/audit-log" element={<Navigate to="/changes?view=audit" replace />} />
|
||||
<Route path="/diag-log" element={<Navigate to="/integrations?view=calls" replace />} />
|
||||
<Route path="/endpoints" element={<Endpoints user={user} />} />
|
||||
<Route path="/heartbeats" element={<Heartbeats user={user} />} />
|
||||
<Route path="/coming-up" element={<ComingUp user={user} />} />
|
||||
@@ -190,30 +190,6 @@ function Shelled({ user }: { user: CurrentUser }) {
|
||||
</RequireRole>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/sessions"
|
||||
element={
|
||||
<RequireRole user={user} minRole="admin">
|
||||
<Sessions />
|
||||
</RequireRole>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/audit-log"
|
||||
element={
|
||||
<RequireRole user={user} minRole="operator">
|
||||
<AuditLog />
|
||||
</RequireRole>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/diag-log"
|
||||
element={
|
||||
<RequireRole user={user} minRole="admin">
|
||||
<DiagLog />
|
||||
</RequireRole>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/settings"
|
||||
element={
|
||||
|
||||
@@ -114,7 +114,7 @@ export default function DependencyMap() {
|
||||
return (
|
||||
<div className="card">
|
||||
<div className="card-body text-secondary">
|
||||
Nothing depends on anything yet. Say what needs what on the <Link to="/dependencies">Dependencies</Link> page, or set which server another runs on, and it is drawn here.
|
||||
Nothing depends on anything yet. Say what needs what below, or set which server another runs on, and it is drawn here.
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
/**
|
||||
* Tabs that switch what one page shows (Alerts: Now / History, Users: People / Signed in now …). Each is a link to the same page with a `?view=`,
|
||||
* so the view can be linked to and the back button works.
|
||||
*/
|
||||
export default function ViewTabs({ label, tabs }: { label: string; tabs: { to: string; label: string; active: boolean }[] }) {
|
||||
return (
|
||||
<ul className="nav nav-tabs mb-3" aria-label={label}>
|
||||
{tabs.map((t) => (
|
||||
<li className="nav-item" key={t.to}>
|
||||
<Link to={t.to} className={`nav-link ${t.active ? "active" : ""}`} aria-current={t.active ? "page" : undefined}>
|
||||
{t.label}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
@@ -90,7 +90,7 @@ export default function WhatChanged({ role }: { role: UserRole }) {
|
||||
{summary.moreEvents > 0 && <>and {summary.moreEvents} more. </>}
|
||||
{others > 0 && (
|
||||
<>
|
||||
{others} change{others === 1 ? "" : "s"} made by other people — <Link to="/audit-log">see the audit log</Link>.
|
||||
{others} change{others === 1 ? "" : "s"} made by other people — <Link to="/changes?view=audit">see the audit log</Link>.
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
+9
-10
@@ -13,9 +13,6 @@ import {
|
||||
IconServerCog,
|
||||
IconDatabase,
|
||||
IconUsers,
|
||||
IconDevices,
|
||||
IconHistory,
|
||||
IconStethoscope,
|
||||
IconSettings,
|
||||
IconWand,
|
||||
IconTool,
|
||||
@@ -24,7 +21,6 @@ import {
|
||||
IconRefresh,
|
||||
IconDownload,
|
||||
IconBox,
|
||||
IconHierarchy2,
|
||||
IconHeartbeat,
|
||||
IconGitCommit,
|
||||
IconShieldCheck,
|
||||
@@ -74,16 +70,22 @@ export const NAV: NavEntry[] = [
|
||||
{ to: "/servers", label: "Servers", icon: <IconServer2 size={20} /> },
|
||||
{ to: "/proxmox", label: "Proxmox", icon: <IconServerCog size={20} /> },
|
||||
{ to: "/synology", label: "Synology", icon: <IconDatabase size={20} /> },
|
||||
{ to: "/pbs", label: "Proxmox Backup", icon: <IconShieldCheck size={20} /> },
|
||||
{ to: "/docker", label: "Docker", icon: <IconBrandDocker size={20} /> },
|
||||
{ to: "/tailscale", label: "Tailscale", icon: <IconAffiliate size={20} /> },
|
||||
{ to: "/backups", label: "Backup coverage", icon: <IconCopyCheck size={20} /> },
|
||||
{ to: "/map", label: "Map", icon: <IconSitemap size={20} /> },
|
||||
{ to: "/inventory", label: "Inventory", icon: <IconBox size={20} /> },
|
||||
{ to: "/dependencies", label: "Dependencies", icon: <IconHierarchy2 size={20} /> },
|
||||
{ to: "/admin-links", label: "Admin Links", icon: <IconExternalLink size={20} /> },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "backups",
|
||||
label: "Backups",
|
||||
icon: <IconCopyCheck size={20} />,
|
||||
items: [
|
||||
{ to: "/backups", label: "Backup coverage", icon: <IconCopyCheck size={20} /> },
|
||||
{ to: "/pbs", label: "Proxmox Backup", icon: <IconShieldCheck size={20} /> },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "network",
|
||||
label: "Network",
|
||||
@@ -137,9 +139,6 @@ export const NAV: NavEntry[] = [
|
||||
{ to: "/integrations", label: "Integrations", icon: <IconPlugConnected size={20} /> },
|
||||
{ to: "/generator", label: "Generator", icon: <IconWand size={20} /> },
|
||||
{ to: "/users", label: "Users", icon: <IconUsers size={20} />, minRole: "admin" },
|
||||
{ to: "/sessions", label: "Sessions", icon: <IconDevices size={20} />, minRole: "admin" },
|
||||
{ to: "/audit-log", label: "Audit Log", icon: <IconHistory size={20} />, minRole: "operator" },
|
||||
{ to: "/diag-log", label: "Diagnostic Log", icon: <IconStethoscope size={20} />, minRole: "admin" },
|
||||
{ to: "/settings", label: "Settings", icon: <IconSettings size={20} />, minRole: "admin" },
|
||||
],
|
||||
},
|
||||
|
||||
+12
-18
@@ -19,6 +19,7 @@ import { useAlertsReport } from "../hooks/useAlertsReport";
|
||||
import { summariseAlerts } from "../utils/alertSummary";
|
||||
import { EmptyRow } from "../components/EmptyState";
|
||||
import IncidentHistory, { incidentPath } from "../components/IncidentHistory";
|
||||
import ViewTabs from "../components/ViewTabs";
|
||||
|
||||
const SEVERITY: Record<AlertSeverity, { label: string; badge: string; rank: number }> = {
|
||||
critical: { label: "Critical", badge: "bg-red-lt text-red", rank: 0 },
|
||||
@@ -42,22 +43,15 @@ const CATEGORY_LABELS: Record<AlertCategory, string> = {
|
||||
type Row = AlertItem & { rank: number };
|
||||
|
||||
/** Now and History: what is wrong right now, and every time something was raised and went away. The same page, switched by `?view=history`. */
|
||||
function ViewTabs({ view }: { view: "now" | "history" }) {
|
||||
return (
|
||||
<ul className="nav nav-tabs mb-3" aria-label="Alerts view">
|
||||
<li className="nav-item">
|
||||
<Link to="/alerts" className={`nav-link ${view === "now" ? "active" : ""}`} aria-current={view === "now" ? "page" : undefined}>
|
||||
Now
|
||||
</Link>
|
||||
</li>
|
||||
<li className="nav-item">
|
||||
<Link to="/alerts?view=history" className={`nav-link ${view === "history" ? "active" : ""}`} aria-current={view === "history" ? "page" : undefined}>
|
||||
History
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
const alertTabs = (view: "now" | "history") => (
|
||||
<ViewTabs
|
||||
label="Alerts view"
|
||||
tabs={[
|
||||
{ to: "/alerts", label: "Now", active: view === "now" },
|
||||
{ to: "/alerts?view=history", label: "History", active: view === "history" },
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
||||
export default function Alerts({ user }: { user: CurrentUser }) {
|
||||
const [params] = useSearchParams();
|
||||
@@ -67,12 +61,12 @@ export default function Alerts({ user }: { user: CurrentUser }) {
|
||||
<div className="d-flex align-items-center mb-2">
|
||||
<h2 className="page-title mb-0">Alerts</h2>
|
||||
</div>
|
||||
<ViewTabs view="history" />
|
||||
{alertTabs("history")}
|
||||
<IncidentHistory />
|
||||
</>
|
||||
);
|
||||
}
|
||||
return <AlertsNow user={user} tabs={<ViewTabs view="now" />} />;
|
||||
return <AlertsNow user={user} tabs={alertTabs("now")} />;
|
||||
}
|
||||
|
||||
function AlertsNow({ user, tabs }: { user: CurrentUser; tabs: React.ReactNode }) {
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { useEffect, useState, type ReactNode } from "react";
|
||||
import { Link, useSearchParams } from "react-router-dom";
|
||||
import { api, type ChangeEntry, type ChangeKind } from "../api/client";
|
||||
import { ErrorNotice } from "../components/Notice";
|
||||
import ViewTabs from "../components/ViewTabs";
|
||||
import AuditLogView from "../views/AuditLogView";
|
||||
import { BlockSkeleton } from "../components/Skeleton";
|
||||
import EmptyState from "../components/EmptyState";
|
||||
import { downloadCsv } from "../utils/csv";
|
||||
@@ -24,7 +26,33 @@ const PAGE = 100;
|
||||
* What has changed, in one list: agents updated, settings changed, maintenance started, dependencies edited, alerts raised and cleared — each as a
|
||||
* sentence, newest first, grouped by day. Narrow it to a kind of change, a server, a stretch of time or a word. The Audit Log is the raw table behind it.
|
||||
*/
|
||||
const changeTabs = (view: "changes" | "audit") => (
|
||||
<ViewTabs
|
||||
label="Change log view"
|
||||
tabs={[
|
||||
{ to: "/changes", label: "Readable", active: view === "changes" },
|
||||
{ to: "/changes?view=audit", label: "Raw audit log", active: view === "audit" },
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
||||
export default function ChangeLog() {
|
||||
const [params] = useSearchParams();
|
||||
if (params.get("view") === "audit") {
|
||||
return (
|
||||
<>
|
||||
<div className="d-flex align-items-center mb-2">
|
||||
<h2 className="page-title mb-0">Change log</h2>
|
||||
</div>
|
||||
{changeTabs("audit")}
|
||||
<AuditLogView />
|
||||
</>
|
||||
);
|
||||
}
|
||||
return <ReadableChanges tabs={changeTabs("changes")} />;
|
||||
}
|
||||
|
||||
function ReadableChanges({ tabs }: { tabs: ReactNode }) {
|
||||
const [params, setParams] = useSearchParams();
|
||||
const days = RANGES.some((r) => r.days === Number(params.get("days"))) ? Number(params.get("days")) : 7;
|
||||
const kind = params.get("kind") ?? "";
|
||||
@@ -121,8 +149,9 @@ export default function ChangeLog() {
|
||||
Export CSV
|
||||
</button>
|
||||
</div>
|
||||
{tabs}
|
||||
<p className="text-secondary">
|
||||
What changed and when: agents updated, settings changed, maintenance started and ended, dependencies edited, alerts raised and cleared. The <Link to="/audit-log">Audit Log</Link> is the raw table behind it.
|
||||
What changed and when: agents updated, settings changed, maintenance started and ended, dependencies edited, alerts raised and cleared. The raw table behind it is the other tab.
|
||||
</p>
|
||||
<ErrorNotice error={error} />
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { useEffect, useState, type CSSProperties } from "react";
|
||||
import { useEffect, useState, type CSSProperties, type ReactNode } from "react";
|
||||
import { Link, useSearchParams } from "react-router-dom";
|
||||
import { api, type CurrentUser, type IntegrationSummary, type IntegrationType } from "../api/client";
|
||||
import IntegrationForm from "../components/IntegrationForm";
|
||||
import ViewTabs from "../components/ViewTabs";
|
||||
import DiagLogView from "../views/DiagLogView";
|
||||
import IntegrationEditForm from "../components/IntegrationEditForm";
|
||||
import TableToolbar from "../components/TableToolbar";
|
||||
import { useTableSearch } from "../hooks/useTableSearch";
|
||||
@@ -73,7 +75,35 @@ function typeBadgeStyle(colors: Record<string, string>, type: IntegrationType):
|
||||
return { backgroundColor: `${color}22`, color, border: `1px solid ${color}55` };
|
||||
}
|
||||
|
||||
const integrationTabs = (view: "list" | "calls") => (
|
||||
<ViewTabs
|
||||
label="Integrations view"
|
||||
tabs={[
|
||||
{ to: "/integrations", label: "Integrations", active: view === "list" },
|
||||
{ to: "/integrations?view=calls", label: "Call log", active: view === "calls" },
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
||||
/** The integrations, and — for administrators — the log of every call made to them (`?view=calls`), where a connection is troubleshot. */
|
||||
export default function Integrations({ user }: { user: CurrentUser }) {
|
||||
const [params] = useSearchParams();
|
||||
const isAdmin = user.role === "admin";
|
||||
if (isAdmin && params.get("view") === "calls") {
|
||||
return (
|
||||
<>
|
||||
<div className="d-flex align-items-center mb-2">
|
||||
<h2 className="page-title mb-0">Integrations</h2>
|
||||
</div>
|
||||
{integrationTabs("calls")}
|
||||
<DiagLogView />
|
||||
</>
|
||||
);
|
||||
}
|
||||
return <IntegrationsList user={user} tabs={isAdmin ? integrationTabs("list") : null} />;
|
||||
}
|
||||
|
||||
function IntegrationsList({ user, tabs }: { user: CurrentUser; tabs: ReactNode }) {
|
||||
const isAdmin = user.role === "admin";
|
||||
const isOperator = user.role === "admin" || user.role === "operator";
|
||||
const [searchParams, setSearchParams] = useSearchParams();
|
||||
@@ -171,6 +201,7 @@ export default function Integrations({ user }: { user: CurrentUser }) {
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
{tabs}
|
||||
<ErrorNotice error={error} />
|
||||
|
||||
{editingIntegration ? (
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { Link, useSearchParams } from "react-router-dom";
|
||||
import DependencyMap from "../components/DependencyMap";
|
||||
import DependencyEditor from "../views/DependencyEditor";
|
||||
import type { CurrentUser } from "../api/client";
|
||||
import { api, type MapData, type MapNode } from "../api/client";
|
||||
import { ErrorNotice } from "../components/Notice";
|
||||
import { PageSkeleton } from "../components/Skeleton";
|
||||
@@ -75,7 +77,7 @@ function layout(data: MapData): { placed: Map<string, Placed>; width: number; he
|
||||
}
|
||||
|
||||
/** The picture: how the servers, their Proxmox hosts, DNS names and monitors connect. Hover or tab to a box to light up its connections. */
|
||||
export default function MapPage() {
|
||||
export default function MapPage({ user }: { user: CurrentUser }) {
|
||||
const [params, setParams] = useSearchParams();
|
||||
const view = params.get("view") === "dependencies" ? "dependencies" : "connections";
|
||||
const choose = (v: "connections" | "dependencies") =>
|
||||
@@ -107,10 +109,11 @@ export default function MapPage() {
|
||||
) : (
|
||||
<>
|
||||
<p className="text-secondary">
|
||||
What needs what: a server that runs on another, a service that needs the server it is installed on. Pick a box to see what would go down with it before you reboot it.{" "}
|
||||
<Link to="/dependencies">Edit dependencies</Link>
|
||||
A server that runs on another, a service that needs the server it is installed on. Pick a box to see what would go down with it before you reboot it.
|
||||
</p>
|
||||
<DependencyMap />
|
||||
<h3 className="mt-4 mb-2">Say what needs what</h3>
|
||||
<DependencyEditor user={user} />
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
|
||||
@@ -334,7 +334,7 @@ export default function Privacy() {
|
||||
<div className="card-body">
|
||||
<ul className="mb-0">
|
||||
<li className="mb-2">
|
||||
<strong>Sign out</strong> to end your session now. Administrators can also end anyone's on the <Link to="/sessions">Sessions</Link> page.
|
||||
<strong>Sign out</strong> to end your session now. Administrators can also end anyone's on the <Link to="/users?view=sessions">Users → Signed in now</Link> page.
|
||||
</li>
|
||||
<li className="mb-2">
|
||||
<strong>Audit and diagnostic logs</strong> can be deleted automatically after a set number of days under Settings → Logs
|
||||
|
||||
+32
-2
@@ -1,5 +1,7 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { useEffect, useState, type ReactNode } from "react";
|
||||
import { Link, useSearchParams } from "react-router-dom";
|
||||
import ViewTabs from "../components/ViewTabs";
|
||||
import SessionsView from "../views/SessionsView";
|
||||
import { api, type UserRecord, type UserRole } from "../api/client";
|
||||
import { formatDateTime } from "../utils/date";
|
||||
import { useSortable } from "../hooks/useSortable";
|
||||
@@ -13,7 +15,34 @@ import Avatar from "../components/Avatar";
|
||||
|
||||
const ROLES: UserRole[] = ["viewer", "operator", "admin"];
|
||||
|
||||
/** People and Signed in now: who has an account and what they may do, and who is signed in at this moment. Switched by `?view=sessions`. */
|
||||
const userTabs = (view: "people" | "sessions") => (
|
||||
<ViewTabs
|
||||
label="Users view"
|
||||
tabs={[
|
||||
{ to: "/users", label: "People", active: view === "people" },
|
||||
{ to: "/users?view=sessions", label: "Signed in now", active: view === "sessions" },
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
||||
export default function Users() {
|
||||
const [params] = useSearchParams();
|
||||
if (params.get("view") === "sessions") {
|
||||
return (
|
||||
<>
|
||||
<div className="d-flex align-items-center mb-2">
|
||||
<h2 className="page-title mb-0">Users</h2>
|
||||
</div>
|
||||
{userTabs("sessions")}
|
||||
<SessionsView />
|
||||
</>
|
||||
);
|
||||
}
|
||||
return <People tabs={userTabs("people")} />;
|
||||
}
|
||||
|
||||
function People({ tabs }: { tabs: ReactNode }) {
|
||||
const [users, setUsers] = useState<UserRecord[] | null>(null);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [savingId, setSavingId] = useState<number | null>(null);
|
||||
@@ -65,6 +94,7 @@ export default function Users() {
|
||||
Export CSV
|
||||
</button>
|
||||
</div>
|
||||
{tabs}
|
||||
<ErrorNotice error={error} />
|
||||
{followGroups && (
|
||||
<div className="alert alert-info">
|
||||
|
||||
@@ -43,7 +43,8 @@ function detailSummary(e: AuditLogEntry): string {
|
||||
.join(" · ");
|
||||
}
|
||||
|
||||
export default function AuditLog() {
|
||||
/** The raw audit table — the "Raw audit log" side of the Change log page. */
|
||||
export default function AuditLogView() {
|
||||
const [entries, setEntries] = useState<AuditLogEntry[] | null>(null);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
||||
@@ -70,7 +71,7 @@ export default function AuditLog() {
|
||||
return (
|
||||
<>
|
||||
<div className="d-flex align-items-center mb-3">
|
||||
<h2 className="page-title mb-0">Audit Log</h2>
|
||||
<div className="text-secondary">The table behind the change log: every change made in the app, every sign-in and sign-out, with who did it and from where.</div>
|
||||
<button className="btn btn-outline-secondary ms-auto" onClick={exportCsv} disabled={!sorted || sorted.length === 0}>
|
||||
Export CSV
|
||||
</button>
|
||||
@@ -41,7 +41,7 @@ function NodeSelect({ id, label, nodes, value, onChange }: { id: string; label:
|
||||
* What needs what. When something is down, whatever depends on it is down too, and only the one that matters should raise the alarm — so the
|
||||
* alerts of the things that need it are folded under it, like a guest under its host.
|
||||
*/
|
||||
export default function Dependencies({ user }: { user: CurrentUser }) {
|
||||
export default function DependencyEditor({ user }: { user: CurrentUser }) {
|
||||
const canEdit = user.role === "admin" || user.role === "operator";
|
||||
const [data, setData] = useState<DependenciesResponse | null>(null);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
@@ -94,9 +94,6 @@ export default function Dependencies({ user }: { user: CurrentUser }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="d-flex align-items-center mb-3">
|
||||
<h2 className="page-title mb-0">Dependencies</h2>
|
||||
</div>
|
||||
<p className="text-secondary">
|
||||
Say what needs what: Gitea needs the server it is installed on; a Proxmox guest needs the Proxmox it runs on. When the thing that is needed is down, what needs it is down too — and its alert is
|
||||
held back under the first one on the Alerts page instead of adding to the noise. A service that was down for its own reasons still alerts once what it needs is back.
|
||||
@@ -25,7 +25,8 @@ const SOURCE_LABELS: Record<string, string> = {
|
||||
|
||||
const PAGE_SIZE = 100;
|
||||
|
||||
export default function DiagLog() {
|
||||
/** Every call made to an integration or DNS provider — the "Call log" side of the Integrations page. */
|
||||
export default function DiagLogView() {
|
||||
const [entries, setEntries] = useState<DiagLogEntry[] | null>(null);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [page, setPage] = useState(0);
|
||||
@@ -94,12 +95,8 @@ export default function DiagLog() {
|
||||
return (
|
||||
<>
|
||||
<div className="d-flex align-items-center mb-3">
|
||||
<div>
|
||||
<h2 className="page-title mb-0">Diagnostic Log</h2>
|
||||
<div className="text-secondary small mt-1">
|
||||
Every call this app makes to a DNS provider or integration — the last 500 calls are kept. Use this to
|
||||
troubleshoot connectivity issues.
|
||||
</div>
|
||||
<div className="text-secondary">
|
||||
Every call this app makes to a DNS provider or integration — the last 500 calls are kept. Use this to troubleshoot connectivity issues.
|
||||
</div>
|
||||
<button className="btn btn-outline-danger ms-auto" onClick={handleClear} disabled={clearing || total === 0}>
|
||||
{clearing ? "Clearing…" : "Clear log"}
|
||||
@@ -36,7 +36,8 @@ function friendlyUserAgent(ua: string | null): string {
|
||||
return `${browser} on ${os}`;
|
||||
}
|
||||
|
||||
export default function Sessions() {
|
||||
/** Everyone who is signed in right now, on every device — the "Signed in now" side of the Users page. */
|
||||
export default function SessionsView() {
|
||||
const [sessions, setSessions] = useState<SessionSummary[] | null>(null);
|
||||
const [currentSessionId, setCurrentSessionId] = useState<string | null>(null);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
@@ -100,10 +101,7 @@ export default function Sessions() {
|
||||
return (
|
||||
<>
|
||||
<div className="d-flex align-items-center mb-3">
|
||||
<div>
|
||||
<h2 className="page-title mb-0">Sessions</h2>
|
||||
<div className="text-secondary small mt-1">Everyone currently signed in, across every device.</div>
|
||||
</div>
|
||||
<div className="text-secondary">Everyone currently signed in, across every device. Ending a session signs that device out at once.</div>
|
||||
<button className="btn btn-outline-secondary ms-auto" onClick={exportCsv} disabled={!sorted || sorted.length === 0}>
|
||||
Export CSV
|
||||
</button>
|
||||
Reference in new issue
Block a user