615b487a77
Adds missing <summary>/<param> XML docs across 99 server, worker, and test files so CommentChecker reports zero issues (TreatWarningsAsErrors needs the analyzer clean). Bundles in WIP dashboard work: NavSection extraction, MainLayout/site.css/js styling alignment, and DashboardOptions/Auth tweaks.
27 lines
952 B
C#
27 lines
952 B
C#
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.SignalR;
|
|
|
|
namespace ZB.MOM.WW.MxGateway.Server.Dashboard.Hubs;
|
|
|
|
/// <summary>
|
|
/// SignalR hub that pushes alarm-feed messages from the gateway's
|
|
/// central alarm monitor. Connected clients auto-join
|
|
/// <see cref="AllAlarmsGroup"/> on connect and receive every
|
|
/// <c>AlarmFeedMessage</c> the monitor emits.
|
|
/// </summary>
|
|
[Authorize(Policy = DashboardAuthenticationDefaults.HubClientsPolicy)]
|
|
public sealed class AlarmsHub : Hub
|
|
{
|
|
public const string AllAlarmsGroup = "__alarms__";
|
|
|
|
/// <summary>Method name used to push <c>AlarmFeedMessage</c> values to clients.</summary>
|
|
public const string AlarmMessage = "AlarmFeed";
|
|
|
|
/// <inheritdoc />
|
|
public override async Task OnConnectedAsync()
|
|
{
|
|
await Groups.AddToGroupAsync(Context.ConnectionId, AllAlarmsGroup).ConfigureAwait(false);
|
|
await base.OnConnectedAsync().ConfigureAwait(false);
|
|
}
|
|
}
|