import * as plugins from '../plugins.js'; import { DeesElement, customElement, html, state, css, cssManager, } from '@design.estate/dees-element'; import * as appstate from '../appstate.js'; @customElement('cloudly-view-overview') export class CloudlyViewOverview extends DeesElement { @state() private data: appstate.IDataState = { secretGroups: [], secretBundles: [], }; constructor() { super(); const subecription = appstate.dataState .select((stateArg) => stateArg) .subscribe((dataArg) => { this.data = dataArg; }); this.rxSubscriptions.push(subecription); } public static styles = [ cssManager.defaultStyles, css` :host { display: block; margin: auto; max-width: 1280px; padding: 8px 16px; } .clusterGrid { display: grid; grid-template-columns: ${cssManager.cssGridColumns(3, 8)}; grid-gap: 16px; margin-bottom: 40px; } `, ]; public render() { return html` Overview ${this.data.clusters.length === 0 ? html` You need to create at least one cluster to see an overview. `: html``} ${this.data.clusters.map( (clusterArg) => html`
` )} `; } }