Standardize administrative page and table grammar
This commit is contained in:
@@ -6,8 +6,9 @@
|
||||
@attribute [Authorize(Policy = AdminUiPolicies.AuthenticatedRead)]
|
||||
@using System.Security.Claims
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h4 class="mb-0">My account</h4>
|
||||
<div class="page-head">
|
||||
<h1>My account</h1>
|
||||
<span class="spacer"></span>
|
||||
</div>
|
||||
|
||||
<AuthorizeView>
|
||||
@@ -26,13 +27,13 @@
|
||||
|
||||
<section class="card-grid rise" style="animation-delay:.02s">
|
||||
<div class="metric-card">
|
||||
<div class="panel-head">Identity</div>
|
||||
<h2 class="panel-head">Identity</h2>
|
||||
<div class="kv"><span class="k">Username</span><span class="v mono">@username</span></div>
|
||||
<div class="kv"><span class="k">Display name</span><span class="v">@displayName</span></div>
|
||||
</div>
|
||||
|
||||
<div class="metric-card">
|
||||
<div class="panel-head">Fleet roles</div>
|
||||
<h2 class="panel-head">Fleet roles</h2>
|
||||
<div class="kv">
|
||||
<span class="k">Resolved roles</span>
|
||||
<span class="v">
|
||||
|
||||
@@ -9,8 +9,10 @@
|
||||
@inject IApiKeyGalaxyAckIdentityService AckIdentities
|
||||
|
||||
<PageErrorBoundary>
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h4 class="mb-0">OPC UA API keys</h4>
|
||||
<PageTitle>OPC UA API keys · OtOpcUa</PageTitle>
|
||||
<div class="page-head">
|
||||
<h1>OPC UA API keys</h1>
|
||||
<span class="spacer"></span>
|
||||
</div>
|
||||
|
||||
@if (_created is not null)
|
||||
@@ -28,7 +30,7 @@
|
||||
}
|
||||
|
||||
<section class="panel mb-3">
|
||||
<div class="panel-head">Create a key</div>
|
||||
<h2 class="panel-head">Create a key</h2>
|
||||
<div style="padding:1rem">
|
||||
<div class="row g-2">
|
||||
<div class="col-md-3">
|
||||
@@ -55,7 +57,7 @@
|
||||
@if (_ackEditKeyId is not null)
|
||||
{
|
||||
<section class="panel mb-3">
|
||||
<div class="panel-head">Galaxy alarm-ack identity — key <span class="mono">@_ackEditKeyId</span></div>
|
||||
<h2 class="panel-head">Galaxy alarm-ack identity — key <span class="mono">@_ackEditKeyId</span></h2>
|
||||
<div style="padding:1rem">
|
||||
<div class="form-text mb-2">
|
||||
Native Galaxy alarm acknowledges from sessions using this key authenticate as this Galaxy account, and
|
||||
@@ -92,7 +94,7 @@
|
||||
}
|
||||
|
||||
<section class="panel">
|
||||
<div class="panel-head">Keys</div>
|
||||
<h2 class="panel-head">Keys</h2>
|
||||
@if (_keys is null)
|
||||
{
|
||||
<div style="padding:1rem" class="text-muted">Loading…</div>
|
||||
@@ -105,17 +107,18 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="table table-sm mb-0">
|
||||
<div class="table-wrap" role="region" aria-label="OPC UA API keys" tabindex="0">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Principal</th>
|
||||
<th>Key id</th>
|
||||
<th>Status</th>
|
||||
<th>Galaxy ack identity</th>
|
||||
<th>Created (UTC)</th>
|
||||
<th>Expires (UTC)</th>
|
||||
<th></th>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Principal</th>
|
||||
<th scope="col">Key id</th>
|
||||
<th scope="col">Status</th>
|
||||
<th scope="col">Galaxy ack identity</th>
|
||||
<th scope="col">Created (UTC)</th>
|
||||
<th scope="col">Expires (UTC)</th>
|
||||
<th scope="col"><span class="visually-hidden">Actions</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -167,6 +170,7 @@
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
</section>
|
||||
|
||||
|
||||
@@ -12,8 +12,10 @@
|
||||
@implements IDisposable
|
||||
|
||||
<PageErrorBoundary>
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h4 class="mb-0">OPC UA certificates</h4>
|
||||
<PageTitle>OPC UA certificates · OtOpcUa</PageTitle>
|
||||
<div class="page-head">
|
||||
<h1>OPC UA certificates</h1>
|
||||
<span class="spacer"></span>
|
||||
</div>
|
||||
|
||||
@if (_rows is null)
|
||||
@@ -39,7 +41,7 @@ else
|
||||
@foreach (var store in _rows)
|
||||
{
|
||||
<section class="panel rise mt-3" style="animation-delay:.08s">
|
||||
<div class="panel-head">@store.Label · @store.Certificates.Count entry@(store.Certificates.Count == 1 ? "" : "s")</div>
|
||||
<h2 class="panel-head">@store.Label · @store.Certificates.Count entry@(store.Certificates.Count == 1 ? "" : "s")</h2>
|
||||
@if (string.IsNullOrEmpty(store.Path))
|
||||
{
|
||||
<div style="padding:1rem" class="text-muted">No path configured.</div>
|
||||
@@ -56,18 +58,18 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="table-wrap">
|
||||
<div class="table-wrap" role="region" aria-label="Certificates in @store.Label" tabindex="0">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Subject</th>
|
||||
<th>Issuer</th>
|
||||
<th>Thumbprint</th>
|
||||
<th>Not before</th>
|
||||
<th>Not after</th>
|
||||
<th scope="col">Subject</th>
|
||||
<th scope="col">Issuer</th>
|
||||
<th scope="col">Thumbprint</th>
|
||||
<th scope="col">Not before</th>
|
||||
<th scope="col">Not after</th>
|
||||
@if (store.Kind is StoreKind.Trusted or StoreKind.Rejected)
|
||||
{
|
||||
<th>Actions</th>
|
||||
<th scope="col">Actions</th>
|
||||
}
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
wrapper, the .panel shell, and the static form-POST (username/password/returnUrl). *@
|
||||
@attribute [Microsoft.AspNetCore.Authorization.AllowAnonymous]
|
||||
|
||||
<PageTitle>Sign in · OtOpcUa</PageTitle>
|
||||
|
||||
<LoginCard Product="OtOpcUa Admin" Action="/auth/login" ReturnUrl="@ReturnUrl" Error="@Error">
|
||||
<AntiforgeryToken />
|
||||
</LoginCard>
|
||||
|
||||
@@ -7,8 +7,10 @@
|
||||
@inject IDbContextFactory<OtOpcUaConfigDbContext> DbFactory
|
||||
|
||||
<PageErrorBoundary>
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h4 class="mb-0">External ID reservations</h4>
|
||||
<PageTitle>External ID reservations · OtOpcUa</PageTitle>
|
||||
<div class="page-head">
|
||||
<h1>External ID reservations</h1>
|
||||
<span class="spacer"></span>
|
||||
</div>
|
||||
|
||||
@if (_rows is null)
|
||||
@@ -18,21 +20,21 @@
|
||||
else
|
||||
{
|
||||
<section class="panel rise mt-3" style="animation-delay:.08s">
|
||||
<div class="panel-head">@_rows.Count reservation@(_rows.Count == 1 ? "" : "s")</div>
|
||||
<h2 class="panel-head">@_rows.Count reservation@(_rows.Count == 1 ? "" : "s")</h2>
|
||||
@if (_rows.Count == 0)
|
||||
{
|
||||
<div style="padding:1rem" class="text-muted">No reservations yet.</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="table-wrap">
|
||||
<div class="table-wrap" role="region" aria-label="External ID reservations" tabindex="0">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Kind</th>
|
||||
<th>Value</th>
|
||||
<th>Equipment UUID</th>
|
||||
<th>Cluster</th>
|
||||
<th scope="col">Kind</th>
|
||||
<th scope="col">Value</th>
|
||||
<th scope="col">Equipment UUID</th>
|
||||
<th scope="col">Cluster</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -11,15 +11,17 @@
|
||||
@inject ILdapGroupRoleMappingService RoleMappings
|
||||
|
||||
<PageErrorBoundary>
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h4 class="mb-0">Role grants</h4>
|
||||
<PageTitle>Role grants · OtOpcUa</PageTitle>
|
||||
<div class="page-head">
|
||||
<h1>Role grants</h1>
|
||||
<span class="spacer"></span>
|
||||
</div>
|
||||
|
||||
@if (_options is not null)
|
||||
{
|
||||
<section class="card-grid rise" style="animation-delay:.02s">
|
||||
<div class="metric-card">
|
||||
<div class="panel-head">LDAP binding</div>
|
||||
<h2 class="panel-head">LDAP binding</h2>
|
||||
<div class="kv"><span class="k">Enabled</span><span class="v">@(_options.Enabled ? "yes" : "no")</span></div>
|
||||
<div class="kv"><span class="k">Server</span><span class="v mono">@_options.Server:@_options.Port</span></div>
|
||||
<div class="kv"><span class="k">Transport</span><span class="v">@_options.Transport</span></div>
|
||||
@@ -33,7 +35,7 @@
|
||||
}
|
||||
|
||||
<section class="panel rise mt-3" style="animation-delay:.08s">
|
||||
<div class="panel-head">Group → role (database)</div>
|
||||
<h2 class="panel-head">Group → role (database)</h2>
|
||||
<div style="padding:1rem">
|
||||
<div class="d-flex gap-2 align-items-center flex-wrap">
|
||||
<input class="form-control form-control-sm mono" style="max-width:32rem"
|
||||
@@ -51,9 +53,9 @@
|
||||
<div class="text-danger small mt-2">@_error</div>
|
||||
}
|
||||
</div>
|
||||
<div class="table-wrap">
|
||||
<div class="table-wrap" role="region" aria-label="Database role grants" tabindex="0">
|
||||
<table class="data-table">
|
||||
<thead><tr><th>LDAP group</th><th>Role</th><th></th></tr></thead>
|
||||
<thead><tr><th scope="col">LDAP group</th><th scope="col">Role</th><th scope="col"><span class="visually-hidden">Actions</span></th></tr></thead>
|
||||
<tbody>
|
||||
@if (_rows.Count == 0)
|
||||
{
|
||||
@@ -83,7 +85,7 @@
|
||||
@if (_options is not null)
|
||||
{
|
||||
<section class="panel rise mt-3" style="animation-delay:.14s">
|
||||
<div class="panel-head">Fallback (appsettings) (@(_options.GroupToRole?.Count ?? 0))</div>
|
||||
<h2 class="panel-head">Fallback (appsettings) (@(_options.GroupToRole?.Count ?? 0))</h2>
|
||||
<div style="padding:1rem 1rem 0" class="text-muted small">
|
||||
These <span class="mono">Security:Ldap:GroupToRole</span> entries apply when a group has no database row above.
|
||||
</div>
|
||||
@@ -93,9 +95,9 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="table-wrap">
|
||||
<div class="table-wrap" role="region" aria-label="Configured fallback role grants" tabindex="0">
|
||||
<table class="data-table">
|
||||
<thead><tr><th>LDAP group</th><th>Resolved role</th></tr></thead>
|
||||
<thead><tr><th scope="col">LDAP group</th><th scope="col">Resolved role</th></tr></thead>
|
||||
<tbody>
|
||||
@foreach (var kvp in _options.GroupToRole.OrderBy(k => k.Key, StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user