import { gettext } from "django"; import { customElement } from "lit-element"; import { Application } from "../../api/application"; import { PBResponse } from "../../api/client"; import { TablePage } from "../../elements/table/TablePage"; @customElement("pb-application-list") export class ApplicationList extends TablePage { pageTitle(): string { return gettext("Applications"); } pageDescription(): string { return gettext("External Applications which use passbook as Identity-Provider, utilizing protocols like OAuth2 and SAML."); } pageIcon(): string { return gettext("pf-icon pf-icon-applications"); } apiEndpoint(page: number): Promise> { return Application.list({ ordering: "order", page: page, }); } columns(): string[] { return ["Name", "Slug", "Provider", "Provider Type", ""]; } row(item: Application): string[] { return [ item.name!, item.slug!, item.provider!.toString(), item.provider!.toString(), ` Edit
Delete
`, ]; } }