fix(adminui): canonicalize Modbus driver-type string on "Modbus" (was ModbusTcp)
This commit is contained in:
+1
-1
@@ -52,7 +52,7 @@ else
|
||||
private static readonly IReadOnlyDictionary<string, Type> _componentMap =
|
||||
new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
["ModbusTcp"] = typeof(ModbusDriverPage),
|
||||
["Modbus"] = typeof(ModbusDriverPage),
|
||||
["AbCip"] = typeof(AbCipDriverPage),
|
||||
["AbLegacy"] = typeof(AbLegacyDriverPage),
|
||||
["S7"] = typeof(S7DriverPage),
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@
|
||||
|
||||
private static readonly IReadOnlyList<DriverTypeEntry> _types = new[]
|
||||
{
|
||||
new DriverTypeEntry("ModbusTcp", "modbustcp", "[M]", "Modbus/TCP — generic registers/coils via port 502."),
|
||||
new DriverTypeEntry("Modbus TCP", "modbustcp", "[M]", "Modbus/TCP — generic registers/coils via port 502."),
|
||||
new DriverTypeEntry("AbCip", "abcip", "[CIP]", "Allen-Bradley CompactLogix/ControlLogix via CIP."),
|
||||
new DriverTypeEntry("AbLegacy", "ablegacy", "[AB]", "Allen-Bradley PLC-5/SLC-500/MicroLogix via DF1."),
|
||||
new DriverTypeEntry("S7", "s7", "[S7]", "Siemens S7-300/400/1200/1500 via ISO-on-TCP."),
|
||||
|
||||
+1
-1
@@ -321,7 +321,7 @@ else
|
||||
[Parameter] public string ClusterId { get; set; } = "";
|
||||
[Parameter] public string? DriverInstanceId { get; set; }
|
||||
|
||||
private const string DriverTypeKey = "ModbusTcp";
|
||||
private const string DriverTypeKey = "Modbus";
|
||||
|
||||
private bool IsNew => string.IsNullOrEmpty(DriverInstanceId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user