Preserve readable contrast for stale driver status

This commit is contained in:
Joseph Doherty
2026-11-14 01:40:16 -05:00
parent e411f89f6b
commit ba8017ae97
16 changed files with 1015 additions and 6 deletions
@@ -25,7 +25,6 @@
@foreach (var n in nodes)
{
<span @key="@($"head-{n.Key}")" class="chip @ChipClass(n.Snapshot.State)"
style="@(n.IsStale(now, StaleAfter) ? "opacity:0.5;" : "")"
title="@(n.NodeId is null ? "Reported by a node that predates per-node health (#847)" : $"Reported by {n.NodeId}")">@(nodes.Count > 1 || n.NodeId is not null ? $"{n.Label}: " : "")@n.Snapshot.State</span>
}
}
@@ -57,8 +56,7 @@
@foreach (var n in nodes)
{
var snap = n.Snapshot;
<div @key="@($"node-{n.Key}")" class="@(n == nodes[0] ? "" : "mt-3 pt-2 border-top")"
style="@(n.IsStale(now, StaleAfter) ? "opacity:0.5;" : "")">
<div @key="@($"node-{n.Key}")" class="@(n == nodes[0] ? "" : "mt-3 pt-2 border-top")">
<div class="d-flex flex-wrap gap-3 align-items-baseline">
<span class="mono" style="font-weight:600"
title="@(n.NodeId is null ? "Reported by a node that predates per-node health (#847)" : "Reporting node")">@n.Label</span>
@@ -118,7 +116,7 @@
@foreach (var host in active)
{
var stale = IsStale(host);
<div class="d-flex flex-wrap gap-2 align-items-baseline mt-1" style="@(stale ? "opacity:0.5;" : "")">
<div class="d-flex flex-wrap gap-2 align-items-baseline mt-1">
<span style="color:var(--ink-soft); font-size:0.85rem"><strong>@host.HostName</strong></span>
@if (host.BreakerOpen)
{
@@ -218,7 +216,7 @@
[Parameter] public EventCallback<bool> BusyChanged { get; set; }
// One entry per reporting node (lmxopcua#851), recreated only when the bound driver context changes.
// Staleness is per node: a node that stops publishing dims on its own while its peer stays live.
// Staleness is per node: a node that stops publishing receives its own explicit stale label.
private DriverStatusByNode? _byNode;
private static readonly TimeSpan StaleAfter = TimeSpan.FromSeconds(30);