diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/TagModal.razor b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/TagModal.razor index 27e2bac8..b433f723 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/TagModal.razor +++ b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/TagModal.razor @@ -298,10 +298,16 @@ private void OnGalaxyAddressPicked(string address) { _galaxyAddress = address; - var config = JsonSerializer.Serialize(new { FullName = address }); + // A fresh {FullName} blob would drop any tag-level historize the operator already set on this + // edit; re-merge it so re-picking a Galaxy address never silently clears "Historize this tag". + var config = TagHistorizeConfig.Set( + JsonSerializer.Serialize(new { FullName = address }), + _historizeState.IsHistorized, + _historizeState.HistorianTagname); _form.TagConfig = _galaxyPickedIsAlarm ? NativeAlarmModel.SeedDefaultAlarm(config) : config; + _historizeState = TagHistorizeConfig.Read(_form.TagConfig); } private IDictionary BuildEditorParameters() => new Dictionary 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 395e2c61..8c6d5df6 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 @@ -260,6 +260,7 @@ }; } _error = null; + _scriptCreateError = null; _scriptExpanded = false; // Load the bound script's source for the inline panel when editing an existing tag that