Phase 7 Stream F — Admin UI for scripts + test harness + historian diagnostics #185
Reference in New Issue
Block a user
Delete Branch "phase-7-stream-f-admin-ui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds the draft-editor tab + page surface for authoring Phase 7 virtual tags + scripted alarms, plus the
/alarms/historianoperator diagnostics page. Monaco loads from CDN via a progressive-enhancement JS shim — the textarea works immediately so the page is functional even if the CDN is unreachable, and Blazor @bind stays authoritative with Monaco mirroring into the hidden textarea on every keystroke.New services
ScriptService— CRUD forScript. SHA-256SourceHashrecomputed on save soCompiledScriptCachehits on re-publish of unchanged source + misses when source actually changes (test pins the cache-hit behavior).VirtualTagService— CRUD forVirtualTag+ Enabled toggle.ScriptedAlarmService— CRUD forScriptedAlarm+ lookup of persistentScriptedAlarmState.ScriptTestHarnessService— pre-publish dry-run. Enforces plan decision #22: only inputs theDependencyExtractoridentifies can be supplied; missing / extra inputs surface as dedicated outcomes, compile errors surface asThrew. CapturesSetVirtualTagwrites + Serilog events from the script.HistorianDiagnosticsService— surfacesIAlarmHistorianSinkstate on/alarms/historian. Null sink reportsDisabled+ swallows retry; liveSqliteStoreAndForwardSinkroutes the Retry-dead-lettered button through.New UI
ScriptsTab.razorinside DraftEditor — list + create/edit/delete scripts with Monaco editor + dependency preview (reads / writes / rejections with source-span messages) + test-harness run panel (output + writes + log emissions).ScriptEditor.razor— reusable Monaco-backed textarea. Loads editor from CDN viawwwroot/js/monaco-loader.js. Textarea stays authoritative for Blazor binding; Monaco mirrors into it on every keystroke.AlarmsHistorian.razorat/alarms/historian— queue depth + dead-letter depth + drain state badge + last-error banner + Retry-dead-lettered button that's disabled when dead-letter depth is 0.DraftEditor.razor— new Scripts tab (5th alongside Equipment / UNS / Namespaces / Drivers / ACLs).DI wiring
All five services registered in
Program.cs. Null historian sink bound at Admin composition time — the realSqliteStoreAndForwardSinklives in the Server process; Admin reads status from whichever sink is present.Tests — 13/13
Phase7ServicesTestscovers:Next
Stream H (exit gate): full-solution test baseline + compliance script + merge to v2.