import * as appstate from '../../appstate.js'; import { viewHostCss } from '../shared/css.js'; import { DeesElement, customElement, html, state, css, cssManager, type TemplateResult, } from '@design.estate/dees-element'; import { type IStatsTile } from '@design.estate/dees-catalog'; declare global { interface HTMLElementTagNameMap { 'ops-view-email-security': OpsViewEmailSecurity; } } @customElement('ops-view-email-security') export class OpsViewEmailSecurity extends DeesElement { @state() accessor statsState: appstate.IStatsState = appstate.statsStatePart.getState()!; constructor() { super(); const sub = appstate.statsStatePart .select((s) => s) .subscribe((s) => { this.statsState = s; }); this.rxSubscriptions.push(sub); } public static styles = [ cssManager.defaultStyles, viewHostCss, css` .securityContainer { display: flex; flex-direction: column; gap: 24px; } `, ]; public render(): TemplateResult { const metrics = this.statsState.securityMetrics; if (!metrics) { return html`
Loading security metrics...
These settings are read-only for now. Update the dcrouter configuration to change them.
`, menuOptions: [ { name: 'Close', action: async (modalArg: any) => modalArg.destroy() }, ], }); } }