diff --git a/authentik/core/migrations/0026_alter_application_meta_icon.py b/authentik/core/migrations/0026_alter_application_meta_icon.py index 451afa01c..2510b7457 100644 --- a/authentik/core/migrations/0026_alter_application_meta_icon.py +++ b/authentik/core/migrations/0026_alter_application_meta_icon.py @@ -18,7 +18,10 @@ class Migration(migrations.Migration): ), ), migrations.AlterModelOptions( - name='authenticatedsession', - options={'verbose_name': 'Authenticated Session', 'verbose_name_plural': 'Authenticated Sessions'}, + name="authenticatedsession", + options={ + "verbose_name": "Authenticated Session", + "verbose_name_plural": "Authenticated Sessions", + }, ), ] diff --git a/web/src/elements/PageHeader.ts b/web/src/elements/PageHeader.ts index 9524fcf89..59357efd3 100644 --- a/web/src/elements/PageHeader.ts +++ b/web/src/elements/PageHeader.ts @@ -12,7 +12,12 @@ import PFContent from "@patternfly/patternfly/components/Content/content.css"; import AKGlobal from "../authentik.css"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; import PFButton from "@patternfly/patternfly/components/Button/button.css"; -import { EVENT_API_DRAWER_TOGGLE, EVENT_NOTIFICATION_DRAWER_TOGGLE, EVENT_SIDEBAR_TOGGLE, TITLE_DEFAULT } from "../constants"; +import { + EVENT_API_DRAWER_TOGGLE, + EVENT_NOTIFICATION_DRAWER_TOGGLE, + EVENT_SIDEBAR_TOGGLE, + TITLE_DEFAULT, +} from "../constants"; import { DEFAULT_CONFIG, tenant } from "../api/Config"; import { EventsApi } from "../../api/dist"; @@ -154,7 +159,6 @@ export class PageHeader extends LitElement { }} > - - `; + `; } } diff --git a/web/src/elements/buttons/ActionButton.ts b/web/src/elements/buttons/ActionButton.ts index 2424f8d09..c17d381a1 100644 --- a/web/src/elements/buttons/ActionButton.ts +++ b/web/src/elements/buttons/ActionButton.ts @@ -5,7 +5,6 @@ import { MessageLevel } from "../messages/Message"; @customElement("ak-action-button") export class ActionButton extends SpinnerButton { - @property({ attribute: false }) // eslint-disable-next-line @typescript-eslint/no-explicit-any apiRequest: () => Promise = () => { diff --git a/web/src/elements/buttons/SpinnerButton.ts b/web/src/elements/buttons/SpinnerButton.ts index 3db155aed..58d95c56e 100644 --- a/web/src/elements/buttons/SpinnerButton.ts +++ b/web/src/elements/buttons/SpinnerButton.ts @@ -16,7 +16,6 @@ import { ERROR_CLASS, PRIMARY_CLASS, PROGRESS_CLASS, SUCCESS_CLASS } from "../.. @customElement("ak-spinner-button") export class SpinnerButton extends LitElement { - @property({ type: Boolean }) isRunning = false; diff --git a/web/src/elements/notifications/APIDrawer.ts b/web/src/elements/notifications/APIDrawer.ts index 80645fea6..63ce9b33d 100644 --- a/web/src/elements/notifications/APIDrawer.ts +++ b/web/src/elements/notifications/APIDrawer.ts @@ -1,5 +1,13 @@ import { Middleware, ResponseContext } from "authentik-api"; -import { css, CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element"; +import { + css, + CSSResult, + customElement, + html, + LitElement, + property, + TemplateResult, +} from "lit-element"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; import PFNotificationDrawer from "@patternfly/patternfly/components/NotificationDrawer/notification-drawer.css"; import PFDropdown from "@patternfly/patternfly/components/Dropdown/dropdown.css"; @@ -16,7 +24,6 @@ export interface RequestInfo { } export class APIMiddleware implements Middleware { - post?(context: ResponseContext): Promise { const request: RequestInfo = { method: (context.init.method || "GET").toUpperCase(), @@ -32,31 +39,37 @@ export class APIMiddleware implements Middleware { ); return Promise.resolve(context.response); } - } @customElement("ak-api-drawer") export class APIDrawer extends LitElement { - - @property({attribute: false}) + @property({ attribute: false }) requests: RequestInfo[] = []; static get styles(): CSSResult[] { - return [PFBase, PFNotificationDrawer, PFButton, PFContent, PFDropdown, AKGlobal, css` - .pf-c-notification-drawer__header { - height: 114px; - align-items: center; - } - .pf-c-notification-drawer__header-action, - .pf-c-notification-drawer__header-action-close, - .pf-c-notification-drawer__header-action-close > .pf-c-button.pf-m-plain { - height: 100%; - } - .pf-c-notification-drawer__list-item-description { - white-space: pre-wrap; - font-family: monospace; - } - `]; + return [ + PFBase, + PFNotificationDrawer, + PFButton, + PFContent, + PFDropdown, + AKGlobal, + css` + .pf-c-notification-drawer__header { + height: 114px; + align-items: center; + } + .pf-c-notification-drawer__header-action, + .pf-c-notification-drawer__header-action-close, + .pf-c-notification-drawer__header-action-close > .pf-c-button.pf-m-plain { + height: 100%; + } + .pf-c-notification-drawer__list-item-description { + white-space: pre-wrap; + font-family: monospace; + } + `, + ]; } constructor() { @@ -73,9 +86,13 @@ export class APIDrawer extends LitElement { renderItem(item: RequestInfo): TemplateResult { return html` - ${item.method}: ${item.status} + + ${item.method}: ${item.status} + - ${item.path} + ${item.path} `; } diff --git a/web/src/interfaces/AdminInterface.ts b/web/src/interfaces/AdminInterface.ts index 5e493a3c1..c78e9afc5 100644 --- a/web/src/interfaces/AdminInterface.ts +++ b/web/src/interfaces/AdminInterface.ts @@ -24,7 +24,12 @@ import "../elements/messages/MessageContainer"; import "../elements/notifications/NotificationDrawer"; import "../elements/sidebar/Sidebar"; import { until } from "lit-html/directives/until"; -import { EVENT_API_DRAWER_TOGGLE, EVENT_NOTIFICATION_DRAWER_TOGGLE, EVENT_SIDEBAR_TOGGLE, VERSION } from "../constants"; +import { + EVENT_API_DRAWER_TOGGLE, + EVENT_NOTIFICATION_DRAWER_TOGGLE, + EVENT_SIDEBAR_TOGGLE, + VERSION, +} from "../constants"; import { AdminApi } from "authentik-api"; import { DEFAULT_CONFIG } from "../api/Config"; import { WebsocketClient } from "../common/ws"; @@ -106,8 +111,16 @@ export class AdminInterface extends LitElement { - ${this.notificationOpen ? html`` : html``} - ${this.apiDrawerOpen ? html`` : html``} + ${this.notificationOpen + ? html`` + : html``} + ${this.apiDrawerOpen + ? html`` + : html``} diff --git a/web/src/pages/applications/ApplicationViewPage.ts b/web/src/pages/applications/ApplicationViewPage.ts index ef39a7a9b..fef37e81a 100644 --- a/web/src/pages/applications/ApplicationViewPage.ts +++ b/web/src/pages/applications/ApplicationViewPage.ts @@ -39,16 +39,7 @@ export class ApplicationViewPage extends LitElement { application!: Application; static get styles(): CSSResult[] { - return [ - PFBase, - PFPage, - PFContent, - PFButton, - PFDescriptionList, - PFGrid, - PFCard, - AKGlobal, - ]; + return [PFBase, PFPage, PFContent, PFButton, PFDescriptionList, PFGrid, PFCard, AKGlobal]; } render(): TemplateResult { @@ -73,7 +64,9 @@ export class ApplicationViewPage extends LitElement { class="pf-c-page__main-section pf-m-no-padding-mobile" > - + ${t`Related`} @@ -198,9 +191,7 @@ export class ApplicationViewPage extends LitElement { `} - + ${t`Changelog`} { renderExpanded(item: NotificationRule): TemplateResult { return html` - - - ${t`These bindings control upon which events this rule triggers. Bindings to + + + ${t`These bindings control upon which events this rule triggers. Bindings to groups/users are checked against the user of the event.`} - - - - `; + + + + `; } } diff --git a/web/src/pages/events/TransportListPage.ts b/web/src/pages/events/TransportListPage.ts index 7fbdb8486..68bfa74c1 100644 --- a/web/src/pages/events/TransportListPage.ts +++ b/web/src/pages/events/TransportListPage.ts @@ -89,10 +89,10 @@ export class TransportListPage extends TablePage { { - return new EventsApi(DEFAULT_CONFIG).eventsTransportsTestCreate({ - uuid: item.pk || "", - }); - }} + return new EventsApi(DEFAULT_CONFIG).eventsTransportsTestCreate({ + uuid: item.pk || "", + }); + }} > `, diff --git a/web/src/pages/flows/FlowViewPage.ts b/web/src/pages/flows/FlowViewPage.ts index 46124bb32..fdb99514a 100644 --- a/web/src/pages/flows/FlowViewPage.ts +++ b/web/src/pages/flows/FlowViewPage.ts @@ -30,7 +30,6 @@ import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList @customElement("ak-flow-view") export class FlowViewPage extends LitElement { - @property() set flowSlug(value: string) { new FlowsApi(DEFAULT_CONFIG) @@ -46,7 +45,16 @@ export class FlowViewPage extends LitElement { flow!: Flow; static get styles(): CSSResult[] { - return [PFBase, PFPage, PFDescriptionList, PFButton, PFCard, PFContent, PFGrid, AKGlobal].concat( + return [ + PFBase, + PFPage, + PFDescriptionList, + PFButton, + PFCard, + PFContent, + PFGrid, + AKGlobal, + ].concat( css` img.pf-icon { max-height: 24px; @@ -75,7 +83,9 @@ export class FlowViewPage extends LitElement { class="pf-c-page__main-section pf-m-no-padding-mobile" > - + ${t`Related`} diff --git a/web/src/pages/users/UserViewPage.ts b/web/src/pages/users/UserViewPage.ts index e6c24828d..1ac40bb3b 100644 --- a/web/src/pages/users/UserViewPage.ts +++ b/web/src/pages/users/UserViewPage.ts @@ -95,7 +95,9 @@ export class UserViewPage extends LitElement { class="pf-c-page__main-section pf-m-no-padding-mobile" > - + ${t`User Info`}
- ${t`These bindings control upon which events this rule triggers. Bindings to +
+ ${t`These bindings control upon which events this rule triggers. Bindings to groups/users are checked against the user of the event.`} -