985e51d25e
Tests · Go / test (push) Successful in 1m58s
Turn the console landing page into an operational dashboard. - new internal/opsstatus: read-only Postgres projection via go-jet — ping + per-status COUNT/GROUP BY on runtime_records, mail_deliveries, notification_routes, and a malformed-intent count; degrades per-probe into Snapshot.Errors rather than failing the page - dashboard renders backend readiness, database health, the three status tables, the malformed count, and any collection errors; falls back to a "monitoring not wired" note when no reader is injected - AdminConsoleHandlers now takes an AdminConsoleDeps struct (Monitor + Ready added) so later stages add service refs without churning the signature Tests: opsstatus store test against a Postgres testcontainer (empty schema + one enqueued delivery); dashboard render tests with a fake reader (with and without monitoring). Docs: ARCHITECTURE 14.1 + FUNCTIONAL 10.2.1 (+ru) describe the dashboard. (Prometheus /metrics exporters were already enabled in dev-deploy in Stage 1.)
72 lines
2.6 KiB
CSS
72 lines
2.6 KiB
CSS
/* Admin console stylesheet. Deliberately small and dependency-free: the
|
|
console is an internal operator tool, not a public surface. */
|
|
:root {
|
|
--bg: #11151c;
|
|
--panel: #1b2230;
|
|
--panel-hi: #232c3d;
|
|
--ink: #e6ebf2;
|
|
--ink-dim: #9aa7ba;
|
|
--line: #2c3850;
|
|
--accent: #5aa9ff;
|
|
--danger: #ff6b6b;
|
|
--ok: #4ecb8d;
|
|
}
|
|
* { box-sizing: border-box; }
|
|
body {
|
|
margin: 0;
|
|
background: var(--bg);
|
|
color: var(--ink);
|
|
font: 15px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
}
|
|
a { color: var(--accent); text-decoration: none; }
|
|
a:hover { text-decoration: underline; }
|
|
.topbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1.5rem;
|
|
padding: 0.6rem 1.2rem;
|
|
background: var(--panel);
|
|
border-bottom: 1px solid var(--line);
|
|
}
|
|
.topbar .brand { font-weight: 700; letter-spacing: 0.04em; }
|
|
.topbar .mainnav { display: flex; gap: 1rem; flex: 1; }
|
|
.topbar .mainnav a.active { color: var(--ink); border-bottom: 2px solid var(--accent); }
|
|
.topbar .who { color: var(--ink-dim); }
|
|
.content { padding: 1.5rem; max-width: 1100px; margin: 0 auto; }
|
|
h1 { font-size: 1.4rem; margin: 0 0 0.4rem; }
|
|
.lede { color: var(--ink-dim); margin-top: 0; }
|
|
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
|
|
.card {
|
|
display: block;
|
|
padding: 1rem 1.2rem;
|
|
background: var(--panel);
|
|
border: 1px solid var(--line);
|
|
border-radius: 8px;
|
|
color: var(--ink);
|
|
}
|
|
.card:hover { background: var(--panel-hi); text-decoration: none; }
|
|
.card h2 { font-size: 1.05rem; margin: 0 0 0.3rem; color: var(--accent); }
|
|
.card p { margin: 0; color: var(--ink-dim); font-size: 0.9rem; }
|
|
|
|
.panel {
|
|
padding: 0.9rem 1.1rem;
|
|
background: var(--panel);
|
|
border: 1px solid var(--line);
|
|
border-radius: 8px;
|
|
margin-bottom: 1rem;
|
|
}
|
|
.panel h2 { font-size: 1rem; margin: 0 0 0.6rem; color: var(--ink); }
|
|
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
|
|
.grid .panel { margin-bottom: 0; }
|
|
.kv { list-style: none; margin: 0; padding: 0; }
|
|
.kv li { padding: 0.15rem 0; color: var(--ink-dim); }
|
|
.counts { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
|
|
.counts td { padding: 0.2rem 0; border-bottom: 1px solid var(--line); color: var(--ink-dim); }
|
|
.counts td.num { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
|
|
.bignum { font-size: 1.6rem; margin: 0; color: var(--ink); }
|
|
.note { color: var(--ink-dim); font-style: italic; margin: 0.2rem 0; }
|
|
.errors { border-color: var(--danger); }
|
|
.errors ul { margin: 0; padding-left: 1.1rem; color: var(--danger); }
|
|
.ok { color: var(--ok); }
|
|
.bad { color: var(--danger); }
|