feat(adminui): B2-WP3 driver/device config modals + page-to-form refactor

Extract the 8 typed driver pages into embeddable <Driver>DriverForm bodies
(channel/protocol config) and add per-driver <Driver>DeviceForm bodies
(connection endpoint -> Device.DeviceConfig, v3 endpoint split). New
DriverConfigModal + DeviceModal dispatch by DriverType (DriverTypeNames) for
the /raw tree; Test-connect inside DeviceModal builds the merged Driver+Device
config transiently via DriverDeviceConfigMerger. Routed pages now host the
form bodies and keep working. Round-trip + enum-serialization guard tests for
the Modbus driver form + Modbus device model; retargeted the existing
page-form serialization tests + the _jsonOpts converter guard to the forms.

Claude-Session: https://claude.ai/code/session_01LVneM3eh1UtJxEisFXgmox
This commit is contained in:
Joseph Doherty
2026-07-16 03:26:24 -04:00
parent 54ab413396
commit 844f93f64f
44 changed files with 3728 additions and 2474 deletions
@@ -3,13 +3,14 @@ using System.Text.Json.Serialization;
using Shouldly;
using Xunit;
using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Pages.Clusters.Drivers;
using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Drivers.Forms;
using ZB.MOM.WW.OtOpcUa.Driver.S7;
namespace ZB.MOM.WW.OtOpcUa.AdminUI.Tests;
// v3 Batch-1 migration: the S7 driver page dropped its pre-declared Tags editor — tags now live in
// the Raw tree (/raw, Batch 2), and S7DriverOptions.Tags (the typed S7TagDefinition list) +
// S7DriverPage.S7TagRow were retired (the driver now consumes RawTags). The former tag-editor and
// S7DriverForm.S7TagRow were retired (the driver now consumes RawTags). The former tag-editor and
// tag-serialization tests (S7TagRow_*, TagList_SerializeRoundTrip_PreservesTags, and the tag legs of
// the round-trip tests) were removed. The connection/protocol-field + enum-serialization round-trip
// coverage (CpuType, S7DataType) is retained below unchanged.
@@ -91,7 +92,7 @@ public sealed class S7DriverPageFormSerializationTests
ProbeTimeoutSeconds = 20,
};
var form = S7DriverPage.FormModel.FromOptions(opts);
var form = S7DriverForm.FormModel.FromOptions(opts);
var roundTripped = form.ToOptions();
roundTripped.Host.ShouldBe("192.168.1.50");