feat(ui): add Node column + filter to NotificationOutbox grid

This commit is contained in:
Joseph Doherty
2026-05-23 18:04:59 -04:00
parent bb29d65a94
commit b9c017136d
6 changed files with 81 additions and 6 deletions

View File

@@ -60,6 +60,16 @@
<input id="no-list" type="text" class="form-control form-control-sm"
style="min-width: 140px;" placeholder="Any" @bind="_listFilter" />
</div>
@* Task 16: free-text Node filter — exact match against the
notification's SourceNode column. Sites + central nodes
both flow through this single input. *@
<div class="col-auto">
<label class="form-label small mb-1" for="no-node">Node</label>
<input id="no-node" type="text" class="form-control form-control-sm"
style="min-width: 140px;" placeholder="Any"
data-test="notif-filter-node"
@bind="_nodeFilter" />
</div>
<div class="col-auto">
<label class="form-label small mb-1" for="no-from">From</label>
<input id="no-from" type="datetime-local" class="form-control form-control-sm"
@@ -131,6 +141,7 @@
<th>Status</th>
<th class="text-end">Retries</th>
<th>Source site</th>
<th>Node</th>
<th>Created</th>
<th>Delivered</th>
<th class="text-end">Actions</th>
@@ -162,6 +173,7 @@
</td>
<td class="text-end font-monospace">@n.RetryCount</td>
<td><span class="small">@SiteName(n.SourceSiteId)</span></td>
<td><span class="small">@(n.SourceNode ?? "—")</span></td>
<td><TimestampDisplay Value="@n.CreatedAt" Format="yyyy-MM-dd HH:mm" /></td>
<td><TimestampDisplay Value="@n.DeliveredAt" Format="yyyy-MM-dd HH:mm" NullText="—" /></td>
<td class="text-end" @ondblclick:stopPropagation="true">
@@ -253,6 +265,9 @@
<dt class="col-sm-3">Source site</dt>
<dd class="col-sm-9">@SiteName(d.SourceSiteId)</dd>
<dt class="col-sm-3">Source node</dt>
<dd class="col-sm-9">@(string.IsNullOrEmpty(d.SourceNode) ? "—" : d.SourceNode)</dd>
<dt class="col-sm-3">Source instance</dt>
<dd class="col-sm-9">@(string.IsNullOrEmpty(d.SourceInstanceId) ? "—" : d.SourceInstanceId)</dd>
@@ -372,6 +387,7 @@
private string _siteFilter = string.Empty;
private string _listFilter = string.Empty;
private string _subjectFilter = string.Empty;
private string _nodeFilter = string.Empty;
private bool _stuckOnly;
private DateTime? _fromFilter;
private DateTime? _toFilter;
@@ -422,7 +438,8 @@
From: ToUtc(_fromFilter),
To: ToUtc(_toFilter),
PageNumber: _pageNumber,
PageSize: _pageSize);
PageSize: _pageSize,
SourceNodeFilter: NullIfEmpty(_nodeFilter));
var response = await CommunicationService.QueryNotificationOutboxAsync(request);
if (response.Success)
@@ -597,6 +614,7 @@
_siteFilter = string.Empty;
_listFilter = string.Empty;
_subjectFilter = string.Empty;
_nodeFilter = string.Empty;
_stuckOnly = false;
_fromFilter = null;
_toFilter = null;
@@ -608,6 +626,7 @@
!string.IsNullOrEmpty(_siteFilter) ||
!string.IsNullOrEmpty(_listFilter) ||
!string.IsNullOrEmpty(_subjectFilter) ||
!string.IsNullOrEmpty(_nodeFilter) ||
_stuckOnly ||
_fromFilter != null ||
_toFilter != null;