root: fix formatting
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
8044818a4d
commit
2d5094fdf7
|
@ -18,7 +18,10 @@ class Migration(migrations.Migration):
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
migrations.AlterModelOptions(
|
migrations.AlterModelOptions(
|
||||||
name='authenticatedsession',
|
name="authenticatedsession",
|
||||||
options={'verbose_name': 'Authenticated Session', 'verbose_name_plural': 'Authenticated Sessions'},
|
options={
|
||||||
|
"verbose_name": "Authenticated Session",
|
||||||
|
"verbose_name_plural": "Authenticated Sessions",
|
||||||
|
},
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -12,7 +12,12 @@ import PFContent from "@patternfly/patternfly/components/Content/content.css";
|
||||||
import AKGlobal from "../authentik.css";
|
import AKGlobal from "../authentik.css";
|
||||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||||
import PFButton from "@patternfly/patternfly/components/Button/button.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 { DEFAULT_CONFIG, tenant } from "../api/Config";
|
||||||
import { EventsApi } from "../../api/dist";
|
import { EventsApi } from "../../api/dist";
|
||||||
|
|
||||||
|
@ -154,7 +159,6 @@ export class PageHeader extends LitElement {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<i class="fas fa-bell"></i>
|
<i class="fas fa-bell"></i>
|
||||||
</button>
|
</button> `;
|
||||||
`;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ import { MessageLevel } from "../messages/Message";
|
||||||
|
|
||||||
@customElement("ak-action-button")
|
@customElement("ak-action-button")
|
||||||
export class ActionButton extends SpinnerButton {
|
export class ActionButton extends SpinnerButton {
|
||||||
|
|
||||||
@property({ attribute: false })
|
@property({ attribute: false })
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
apiRequest: () => Promise<any> = () => {
|
apiRequest: () => Promise<any> = () => {
|
||||||
|
|
|
@ -16,7 +16,6 @@ import { ERROR_CLASS, PRIMARY_CLASS, PROGRESS_CLASS, SUCCESS_CLASS } from "../..
|
||||||
|
|
||||||
@customElement("ak-spinner-button")
|
@customElement("ak-spinner-button")
|
||||||
export class SpinnerButton extends LitElement {
|
export class SpinnerButton extends LitElement {
|
||||||
|
|
||||||
@property({ type: Boolean })
|
@property({ type: Boolean })
|
||||||
isRunning = false;
|
isRunning = false;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
import { Middleware, ResponseContext } from "authentik-api";
|
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 PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||||
import PFNotificationDrawer from "@patternfly/patternfly/components/NotificationDrawer/notification-drawer.css";
|
import PFNotificationDrawer from "@patternfly/patternfly/components/NotificationDrawer/notification-drawer.css";
|
||||||
import PFDropdown from "@patternfly/patternfly/components/Dropdown/dropdown.css";
|
import PFDropdown from "@patternfly/patternfly/components/Dropdown/dropdown.css";
|
||||||
|
@ -16,7 +24,6 @@ export interface RequestInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class APIMiddleware implements Middleware {
|
export class APIMiddleware implements Middleware {
|
||||||
|
|
||||||
post?(context: ResponseContext): Promise<Response | void> {
|
post?(context: ResponseContext): Promise<Response | void> {
|
||||||
const request: RequestInfo = {
|
const request: RequestInfo = {
|
||||||
method: (context.init.method || "GET").toUpperCase(),
|
method: (context.init.method || "GET").toUpperCase(),
|
||||||
|
@ -32,17 +39,22 @@ export class APIMiddleware implements Middleware {
|
||||||
);
|
);
|
||||||
return Promise.resolve(context.response);
|
return Promise.resolve(context.response);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@customElement("ak-api-drawer")
|
@customElement("ak-api-drawer")
|
||||||
export class APIDrawer extends LitElement {
|
export class APIDrawer extends LitElement {
|
||||||
|
@property({ attribute: false })
|
||||||
@property({attribute: false})
|
|
||||||
requests: RequestInfo[] = [];
|
requests: RequestInfo[] = [];
|
||||||
|
|
||||||
static get styles(): CSSResult[] {
|
static get styles(): CSSResult[] {
|
||||||
return [PFBase, PFNotificationDrawer, PFButton, PFContent, PFDropdown, AKGlobal, css`
|
return [
|
||||||
|
PFBase,
|
||||||
|
PFNotificationDrawer,
|
||||||
|
PFButton,
|
||||||
|
PFContent,
|
||||||
|
PFDropdown,
|
||||||
|
AKGlobal,
|
||||||
|
css`
|
||||||
.pf-c-notification-drawer__header {
|
.pf-c-notification-drawer__header {
|
||||||
height: 114px;
|
height: 114px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -56,7 +68,8 @@ export class APIDrawer extends LitElement {
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
}
|
}
|
||||||
`];
|
`,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -73,9 +86,13 @@ export class APIDrawer extends LitElement {
|
||||||
renderItem(item: RequestInfo): TemplateResult {
|
renderItem(item: RequestInfo): TemplateResult {
|
||||||
return html`<li class="pf-c-notification-drawer__list-item pf-m-read">
|
return html`<li class="pf-c-notification-drawer__list-item pf-m-read">
|
||||||
<div class="pf-c-notification-drawer__list-item-header">
|
<div class="pf-c-notification-drawer__list-item-header">
|
||||||
<h2 class="pf-c-notification-drawer__list-item-header-title">${item.method}: ${item.status}</h2>
|
<h2 class="pf-c-notification-drawer__list-item-header-title">
|
||||||
|
${item.method}: ${item.status}
|
||||||
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<a class="pf-c-notification-drawer__list-item-description" href=${item.path}>${item.path}</a>
|
<a class="pf-c-notification-drawer__list-item-description" href=${item.path}
|
||||||
|
>${item.path}</a
|
||||||
|
>
|
||||||
</li>`;
|
</li>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,12 @@ import "../elements/messages/MessageContainer";
|
||||||
import "../elements/notifications/NotificationDrawer";
|
import "../elements/notifications/NotificationDrawer";
|
||||||
import "../elements/sidebar/Sidebar";
|
import "../elements/sidebar/Sidebar";
|
||||||
import { until } from "lit-html/directives/until";
|
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 { AdminApi } from "authentik-api";
|
||||||
import { DEFAULT_CONFIG } from "../api/Config";
|
import { DEFAULT_CONFIG } from "../api/Config";
|
||||||
import { WebsocketClient } from "../common/ws";
|
import { WebsocketClient } from "../common/ws";
|
||||||
|
@ -106,8 +111,16 @@ export class AdminInterface extends LitElement {
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
${this.notificationOpen ? html`<ak-notification-drawer class="pf-c-drawer__panel pf-m-width-33"></ak-notification-drawer>` : html``}
|
${this.notificationOpen
|
||||||
${this.apiDrawerOpen ? html`<ak-api-drawer class="pf-c-drawer__panel pf-m-width-33"></ak-api-drawer>` : html``}
|
? html`<ak-notification-drawer
|
||||||
|
class="pf-c-drawer__panel pf-m-width-33"
|
||||||
|
></ak-notification-drawer>`
|
||||||
|
: html``}
|
||||||
|
${this.apiDrawerOpen
|
||||||
|
? html`<ak-api-drawer
|
||||||
|
class="pf-c-drawer__panel pf-m-width-33"
|
||||||
|
></ak-api-drawer>`
|
||||||
|
: html``}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -39,16 +39,7 @@ export class ApplicationViewPage extends LitElement {
|
||||||
application!: Application;
|
application!: Application;
|
||||||
|
|
||||||
static get styles(): CSSResult[] {
|
static get styles(): CSSResult[] {
|
||||||
return [
|
return [PFBase, PFPage, PFContent, PFButton, PFDescriptionList, PFGrid, PFCard, AKGlobal];
|
||||||
PFBase,
|
|
||||||
PFPage,
|
|
||||||
PFContent,
|
|
||||||
PFButton,
|
|
||||||
PFDescriptionList,
|
|
||||||
PFGrid,
|
|
||||||
PFCard,
|
|
||||||
AKGlobal,
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render(): TemplateResult {
|
render(): TemplateResult {
|
||||||
|
@ -73,7 +64,9 @@ export class ApplicationViewPage extends LitElement {
|
||||||
class="pf-c-page__main-section pf-m-no-padding-mobile"
|
class="pf-c-page__main-section pf-m-no-padding-mobile"
|
||||||
>
|
>
|
||||||
<div class="pf-l-grid pf-m-gutter">
|
<div class="pf-l-grid pf-m-gutter">
|
||||||
<div class="pf-c-card pf-l-grid__item pf-m-12-col pf-m-2-col-on-xl pf-m-1-col-on-2xl">
|
<div
|
||||||
|
class="pf-c-card pf-l-grid__item pf-m-12-col pf-m-2-col-on-xl pf-m-1-col-on-2xl"
|
||||||
|
>
|
||||||
<div class="pf-c-card__title">${t`Related`}</div>
|
<div class="pf-c-card__title">${t`Related`}</div>
|
||||||
<div class="pf-c-card__body">
|
<div class="pf-c-card__body">
|
||||||
<dl class="pf-c-description-list">
|
<dl class="pf-c-description-list">
|
||||||
|
@ -198,9 +191,7 @@ export class ApplicationViewPage extends LitElement {
|
||||||
</ak-charts-application-authorize>`}
|
</ak-charts-application-authorize>`}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="pf-c-card pf-l-grid__item pf-m-12-col">
|
||||||
class="pf-c-card pf-l-grid__item pf-m-12-col"
|
|
||||||
>
|
|
||||||
<div class="pf-c-card__title">${t`Changelog`}</div>
|
<div class="pf-c-card__title">${t`Changelog`}</div>
|
||||||
<div class="pf-c-card__body">
|
<div class="pf-c-card__body">
|
||||||
<ak-object-changelog
|
<ak-object-changelog
|
||||||
|
|
|
@ -30,7 +30,6 @@ import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList
|
||||||
|
|
||||||
@customElement("ak-flow-view")
|
@customElement("ak-flow-view")
|
||||||
export class FlowViewPage extends LitElement {
|
export class FlowViewPage extends LitElement {
|
||||||
|
|
||||||
@property()
|
@property()
|
||||||
set flowSlug(value: string) {
|
set flowSlug(value: string) {
|
||||||
new FlowsApi(DEFAULT_CONFIG)
|
new FlowsApi(DEFAULT_CONFIG)
|
||||||
|
@ -46,7 +45,16 @@ export class FlowViewPage extends LitElement {
|
||||||
flow!: Flow;
|
flow!: Flow;
|
||||||
|
|
||||||
static get styles(): CSSResult[] {
|
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`
|
css`
|
||||||
img.pf-icon {
|
img.pf-icon {
|
||||||
max-height: 24px;
|
max-height: 24px;
|
||||||
|
@ -75,7 +83,9 @@ export class FlowViewPage extends LitElement {
|
||||||
class="pf-c-page__main-section pf-m-no-padding-mobile"
|
class="pf-c-page__main-section pf-m-no-padding-mobile"
|
||||||
>
|
>
|
||||||
<div class="pf-l-grid pf-m-gutter">
|
<div class="pf-l-grid pf-m-gutter">
|
||||||
<div class="pf-c-card pf-l-grid__item pf-m-12-col pf-m-2-col-on-xl pf-m-1-col-on-2xl">
|
<div
|
||||||
|
class="pf-c-card pf-l-grid__item pf-m-12-col pf-m-2-col-on-xl pf-m-1-col-on-2xl"
|
||||||
|
>
|
||||||
<div class="pf-c-card__title">${t`Related`}</div>
|
<div class="pf-c-card__title">${t`Related`}</div>
|
||||||
<div class="pf-c-card__body">
|
<div class="pf-c-card__body">
|
||||||
<dl class="pf-c-description-list">
|
<dl class="pf-c-description-list">
|
||||||
|
|
|
@ -95,7 +95,9 @@ export class UserViewPage extends LitElement {
|
||||||
class="pf-c-page__main-section pf-m-no-padding-mobile"
|
class="pf-c-page__main-section pf-m-no-padding-mobile"
|
||||||
>
|
>
|
||||||
<div class="pf-l-grid pf-m-gutter">
|
<div class="pf-l-grid pf-m-gutter">
|
||||||
<div class="pf-c-card pf-l-grid__item pf-m-12-col pf-m-2-col-on-xl pf-m-1-col-on-2xl">
|
<div
|
||||||
|
class="pf-c-card pf-l-grid__item pf-m-12-col pf-m-2-col-on-xl pf-m-1-col-on-2xl"
|
||||||
|
>
|
||||||
<div class="pf-c-card__title">${t`User Info`}</div>
|
<div class="pf-c-card__title">${t`User Info`}</div>
|
||||||
<div class="pf-c-card__body">
|
<div class="pf-c-card__body">
|
||||||
<dl class="pf-c-description-list">
|
<dl class="pf-c-description-list">
|
||||||
|
|
Reference in New Issue