feat(ui): scaffold Audit Log page + Audit nav group (#23 M7)

Adds the central-side Audit Log page scaffold at /audit/log (M7-T1) and
introduces a new Audit nav group (M7-T9) that hosts both the new page and
the renamed Configuration Audit Log. The page body is intentionally a
heading + two placeholders — Bundle B will land the AuditFilterBar and
AuditResultsGrid behind them.

The Audit nav group sits between Monitoring and the per-user footer; both
items inside are Admin-only, so the section header lives inside the
RequireAdmin AuthorizeView (non-admins see no orphan header).

bUnit scaffold tests pin the page heading, the section header order, and
the two child links; the existing 338 CentralUI tests continue to pass.
This commit is contained in:
Joseph Doherty
2026-05-20 19:49:11 -04:00
parent a9f45b0861
commit 12b86bea7a
4 changed files with 144 additions and 1 deletions

View File

@@ -108,9 +108,16 @@
</Authorized>
</AuthorizeView>
@* Configuration Audit Log — Admin only *@
@* Audit — Admin only. Hosts the new Audit Log page (#23 M7)
and the renamed Configuration Audit Log (IAuditService
config-change viewer). Both items are Admin-gated, so
the section header sits inside the same policy block. *@
<AuthorizeView Policy="@AuthorizationPolicies.RequireAdmin">
<Authorized Context="auditContext">
<div role="presentation" class="nav-section-header">Audit</div>
<li class="nav-item">
<NavLink class="nav-link" href="/audit/log">Audit Log</NavLink>
</li>
<li class="nav-item">
<NavLink class="nav-link" href="/audit/configuration">Configuration Audit Log</NavLink>
</li>

View File

@@ -0,0 +1,16 @@
@page "/audit/log"
@attribute [Authorize]
<PageTitle>Audit Log</PageTitle>
<div class="container-fluid mt-3">
<h1 class="h4 mb-3">Audit Log</h1>
@* AuditFilterBar will go here (Bundle B). *@
<div class="mb-3">
</div>
@* AuditResultsGrid will go here (Bundle B). *@
<div>
</div>
</div>

View File

@@ -0,0 +1,12 @@
namespace ScadaLink.CentralUI.Components.Pages.Audit;
/// <summary>
/// Code-behind for the central Audit Log page (#23 M7-T1). The Bundle A
/// scaffold has no behaviour — the filter bar and results grid arrive in
/// Bundle B (M7-T2..M7-T7). Keeping the partial class in place now lets
/// later bundles add injected services and event handlers without
/// touching the route or page-title markup.
/// </summary>
public partial class AuditLogPage
{
}