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
+176
-101
No files matched your search
+1
-1
@@ -229,7 +229,7 @@ the app alerts on something:
|
|||||||
test") send a one-off message through that one channel only, to
|
test") send a one-off message through that one channel only, to
|
||||||
confirm it's wired up correctly — not a real event and not affected by
|
confirm it's wired up correctly — not a real event and not affected by
|
||||||
quiet hours.
|
quiet hours.
|
||||||
- **Consistency reports**, **Diagnostic Log**, and **Audit Log** are all
|
- **Consistency reports**, the **Diagnostic Log** (Integrations → Call log), and the **Audit Log** (Change log → Raw audit log) are all
|
||||||
read-only views you check yourself; none of them push a notification
|
read-only views you check yourself; none of them push a notification
|
||||||
on their own (the Diagnostic Log's failures are what feed the
|
on their own (the Diagnostic Log's failures are what feed the
|
||||||
integration-down alert above, but reading the log itself never
|
integration-down alert above, but reading the log itself never
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Authentik (OIDC), with local admin/operator/viewer roles.
|
|||||||
|
|
||||||
All modules from the original plan are built:
|
All modules from the original plan are built:
|
||||||
|
|
||||||
- Monorepo scaffold, Tabler-themed app shell with a grouped sidebar (Infrastructure, Network, Monitoring, Automation, Operations, Administration; groups open on demand, the one holding the current page is always open, and what you leave open is remembered)
|
- Monorepo scaffold, Tabler-themed app shell with a grouped sidebar (Infrastructure, Backups, Network, Monitoring, Automation, Operations, Administration; groups open on demand, the one holding the current page is always open, and what you leave open is remembered)
|
||||||
- Authentik OIDC login, roles (first user to sign in becomes admin), audit log
|
- Authentik OIDC login, roles (first user to sign in becomes admin), audit log
|
||||||
(changes made in the app, sign-ins and sign-outs with the IP they came from, new accounts, and the log's own
|
(changes made in the app, sign-ins and sign-outs with the IP they came from, new accounts, and the log's own
|
||||||
automatic trimming — attributed to "system"; settings changes show what changed, but never credentials)
|
automatic trimming — attributed to "system"; settings changes show what changed, but never credentials)
|
||||||
@@ -47,7 +47,7 @@ All modules from the original plan are built:
|
|||||||
stored snapshots have failed verification or were never verified.
|
stored snapshots have failed verification or were never verified.
|
||||||
The osTicket widget shows how many tickets are open, overdue, and awaiting
|
The osTicket widget shows how many tickets are open, overdue, and awaiting
|
||||||
a staff reply.
|
a staff reply.
|
||||||
- **Diagnostic Log** (admin-only) — every call this app makes to a DNS
|
- **Diagnostic Log** (admin-only; Administration → Integrations → *Call log*) — every call this app makes to a DNS
|
||||||
provider or integration (Tailscale, Proxmox, Synology, Semaphore, Gitea,
|
provider or integration (Tailscale, Proxmox, Synology, Semaphore, Gitea,
|
||||||
Dockhand, Uptime Kuma, Proxmox Backup Server, osTicket), success or failure, with latency and the error message if it
|
Dockhand, Uptime Kuma, Proxmox Backup Server, osTicket), success or failure, with latency and the error message if it
|
||||||
failed — the last 500 calls, filterable by source/result, for
|
failed — the last 500 calls, filterable by source/result, for
|
||||||
@@ -254,7 +254,7 @@ audit log (as `session` / `login_failed`, with the address and a short reason),
|
|||||||
Every response carries `frame-ancestors 'none'`, `X-Frame-Options`, `nosniff` and a no-referrer-to-other-sites policy. In production the app
|
Every response carries `frame-ancestors 'none'`, `X-Frame-Options`, `nosniff` and a no-referrer-to-other-sites policy. In production the app
|
||||||
refuses to start without a `SESSION_SECRET`, and warns if it is still the placeholder from `.env.example`.
|
refuses to start without a `SESSION_SECRET`, and warns if it is still the placeholder from `.env.example`.
|
||||||
Things to know: the first account to sign in becomes admin, so sign in yourself first on a new install. A session lasts up to 7 days after last use,
|
Things to know: the first account to sign in becomes admin, so sign in yourself first on a new install. A session lasts up to 7 days after last use,
|
||||||
and disabling someone in Authentik does not end it — delete them on the Users page (or revoke the session on the Sessions page) and it ends at once.
|
and disabling someone in Authentik does not end it — delete them on the Users page (or end the session under Users → *Signed in now*) and it ends at once.
|
||||||
If Authentik uses a certificate from an internal CA, point Node at the CA with `NODE_EXTRA_CA_CERTS=/path/to/ca.pem` rather than turning verification
|
If Authentik uses a certificate from an internal CA, point Node at the CA with `NODE_EXTRA_CA_CERTS=/path/to/ca.pem` rather than turning verification
|
||||||
off with `NODE_TLS_REJECT_UNAUTHORIZED=0`.
|
off with `NODE_TLS_REJECT_UNAUTHORIZED=0`.
|
||||||
|
|
||||||
@@ -402,7 +402,7 @@ devices, Uptime Kuma monitors, Gitea repositories or Semaphore templates, a
|
|||||||
click (or Enter) on a row opens a panel with everything known about it, without
|
click (or Enter) on a row opens a panel with everything known about it, without
|
||||||
leaving the table.
|
leaving the table.
|
||||||
|
|
||||||
**Map** (Infrastructure → Map) draws how things connect: which Proxmox host each
|
**Map** (Infrastructure → Map) has two views, *Connections* and *Dependencies* (see below). *Connections* draws how things connect: which Proxmox host each
|
||||||
linked server runs on, which DNS names point at it (an A or AAAA record holding
|
linked server runs on, which DNS names point at it (an A or AAAA record holding
|
||||||
one of the server's own addresses — nothing is guessed from names), and which
|
one of the server's own addresses — nothing is guessed from names), and which
|
||||||
Uptime Kuma monitors watch it. Hover or tab to a box to light up its
|
Uptime Kuma monitors watch it. Hover or tab to a box to light up its
|
||||||
@@ -445,9 +445,9 @@ kept, `/metrics` has each subject's age and result, and everything is in the cha
|
|||||||
**The change log** (Operations → Change log, operators and administrators) is one list of what has changed, newest first and grouped by day: agents updated,
|
**The change log** (Operations → Change log, operators and administrators) is one list of what has changed, newest first and grouped by day: agents updated,
|
||||||
settings changed (with what to what), maintenance started and ended, dependencies edited, hardware added, endpoint checks and restore tests, alerts raised and cleared —
|
settings changed (with what to what), maintenance started and ended, dependencies edited, hardware added, endpoint checks and restore tests, alerts raised and cleared —
|
||||||
each as a sentence. Narrow it by kind of change, by server, by how far back (a day to everything kept), or by a word; "Show older" goes on from where it stopped; CSV
|
each as a sentence. Narrow it by kind of change, by server, by how far back (a day to everything kept), or by a word; "Show older" goes on from where it stopped; CSV
|
||||||
export. A server's Activity card links to its slice of it. Sign-ins and people's own data exports aren't changes and are left out. The Audit Log remains the raw table.
|
export. A server's Activity card links to its slice of it. Sign-ins and people's own data exports aren't changes and are left out. The raw audit log is the other tab of the same page (Change log → *Raw audit log*).
|
||||||
|
|
||||||
**Dependencies beyond servers** (Infrastructure → Dependencies). Say that Gitea needs the server it is installed on, or that a server
|
**Dependencies beyond servers** (Infrastructure → Map → *Dependencies*, which draws the graph with the editor under it). Say that Gitea needs the server it is installed on, or that a server
|
||||||
needs Proxmox to answer. When what is needed is down, the alert of what needs it is folded under the first one exactly like a
|
needs Proxmox to answer. When what is needed is down, the alert of what needs it is folded under the first one exactly like a
|
||||||
guest under its host — shown, labelled "caused by …", left out of notifications and tickets — and the root cause says what else it
|
guest under its host — shown, labelled "caused by …", left out of notifications and tickets — and the root cause says what else it
|
||||||
takes down. It follows chains and the "runs on" links of servers; something needing two things is explained by whichever is down;
|
takes down. It follows chains and the "runs on" links of servers; something needing two things is explained by whichever is down;
|
||||||
@@ -597,7 +597,7 @@ every few hours, with each day as an all-day event and maintenance with its star
|
|||||||
calendar; *with names* also gives the name and a link back. Like any share link the address is shown once and can be removed. Tailscale keys are asked for at most every
|
calendar; *with names* also gives the name and a link back. Like any share link the address is shown once and can be removed. Tailscale keys are asked for at most every
|
||||||
ten minutes, and only those the integration reports as expiring soon are listed.
|
ten minutes, and only those the integration reports as expiring soon are listed.
|
||||||
|
|
||||||
**Backup coverage** (Infrastructure → Backup coverage) answers "what isn't backed
|
**Backup coverage** (Backups → Backup coverage) answers "what isn't backed
|
||||||
up?" for every Proxmox guest: is a backup job covering it, when was it last backed up
|
up?" for every Proxmox guest: is a backup job covering it, when was it last backed up
|
||||||
(from the newest snapshot on a Proxmox Backup Server, or the last successful Proxmox
|
(from the newest snapshot on a Proxmox Backup Server, or the last successful Proxmox
|
||||||
backup task that names the guest), and did that go well — Recent backup, Stale (older
|
backup task that names the guest), and did that go well — Recent backup, Stale (older
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ page's own top-level link.
|
|||||||
| Proxmox Backup | `/pbs` | ✅ | ✅ | ✅ |
|
| Proxmox Backup | `/pbs` | ✅ | ✅ | ✅ |
|
||||||
| Backup coverage | `/backups` | ✅ | ✅ | ✅ |
|
| Backup coverage | `/backups` | ✅ | ✅ | ✅ |
|
||||||
| Inventory | `/inventory` | ✅ | ✅ | ✅ |
|
| Inventory | `/inventory` | ✅ | ✅ | ✅ |
|
||||||
| Dependencies | `/dependencies` | ✅ | ✅ | ✅ |
|
| Dependencies (Map → Dependencies) | `/map?view=dependencies` | ✅ | ✅ | ✅ |
|
||||||
| Endpoints | `/endpoints` | ✅ | ✅ | ✅ |
|
| Endpoints | `/endpoints` | ✅ | ✅ | ✅ |
|
||||||
| Change log | `/changes` | — | ✅ | ✅ |
|
| Change log | `/changes` | — | ✅ | ✅ |
|
||||||
| Docker | `/docker` | ✅ | ✅ | ✅ |
|
| Docker | `/docker` | ✅ | ✅ | ✅ |
|
||||||
@@ -52,15 +52,16 @@ page's own top-level link.
|
|||||||
| **Administration** | | | | |
|
| **Administration** | | | | |
|
||||||
| Integrations | `/integrations` | ✅ | ✅ | ✅ |
|
| Integrations | `/integrations` | ✅ | ✅ | ✅ |
|
||||||
| Users | `/users` | ❌ | ❌ | ✅ |
|
| Users | `/users` | ❌ | ❌ | ✅ |
|
||||||
| Sessions | `/sessions` | ❌ | ❌ | ✅ |
|
| Sessions (Users → Signed in now) | `/users?view=sessions` | ❌ | ❌ | ✅ |
|
||||||
| Audit Log | `/audit-log` | ❌ | ✅ | ✅ |
|
| Audit Log (Change log → Raw audit log) | `/changes?view=audit` | ❌ | ✅ | ✅ |
|
||||||
| Diagnostic Log | `/diag-log` | ❌ | ❌ | ✅ |
|
| Diagnostic Log (Integrations → Call log) | `/integrations?view=calls` | ❌ | ❌ | ✅ |
|
||||||
| Settings | `/settings` | ❌ | ❌ | ✅ |
|
| Settings | `/settings` | ❌ | ❌ | ✅ |
|
||||||
| Privacy (footer link, not in a group) | `/privacy` | ✅ | ✅ | ✅ |
|
| Privacy (footer link, not in a group) | `/privacy` | ✅ | ✅ | ✅ |
|
||||||
|
|
||||||
So in practice: **every page is visible to every role except the five
|
So in practice: **every page is visible to every role except the five
|
||||||
under Administration** — Users, Sessions, and Diagnostic Log need admin;
|
under Administration** — Users (with Signed in now) and Settings need admin; the
|
||||||
Audit Log needs operator or admin; Settings needs admin.
|
Call log tab of Integrations needs admin (operators and viewers see Integrations without it); the raw audit log, a tab of the Change log, needs operator or admin.
|
||||||
|
Sessions, the Audit Log, the Diagnostic Log and Dependencies were pages of their own once; their old addresses redirect to the sections above.
|
||||||
|
|
||||||
## Being able to see a page isn't the same as being able to change things
|
## Being able to see a page isn't the same as being able to change things
|
||||||
|
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ export async function getChangeLog(query: ChangeQuery = {}): Promise<{ entries:
|
|||||||
} else if (a.targetType === "heartbeat") link = "/heartbeats";
|
} else if (a.targetType === "heartbeat") link = "/heartbeats";
|
||||||
else if (a.targetType === "asset" && idNum !== null) link = `/inventory?asset=${idNum}`;
|
else if (a.targetType === "asset" && idNum !== null) link = `/inventory?asset=${idNum}`;
|
||||||
else if (a.targetType === "restore_test") link = "/backups";
|
else if (a.targetType === "restore_test") link = "/backups";
|
||||||
else if (a.targetType === "dependency") link = "/dependencies";
|
else if (a.targetType === "dependency") link = "/map?view=dependencies";
|
||||||
else if (a.targetType === "settings") link = "/settings/notifications";
|
else if (a.targetType === "settings") link = "/settings/notifications";
|
||||||
entries.push({
|
entries.push({
|
||||||
detail,
|
detail,
|
||||||
|
|||||||
+6
-30
@@ -4,9 +4,6 @@ import { api, type CurrentUser, type UserRole, UnauthorizedError } from "./api/c
|
|||||||
import Login from "./pages/Login";
|
import Login from "./pages/Login";
|
||||||
import Dashboard from "./pages/Dashboard";
|
import Dashboard from "./pages/Dashboard";
|
||||||
import Users from "./pages/Users";
|
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 Secrets from "./pages/Secrets";
|
||||||
import Ipam from "./pages/Ipam";
|
import Ipam from "./pages/Ipam";
|
||||||
import Ports from "./pages/Ports";
|
import Ports from "./pages/Ports";
|
||||||
@@ -33,7 +30,6 @@ import IncidentDetail from "./pages/IncidentDetail";
|
|||||||
import Inventory from "./pages/Inventory";
|
import Inventory from "./pages/Inventory";
|
||||||
import InventoryLabels from "./pages/InventoryLabels";
|
import InventoryLabels from "./pages/InventoryLabels";
|
||||||
import InventoryLifecycle from "./pages/InventoryLifecycle";
|
import InventoryLifecycle from "./pages/InventoryLifecycle";
|
||||||
import Dependencies from "./pages/Dependencies";
|
|
||||||
import Endpoints from "./pages/Endpoints";
|
import Endpoints from "./pages/Endpoints";
|
||||||
import Heartbeats from "./pages/Heartbeats";
|
import Heartbeats from "./pages/Heartbeats";
|
||||||
import ComingUp from "./pages/ComingUp";
|
import ComingUp from "./pages/ComingUp";
|
||||||
@@ -143,7 +139,7 @@ function Shelled({ user }: { user: CurrentUser }) {
|
|||||||
<AppShell user={user}>
|
<AppShell user={user}>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/" element={<Dashboard user={user} />} />
|
<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" element={<Servers user={user} />} />
|
||||||
<Route path="/servers/compare" element={<ServerCompare />} />
|
<Route path="/servers/compare" element={<ServerCompare />} />
|
||||||
<Route path="/servers/:id" element={<ServerDetail user={user} />} />
|
<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" element={<Inventory user={user} />} />
|
||||||
<Route path="/inventory/labels" element={<InventoryLabels />} />
|
<Route path="/inventory/labels" element={<InventoryLabels />} />
|
||||||
<Route path="/inventory/lifecycle" element={<InventoryLifecycle />} />
|
<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="/endpoints" element={<Endpoints user={user} />} />
|
||||||
<Route path="/heartbeats" element={<Heartbeats user={user} />} />
|
<Route path="/heartbeats" element={<Heartbeats user={user} />} />
|
||||||
<Route path="/coming-up" element={<ComingUp user={user} />} />
|
<Route path="/coming-up" element={<ComingUp user={user} />} />
|
||||||
@@ -190,30 +190,6 @@ function Shelled({ user }: { user: CurrentUser }) {
|
|||||||
</RequireRole>
|
</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
|
<Route
|
||||||
path="/settings"
|
path="/settings"
|
||||||
element={
|
element={
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ export default function DependencyMap() {
|
|||||||
return (
|
return (
|
||||||
<div className="card">
|
<div className="card">
|
||||||
<div className="card-body text-secondary">
|
<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>
|
||||||
</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. </>}
|
{summary.moreEvents > 0 && <>and {summary.moreEvents} more. </>}
|
||||||
{others > 0 && (
|
{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>
|
</div>
|
||||||
|
|||||||
+9
-10
@@ -13,9 +13,6 @@ import {
|
|||||||
IconServerCog,
|
IconServerCog,
|
||||||
IconDatabase,
|
IconDatabase,
|
||||||
IconUsers,
|
IconUsers,
|
||||||
IconDevices,
|
|
||||||
IconHistory,
|
|
||||||
IconStethoscope,
|
|
||||||
IconSettings,
|
IconSettings,
|
||||||
IconWand,
|
IconWand,
|
||||||
IconTool,
|
IconTool,
|
||||||
@@ -24,7 +21,6 @@ import {
|
|||||||
IconRefresh,
|
IconRefresh,
|
||||||
IconDownload,
|
IconDownload,
|
||||||
IconBox,
|
IconBox,
|
||||||
IconHierarchy2,
|
|
||||||
IconHeartbeat,
|
IconHeartbeat,
|
||||||
IconGitCommit,
|
IconGitCommit,
|
||||||
IconShieldCheck,
|
IconShieldCheck,
|
||||||
@@ -74,16 +70,22 @@ export const NAV: NavEntry[] = [
|
|||||||
{ to: "/servers", label: "Servers", icon: <IconServer2 size={20} /> },
|
{ to: "/servers", label: "Servers", icon: <IconServer2 size={20} /> },
|
||||||
{ to: "/proxmox", label: "Proxmox", icon: <IconServerCog size={20} /> },
|
{ to: "/proxmox", label: "Proxmox", icon: <IconServerCog size={20} /> },
|
||||||
{ to: "/synology", label: "Synology", icon: <IconDatabase 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: "/docker", label: "Docker", icon: <IconBrandDocker size={20} /> },
|
||||||
{ to: "/tailscale", label: "Tailscale", icon: <IconAffiliate 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: "/map", label: "Map", icon: <IconSitemap size={20} /> },
|
||||||
{ to: "/inventory", label: "Inventory", icon: <IconBox 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} /> },
|
{ 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",
|
id: "network",
|
||||||
label: "Network",
|
label: "Network",
|
||||||
@@ -137,9 +139,6 @@ export const NAV: NavEntry[] = [
|
|||||||
{ to: "/integrations", label: "Integrations", icon: <IconPlugConnected size={20} /> },
|
{ to: "/integrations", label: "Integrations", icon: <IconPlugConnected size={20} /> },
|
||||||
{ to: "/generator", label: "Generator", icon: <IconWand size={20} /> },
|
{ to: "/generator", label: "Generator", icon: <IconWand size={20} /> },
|
||||||
{ to: "/users", label: "Users", icon: <IconUsers size={20} />, minRole: "admin" },
|
{ 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" },
|
{ to: "/settings", label: "Settings", icon: <IconSettings size={20} />, minRole: "admin" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
+11
-17
@@ -19,6 +19,7 @@ import { useAlertsReport } from "../hooks/useAlertsReport";
|
|||||||
import { summariseAlerts } from "../utils/alertSummary";
|
import { summariseAlerts } from "../utils/alertSummary";
|
||||||
import { EmptyRow } from "../components/EmptyState";
|
import { EmptyRow } from "../components/EmptyState";
|
||||||
import IncidentHistory, { incidentPath } from "../components/IncidentHistory";
|
import IncidentHistory, { incidentPath } from "../components/IncidentHistory";
|
||||||
|
import ViewTabs from "../components/ViewTabs";
|
||||||
|
|
||||||
const SEVERITY: Record<AlertSeverity, { label: string; badge: string; rank: number }> = {
|
const SEVERITY: Record<AlertSeverity, { label: string; badge: string; rank: number }> = {
|
||||||
critical: { label: "Critical", badge: "bg-red-lt text-red", rank: 0 },
|
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 };
|
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`. */
|
/** 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" }) {
|
const alertTabs = (view: "now" | "history") => (
|
||||||
return (
|
<ViewTabs
|
||||||
<ul className="nav nav-tabs mb-3" aria-label="Alerts view">
|
label="Alerts view"
|
||||||
<li className="nav-item">
|
tabs={[
|
||||||
<Link to="/alerts" className={`nav-link ${view === "now" ? "active" : ""}`} aria-current={view === "now" ? "page" : undefined}>
|
{ to: "/alerts", label: "Now", active: view === "now" },
|
||||||
Now
|
{ to: "/alerts?view=history", label: "History", active: view === "history" },
|
||||||
</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>
|
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
export default function Alerts({ user }: { user: CurrentUser }) {
|
export default function Alerts({ user }: { user: CurrentUser }) {
|
||||||
const [params] = useSearchParams();
|
const [params] = useSearchParams();
|
||||||
@@ -67,12 +61,12 @@ export default function Alerts({ user }: { user: CurrentUser }) {
|
|||||||
<div className="d-flex align-items-center mb-2">
|
<div className="d-flex align-items-center mb-2">
|
||||||
<h2 className="page-title mb-0">Alerts</h2>
|
<h2 className="page-title mb-0">Alerts</h2>
|
||||||
</div>
|
</div>
|
||||||
<ViewTabs view="history" />
|
{alertTabs("history")}
|
||||||
<IncidentHistory />
|
<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 }) {
|
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 { Link, useSearchParams } from "react-router-dom";
|
||||||
import { api, type ChangeEntry, type ChangeKind } from "../api/client";
|
import { api, type ChangeEntry, type ChangeKind } from "../api/client";
|
||||||
import { ErrorNotice } from "../components/Notice";
|
import { ErrorNotice } from "../components/Notice";
|
||||||
|
import ViewTabs from "../components/ViewTabs";
|
||||||
|
import AuditLogView from "../views/AuditLogView";
|
||||||
import { BlockSkeleton } from "../components/Skeleton";
|
import { BlockSkeleton } from "../components/Skeleton";
|
||||||
import EmptyState from "../components/EmptyState";
|
import EmptyState from "../components/EmptyState";
|
||||||
import { downloadCsv } from "../utils/csv";
|
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
|
* 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.
|
* 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() {
|
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 [params, setParams] = useSearchParams();
|
||||||
const days = RANGES.some((r) => r.days === Number(params.get("days"))) ? Number(params.get("days")) : 7;
|
const days = RANGES.some((r) => r.days === Number(params.get("days"))) ? Number(params.get("days")) : 7;
|
||||||
const kind = params.get("kind") ?? "";
|
const kind = params.get("kind") ?? "";
|
||||||
@@ -121,8 +149,9 @@ export default function ChangeLog() {
|
|||||||
Export CSV
|
Export CSV
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
{tabs}
|
||||||
<p className="text-secondary">
|
<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>
|
</p>
|
||||||
<ErrorNotice error={error} />
|
<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 { Link, useSearchParams } from "react-router-dom";
|
||||||
import { api, type CurrentUser, type IntegrationSummary, type IntegrationType } from "../api/client";
|
import { api, type CurrentUser, type IntegrationSummary, type IntegrationType } from "../api/client";
|
||||||
import IntegrationForm from "../components/IntegrationForm";
|
import IntegrationForm from "../components/IntegrationForm";
|
||||||
|
import ViewTabs from "../components/ViewTabs";
|
||||||
|
import DiagLogView from "../views/DiagLogView";
|
||||||
import IntegrationEditForm from "../components/IntegrationEditForm";
|
import IntegrationEditForm from "../components/IntegrationEditForm";
|
||||||
import TableToolbar from "../components/TableToolbar";
|
import TableToolbar from "../components/TableToolbar";
|
||||||
import { useTableSearch } from "../hooks/useTableSearch";
|
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` };
|
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 }) {
|
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 isAdmin = user.role === "admin";
|
||||||
const isOperator = user.role === "admin" || user.role === "operator";
|
const isOperator = user.role === "admin" || user.role === "operator";
|
||||||
const [searchParams, setSearchParams] = useSearchParams();
|
const [searchParams, setSearchParams] = useSearchParams();
|
||||||
@@ -171,6 +201,7 @@ export default function Integrations({ user }: { user: CurrentUser }) {
|
|||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
{tabs}
|
||||||
<ErrorNotice error={error} />
|
<ErrorNotice error={error} />
|
||||||
|
|
||||||
{editingIntegration ? (
|
{editingIntegration ? (
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
import { Link, useSearchParams } from "react-router-dom";
|
import { Link, useSearchParams } from "react-router-dom";
|
||||||
import DependencyMap from "../components/DependencyMap";
|
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 { api, type MapData, type MapNode } from "../api/client";
|
||||||
import { ErrorNotice } from "../components/Notice";
|
import { ErrorNotice } from "../components/Notice";
|
||||||
import { PageSkeleton } from "../components/Skeleton";
|
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. */
|
/** 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 [params, setParams] = useSearchParams();
|
||||||
const view = params.get("view") === "dependencies" ? "dependencies" : "connections";
|
const view = params.get("view") === "dependencies" ? "dependencies" : "connections";
|
||||||
const choose = (v: "connections" | "dependencies") =>
|
const choose = (v: "connections" | "dependencies") =>
|
||||||
@@ -107,10 +109,11 @@ export default function MapPage() {
|
|||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<p className="text-secondary">
|
<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.{" "}
|
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>
|
|
||||||
</p>
|
</p>
|
||||||
<DependencyMap />
|
<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">
|
<div className="card-body">
|
||||||
<ul className="mb-0">
|
<ul className="mb-0">
|
||||||
<li className="mb-2">
|
<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>
|
||||||
<li className="mb-2">
|
<li className="mb-2">
|
||||||
<strong>Audit and diagnostic logs</strong> can be deleted automatically after a set number of days under Settings → Logs
|
<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 { useEffect, useState, type ReactNode } from "react";
|
||||||
import { Link } from "react-router-dom";
|
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 { api, type UserRecord, type UserRole } from "../api/client";
|
||||||
import { formatDateTime } from "../utils/date";
|
import { formatDateTime } from "../utils/date";
|
||||||
import { useSortable } from "../hooks/useSortable";
|
import { useSortable } from "../hooks/useSortable";
|
||||||
@@ -13,7 +15,34 @@ import Avatar from "../components/Avatar";
|
|||||||
|
|
||||||
const ROLES: UserRole[] = ["viewer", "operator", "admin"];
|
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() {
|
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 [users, setUsers] = useState<UserRecord[] | null>(null);
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
const [savingId, setSavingId] = useState<number | null>(null);
|
const [savingId, setSavingId] = useState<number | null>(null);
|
||||||
@@ -65,6 +94,7 @@ export default function Users() {
|
|||||||
Export CSV
|
Export CSV
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
{tabs}
|
||||||
<ErrorNotice error={error} />
|
<ErrorNotice error={error} />
|
||||||
{followGroups && (
|
{followGroups && (
|
||||||
<div className="alert alert-info">
|
<div className="alert alert-info">
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ function detailSummary(e: AuditLogEntry): string {
|
|||||||
.join(" · ");
|
.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 [entries, setEntries] = useState<AuditLogEntry[] | null>(null);
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
|
|
||||||
@@ -70,7 +71,7 @@ export default function AuditLog() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="d-flex align-items-center mb-3">
|
<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}>
|
<button className="btn btn-outline-secondary ms-auto" onClick={exportCsv} disabled={!sorted || sorted.length === 0}>
|
||||||
Export CSV
|
Export CSV
|
||||||
</button>
|
</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
|
* 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.
|
* 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 canEdit = user.role === "admin" || user.role === "operator";
|
||||||
const [data, setData] = useState<DependenciesResponse | null>(null);
|
const [data, setData] = useState<DependenciesResponse | null>(null);
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
@@ -94,9 +94,6 @@ export default function Dependencies({ user }: { user: CurrentUser }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="d-flex align-items-center mb-3">
|
|
||||||
<h2 className="page-title mb-0">Dependencies</h2>
|
|
||||||
</div>
|
|
||||||
<p className="text-secondary">
|
<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
|
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.
|
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;
|
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 [entries, setEntries] = useState<DiagLogEntry[] | null>(null);
|
||||||
const [total, setTotal] = useState(0);
|
const [total, setTotal] = useState(0);
|
||||||
const [page, setPage] = useState(0);
|
const [page, setPage] = useState(0);
|
||||||
@@ -94,12 +95,8 @@ export default function DiagLog() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="d-flex align-items-center mb-3">
|
<div className="d-flex align-items-center mb-3">
|
||||||
<div>
|
<div className="text-secondary">
|
||||||
<h2 className="page-title mb-0">Diagnostic Log</h2>
|
Every call this app makes to a DNS provider or integration — the last 500 calls are kept. Use this to troubleshoot connectivity issues.
|
||||||
<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>
|
</div>
|
||||||
<button className="btn btn-outline-danger ms-auto" onClick={handleClear} disabled={clearing || total === 0}>
|
<button className="btn btn-outline-danger ms-auto" onClick={handleClear} disabled={clearing || total === 0}>
|
||||||
{clearing ? "Clearing…" : "Clear log"}
|
{clearing ? "Clearing…" : "Clear log"}
|
||||||
@@ -36,7 +36,8 @@ function friendlyUserAgent(ua: string | null): string {
|
|||||||
return `${browser} on ${os}`;
|
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 [sessions, setSessions] = useState<SessionSummary[] | null>(null);
|
||||||
const [currentSessionId, setCurrentSessionId] = useState<string | null>(null);
|
const [currentSessionId, setCurrentSessionId] = useState<string | null>(null);
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
@@ -100,10 +101,7 @@ export default function Sessions() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="d-flex align-items-center mb-3">
|
<div className="d-flex align-items-center mb-3">
|
||||||
<div>
|
<div className="text-secondary">Everyone currently signed in, across every device. Ending a session signs that device out at once.</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>
|
|
||||||
<button className="btn btn-outline-secondary ms-auto" onClick={exportCsv} disabled={!sorted || sorted.length === 0}>
|
<button className="btn btn-outline-secondary ms-auto" onClick={exportCsv} disabled={!sorted || sorted.length === 0}>
|
||||||
Export CSV
|
Export CSV
|
||||||
</button>
|
</button>
|
||||||
Reference in new issue
Block a user