From 5d6bd038682a906ccfebc9c3a1ae225709f75c46 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Mon, 14 Sep 2026 13:59:54 -0400 Subject: [PATCH] feat(central-ui): Sites page shows whether a site's deployed artifacts are current Each site card carries an Artifacts badge (current / out of date / never deployed) plus an "N of M instances out of date" line linking to Topology, both read from the shared pending-updates snapshot. The snapshot loads after the site list so a slow fleet evaluation never holds the cards, and a failure degrades the badge to "unavailable" instead of taking the page down. Header gains a Re-check button and an as-of caption; a successful Deploy Artifacts forces a refresh so the badge flips immediately. Claude-Session: https://claude.ai/code/session_01Y5ef34iUUMjmwnMpL9xgmB --- .../Components/Pages/Admin/Sites.razor | 124 +++++++++++++++++- .../Admin/SitesPageTests.cs | 109 +++++++++++++++ 2 files changed, 231 insertions(+), 2 deletions(-) diff --git a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Admin/Sites.razor b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Admin/Sites.razor index 34a34218..3c94acda 100644 --- a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Admin/Sites.razor +++ b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Admin/Sites.razor @@ -8,8 +8,10 @@ @using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Repositories @using ZB.MOM.WW.ScadaBridge.Communication @using ZB.MOM.WW.ScadaBridge.DeploymentManager +@using ZB.MOM.WW.ScadaBridge.DeploymentManager.PendingUpdates @attribute [Authorize(Policy = AuthorizationPolicies.RequireAdmin)] @inject ISiteRepository SiteRepository +@inject IPendingUpdatesCache PendingUpdates @inject ArtifactDeploymentService ArtifactDeploymentService @inject CommunicationService CommunicationService @inject AuthenticationStateProvider AuthStateProvider @@ -20,8 +22,23 @@
-

Site Management

+
+

Site Management

+ @if (_updates is not null) + { + Updates as of @_updates.ComputedAt.ToString("HH:mm:ss") UTC + } +
+