diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/VirtualTagModal.razor b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/VirtualTagModal.razor index a1767c05..db93f2c1 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/VirtualTagModal.razor +++ b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/VirtualTagModal.razor @@ -47,7 +47,8 @@
- + @foreach (var (id, display) in Scripts) { @@ -57,6 +58,48 @@
+ + @* Inline script-source editor. Shown only when a script is bound. This panel saves + the SHARED Script row on its OWN concurrency-guarded button — it is deliberately + separate from the virtual-tag Create/Save below and never touches _form or closes + the modal. *@ + @if (!string.IsNullOrEmpty(_form.ScriptId) && _scriptLoaded) + { +
+
+ Script source + +
+ @if (_scriptExpanded) + { +
+
+ Editing shared script "@_scriptName" — used by + @_scriptUsageCount virtual tag(s). Changes affect all of them. +
+ + @if (!string.IsNullOrWhiteSpace(_scriptError)) + { +
@_scriptError
+ } + else if (_scriptSaved) + { +
Script saved.
+ } +
+ +
+
+ } +
+ }
@@ -92,8 +135,8 @@ }