486628cf0a
C-3 ZTag/SAPID uniqueness enforced from the draft (reservation ledger has no writer); UI/doc claim corrected. C-5 HistorianTagnameDuplicate (owned tags, per cluster, case-insensitive; readOnly exempt). C-8 UX_NodeAcl_PrincipalScope / UX_LdapGroupRoleMapping_Group_Cluster unfiltered (migration with duplicate pre-check) + friendly service/page checks. C-9 RowVersion on ClusterNode/ServerCluster, edit pages use it; node delete removes its NodeDeploymentState rows. C-10 DanglingReference rule; dead PathTooLong/EquipmentUuidImmutable rules + PriorEquipment/Enterprise/Site inputs deleted. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
69 lines
2.4 KiB
Plaintext
69 lines
2.4 KiB
Plaintext
@page "/reservations"
|
|
@attribute [Authorize(Policy = AdminUiPolicies.AuthenticatedRead)]
|
|
@rendermode RenderMode.InteractiveServer
|
|
@using Microsoft.EntityFrameworkCore
|
|
@using ZB.MOM.WW.OtOpcUa.Configuration
|
|
@using ZB.MOM.WW.OtOpcUa.Configuration.Entities
|
|
@inject IDbContextFactory<OtOpcUaConfigDbContext> DbFactory
|
|
|
|
<PageErrorBoundary>
|
|
<PageTitle>External ID reservations · OtOpcUa</PageTitle>
|
|
<div class="page-head">
|
|
<h1>External ID reservations</h1>
|
|
<span class="spacer"></span>
|
|
</div>
|
|
|
|
@if (_rows is null)
|
|
{
|
|
<p>Loading…</p>
|
|
}
|
|
else
|
|
{
|
|
<section class="panel rise mt-3" style="animation-delay:.08s">
|
|
<h2 class="panel-head">@_rows.Count reservation@(_rows.Count == 1 ? "" : "s")</h2>
|
|
@if (_rows.Count == 0)
|
|
{
|
|
<div style="padding:1rem" class="text-muted">No reservations. (Nothing writes this ledger any more: ZTag / SAPID uniqueness is enforced by the deploy gate.)</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="table-wrap" role="region" aria-label="External ID reservations" tabindex="0">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Kind</th>
|
|
<th scope="col">Value</th>
|
|
<th scope="col">Equipment UUID</th>
|
|
<th scope="col">Cluster</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var r in _rows)
|
|
{
|
|
<tr>
|
|
<td><span class="chip chip-idle">@r.Kind</span></td>
|
|
<td><span class="mono">@r.Value</span></td>
|
|
<td><span class="mono small">@r.EquipmentUuid</span></td>
|
|
<td><span class="mono small">@r.ClusterId</span></td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
}
|
|
</section>
|
|
}
|
|
</PageErrorBoundary>
|
|
|
|
@code {
|
|
private List<ExternalIdReservation>? _rows;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
await using var db = await DbFactory.CreateDbContextAsync();
|
|
_rows = await db.ExternalIdReservations.AsNoTracking()
|
|
.OrderBy(r => r.Kind).ThenBy(r => r.Value)
|
|
.ToListAsync();
|
|
}
|
|
}
|