fix(admin-ui): align task orientation and navigation with page policies
This commit is contained in:
@@ -12,42 +12,42 @@
|
||||
Accent as an inline --accent on the shell root, which would silently beat any
|
||||
future scheme-level override (the exact defect ScadaBridge hit). A real brand
|
||||
accent belongs in site.css :root, not here. *@
|
||||
<ThemeShell Product="OtOpcUa">
|
||||
<ThemeShell Product="OtOpcUa" ScrollNav="true">
|
||||
<Nav>
|
||||
<NavRailSection Title="Navigation" Key="nav">
|
||||
<NavRailSection Title="Operations" Key="operations">
|
||||
<NavRailItem Href="/" Text="Overview" Match="NavLinkMatch.All" />
|
||||
<NavRailItem Href="/fleet" Text="Fleet status" />
|
||||
<NavRailItem Href="/hosts" Text="Host status" />
|
||||
<NavRailItem Href="/clusters" Text="Clusters" />
|
||||
<NavRailItem Href="/uns" Text="UNS" />
|
||||
<NavRailItem Href="/raw" Text="Raw" />
|
||||
<NavRailItem Href="/reservations" Text="Reservations" />
|
||||
<NavRailItem Href="/certificates" Text="Certificates" />
|
||||
<NavRailItem Href="/role-grants" Text="Role grants" />
|
||||
<NavRailItem Href="/apikeys" Text="API keys" />
|
||||
@* Gated on the page's OWN policy constant, not Roles="Administrator", so the rail
|
||||
can never drift from what the page actually admits (pinned by SecretsNavLinkTests).
|
||||
ManagePolicy resolves to AdminRole "Administrator" over the same ClaimTypes.Role
|
||||
claim FleetAdmin reads.
|
||||
|
||||
NOTE this is currently the ONLY gated item, and the rail is therefore inconsistent:
|
||||
/role-grants and /apikeys are FleetAdmin (Administrator-only) too and stay visible
|
||||
to everyone, i.e. still advertised dead ends for a Designer/Operator. That is a
|
||||
deliberate scope boundary, not an oversight — hiding them is a UX call for the
|
||||
whole rail, filed as a follow-up rather than smuggled in here. *@
|
||||
<AuthorizeView Policy="@ZB.MOM.WW.Secrets.Ui.SecretsAuthorization.ManagePolicy">
|
||||
<NavRailItem Href="/admin/secrets" Text="Secrets" />
|
||||
</AuthorizeView>
|
||||
</NavRailSection>
|
||||
<NavRailSection Title="Scripting" Key="scripting">
|
||||
<NavRailItem Href="/scripts" Text="Scripts" />
|
||||
<NavRailItem Href="/script-log" Text="Script log" />
|
||||
</NavRailSection>
|
||||
<NavRailSection Title="Live" Key="live">
|
||||
<NavRailItem Href="/deployments" Text="Deployments" />
|
||||
<NavRailItem Href="/alerts" Text="Alerts" />
|
||||
<NavRailItem Href="/alarms-historian" Text="Alarms historian" />
|
||||
</NavRailSection>
|
||||
<NavRailSection Title="Configuration" Key="configuration">
|
||||
<AuthorizeView Policy="@AdminUiPolicies.ConfigEditor">
|
||||
<NavRailItem Href="/uns" Text="UNS" />
|
||||
<NavRailItem Href="/raw" Text="Raw" />
|
||||
<NavRailItem Href="/deployments" Text="Deployments" />
|
||||
</AuthorizeView>
|
||||
<NavRailItem Href="/reservations" Text="Reservations" />
|
||||
<NavRailItem Href="/certificates" Text="Certificates" />
|
||||
</NavRailSection>
|
||||
<NavRailSection Title="Scripting" Key="scripting">
|
||||
<AuthorizeView Policy="@AdminUiPolicies.ConfigEditor">
|
||||
<NavRailItem Href="/scripts" Text="Scripts" />
|
||||
</AuthorizeView>
|
||||
<NavRailItem Href="/script-log" Text="Script log" />
|
||||
</NavRailSection>
|
||||
<AuthorizeView Policy="@AdminUiPolicies.FleetAdmin" Context="fleetAdmin">
|
||||
<NavRailSection Title="Administration" Key="administration">
|
||||
<NavRailItem Href="/role-grants" Text="Role grants" />
|
||||
<NavRailItem Href="/apikeys" Text="API keys" />
|
||||
</NavRailSection>
|
||||
</AuthorizeView>
|
||||
<AuthorizeView Policy="@ZB.MOM.WW.Secrets.Ui.SecretsAuthorization.ManagePolicy" Context="secretsAdmin">
|
||||
<NavRailSection Title="Secrets" Key="secrets">
|
||||
<NavRailItem Href="/admin/secrets" Text="Secrets" />
|
||||
</NavRailSection>
|
||||
</AuthorizeView>
|
||||
</Nav>
|
||||
<RailFooter>
|
||||
<AuthorizeView>
|
||||
|
||||
+9
-6
@@ -2,19 +2,22 @@
|
||||
@attribute [Authorize(Policy = AdminUiPolicies.AuthenticatedRead)]
|
||||
@rendermode RenderMode.InteractiveServer
|
||||
|
||||
<PageTitle>Retired namespaces · OtOpcUa</PageTitle>
|
||||
|
||||
<PageErrorBoundary>
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h4 class="mb-0">Namespaces · <span class="mono">@ClusterId</span></h4>
|
||||
<div class="page-head">
|
||||
<h1 class="mb-0">Retired namespaces · <span class="mono">@ClusterId</span></h1>
|
||||
</div>
|
||||
|
||||
<ClusterNav ClusterId="@ClusterId" ActiveTab="namespaces" />
|
||||
|
||||
<section class="panel notice rise" style="animation-delay:.02s">
|
||||
<div class="panel-head">Namespaces are retired in v3</div>
|
||||
<h2 class="panel-head">Namespaces are retired in v3</h2>
|
||||
<div style="padding:1rem">
|
||||
The <code>Namespace</code> entity has been removed. The v3 Raw/UNS split replaces it —
|
||||
raw driver folders and the unified namespace are managed on the <strong>/raw</strong> and
|
||||
<strong>/uns</strong> pages. This page is a placeholder so existing links do not 404.
|
||||
The <code>Namespace</code> entity has been removed. Raw driver folders and the unified namespace replace it.
|
||||
<AuthorizeView Policy="@AdminUiPolicies.ConfigEditor">
|
||||
<p>Manage drivers and tags in <a href="/raw">Raw</a> or equipment in <a href="/uns">UNS</a>.</p>
|
||||
</AuthorizeView> Existing namespace links remain available for reference.
|
||||
</div>
|
||||
</section>
|
||||
</PageErrorBoundary>
|
||||
|
||||
@@ -3,20 +3,23 @@
|
||||
@attribute [Authorize(Policy = AdminUiPolicies.ConfigEditor)]
|
||||
@rendermode RenderMode.InteractiveServer
|
||||
|
||||
<PageTitle>Retired namespaces · OtOpcUa</PageTitle>
|
||||
|
||||
<PageErrorBoundary>
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h4 class="mb-0">Namespaces · <span class="mono">@ClusterId</span></h4>
|
||||
<div class="page-head">
|
||||
<h1 class="mb-0">Retired namespaces · <span class="mono">@ClusterId</span></h1>
|
||||
<a href="/clusters/@ClusterId/namespaces" class="btn btn-outline-secondary btn-sm">Back</a>
|
||||
</div>
|
||||
|
||||
<ClusterNav ClusterId="@ClusterId" ActiveTab="namespaces" />
|
||||
|
||||
<section class="panel notice rise" style="animation-delay:.02s">
|
||||
<div class="panel-head">Namespaces are retired in v3</div>
|
||||
<h2 class="panel-head">Namespaces are retired in v3</h2>
|
||||
<div style="padding:1rem">
|
||||
The <code>Namespace</code> entity has been removed. The v3 Raw/UNS split replaces it —
|
||||
raw driver folders and the unified namespace are managed on the <strong>/raw</strong> and
|
||||
<strong>/uns</strong> pages. This editor no longer applies.
|
||||
The <code>Namespace</code> entity has been removed. Raw driver folders and the unified namespace replace it.
|
||||
<AuthorizeView Policy="@AdminUiPolicies.ConfigEditor">
|
||||
<p>Manage drivers and tags in <a href="/raw">Raw</a> or equipment in <a href="/uns">UNS</a>.</p>
|
||||
</AuthorizeView> This editor no longer applies.
|
||||
</div>
|
||||
</section>
|
||||
</PageErrorBoundary>
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
@page "/"
|
||||
@attribute [Authorize(Policy = AdminUiPolicies.AuthenticatedRead)]
|
||||
|
||||
<PageTitle>OtOpcUa</PageTitle>
|
||||
<PageTitle>Overview · OtOpcUa</PageTitle>
|
||||
|
||||
<h1>OtOpcUa Admin</h1>
|
||||
<p>Use the nav above to configure clusters, drivers, and tags, then deploy.</p>
|
||||
<div class="page-head">
|
||||
<div>
|
||||
<h1>OtOpcUa</h1>
|
||||
<p class="text-muted">Inspect fleet health, then open a cluster for its status and diagnostics.</p>
|
||||
</div>
|
||||
<a class="btn btn-primary btn-sm" href="/fleet">View fleet status</a>
|
||||
</div>
|
||||
<section class="panel">
|
||||
<h2 class="panel-head">Operations</h2>
|
||||
<div class="panel-body">
|
||||
<p><a href="/hosts">Host status</a> shows the available hosts. <a href="/clusters">Clusters</a> opens cluster status, diagnostics and audit history.</p>
|
||||
<AuthorizeView Policy="@AdminUiPolicies.ConfigEditor">
|
||||
<p>Author drivers and tags in <a href="/raw">Raw</a>, organize equipment in <a href="/uns">UNS</a>, and review <a href="/deployments">Deployments</a>. Configuration changes take effect through deployment.</p>
|
||||
</AuthorizeView>
|
||||
<p class="mb-0">Use the side navigation to return to operations, configuration and scripting.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -9,11 +9,10 @@
|
||||
}
|
||||
|
||||
<ul class="nav nav-tabs mb-3">
|
||||
<li class="nav-item"><a class="nav-link @Active("overview")" href="/clusters/@ClusterId">Overview</a></li>
|
||||
<li class="nav-item"><a class="nav-link @Active("namespaces")" href="/clusters/@ClusterId/namespaces">Namespaces</a></li>
|
||||
<li class="nav-item"><a class="nav-link @Active("acls")" href="/clusters/@ClusterId/acls">ACLs</a></li>
|
||||
<li class="nav-item"><a class="nav-link @Active("audit")" href="/clusters/@ClusterId/audit">Audit</a></li>
|
||||
<li class="nav-item"><a class="nav-link @Active("redundancy")" href="/clusters/@ClusterId/redundancy">Redundancy</a></li>
|
||||
<li class="nav-item"><a class="nav-link @Active("overview")" aria-current='@(ActiveTab == "overview" ? "page" : null)' href="/clusters/@ClusterId">Overview</a></li>
|
||||
<li class="nav-item"><a class="nav-link @Active("acls")" aria-current='@(ActiveTab == "acls" ? "page" : null)' href="/clusters/@ClusterId/acls">ACLs</a></li>
|
||||
<li class="nav-item"><a class="nav-link @Active("audit")" aria-current='@(ActiveTab == "audit" ? "page" : null)' href="/clusters/@ClusterId/audit">Audit</a></li>
|
||||
<li class="nav-item"><a class="nav-link @Active("redundancy")" aria-current='@(ActiveTab == "redundancy" ? "page" : null)' href="/clusters/@ClusterId/redundancy">Redundancy</a></li>
|
||||
</ul>
|
||||
|
||||
@code {
|
||||
|
||||
Reference in New Issue
Block a user