import { gettext } from "django"; import { customElement, html, TemplateResult } from "lit-element"; import { Flow } from "../../../api/Flows"; import { AdminStatus, AdminStatusCard } from "./AdminStatusCard"; import "../../../elements/buttons/ModalButton"; @customElement("ak-admin-status-card-flow-cache") export class FlowCacheStatusCard extends AdminStatusCard { getPrimaryValue(): Promise { return Flow.cached(); } getStatus(value: number): Promise { if (value < 1) { return Promise.resolve({ icon: "fa fa-exclamation-triangle pf-m-warning", message: gettext("No flows cached."), }); } else { return Promise.resolve({ icon: "fa fa-check-circle pf-m-success" }); } } renderHeaderLink(): TemplateResult { return html`
`; } }