Files
lmxopcua/docs/ui-consistency/ot13-host-controls/canary/Components/Pilot.razor
T
2026-11-14 01:18:22 -05:00

19 lines
916 B
Plaintext

@page "/"
@rendermode InteractiveServer
@implements IDisposable
@inject FixtureState State
<ThemeShell Product="Host controls fixture">
<main class="p-3"><p class="notice">Local synthetic driver health and commands. No device, broker, SQL, deployment or real actor operations.</p>
<output id="ready">@_ready</output><output id="requests">@State.Requests</output><output id="operation">@State.LastOperation</output>
<ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages.Hosts />
</main>
</ThemeShell>
@code {
[SupplyParameterFromQuery(Name="role")]public string? Role {get;set;}
private bool _ready;
protected override void OnInitialized(){State.Role=Role??"Operator";State.Changed+=Changed;}
private void Changed()=>_=InvokeAsync(StateHasChanged);
protected override void OnAfterRender(bool firstRender){if(firstRender){_ready=true;StateHasChanged();}}
public void Dispose()=>State.Changed-=Changed;
}