mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-17 19:09:11 +03:00
41af486006
* initial Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add user type Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add external users Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add ui, add more logic, add public JWT validation key Signed-off-by: Jens Langhammer <jens@goauthentik.io> * revert to not use install_id as session jwt signing key Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix more Signed-off-by: Jens Langhammer <jens@goauthentik.io> * switch to PKI Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add more licensing stuff Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add install ID to form Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix bugs Signed-off-by: Jens Langhammer <jens@goauthentik.io> * start adding tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fixes Signed-off-by: Jens Langhammer <jens@goauthentik.io> * use x5c correctly Signed-off-by: Jens Langhammer <jens@goauthentik.io> * license checks Signed-off-by: Jens Langhammer <jens@goauthentik.io> * use production CA Signed-off-by: Jens Langhammer <jens@goauthentik.io> * more Signed-off-by: Jens Langhammer <jens@goauthentik.io> * more UI stuff Signed-off-by: Jens Langhammer <jens@goauthentik.io> * rename to summary Signed-off-by: Jens Langhammer <jens@goauthentik.io> * update locale, improve ui Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add direct button Signed-off-by: Jens Langhammer <jens@goauthentik.io> * update link Signed-off-by: Jens Langhammer <jens@goauthentik.io> * format and such Signed-off-by: Jens Langhammer <jens@goauthentik.io> * remove old attributes from ldap Signed-off-by: Jens Langhammer <jens@goauthentik.io> * remove is_enterprise_licensed Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix admin interface styling issue Signed-off-by: Jens Langhammer <jens@goauthentik.io> * Update authentik/core/models.py Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com> Signed-off-by: Jens L. <jens@beryju.org> * fix default case Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io> Signed-off-by: Jens L. <jens@beryju.org> Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>
103 lines
3.3 KiB
TypeScript
103 lines
3.3 KiB
TypeScript
import "@goauthentik/elements/PageHeader";
|
|
import { updateURLParams } from "@goauthentik/elements/router/RouteMatch";
|
|
import { Table } from "@goauthentik/elements/table/Table";
|
|
|
|
import { msg } from "@lit/localize";
|
|
import { CSSResult } from "lit";
|
|
import { TemplateResult, html } from "lit";
|
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
|
|
import PFContent from "@patternfly/patternfly/components/Content/content.css";
|
|
import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
|
import PFSidebar from "@patternfly/patternfly/components/Sidebar/sidebar.css";
|
|
|
|
export abstract class TablePage<T> extends Table<T> {
|
|
abstract pageTitle(): string;
|
|
abstract pageDescription(): string | undefined;
|
|
abstract pageIcon(): string;
|
|
|
|
static get styles(): CSSResult[] {
|
|
return super.styles.concat(PFPage, PFContent, PFSidebar);
|
|
}
|
|
|
|
renderSidebarBefore(): TemplateResult {
|
|
return html``;
|
|
}
|
|
|
|
renderSidebarAfter(): TemplateResult {
|
|
return html``;
|
|
}
|
|
|
|
// Optionally render section above the table
|
|
renderSectionBefore(): TemplateResult {
|
|
return html``;
|
|
}
|
|
|
|
// Optionally render section below the table
|
|
renderSectionAfter(): TemplateResult {
|
|
return html``;
|
|
}
|
|
|
|
renderEmpty(inner?: TemplateResult): TemplateResult {
|
|
return super.renderEmpty(html`
|
|
${inner
|
|
? inner
|
|
: html`<ak-empty-state icon=${this.pageIcon()} header="${msg("No objects found.")}">
|
|
<div slot="body">
|
|
${this.searchEnabled() ? this.renderEmptyClearSearch() : html``}
|
|
</div>
|
|
<div slot="primary">${this.renderObjectCreate()}</div>
|
|
</ak-empty-state>`}
|
|
`);
|
|
}
|
|
|
|
renderEmptyClearSearch(): TemplateResult {
|
|
if (this.search === "") {
|
|
return html``;
|
|
}
|
|
return html`<button
|
|
@click=${() => {
|
|
this.search = "";
|
|
this.requestUpdate();
|
|
this.fetch();
|
|
updateURLParams({
|
|
search: "",
|
|
});
|
|
}}
|
|
class="pf-c-button pf-m-link"
|
|
>
|
|
${msg("Clear search")}
|
|
</button>`;
|
|
}
|
|
|
|
renderObjectCreate(): TemplateResult {
|
|
return html``;
|
|
}
|
|
|
|
renderToolbar(): TemplateResult {
|
|
return html`${this.renderObjectCreate()}${super.renderToolbar()}`;
|
|
}
|
|
|
|
render(): TemplateResult {
|
|
return html`<ak-page-header
|
|
icon=${this.pageIcon()}
|
|
header=${this.pageTitle()}
|
|
description=${ifDefined(this.pageDescription())}
|
|
>
|
|
</ak-page-header>
|
|
${this.renderSectionBefore()}
|
|
<section class="pf-c-page__main-section pf-m-no-padding-mobile">
|
|
<div class="pf-c-sidebar pf-m-gutter">
|
|
<div class="pf-c-sidebar__main">
|
|
${this.renderSidebarBefore()}
|
|
<div class="pf-c-sidebar__content">
|
|
<div class="pf-c-card">${this.renderTable()}</div>
|
|
</div>
|
|
${this.renderSidebarAfter()}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
${this.renderSectionAfter()}`;
|
|
}
|
|
}
|