Add small trend lines to the rows of the server, endpoint and integration lists
Server cards show load and memory over the last 24 hours, endpoint checks show their answer times with a tick where a check failed, and integrations that keep a figure history show their headline figure over the last week. Each list asks for all its lines in one request, drawn from the history already kept, and each line has a sentence for screen readers. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5750350565
commit
639408c0d0
15 files changed
+707
No files matched your search
@@ -27,6 +27,7 @@ import { invalidateAlertsCache } from "../services/alerts.js";
|
||||
import { getSettings, updateSettings } from "../services/settingsStore.js";
|
||||
import { osSummary } from "../services/osLifecycle.js";
|
||||
import { normaliseHostname } from "../utils/hostnames.js";
|
||||
import { serverSparklines } from "../services/sparklines.js";
|
||||
|
||||
export const serversRouter = Router();
|
||||
|
||||
@@ -253,6 +254,11 @@ serversRouter.patch("/:id", requireRole("admin"), asyncHandler(async (req, res)
|
||||
|
||||
// For the dashboard widget. Computed here, with the health monitor's own rules and the thresholds from Settings
|
||||
// (which viewers can't read), so the widget and the alerts always agree about what "offline" and "full" mean.
|
||||
// The last day's load and memory of every server that reports them, as short series for the lines in a list. Anyone signed in, like the list itself.
|
||||
serversRouter.get("/sparklines", asyncHandler(async (_req, res) => {
|
||||
res.json({ hours: 24, servers: await serverSparklines() });
|
||||
}));
|
||||
|
||||
serversRouter.get("/summary", asyncHandler(async (_req, res) => {
|
||||
const rows = await db
|
||||
.select({ id: servers.id, name: servers.name, osType: servers.osType, lastSeenAt: servers.lastSeenAt, disks: servers.disks, thresholds: servers.thresholds })
|
||||
|
||||
Reference in new issue
Block a user