feat(centralui): operator Alarm Summary page + per-instance snapshot fan-out (T13)

This commit is contained in:
Joseph Doherty
2026-06-18 02:21:41 -04:00
parent 6a6f8949b9
commit 3c9122bc07
8 changed files with 872 additions and 0 deletions
@@ -0,0 +1,36 @@
using ZB.MOM.WW.ScadaBridge.Commons.Messages.DebugView;
using ZB.MOM.WW.ScadaBridge.Communication;
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Services;
/// <summary>
/// Default <see cref="IInstanceSnapshotClient"/> — a thin facade over the
/// existing single-shot
/// <see cref="CommunicationService.RequestDebugSnapshotAsync"/> Ask (the same
/// Deployer-gated snapshot path the CLI <c>debug snapshot</c> command and the
/// Debug View use). Each call issues one <see cref="DebugSnapshotRequest"/>
/// with a fresh correlation id.
/// </summary>
public sealed class CommunicationInstanceSnapshotClient : IInstanceSnapshotClient
{
private readonly CommunicationService _communication;
/// <summary>
/// Initializes a new instance of the <see cref="CommunicationInstanceSnapshotClient"/> class.
/// </summary>
/// <param name="communication">Central-side cluster communication service.</param>
public CommunicationInstanceSnapshotClient(CommunicationService communication)
{
_communication = communication ?? throw new ArgumentNullException(nameof(communication));
}
/// <inheritdoc/>
public Task<DebugViewSnapshot> GetSnapshotAsync(
string siteIdentifier,
string instanceUniqueName,
CancellationToken cancellationToken = default)
{
var request = new DebugSnapshotRequest(instanceUniqueName, Guid.NewGuid().ToString("N"));
return _communication.RequestDebugSnapshotAsync(siteIdentifier, request, cancellationToken);
}
}