docs(scripting): Monaco script-editor guide + refresh Scripts page banner
This commit is contained in:
@@ -158,3 +158,16 @@ Address pickers in AdminUI support live browse for OpcUaClient and Galaxy driver
|
||||
The AdminUI's global **UNS** page (`/uns`) is the single surface for managing the unified namespace fleet-wide (Area → Line → Equipment → Tag/VirtualTag), replacing the old per-cluster UNS/Equipment/Tags tabs. See `docs/Uns.md`.
|
||||
|
||||
The `/uns` **TagModal** uses **driver-typed tag-config editors**: it dispatches by the bound driver's `DriverType` to a per-driver editor (Modbus/S7/AbCip/AbLegacy/TwinCAT/Focas) via `TagConfigEditorMap`, with client-side validation via `TagConfigValidator`; unmapped drivers (OpcUaClient/Galaxy/Historian.Wonderware) fall back to the generic raw-`TagConfig`-JSON textarea. Each editor is a thin razor shell over a pure `<Driver>TagConfigModel` (`FromJson`/`ToJson`/`Validate`, preserves unknown keys). To add a driver's editor, copy the Modbus template under `Components/Shared/Uns/TagEditors/` + `Uns/TagEditors/`, reusing the driver's enums + camelCase JSON property names, and register it in `TagConfigEditorMap` + `TagConfigValidator`. See `docs/plans/2026-06-09-driver-typed-tag-editors-design.md`.
|
||||
|
||||
## Scripting / Script Editor
|
||||
|
||||
C# virtual-tag scripts are authored in a **Roslyn-backed Monaco editor** on the
|
||||
ScriptEdit page (`/scripts/{id}`) and inline inside the virtual-tag modal on the
|
||||
`/uns` page. The editor provides completions, live diagnostics, hover, signature
|
||||
help, document formatting, and tag-path completions inside `ctx.GetTag("…")` /
|
||||
`ctx.SetVirtualTag("…")` literals — all backed by the same compiler context the
|
||||
runtime publish gate uses, so what the editor accepts/rejects matches publish
|
||||
exactly. The backend lives in
|
||||
`src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/ScriptAnalysis/` (six minimal-API
|
||||
endpoints under `/api/script-analysis/*`, gated by the `FleetAdmin` policy).
|
||||
See `docs/ScriptEditor.md` for the full guide.
|
||||
|
||||
Reference in New Issue
Block a user