diff --git a/authentik/events/monitored_tasks.py b/authentik/events/monitored_tasks.py index e672678ce..b45494384 100644 --- a/authentik/events/monitored_tasks.py +++ b/authentik/events/monitored_tasks.py @@ -3,7 +3,6 @@ from dataclasses import dataclass, field from datetime import datetime from enum import Enum from timeit import default_timer -from traceback import format_tb from typing import Any, Optional from celery import Task @@ -42,8 +41,7 @@ class TaskResult: def with_error(self, exc: Exception) -> "TaskResult": """Since errors might not always be pickle-able, set the traceback""" - self.messages.extend(format_tb(exc.__traceback__)) - self.messages.append(str(exc)) + self.messages.extend(exception_to_string(exc).splitlines()) return self diff --git a/web/src/authentik.css b/web/src/authentik.css index 043f574f4..8563ff046 100644 --- a/web/src/authentik.css +++ b/web/src/authentik.css @@ -74,7 +74,7 @@ html > form > input { } .pf-m-success { - color: var(--pf-global--success-color--100); + color: var(--pf-global--success-color--100) !important; } .pf-m-warning { color: var(--pf-global--warning-color--100); diff --git a/web/src/constants.ts b/web/src/constants.ts index b0e08d599..87b9c0a44 100644 --- a/web/src/constants.ts +++ b/web/src/constants.ts @@ -1,4 +1,4 @@ -export const PRIMARY_CLASS = "pf-m-primary"; +export const SECONDARY_CLASS = "pf-m-secondary"; export const SUCCESS_CLASS = "pf-m-success"; export const ERROR_CLASS = "pf-m-danger"; export const PROGRESS_CLASS = "pf-m-in-progress"; diff --git a/web/src/elements/buttons/SpinnerButton.ts b/web/src/elements/buttons/SpinnerButton.ts index 58d95c56e..27bbc0759 100644 --- a/web/src/elements/buttons/SpinnerButton.ts +++ b/web/src/elements/buttons/SpinnerButton.ts @@ -12,7 +12,7 @@ import PFButton from "@patternfly/patternfly/components/Button/button.css"; import PFSpinner from "@patternfly/patternfly/components/Spinner/spinner.css"; import AKGlobal from "../../authentik.css"; import { PFSize } from "../Spinner"; -import { ERROR_CLASS, PRIMARY_CLASS, PROGRESS_CLASS, SUCCESS_CLASS } from "../../constants"; +import { ERROR_CLASS, PROGRESS_CLASS, SUCCESS_CLASS } from "../../constants"; @customElement("ak-spinner-button") export class SpinnerButton extends LitElement { @@ -39,7 +39,6 @@ export class SpinnerButton extends LitElement { constructor() { super(); - this.classList.add(PRIMARY_CLASS); } setLoading(): void { @@ -51,10 +50,10 @@ export class SpinnerButton extends LitElement { setDone(statusClass: string): void { this.isRunning = false; this.classList.remove(PROGRESS_CLASS); - this.classList.replace(PRIMARY_CLASS, statusClass); + this.classList.add(statusClass); this.requestUpdate(); setTimeout(() => { - this.classList.replace(statusClass, PRIMARY_CLASS); + this.classList.remove(statusClass); this.requestUpdate(); }, 1000); } diff --git a/web/src/elements/buttons/TokenCopyButton.ts b/web/src/elements/buttons/TokenCopyButton.ts index 048984ea0..25b87612d 100644 --- a/web/src/elements/buttons/TokenCopyButton.ts +++ b/web/src/elements/buttons/TokenCopyButton.ts @@ -1,6 +1,6 @@ import { customElement, property } from "lit-element"; import { CoreApi } from "@goauthentik/api"; -import { PRIMARY_CLASS, SUCCESS_CLASS } from "../../constants"; +import { SECONDARY_CLASS, SUCCESS_CLASS } from "../../constants"; import { DEFAULT_CONFIG } from "../../api/Config"; import { ActionButton } from "./ActionButton"; @@ -10,7 +10,7 @@ export class TokenCopyButton extends ActionButton { identifier?: string; @property() - buttonClass: string = PRIMARY_CLASS; + buttonClass: string = SECONDARY_CLASS; apiRequest: () => Promise = () => { this.setLoading(); @@ -28,7 +28,7 @@ export class TokenCopyButton extends ActionButton { return navigator.clipboard.writeText(token.key).then(() => { this.buttonClass = SUCCESS_CLASS; setTimeout(() => { - this.buttonClass = PRIMARY_CLASS; + this.buttonClass = SECONDARY_CLASS; }, 1500); }); }) diff --git a/web/src/pages/providers/saml/SAMLProviderViewPage.ts b/web/src/pages/providers/saml/SAMLProviderViewPage.ts index 122304964..cec8e3ef6 100644 --- a/web/src/pages/providers/saml/SAMLProviderViewPage.ts +++ b/web/src/pages/providers/saml/SAMLProviderViewPage.ts @@ -215,7 +215,6 @@ export class SAMLProviderViewPage extends LitElement { ${t`Download`} { const fullUrl = window.location.origin + diff --git a/web/src/pages/system-tasks/SystemTaskListPage.ts b/web/src/pages/system-tasks/SystemTaskListPage.ts index d929a79af..e2f863a1f 100644 --- a/web/src/pages/system-tasks/SystemTaskListPage.ts +++ b/web/src/pages/system-tasks/SystemTaskListPage.ts @@ -104,6 +104,7 @@ export class SystemTaskListPage extends TablePage { html`${item.taskFinishTimestamp.toLocaleString()}`, this.taskStatus(item), html` { return new AdminApi(DEFAULT_CONFIG) .adminSystemTasksRetryCreate({ @@ -119,7 +120,7 @@ export class SystemTaskListPage extends TablePage { }); }} > - ${t`Retry Task`} + `, ]; }