Standardize remaining runtime page and table grammar

This commit is contained in:
Joseph Doherty
2026-11-13 21:43:15 -05:00
parent cb3400c13c
commit 75ff38103f
47 changed files with 1668 additions and 68 deletions
@@ -13,8 +13,10 @@
@implements IAsyncDisposable
<PageErrorBoundary>
<div class="d-flex justify-content-between align-items-center mb-3">
<h4 class="mb-0">Alarms historian sink</h4>
<PageTitle>Alarms historian sink · OtOpcUa</PageTitle>
<div class="page-head">
<h1>Alarms historian sink</h1>
<span class="spacer"></span>
</div>
<div class="text-muted small mb-3">Polling every @((int)(_interval == TimeSpan.Zero ? PollSeconds : _interval.TotalSeconds)) s.</div>
@@ -41,14 +43,14 @@ else
}
<section class="card-grid rise mt-3" style="animation-delay:.08s">
<div class="metric-card">
<div class="panel-head">Queue</div>
<h2 class="panel-head">Queue</h2>
<div class="kv"><span class="k">Depth</span><span class="v numeric">@_status.QueueDepth</span></div>
<div class="kv"><span class="k">Dead-lettered</span><span class="v numeric">@_status.DeadLetterDepth</span></div>
<div class="kv"><span class="k">Evicted (lifetime)</span><span class="v numeric">@_status.EvictedCount</span></div>
</div>
<div class="metric-card">
<div class="panel-head">Drain state</div>
<h2 class="panel-head">Drain state</h2>
<div class="kv"><span class="k">State</span><span class="v"><span class="@StateChipClass(_status.DrainState)">@_status.DrainState</span></span></div>
<div class="kv"><span class="k">Last drain</span><span class="v">@(_status.LastDrainUtc?.ToString("u") ?? "—")</span></div>
<div class="kv"><span class="k">Last success</span><span class="v">@(_status.LastSuccessUtc?.ToString("u") ?? "—")</span></div>
@@ -16,8 +16,10 @@
@implements IAsyncDisposable
<PageErrorBoundary>
<div class="d-flex justify-content-between align-items-center mb-3">
<h4 class="mb-0">Alerts</h4>
<PageTitle>Alerts · OtOpcUa</PageTitle>
<div class="page-head">
<h1>Alerts</h1>
<span class="spacer"></span>
<div class="d-flex align-items-center gap-2">
<span class="conn-pill" data-state="@(_connected ? "connected" : "disconnected")">
<span class="dot"></span><span>@(_connected ? "live" : "disconnected")</span>
@@ -40,21 +42,21 @@
else
{
<section class="panel rise mt-3" style="animation-delay:.08s">
<div class="panel-head">Recent transitions (@_tail.Items.Count)</div>
<div class="table-wrap">
<h2 class="panel-head">Recent transitions (@_tail.Items.Count)</h2>
<div class="table-wrap" role="region" aria-label="Recent alert transitions" tabindex="0">
<table class="data-table">
<thead>
<tr>
<th>Time</th>
<th>Alarm</th>
<th>Equipment</th>
<th>Kind</th>
<th class="num">Severity</th>
<th>User</th>
<th>Message</th>
<th scope="col">Time</th>
<th scope="col">Alarm</th>
<th scope="col">Equipment</th>
<th scope="col">Kind</th>
<th scope="col" class="num">Severity</th>
<th scope="col">User</th>
<th scope="col">Message</th>
@if (_canOperate)
{
<th>Actions</th>
<th scope="col">Actions</th>
}
</tr>
</thead>
@@ -20,8 +20,10 @@
@implements IDisposable
<PageErrorBoundary>
<div class="d-flex justify-content-between align-items-center mb-3">
<h4 class="mb-0">Node diagnostics</h4>
<PageTitle>Node diagnostics · OtOpcUa</PageTitle>
<div class="page-head">
<h1>Node diagnostics</h1>
<span class="spacer"></span>
<a class="btn btn-sm btn-outline-secondary" href="/fleet">Back to fleet status</a>
</div>
@@ -109,10 +111,10 @@ else
}
<section class="panel rise" style="animation-delay:.08s">
<div class="panel-head">
<h2 class="panel-head">
Drivers
<span class="text-muted small ms-2">as of @_snapshot.AsOfUtc.ToString("u")</span>
</div>
</h2>
@if (_snapshot.Drivers.Count == 0)
{
<div class="p-3 text-muted">
@@ -123,17 +125,17 @@ else
}
else
{
<div class="table-wrap">
<div class="table-wrap" role="region" aria-label="Driver diagnostics" tabindex="0">
<table class="data-table">
<thead>
<tr>
<th>Driver instance</th>
<th>Row id</th>
<th>State</th>
<th class="numeric">Connected devices</th>
<th class="numeric">Faulted devices</th>
<th class="numeric" title="Hosts the driver reports Stopped (e.g. taken off scan) — not counted as faulted">Stopped devices</th>
<th title="When the driver child last published a changed health snapshot (its spawn time until the first)">Last health publish</th>
<th scope="col">Driver instance</th>
<th scope="col">Row id</th>
<th scope="col">State</th>
<th scope="col" class="numeric">Connected devices</th>
<th scope="col" class="numeric">Faulted devices</th>
<th scope="col" class="numeric" title="Hosts the driver reports Stopped (e.g. taken off scan) — not counted as faulted">Stopped devices</th>
<th scope="col" title="When the driver child last published a changed health snapshot (its spawn time until the first)">Last health publish</th>
</tr>
</thead>
<tbody>
@@ -24,8 +24,10 @@
@implements IAsyncDisposable
<PageErrorBoundary>
<div class="d-flex justify-content-between align-items-center mb-3">
<h4 class="mb-0">Cluster hosts</h4>
<PageTitle>Cluster hosts · OtOpcUa</PageTitle>
<div class="page-head">
<h1>Cluster hosts</h1>
<span class="spacer"></span>
</div>
<div class="d-flex align-items-center mb-3 gap-2">
@@ -70,15 +72,15 @@ else
</section>
<section class="panel rise" style="animation-delay:.14s">
<div class="panel-head">Members</div>
<div class="table-wrap">
<h2 class="panel-head">Members</h2>
<div class="table-wrap" role="region" aria-label="Cluster members" tabindex="0">
<table class="data-table">
<thead>
<tr>
<th>Address</th>
<th>Status</th>
<th>Roles</th>
<th>Leader for</th>
<th scope="col">Address</th>
<th scope="col">Status</th>
<th scope="col">Roles</th>
<th scope="col">Leader for</th>
</tr>
</thead>
<tbody>
@@ -139,7 +141,7 @@ else
{
<section class="panel rise mt-3" style="animation-delay:.2s" @key="@($"group-{g.ClusterId}")">
<div class="panel-head">
Driver instances · Cluster <span class="mono">@g.ClusterId</span>
<h2 class="m-0" style="font:inherit">Driver instances · Cluster <span class="mono">@g.ClusterId</span></h2>
<span class="ms-2">
@foreach (var n in g.Nodes)
{
@@ -147,20 +149,20 @@ else
}
</span>
</div>
<div class="table-wrap">
<div class="table-wrap" role="region" aria-label="@($"Driver instances for cluster {g.ClusterId}")" tabindex="0">
<table class="data-table">
<thead>
<tr>
<th>Driver</th>
<th title="The node reporting this row — each node of a redundant pair runs the driver, so a driver has one row per node">Node</th>
<th>Type</th>
<th>Status</th>
<th>Hosts</th>
<th>Tags</th>
<th>Last read</th>
<th>Errors/5 min</th>
<th>Last error</th>
<th></th>
<th scope="col">Driver</th>
<th scope="col" title="The node reporting this row — each node of a redundant pair runs the driver, so a driver has one row per node">Node</th>
<th scope="col">Type</th>
<th scope="col">Status</th>
<th scope="col">Hosts</th>
<th scope="col">Tags</th>
<th scope="col">Last read</th>
<th scope="col">Errors/5 min</th>
<th scope="col">Last error</th>
<th scope="col"><span class="visually-hidden">Actions</span></th>
</tr>
</thead>
<tbody>
@@ -16,10 +16,11 @@
context menus (real create/configure/tag modals arrive in later Batch-2 waves). *@
<PageErrorBoundary>
<PageTitle>Raw</PageTitle>
<PageTitle>Raw · OtOpcUa</PageTitle>
<div class="d-flex justify-content-between align-items-center mb-3">
<h4 class="mb-0">Raw</h4>
<div class="page-head">
<h1>Raw</h1>
<span class="spacer"></span>
<span class="text-muted small">Changes apply on the next deployment.</span>
</div>
@@ -27,7 +28,7 @@
<section class="panel rise" style="animation-delay:.02s">
<div class="panel-head d-flex justify-content-between align-items-center flex-wrap gap-2">
<span>Project tree</span>
<h2 class="m-0" style="font:inherit">Project tree</h2>
</div>
@if (_loading)
@@ -17,8 +17,10 @@
@inject NavigationManager Nav
<PageErrorBoundary>
<div class="d-flex justify-content-between align-items-center mb-3">
<h4 class="mb-0">@(IsNew ? "New script" : "Edit script")</h4>
<PageTitle>Script editor · OtOpcUa</PageTitle>
<div class="page-head">
<h1>@(IsNew ? "New script" : "Edit script")</h1>
<span class="spacer"></span>
<a href="/scripts" class="btn btn-outline-secondary btn-sm">Cancel</a>
</div>
@@ -38,7 +40,7 @@ else
<DataAnnotationsValidator />
<ValidationSummary class="alert alert-danger py-2 px-3" />
<section class="panel rise">
<div class="panel-head">Identity</div>
<h2 class="panel-head">Identity</h2>
<div style="padding:1rem">
<div class="row">
@* ScriptId is system-generated (SC-…) on create, never operator-supplied —
@@ -59,7 +61,7 @@ else
</section>
<section class="panel rise mt-3">
<div class="panel-head">Source</div>
<h2 class="panel-head">Source</h2>
<div style="padding:1rem">
<MonacoEditor @ref="_editor" @bind-Value="_form.SourceCode" Height="420px"
MarkersChanged="OnMarkersChanged" />
@@ -10,8 +10,10 @@
@implements IAsyncDisposable
<PageErrorBoundary>
<PageTitle>Script log · OtOpcUa</PageTitle>
<div class="d-flex flex-wrap gap-2 justify-content-between align-items-center mb-3">
<h4 class="mb-0">Script log</h4>
<h1>Script log</h1>
<span class="spacer"></span>
<div class="d-flex flex-wrap align-items-end gap-2" style="max-width:100%;min-width:0">
<div><label class="form-label small mb-1" for="@(_filterScope + "-level")">Log level</label>
<select id="@(_filterScope + "-level")" class="form-select form-select-sm" style="width:auto" @bind="_levelFilter" @bind:after="RecomputeVisible">
@@ -48,16 +50,16 @@
else
{
<section class="panel rise mt-3" style="animation-delay:.08s">
<div class="panel-head">Showing @_visible.Count of @_tail.Items.Count</div>
<div class="table-wrap">
<h2 class="panel-head">Showing @_visible.Count of @_tail.Items.Count</h2>
<div class="table-wrap" role="region" aria-label="Script log entries" tabindex="0">
<table class="data-table">
<thead>
<tr>
<th>Time</th>
<th>Level</th>
<th>Script</th>
<th>Context</th>
<th>Message</th>
<th scope="col">Time</th>
<th scope="col">Level</th>
<th scope="col">Script</th>
<th scope="col">Context</th>
<th scope="col">Message</th>
</tr>
</thead>
<tbody>
@@ -7,16 +7,17 @@
@inject NavigationManager Nav
<PageErrorBoundary>
<PageTitle>UNS</PageTitle>
<PageTitle>UNS · OtOpcUa</PageTitle>
<div class="d-flex justify-content-between align-items-center mb-3">
<h4 class="mb-0">UNS</h4>
<div class="page-head">
<h1>UNS</h1>
<span class="spacer"></span>
<span class="text-muted small">Changes apply on the next deployment.</span>
</div>
<section class="panel rise" style="animation-delay:.02s">
<div class="panel-head d-flex justify-content-between align-items-center flex-wrap gap-2">
<span>Unified namespace</span>
<h2 class="m-0" style="font:inherit">Unified namespace</h2>
<div class="d-flex align-items-center gap-2 flex-wrap">
<div><label class="form-label small mb-1" for="@_filterId">Filter loaded UNS names</label>
<input id="@_filterId" type="text" class="form-control form-control-sm" style="max-width:240px"