v0.169.0: disk-health card + degradation notification (Lemezek állapota)
Consumes the agent v0.94.0 smart payload (MinAgent floor unchanged; feature-detect by presence). One pure verdict fn agentapi.DiskVerdictFor shared by the dashboard card and the 6h check. Card via a 60s /disks TTL cache (anti-smartctl-storm); unreachable agent -> Nincs adat, page never blocks. disk-health-check (6h) emits disk_health_degraded on a degradation only vs an in-memory baseline (first run silent, recovery/UNKNOWN never notify, multi-attr -> one event). No global banner (deliberate). Pairs with the hub allowlist bump. Tests: verdict table (>=90 red-proof), notifier emit, check first-run-silent (red-proof), degradation-once, recovery-silent, UNKNOWN-excluded, FAILING-critical, nil-smart card, TTL cache.
This commit is contained in:
@@ -110,6 +110,23 @@
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<div class="disk-health-card">
|
||||
<h3>Lemezek állapota</h3>
|
||||
{{if .DiskHealthRows}}
|
||||
<ul class="disk-health-list">
|
||||
{{range .DiskHealthRows}}
|
||||
<li class="disk-health-row">
|
||||
<span class="disk-health-label">{{.Label}}</span>
|
||||
<span class="disk-health-status {{.ChipClass}}">{{.ChipLabel}}</span>
|
||||
{{if .Temp}}<span class="disk-health-temp">{{.Temp}} °C</span>{{end}}
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
{{else}}
|
||||
<p class="form-hint state-text-neutral">Nincs adat</p>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{if .BackupEnabled}}
|
||||
<div class="backup-status-card">
|
||||
<h3><a href="/backups" class="backup-card-link">Biztonsági mentés</a></h3>
|
||||
|
||||
@@ -1552,6 +1552,28 @@ a.stat-card:hover {
|
||||
border: 1px solid var(--line);
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
/* Disk-health card (v0.169.0) — same card grammar as the backup card. */
|
||||
.disk-health-card {
|
||||
background: var(--bg-1);
|
||||
border-radius: var(--radius);
|
||||
padding: 1rem 1.25rem;
|
||||
border: 1px solid var(--line);
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
.disk-health-card h3 { margin-bottom: .75rem; }
|
||||
.disk-health-list { list-style: none; padding: 0; margin: 0; }
|
||||
.disk-health-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: .75rem;
|
||||
padding: .35rem 0;
|
||||
font-size: .85rem;
|
||||
border-top: 1px solid var(--line);
|
||||
}
|
||||
.disk-health-row:first-child { border-top: none; }
|
||||
.disk-health-label { flex: 1; color: var(--text-1); }
|
||||
.disk-health-status { font-weight: 600; }
|
||||
.disk-health-temp { color: var(--text-3); font-variant-numeric: tabular-nums; }
|
||||
.backup-status-card h3 {
|
||||
margin-bottom: .75rem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user