diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Clusters/Drivers/DriverTypePicker.razor b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Clusters/Drivers/DriverTypePicker.razor new file mode 100644 index 00000000..eafdf2cd --- /dev/null +++ b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Clusters/Drivers/DriverTypePicker.razor @@ -0,0 +1,51 @@ +@* TODO(3.3): This route collides with DriverEdit.razor's @page "/clusters/{ClusterId}/drivers/new". + Task 3.3 removes the /drivers/new directive from DriverEdit.razor so this page takes over. + Blazor resolves route conflicts at runtime, not compile time, so the build succeeds now. *@ +@page "/clusters/{ClusterId}/drivers/new" +@attribute [Microsoft.AspNetCore.Authorization.Authorize] + +
+

New driver · @ClusterId

+ Cancel +
+ + + +
+
Pick a driver type
+
+
+ @foreach (var t in _types) + { + + } +
+
+
+ +@code { + [Parameter] public string ClusterId { get; set; } = ""; + + private sealed record DriverTypeEntry(string DisplayName, string Slug, string Icon, string Description); + + private static readonly IReadOnlyList _types = new[] + { + new DriverTypeEntry("ModbusTcp", "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."), + new DriverTypeEntry("TwinCat", "twincat", "[TC]", "Beckhoff TwinCAT via ADS."), + new DriverTypeEntry("Focas", "focas", "[FOC]", "Fanuc CNC via FOCAS library."), + new DriverTypeEntry("OpcUaClient", "opcuaclient", "[OPC]", "Upstream OPC UA server pull."), + new DriverTypeEntry("Galaxy", "galaxy", "[Gx]", "AVEVA System Platform (Wonderware) via mxaccessgw."), + new DriverTypeEntry("Historian.Wonderware", "historianwonderware","[Hx]", "Wonderware Historian replay/cyclic reads."), + }; +}