Standardize cluster anatomy and gate authoring destinations

This commit is contained in:
Joseph Doherty
2026-11-13 21:43:30 -05:00
parent 78a39a1095
commit 1fe4dbf51c
24 changed files with 1632 additions and 74 deletions
@@ -8,12 +8,15 @@
@inject NavigationManager Nav
<PageErrorBoundary>
<PageTitle>Cluster overview · OtOpcUa</PageTitle>
@if (!_loaded)
{
<div class="page-head"><h1>Cluster overview</h1></div>
<p>Loading…</p>
}
else if (_cluster is null)
{
<div class="page-head"><h1>Cluster overview</h1></div>
<section class="panel notice rise" style="animation-delay:.02s">
Cluster <span class="mono">@ClusterId</span> was not found.
<a class="ms-2" href="/clusters">Back to list</a>.
@@ -21,23 +24,26 @@ else if (_cluster is null)
}
else
{
<div class="d-flex justify-content-between align-items-center mb-3">
<div class="page-head">
<div>
<h4 class="mb-0">@_cluster.Name</h4>
<h1>@_cluster.Name</h1>
<span class="mono text-muted">@_cluster.ClusterId</span>
@if (!_cluster.Enabled) { <span class="chip chip-idle ms-2">Disabled</span> }
</div>
<div class="btn-group btn-group-sm" role="group">
<a href="/clusters/@ClusterId/edit" class="btn btn-outline-secondary btn-sm">Edit cluster</a>
<a href="/deployments" class="btn btn-outline-primary btn-sm">Deployments</a>
</div>
<span class="spacer"></span>
<AuthorizeView Policy="@AdminUiPolicies.ConfigEditor">
<div class="btn-group btn-group-sm" role="group" aria-label="Cluster authoring actions">
<a href="/clusters/@ClusterId/edit" class="btn btn-outline-secondary btn-sm">Edit cluster</a>
<a href="/deployments" class="btn btn-outline-primary btn-sm">Deployments</a>
</div>
</AuthorizeView>
</div>
<ClusterNav ClusterId="@ClusterId" ActiveTab="overview" />
<section class="card-grid rise" style="animation-delay:.08s">
<div class="metric-card">
<div class="panel-head">Cluster details</div>
<h2 class="panel-head">Cluster details</h2>
<div class="kv"><span class="k">Enterprise / Site</span><span class="v">@_cluster.Enterprise / @_cluster.Site</span></div>
<div class="kv"><span class="k">Redundancy</span><span class="v">@_cluster.RedundancyMode (@_cluster.NodeCount node@(_cluster.NodeCount == 1 ? "" : "s"))</span></div>
<div class="kv"><span class="k">Created</span><span class="v">@_cluster.CreatedAt.ToString("u") by @_cluster.CreatedBy</span></div>
@@ -52,7 +58,7 @@ else
</div>
<div class="metric-card">
<div class="panel-head">Last deployment</div>
<h2 class="panel-head">Last deployment</h2>
@if (_lastDeployment is null)
{
<div class="kv"><span class="k">Status</span><span class="v text-muted">none — cluster has never been deployed</span></div>
@@ -72,8 +78,10 @@ else
<section class="panel rise mt-3" style="animation-delay:.14s">
<div class="panel-head d-flex align-items-center">
<span>Nodes</span>
<a href="/clusters/@ClusterId/nodes/new" class="btn btn-sm btn-outline-primary ms-auto">New node</a>
<h2 class="m-0" style="font:inherit">Nodes</h2>
<AuthorizeView Policy="@AdminUiPolicies.ConfigEditor">
<a href="/clusters/@ClusterId/nodes/new" class="btn btn-sm btn-outline-primary ms-auto">New node</a>
</AuthorizeView>
</div>
@if (_nodes is null || _nodes.Count == 0)
{
@@ -81,16 +89,18 @@ else
}
else
{
<div class="table-wrap">
<div class="table-wrap" role="region" aria-label="Cluster nodes" tabindex="0">
<table class="data-table">
<thead>
<tr>
<th>Node ID</th>
<th>Host</th>
<th>OPC UA port</th>
<th>ApplicationUri</th>
<th class="num">ServiceLevel base</th>
<th></th>
<th scope="col">Node ID</th>
<th scope="col">Host</th>
<th scope="col">OPC UA port</th>
<th scope="col">ApplicationUri</th>
<th scope="col" class="num">ServiceLevel base</th>
<AuthorizeView Policy="@AdminUiPolicies.ConfigEditor">
<th scope="col"><span class="visually-hidden">Actions</span></th>
</AuthorizeView>
</tr>
</thead>
<tbody>
@@ -102,7 +112,9 @@ else
<td class="num">@n.OpcUaPort</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>
<AuthorizeView Policy="@AdminUiPolicies.ConfigEditor">
<td><a href="/clusters/@ClusterId/nodes/@n.NodeId" class="btn btn-sm btn-outline-primary">Edit</a></td>
</AuthorizeView>
</tr>
}
</tbody>