merge: ui(density) Task 1 — truncation sweep (Abbreviate + title on unbounded text)

This commit is contained in:
Joseph Doherty
2026-08-10 18:01:39 -04:00
19 changed files with 41 additions and 32 deletions
@@ -60,7 +60,7 @@
{
@foreach (var g in ldapGroups)
{
<span class="chip me-1 mono">@g</span>
<span class="chip me-1 mono" title="@g">@DisplayText.Abbreviate(g, 40)</span>
}
}
</span>
@@ -38,7 +38,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">@_status.LastError</span></div>
<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>
</section>
@@ -81,7 +81,7 @@ else
<td><span class="chip @KindChipClass(e.TransitionKind)">@e.TransitionKind</span></td>
<td class="num">@e.Severity</td>
<td>@e.User</td>
<td>@e.Message</td>
<td title="@e.Message">@DisplayText.Abbreviate(e.Message, 80)</td>
@if (_canOperate)
{
@* DriverOperator-gated Acknowledge / Shelve / Unshelve. Each routes through
@@ -74,8 +74,8 @@ else
@foreach (var c in store.Certificates)
{
<tr>
<td><span class="mono small">@c.Subject</span></td>
<td><span class="mono small">@c.Issuer</span></td>
<td title="@c.Subject"><span class="mono small">@DisplayText.Abbreviate(c.Subject, 48)</span></td>
<td title="@c.Issuer"><span class="mono small">@DisplayText.Abbreviate(c.Issuer, 48)</span></td>
<td><span class="mono small">@DisplayText.Abbreviate(c.Thumbprint, 16)</span></td>
<td>@c.NotBefore.ToString("u")</td>
<td>@c.NotAfter.ToString("u")</td>
@@ -85,7 +85,7 @@ else
<span class="chip chip-idle me-1">@perm</span>
}
</td>
<td class="text-muted small">@(a.Notes ?? "")</td>
<td class="text-muted small" title="@(a.Notes ?? "")">@(string.IsNullOrEmpty(a.Notes) ? "" : DisplayText.Abbreviate(a.Notes, 60))</td>
<td><a href="/clusters/@ClusterId/acls/@a.NodeAclId" class="btn btn-sm btn-outline-primary">Edit</a></td>
</tr>
}
@@ -52,7 +52,8 @@ else
<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" style="max-width:400px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">
<td class="text-muted small" title="@(a.DetailsJson ?? "")"
style="max-width:400px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">
@(a.DetailsJson ?? "")
</td>
</tr>
@@ -46,7 +46,7 @@ else
}
@if (!string.IsNullOrWhiteSpace(_cluster.Notes))
{
<div class="kv"><span class="k">Notes</span><span class="v">@_cluster.Notes</span></div>
<div class="kv"><span class="k">Notes</span><span class="v" title="@_cluster.Notes">@DisplayText.Abbreviate(_cluster.Notes, 120)</span></div>
}
</div>
@@ -97,9 +97,9 @@ else
{
<tr>
<td><span class="mono">@n.NodeId</span></td>
<td>@n.Host</td>
<td title="@n.Host">@DisplayText.Abbreviate(n.Host, 30)</td>
<td class="num">@n.OpcUaPort</td>
<td><span class="mono small">@n.ApplicationUri</span></td>
<td title="@n.ApplicationUri"><span class="mono small">@DisplayText.Abbreviate(n.ApplicationUri, 40)</span></td>
<td class="num">@n.ServiceLevelBase</td>
<td><a href="/clusters/@ClusterId/nodes/@n.NodeId" class="btn btn-sm btn-outline-primary">Edit</a></td>
</tr>
@@ -125,7 +125,7 @@ else
{
<tr>
<td><span class="mono">@n.NodeId</span></td>
<td><span class="mono small">@n.ApplicationUri</span></td>
<td title="@n.ApplicationUri"><span class="mono small">@DisplayText.Abbreviate(n.ApplicationUri, 40)</span></td>
<td class="num">@n.ServiceLevelBase</td>
<td class="text-muted small">
@if (n.ServiceLevelBase >= 200) { <text>Primary preference</text> }
@@ -89,7 +89,7 @@ else
<td><span class="chip @StatusChipClass(r.Status)">@StatusLabel(r.Status)</span></td>
<td>@(r.AppliedAtUtc?.ToString("u") ?? "—")</td>
<td>@(r.StartedAtUtc?.ToString("u") ?? "—")</td>
<td>@(r.FailureReason ?? "")</td>
<td title="@(r.FailureReason ?? "")">@(string.IsNullOrEmpty(r.FailureReason) ? "" : DisplayText.Abbreviate(r.FailureReason, 80))</td>
</tr>
}
</tbody>
@@ -21,7 +21,7 @@
<div class="kv"><span class="k">Enabled</span><span class="v">@(_options.Enabled ? "yes" : "no")</span></div>
<div class="kv"><span class="k">Server</span><span class="v mono">@_options.Server:@_options.Port</span></div>
<div class="kv"><span class="k">Transport</span><span class="v">@_options.Transport</span></div>
<div class="kv"><span class="k">SearchBase</span><span class="v mono small">@_options.SearchBase</span></div>
<div class="kv"><span class="k">SearchBase</span><span class="v mono small" title="@_options.SearchBase">@DisplayText.Abbreviate(_options.SearchBase, 48)</span></div>
@if (_options.Transport == ZB.MOM.WW.Auth.Abstractions.Ldap.LdapTransport.None && _options.AllowInsecure)
{
<div class="kv"><span class="k">Warning</span><span class="v"><span class="chip chip-alert">Plaintext credentials over LDAP — dev mode only</span></span></div>
@@ -62,7 +62,7 @@
@foreach (var r in _rows)
{
<tr>
<td><span class="mono">@r.LdapGroup</span></td>
<td title="@r.LdapGroup"><span class="mono">@DisplayText.Abbreviate(r.LdapGroup, 48)</span></td>
<td><span class="chip chip-idle">@r.Role</span></td>
<td><button class="btn btn-sm btn-outline-danger" @onclick="() => DeleteAsync(r.Id)" disabled="@_busy">Delete</button></td>
</tr>
@@ -93,7 +93,7 @@
@foreach (var kvp in _options.GroupToRole.OrderBy(k => k.Key, StringComparer.OrdinalIgnoreCase))
{
<tr>
<td><span class="mono">@kvp.Key</span></td>
<td title="@kvp.Key"><span class="mono">@DisplayText.Abbreviate(kvp.Key, 48)</span></td>
<td><span class="chip chip-idle">@kvp.Value</span></td>
</tr>
}
@@ -68,7 +68,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><span class="mono small">@e.Message</span></td>
<td title="@e.Message"><span class="mono small">@DisplayText.Abbreviate(e.Message, 120)</span></td>
</tr>
}
</tbody>