From 63273fd0f8b8b490bac19f8fab5dfaa177043448 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Sat, 27 Jun 2026 13:38:52 -0400 Subject: [PATCH] feat(central-ui): tag selector + data-type auto-fill on Secured Writes --- .../Pages/Operations/SecuredWrites.razor | 36 +++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Operations/SecuredWrites.razor b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Operations/SecuredWrites.razor index 64af8b5c..46c74272 100644 --- a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Operations/SecuredWrites.razor +++ b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Operations/SecuredWrites.razor @@ -5,6 +5,8 @@ @using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Repositories @using ZB.MOM.WW.ScadaBridge.Commons.Messages.Management @using ZB.MOM.WW.ScadaBridge.Commons.Types.Enums +@using ZB.MOM.WW.ScadaBridge.CentralUI.Components.Dialogs +@using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Protocol @using ZB.MOM.WW.ScadaBridge.Security @inject ISecuredWriteService SecuredWriteSvc @inject ISiteRepository SiteRepository @@ -58,8 +60,14 @@
- +
+ + +
@@ -89,6 +97,11 @@ Submit for verification
+ @@ -226,6 +239,25 @@ private string _formValueType = nameof(DataType.Boolean); private string _formComment = ""; + private NodeBrowserDialog? _browserRef; + + private bool CanBrowse => + !string.IsNullOrWhiteSpace(_formSiteIdentifier) + && !string.IsNullOrWhiteSpace(_formConnectionName); + + private async Task OpenBrowser() + { + if (!CanBrowse || _browserRef is null) return; + await _browserRef.ShowAsync(_formSiteIdentifier, _formConnectionName, _formTagPath); + } + + private void OnTagPicked(BrowseNode node) + { + _formTagPath = node.NodeId; + if (SecuredWriteDataTypeMapper.TryMap(node.DataType, out var dt)) + _formValueType = dt.ToString(); + } + private bool _submitting; private bool _actionInProgress;