Promote service version into the dashboard title and surface the active alarm filter patterns in the Alarms panel so operators can verify scope at a glance without reading logs or the footer block

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-04-13 10:05:47 -04:00
parent 517d92c76f
commit 4fe37fd1b7
5 changed files with 58 additions and 12 deletions

View File

@@ -29,7 +29,6 @@ namespace ZB.MOM.WW.LmxOpcUa.Tests.Status
html.ShouldContain("Subscriptions");
html.ShouldContain("Galaxy Info");
html.ShouldContain("Operations");
html.ShouldContain("Footer");
}
/// <summary>
@@ -82,15 +81,19 @@ namespace ZB.MOM.WW.LmxOpcUa.Tests.Status
}
/// <summary>
/// Confirms that the footer renders timestamp and version information.
/// The dashboard title shows the service version inline so operators can identify the deployed
/// build without scrolling, and the standalone footer panel is gone.
/// </summary>
[Fact]
public void GenerateHtml_Footer_ContainsTimestampAndVersion()
public void GenerateHtml_Title_ShowsVersion_NoFooter()
{
var sut = CreateService();
var html = sut.GenerateHtml();
html.ShouldContain("Generated:");
html.ShouldContain("Version:");
html.ShouldContain("<h1>LmxOpcUa Status Dashboard");
html.ShouldContain("class='version'");
html.ShouldNotContain("<h2>Footer</h2>");
html.ShouldNotContain("Generated:");
}
/// <summary>
@@ -180,6 +183,20 @@ namespace ZB.MOM.WW.LmxOpcUa.Tests.Status
json.ShouldContain("FilterEnabled");
json.ShouldContain("FilterPatternCount");
json.ShouldContain("FilterIncludedObjectCount");
json.ShouldContain("FilterPatterns");
}
/// <summary>
/// With no filter configured, the Alarms panel renders an explicit "disabled" line so operators
/// know all alarm-bearing objects are being tracked.
/// </summary>
[Fact]
public void GenerateHtml_AlarmsPanel_FilterDisabled_ShowsDisabledLine()
{
var sut = CreateService();
var html = sut.GenerateHtml();
html.ShouldContain("Filter: <b>disabled</b>");
}
/// <summary>