Associate AB and Focas tag editor fields
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
[
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "field-01",
|
||||
"labelsAdded": [
|
||||
"Device host"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "field-02",
|
||||
"labelsAdded": [
|
||||
"Tag path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "select",
|
||||
"key": "field-03",
|
||||
"labelsAdded": [
|
||||
"Data type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "abcip-writable",
|
||||
"labelsAdded": []
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,28 @@
|
||||
[
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "field-01",
|
||||
"labelsAdded": [
|
||||
"Device host"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "field-02",
|
||||
"labelsAdded": [
|
||||
"Address"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "select",
|
||||
"key": "field-03",
|
||||
"labelsAdded": [
|
||||
"Data type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "ablegacy-writable",
|
||||
"labelsAdded": []
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,28 @@
|
||||
[
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "field-01",
|
||||
"labelsAdded": [
|
||||
"Device host"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "field-02",
|
||||
"labelsAdded": [
|
||||
"Address"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "select",
|
||||
"key": "field-03",
|
||||
"labelsAdded": [
|
||||
"Data type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "input",
|
||||
"key": "focas-writable",
|
||||
"labelsAdded": []
|
||||
}
|
||||
]
|
||||
@@ -11,3 +11,5 @@ Batch2: Galaxy, Heidenhain and Modbus driver forms:30focused field/parser/standa
|
||||
Batch3: MQTT, MTConnect and OPC UA Client driver fields:98focused checks passed. Existing number parser messages now use the visible human field label through DisplayName across the nine migrated drivers; all nine field/standalone/parser groups plus existing page serialization/map tests pass188/188. No default, emitted JSON, callback or protocol-body change.
|
||||
|
||||
Batch4: S7, SQL and TwinCAT driver fields:115focused/serialization/parity cases pass. The named-queries textarea was the one remaining rendered name failure after initial association; its existing visible panel heading now supplies the name, and existing connection-ref/queries errors have persistent correctly scoped feedback targets. Raw initial failure is retained. Protocol C# and existing event/bind expressions remain unchanged.
|
||||
|
||||
Tag batch1: AB CIP, AB Legacy and FOCAS editors retain defaults and callbacks while receiving unique native labels/IDs;154focused field/model/authoring parity checks pass. FOCAS’s existing address/data-type mismatch now has one persistent linked feedback target for exactly those two fields, preserving its original refusal predicate.
|
||||
|
||||
@@ -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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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: 154, Skipped: 0, Total: 154, Duration: 171 ms - ZB.MOM.WW.OtOpcUa.AdminUI.Tests.dll (net10.0)
|
||||
+11
-8
@@ -4,25 +4,25 @@
|
||||
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Drivers.Pickers
|
||||
|
||||
<div class="row g-2">
|
||||
<div class="col-md-4"><label class="form-label">Device host</label>
|
||||
<input class="form-control form-control-sm mono" value="@_m.DeviceHostAddress" placeholder="ab://gateway[:port]/cip-path" @onchange="@(e => Update(() => _m.DeviceHostAddress = e.Value?.ToString() ?? string.Empty))" /></div>
|
||||
<div class="col-md-4"><label for="@FieldId("field-01")" class="form-label">Device host</label>
|
||||
<input id="@FieldId("field-01")" class="form-control form-control-sm mono" value="@_m.DeviceHostAddress" placeholder="ab://gateway[:port]/cip-path" @onchange="@(e => Update(() => _m.DeviceHostAddress = e.Value?.ToString() ?? string.Empty))" /></div>
|
||||
<div class="col-md-5">
|
||||
<label class="form-label">Tag path</label>
|
||||
<label for="@FieldId("field-02")" class="form-label">Tag path</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input class="form-control form-control-sm mono" value="@_m.TagPath" placeholder="e.g. Motor1.Speed" @onchange="@(e => Update(() => _m.TagPath = e.Value?.ToString() ?? string.Empty))" />
|
||||
<input id="@FieldId("field-02")" class="form-control form-control-sm mono" value="@_m.TagPath" placeholder="e.g. Motor1.Speed" @onchange="@(e => Update(() => _m.TagPath = e.Value?.ToString() ?? string.Empty))" />
|
||||
<button type="button" class="btn btn-outline-secondary" @onclick="@(() => _showPicker = true)">Build</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3"><label class="form-label">Data type</label>
|
||||
<select class="form-select form-select-sm" value="@_m.DataType" @onchange="@(e => Update(() => _m.DataType = ParseEnum(e.Value, AbCipDataType.DInt)))">
|
||||
<div class="col-md-3"><label for="@FieldId("field-03")" class="form-label">Data type</label>
|
||||
<select id="@FieldId("field-03")" class="form-select form-select-sm" value="@_m.DataType" @onchange="@(e => Update(() => _m.DataType = ParseEnum(e.Value, AbCipDataType.DInt)))">
|
||||
@foreach (var v in Enum.GetValues<AbCipDataType>()) { <option value="@v">@v</option> }
|
||||
</select></div>
|
||||
<div class="col-12">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="abcip-writable"
|
||||
<input type="checkbox" class="form-check-input" id="@FieldId("abcip-writable")"
|
||||
checked="@(_m.Writable ?? true)"
|
||||
@onchange="@(e => Update(() => _m.Writable = e.Value is bool b && b))" />
|
||||
<label class="form-check-label small" for="abcip-writable">Writable (uncheck for a read-only tag)</label>
|
||||
<label class="form-check-label small" for="@FieldId("abcip-writable")">Writable (uncheck for a read-only tag)</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -41,6 +41,9 @@
|
||||
}
|
||||
|
||||
@code {
|
||||
private readonly string _fieldScope = "ab-cip-tag-config-editor-" + Guid.NewGuid().ToString("N");
|
||||
private string FieldId(string name) => $"{_fieldScope}-{name}";
|
||||
|
||||
[Parameter] public string? ConfigJson { get; set; }
|
||||
[Parameter] public EventCallback<string> ConfigJsonChanged { get; set; }
|
||||
/// <summary>DriverType of the selected driver — lets browse-capable pickers open a universal session.</summary>
|
||||
|
||||
+11
-8
@@ -4,25 +4,25 @@
|
||||
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Drivers.Pickers
|
||||
|
||||
<div class="row g-2">
|
||||
<div class="col-md-4"><label class="form-label">Device host</label>
|
||||
<input class="form-control form-control-sm mono" value="@_m.DeviceHostAddress" placeholder="ab://host" @onchange="@(e => Update(() => _m.DeviceHostAddress = e.Value?.ToString() ?? string.Empty))" /></div>
|
||||
<div class="col-md-4"><label for="@FieldId("field-01")" class="form-label">Device host</label>
|
||||
<input id="@FieldId("field-01")" class="form-control form-control-sm mono" value="@_m.DeviceHostAddress" placeholder="ab://host" @onchange="@(e => Update(() => _m.DeviceHostAddress = e.Value?.ToString() ?? string.Empty))" /></div>
|
||||
<div class="col-md-5">
|
||||
<label class="form-label">Address</label>
|
||||
<label for="@FieldId("field-02")" class="form-label">Address</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input class="form-control form-control-sm mono" value="@_m.Address" placeholder="e.g. N7:0, B3:0/0" @onchange="@(e => Update(() => _m.Address = e.Value?.ToString() ?? string.Empty))" />
|
||||
<input id="@FieldId("field-02")" class="form-control form-control-sm mono" value="@_m.Address" placeholder="e.g. N7:0, B3:0/0" @onchange="@(e => Update(() => _m.Address = e.Value?.ToString() ?? string.Empty))" />
|
||||
<button type="button" class="btn btn-outline-secondary" @onclick="@(() => _showPicker = true)">Build</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3"><label class="form-label">Data type</label>
|
||||
<select class="form-select form-select-sm" value="@_m.DataType" @onchange="@(e => Update(() => _m.DataType = ParseEnum(e.Value, AbLegacyDataType.Int)))">
|
||||
<div class="col-md-3"><label for="@FieldId("field-03")" class="form-label">Data type</label>
|
||||
<select id="@FieldId("field-03")" class="form-select form-select-sm" value="@_m.DataType" @onchange="@(e => Update(() => _m.DataType = ParseEnum(e.Value, AbLegacyDataType.Int)))">
|
||||
@foreach (var v in Enum.GetValues<AbLegacyDataType>()) { <option value="@v">@v</option> }
|
||||
</select></div>
|
||||
<div class="col-12">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="ablegacy-writable"
|
||||
<input type="checkbox" class="form-check-input" id="@FieldId("ablegacy-writable")"
|
||||
checked="@(_m.Writable ?? true)"
|
||||
@onchange="@(e => Update(() => _m.Writable = e.Value is bool b && b))" />
|
||||
<label class="form-check-label small" for="ablegacy-writable">Writable (uncheck for a read-only tag)</label>
|
||||
<label class="form-check-label small" for="@FieldId("ablegacy-writable")">Writable (uncheck for a read-only tag)</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -39,6 +39,9 @@
|
||||
}
|
||||
|
||||
@code {
|
||||
private readonly string _fieldScope = "ab-legacy-tag-config-editor-" + Guid.NewGuid().ToString("N");
|
||||
private string FieldId(string name) => $"{_fieldScope}-{name}";
|
||||
|
||||
[Parameter] public string? ConfigJson { get; set; }
|
||||
[Parameter] public EventCallback<string> ConfigJsonChanged { get; set; }
|
||||
/// <summary>DriverType of the selected driver — lets browse-capable pickers open a universal session.</summary>
|
||||
|
||||
+13
-8
@@ -4,17 +4,17 @@
|
||||
@using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Drivers.Pickers
|
||||
|
||||
<div class="row g-2">
|
||||
<div class="col-md-4"><label class="form-label">Device host</label>
|
||||
<input class="form-control form-control-sm mono" value="@_m.DeviceHostAddress" placeholder="host[:port]" @onchange="@(e => Update(() => _m.DeviceHostAddress = e.Value?.ToString() ?? string.Empty))" /></div>
|
||||
<div class="col-md-4"><label for="@FieldId("field-01")" class="form-label">Device host</label>
|
||||
<input id="@FieldId("field-01")" class="form-control form-control-sm mono" value="@_m.DeviceHostAddress" placeholder="host[:port]" @onchange="@(e => Update(() => _m.DeviceHostAddress = e.Value?.ToString() ?? string.Empty))" /></div>
|
||||
<div class="col-md-5">
|
||||
<label class="form-label">Address</label>
|
||||
<label for="@FieldId("field-02")" class="form-label">Address</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input class="form-control form-control-sm mono" value="@_m.Address" placeholder="e.g. X0.0, R100, PARAM:1815/0, MACRO:500" @onchange="@(e => Update(() => _m.Address = e.Value?.ToString() ?? string.Empty))" />
|
||||
<input aria-describedby="@FieldId("type-mismatch")" aria-invalid="@(FocasTagDefinitionFactory.DescribeDataTypeMismatch(_m.DataType, _m.Address) is not null ? "true" : null)" id="@FieldId("field-02")" class="form-control form-control-sm mono" value="@_m.Address" placeholder="e.g. X0.0, R100, PARAM:1815/0, MACRO:500" @onchange="@(e => Update(() => _m.Address = e.Value?.ToString() ?? string.Empty))" />
|
||||
<button type="button" class="btn btn-outline-secondary" @onclick="@(() => _showPicker = true)">Build</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3"><label class="form-label">Data type</label>
|
||||
<select class="form-select form-select-sm" value="@_m.DataType" @onchange="@(e => Update(() => _m.DataType = ParseEnum(e.Value, FocasDataType.Int32)))">
|
||||
<div class="col-md-3"><label for="@FieldId("field-03")" class="form-label">Data type</label>
|
||||
<select aria-describedby="@FieldId("type-mismatch")" aria-invalid="@(FocasTagDefinitionFactory.DescribeDataTypeMismatch(_m.DataType, _m.Address) is not null ? "true" : null)" id="@FieldId("field-03")" class="form-select form-select-sm" value="@_m.DataType" @onchange="@(e => Update(() => _m.DataType = ParseEnum(e.Value, FocasDataType.Int32)))">
|
||||
@foreach (var v in Enum.GetValues<FocasDataType>())
|
||||
{
|
||||
@* String is only readable from the fixed tree (FocasTagDefinitionFactory.DescribeDataTypeMismatch):
|
||||
@@ -26,15 +26,17 @@
|
||||
}
|
||||
}
|
||||
</select>
|
||||
<div id="@FieldId("type-mismatch")" class="field-error" role="alert">
|
||||
@if (FocasTagDefinitionFactory.DescribeDataTypeMismatch(_m.DataType, _m.Address) is { } typeError)
|
||||
{
|
||||
<div class="form-text text-danger small">@typeError</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="focas-writable" disabled checked="false" />
|
||||
<label class="form-check-label small text-muted" for="focas-writable">Writable — FOCAS writes are unsupported; tags are read-only.</label>
|
||||
<input type="checkbox" class="form-check-input" id="@FieldId("focas-writable")" disabled checked="false" />
|
||||
<label class="form-check-label small text-muted" for="@FieldId("focas-writable")">Writable — FOCAS writes are unsupported; tags are read-only.</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,6 +55,9 @@
|
||||
}
|
||||
|
||||
@code {
|
||||
private readonly string _fieldScope = "focas-tag-config-editor-" + Guid.NewGuid().ToString("N");
|
||||
private string FieldId(string name) => $"{_fieldScope}-{name}";
|
||||
|
||||
[Parameter] public string? ConfigJson { get; set; }
|
||||
[Parameter] public EventCallback<string> ConfigJsonChanged { get; set; }
|
||||
/// <summary>DriverType of the selected driver — lets browse-capable pickers open a universal session.</summary>
|
||||
|
||||
Reference in New Issue
Block a user