system: information panel and event log; about: download this build's source
ci / check (push) Successful in 1m20s
ci / images (push) Successful in 20s

System page laid out after 3CX's admin dashboard: a System information panel (version,
host name, company, public IP, LAN IPs, ports, telephony, restart needed, copy buttons,
how to restart) and an Event log panel (system_events, 90 days: trunk down/up, Asterisk
down/up, restart needed, config failed, 911, public IP changed, backups, disk) with Load
more and a CSV download.

About (/about, no sign-in, linked from the login page, My phone and System): AGPL-3.0
notice, credits, the repository link, and "Code v<version>", which downloads
selfphone.tar.gz: the api image now tars its own build context (no .env, data,
node_modules, build output or .git) before installing anything.

Task: M11-T7
This commit is contained in:
iamdoubz committed 2026-10-20 11:26:34 -05:00
1 parent a6ba61756c
commit 0ff0f9292b
29 files changed
+5035 -79

No files matched your search

@@ -0,0 +1,11 @@
CREATE TABLE "system_events" (
"id" bigserial PRIMARY KEY NOT NULL,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"severity" text NOT NULL,
"code" text NOT NULL,
"source" text NOT NULL,
"message" text NOT NULL,
CONSTRAINT "system_events_severity_check" CHECK ("system_events"."severity" in ('info', 'warning', 'error'))
);
--> statement-breakpoint
CREATE INDEX "system_events_created_at_index" ON "system_events" USING btree ("created_at");
File diff suppressed because it is too large. Load diff
@@ -29,6 +29,13 @@
"when": 1792439261267,
"tag": "0003_users_totp",
"breakpoints": true
},
{
"idx": 4,
"version": "7",
"when": 1792512298128,
"tag": "0004_system_events",
"breakpoints": true
}
]
}
+18
View File
@@ -658,6 +658,24 @@ export const emergencyEvents = pgTable('emergency_events', {
...timestamps,
});
/** System page's event log: what the system noticed (trunks, telephony, backups…), not admin edits. */
export const systemEvents = pgTable(
'system_events',
{
id: bigserial({ mode: 'number' }).primaryKey(),
createdAt: createdAt(),
severity: text().notNull(),
/** Stable id of the kind of event, e.g. trunk.down. */
code: text().notNull(),
source: text().notNull(),
message: text().notNull(),
},
(t) => [
index().on(t.createdAt),
check('system_events_severity_check', sql`${t.severity} in ('info', 'warning', 'error')`),
],
);
export const auditLog = pgTable('audit_log', {
id: bigserial({ mode: 'number' }).primaryKey(),
createdAt: createdAt(),