Guard and name Raw manual entry and browsing workflows

This commit is contained in:
Joseph Doherty
2026-11-14 00:19:09 -05:00
parent 78b95cab08
commit ea5bb6a0bc
78 changed files with 3462 additions and 211 deletions
@@ -0,0 +1,4 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><base href="/" /><title>Local raw workflow fixture</title>
<link rel="stylesheet" href="_content/ZB.MOM.WW.OtOpcUa.AdminUI/lib/bootstrap/css/bootstrap.min.css" /><ThemeHead /><link rel="stylesheet" href="_content/ZB.MOM.WW.OtOpcUa.AdminUI/css/site.css" />
</head><body><Router AppAssembly="typeof(App).Assembly"><Found Context="route"><RouteView RouteData="route" /></Found></Router><script src="_content/ZB.MOM.WW.OtOpcUa.AdminUI/js/dialog-focus.js"></script><script src="_framework/blazor.web.js"></script></body></html>
@@ -0,0 +1,29 @@
@page "/"
@rendermode InteractiveServer
@inject WorkflowState State
@implements IDisposable
<ThemeShell Product="Raw workflow fixture">
<main class="p-3">
<h1>Raw workflow fixture</h1><p>Local synthetic callbacks; no real tag, broker, driver or database operations.</p>
<output id="open-requests">@State.OpenRequests</output><output id="closed-sessions">@State.ClosedSessions</output>
<output id="rebirth-requests">@State.RebirthRequests</output>
<output id="ready">@_ready</output><output id="requests">@State.Requests</output><output id="saved">@_saved</output>
<button id="open" class="btn btn-primary" @onclick="() => _visible=true">Add synthetic tags</button>
@if(Kind=="browse" || Kind=="rebirth")
{
<RawBrowseModal @bind-Visible="_visible" DeviceId="synthetic-device" DriverType="@State.DriverType" OnSaved="() => _saved++" />
}
else
{
<RawManualTagEntryModal @bind-Visible="_visible" DeviceId="synthetic-device" DriverType='@(Kind=="typed" ? "S7" : "Unmapped")' OnSaved="() => _saved++" />
}
</main>
</ThemeShell>
@code {
[SupplyParameterFromQuery(Name="kind")]public string? Kind{get;set;}
protected override void OnInitialized(){State.DriverType=Kind=="rebirth"?"Mqtt":"AbCip";State.Changed+=OnFixtureChanged;}
private void OnFixtureChanged()=>_=InvokeAsync(StateHasChanged);
public void Dispose()=>State.Changed-=OnFixtureChanged;
private bool _visible,_ready;private int _saved;
protected override void OnAfterRender(bool firstRender){if(firstRender){_ready=true;StateHasChanged();}}
}
@@ -0,0 +1,7 @@
@using Microsoft.AspNetCore.Components
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Routing
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using ZB.MOM.WW.Theme
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Raw
@using RawWorkflowCanary