Report uptime from the agents, and stop the Integrations page overflowing a phone
Linux agent 8 and Windows agent 7 say how long the machine has been up; the server stores it (migration 0086) and shows it as Up for in the status strip (left out while offline) and Uptime on the server page. The Integrations header wraps and its button no longer squeezes, and .table-responsive is positioned so hidden text in scrolled-off columns cannot widen the page. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d88a24b33a
commit
41fbbf3467
18 files changed
+9161
-10
No files matched your search
@@ -13,6 +13,7 @@
|
||||
* 5 — Linux: also says what the machine is (maker, model, serial), for the inventory
|
||||
* 6 — Linux (and Windows 5): also says what it could not collect and why, so the server can say what to fix
|
||||
* 7 — Linux (and Windows 6): also says which operating system and release it runs, so the server can say when that release stops being supported
|
||||
* 8 — Linux (and Windows 7): also says how long the machine has been up
|
||||
*/
|
||||
import { createHash } from "node:crypto";
|
||||
import { readFileSync } from "node:fs";
|
||||
|
||||
@@ -24,6 +24,8 @@ export interface IncomingSystemInfo {
|
||||
ip_addresses?: string[];
|
||||
cpu?: { model?: string; cores?: number; load_percent?: number | null };
|
||||
memory?: { total_bytes?: number; used_bytes?: number };
|
||||
/** Seconds the machine had been up. Absent from an agent that predates it. */
|
||||
uptime_seconds?: number;
|
||||
disks?: { mount: string; size_bytes: number; used_bytes: number }[];
|
||||
listening_ports?: { protocol: "tcp" | "udp"; port: number; address: string; process?: string }[];
|
||||
/** Updates waiting to be installed. Absent from an agent that doesn't report them (or couldn't find out this time). */
|
||||
@@ -141,6 +143,8 @@ export async function syncServerTasks(serverId: number, report: AgentReport) {
|
||||
...(system?.cpu?.load_percent !== undefined ? { cpuLoadPercent: system.cpu.load_percent } : {}),
|
||||
...(system?.memory?.total_bytes !== undefined ? { memTotalBytes: system.memory.total_bytes } : {}),
|
||||
...(system?.memory?.used_bytes !== undefined ? { memUsedBytes: system.memory.used_bytes } : {}),
|
||||
// Only stored when said, so an agent that predates this doesn't wipe it.
|
||||
...(system?.uptime_seconds !== undefined ? { uptimeSeconds: system.uptime_seconds } : {}),
|
||||
...(system?.disks
|
||||
? {
|
||||
disks: JSON.stringify(
|
||||
|
||||
Reference in new issue
Block a user