This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/web/src/pages/admin-overview/cards/LDAPSyncStatusCardContainer.ts
Jens Langhammer d48badbca3 web/admin: show ldap sync status on overview page
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
2021-04-05 20:36:31 +02:00

31 lines
1.1 KiB
TypeScript

import { SourcesApi } from "authentik-api";
import { customElement, html, LitElement, TemplateResult } from "lit-element";
import { until } from "lit-html/directives/until";
import "./LDAPSyncStatusCard";
import { t } from "@lingui/macro";
import { DEFAULT_CONFIG } from "../../../api/Config";
@customElement("ak-admin-status-card-ldap-sync-container")
export class LDAPSyncStatusCardContainer extends LitElement {
createRenderRoot(): Element | ShadowRoot {
return this;
}
render(): TemplateResult {
return html`
${until(new SourcesApi(DEFAULT_CONFIG).sourcesLdapList({}).then(sources => {
return sources.results.map(source => {
return html`<ak-admin-status-card-ldap-sync
class="pf-l-gallery__item pf-m-4-col"
icon="fa fa-sync-alt"
header=${t`LDAP Sync status ${source.name}`}
slug=${source.slug}>
</ak-admin-status-card-ldap-sync>`;
});
}))}
`;
}
}