hive-c0re: hive warnings reach the operator as metrics and alerts, not a banner
The dashboard's top-of-page warning banner is gone. The warning registry
stays, because /health/ready, the swarm status view and the OTEL gauges
read it. What it feeds is now alerted on in Grafana:
- hyperhive.hive.warning{kind,level}: one series per raised warning, so an
alert names the cause. Raising a warning also logs one `hive warning
raised` line with the message.
- hyperhive.hive.nix_store.utilization: the used fraction of the nix
store's filesystem, probed in the gauge callback.
- Alerts: hh-hive-degraded on the existing degraded gauge, hh-hive-warning
per kind (disk excluded), hh-host-disk-high at 85% and
hh-host-disk-critical at 95%.
- pending_logins is now a registry warning, refreshed from the container
rescan, so it reaches the per-kind gauge.
Frontend: server_warnings leaves the state snapshot, and the dashboard,
flow and stats pages keep only the sticky chrome wrapper. The shared
hive-warn and WarnBanner components stay, since other views use them.
A module-eval case checks each alert's metric name against the exporter's
source, so a rename on either side fails the build.
This commit is contained in:
parent
013bbe5adc
commit
4dbcf6fa80
35 changed files with 468 additions and 322 deletions
|
|
@ -564,7 +564,7 @@ hive-side-panel .md td {
|
|||
Inverted-gutter layout: the dashboard keeps `<body>` full-bleed
|
||||
and wraps their padded content in a single `.page-content` div that
|
||||
carries the horizontal gutter. Full-width chrome (the tab strip, the
|
||||
server-warnings banner, the footer) then spans edge-to-edge for free,
|
||||
footer) then spans edge-to-edge for free,
|
||||
with no negative-margin breakout hacks. Only matches on pages that opt
|
||||
in by adding the wrapper (index.html); FL0W / ST4TS
|
||||
are full-bleed with their own `.<page>-main` padding. */
|
||||
|
|
@ -573,50 +573,14 @@ hive-side-panel .md td {
|
|||
}
|
||||
|
||||
/* ─── sticky top region ───────────────────────────────────────────────
|
||||
One sticky container per page holding the warning banner above the
|
||||
page chrome (tab bar / page header). common.js (ensureStickyTop)
|
||||
wraps the page's chrome in this on first render and injects the banner
|
||||
as its first child, so the banner + chrome stack in a single sticky
|
||||
context — pinned together — instead of two separate `top:0` stickies
|
||||
colliding (the banner used to overlay the tab bar). */
|
||||
One sticky container per page holding the page chrome (tab bar / page
|
||||
header). common.js (initStickyTop) wraps the chrome in this on load. */
|
||||
.sticky-top {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
/* ─── server warnings banner ──────────────────────────────────────────
|
||||
Generic top-of-page strip, injected as the first child of `.sticky-top`
|
||||
by common.js (renderServerWarnings) on every page. One row per warning;
|
||||
colour comes from the per-warning `level` (warn = amber, crit = red).
|
||||
Stickiness lives on the `.sticky-top` wrapper, not here. The bar spans
|
||||
the full width edge-to-edge; the dashboard is full-bleed at the
|
||||
body level (their 1.5em gutter lives on an inner `.page-content`
|
||||
wrapper), so the banner is full-width for free. */
|
||||
.server-warnings[hidden] {
|
||||
display: none;
|
||||
}
|
||||
.server-warn {
|
||||
text-align: center;
|
||||
padding: 0.4em 1em;
|
||||
font-size: 0.85em;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
/* Tint composited over the opaque elevated-surface grey (not transparent):
|
||||
the bar is `position: sticky`, so a see-through background would let
|
||||
page content scroll through behind it. */
|
||||
.server-warn-warn {
|
||||
color: var(--amber);
|
||||
background: color-mix(in srgb, var(--amber) 16%, var(--bg-elev));
|
||||
border-bottom: 1px solid var(--amber);
|
||||
}
|
||||
.server-warn-crit {
|
||||
color: var(--red);
|
||||
background: color-mix(in srgb, var(--red) 18%, var(--bg-elev));
|
||||
border-bottom: 1px solid var(--red);
|
||||
}
|
||||
|
||||
/* ─── stats table ─────────────────────────────────────────────────
|
||||
Shared right-aligned numeric table. Used by /stats.html (busiest
|
||||
agents) — moved here from dashboard.css when ST4TS became its own
|
||||
|
|
|
|||
Loading…
Reference in a new issue