@page "/clusters/{ClusterId}/drivers" @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

Drivers · @ClusterId

New driver
@if (_rows is null) {

Loading…

} else {
Per Q1 of the AdminUI rebuild plan, typed driver editors (Modbus, FOCAS) are deferred. The expanded view below shows raw JSON config. Live editing — including a generic JSON editor and per-driver-type forms when operators ask — lands in a Phase C.2 follow-up.
@_rows.Count driver instance@(_rows.Count == 1 ? "" : "s")
@if (_rows.Count == 0) {
No driver instances for this cluster.
} else { @foreach (var d in _rows) {
@d.DriverInstanceId · @d.Name · @d.DriverType @if (!d.Enabled) { Disabled } ns=@d.NamespaceId
@FormatJson(d.DriverConfig)
@if (!string.IsNullOrWhiteSpace(d.ResilienceConfig)) {
Resilience overrides:
@FormatJson(d.ResilienceConfig)
}
} }
} @code { [Parameter] public string ClusterId { get; set; } = ""; private List? _rows; protected override async Task OnInitializedAsync() { await using var db = await DbFactory.CreateDbContextAsync(); _rows = await db.DriverInstances.AsNoTracking() .Where(d => d.ClusterId == ClusterId) .OrderBy(d => d.DriverInstanceId) .ToListAsync(); } private static string FormatJson(string raw) { if (string.IsNullOrWhiteSpace(raw)) return ""; try { using var doc = System.Text.Json.JsonDocument.Parse(raw); return System.Text.Json.JsonSerializer.Serialize(doc.RootElement, new System.Text.Json.JsonSerializerOptions { WriteIndented = true }); } catch { return raw; } } }