Export CSV on every table, edit recurring maintenance, runs-on nothing, and run package checks outside the agent sandbox
- Export CSV for the small tables that had none (reads the table as shown) - Servers page shows a skeleton while loading instead of "No servers registered yet" - Recurring maintenance schedules can be edited (PUT /schedules/:id) - A server can be set to run on nothing (servers.no_parent, migration 0028) - Linux agent v3: package-manager question runs in ExecStartPre=-+ outside the sandbox, with --prepare-updates and --check-updates modes - Docs: README, DATABASE, AGENT_UPDATE Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c17e9aa140
commit
540ab704b7
32 files changed
+3003
-66
No files matched your search
@@ -2,7 +2,7 @@
|
||||
* Which server runs on which: a virtual machine on its Proxmox host, a container on a Docker box. When the host stops reporting, the
|
||||
* things on it stop too, and seven alerts about seven guests only hide the one that matters — so those alerts are folded under the
|
||||
* host's. The link is either set by hand ("runs on") or worked out: a server linked to a Proxmox guest runs on the server named after
|
||||
* that guest's Proxmox node, when there is exactly one such server.
|
||||
* that guest's Proxmox node, when there is exactly one such server. An admin can also say a server runs on nothing, which stops the guess.
|
||||
*/
|
||||
import { db } from "../db/client.js";
|
||||
import { servers } from "../db/schema.js";
|
||||
@@ -13,6 +13,8 @@ export interface ParentRow {
|
||||
hostname: string | null;
|
||||
parentServerId: number | null;
|
||||
proxmoxNode: string | null;
|
||||
/** Said by hand to run on nothing: no link, and no guessing from the Proxmox node. */
|
||||
noParent?: boolean;
|
||||
}
|
||||
|
||||
export interface ParentLink {
|
||||
@@ -36,6 +38,7 @@ export function resolveParents(rows: ParentRow[]): Map<number, ParentLink> {
|
||||
const byId = new Map(rows.map((r) => [r.id, r]));
|
||||
const out = new Map<number, ParentLink>();
|
||||
for (const row of rows) {
|
||||
if (row.noParent) continue;
|
||||
if (row.parentServerId !== null && row.parentServerId !== row.id && byId.has(row.parentServerId)) {
|
||||
out.set(row.id, { parentId: row.parentServerId, auto: false });
|
||||
continue;
|
||||
@@ -86,6 +89,6 @@ export function wouldLoop(rows: ParentRow[], id: number, parentId: number): bool
|
||||
|
||||
export async function loadParentRows(): Promise<ParentRow[]> {
|
||||
return db
|
||||
.select({ id: servers.id, name: servers.name, hostname: servers.hostname, parentServerId: servers.parentServerId, proxmoxNode: servers.proxmoxNode })
|
||||
.select({ id: servers.id, name: servers.name, hostname: servers.hostname, parentServerId: servers.parentServerId, proxmoxNode: servers.proxmoxNode, noParent: servers.noParent })
|
||||
.from(servers);
|
||||
}
|
||||
Reference in new issue
Block a user