diff --git a/components/ui-theme/validation/ot-ui/host/Components/App.razor b/components/ui-theme/validation/ot-ui/host/Components/App.razor new file mode 100644 index 0000000..ff21883 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/Components/App.razor @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/components/ui-theme/validation/ot-ui/host/Components/Pages/DeploymentPilot.razor b/components/ui-theme/validation/ot-ui/host/Components/Pages/DeploymentPilot.razor new file mode 100644 index 0000000..09cf9c4 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/Components/Pages/DeploymentPilot.razor @@ -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 +

Local deployment-feedback fixture · synthetic Administrator, memory-only records and fabricated replies. No configuration is sent to any actor/fleet.

+@if(_ready) +{ +
+ + @(_interactive ? "ready" : "waiting") + + + +
+ @State.Requests + +} +@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;} +} diff --git a/components/ui-theme/validation/ot-ui/host/Components/Pages/DiagnosticPilot.razor b/components/ui-theme/validation/ot-ui/host/Components/Pages/DiagnosticPilot.razor new file mode 100644 index 0000000..8e326da --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/Components/Pages/DiagnosticPilot.razor @@ -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 Feed +

Local diagnostic component fixture · synthetic errors, no fleet/database connection.

+@switch (Sample) +{ + case "historian": break; + case "fleet": break; + case "deployments": break; + case "audit": break; + case "log": + + + break; + default: +

Diagnostic disclosure verification

+ + + break; +} +@code { + [SupplyParameterFromQuery(Name="sample")] public string? Sample { get; set; } + private static string Diagnostic => "Synthetic local failure " + new string('x',5000) + " END-DIAGNOSTIC"; + private void Publish() => Feed.Publish(new ScriptLogEntry("fixture-script","Error",Diagnostic,DateTime.UtcNow,null,null,null)); +} diff --git a/components/ui-theme/validation/ot-ui/host/Components/Pages/DriverDiagnosticPilot.razor b/components/ui-theme/validation/ot-ui/host/Components/Pages/DriverDiagnosticPilot.razor new file mode 100644 index 0000000..f3c4662 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/Components/Pages/DriverDiagnosticPilot.razor @@ -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 +

Local driver diagnostic verification

+

Synthetic Administrator fixture · read-only local snapshots and fabricated failed reconnect reply; no actor/fleet operations.

+ +@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; +} diff --git a/components/ui-theme/validation/ot-ui/host/Components/Pages/EditorPilot.razor b/components/ui-theme/validation/ot-ui/host/Components/Pages/EditorPilot.razor new file mode 100644 index 0000000..42550dd --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/Components/Pages/EditorPilot.razor @@ -0,0 +1,15 @@ +@page "/editor-pilot" +@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout +

Local editor name verification

+

Actual Monaco component/assets. Static synthetic code; diagnostics return an empty local fixture projection. No script execution or real analysis service.

+ + + +@_read +@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; } +} diff --git a/components/ui-theme/validation/ot-ui/host/Components/Pages/FinalGrammarPilot.razor b/components/ui-theme/validation/ot-ui/host/Components/Pages/FinalGrammarPilot.razor new file mode 100644 index 0000000..821c308 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/Components/Pages/FinalGrammarPilot.razor @@ -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 +

Actual components · synthetic local read adapters. No fleet, directory, certificate-store, secret-value or configuration mutations are exercised.

+@switch(Sample) +{ + case "account":break; + case "api-keys":break; + case "certificates":break; + case "role-grants":break; + case "reservations":break; + case "secrets":break; + case "clusters":break; + case "overview":break; + case "cluster-edit":break; + case "cluster-new":break; + case "cluster-acls":break; + case "acl-new":break; + case "cluster-audit":break; + case "cluster-redundancy":break; + case "node-edit":break; + case "acl-edit":break; + case "namespace-edit":break; + case "node-new":break; + case "namespaces":break; + case "namespace-new":break; + case "home":break; +} +@code{[SupplyParameterFromQuery] public string? Sample{get;set;}} diff --git a/components/ui-theme/validation/ot-ui/host/Components/Pages/GrammarPilot.razor b/components/ui-theme/validation/ot-ui/host/Components/Pages/GrammarPilot.razor new file mode 100644 index 0000000..18c14b0 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/Components/Pages/GrammarPilot.razor @@ -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 +

Local component fixture · synthetic data; no fleet or database connection. Only explicitly mapped synthetic operations exist; unlisted operations reject calls.

+@switch (Sample) +{ + case "hosts": break; + case "alerts": break; + case "script-log": break; + case "script-edit": break; + case "uns": break; + case "raw": break; + case "diagnostics": break; + case "historian": break; + case "fleet": break; + case "deployments": break; + case "scripts": break; + case "equipment": break; +} +@code { + [SupplyParameterFromQuery(Name="sample")] public string? Sample { get; set; } +} diff --git a/components/ui-theme/validation/ot-ui/host/Components/Pages/LiveTailPilot.razor b/components/ui-theme/validation/ot-ui/host/Components/Pages/LiveTailPilot.razor new file mode 100644 index 0000000..8735d72 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/Components/Pages/LiveTailPilot.razor @@ -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 Logs +@inject IInProcessBroadcaster Alarms +@inject ZB.MOM.WW.OtOpcUa.Commons.Interfaces.IAdminOperationsClient Operations +

Synthetic local live-tail feed. Buttons publish fabricated in-process display events only; they do not acknowledge, shelve or change fleet state.

+
+ + + +@_commands@_until +@if(Sample=="alerts"){} +else {} +@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;iLocal OtOpcUa UI verification +

Actual AdminUI components with synthetic local state. No database, fleet, browse session, protocol or write service is connected.

+@if (Sample == "log") { } +else if (Sample == "uns") { } +else +{ +

Standalone calculation form

+

Repeated form associations

+
+

Synthetic UNS nodes

+ + + + + +@_outcome + + + + +} +@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 _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"; } +} diff --git a/components/ui-theme/validation/ot-ui/host/Components/Pages/RawCallerPilot.razor b/components/ui-theme/validation/ot-ui/host/Components/Pages/RawCallerPilot.razor new file mode 100644 index 0000000..74e6cbb --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/Components/Pages/RawCallerPilot.razor @@ -0,0 +1,17 @@ +@page "/raw-caller-pilot" +@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout +@inject FixtureTreeState State +

Composed actual RawTree/dialogs with fabricated local rename/delete replies and memory-only child reads. No database mutation or fleet request occurs.

+@_count@(_observed?"ready":"waiting") + +@code { + private IReadOnlyList _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]; + } +} diff --git a/components/ui-theme/validation/ot-ui/host/Components/Pages/RawPilot.razor b/components/ui-theme/validation/ot-ui/host/Components/Pages/RawPilot.razor new file mode 100644 index 0000000..b5306e9 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/Components/Pages/RawPilot.razor @@ -0,0 +1,19 @@ +@page "/raw-pilot" +@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout +

Local Raw virtualization verification

+

Actual RawTree with800 synthetic already-loaded tags. Local in-memory context contains fixture-only records; browser/protocol sessions and mutations reject calls.

+
+ +
+@_selected.Count selected +@code { + private readonly HashSet _selected = []; + private readonly List _roots = Build(); + private static List 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> ResolveTags(RawNode node) => Task.FromResult>(node.Children.Select(n => n.EntityId!).ToArray()); +} diff --git a/components/ui-theme/validation/ot-ui/host/Components/Pages/StatusIconPilot.razor b/components/ui-theme/validation/ot-ui/host/Components/Pages/StatusIconPilot.razor new file mode 100644 index 0000000..4ebfbdf --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/Components/Pages/StatusIconPilot.razor @@ -0,0 +1,20 @@ +@page "/status-icon-pilot" +@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout +

Actual host styles and tree components, synthetic display-only hierarchy. Domain actions and child reads are refused by the local fixture.

+

Local status and icon verification

+
Error text Warning text Success text
+
Error text Warning text Success text
Application error notice
FailedDegradedHealthyDisabled
+ +@code { + private readonly IReadOnlyList _roots=Build(); + private static IReadOnlyList Build() + { + RawNode? child=null; + foreach(var kind in Enum.GetValues().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]; + } +} diff --git a/components/ui-theme/validation/ot-ui/host/Components/Pages/TreeRecoveryPilot.razor b/components/ui-theme/validation/ot-ui/host/Components/Pages/TreeRecoveryPilot.razor new file mode 100644 index 0000000..ae2275b --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/Components/Pages/TreeRecoveryPilot.razor @@ -0,0 +1,18 @@ +@page "/tree-recovery-pilot" +@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout +@inject FixtureTreeState State +

Synthetic local tree reads only. No configuration services or lazy child requests are dispatched.

+ + +@_reads / @_unexpected +@if(_ready) +{ + @if(Sample=="raw"){} + else {} +} +@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;} +} diff --git a/components/ui-theme/validation/ot-ui/host/Components/Pages/UnsCallerPilot.razor b/components/ui-theme/validation/ot-ui/host/Components/Pages/UnsCallerPilot.razor new file mode 100644 index 0000000..a12565e --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/Components/Pages/UnsCallerPilot.razor @@ -0,0 +1,20 @@ +@page "/uns-caller-pilot" +@layout ZB.MOM.WW.OtOpcUa.AdminUI.Components.Layout.MainLayout +@inject FixtureTreeState State +

Actual UNS page/dialogs over fabricated local update/delete replies and per-circuit memory-only structure. No database/fleet mutation occurs.

+ +@_requests@(_observed?"ready":"waiting") + +@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; + } +} diff --git a/components/ui-theme/validation/ot-ui/host/Components/Routes.razor b/components/ui-theme/validation/ot-ui/host/Components/Routes.razor new file mode 100644 index 0000000..3974cc4 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/Components/Routes.razor @@ -0,0 +1 @@ + diff --git a/components/ui-theme/validation/ot-ui/host/Components/_Imports.razor b/components/ui-theme/validation/ot-ui/host/Components/_Imports.razor new file mode 100644 index 0000000..7d0cca8 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/Components/_Imports.razor @@ -0,0 +1,14 @@ +@using Microsoft.AspNetCore.Components +@using Microsoft.AspNetCore.Components.Web +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Authorization +@using static Microsoft.AspNetCore.Components.Web.RenderMode +@using ZB.MOM.WW.Theme +@using OtUiCanary.Components +@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared +@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Raw +@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Drivers +@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Drivers.Forms +@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Uns +@using ZB.MOM.WW.OtOpcUa.AdminUI.Uns diff --git a/components/ui-theme/validation/ot-ui/host/DeploymentFixtures.cs b/components/ui-theme/validation/ot-ui/host/DeploymentFixtures.cs new file mode 100644 index 0000000..36dff81 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/DeploymentFixtures.cs @@ -0,0 +1,64 @@ +using Microsoft.EntityFrameworkCore; +using ZB.MOM.WW.OtOpcUa.Configuration; +using ZB.MOM.WW.OtOpcUa.Configuration.Entities; +using ZB.MOM.WW.OtOpcUa.Configuration.Enums; +using ZB.MOM.WW.OtOpcUa.Commons.Messages.Admin; + +/// Fixture-only memory-provider reads with controlled failure; no external DB is configured. +public sealed class FixtureDbReadControl(DbContextOptions options) : IDbContextFactory +{ + public bool FailReads {get;set;} + public int DelayMilliseconds {get;set;} + public OtOpcUaConfigDbContext CreateDbContext()=>new(options); + public async Task CreateDbContextAsync(CancellationToken ct=default) + { + var fail=FailReads;var delay=DelayMilliseconds; + if(delay>0)await Task.Delay(delay,ct); + if(fail)throw new IOException("Synthetic fixture-only history read failure"); + return CreateDbContext(); + } +} +/// A fabricated deployment response and memory-only record, never an actor/fleet deployment. +public sealed class FixtureDeploymentState(FixtureDbReadControl reads) +{ + public const string Revision="cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"; + public string Mode {get;set;}="accept"; + public int Requests {get;private set;} + public Guid? LastAccepted {get;private set;} + private readonly SemaphoreSlim _resetGate=new(1,1); + private string? _run; + public async Task ResetAsync(string run,bool failInitial) + { + await _resetGate.WaitAsync(); + try + { + // SSR and interactive initialization share this synthetic run; never reset a running scenario twice. + if(_run==run)return; + reads.FailReads=false;reads.DelayMilliseconds=0;Requests=0;LastAccepted=null; + await using var db=reads.CreateDbContext(); + db.NodeDeploymentStates.RemoveRange(db.NodeDeploymentStates);db.Deployments.RemoveRange(db.Deployments); + await db.SaveChangesAsync();reads.FailReads=failInitial;_run=run; + } + finally {_resetGate.Release();} + } + public async Task StartAsync(string actor,CancellationToken ct) + { + Requests++;var mode=Mode; + await Task.Delay(700,ct); + if(mode=="unknown")throw new IOException("Synthetic fixture-only missing actor reply"); + if(mode=="nochanges")return new(StartDeploymentOutcome.NoChanges,null,null,null,new(Guid.NewGuid())); + if(mode=="rejected")return new(StartDeploymentOutcome.Rejected,null,null,"Synthetic preflight rejection",new(Guid.NewGuid())); + if(mode=="blocked")return new(StartDeploymentOutcome.AnotherDeploymentInFlight,null,null,"Synthetic other deployment in progress",new(Guid.NewGuid())); + var id=Guid.NewGuid();LastAccepted=id; + await using var db=reads.CreateDbContext(); + db.Deployments.Add(new Deployment {DeploymentId=id,RevisionHash=Revision,CreatedBy=actor,Status=DeploymentStatus.AwaitingApplyAcks}); + await db.SaveChangesAsync(ct); + return new(StartDeploymentOutcome.Accepted,new(id),new(Revision),null,new(Guid.NewGuid())); + } + public async Task SealAsync() + { + if(LastAccepted is not {} id)return; + await using var db=reads.CreateDbContext();var row=await db.Deployments.SingleAsync(d=>d.DeploymentId==id); + row.Status=DeploymentStatus.Sealed;row.SealedAtUtc=DateTime.UtcNow;await db.SaveChangesAsync(); + } +} diff --git a/components/ui-theme/validation/ot-ui/host/DriverFixtures.cs b/components/ui-theme/validation/ot-ui/host/DriverFixtures.cs new file mode 100644 index 0000000..ab3a312 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/DriverFixtures.cs @@ -0,0 +1,49 @@ +using System.Reflection; +using ZB.MOM.WW.OtOpcUa.Commons.Interfaces; +using ZB.MOM.WW.OtOpcUa.AdminUI.Hubs; +using ZB.MOM.WW.OtOpcUa.Commons.Messages.Admin; +using ZB.MOM.WW.OtOpcUa.Commons.Messages.Drivers; +public static class FixtureDiagnostic +{ + public static string Text => "Synthetic local failure " + new string('x',5000) + " END-DIAGNOSTIC"; +} +public class SyntheticOperationsFixture : DispatchProxy +{ + private FixtureDeploymentState? _deployments; + public int AlarmRequests { get; private set; } + public string AlarmMode { get; set; } = "success"; + public TaskCompletionSource? PendingAlarm { get; private set; } + public string? LastAlarmId { get; private set; } + public DateTime? LastUnshelveAtUtc { get; private set; } + public void ResetAlarmRequests(){AlarmRequests=0;LastAlarmId=null;LastUnshelveAtUtc=null;AlarmMode="success";PendingAlarm=null;} + public static IAdminOperationsClient WithDeployments(FixtureDeploymentState state) + { + var proxy=Create(); + ((SyntheticOperationsFixture)(object)proxy)._deployments=state;return proxy; + } + protected override object? Invoke(MethodInfo? method, object?[]? args) + { + if(method?.Name==nameof(IAdminOperationsClient.AcknowledgeAlarmAsync)) + { AlarmRequests++;LastAlarmId=(string)args![0]!;if(AlarmMode=="pending"){PendingAlarm=new(TaskCreationOptions.RunContinuationsAsynchronously);return PendingAlarm.Task;} + if(AlarmMode=="failure")return Task.FromException(new IOException(FixtureDiagnostic.Text)); + return Task.FromResult(new AcknowledgeAlarmResult(true,null,new(Guid.Empty))); } + if(method?.Name==nameof(IAdminOperationsClient.ShelveAlarmAsync)) + { AlarmRequests++;LastAlarmId=(string)args![0]!;LastUnshelveAtUtc=(DateTime?)args[3];return Task.FromResult(new ShelveAlarmResult(true,null,new(Guid.Empty))); } + if(method?.Name==nameof(IAdminOperationsClient.StartDeploymentAsync)) + return _deployments!.StartAsync((string)args![0]!, (CancellationToken)args[1]!); + if(method?.Name=="AskAsync" && method.GetGenericArguments().Single()==typeof(ReconnectDriverResult)) + return Task.FromResult(new ReconnectDriverResult(false,FixtureDiagnostic.Text,Guid.Empty)); + throw new InvalidOperationException("Disposable fixture rejects service operations."); + } +} +public sealed class FaultableFixtureStatusStore : IDriverStatusSnapshotStore +{ + private readonly InMemoryDriverStatusSnapshotStore _inner = new(); + public bool ReadFailure { get; set; } + public void Upsert(DriverHealthChanged snapshot) => _inner.Upsert(snapshot); + public bool TryGet(string id, out DriverHealthChanged snapshot) => _inner.TryGet(id,out snapshot); + public IReadOnlyCollection GetAll() => _inner.GetAll(); + public IReadOnlyCollection GetAllWithReceiveTime() => ReadFailure ? throw new IOException(FixtureDiagnostic.Text) : _inner.GetAllWithReceiveTime(); + public int EvictUnconfiguredStale(IReadOnlySet ids, DateTime older) => _inner.EvictUnconfiguredStale(ids,older); + public event Action? SnapshotChanged { add => _inner.SnapshotChanged += value; remove => _inner.SnapshotChanged -= value; } +} diff --git a/components/ui-theme/validation/ot-ui/host/FinalGrammarFixtures.cs b/components/ui-theme/validation/ot-ui/host/FinalGrammarFixtures.cs new file mode 100644 index 0000000..a77e858 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/FinalGrammarFixtures.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using ZB.MOM.WW.OtOpcUa.AdminUI.Acls; +using ZB.MOM.WW.OtOpcUa.AdminUI.ApiKeyAck; +using ZB.MOM.WW.OtOpcUa.AdminUI.Certificates; +using ZB.MOM.WW.OtOpcUa.Configuration.Entities; +using ZB.MOM.WW.OtOpcUa.Configuration.Services; +using ZB.MOM.WW.OtOpcUa.ControlPlane.Redundancy; +using ZB.MOM.WW.OtOpcUa.Core.Authorization; +using ZB.MOM.WW.Secrets.Abstractions; +using ZB.MOM.WW.Audit; +// Disposable read adapters: only explicitly listed reads succeed; all mutations/value reads reject. +internal static class FinalGrammarFixtures +{ + internal static void Register(WebApplicationBuilder builder) + { + var services=builder.Services; + services.AddSingleton(RejectingFixture.WithRead("ListAsync",Task.FromResult>([]))); + services.AddSingleton(RejectingFixture.WithRead("ListAsync",Task.FromResult>(new Dictionary()))); + services.AddSingleton(RejectingFixture.WithRead("ListAllAsync",Task.FromResult>([]))); + services.Configure(_=>{}); + services.AddSingleton(RejectingFixture.WithReads(new() + { + ["LoadKnownPrincipalsAsync"]=Task.FromResult>(["fixture-principal"]), + ["CheckPrincipalAsync"]=Task.FromResult(new PrincipalUsage(false,0,0)), + ["CheckScopeAsync"]=Task.FromResult(new AclScopeCheck(true,"Synthetic local cluster scope")) + })); + services.AddSingleton(RejectingFixture.WithRead("GetSnapshot",new ManualFailoverSnapshot(null,[]))); + services.AddSingleton(DispatchProxy.Create()); + builder.Configuration["OpcUa:PkiStoreRoot"]=Path.Combine(Path.GetTempPath(),"ot-ui-empty-pki-"+Guid.NewGuid().ToString("N")); + services.AddSingleton(); + IReadOnlyList metadata=[new(){Name=new SecretName("fixture/metadata-only"),Description="Synthetic local metadata; value reads reject",ContentType=SecretContentType.Text,KekId="fixture-key",Revision=1,CreatedUtc=DateTimeOffset.Parse("2026-11-14T00:00:00Z"),UpdatedUtc=DateTimeOffset.Parse("2026-11-14T00:00:00Z"),UpdatedBy="fixture"}]; + services.AddSingleton(RejectingFixture.WithRead("ListAsync",Task.FromResult(metadata))); + services.AddSingleton(DispatchProxy.Create()); + } +} diff --git a/components/ui-theme/validation/ot-ui/host/OtUiCanary.csproj b/components/ui-theme/validation/ot-ui/host/OtUiCanary.csproj new file mode 100644 index 0000000..ad64834 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/OtUiCanary.csproj @@ -0,0 +1,4 @@ + + net10.0enableenable + + diff --git a/components/ui-theme/validation/ot-ui/host/Program.cs b/components/ui-theme/validation/ot-ui/host/Program.cs new file mode 100644 index 0000000..6618f83 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/Program.cs @@ -0,0 +1,107 @@ +using System.Security.Claims; +using System.Reflection; +using Microsoft.EntityFrameworkCore; +using Microsoft.AspNetCore.Components.Authorization; +using Microsoft.AspNetCore.DataProtection; +using OtUiCanary.Components; +using ZB.MOM.WW.OtOpcUa.AdminUI.Uns; +using ZB.MOM.WW.Secrets.Ui; +var builder = WebApplication.CreateBuilder(args); +builder.WebHost.UseStaticWebAssets(); +builder.Services.AddRazorComponents().AddInteractiveServerComponents(); +builder.Services.AddDataProtection().UseEphemeralDataProtectionProvider(); +builder.Services.AddAuthorizationCore(options => +{ + options.AddSecretsAuthorization(); + // Fixture-only mirror of Security/ServiceCollectionExtensions.cs policy requirements; + // no cookie login, LDAP or real principal is configured in this component host. + options.AddPolicy(ZB.MOM.WW.OtOpcUa.Security.Auth.AdminUiPolicies.DriverOperator, p => p.RequireRole("Operator", "Administrator")); + options.AddPolicy(ZB.MOM.WW.OtOpcUa.Security.Auth.AdminUiPolicies.FleetAdmin, p => p.RequireRole("Administrator")); + options.AddPolicy(ZB.MOM.WW.OtOpcUa.Security.Auth.AdminUiPolicies.ConfigEditor, p => p.RequireRole("Administrator", "Designer")); + options.AddPolicy(ZB.MOM.WW.OtOpcUa.Security.Auth.AdminUiPolicies.AuthenticatedRead, p => p.RequireAuthenticatedUser()); +}); +builder.Services.AddCascadingAuthenticationState(); +builder.Services.AddScoped(); +builder.Services.AddScoped(); +builder.Services.AddScoped(sp => FixtureTreeProxy.Create(sp.GetRequiredService())); +builder.Services.AddScoped(sp => FixtureTreeProxy.Create(sp.GetRequiredService())); +builder.Services.AddSingleton, ZB.MOM.WW.OtOpcUa.AdminUI.Hubs.InProcessBroadcaster>(); +builder.Services.AddDbContextFactory(options => options.UseInMemoryDatabase("ot-ui-local-empty")); +builder.Services.AddScoped(); +builder.Services.AddSingleton(); +builder.Services.AddSingleton(DispatchProxy.Create()); +builder.Services.AddSingleton(RejectingFixture.WithRead("MembersWithRole", (IReadOnlyList)[new("fixture-driver-with-long-local-name")])); +builder.Services.AddSingleton(); +builder.Services.AddSingleton>(sp => sp.GetRequiredService()); +builder.Services.AddSingleton(); +builder.Services.AddSingleton(sp => SyntheticOperationsFixture.WithDeployments(sp.GetRequiredService())); +builder.Services.AddScoped(sp => new ZB.MOM.WW.OtOpcUa.AdminUI.Deployments.DeploymentDriftProbe(sp.GetRequiredService>(), _ => Task.FromResult(FixtureDeploymentState.Revision))); +builder.Services.AddSingleton, ZB.MOM.WW.OtOpcUa.AdminUI.Hubs.InProcessBroadcaster>(); +builder.Services.AddSingleton(DispatchProxy.Create()); +// A disposable localhost-only Akka membership shell; no application actors or seed peers. +var fixtureActors = Akka.Actor.ActorSystem.Create("ot-ui-local-only", Akka.Configuration.ConfigurationFactory.ParseString(""" + akka.actor.provider = cluster + akka.remote.dot-netty.tcp.hostname = "127.0.0.1" + akka.remote.dot-netty.tcp.port = 0 + akka.cluster.seed-nodes = [] + akka.loglevel = WARNING + """)); +builder.Services.AddSingleton(fixtureActors); +var historianFixture = fixtureActors.ActorOf(Akka.Actor.Props.Create(), "historian-status-fixture"); +builder.Services.AddSingleton(RejectingFixture.WithRead>("get_ActorRef", historianFixture)); +builder.Services.AddSingleton(); +builder.Services.AddSingleton(sp => sp.GetRequiredService()); +builder.Services.AddSingleton(); +builder.Services.AddScoped(); +FinalGrammarFixtures.Register(builder); +var app = builder.Build(); +app.Lifetime.ApplicationStopping.Register(() => _ = fixtureActors.Terminate()); +// Synthetic fixture-only records. This provider is in-memory, never the actual application's database. +using (var scope = app.Services.CreateScope()) +{ + var factory = scope.ServiceProvider.GetRequiredService>(); + using var db = factory.CreateDbContext(); + db.ServerClusters.Add(new(){ClusterId="fixture-cluster",Name="Synthetic local cluster",Enterprise="fixture",Site="local",RedundancyMode=ZB.MOM.WW.OtOpcUa.Configuration.Enums.RedundancyMode.None,CreatedBy="fixture"}); + db.ClusterNodes.Add(new(){ClusterId="fixture-cluster",NodeId="fixture-node",Host="localhost",ApplicationUri="urn:fixture:local",CreatedBy="fixture"}); + db.NodeAcls.Add(new(){ClusterId="fixture-cluster",NodeAclId="fixture-acl",Principal="fixture-principal",ScopeKind=ZB.MOM.WW.OtOpcUa.Configuration.Enums.NodeAclScopeKind.Cluster,PermissionFlags=ZB.MOM.WW.OtOpcUa.Configuration.Enums.NodePermissions.ReadOnly}); + db.Scripts.Add(new() { ScriptId="fixture-script", Name="Synthetic script with a deliberately long human-readable name", SourceCode="return 1;", SourceHash=new string('a',64) }); + var diagnostic = "Synthetic local failure " + new string('x',5000) + " END-DIAGNOSTIC"; + var deployment = new ZB.MOM.WW.OtOpcUa.Configuration.Entities.Deployment { RevisionHash=new string('b',64), CreatedBy="local-fixture-only", Status=ZB.MOM.WW.OtOpcUa.Configuration.Enums.DeploymentStatus.PartiallyFailed, FailureReason=diagnostic }; + db.Deployments.Add(deployment); + db.NodeDeploymentStates.Add(new() { NodeId="fixture-driver-with-long-local-name", DeploymentId=deployment.DeploymentId, Status=ZB.MOM.WW.OtOpcUa.Configuration.Enums.NodeDeploymentStatus.Failed, FailureReason=diagnostic }); + db.ConfigAuditLogs.Add(new() { Principal="local-fixture-only", EventType="SyntheticFailure", ClusterId="fixture-cluster", CorrelationId=Guid.Parse("71324bc9-ae5d-4f41-9f0b-a38a092f77d8"), DetailsJson=System.Text.Json.JsonSerializer.Serialize(new { message=diagnostic }) }); + db.SaveChanges(); +} +app.UseStaticFiles(); app.UseAntiforgery(); +app.MapGet("/fixture/provenance", () => new { purpose="Disposable actual-component UI canary; explicit synthetic in-memory operations only, no external fleet/database/LDAP/COM connectivity", source="Authorized OtOpcUa checkout", theme=typeof(ZB.MOM.WW.Theme.ThemeShell).Assembly.GetName().Version?.ToString() }); +app.MapPost("/api/script-analysis/diagnostics", () => Results.Json(new { markers = Array.Empty() })); +app.MapPost("/fixture/alarm-feed/{id}", (string id, ZB.MOM.WW.OtOpcUa.AdminUI.Hubs.IInProcessBroadcaster feed) => +{ + if(id is not ("alarm-a" or "alarm-b"))return Results.BadRequest(); + feed.Publish(new(id,"Fixture/Press","Local "+id,"Activated",500,"Local display-only event "+id,"fixture",DateTime.UtcNow)); + return Results.Ok(new {fixtureOnly=true}); +}); +app.MapRazorComponents().AddInteractiveServerRenderMode(); +app.Run(); +internal sealed class SyntheticAdministratorFixture : AuthenticationStateProvider +{ + public override Task GetAuthenticationStateAsync() => Task.FromResult(new AuthenticationState(new ClaimsPrincipal(new ClaimsIdentity([new(ClaimTypes.Name,"local-fixture-only"), new(ClaimTypes.Role,"Administrator"),new(ClaimTypes.Role,SecretsAuthorization.ManageRole)], "synthetic-fixture")))); +} +public class RejectingFixture : DispatchProxy +{ + private readonly Dictionary _reads = []; + public static T WithRead(string method, object value) where T : class + { + var proxy = Create(); + var fixture = (RejectingFixture)(object)proxy; fixture._reads[method] = value; + return proxy; + } + public static T WithReads(Dictionary reads) where T : class + { + var proxy = Create(); + var fixture = (RejectingFixture)(object)proxy; + foreach (var pair in reads) fixture._reads[pair.Key] = pair.Value; + return proxy; + } + protected override object? Invoke(MethodInfo? method, object?[]? args) => method is not null && _reads.TryGetValue(method.Name, out var value) ? value : throw new InvalidOperationException("Disposable fixture rejects service operations."); +} diff --git a/components/ui-theme/validation/ot-ui/host/README.md b/components/ui-theme/validation/ot-ui/host/README.md new file mode 100644 index 0000000..d31718c --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/README.md @@ -0,0 +1,18 @@ +# Disposable OtOpcUa actual-component host + +This retained harness references the authorized OtOpcUa checkout; it does not copy or replace product components. It uses the exact accepted runtime Theme/Secrets packages through that project. `OtUiCanary.csproj` records the existing EF InMemory10.0.7 fixture dependency; it is not a production package change. + +The identity/policies are synthetic and are not a real cookie/LDAP authentication path. EF reads/writes are memory-only; no ConfigDb connection string is registered. Raw/UNS scoped proxies accept only explicitly mapped synthetic records/operations and reject other calls. The operation proxy supports fake deployment/alarm cases and rejects other actor commands. Certificate inspection points at a unique nonexistent temporary PKI root; no certificate action is exercised. Shared Secrets exposes fabricated metadata only; secret-value reads and mutation services reject calls. The Akka membership/historian adapter uses loopback ephemeral ports and no seed peers or application actors. + +`FinalGrammarPilot` renders actual components directly. Its page-property/AX checks do not certify production routing, route middleware, login POSTs, protocol sessions or production data scale. Existing destination-policy/role tests and prior bounded native route-policy fixtures provide separate evidence. Login remains statically posted to its original endpoint; no real login is attempted here. + +The fixture endpoints under `/fixture/` modify only fabricated display/feed state. They are not product endpoints and are not deployed. LiveTailPilot controls fake request completion/failure and display events; they never acknowledge a real alarm. Other pilots isolate tree recovery/caller sequencing, diagnostics, editor labels, density, deployment reads, tails and page grammar. Native scripts in the OtOpcUa repository record exact contexts and raw outcomes; old evidence remains historical rather than silently becoming a new baseline. + +Build/run from this directory (update the project reference only if using another authorized checkout): + +```sh +dotnet build OtUiCanary.csproj --artifacts-path /tmp/ot-ui-canary-artifacts +dotnet /tmp/ot-ui-canary-artifacts/bin/OtUiCanary/debug/OtUiCanary.dll --urls http://127.0.0.1:0 +``` + +Restore must use the approved official feeds/cache and verified package bytes. Record the actual selected loopback origin from startup output. Never bind publicly or reuse a live service configuration. The final acceptance report records the owned host shutdown and disposable SQL cleanup separately. No deployments, fleet writes or existing test-rig changes are part of this harness. diff --git a/components/ui-theme/validation/ot-ui/host/ReadonlyHistorianStatusFixture.cs b/components/ui-theme/validation/ot-ui/host/ReadonlyHistorianStatusFixture.cs new file mode 100644 index 0000000..bccae80 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/ReadonlyHistorianStatusFixture.cs @@ -0,0 +1,9 @@ +using Akka.Actor; +using ZB.MOM.WW.OtOpcUa.Core.AlarmHistorian; +using ZB.MOM.WW.OtOpcUa.Runtime.Historian; +/// A synthetic local status reply only; no sink, queue, writer or fleet actors exist. +public sealed class ReadonlyHistorianStatusFixture : ReceiveActor +{ + public ReadonlyHistorianStatusFixture() => Receive(_ => + Sender.Tell(new HistorianSinkStatus(4,1,DateTime.UtcNow,null,FixtureDiagnostic.Text,HistorianDrainState.BackingOff))); +} diff --git a/components/ui-theme/validation/ot-ui/host/TreeFixtures.cs b/components/ui-theme/validation/ot-ui/host/TreeFixtures.cs new file mode 100644 index 0000000..b785b85 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/host/TreeFixtures.cs @@ -0,0 +1,56 @@ +using System.Reflection; +using ZB.MOM.WW.OtOpcUa.AdminUI.Uns; + +/// Per-circuit synthetic display state; no external service or database is configured. +public sealed class FixtureTreeState +{ + public bool Fail, Populated, UnsFailAfterWrite; + public int Reads, Unexpected, CallerMutationRequests, UnsMutationRequests; + public Dictionary> CallerChildren=[]; + public IReadOnlyList? UnsCallerRoots; + public void RenameUns(string id,string name) + { + UnsNode Clone(UnsNode n) + { + var copy=new UnsNode {Kind=n.Kind,Key=n.Key,EntityId=n.EntityId,ClusterId=n.ClusterId,DisplayName=n.EntityId==id?name:n.DisplayName,Expanded=n.Expanded,Loaded=n.Loaded,HasLazyChildren=n.HasLazyChildren,ChildCount=n.ChildCount}; + copy.Children.AddRange(n.Children.Select(Clone));return copy; + } + if(UnsCallerRoots is not null)UnsCallerRoots=UnsCallerRoots.Select(Clone).ToArray(); + } +} +public class FixtureTreeProxy:DispatchProxy +{ + private FixtureTreeState _state=null!; + public static T Create(FixtureTreeState state) where T:class + {var p=Create();((FixtureTreeProxy)(object)p)._state=state;return p;} + protected override object? Invoke(MethodInfo? m,object?[]? a) + { + if(m?.Name=="LoadRootsAsync") + {_state.Reads++;return _state.Fail?Task.FromException>(new IOException("Synthetic local root read failure ")):Task.FromResult>([]);} + if(m?.Name=="LoadStructureAsync") + { + _state.Reads++; + return _state.Fail?Task.FromException>(new IOException("Synthetic local structure read failure ")) + :Task.FromResult>(_state.UnsCallerRoots??(_state.Populated?[new UnsNode{Key="eq:local",Kind=UnsNodeKind.Equipment,EntityId="local",DisplayName="Synthetic press",HasLazyChildren=true}]:[])); + } + if(m?.Name=="LoadAreaAsync" && a?[0] is string area && area.StartsWith("caller-uns-",StringComparison.Ordinal)) + return Task.FromResult(new(area,"local-area",null,"caller-uns-cluster",[1])); + if(m?.Name=="LoadLineAsync" && a?[0] is string line && line.StartsWith("caller-uns-",StringComparison.Ordinal)) + return Task.FromResult(new(line,"caller-uns-area","local-line",null,[2])); + if((m?.Name=="UpdateAreaAsync"||m?.Name=="UpdateLineAsync") && a?[0] is string update && update.StartsWith("caller-uns-",StringComparison.Ordinal)) + { + _state.UnsMutationRequests++;_state.RenameUns(update,(string)a[1]!); + if(_state.UnsFailAfterWrite)_state.Fail=true; + return Task.FromResult(new UnsMutationResult(true,null)); + } + if(m?.Name=="DeleteClusterAsync" && a?[0] is string cluster && cluster.StartsWith("caller-uns-",StringComparison.Ordinal)) + {_state.UnsMutationRequests++;return Task.FromResult(new UnsMutationResult(false,"Synthetic current cluster blocker ; no real deletion was attempted."));} + if(m?.Name=="LoadEquipmentPickContextAsync")return Task.FromResult(new EquipmentPickContext([],[])); + if(m?.Name=="LoadChildrenAsync" && a?[0] is RawNode node && _state.CallerChildren.TryGetValue(node.Key,out var children))return Task.FromResult(children); + if(m?.Name=="DeleteFolderAsync" && a?[0] is string deleteId && deleteId.StartsWith("caller-",StringComparison.Ordinal)) + {_state.CallerMutationRequests++;return Task.FromResult(new UnsMutationResult(false,"Synthetic local blocker : this folder has references. No real deletion was attempted."));} + if(m?.Name=="RenameFolderAsync" && a?[0] is string renameId && renameId.StartsWith("caller-",StringComparison.Ordinal)) + {_state.CallerMutationRequests++;return Task.FromResult(RawRenameResult.Success(["Synthetic local rename advisory ; no database configuration changed."]));} + _state.Unexpected++;throw new InvalidOperationException("Tree fixture refuses non-root operation: "+m?.Name); + } +} diff --git a/components/ui-theme/validation/ot-ui/ot14-sql/preflight.log b/components/ui-theme/validation/ot-ui/ot14-sql/preflight.log new file mode 100644 index 0000000..fa9bc46 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/ot14-sql/preflight.log @@ -0,0 +1,53 @@ + + ZB.MOM.WW.OtOpcUa.Analyzers -> /Users/dohertj2/Desktop/OtOpcUa/src/Tooling/ZB.MOM.WW.OtOpcUa.Analyzers/bin/Release/netstandard2.0/ZB.MOM.WW.OtOpcUa.Analyzers.dll + ZB.MOM.WW.OtOpcUa.Core.Abstractions -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.Abstractions/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Core.Abstractions.dll + ZB.MOM.WW.OtOpcUa.Core.Scripting.Abstractions -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.Scripting.Abstractions/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Core.Scripting.Abstractions.dll + ZB.MOM.WW.OtOpcUa.Driver.Calculation.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Calculation.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Calculation.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.Ab.Transport -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Ab.Transport/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Ab.Transport.dll + ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.MTConnect.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.MTConnect.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.MTConnect.Contracts.dll + ZB.MOM.WW.OtOpcUa.Commons -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Commons/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Commons.dll + ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.S7.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.S7.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.S7.Contracts.dll + ZB.MOM.WW.OtOpcUa.Core.AlarmHistorian -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.AlarmHistorian/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Core.AlarmHistorian.dll + ZB.MOM.WW.OtOpcUa.Driver.AbCip.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbCip.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.AbCip.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Browser -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Browser/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Browser.dll + ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Transport -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Transport/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Transport.dll + ZB.MOM.WW.OtOpcUa.Cluster -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Cluster/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Cluster.dll + ZB.MOM.WW.OtOpcUa.Core.Scripting -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.Scripting/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Core.Scripting.dll + ZB.MOM.WW.OtOpcUa.Driver.Sql.Dialect -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Sql.Dialect/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Sql.Dialect.dll + ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser.dll + ZB.MOM.WW.OtOpcUa.Core.VirtualTags -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.VirtualTags/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Core.VirtualTags.dll + ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms.dll + ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser.dll + ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Session -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Session/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Session.dll + ZB.MOM.WW.OtOpcUa.Driver.Modbus.Addressing -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Addressing/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Addressing.dll + ZB.MOM.WW.OtOpcUa.Configuration -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Configuration/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Configuration.dll + ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Browser -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Browser/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Browser.dll + ZB.MOM.WW.OtOpcUa.Core -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Core.dll + ZB.MOM.WW.OtOpcUa.Security -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.Security/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Security.dll + ZB.MOM.WW.OtOpcUa.Driver.Modbus.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Contracts/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.dll + ZB.MOM.WW.OtOpcUa.Driver.Heidenhain -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.dll + ZB.MOM.WW.OtOpcUa.Driver.MTConnect -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.MTConnect/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.MTConnect.dll + ZB.MOM.WW.OtOpcUa.Driver.Sql -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Sql/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Sql.dll + ZB.MOM.WW.OtOpcUa.Driver.Galaxy -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.dll + ZB.MOM.WW.OtOpcUa.OpcUaServer -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.OpcUaServer.dll + ZB.MOM.WW.OtOpcUa.Driver.FOCAS -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.FOCAS/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.dll + ZB.MOM.WW.OtOpcUa.Driver.AbCip -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbCip/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.AbCip.dll + ZB.MOM.WW.OtOpcUa.Driver.AbLegacy -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.dll + ZB.MOM.WW.OtOpcUa.ControlPlane -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.ControlPlane/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.ControlPlane.dll + ZB.MOM.WW.OtOpcUa.Runtime -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.Runtime/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.Runtime.dll + ZB.MOM.WW.OtOpcUa.AdminUI -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.AdminUI.dll + ZB.MOM.WW.OtOpcUa.AdminUI.Tests -> /Users/dohertj2/Desktop/OtOpcUa/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.AdminUI.Tests.dll +Test run for /Users/dohertj2/Desktop/OtOpcUa/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/bin/Release/net10.0/ZB.MOM.WW.OtOpcUa.AdminUI.Tests.dll (.NETCoreApp,Version=v10.0) +A total of 1 test files matched the specified pattern. +Results File: /tmp/ot-ui-private-sql-results/ot14-private-sql-preflight.trx + +Passed! - Failed: 0, Passed: 9, Skipped: 0, Total: 9, Duration: 3 s - ZB.MOM.WW.OtOpcUa.AdminUI.Tests.dll (net10.0) diff --git a/components/ui-theme/validation/ot-ui/ot14-sql/preflight.trx b/components/ui-theme/validation/ot-ui/ot14-sql/preflight.trx new file mode 100644 index 0000000..b7655fb --- /dev/null +++ b/components/ui-theme/validation/ot-ui/ot14-sql/preflight.trx @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v3.0.2+dd36e86129 (64-bit .NET 10.0.14) +[xUnit.net 00:00:00.37] Discovering: ZB.MOM.WW.OtOpcUa.AdminUI.Tests +[xUnit.net 00:00:01.13] Discovered: ZB.MOM.WW.OtOpcUa.AdminUI.Tests +[xUnit.net 00:00:01.26] Starting: ZB.MOM.WW.OtOpcUa.AdminUI.Tests +[xUnit.net 00:00:11.01] Finished: ZB.MOM.WW.OtOpcUa.AdminUI.Tests + + + + \ No newline at end of file diff --git a/components/ui-theme/validation/ot-ui/ot14-sql/provisioning.json b/components/ui-theme/validation/ot-ui/ot14-sql/provisioning.json new file mode 100644 index 0000000..93035f7 --- /dev/null +++ b/components/ui-theme/validation/ot-ui/ot14-sql/provisioning.json @@ -0,0 +1,22 @@ +{ + "purpose": "Disposable owned SQL integration fixture; no pre-existing containers changed. Subsequent test discovery and execution use explicit loopback.", + "container": "291ece37954b22ddea8d961996539175ae62205e623a223f17170fe43cb37a17", + "name": "codex-ot-ui-sql-f7f58127", + "server": "127.0.0.1,32768", + "binding": "127.0.0.1:32768", + "image": "sha256:a2fbff321505724b8a271a214d4dec020a8e7a745c83eede0b9d762b51a9ab34", + "repositoryDigest": "mcr.microsoft.com/mssql/server@sha256:db9a8fe3098b7e8bbde41106bdc7caee942e97124e5fdb71b872ca208de3092d", + "createdUtc": "2026-11-14T03:39:06.871564+00:00", + "status": "ready", + "memoryLimitGiB": 2, + "cpuLimit": 2, + "readiness": "SELECT1 inside owned container succeeded", + "preflight": { + "passed": 9, + "failed": 0, + "skipped": 0, + "scope": "Four existing SQL-backed test classes including owned-instance reaper tests" + }, + "historyLimit": "Earlier filtered runs may have issued discovery SELECT1 against repository default before loopback override; no earlier SQL collection tests selected by these UI filters.", + "credentialState": "Random fixture credential is stored only in a private0600 temporary file outside the repository; never retained in evidence." +} diff --git a/components/ui-theme/validation/ot-ui/simple-wrapper-review.md b/components/ui-theme/validation/ot-ui/simple-wrapper-review.md new file mode 100644 index 0000000..25f68ff --- /dev/null +++ b/components/ui-theme/validation/ot-ui/simple-wrapper-review.md @@ -0,0 +1,11 @@ +# Independent first five wrapper review + +Reviewed actual source for RawNameDialog, RawDriverTypeDialog, RawStubModal, AreaModal and LineModal, including final c086f977/3ef919a7 safeguard. No additional blocker under the supplied loaded-DTO/callback contracts. + +- Presentation-local handlers capture submit/cancel/saved callbacks and generations. Submitted scalar data and row-version arrays detach before await; stale results do not apply errors or saved/close callbacks to replacements. Global per-instance single-flight remains until an already-dispatched operation returns. +- Raw submit-then-close order, driver type table/default, RawPath validation, area/line DTO mappings and data annotations remain. External form-button associations point to per-instance form IDs; Cancel remains safe initial focus and busy controls are disabled. +- Final missing-edit-DTO guard prevents an old populated draft being updated with an empty rowversion when Existing becomes null. Producer retained its two red cases and final49-unit/15-native186-check plus final32-check confirmation proof; this review did not independently rerun those suites. + +Caller work remains explicitly outside these wrappers' acceptance. RawDriverType and RawName require explicit stable target identity for different nodes sharing captions/initial values. RawTree must queue blocked/warning messages until the originating modal hides; actual removal/native cleanup must precede follow-up activation under the single-active policy. Native MutationObserver cleanup and generation-specific deactivation protect a new sibling dialog, but actual composed caller behavior still needs its own regression/browser proof. + +GlobalUns OnModalSavedAsync and ReloadAndCloseAsync await LoadStructureAsync then unconditionally CloseModals. Caller generations must prevent an earlier save/reload completion closing replacement B after the wrapper has already invoked its captured OnSaved. Existing service/callback exception propagation is preserved; arbitrary stale exceptions or all future caller compositions are not newly certified here. No source UI edit was made as part of this review.