@page "/scripts" @attribute [Authorize(Policy = AdminUiPolicies.ConfigEditor)] @rendermode RenderMode.InteractiveServer @using Microsoft.EntityFrameworkCore @using ZB.MOM.WW.OtOpcUa.Configuration @using ZB.MOM.WW.OtOpcUa.Configuration.Entities @inject IDbContextFactory DbFactory

Scripts

New script
@if (_rows is null) {

Loading…

} else {
@_rows.Count script@(_rows.Count == 1 ? "" : "s")
@if (_rows.Count == 0) {
No scripts defined.
} else { @foreach (var s in _rows) { }
Script
@(string.IsNullOrWhiteSpace(s.Name) ? s.ScriptId : s.Name) @s.Language
@s.ScriptId · hash=@DisplayText.Abbreviate(s.SourceHash, 12)
Edit
}
} @* The dialog's EXISTENCE is gated on the held id (operator intent); the resolve drives only its CONTENT. Gating existence on FindSourceScript() would make the modal a function of _rows, and any render where the row is momentarily unresolvable (a future reload/poll setting _rows null or replacing the list) would unmount the subtree and dispose the Close handler's binding id — a click already in flight then throws GetRequiredEventBindingEntry. Latent today (_rows is written once, in OnInitializedAsync) but the shape bit ScadaBridge live the moment a refresh landed. *@ @if (_sourceScriptId is not null) { var src = FindSourceScript(); }
@code { private List