feat(dashboard): settings page shows GroupToTag and UntaggedSessionVisibility
This commit is contained in:
@@ -7,4 +7,6 @@ public sealed record EffectiveDashboardConfiguration(
|
||||
int RecentFaultLimit,
|
||||
int RecentSessionLimit,
|
||||
bool ShowTagValues,
|
||||
IReadOnlyDictionary<string, string> GroupToRole);
|
||||
IReadOnlyDictionary<string, string> GroupToRole,
|
||||
IReadOnlyDictionary<string, IReadOnlyList<string>> GroupToTag,
|
||||
UntaggedSessionVisibility UntaggedSessionVisibility);
|
||||
|
||||
@@ -62,7 +62,15 @@ public sealed class GatewayConfigurationProvider(IOptions<GatewayOptions> option
|
||||
RecentFaultLimit: value.Dashboard.RecentFaultLimit,
|
||||
RecentSessionLimit: value.Dashboard.RecentSessionLimit,
|
||||
ShowTagValues: value.Dashboard.ShowTagValues,
|
||||
GroupToRole: value.Dashboard.GroupToRole),
|
||||
GroupToRole: value.Dashboard.GroupToRole,
|
||||
// Rebuilt rather than passed through because the value type widens from string[]
|
||||
// to IReadOnlyList<string>; the comparer is carried over so the projected map
|
||||
// still matches LDAP group names in whatever case the directory returns them.
|
||||
GroupToTag: value.Dashboard.GroupToTag.ToDictionary(
|
||||
pair => pair.Key,
|
||||
pair => (IReadOnlyList<string>)pair.Value,
|
||||
StringComparer.OrdinalIgnoreCase),
|
||||
UntaggedSessionVisibility: value.Dashboard.UntaggedSessionVisibility),
|
||||
Protocol: new EffectiveProtocolConfiguration(
|
||||
value.Protocol.WorkerProtocolVersion,
|
||||
value.Protocol.MaxGrpcMessageBytes));
|
||||
|
||||
@@ -65,6 +65,27 @@ else
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Dashboard tag mapping</th>
|
||||
@* Group and tag NAMES are configuration, not tag values — the redaction
|
||||
rule does not reach them, and an operator asking why a Viewer sees no
|
||||
sessions needs this map as much as the role map above it. *@
|
||||
<td>
|
||||
@if (Snapshot.Configuration.Dashboard.GroupToTag.Count == 0)
|
||||
{
|
||||
<span class="text-muted">(none configured)</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<ul class="mb-0">
|
||||
@foreach (KeyValuePair<string, IReadOnlyList<string>> pair in Snapshot.Configuration.Dashboard.GroupToTag)
|
||||
{
|
||||
<li><code>@pair.Key</code> → @string.Join(", ", pair.Value)</li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr><th scope="row">Worker executable</th><td><code>@Snapshot.Configuration.Worker.ExecutablePath</code></td></tr>
|
||||
<tr><th scope="row">Worker architecture</th><td>@Snapshot.Configuration.Worker.RequiredArchitecture</td></tr>
|
||||
<tr><th scope="row">Startup timeout</th><td>@Snapshot.Configuration.Worker.StartupTimeoutSeconds seconds</td></tr>
|
||||
@@ -78,6 +99,7 @@ else
|
||||
<tr><th scope="row">Anonymous localhost</th><td>@Snapshot.Configuration.Dashboard.AllowAnonymousLocalhost</td></tr>
|
||||
<tr><th scope="row">Snapshot interval</th><td>@Snapshot.Configuration.Dashboard.SnapshotIntervalMilliseconds ms</td></tr>
|
||||
<tr><th scope="row">Show tag values</th><td>@Snapshot.Configuration.Dashboard.ShowTagValues</td></tr>
|
||||
<tr><th scope="row">Untagged session visibility</th><td>@Snapshot.Configuration.Dashboard.UntaggedSessionVisibility</td></tr>
|
||||
<tr><th scope="row">Worker protocol</th><td>@Snapshot.Configuration.Protocol.WorkerProtocolVersion</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user