feat(dashboard): settings page shows RecentFaultLimit and RecentSessionLimit

This commit is contained in:
Joseph Doherty
2026-08-18 06:39:32 -04:00
parent c94c4d43c4
commit a390fe16e2
2 changed files with 22 additions and 0 deletions
@@ -98,6 +98,8 @@ else
<tr><th scope="row">Dashboard enabled</th><td>@Snapshot.Configuration.Dashboard.Enabled</td></tr>
<tr><th scope="row">Anonymous localhost</th><td>@Snapshot.Configuration.Dashboard.AllowAnonymousLocalhost</td></tr>
<tr><th scope="row">Snapshot interval</th><td>@Snapshot.Configuration.Dashboard.SnapshotIntervalMilliseconds ms</td></tr>
<tr><th scope="row">Recent fault limit</th><td>@Snapshot.Configuration.Dashboard.RecentFaultLimit</td></tr>
<tr><th scope="row">Recent session limit</th><td>@Snapshot.Configuration.Dashboard.RecentSessionLimit</td></tr>
<tr><th scope="row">Show tag values</th><td>@Snapshot.Configuration.Dashboard.ShowTagValues</td></tr>
<tr><th scope="row">Untagged session visibility</th><td>@Snapshot.Configuration.Dashboard.UntaggedSessionVisibility</td></tr>
<tr><th scope="row">Worker protocol</th><td>@Snapshot.Configuration.Protocol.WorkerProtocolVersion</td></tr>
@@ -73,6 +73,26 @@ public sealed class SettingsPageTagVisibilityRenderTests
Assert.Contains("Dashboard role mapping", html, StringComparison.Ordinal);
}
/// <summary>
/// <c>RecentFaultLimit</c> and <c>RecentSessionLimit</c> reach the page. Non-default values
/// prove the projection is plumbed through, not just that the defaults happen to render.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[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<string> RenderAsync(DashboardOptions dashboard)
{
EffectiveGatewayConfiguration configuration =