@page "/site-calls/report" @attribute [Authorize(Policy = ScadaLink.Security.AuthorizationPolicies.RequireDeployment)] @using ScadaLink.Commons.Entities.Sites @using ScadaLink.Commons.Interfaces.Repositories @using ScadaLink.Commons.Messages.Audit @using ScadaLink.Communication @inject CommunicationService CommunicationService @inject ISiteRepository SiteRepository @inject IDialogService Dialog @inject ILogger Logger

Site Calls

@* ── Filters ── *@
@* Task 17: free-text Node filter — exact match against the SiteCall.SourceNode column. The Source site dropdown narrows to a site; Node narrows further within that site (or across sites if Source site is "Any"). *@
@if (_listError != null) {
@_listError
} @* ── Site call list ── *@ @if (_siteCalls == null) { @if (_loading) {
Loading…
} } else if (_siteCalls.Count == 0) {
No site calls
No cached calls match the current filters.
} else {
@foreach (var c in _siteCalls) { }
Tracked operation Source site Node Channel Target Status Retries Last error Created Updated Actions
@ShortId(c.TrackedOperationId) @SiteName(c.SourceSite) @(c.SourceNode ?? "—") @c.Channel @c.Target @c.Status @if (c.IsStuck) { Stuck } @c.RetryCount @if (!string.IsNullOrEmpty(c.LastError)) {
@c.LastError
} else { }
@* The TrackedOperationId is the audit CorrelationId, so the link deep-links into the central Audit Log pre-filtered to this cached call's lifecycle events. *@ View audit history @* Retry/Discard relay only on Parked rows — central relays the action to the owning site; Failed and other statuses are not actionable from central. *@ @if (c.Status == "Parked") { }
@* Keyset paging — the Task 4 query response carries a (CreatedAtUtc, Id) cursor rather than page numbers, so we keep a stack of cursors to step backwards and the response's NextAfter* cursor to step forwards. *@
@* No "of N" total: keyset paging has no cheap total-count, so the label is intentionally page-number-only. Do not "fix" this by adding a total — that would require a COUNT(*). *@ Page @(_cursorStack.Count + 1) · @_siteCalls.Count rows
}
@* ── Row detail modal ── *@ @if (_detailSiteCall != null) { var d = _detailSiteCall; }