web/elements: add ak-label for status to replace simple icons

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-09 16:59:45 +02:00
parent 34b8a97ae9
commit c887139367
9 changed files with 207 additions and 143 deletions

55
web/src/elements/Label.ts Normal file
View File

@ -0,0 +1,55 @@
import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element";
import PFBase from "@patternfly/patternfly/patternfly-base.css";
import PFLabel from "@patternfly/patternfly/components/Label/label.css";
import AKGlobal from "../authentik.css";
export enum PFColor {
Green = "pf-m-green",
Orange = "pf-m-orange",
Red = "pf-m-red",
Grey = "",
}
@customElement("ak-label")
export class Label extends LitElement {
@property()
color: PFColor = PFColor.Grey;
@property()
icon?: string;
@property()
text?: string;
static get styles(): CSSResult[] {
return [PFBase, PFLabel, AKGlobal];
}
getDefaultIcon(): string {
switch (this.color) {
case PFColor.Green:
return "fa-check";
case PFColor.Orange:
return "fa-exclamation-triangle";
case PFColor.Red:
return "fa-times";
case PFColor.Grey:
return "fa-question-circle";
default:
return "";
}
}
render(): TemplateResult {
return html`<span class="pf-c-label ${this.color}">
<span class="pf-c-label__content">
<span class="pf-c-label__icon">
<i class="fas ${this.text ? "fa-fw" : ""} ${this.icon || this.getDefaultIcon()}" aria-hidden="true"></i>
</span>
${this.text || ""}
</span>
</span>`;
}
}

View File

@ -71,7 +71,7 @@ msgid "Action"
msgstr "Action"
#: src/pages/users/UserListPage.ts:50
#: src/pages/users/UserViewPage.ts:116
#: src/pages/users/UserViewPage.ts:117
msgid "Active"
msgstr "Active"
@ -174,7 +174,7 @@ msgstr "Application's display Name."
msgid "Applications"
msgstr "Applications"
#: src/pages/admin-overview/AdminOverviewPage.ts:41
#: src/pages/admin-overview/AdminOverviewPage.ts:47
msgid "Apps with most usage"
msgstr "Apps with most usage"
@ -315,7 +315,7 @@ msgstr "Backup finished with errors."
msgid "Backup finished with warnings."
msgstr "Backup finished with warnings."
#: src/pages/admin-overview/AdminOverviewPage.ts:58
#: src/pages/admin-overview/AdminOverviewPage.ts:64
msgid "Backup status"
msgstr "Backup status"
@ -379,11 +379,11 @@ msgstr "Built-in"
msgid "CA which the endpoint's Certificate is verified against. Can be left empty for no validation."
msgstr "CA which the endpoint's Certificate is verified against. Can be left empty for no validation."
#: src/pages/admin-overview/AdminOverviewPage.ts:56
#: src/pages/admin-overview/AdminOverviewPage.ts:62
msgid "Cached Flows"
msgstr "Cached Flows"
#: src/pages/admin-overview/AdminOverviewPage.ts:54
#: src/pages/admin-overview/AdminOverviewPage.ts:60
msgid "Cached Policies"
msgstr "Cached Policies"
@ -455,7 +455,7 @@ msgstr "Change your password"
#: src/pages/sources/ldap/LDAPSourceViewPage.ts:124
#: src/pages/sources/oauth/OAuthSourceViewPage.ts:143
#: src/pages/sources/saml/SAMLSourceViewPage.ts:130
#: src/pages/users/UserViewPage.ts:177
#: src/pages/users/UserViewPage.ts:178
msgid "Changelog"
msgstr "Changelog"
@ -676,8 +676,8 @@ msgstr "Copy Key"
#: src/pages/groups/GroupListPage.ts:99
#: src/pages/outposts/OutpostListPage.ts:136
#: src/pages/outposts/OutpostListPage.ts:144
#: src/pages/outposts/ServiceConnectionListPage.ts:109
#: src/pages/outposts/ServiceConnectionListPage.ts:118
#: src/pages/outposts/ServiceConnectionListPage.ts:110
#: src/pages/outposts/ServiceConnectionListPage.ts:119
#: src/pages/policies/BoundPoliciesList.ts:158
#: src/pages/policies/BoundPoliciesList.ts:185
#: src/pages/policies/BoundPoliciesList.ts:206
@ -782,7 +782,7 @@ msgstr "Create provider"
#: src/pages/applications/ApplicationForm.ts:123
#: src/pages/flows/BoundStagesList.ts:149
#: src/pages/outposts/ServiceConnectionListPage.ts:121
#: src/pages/outposts/ServiceConnectionListPage.ts:122
#: src/pages/policies/BoundPoliciesList.ts:188
#: src/pages/policies/PolicyListPage.ts:136
#: src/pages/property-mappings/PropertyMappingListPage.ts:125
@ -838,7 +838,7 @@ msgstr "Define how notifications are sent to users, like Email or Webhook."
#: src/pages/flows/FlowListPage.ts:86
#: src/pages/groups/GroupListPage.ts:82
#: src/pages/outposts/OutpostListPage.ts:86
#: src/pages/outposts/ServiceConnectionListPage.ts:100
#: src/pages/outposts/ServiceConnectionListPage.ts:101
#: src/pages/policies/PolicyListPage.ts:115
#: src/pages/property-mappings/PropertyMappingListPage.ts:104
#: src/pages/providers/ProviderListPage.ts:98
@ -888,7 +888,7 @@ msgstr "Deny the user access"
#: src/pages/applications/ApplicationForm.ts:170
#: src/pages/property-mappings/PropertyMappingScopeForm.ts:65
#: src/pages/system-tasks/SystemTaskListPage.ts:54
#: src/pages/system-tasks/SystemTaskListPage.ts:55
#: src/pages/user-settings/tokens/UserTokenForm.ts:50
msgid "Description"
msgstr "Description"
@ -974,7 +974,7 @@ msgstr "Each provider has a different issuer, based on the application slug."
#: src/pages/flows/FlowListPage.ts:74
#: src/pages/groups/GroupListPage.ts:70
#: src/pages/outposts/OutpostListPage.ts:74
#: src/pages/outposts/ServiceConnectionListPage.ts:88
#: src/pages/outposts/ServiceConnectionListPage.ts:89
#: src/pages/policies/PolicyListPage.ts:90
#: src/pages/property-mappings/PropertyMappingListPage.ts:79
#: src/pages/providers/ProviderListPage.ts:86
@ -989,7 +989,7 @@ msgstr "Each provider has a different issuer, based on the application slug."
#: src/pages/stages/prompt/PromptListPage.ts:75
#: src/pages/user-settings/tokens/UserTokenList.ts:113
#: src/pages/users/UserListPage.ts:75
#: src/pages/users/UserViewPage.ts:147
#: src/pages/users/UserViewPage.ts:148
msgid "Edit"
msgstr "Edit"
@ -1022,7 +1022,7 @@ msgstr "Either no applications are defined, or you don't have access to any."
#: src/pages/stages/identification/IdentificationStageForm.ts:79
#: src/pages/user-settings/UserDetailsPage.ts:71
#: src/pages/users/UserForm.ts:61
#: src/pages/users/UserViewPage.ts:100
#: src/pages/users/UserViewPage.ts:101
msgid "Email"
msgstr "Email"
@ -1073,7 +1073,7 @@ msgstr "Enrollment"
msgid "Enrollment flow"
msgstr "Enrollment flow"
#: src/pages/system-tasks/SystemTaskListPage.ts:67
#: src/pages/system-tasks/SystemTaskListPage.ts:68
msgid "Error"
msgstr "Error"
@ -1178,7 +1178,7 @@ msgstr "Expiry"
msgid "Expiry date"
msgstr "Expiry date"
#: src/pages/users/UserViewPage.ts:188
#: src/pages/users/UserViewPage.ts:189
msgid "Explicit Consent"
msgstr "Explicit Consent"
@ -1446,7 +1446,7 @@ msgid "Icon"
msgstr "Icon"
#: src/pages/flows/FlowListPage.ts:46
#: src/pages/system-tasks/SystemTaskListPage.ts:53
#: src/pages/system-tasks/SystemTaskListPage.ts:54
#: src/pages/tokens/TokenListPage.ts:44
#: src/pages/user-settings/tokens/UserTokenForm.ts:44
#: src/pages/user-settings/tokens/UserTokenList.ts:39
@ -1581,15 +1581,15 @@ msgid "Label shown next to/above the prompt."
msgstr "Label shown next to/above the prompt."
#: src/pages/users/UserListPage.ts:51
#: src/pages/users/UserViewPage.ts:108
#: src/pages/users/UserViewPage.ts:109
msgid "Last login"
msgstr "Last login"
#: src/pages/system-tasks/SystemTaskListPage.ts:55
#: src/pages/system-tasks/SystemTaskListPage.ts:56
msgid "Last run"
msgstr "Last run"
#: src/pages/outposts/OutpostHealth.ts:40
#: src/pages/outposts/OutpostHealth.ts:41
msgid "Last seen: {0}"
msgstr "Last seen: {0}"
@ -1682,7 +1682,7 @@ msgstr "Loading..."
#: src/pages/outposts/ServiceConnectionDockerForm.ts:62
#: src/pages/outposts/ServiceConnectionKubernetesForm.ts:63
#: src/pages/outposts/ServiceConnectionListPage.ts:54
#: src/pages/outposts/ServiceConnectionListPage.ts:55
msgid "Local"
msgstr "Local"
@ -1698,7 +1698,7 @@ msgstr "Login to continue to {0}."
msgid "Logins"
msgstr "Logins"
#: src/pages/admin-overview/AdminOverviewPage.ts:38
#: src/pages/admin-overview/AdminOverviewPage.ts:44
#: src/pages/applications/ApplicationViewPage.ts:71
msgid "Logins over the last 24 hours"
msgstr "Logins over the last 24 hours"
@ -1711,7 +1711,7 @@ msgstr "Logout URL"
msgid "Logs"
msgstr "Logs"
#: src/pages/system-tasks/SystemTaskListPage.ts:29
#: src/pages/system-tasks/SystemTaskListPage.ts:30
msgid "Long-running operations which authentik executes in the background."
msgstr "Long-running operations which authentik executes in the background."
@ -1738,7 +1738,7 @@ msgstr "Members"
#: src/pages/events/EventInfo.ts:174
#: src/pages/policies/PolicyTestForm.ts:43
#: src/pages/system-tasks/SystemTaskListPage.ts:79
#: src/pages/system-tasks/SystemTaskListPage.ts:80
msgid "Messages"
msgstr "Messages"
@ -1797,7 +1797,7 @@ msgstr "Monitor"
#: src/pages/outposts/OutpostListPage.ts:49
#: src/pages/outposts/ServiceConnectionDockerForm.ts:53
#: src/pages/outposts/ServiceConnectionKubernetesForm.ts:54
#: src/pages/outposts/ServiceConnectionListPage.ts:52
#: src/pages/outposts/ServiceConnectionListPage.ts:53
#: src/pages/policies/PolicyListPage.ts:56
#: src/pages/policies/dummy/DummyPolicyForm.ts:53
#: src/pages/policies/event_matcher/EventMatcherPolicyForm.ts:54
@ -1846,7 +1846,7 @@ msgstr "Monitor"
#: src/pages/user-settings/UserDetailsPage.ts:64
#: src/pages/users/UserForm.ts:54
#: src/pages/users/UserListPage.ts:49
#: src/pages/users/UserViewPage.ts:92
#: src/pages/users/UserViewPage.ts:93
msgid "Name"
msgstr "Name"
@ -1873,7 +1873,7 @@ msgstr "New version available!"
#: src/pages/crypto/CertificateKeyPairListPage.ts:61
#: src/pages/groups/GroupListPage.ts:58
#: src/pages/outposts/ServiceConnectionListPage.ts:63
#: src/pages/outposts/ServiceConnectionListPage.ts:64
#: src/pages/policies/BoundPoliciesList.ts:118
#: src/pages/policies/PolicyTestForm.ts:38
#: src/pages/providers/proxy/ProxyProviderViewPage.ts:119
@ -1939,7 +1939,7 @@ msgstr "No workers connected. Background tasks will not run."
msgid "None (rule disabled)"
msgstr "None (rule disabled)"
#: src/pages/outposts/OutpostHealth.ts:30
#: src/pages/outposts/OutpostHealth.ts:31
msgid "Not available"
msgstr "Not available"
@ -2002,7 +2002,7 @@ msgstr "Notifications Transport"
msgid "Number"
msgstr "Number"
#: src/pages/users/UserViewPage.ts:196
#: src/pages/users/UserViewPage.ts:197
msgid "OAuth Authorization Codes"
msgstr "OAuth Authorization Codes"
@ -2010,7 +2010,7 @@ msgstr "OAuth Authorization Codes"
msgid "OAuth Provider {0}"
msgstr "OAuth Provider {0}"
#: src/pages/users/UserViewPage.ts:204
#: src/pages/users/UserViewPage.ts:205
msgid "OAuth Refresh Codes"
msgstr "OAuth Refresh Codes"
@ -2113,7 +2113,7 @@ msgstr "Outpost Deployment Info"
msgid "Outpost Service Connections"
msgstr "Outpost Service Connections"
#: src/pages/outposts/ServiceConnectionListPage.ts:93
#: src/pages/outposts/ServiceConnectionListPage.ts:94
msgid "Outpost Service-connection"
msgstr "Outpost Service-connection"
@ -2134,7 +2134,7 @@ msgstr "Outposts are deployments of authentik components to support different en
#: src/pages/sources/ldap/LDAPSourceViewPage.ts:67
#: src/pages/sources/oauth/OAuthSourceViewPage.ts:66
#: src/pages/sources/saml/SAMLSourceViewPage.ts:69
#: src/pages/users/UserViewPage.ts:74
#: src/pages/users/UserViewPage.ts:75
msgid "Overview"
msgstr "Overview"
@ -2187,7 +2187,7 @@ msgid "Please enter your password"
msgstr "Please enter your password"
#: src/interfaces/AdminInterface.ts:26
#: src/pages/admin-overview/AdminOverviewPage.ts:46
#: src/pages/admin-overview/AdminOverviewPage.ts:52
#: src/pages/flows/FlowListPage.ts:50
#: src/pages/policies/PolicyListPage.ts:38
msgid "Policies"
@ -2337,7 +2337,7 @@ msgid "Provider type"
msgstr "Provider type"
#: src/interfaces/AdminInterface.ts:20
#: src/pages/admin-overview/AdminOverviewPage.ts:44
#: src/pages/admin-overview/AdminOverviewPage.ts:50
#: src/pages/outposts/OutpostForm.ts:82
#: src/pages/outposts/OutpostListPage.ts:50
msgid "Providers"
@ -2468,7 +2468,7 @@ msgid "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only."
msgstr "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only."
#: src/pages/users/UserListPage.ts:132
#: src/pages/users/UserViewPage.ts:165
#: src/pages/users/UserViewPage.ts:166
msgid "Reset Password"
msgstr "Reset Password"
@ -2482,7 +2482,7 @@ msgid "Result"
msgstr "Result"
#: src/pages/sources/ldap/LDAPSourceViewPage.ts:177
#: src/pages/system-tasks/SystemTaskListPage.ts:107
#: src/pages/system-tasks/SystemTaskListPage.ts:108
msgid "Retry Task"
msgstr "Retry Task"
@ -2805,7 +2805,7 @@ msgstr "Stages"
msgid "Stages are single steps of a Flow that a user is guided through."
msgstr "Stages are single steps of a Flow that a user is guided through."
#: src/pages/outposts/ServiceConnectionListPage.ts:55
#: src/pages/outposts/ServiceConnectionListPage.ts:56
msgid "State"
msgstr "State"
@ -2818,7 +2818,7 @@ msgstr "Static Tokens"
msgid "Static: Static value, displayed as-is."
msgstr "Static: Static value, displayed as-is."
#: src/pages/system-tasks/SystemTaskListPage.ts:56
#: src/pages/system-tasks/SystemTaskListPage.ts:57
msgid "Status"
msgstr "Status"
@ -2848,7 +2848,7 @@ msgstr "Subject mode"
msgid "Subject-alt name"
msgstr "Subject-alt name"
#: src/pages/system-tasks/SystemTaskListPage.ts:63
#: src/pages/system-tasks/SystemTaskListPage.ts:64
msgid "Successful"
msgstr "Successful"
@ -2975,7 +2975,7 @@ msgid "Successfully generated certificate-key pair."
msgstr "Successfully generated certificate-key pair."
#: src/pages/users/UserListPage.ts:127
#: src/pages/users/UserViewPage.ts:160
#: src/pages/users/UserViewPage.ts:161
msgid "Successfully generated recovery link"
msgstr "Successfully generated recovery link"
@ -3106,7 +3106,7 @@ msgstr "Successfully updated user."
msgid "Successfully updated {0} {1}"
msgstr "Successfully updated {0} {1}"
#: src/pages/users/UserViewPage.ts:126
#: src/pages/users/UserViewPage.ts:127
msgid "Superuser"
msgstr "Superuser"
@ -3138,12 +3138,12 @@ msgstr "Sync status"
msgid "Sync users"
msgstr "Sync users"
#: src/pages/admin-overview/AdminOverviewPage.ts:33
#: src/pages/admin-overview/AdminOverviewPage.ts:29
msgid "System Overview"
msgstr "System Overview"
#: src/interfaces/AdminInterface.ts:17
#: src/pages/system-tasks/SystemTaskListPage.ts:26
#: src/pages/system-tasks/SystemTaskListPage.ts:27
msgid "System Tasks"
msgstr "System Tasks"
@ -3301,7 +3301,7 @@ msgstr "Transports"
#: src/pages/flows/BoundStagesList.ts:40
#: src/pages/outposts/OutpostForm.ts:53
#: src/pages/outposts/ServiceConnectionListPage.ts:53
#: src/pages/outposts/ServiceConnectionListPage.ts:54
#: src/pages/policies/PolicyListPage.ts:57
#: src/pages/property-mappings/PropertyMappingListPage.ts:55
#: src/pages/providers/ProviderListPage.ts:54
@ -3347,11 +3347,11 @@ msgstr "URL used to request the initial token. This URL is only required for OAu
msgid "Unenrollment"
msgstr "Unenrollment"
#: src/pages/outposts/ServiceConnectionListPage.ts:70
#: src/pages/outposts/ServiceConnectionListPage.ts:71
msgid "Unhealthy"
msgstr "Unhealthy"
#: src/pages/system-tasks/SystemTaskListPage.ts:69
#: src/pages/system-tasks/SystemTaskListPage.ts:70
msgid "Unknown"
msgstr "Unknown"
@ -3369,7 +3369,7 @@ msgstr "Up-to-date!"
#: src/pages/flows/FlowListPage.ts:66
#: src/pages/groups/GroupListPage.ts:62
#: src/pages/outposts/OutpostListPage.ts:66
#: src/pages/outposts/ServiceConnectionListPage.ts:75
#: src/pages/outposts/ServiceConnectionListPage.ts:76
#: src/pages/policies/BoundPoliciesList.ts:64
#: src/pages/policies/BoundPoliciesList.ts:84
#: src/pages/policies/BoundPoliciesList.ts:99
@ -3393,7 +3393,7 @@ msgstr "Up-to-date!"
#: src/pages/user-settings/tokens/UserTokenList.ts:105
#: src/pages/users/UserActiveForm.ts:66
#: src/pages/users/UserListPage.ts:67
#: src/pages/users/UserViewPage.ts:139
#: src/pages/users/UserViewPage.ts:140
msgid "Update"
msgstr "Update"
@ -3469,7 +3469,7 @@ msgstr "Update Token"
#: src/pages/policies/BoundPoliciesList.ts:102
#: src/pages/users/UserListPage.ts:70
#: src/pages/users/UserViewPage.ts:142
#: src/pages/users/UserViewPage.ts:143
msgid "Update User"
msgstr "Update User"
@ -3478,7 +3478,7 @@ msgid "Update details"
msgstr "Update details"
#: src/pages/flows/BoundStagesList.ts:56
#: src/pages/outposts/ServiceConnectionListPage.ts:78
#: src/pages/outposts/ServiceConnectionListPage.ts:79
#: src/pages/policies/BoundPoliciesList.ts:67
#: src/pages/policies/PolicyListPage.ts:80
#: src/pages/property-mappings/PropertyMappingListPage.ts:69
@ -3523,7 +3523,7 @@ msgstr "Use global settings"
msgid "User"
msgstr "User"
#: src/pages/users/UserViewPage.ts:78
#: src/pages/users/UserViewPage.ts:79
msgid "User Info"
msgstr "User Info"
@ -3553,7 +3553,7 @@ msgid "User password writeback"
msgstr "User password writeback"
#: src/pages/policies/BoundPoliciesList.ts:52
#: src/pages/users/UserViewPage.ts:49
#: src/pages/users/UserViewPage.ts:50
msgid "User {0}"
msgstr "User {0}"
@ -3581,7 +3581,7 @@ msgstr "Userinfo URL"
#: src/pages/stages/identification/IdentificationStageForm.ts:76
#: src/pages/user-settings/UserDetailsPage.ts:57
#: src/pages/users/UserForm.ts:47
#: src/pages/users/UserViewPage.ts:84
#: src/pages/users/UserViewPage.ts:85
msgid "Username"
msgstr "Username"
@ -3590,7 +3590,7 @@ msgid "Username: Same as Text input, but checks for and prevents duplicate usern
msgstr "Username: Same as Text input, but checks for and prevents duplicate usernames."
#: src/interfaces/AdminInterface.ts:32
#: src/pages/admin-overview/AdminOverviewPage.ts:48
#: src/pages/admin-overview/AdminOverviewPage.ts:54
#: src/pages/users/UserListPage.ts:31
msgid "Users"
msgstr "Users"
@ -3623,11 +3623,11 @@ msgstr "Validity days"
msgid "Verification Certificate"
msgstr "Verification Certificate"
#: src/pages/admin-overview/AdminOverviewPage.ts:50
#: src/pages/admin-overview/AdminOverviewPage.ts:56
msgid "Version"
msgstr "Version"
#: src/pages/outposts/OutpostHealth.ts:46
#: src/pages/outposts/OutpostHealth.ts:47
msgid "Version: {0}"
msgstr "Version: {0}"
@ -3652,7 +3652,7 @@ msgid "Wait (min)"
msgstr "Wait (min)"
#: src/pages/events/RuleForm.ts:48
#: src/pages/system-tasks/SystemTaskListPage.ts:65
#: src/pages/system-tasks/SystemTaskListPage.ts:66
msgid "Warning"
msgstr "Warning"
@ -3723,7 +3723,7 @@ msgstr "Whoops!"
msgid "Windows"
msgstr "Windows"
#: src/pages/admin-overview/AdminOverviewPage.ts:52
#: src/pages/admin-overview/AdminOverviewPage.ts:58
msgid "Workers"
msgstr "Workers"
@ -3733,7 +3733,7 @@ msgstr "X509 Subject"
#: src/pages/crypto/CertificateKeyPairListPage.ts:61
#: src/pages/groups/GroupListPage.ts:58
#: src/pages/outposts/ServiceConnectionListPage.ts:63
#: src/pages/outposts/ServiceConnectionListPage.ts:64
#: src/pages/policies/BoundPoliciesList.ts:118
#: src/pages/policies/PolicyTestForm.ts:38
#: src/pages/providers/proxy/ProxyProviderViewPage.ts:116
@ -3786,7 +3786,7 @@ msgstr "{0} is available!"
msgid "{0} unread"
msgstr "{0} unread"
#: src/pages/outposts/OutpostHealth.ts:45
#: src/pages/outposts/OutpostHealth.ts:46
msgid "{0}, should be {1}"
msgstr "{0}, should be {1}"

View File

@ -71,7 +71,7 @@ msgid "Action"
msgstr ""
#: src/pages/users/UserListPage.ts:50
#: src/pages/users/UserViewPage.ts:116
#: src/pages/users/UserViewPage.ts:117
msgid "Active"
msgstr ""
@ -174,7 +174,7 @@ msgstr ""
msgid "Applications"
msgstr ""
#: src/pages/admin-overview/AdminOverviewPage.ts:41
#: src/pages/admin-overview/AdminOverviewPage.ts:47
msgid "Apps with most usage"
msgstr ""
@ -311,7 +311,7 @@ msgstr ""
msgid "Backup finished with warnings."
msgstr ""
#: src/pages/admin-overview/AdminOverviewPage.ts:58
#: src/pages/admin-overview/AdminOverviewPage.ts:64
msgid "Backup status"
msgstr ""
@ -375,11 +375,11 @@ msgstr ""
msgid "CA which the endpoint's Certificate is verified against. Can be left empty for no validation."
msgstr ""
#: src/pages/admin-overview/AdminOverviewPage.ts:56
#: src/pages/admin-overview/AdminOverviewPage.ts:62
msgid "Cached Flows"
msgstr ""
#: src/pages/admin-overview/AdminOverviewPage.ts:54
#: src/pages/admin-overview/AdminOverviewPage.ts:60
msgid "Cached Policies"
msgstr ""
@ -451,7 +451,7 @@ msgstr ""
#: src/pages/sources/ldap/LDAPSourceViewPage.ts:124
#: src/pages/sources/oauth/OAuthSourceViewPage.ts:143
#: src/pages/sources/saml/SAMLSourceViewPage.ts:130
#: src/pages/users/UserViewPage.ts:177
#: src/pages/users/UserViewPage.ts:178
msgid "Changelog"
msgstr ""
@ -672,8 +672,8 @@ msgstr ""
#: src/pages/groups/GroupListPage.ts:99
#: src/pages/outposts/OutpostListPage.ts:136
#: src/pages/outposts/OutpostListPage.ts:144
#: src/pages/outposts/ServiceConnectionListPage.ts:109
#: src/pages/outposts/ServiceConnectionListPage.ts:118
#: src/pages/outposts/ServiceConnectionListPage.ts:110
#: src/pages/outposts/ServiceConnectionListPage.ts:119
#: src/pages/policies/BoundPoliciesList.ts:158
#: src/pages/policies/BoundPoliciesList.ts:185
#: src/pages/policies/BoundPoliciesList.ts:206
@ -778,7 +778,7 @@ msgstr ""
#: src/pages/applications/ApplicationForm.ts:123
#: src/pages/flows/BoundStagesList.ts:149
#: src/pages/outposts/ServiceConnectionListPage.ts:121
#: src/pages/outposts/ServiceConnectionListPage.ts:122
#: src/pages/policies/BoundPoliciesList.ts:188
#: src/pages/policies/PolicyListPage.ts:136
#: src/pages/property-mappings/PropertyMappingListPage.ts:125
@ -834,7 +834,7 @@ msgstr ""
#: src/pages/flows/FlowListPage.ts:86
#: src/pages/groups/GroupListPage.ts:82
#: src/pages/outposts/OutpostListPage.ts:86
#: src/pages/outposts/ServiceConnectionListPage.ts:100
#: src/pages/outposts/ServiceConnectionListPage.ts:101
#: src/pages/policies/PolicyListPage.ts:115
#: src/pages/property-mappings/PropertyMappingListPage.ts:104
#: src/pages/providers/ProviderListPage.ts:98
@ -884,7 +884,7 @@ msgstr ""
#: src/pages/applications/ApplicationForm.ts:170
#: src/pages/property-mappings/PropertyMappingScopeForm.ts:65
#: src/pages/system-tasks/SystemTaskListPage.ts:54
#: src/pages/system-tasks/SystemTaskListPage.ts:55
#: src/pages/user-settings/tokens/UserTokenForm.ts:50
msgid "Description"
msgstr ""
@ -970,7 +970,7 @@ msgstr ""
#: src/pages/flows/FlowListPage.ts:74
#: src/pages/groups/GroupListPage.ts:70
#: src/pages/outposts/OutpostListPage.ts:74
#: src/pages/outposts/ServiceConnectionListPage.ts:88
#: src/pages/outposts/ServiceConnectionListPage.ts:89
#: src/pages/policies/PolicyListPage.ts:90
#: src/pages/property-mappings/PropertyMappingListPage.ts:79
#: src/pages/providers/ProviderListPage.ts:86
@ -985,7 +985,7 @@ msgstr ""
#: src/pages/stages/prompt/PromptListPage.ts:75
#: src/pages/user-settings/tokens/UserTokenList.ts:113
#: src/pages/users/UserListPage.ts:75
#: src/pages/users/UserViewPage.ts:147
#: src/pages/users/UserViewPage.ts:148
msgid "Edit"
msgstr ""
@ -1018,7 +1018,7 @@ msgstr ""
#: src/pages/stages/identification/IdentificationStageForm.ts:79
#: src/pages/user-settings/UserDetailsPage.ts:71
#: src/pages/users/UserForm.ts:61
#: src/pages/users/UserViewPage.ts:100
#: src/pages/users/UserViewPage.ts:101
msgid "Email"
msgstr ""
@ -1069,7 +1069,7 @@ msgstr ""
msgid "Enrollment flow"
msgstr ""
#: src/pages/system-tasks/SystemTaskListPage.ts:67
#: src/pages/system-tasks/SystemTaskListPage.ts:68
msgid "Error"
msgstr ""
@ -1174,7 +1174,7 @@ msgstr ""
msgid "Expiry date"
msgstr ""
#: src/pages/users/UserViewPage.ts:188
#: src/pages/users/UserViewPage.ts:189
msgid "Explicit Consent"
msgstr ""
@ -1442,7 +1442,7 @@ msgid "Icon"
msgstr ""
#: src/pages/flows/FlowListPage.ts:46
#: src/pages/system-tasks/SystemTaskListPage.ts:53
#: src/pages/system-tasks/SystemTaskListPage.ts:54
#: src/pages/tokens/TokenListPage.ts:44
#: src/pages/user-settings/tokens/UserTokenForm.ts:44
#: src/pages/user-settings/tokens/UserTokenList.ts:39
@ -1577,15 +1577,15 @@ msgid "Label shown next to/above the prompt."
msgstr ""
#: src/pages/users/UserListPage.ts:51
#: src/pages/users/UserViewPage.ts:108
#: src/pages/users/UserViewPage.ts:109
msgid "Last login"
msgstr ""
#: src/pages/system-tasks/SystemTaskListPage.ts:55
#: src/pages/system-tasks/SystemTaskListPage.ts:56
msgid "Last run"
msgstr ""
#: src/pages/outposts/OutpostHealth.ts:40
#: src/pages/outposts/OutpostHealth.ts:41
msgid "Last seen: {0}"
msgstr ""
@ -1678,7 +1678,7 @@ msgstr ""
#: src/pages/outposts/ServiceConnectionDockerForm.ts:62
#: src/pages/outposts/ServiceConnectionKubernetesForm.ts:63
#: src/pages/outposts/ServiceConnectionListPage.ts:54
#: src/pages/outposts/ServiceConnectionListPage.ts:55
msgid "Local"
msgstr ""
@ -1694,7 +1694,7 @@ msgstr ""
msgid "Logins"
msgstr ""
#: src/pages/admin-overview/AdminOverviewPage.ts:38
#: src/pages/admin-overview/AdminOverviewPage.ts:44
#: src/pages/applications/ApplicationViewPage.ts:71
msgid "Logins over the last 24 hours"
msgstr ""
@ -1707,7 +1707,7 @@ msgstr ""
msgid "Logs"
msgstr ""
#: src/pages/system-tasks/SystemTaskListPage.ts:29
#: src/pages/system-tasks/SystemTaskListPage.ts:30
msgid "Long-running operations which authentik executes in the background."
msgstr ""
@ -1734,7 +1734,7 @@ msgstr ""
#: src/pages/events/EventInfo.ts:174
#: src/pages/policies/PolicyTestForm.ts:43
#: src/pages/system-tasks/SystemTaskListPage.ts:79
#: src/pages/system-tasks/SystemTaskListPage.ts:80
msgid "Messages"
msgstr ""
@ -1793,7 +1793,7 @@ msgstr ""
#: src/pages/outposts/OutpostListPage.ts:49
#: src/pages/outposts/ServiceConnectionDockerForm.ts:53
#: src/pages/outposts/ServiceConnectionKubernetesForm.ts:54
#: src/pages/outposts/ServiceConnectionListPage.ts:52
#: src/pages/outposts/ServiceConnectionListPage.ts:53
#: src/pages/policies/PolicyListPage.ts:56
#: src/pages/policies/dummy/DummyPolicyForm.ts:53
#: src/pages/policies/event_matcher/EventMatcherPolicyForm.ts:54
@ -1842,7 +1842,7 @@ msgstr ""
#: src/pages/user-settings/UserDetailsPage.ts:64
#: src/pages/users/UserForm.ts:54
#: src/pages/users/UserListPage.ts:49
#: src/pages/users/UserViewPage.ts:92
#: src/pages/users/UserViewPage.ts:93
msgid "Name"
msgstr ""
@ -1869,7 +1869,7 @@ msgstr ""
#: src/pages/crypto/CertificateKeyPairListPage.ts:61
#: src/pages/groups/GroupListPage.ts:58
#: src/pages/outposts/ServiceConnectionListPage.ts:63
#: src/pages/outposts/ServiceConnectionListPage.ts:64
#: src/pages/policies/BoundPoliciesList.ts:118
#: src/pages/policies/PolicyTestForm.ts:38
#: src/pages/providers/proxy/ProxyProviderViewPage.ts:119
@ -1935,7 +1935,7 @@ msgstr ""
msgid "None (rule disabled)"
msgstr ""
#: src/pages/outposts/OutpostHealth.ts:30
#: src/pages/outposts/OutpostHealth.ts:31
msgid "Not available"
msgstr ""
@ -1998,7 +1998,7 @@ msgstr ""
msgid "Number"
msgstr ""
#: src/pages/users/UserViewPage.ts:196
#: src/pages/users/UserViewPage.ts:197
msgid "OAuth Authorization Codes"
msgstr ""
@ -2006,7 +2006,7 @@ msgstr ""
msgid "OAuth Provider {0}"
msgstr ""
#: src/pages/users/UserViewPage.ts:204
#: src/pages/users/UserViewPage.ts:205
msgid "OAuth Refresh Codes"
msgstr ""
@ -2109,7 +2109,7 @@ msgstr ""
msgid "Outpost Service Connections"
msgstr ""
#: src/pages/outposts/ServiceConnectionListPage.ts:93
#: src/pages/outposts/ServiceConnectionListPage.ts:94
msgid "Outpost Service-connection"
msgstr ""
@ -2130,7 +2130,7 @@ msgstr ""
#: src/pages/sources/ldap/LDAPSourceViewPage.ts:67
#: src/pages/sources/oauth/OAuthSourceViewPage.ts:66
#: src/pages/sources/saml/SAMLSourceViewPage.ts:69
#: src/pages/users/UserViewPage.ts:74
#: src/pages/users/UserViewPage.ts:75
msgid "Overview"
msgstr ""
@ -2183,7 +2183,7 @@ msgid "Please enter your password"
msgstr ""
#: src/interfaces/AdminInterface.ts:26
#: src/pages/admin-overview/AdminOverviewPage.ts:46
#: src/pages/admin-overview/AdminOverviewPage.ts:52
#: src/pages/flows/FlowListPage.ts:50
#: src/pages/policies/PolicyListPage.ts:38
msgid "Policies"
@ -2333,7 +2333,7 @@ msgid "Provider type"
msgstr ""
#: src/interfaces/AdminInterface.ts:20
#: src/pages/admin-overview/AdminOverviewPage.ts:44
#: src/pages/admin-overview/AdminOverviewPage.ts:50
#: src/pages/outposts/OutpostForm.ts:82
#: src/pages/outposts/OutpostListPage.ts:50
msgid "Providers"
@ -2464,7 +2464,7 @@ msgid "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only."
msgstr ""
#: src/pages/users/UserListPage.ts:132
#: src/pages/users/UserViewPage.ts:165
#: src/pages/users/UserViewPage.ts:166
msgid "Reset Password"
msgstr ""
@ -2478,7 +2478,7 @@ msgid "Result"
msgstr ""
#: src/pages/sources/ldap/LDAPSourceViewPage.ts:177
#: src/pages/system-tasks/SystemTaskListPage.ts:107
#: src/pages/system-tasks/SystemTaskListPage.ts:108
msgid "Retry Task"
msgstr ""
@ -2801,7 +2801,7 @@ msgstr ""
msgid "Stages are single steps of a Flow that a user is guided through."
msgstr ""
#: src/pages/outposts/ServiceConnectionListPage.ts:55
#: src/pages/outposts/ServiceConnectionListPage.ts:56
msgid "State"
msgstr ""
@ -2814,7 +2814,7 @@ msgstr ""
msgid "Static: Static value, displayed as-is."
msgstr ""
#: src/pages/system-tasks/SystemTaskListPage.ts:56
#: src/pages/system-tasks/SystemTaskListPage.ts:57
msgid "Status"
msgstr ""
@ -2844,7 +2844,7 @@ msgstr ""
msgid "Subject-alt name"
msgstr ""
#: src/pages/system-tasks/SystemTaskListPage.ts:63
#: src/pages/system-tasks/SystemTaskListPage.ts:64
msgid "Successful"
msgstr ""
@ -2971,7 +2971,7 @@ msgid "Successfully generated certificate-key pair."
msgstr ""
#: src/pages/users/UserListPage.ts:127
#: src/pages/users/UserViewPage.ts:160
#: src/pages/users/UserViewPage.ts:161
msgid "Successfully generated recovery link"
msgstr ""
@ -3102,7 +3102,7 @@ msgstr ""
msgid "Successfully updated {0} {1}"
msgstr ""
#: src/pages/users/UserViewPage.ts:126
#: src/pages/users/UserViewPage.ts:127
msgid "Superuser"
msgstr ""
@ -3134,12 +3134,12 @@ msgstr ""
msgid "Sync users"
msgstr ""
#: src/pages/admin-overview/AdminOverviewPage.ts:33
#: src/pages/admin-overview/AdminOverviewPage.ts:29
msgid "System Overview"
msgstr ""
#: src/interfaces/AdminInterface.ts:17
#: src/pages/system-tasks/SystemTaskListPage.ts:26
#: src/pages/system-tasks/SystemTaskListPage.ts:27
msgid "System Tasks"
msgstr ""
@ -3295,7 +3295,7 @@ msgstr ""
#: src/pages/flows/BoundStagesList.ts:40
#: src/pages/outposts/OutpostForm.ts:53
#: src/pages/outposts/ServiceConnectionListPage.ts:53
#: src/pages/outposts/ServiceConnectionListPage.ts:54
#: src/pages/policies/PolicyListPage.ts:57
#: src/pages/property-mappings/PropertyMappingListPage.ts:55
#: src/pages/providers/ProviderListPage.ts:54
@ -3341,11 +3341,11 @@ msgstr ""
msgid "Unenrollment"
msgstr ""
#: src/pages/outposts/ServiceConnectionListPage.ts:70
#: src/pages/outposts/ServiceConnectionListPage.ts:71
msgid "Unhealthy"
msgstr ""
#: src/pages/system-tasks/SystemTaskListPage.ts:69
#: src/pages/system-tasks/SystemTaskListPage.ts:70
msgid "Unknown"
msgstr ""
@ -3363,7 +3363,7 @@ msgstr ""
#: src/pages/flows/FlowListPage.ts:66
#: src/pages/groups/GroupListPage.ts:62
#: src/pages/outposts/OutpostListPage.ts:66
#: src/pages/outposts/ServiceConnectionListPage.ts:75
#: src/pages/outposts/ServiceConnectionListPage.ts:76
#: src/pages/policies/BoundPoliciesList.ts:64
#: src/pages/policies/BoundPoliciesList.ts:84
#: src/pages/policies/BoundPoliciesList.ts:99
@ -3387,7 +3387,7 @@ msgstr ""
#: src/pages/user-settings/tokens/UserTokenList.ts:105
#: src/pages/users/UserActiveForm.ts:66
#: src/pages/users/UserListPage.ts:67
#: src/pages/users/UserViewPage.ts:139
#: src/pages/users/UserViewPage.ts:140
msgid "Update"
msgstr ""
@ -3463,7 +3463,7 @@ msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:102
#: src/pages/users/UserListPage.ts:70
#: src/pages/users/UserViewPage.ts:142
#: src/pages/users/UserViewPage.ts:143
msgid "Update User"
msgstr ""
@ -3472,7 +3472,7 @@ msgid "Update details"
msgstr ""
#: src/pages/flows/BoundStagesList.ts:56
#: src/pages/outposts/ServiceConnectionListPage.ts:78
#: src/pages/outposts/ServiceConnectionListPage.ts:79
#: src/pages/policies/BoundPoliciesList.ts:67
#: src/pages/policies/PolicyListPage.ts:80
#: src/pages/property-mappings/PropertyMappingListPage.ts:69
@ -3517,7 +3517,7 @@ msgstr ""
msgid "User"
msgstr ""
#: src/pages/users/UserViewPage.ts:78
#: src/pages/users/UserViewPage.ts:79
msgid "User Info"
msgstr ""
@ -3547,7 +3547,7 @@ msgid "User password writeback"
msgstr ""
#: src/pages/policies/BoundPoliciesList.ts:52
#: src/pages/users/UserViewPage.ts:49
#: src/pages/users/UserViewPage.ts:50
msgid "User {0}"
msgstr ""
@ -3575,7 +3575,7 @@ msgstr ""
#: src/pages/stages/identification/IdentificationStageForm.ts:76
#: src/pages/user-settings/UserDetailsPage.ts:57
#: src/pages/users/UserForm.ts:47
#: src/pages/users/UserViewPage.ts:84
#: src/pages/users/UserViewPage.ts:85
msgid "Username"
msgstr ""
@ -3584,7 +3584,7 @@ msgid "Username: Same as Text input, but checks for and prevents duplicate usern
msgstr ""
#: src/interfaces/AdminInterface.ts:32
#: src/pages/admin-overview/AdminOverviewPage.ts:48
#: src/pages/admin-overview/AdminOverviewPage.ts:54
#: src/pages/users/UserListPage.ts:31
msgid "Users"
msgstr ""
@ -3617,11 +3617,11 @@ msgstr ""
msgid "Verification Certificate"
msgstr ""
#: src/pages/admin-overview/AdminOverviewPage.ts:50
#: src/pages/admin-overview/AdminOverviewPage.ts:56
msgid "Version"
msgstr ""
#: src/pages/outposts/OutpostHealth.ts:46
#: src/pages/outposts/OutpostHealth.ts:47
msgid "Version: {0}"
msgstr ""
@ -3646,7 +3646,7 @@ msgid "Wait (min)"
msgstr ""
#: src/pages/events/RuleForm.ts:48
#: src/pages/system-tasks/SystemTaskListPage.ts:65
#: src/pages/system-tasks/SystemTaskListPage.ts:66
msgid "Warning"
msgstr ""
@ -3717,7 +3717,7 @@ msgstr ""
msgid "Windows"
msgstr ""
#: src/pages/admin-overview/AdminOverviewPage.ts:52
#: src/pages/admin-overview/AdminOverviewPage.ts:58
msgid "Workers"
msgstr ""
@ -3727,7 +3727,7 @@ msgstr ""
#: src/pages/crypto/CertificateKeyPairListPage.ts:61
#: src/pages/groups/GroupListPage.ts:58
#: src/pages/outposts/ServiceConnectionListPage.ts:63
#: src/pages/outposts/ServiceConnectionListPage.ts:64
#: src/pages/policies/BoundPoliciesList.ts:118
#: src/pages/policies/PolicyTestForm.ts:38
#: src/pages/providers/proxy/ProxyProviderViewPage.ts:116
@ -3780,7 +3780,7 @@ msgstr ""
msgid "{0} unread"
msgstr ""
#: src/pages/outposts/OutpostHealth.ts:45
#: src/pages/outposts/OutpostHealth.ts:46
msgid "{0}, should be {1}"
msgstr ""

View File

@ -1,5 +1,5 @@
import { t } from "@lingui/macro";
import { CSSResult, customElement, html, LitElement, TemplateResult } from "lit-element";
import { CSSResult, customElement, html, TemplateResult } from "lit-element";
import "../../elements/charts/AdminLoginsChart";
import "../../elements/cards/AggregatePromiseCard";
@ -20,20 +20,25 @@ import PFPage from "@patternfly/patternfly/components/Page/page.css";
import PFContent from "@patternfly/patternfly/components/Content/content.css";
import PFGallery from "@patternfly/patternfly/layouts/Gallery/gallery.css";
import AKGlobal from "../../authentik.css";
import { Page } from "../../elements/Page";
@customElement("ak-admin-overview")
export class AdminOverviewPage extends LitElement {
export class AdminOverviewPage extends Page {
pageTitle(): string {
return t`System Overview`;
}
pageDescription(): string | undefined {
return;
}
pageIcon(): string {
return "";
}
static get styles(): CSSResult[] {
return [PFGallery, PFPage, PFContent, AKGlobal];
}
render(): TemplateResult {
return html`<section class="pf-c-page__main-section pf-m-light">
<div class="pf-c-content">
<h1>${t`System Overview`}</h1>
</div>
</section>
renderContent(): TemplateResult {
return html`
<section class="pf-c-page__main-section">
<div class="pf-l-gallery pf-m-gutter">
<ak-aggregate-card class="pf-l-gallery__item pf-m-4-col" icon="pf-icon pf-icon-server" header=${t`Logins over the last 24 hours`} style="grid-column-end: span 3;grid-row-end: span 2;">

View File

@ -34,7 +34,7 @@ export abstract class AdminStatusCard<T> extends AggregateCard {
this.value = v;
return this.getStatus(v);
}).then((status) => {
return html`<p class="ak-aggregate-card">
return html`<p>
<i class="${status.icon}"></i>&nbsp;${this.renderValue()}
</p>
${status.message ? html`<p class="subtext">${status.message}</p>` : html``}`;

View File

@ -6,6 +6,7 @@ import { DEFAULT_CONFIG } from "../../api/Config";
import PFBase from "@patternfly/patternfly/patternfly-base.css";
import "../../elements/Spinner";
import AKGlobal from "../../authentik.css";
import { PFColor } from "../../elements/Label";
@customElement("ak-outpost-health")
export class OutpostHealth extends LitElement {
@ -28,7 +29,7 @@ export class OutpostHealth extends LitElement {
return html`<li>
<ul>
<li role="cell">
<i class="fas fa-question-circle"></i>&nbsp;${t`Not available`}
<ak-label color=${PFColor.Grey} text=${t`Not available`}></ak-label>
</li>
</ul>
</li>`;
@ -37,13 +38,13 @@ export class OutpostHealth extends LitElement {
return html`<li>
<ul>
<li role="cell">
<i class="fas fa-check pf-m-success"></i>&nbsp;${t`Last seen: ${h.lastSeen?.toLocaleTimeString()}`}
<ak-label color=${PFColor.Green} text=${t`Last seen: ${h.lastSeen?.toLocaleTimeString()}`}></ak-label>
</li>
<li role="cell">
${h.versionOutdated ?
html`<i class="fas fa-times pf-m-danger"></i>&nbsp;
${t`${h.version}, should be ${h.versionShould}`}` :
html`<i class="fas fa-check pf-m-success"></i>&nbsp;${t`Version: ${h.version || ""}`}`}
html`<ak-label color=${PFColor.Red}
text=${t`${h.version}, should be ${h.versionShould}`}></ak-label>` :
html`<ak-label color=${PFColor.Green} text=${t`Version: ${h.version || ""}`}></ak-label>`}
</li>
</ul>
</li>`;

View File

@ -18,6 +18,7 @@ import { OutpostsApi, ServiceConnection } from "authentik-api";
import { DEFAULT_CONFIG } from "../../api/Config";
import "../../elements/forms/ProxyForm";
import { ifDefined } from "lit-html/directives/if-defined";
import { PFColor } from "../../elements/Label";
@customElement("ak-outpost-service-connection-list")
export class OutpostServiceConnectionListPage extends TablePage<ServiceConnection> {
@ -66,9 +67,9 @@ export class OutpostServiceConnectionListPage extends TablePage<ServiceConnectio
uuid: item.pk || ""
}).then((state) => {
if (state.healthy) {
return html`<i class="fas fa-check pf-m-success"></i>&nbsp;${state.version}`;
return html`<ak-label color=${PFColor.Green} text=${ifDefined(state.version)}></ak-label>`;
}
return html`<i class="fas fa-times pf-m-danger"></i>&nbsp;${t`Unhealthy`}`;
return html`<ak-label color=${PFColor.Red} text=${t`Unhealthy`}></ak-label>`;
}), html`<ak-spinner></ak-spinner>`)}`,
html`
<ak-forms-modal>

View File

@ -9,6 +9,7 @@ import "../../elements/buttons/ActionButton";
import { TableColumn } from "../../elements/table/Table";
import { AdminApi, Task, TaskStatusEnum } from "authentik-api";
import { DEFAULT_CONFIG } from "../../api/Config";
import { PFColor } from "../../elements/Label";
@customElement("ak-system-task-list")
export class SystemTaskListPage extends TablePage<Task> {
@ -62,13 +63,13 @@ export class SystemTaskListPage extends TablePage<Task> {
taskStatus(task: Task): TemplateResult {
switch (task.status) {
case TaskStatusEnum.Successful:
return html`<i class="fas fa-check pf-m-success"></i>&nbsp;${t`Successful`}`;
return html`<ak-label color=${PFColor.Green} text=${t`Successful`}></ak-label>`;
case TaskStatusEnum.Warning:
return html`<i class="fas fa-exclamation-triangle pf-m-warning"></i>&nbsp;${t`Warning`}`;
return html`<ak-label color=${PFColor.Orange} text=${t`Warning`}></ak-label>`;
case TaskStatusEnum.Error:
return html`<i class="fas fa-times pf-m-danger"></i>&nbsp;${t`Error`}`;
return html`<ak-label color=${PFColor.Red} text=${t`Error`}></ak-label>`;
default:
return html`<i class="fas fa-question-circle"></i>&nbsp;${t`Unknown`}`;
return html`<ak-label color=${PFColor.Grey} text=${t`Unknown`}></ak-label>`;
}
}

View File

@ -30,6 +30,7 @@ import { DEFAULT_CONFIG } from "../../api/Config";
import { EVENT_REFRESH } from "../../constants";
import { showMessage } from "../../elements/messages/MessageContainer";
import { MessageLevel } from "../../elements/messages/Message";
import { PFColor } from "../../elements/Label";
@customElement("ak-user-view")
export class UserViewPage extends Page {
@ -118,7 +119,7 @@ export class UserViewPage extends Page {
</dt>
<dd class="pf-c-description-list__description">
<div class="pf-c-description-list__text">
<i class="fa ${this.user.isActive ? "fa-check-circle pf-m-success" : "fa-exclamation-triangle pf-m-warning"}"></i>
<ak-label color=${this.user.isActive ? PFColor.Green : PFColor.Orange} text=""></ak-label>
</div>
</dd>
</div>
@ -128,7 +129,7 @@ export class UserViewPage extends Page {
</dt>
<dd class="pf-c-description-list__description">
<div class="pf-c-description-list__text">
<i class="fa ${this.user.isSuperuser ? "fa-check-circle pf-m-success" : "fa-exclamation-triangle pf-m-warning"}"></i>
<ak-label color=${this.user.isActive ? PFColor.Green : PFColor.Orange} text=""></ak-label>
</div>
</dd>
</div>