From a390fe16e2ffbb2affb2749f1268f88bd0cd3a5c Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Tue, 18 Aug 2026 06:39:32 -0400 Subject: [PATCH] feat(dashboard): settings page shows RecentFaultLimit and RecentSessionLimit --- .../Components/Pages/SettingsPage.razor | 2 ++ .../SettingsPageTagVisibilityRenderTests.cs | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/ZB.MOM.WW.MxGateway.Server/Dashboard/Components/Pages/SettingsPage.razor b/src/ZB.MOM.WW.MxGateway.Server/Dashboard/Components/Pages/SettingsPage.razor index 5600287..b064d93 100644 --- a/src/ZB.MOM.WW.MxGateway.Server/Dashboard/Components/Pages/SettingsPage.razor +++ b/src/ZB.MOM.WW.MxGateway.Server/Dashboard/Components/Pages/SettingsPage.razor @@ -98,6 +98,8 @@ else Dashboard enabled@Snapshot.Configuration.Dashboard.Enabled Anonymous localhost@Snapshot.Configuration.Dashboard.AllowAnonymousLocalhost Snapshot interval@Snapshot.Configuration.Dashboard.SnapshotIntervalMilliseconds ms + Recent fault limit@Snapshot.Configuration.Dashboard.RecentFaultLimit + Recent session limit@Snapshot.Configuration.Dashboard.RecentSessionLimit Show tag values@Snapshot.Configuration.Dashboard.ShowTagValues Untagged session visibility@Snapshot.Configuration.Dashboard.UntaggedSessionVisibility Worker protocol@Snapshot.Configuration.Protocol.WorkerProtocolVersion diff --git a/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/SettingsPageTagVisibilityRenderTests.cs b/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/SettingsPageTagVisibilityRenderTests.cs index 5de301a..0c8f7e9 100644 --- a/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/SettingsPageTagVisibilityRenderTests.cs +++ b/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/SettingsPageTagVisibilityRenderTests.cs @@ -73,6 +73,26 @@ public sealed class SettingsPageTagVisibilityRenderTests Assert.Contains("Dashboard role mapping", html, StringComparison.Ordinal); } + /// + /// RecentFaultLimit and RecentSessionLimit reach the page. Non-default values + /// prove the projection is plumbed through, not just that the defaults happen to render. + /// + /// A task that represents the asynchronous operation. + [Fact] + public async Task SettingsPage_RendersRecentFaultAndSessionLimits() + { + string html = await RenderAsync(new DashboardOptions + { + RecentFaultLimit = 123, + RecentSessionLimit = 456, + }); + + Assert.Contains("Recent fault limit", html, StringComparison.Ordinal); + Assert.Contains("123", html, StringComparison.Ordinal); + Assert.Contains("Recent session limit", html, StringComparison.Ordinal); + Assert.Contains("456", html, StringComparison.Ordinal); + } + private static async Task RenderAsync(DashboardOptions dashboard) { EffectiveGatewayConfiguration configuration =