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 0b7b7c8f..e98cb425 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 @@ -91,10 +91,14 @@ else Startup timeout@Snapshot.Configuration.Worker.StartupTimeoutSeconds seconds Shutdown timeout@Snapshot.Configuration.Worker.ShutdownTimeoutSeconds seconds Heartbeat grace@Snapshot.Configuration.Worker.HeartbeatGraceSeconds seconds + Heartbeat check interval@Snapshot.Configuration.Worker.HeartbeatCheckIntervalSeconds seconds + Heartbeat stuck ceiling@Snapshot.Configuration.Worker.HeartbeatStuckCeilingSeconds seconds + Event channel full-mode timeout@Snapshot.Configuration.Worker.EventChannelFullModeTimeoutMilliseconds ms Default command timeout@Snapshot.Configuration.Sessions.DefaultCommandTimeoutSeconds seconds Max sessions@Snapshot.Configuration.Sessions.MaxSessions Event queue capacity@Snapshot.Configuration.Events.QueueCapacity Backpressure policy@Snapshot.Configuration.Events.BackpressurePolicy + Replay buffer max bytes@Snapshot.Configuration.Events.ReplayBufferMaxBytes Dashboard enabled@Snapshot.Configuration.Dashboard.Enabled Anonymous localhost@Snapshot.Configuration.Dashboard.AllowAnonymousLocalhost Snapshot interval@Snapshot.Configuration.Dashboard.SnapshotIntervalMilliseconds ms diff --git a/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/SettingsPageTagVisibilityRenderTests.cs b/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/SettingsPageTagVisibilityRenderTests.cs index c75d43d6..482e3bf0 100644 --- a/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/SettingsPageTagVisibilityRenderTests.cs +++ b/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/SettingsPageTagVisibilityRenderTests.cs @@ -95,10 +95,38 @@ public sealed class SettingsPageTagVisibilityRenderTests Assert.Contains("""Recent session limit456""", html, StringComparison.Ordinal); } - private static async Task RenderAsync(DashboardOptions dashboard) + /// + /// The heartbeat, event-channel and replay-byte-cap options (mxaccessgw#192, #172) reach the + /// page, each value in the row its own label names. Non-default values prove plumbing. + /// + /// A task that represents the asynchronous operation. + [Fact] + public async Task SettingsPage_RendersHeartbeatEventChannelAndReplayByteCapOptions() + { + string html = await RenderAsync(new GatewayOptions + { + Worker = new WorkerOptions + { + HeartbeatCheckIntervalSeconds = 7, + HeartbeatStuckCeilingSeconds = 321, + EventChannelFullModeTimeoutMilliseconds = 4567, + }, + Events = new EventOptions { ReplayBufferMaxBytes = 987654321 }, + }); + + Assert.Contains("""Heartbeat check interval7 seconds""", html, StringComparison.Ordinal); + Assert.Contains("""Heartbeat stuck ceiling321 seconds""", html, StringComparison.Ordinal); + Assert.Contains("""Event channel full-mode timeout4567 ms""", html, StringComparison.Ordinal); + Assert.Contains("""Replay buffer max bytes987654321""", html, StringComparison.Ordinal); + } + + private static Task RenderAsync(DashboardOptions dashboard) => + RenderAsync(new GatewayOptions { Dashboard = dashboard }); + + private static async Task RenderAsync(GatewayOptions options) { EffectiveGatewayConfiguration configuration = - new GatewayConfigurationProvider(Options.Create(new GatewayOptions { Dashboard = dashboard })) + new GatewayConfigurationProvider(Options.Create(options)) .GetEffectiveConfiguration(); ServiceCollection services = new();