diff --git a/docs/ui-consistency/ot13-root-fields/HeidenhainTagConfigEditor-source-inventory.json b/docs/ui-consistency/ot13-root-fields/HeidenhainTagConfigEditor-source-inventory.json new file mode 100644 index 000000000..0d5235a2e --- /dev/null +++ b/docs/ui-consistency/ot13-root-fields/HeidenhainTagConfigEditor-source-inventory.json @@ -0,0 +1,22 @@ +[ + { + "tag": "input", + "key": "hh-address", + "labelsAdded": [] + }, + { + "tag": "input", + "key": "hh-datatype", + "labelsAdded": [] + }, + { + "tag": "input", + "key": "hh-datatype", + "labelsAdded": [] + }, + { + "tag": "select", + "key": "hh-datatype", + "labelsAdded": [] + } +] \ No newline at end of file diff --git a/docs/ui-consistency/ot13-root-fields/MTConnectTagConfigEditor-source-inventory.json b/docs/ui-consistency/ot13-root-fields/MTConnectTagConfigEditor-source-inventory.json new file mode 100644 index 000000000..78531178d --- /dev/null +++ b/docs/ui-consistency/ot13-root-fields/MTConnectTagConfigEditor-source-inventory.json @@ -0,0 +1,42 @@ +[ + { + "tag": "input", + "key": "mtc-fullname", + "labelsAdded": [] + }, + { + "tag": "select", + "key": "mtc-datatype", + "labelsAdded": [] + }, + { + "tag": "input", + "key": "mtc-category", + "labelsAdded": [] + }, + { + "tag": "input", + "key": "mtc-type", + "labelsAdded": [] + }, + { + "tag": "input", + "key": "mtc-subtype", + "labelsAdded": [] + }, + { + "tag": "input", + "key": "mtc-units", + "labelsAdded": [] + }, + { + "tag": "input", + "key": "mtc-device", + "labelsAdded": [] + }, + { + "tag": "input", + "key": "mtc-component", + "labelsAdded": [] + } +] \ No newline at end of file diff --git a/docs/ui-consistency/ot13-root-fields/SqlTagConfigEditor-source-inventory.json b/docs/ui-consistency/ot13-root-fields/SqlTagConfigEditor-source-inventory.json new file mode 100644 index 000000000..cfbc30ef6 --- /dev/null +++ b/docs/ui-consistency/ot13-root-fields/SqlTagConfigEditor-source-inventory.json @@ -0,0 +1,119 @@ +[ + { + "tag": "select", + "key": "field-01", + "labelsAdded": [ + "Model" + ] + }, + { + "tag": "input", + "key": "field-02", + "labelsAdded": [ + "Table or view" + ] + }, + { + "tag": "input", + "key": "field-03", + "labelsAdded": [ + "Named query" + ] + }, + { + "tag": "select", + "key": "field-04", + "labelsAdded": [ + "Type override" + ] + }, + { + "tag": "input", + "key": "field-05", + "labelsAdded": [ + "Result column" + ] + }, + { + "tag": "input", + "key": "field-06", + "labelsAdded": [ + "Row key column (optional)" + ] + }, + { + "tag": "input", + "key": "field-07", + "labelsAdded": [ + "Row key value" + ] + }, + { + "tag": "input", + "key": "field-08", + "labelsAdded": [ + "Key column" + ] + }, + { + "tag": "input", + "key": "field-09", + "labelsAdded": [ + "Key value" + ] + }, + { + "tag": "input", + "key": "field-10", + "labelsAdded": [ + "Value column" + ] + }, + { + "tag": "input", + "key": "field-11", + "labelsAdded": [ + "Value column" + ] + }, + { + "tag": "select", + "key": "field-12", + "labelsAdded": [ + "Row selector" + ] + }, + { + "tag": "input", + "key": "field-13", + "labelsAdded": [ + "Where column" + ] + }, + { + "tag": "input", + "key": "field-14", + "labelsAdded": [ + "Where value" + ] + }, + { + "tag": "input", + "key": "field-15", + "labelsAdded": [ + "Order-by (timestamp) column" + ] + }, + { + "tag": "input", + "key": "sqlTagWritable", + "labelsAdded": [] + }, + { + "tag": "input", + "key": "field-17", + "labelsAdded": [ + "Timestamp column (optional)" + ] + } +] \ No newline at end of file diff --git a/docs/ui-consistency/ot13-root-fields/tagbatch3-contract.log b/docs/ui-consistency/ot13-root-fields/tagbatch3-contract.log new file mode 100644 index 000000000..8b0ebeebd --- /dev/null +++ b/docs/ui-consistency/ot13-root-fields/tagbatch3-contract.log @@ -0,0 +1,52 @@ + + ZB.MOM.WW.OtOpcUa.Analyzers -> /Users/dohertj2/Desktop/OtOpcUa/src/Tooling/ZB.MOM.WW.OtOpcUa.Analyzers/bin/Debug/netstandard2.0/ZB.MOM.WW.OtOpcUa.Analyzers.dll + ZB.MOM.WW.OtOpcUa.Core.Abstractions -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.Abstractions/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Core.Abstractions.dll + ZB.MOM.WW.OtOpcUa.Core.Scripting.Abstractions -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.Scripting.Abstractions/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Core.Scripting.Abstractions.dll + ZB.MOM.WW.OtOpcUa.Driver.Ab.Transport -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Ab.Transport/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Ab.Transport.dll + ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.Modbus.Addressing -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Addressing/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Addressing.dll + ZB.MOM.WW.OtOpcUa.Driver.Calculation.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Calculation.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Calculation.Contracts.dll + ZB.MOM.WW.OtOpcUa.Core.AlarmHistorian -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.AlarmHistorian/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Core.AlarmHistorian.dll + ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.MTConnect.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.MTConnect.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.MTConnect.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.AbCip.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbCip.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.AbCip.Contracts.dll + ZB.MOM.WW.OtOpcUa.Commons -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Commons/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Commons.dll + ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.S7.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.S7.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.S7.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.Sql.Dialect -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Sql.Dialect/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Sql.Dialect.dll + ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Session -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Session/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Session.dll + ZB.MOM.WW.OtOpcUa.Core.Scripting -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.Scripting/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Core.Scripting.dll + ZB.MOM.WW.OtOpcUa.Driver.Modbus.Contracts -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Contracts/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Contracts.dll + ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Transport -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Transport/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Transport.dll + ZB.MOM.WW.OtOpcUa.Core.VirtualTags -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.VirtualTags/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Core.VirtualTags.dll + ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms.dll + ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser.dll + ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Browser -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Browser/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Browser.dll + ZB.MOM.WW.OtOpcUa.Configuration -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Configuration/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Configuration.dll + ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Browser -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Browser/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Browser.dll + ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Browser.dll + ZB.MOM.WW.OtOpcUa.Cluster -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Cluster/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Cluster.dll + ZB.MOM.WW.OtOpcUa.Core -> /Users/dohertj2/Desktop/OtOpcUa/src/Core/ZB.MOM.WW.OtOpcUa.Core/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Core.dll + ZB.MOM.WW.OtOpcUa.Security -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.Security/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Security.dll + ZB.MOM.WW.OtOpcUa.Driver.Galaxy -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Galaxy.dll + ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.dll + ZB.MOM.WW.OtOpcUa.Driver.Sql -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Sql/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Sql.dll + ZB.MOM.WW.OtOpcUa.Driver.Heidenhain -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.Heidenhain.dll + ZB.MOM.WW.OtOpcUa.Driver.FOCAS -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.FOCAS/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.dll + ZB.MOM.WW.OtOpcUa.Driver.AbCip -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbCip/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.AbCip.dll + ZB.MOM.WW.OtOpcUa.OpcUaServer -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.OpcUaServer.dll + ZB.MOM.WW.OtOpcUa.Driver.AbLegacy -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.dll + ZB.MOM.WW.OtOpcUa.Driver.MTConnect -> /Users/dohertj2/Desktop/OtOpcUa/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.MTConnect/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Driver.MTConnect.dll + ZB.MOM.WW.OtOpcUa.ControlPlane -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.ControlPlane/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.ControlPlane.dll + ZB.MOM.WW.OtOpcUa.Runtime -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.Runtime/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.Runtime.dll + ZB.MOM.WW.OtOpcUa.AdminUI -> /Users/dohertj2/Desktop/OtOpcUa/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.AdminUI.dll + ZB.MOM.WW.OtOpcUa.AdminUI.Tests -> /Users/dohertj2/Desktop/OtOpcUa/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.AdminUI.Tests.dll +Test run for /Users/dohertj2/Desktop/OtOpcUa/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/bin/Debug/net10.0/ZB.MOM.WW.OtOpcUa.AdminUI.Tests.dll (.NETCoreApp,Version=v10.0) +A total of 1 test files matched the specified pattern. + +Passed! - Failed: 0, Passed: 141, Skipped: 0, Total: 141, Duration: 227 ms - ZB.MOM.WW.OtOpcUa.AdminUI.Tests.dll (net10.0) diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/TagEditors/HeidenhainTagConfigEditor.razor b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/TagEditors/HeidenhainTagConfigEditor.razor index c20f37718..e21fef5b1 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/TagEditors/HeidenhainTagConfigEditor.razor +++ b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/TagEditors/HeidenhainTagConfigEditor.razor @@ -9,14 +9,14 @@
- - Address + - + @foreach (var e in HeidenhainCatalog.Entries) { } -
+
A fixed leaf, PLC:AREA:INDEX (element index into the control's advertised region; AREA one of @string.Join(", ", HeidenhainAddress.AreaTokens)), DATA:/path (needs DATA access enabled on the driver), or an alarm condition ALARM:* · ALARM:OTHER · @@ -24,34 +24,38 @@
- + @if (_m.IsCatalogAddress) { - -
Fixed by the namespace catalog.
+ +
Fixed by the namespace catalog.
} else if (_m.IsAlarmAddress) { - -
A Part 9 condition (active / inactive), not a value.
+ +
A Part 9 condition (active / inactive), not a value.
} else { - -
Must hold the area's native range (no narrowing): Boolean for bit areas, String for STRING.
+
Must hold the area's native range (no narrowing): Boolean for bit areas, String for STRING.
}
@if (_m.Validate() is { } error) { -
@error
+ } @code { + private readonly string _fieldScope = "heidenhain-tag-config-editor-" + Guid.NewGuid().ToString("N"); + private string FieldIds(params string[] names) => string.Join(" ", names.Select(FieldId)); + private string FieldId(string name) => $"{_fieldScope}-{name}"; + /// The tag's raw TagConfig JSON (supports @bind-ConfigJson). [Parameter] public string? ConfigJson { get; set; } /// Two-way config callback. diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/TagEditors/MTConnectTagConfigEditor.razor b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/TagEditors/MTConnectTagConfigEditor.razor index 2db136933..10ca3692e 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/TagEditors/MTConnectTagConfigEditor.razor +++ b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/TagEditors/MTConnectTagConfigEditor.razor @@ -19,59 +19,59 @@
- - DataItem id + -
The Agent DataItem's id attribute — the driver's read/subscribe key.
+
The Agent DataItem's id attribute — the driver's read/subscribe key.
- - @foreach (var v in Enum.GetValues()) { } -
Overrides the type the browse picker inferred. MTConnect is text on the wire — a wrong numeric type reads as Bad quality.
+
Overrides the type the browse picker inferred. MTConnect is text on the wire — a wrong numeric type reads as Bad quality.
@* Probe-sourced device-model metadata — display only. *@
- - Category +
- - Type +
- - Sub-type +
- - Units +
-
From the Agent's /probe device model — not editable here. Re-pick the tag in the browser to refresh it.
+
From the Agent's /probe device model — not editable here. Re-pick the tag in the browser to refresh it.
@* Author's own notes — not consumed by the driver or the runtime. *@
- - Device (note) +
- - Component (note) +
@@ -86,6 +86,10 @@ } @code { + private readonly string _fieldScope = "m-t-connect-tag-config-editor-" + Guid.NewGuid().ToString("N"); + private string FieldIds(params string[] names) => string.Join(" ", names.Select(FieldId)); + private string FieldId(string name) => $"{_fieldScope}-{name}"; + /// The tag's raw TagConfig JSON (supports @bind-ConfigJson). [Parameter] public string? ConfigJson { get; set; } /// Two-way config callback. diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/TagEditors/SqlTagConfigEditor.razor b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/TagEditors/SqlTagConfigEditor.razor index acd1a9a2f..a7bc5c5b1 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/TagEditors/SqlTagConfigEditor.razor +++ b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Shared/Uns/TagEditors/SqlTagConfigEditor.razor @@ -12,25 +12,25 @@ @using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Drivers.Pickers
-
-
@if (_m.Model != SqlTagModel.Query) { -
-
+
+
} else { -
- -
A key of the driver config's queries.
+
+ +
A key of the driver config's queries.
} -
- @foreach (var v in Enum.GetValues()) { }
@@ -39,50 +39,50 @@ @if (_m.Model == SqlTagModel.Query) {
-
- -
The column of the query's result this tag reads.
-
-
-
- -
Both blank ⇒ the query must return exactly one row.
+
+ +
The column of the query's result this tag reads.
+
+
+
+ +
Both blank ⇒ the query must return exactly one row.
} else if (_m.Model == SqlTagModel.KeyValue) {
-
-
-
- -
Bound as a parameter — never interpolated.
-
-
+
+
+
+ +
Bound as a parameter — never interpolated.
+
+
} else {
-
- -
The column this tag reads from the selected row.
-
- +
The column this tag reads from the selected row.
+
+
@if (_selectorMode == "Where") { -
-
-
-
+
+
+
+
} else { -
-
+
+
}
} @@ -90,12 +90,12 @@ else
- - +
-
+
Also needs the driver's Allow writes and the tag's Writable flag. Writes are a single-row UPDATE of the value column — KeyValue, or WideRow by where-pair only.
@@ -103,9 +103,9 @@ else
-
- -
Source-timestamp column; blank ⇒ the driver stamps the poll time.
+
+ +
Source-timestamp column; blank ⇒ the driver stamps the poll time.
@@ -124,6 +124,10 @@ else } @code { + private readonly string _fieldScope = "sql-tag-config-editor-" + Guid.NewGuid().ToString("N"); + private string FieldIds(params string[] names) => string.Join(" ", names.Select(FieldId)); + private string FieldId(string name) => $"{_fieldScope}-{name}"; + /// The tag's current TagConfig JSON. [Parameter] public string? ConfigJson { get; set; }