test(ui): retain OtOpcUa component canaries and owned SQL proof
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
@page "/deployment-pilot"
|
||||
@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout
|
||||
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages
|
||||
@inject FixtureDeploymentState State
|
||||
@inject FixtureDbReadControl Reads
|
||||
<p class="notice">Local deployment-feedback fixture · synthetic Administrator, memory-only records and fabricated replies. No configuration is sent to any actor/fleet.</p>
|
||||
@if(_ready)
|
||||
{
|
||||
<div class="d-flex flex-wrap gap-2 mb-3">
|
||||
<button id="fixture-observe" type="button" @onclick="() => _interactive=true">Read local fixture status</button>
|
||||
<output id="fixture-interactive-state">@(_interactive ? "ready" : "waiting")</output>
|
||||
<button id="fixture-seal" type="button" @onclick="State.SealAsync">Mark synthetic application sealed</button>
|
||||
<button id="fixture-fail-read" type="button" @onclick="() => Reads.FailReads=true">Fail synthetic history reads</button>
|
||||
<button id="fixture-restore-read" type="button" @onclick="() => Reads.FailReads=false">Restore synthetic history reads</button>
|
||||
</div>
|
||||
<output id="fixture-request-count">@State.Requests</output>
|
||||
<Deployments />
|
||||
}
|
||||
@code {
|
||||
[SupplyParameterFromQuery(Name="sample")]public string? Sample{get;set;}
|
||||
[SupplyParameterFromQuery(Name="run")]public string? Run{get;set;}
|
||||
private bool _ready,_interactive;
|
||||
protected override async Task OnInitializedAsync()
|
||||
{State.Mode=Sample??"accept";await State.ResetAsync(Run??Sample??"default",Sample=="initial-error");_ready=true;}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
@page "/diagnostic-pilot"
|
||||
@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout
|
||||
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages
|
||||
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages.Clusters
|
||||
@using ZB.MOM.WW.OtOpcUa.AdminUI.Hubs
|
||||
@using ZB.MOM.WW.OtOpcUa.Commons.Messages.Logging
|
||||
@inject IInProcessBroadcaster<ScriptLogEntry> Feed
|
||||
<p class="notice">Local diagnostic component fixture · synthetic errors, no fleet/database connection.</p>
|
||||
@switch (Sample)
|
||||
{
|
||||
case "historian": <AlarmsHistorian /> break;
|
||||
case "fleet": <Fleet /> break;
|
||||
case "deployments": <Deployments /> break;
|
||||
case "audit": <ClusterAudit ClusterId="fixture-cluster" /> break;
|
||||
case "log":
|
||||
<button id="publish-diagnostic" type="button" @onclick="Publish">Emit synthetic local log</button>
|
||||
<ScriptLog />
|
||||
break;
|
||||
default:
|
||||
<h1>Diagnostic disclosure verification</h1>
|
||||
<DiagnosticDetails Summary="Synthetic failure reason" Text="@Diagnostic" />
|
||||
<DiagnosticDetails Summary="Missing detail" />
|
||||
break;
|
||||
}
|
||||
@code {
|
||||
[SupplyParameterFromQuery(Name="sample")] public string? Sample { get; set; }
|
||||
private static string Diagnostic => "Synthetic local failure <script>ignored()</script> " + new string('x',5000) + " END-DIAGNOSTIC";
|
||||
private void Publish() => Feed.Publish(new ScriptLogEntry("fixture-script","Error",Diagnostic,DateTime.UtcNow,null,null,null));
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
@page "/driver-diagnostic-pilot"
|
||||
@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout
|
||||
@implements IDisposable
|
||||
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Drivers
|
||||
@using ZB.MOM.WW.OtOpcUa.Commons.Messages.Drivers
|
||||
@inject FaultableFixtureStatusStore Store
|
||||
<h1>Local driver diagnostic verification</h1>
|
||||
<p class="notice">Synthetic Administrator fixture · read-only local snapshots and fabricated failed reconnect reply; no actor/fleet operations.</p>
|
||||
<DriverStatusPanel DriverInstanceId="driver-diagnostic-local" ClusterId="fixture-cluster" />
|
||||
@code {
|
||||
[SupplyParameterFromQuery(Name="sample")] public string? Sample { get; set; }
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
Store.ReadFailure = Sample=="read-error";
|
||||
Store.Upsert(new DriverHealthChanged("fixture-cluster","driver-diagnostic-local","Faulted",null,FixtureDiagnostic.Text,1,DateTime.UtcNow,ReportingNodeId:"fixture-node"));
|
||||
}
|
||||
public void Dispose() => Store.ReadFailure=false;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
@page "/editor-pilot"
|
||||
@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout
|
||||
<h1>Local editor name verification</h1>
|
||||
<p>Actual Monaco component/assets. Static synthetic code; diagnostics return an empty local fixture projection. No script execution or real analysis service.</p>
|
||||
<MonacoEditor @ref="_editor" Value="return 1;" Language="csharp" EquipmentId="equipment-local" AriaLabel="@_label" ShowToolbar="false" />
|
||||
<button id="rename-editor" class="btn btn-outline-secondary" @onclick="Rename">Rename local editor</button>
|
||||
<button id="read-editor" class="btn btn-outline-secondary" @onclick="Read">Read local model</button>
|
||||
<output id="editor-read">@_read</output>
|
||||
@code {
|
||||
private MonacoEditor? _editor;
|
||||
private string _label = "Calculation script source";
|
||||
private string? _read;
|
||||
private void Rename() => _label = "Updated calculation script source";
|
||||
private async Task Read() { var result = await _editor!.GetValueAsync(); _read = result.Error ?? result.Value; }
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
@page "/final-grammar-pilot"
|
||||
@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout
|
||||
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages
|
||||
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages.Clusters
|
||||
<p class="notice">Actual components · synthetic local read adapters. No fleet, directory, certificate-store, secret-value or configuration mutations are exercised.</p>
|
||||
@switch(Sample)
|
||||
{
|
||||
case "account":<Account />break;
|
||||
case "api-keys":<ApiKeys />break;
|
||||
case "certificates":<Certificates />break;
|
||||
case "role-grants":<RoleGrants />break;
|
||||
case "reservations":<Reservations />break;
|
||||
case "secrets":<SecretsAdmin />break;
|
||||
case "clusters":<ClustersList />break;
|
||||
case "overview":<ClusterOverview ClusterId="fixture-cluster" />break;
|
||||
case "cluster-edit":<ClusterEdit ClusterId="fixture-cluster" />break;
|
||||
case "cluster-new":<NewCluster />break;
|
||||
case "cluster-acls":<ClusterAcls ClusterId="fixture-cluster" />break;
|
||||
case "acl-new":<AclEdit ClusterId="fixture-cluster" />break;
|
||||
case "cluster-audit":<ClusterAudit ClusterId="fixture-cluster" />break;
|
||||
case "cluster-redundancy":<ClusterRedundancy ClusterId="fixture-cluster" />break;
|
||||
case "node-edit":<NodeEdit ClusterId="fixture-cluster" NodeId="fixture-node" />break;
|
||||
case "acl-edit":<AclEdit ClusterId="fixture-cluster" NodeAclId="fixture-acl" />break;
|
||||
case "namespace-edit":<NamespaceEdit ClusterId="fixture-cluster" NamespaceId="fixture-retired" />break;
|
||||
case "node-new":<NodeEdit ClusterId="fixture-cluster" />break;
|
||||
case "namespaces":<ClusterNamespaces ClusterId="fixture-cluster" />break;
|
||||
case "namespace-new":<NamespaceEdit ClusterId="fixture-cluster" />break;
|
||||
case "home":<Home />break;
|
||||
}
|
||||
@code{[SupplyParameterFromQuery] public string? Sample{get;set;}}
|
||||
@@ -0,0 +1,24 @@
|
||||
@page "/grammar-pilot"
|
||||
@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout
|
||||
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages
|
||||
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages.Uns
|
||||
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages.Raw
|
||||
<p class="notice">Local component fixture · synthetic data; no fleet or database connection. Only explicitly mapped synthetic operations exist; unlisted operations reject calls.</p>
|
||||
@switch (Sample)
|
||||
{
|
||||
case "hosts": <Hosts /> break;
|
||||
case "alerts": <Alerts /> break;
|
||||
case "script-log": <ScriptLog /> break;
|
||||
case "script-edit": <ScriptEdit /> break;
|
||||
case "uns": <GlobalUns /> break;
|
||||
case "raw": <GlobalRaw /> break;
|
||||
case "diagnostics": <FleetDiagnostics /> break;
|
||||
case "historian": <AlarmsHistorian /> break;
|
||||
case "fleet": <Fleet /> break;
|
||||
case "deployments": <Deployments /> break;
|
||||
case "scripts": <Scripts /> break;
|
||||
case "equipment": <EquipmentPage /> break;
|
||||
}
|
||||
@code {
|
||||
[SupplyParameterFromQuery(Name="sample")] public string? Sample { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
@page "/live-tail-pilot"
|
||||
@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout
|
||||
@using ZB.MOM.WW.OtOpcUa.AdminUI.Hubs
|
||||
@using ZB.MOM.WW.OtOpcUa.Commons.Messages.Logging
|
||||
@using ZB.MOM.WW.OtOpcUa.Commons.Messages.Alerts
|
||||
@inject IInProcessBroadcaster<ScriptLogEntry> Logs
|
||||
@inject IInProcessBroadcaster<AlarmTransitionEvent> Alarms
|
||||
@inject ZB.MOM.WW.OtOpcUa.Commons.Interfaces.IAdminOperationsClient Operations
|
||||
<p class="notice">Synthetic local live-tail feed. Buttons publish fabricated in-process display events only; they do not acknowledge, shelve or change fleet state.</p>
|
||||
<div class="d-flex flex-wrap gap-2"><button id="fixture-emit-one" type="button" @onclick="()=>Publish(1)">Publish local sample</button><button id="fixture-emit-burst" type="button" @onclick="PublishBurst">Publish local bounded burst</button><button id="fixture-disconnect" type="button" @onclick="()=>Connect(false)">Disconnect local feed</button><button id="fixture-connect" type="button" @onclick="()=>Connect(true)">Connect local feed</button></div>
|
||||
<button id="fixture-alarm-pending" type="button" @onclick="Hold">Hold fake acknowledgement</button>
|
||||
<button id="fixture-alarm-failure" type="button" @onclick="Fail">Fail fake acknowledgement</button>
|
||||
<button id="fixture-alarm-complete" type="button" @onclick="Complete">Complete fake acknowledgement</button>
|
||||
<button id="fixture-alarm-observe" type="button" @onclick="ObserveCommands">Observe fake commands</button><output id="fixture-alarm-count">@_commands</output><output id="fixture-alarm-until">@_until</output>
|
||||
@if(Sample=="alerts"){<ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages.Alerts />}
|
||||
else {<ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages.ScriptLog />}
|
||||
@code {
|
||||
[SupplyParameterFromQuery]public string? Sample{get;set;}
|
||||
private int _sequence,_commands;private string? _until;
|
||||
private void Hold()=>SetMode("pending");private void Fail()=>SetMode("failure");
|
||||
private void SetMode(string mode)=>((SyntheticOperationsFixture)(object)Operations).AlarmMode=mode;
|
||||
private void Complete()=>((SyntheticOperationsFixture)(object)Operations).PendingAlarm?.TrySetResult(new(true,null,new(Guid.Empty)));
|
||||
private void ObserveCommands(){var f=(SyntheticOperationsFixture)(object)Operations;_commands=f.AlarmRequests;_until=f.LastUnshelveAtUtc?.ToString("O");}
|
||||
protected override void OnInitialized(){Connect(true);((SyntheticOperationsFixture)(object)Operations).ResetAlarmRequests();}
|
||||
private void PublishBurst()=>Publish(Sample=="alerts"?250:600);
|
||||
private void Connect(bool value){Logs.SetConnected(value);Alarms.SetConnected(value);}
|
||||
private void Publish(int count)
|
||||
{
|
||||
for(var i=0;i<count;i++)
|
||||
{
|
||||
var text="Local sample "+(++_sequence);
|
||||
if(Sample=="alerts")Alarms.Publish(new("fixture-alarm","Fixture/Press","Local alarm","Activated",500,text,"fixture",DateTime.UtcNow));
|
||||
else Logs.Publish(new("fixture-script","Information",text,DateTime.UtcNow,null,null,null));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
@page "/"
|
||||
@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout
|
||||
<h1>Local OtOpcUa UI verification</h1>
|
||||
<p>Actual AdminUI components with synthetic local state. No database, fleet, browse session, protocol or write service is connected.</p>
|
||||
@if (Sample == "log") { <ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages.ScriptLog /> }
|
||||
else if (Sample == "uns") { <ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages.Uns.GlobalUns /> }
|
||||
else
|
||||
{
|
||||
<section id="standalone"><h2 class="h5">Standalone calculation form</h2><CalculationDriverForm /></section>
|
||||
<section id="scoped"><h2 class="h5">Repeated form associations</h2>
|
||||
<CascadingValue Value="_editContext"><CalculationDriverForm /><CalculationDriverForm /></CascadingValue></section>
|
||||
<section><h2 class="h5">Synthetic UNS nodes</h2><UnsTree Roots="_roots" OnToggleExpand="Toggle" OnEdit="Edit" OnDelete="Edit" /></section>
|
||||
<button id="open-confirm" class="btn btn-primary" @onclick="() => _confirmVisible=true">Open synthetic confirmation</button>
|
||||
<button id="open-driver" class="btn btn-outline-secondary" @onclick="() => _driverVisible=true">Open local calculation driver</button>
|
||||
<button id="open-two" class="btn btn-outline-secondary" @onclick="() => { _confirmVisible=true; _secondVisible=true; }">Attempt two local overlays</button>
|
||||
<button id="show-toasts" class="btn btn-outline-secondary" @onclick="ShowToasts">Show local toasts</button>
|
||||
<ToastNotification @ref="_toast" />
|
||||
<output id="local-outcome">@_outcome</output>
|
||||
<RawConfirmDialog @bind-Visible="_confirmVisible" Title="Delete synthetic driver" Message="Local test only. No service writes occur." OnConfirm="LocalSlowConfirm" />
|
||||
<RawConfirmDialog @bind-Visible="_secondVisible" Title="Second synthetic dialog" Message="Rejected while another overlay is active." />
|
||||
<DriverConfigModal @bind-Visible="_driverVisible" DriverType="Calculation" ClusterId="synthetic" />
|
||||
|
||||
}
|
||||
@code {
|
||||
[SupplyParameterFromQuery] public string? Sample { get; set; }
|
||||
private ToastNotification? _toast;
|
||||
private bool _secondVisible;
|
||||
private void ShowToasts() { _toast!.ShowInfo("Synthetic local information", "Local information", 60000); _toast.ShowWarning("Synthetic local warning", "Local warning", 60000); }
|
||||
private readonly EditContext _editContext = new(new object());
|
||||
private bool _confirmVisible, _driverVisible;
|
||||
private string _outcome = "No local action";
|
||||
private readonly List<UnsNode> _roots = [new() { Kind=UnsNodeKind.Area, Key="area:local", DisplayName="Synthetic area", HasLazyChildren=true }];
|
||||
private void Toggle(UnsNode node) => node.Expanded = !node.Expanded;
|
||||
private void Edit(UnsNode node) => _outcome = "Local callback: " + node.Key;
|
||||
private async Task LocalSlowConfirm() { await Task.Delay(700); _outcome = "Synthetic confirmation completed; no service called"; }
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
@page "/raw-caller-pilot"
|
||||
@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout
|
||||
@inject FixtureTreeState State
|
||||
<p class="notice">Composed actual RawTree/dialogs with fabricated local rename/delete replies and memory-only child reads. No database mutation or fleet request occurs.</p>
|
||||
<button id="fixture-caller-observe" type="button" @onclick="Observe">Observe local request count</button><output id="fixture-caller-count">@_count</output><output id="fixture-caller-ready">@(_observed?"ready":"waiting")</output>
|
||||
<RawTree Roots="_roots" />
|
||||
@code {
|
||||
private IReadOnlyList<RawNode> _roots=[];private int _count;private bool _observed;
|
||||
private void Observe(){_count=State.CallerMutationRequests;_observed=true;}
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
var folder=new RawNode{Key="caller-folder-a",EntityId="caller-folder-a",Kind=RawNodeKind.Folder,DisplayName="Local folder A",ClusterId="caller-cluster",Loaded=true,RowVersion=[1]};
|
||||
var cluster=new RawNode{Key="caller-cluster",EntityId="caller-cluster",Kind=RawNodeKind.Cluster,DisplayName="Local cluster",Loaded=true,Expanded=true,HasLazyChildren=true};
|
||||
cluster.Children.Add(folder);cluster.ChildCount=1;_roots=[cluster];
|
||||
State.CallerMutationRequests=0;State.CallerChildren.Clear();State.CallerChildren[cluster.Key]=[folder];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
@page "/raw-pilot"
|
||||
@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout
|
||||
<h1>Local Raw virtualization verification</h1>
|
||||
<p>Actual RawTree with800 synthetic already-loaded tags. Local in-memory context contains fixture-only records; browser/protocol sessions and mutations reject calls.</p>
|
||||
<div id="raw-scroller" style="height:360px;overflow:auto;border:1px solid var(--rule)">
|
||||
<RawTree Roots="_roots" PickerMode="true" SelectedTagIds="_selected" OnSelectionChanged="SelectedChanged" ResolveDescendantTagIds="ResolveTags" />
|
||||
</div>
|
||||
<output id="selection-count">@_selected.Count selected</output>
|
||||
@code {
|
||||
private readonly HashSet<string> _selected = [];
|
||||
private readonly List<RawNode> _roots = Build();
|
||||
private static List<RawNode> Build()
|
||||
{
|
||||
var root = new RawNode { Kind=RawNodeKind.Device, Key="dev:local", DisplayName="Synthetic device", EntityId="device-local", ClusterId="synthetic", DriverType="Modbus", Expanded=true, Loaded=true, HasLazyChildren=true };
|
||||
root.Children.AddRange(Enumerable.Range(0,800).Select(i => new RawNode { Kind=RawNodeKind.Tag, Key="tag:local-"+i, DisplayName=$"Synthetic tag {i:000}", EntityId="tag-local-"+i, ClusterId="synthetic" }));root.ChildCount=root.Children.Count;return [root];
|
||||
}
|
||||
private void SelectedChanged() { }
|
||||
private Task<IReadOnlyList<string>> ResolveTags(RawNode node) => Task.FromResult<IReadOnlyList<string>>(node.Children.Select(n => n.EntityId!).ToArray());
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
@page "/status-icon-pilot"
|
||||
@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout
|
||||
<p class="notice">Actual host styles and tree components, synthetic display-only hierarchy. Domain actions and child reads are refused by the local fixture.</p>
|
||||
<h1>Local status and icon verification</h1>
|
||||
<div id="semantic-paper"><span class="text-danger">Error text</span> <span class="text-warning">Warning text</span> <span class="text-success">Success text</span></div>
|
||||
<section class="panel p-3" id="semantic-card"><span class="text-danger">Error text</span> <span class="text-warning">Warning text</span> <span class="text-success">Success text</span><div class="notice notice-alert">Application error notice</div><span class="chip chip-bad">Failed</span><span class="chip chip-warn">Degraded</span><span class="chip chip-ok">Healthy</span><span class="chip chip-idle">Disabled</span></section>
|
||||
<RawTree Roots="_roots" />
|
||||
@code {
|
||||
private readonly IReadOnlyList<RawNode> _roots=Build();
|
||||
private static IReadOnlyList<RawNode> Build()
|
||||
{
|
||||
RawNode? child=null;
|
||||
foreach(var kind in Enum.GetValues<RawNodeKind>().Reverse())
|
||||
{
|
||||
var node=new RawNode{Kind=kind,Key="kind:"+kind,EntityId="local-"+kind,DisplayName="Local "+kind,Loaded=true,Expanded=true,HasLazyChildren=child is not null};
|
||||
if(child is not null){node.Children.Add(child);node.ChildCount=1;}child=node;
|
||||
}
|
||||
return child is null?[]:[child];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
@page "/tree-recovery-pilot"
|
||||
@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout
|
||||
@inject FixtureTreeState State
|
||||
<p class="notice">Synthetic local tree reads only. No configuration services or lazy child requests are dispatched.</p>
|
||||
<button id="fixture-recover-tree" type="button" @onclick="()=>State.Fail=false">Restore local root reads</button>
|
||||
<button id="fixture-observe-tree" type="button" @onclick="Observe">Observe local read counts</button>
|
||||
<output id="fixture-tree-count">@_reads / @_unexpected</output>
|
||||
@if(_ready)
|
||||
{
|
||||
@if(Sample=="raw"){<ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages.Raw.GlobalRaw />}
|
||||
else {<ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages.Uns.GlobalUns />}
|
||||
}
|
||||
@code {
|
||||
[SupplyParameterFromQuery]public string? Sample{get;set;}
|
||||
private bool _ready;private int _reads,_unexpected;
|
||||
protected override void OnInitialized(){State.Fail=true;State.Populated=Sample!="raw";State.Reads=0;State.Unexpected=0;_ready=true;}
|
||||
private void Observe(){_reads=State.Reads;_unexpected=State.Unexpected;}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
@page "/uns-caller-pilot"
|
||||
@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout
|
||||
@inject FixtureTreeState State
|
||||
<p class="notice">Actual UNS page/dialogs over fabricated local update/delete replies and per-circuit memory-only structure. No database/fleet mutation occurs.</p>
|
||||
<button id="fixture-uns-restore-read" type="button" @onclick="()=>State.Fail=false">Restore local structure reads</button>
|
||||
<button id="fixture-uns-observe" type="button" @onclick="Observe">Observe local request count</button><output id="fixture-uns-count">@_requests</output><output id="fixture-uns-ready">@(_observed?"ready":"waiting")</output>
|
||||
<ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages.Uns.GlobalUns />
|
||||
@code {
|
||||
[SupplyParameterFromQuery(Name="failAfterWrite")]public bool FailAfterWrite{get;set;}
|
||||
private int _requests;private bool _observed;
|
||||
private void Observe(){_requests=State.UnsMutationRequests;_observed=true;}
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
var line=new UnsNode{Kind=UnsNodeKind.Line,Key="caller-uns-line",EntityId="caller-uns-line",ClusterId="caller-uns-cluster",DisplayName="local-line",Expanded=true};
|
||||
var area=new UnsNode{Kind=UnsNodeKind.Area,Key="caller-uns-area",EntityId="caller-uns-area",ClusterId="caller-uns-cluster",DisplayName="local-area",Expanded=true};area.Children.Add(line);
|
||||
var cluster=new UnsNode{Kind=UnsNodeKind.Cluster,Key="caller-uns-cluster",EntityId="caller-uns-cluster",ClusterId="caller-uns-cluster",DisplayName="Local cluster",Expanded=true};cluster.Children.Add(area);
|
||||
var enterprise=new UnsNode{Kind=UnsNodeKind.Enterprise,Key="caller-uns-enterprise",DisplayName="Local enterprise",Expanded=true};enterprise.Children.Add(cluster);
|
||||
State.Fail=false;State.UnsFailAfterWrite=FailAfterWrite;State.UnsCallerRoots=[enterprise];State.UnsMutationRequests=0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user