diff --git a/src/ScadaLink.CentralUI/Components/Pages/Admin/ApiKeyForm.razor b/src/ScadaLink.CentralUI/Components/Pages/Admin/ApiKeyForm.razor index 9c372f9..3e2dbd6 100644 --- a/src/ScadaLink.CentralUI/Components/Pages/Admin/ApiKeyForm.razor +++ b/src/ScadaLink.CentralUI/Components/Pages/Admin/ApiKeyForm.razor @@ -6,20 +6,31 @@ @attribute [Authorize(Policy = AuthorizationPolicies.RequireAdmin)] @inject IInboundApiRepository InboundApiRepository @inject NavigationManager NavigationManager +@inject IJSRuntime JS
| ID | -Name | -Key Value | -Status | -Actions | -||||
|---|---|---|---|---|---|---|---|---|
| No API keys configured. | +ID | +Name | +Key Value | +Actions | ||||
|---|---|---|---|---|---|---|---|---|
| @key.Id | -@key.Name | -@MaskKeyValue(key.KeyValue) |
- - @if (key.IsEnabled) - { - Enabled - } - else - { - Disabled - } - | -- - @if (key.IsEnabled) - { - - } - else - { - - } - - | -||||
@MaskKeyValue(key.KeyValue)Save the mapping first to configure site scope.
+ } + else + { @if (_scopeRules.Count > 0) { -| ID | -Site ID | -Actions | -
|---|---|---|
| @rule.Id | -@rule.SiteId | -
- |
-
All sites (no restrictions)
} -| ID | -LDAP Group Name | -Role | -Site Scope Rules | -Actions | -
|---|---|---|---|---|
| No mappings configured. | -||||
| @mapping.Id | -@mapping.LdapGroupName | -@mapping.Role | -- @{ - var rules = _scopeRules.GetValueOrDefault(mapping.Id); - } - @if (rules != null && rules.Count > 0) - { - @foreach (var rule in rules) - { - Site @rule.SiteId - } - } - else - { - All sites - } - @if (mapping.Role.Equals("Deployment", StringComparison.OrdinalIgnoreCase)) - { - (manage on edit page) - } - | -
- |
-
No mappings configured.
+ } + else if (!FilteredMappings.Any()) + { +No mappings match the filter.
+ } + else + { +| ID | +LDAP Group Name | +Role | +Site Scope | +Actions | +
|---|---|---|---|---|
| @mapping.Id | +@mapping.LdapGroupName | +@mapping.Role | ++ @if (ruleCount > 0) + { + @ruleCount rule(s) + } + else + { + All sites + } + | +
+
+
+
+
+ |
+