@page "/reservations" @attribute [Microsoft.AspNetCore.Authorization.Authorize] @rendermode RenderMode.InteractiveServer @using Microsoft.EntityFrameworkCore @using ZB.MOM.WW.OtOpcUa.Configuration @using ZB.MOM.WW.OtOpcUa.Configuration.Entities @inject IDbContextFactory DbFactory

External ID reservations

@if (_rows is null) {

Loading…

} else {
External IDs (ZTag, SAPID) are reserved fleet-wide via this table. Reservations bind a value to an Equipment's UUID so the ID can move with the equipment across cluster reshuffles without colliding with another cluster's equipment.
@_rows.Count reservation@(_rows.Count == 1 ? "" : "s")
@if (_rows.Count == 0) {
No reservations yet.
} else {
@foreach (var r in _rows) { }
Kind Value Equipment UUID Cluster
@r.Kind @r.Value @r.EquipmentUuid @r.ClusterId
}
} @code { private List? _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(); } }