From c0ce5d02bd448c51bdfc7368e6ad68dcb9ef27a9 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Thu, 28 May 2026 09:36:54 -0400 Subject: [PATCH] feat(adminui): add DriverTypePicker landing page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds /clusters/{ClusterId}/drivers/new picker page (Task 3.1). Renders a 9-card Bootstrap grid — one card per driver type — each linking to /clusters/{ClusterId}/drivers/new/{slug}. No data fetch; type list is hardcoded. Route collides with DriverEdit.razor's same directive; Task 3.3 removes the duplicate to resolve the runtime ambiguity. --- .../Clusters/Drivers/DriverTypePicker.razor | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Clusters/Drivers/DriverTypePicker.razor 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."), + }; +}