Expose complete diagnostic text through native disclosures

This commit is contained in:
Joseph Doherty
2026-11-13 22:14:57 -05:00
parent 3ef919a71d
commit 78bad3a6c9
63 changed files with 1792 additions and 21 deletions
@@ -56,7 +56,7 @@ else
<div class="kv"><span class="k">Last success</span><span class="v">@(_status.LastSuccessUtc?.ToString("u") ?? "—")</span></div>
@if (!string.IsNullOrWhiteSpace(_status.LastError))
{
<div class="kv"><span class="k">Last error</span><span class="v text-danger small" title="@_status.LastError">@DisplayText.Abbreviate(_status.LastError, 80)</span></div>
<div class="kv"><span class="k">Last error</span><div class="v small"><DiagnosticDetails Summary="@(DisplayText.Abbreviate(_status.LastError, 80))" Text="@_status.LastError" /></div></div>
}
</div>
</section>
@@ -54,11 +54,8 @@ else
<td>@a.Principal</td>
<td><span class="chip chip-idle">@a.EventType</span></td>
<td><span class="mono small">@(a.NodeId ?? "—")</span></td>
<td><span class="mono small">@(a.CorrelationId?.ToString("N")[..8] ?? "—")</span></td>
<td class="text-muted small" title="@(a.DetailsJson ?? "")"
style="max-width:400px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">
@(a.DetailsJson ?? "")
</td>
<td><span class="mono small">@(a.CorrelationId?.ToString("D") ?? "—")</span></td>
<td class="small"><DiagnosticDetails Summary="Audit details" Text="@a.DetailsJson" /></td>
</tr>
}
</tbody>
@@ -72,7 +72,10 @@
<th scope="row"><code>@Short(d.DeploymentId)</code></th>
<td><code>@DisplayText.Abbreviate(d.RevisionHash, 12)</code></td>
@* #601: Sealed + a reason = sealed with a degraded address-space apply on some node(s). *@
<td title="@(d.FailureReason ?? "")">@(d.Status == DeploymentStatus.Sealed && !string.IsNullOrEmpty(d.FailureReason) ? "Sealed (degraded)" : d.Status.ToString())</td>
<td>
@(d.Status == DeploymentStatus.Sealed && !string.IsNullOrEmpty(d.FailureReason) ? "Sealed (degraded)" : d.Status.ToString())
@if (!string.IsNullOrEmpty(d.FailureReason)) { <DiagnosticDetails Summary="Failure reason" Text="@d.FailureReason" /> }
</td>
<td>@d.CreatedBy</td>
<td>@d.CreatedAtUtc.ToString("u")</td>
<td>@(d.SealedAtUtc?.ToString("u") ?? "—")</td>
@@ -101,7 +101,7 @@ else
<td><span class="chip @StatusChipClass(r.Status, r.FailureReason)">@StatusLabel(r.Status, r.FailureReason)</span></td>
<td>@(r.AppliedAtUtc?.ToString("u") ?? "—")</td>
<td>@(r.StartedAtUtc?.ToString("u") ?? "—")</td>
<td title="@(r.FailureReason ?? "")">@(string.IsNullOrEmpty(r.FailureReason) ? "" : DisplayText.Abbreviate(r.FailureReason, 80))</td>
<td>@if (!string.IsNullOrEmpty(r.FailureReason)) { <DiagnosticDetails Summary="@(DisplayText.Abbreviate(r.FailureReason, 80))" Text="@r.FailureReason" /> }</td>
</tr>
}
</tbody>
@@ -11,10 +11,10 @@
<PageErrorBoundary>
<PageTitle>Script log · OtOpcUa</PageTitle>
<div class="d-flex flex-wrap gap-2 justify-content-between align-items-center mb-3">
<div class="page-head">
<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 class="ot-toolbar 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">
<option value="">All levels</option>
@@ -66,7 +66,7 @@ else
@foreach (var e in _visible)
{
<tr>
<td><span class="mono small">@e.TimestampUtc.ToString("HH:mm:ss.fff")</span></td>
<td><span class="mono small">@e.TimestampUtc.ToString("yyyy-MM-dd HH:mm:ss.fff 'UTC'")</span></td>
<td><span class="chip @LevelChipClass(e.Level)">@e.Level</span></td>
<td><span class="mono small">@e.ScriptId</span></td>
<td class="text-muted small">
@@ -74,7 +74,7 @@ else
@if (!string.IsNullOrEmpty(e.AlarmId)) { <span class="ms-1">alarm=@e.AlarmId</span> }
@if (!string.IsNullOrEmpty(e.EquipmentId)) { <span class="ms-1">eq=@e.EquipmentId</span> }
</td>
<td title="@e.Message"><span class="mono small">@DisplayText.Abbreviate(e.Message, 120)</span></td>
<td><DiagnosticDetails Summary="@(DisplayText.Abbreviate(e.Message, 120))" Text="@e.Message" /></td>
</tr>
}
</tbody>