enterprise: add more info to enterprise forecast (#6292)

* add more info to enterprise forecast

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix banner colour

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix some layout

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix layout for warning banner

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L
2023-07-18 23:24:44 +02:00
committed by GitHub
parent c1eef9278d
commit b6e8342466
7 changed files with 85 additions and 71 deletions

View File

@ -75,17 +75,7 @@ export class AdminInterface extends Interface {
.display-none {
display: none;
}
:host {
display: flex;
flex-direction: column;
height: 100%;
}
ak-locale-context {
display: flex;
flex-grow: 1;
}
.pf-c-page {
flex-grow: 1;
background-color: var(--pf-c-page--BackgroundColor) !important;
}
/* Global page background colour */
@ -130,8 +120,7 @@ export class AdminInterface extends Interface {
}
render(): TemplateResult {
return html` <ak-locale-context
><ak-enterprise-status interface="admin"></ak-enterprise-status>
return html` <ak-locale-context>
<div class="pf-c-page">
<ak-sidebar
class="pf-c-page__sidebar ${this.sidebarOpen

View File

@ -11,7 +11,7 @@ import { PaginatedResponse } from "@goauthentik/elements/table/Table";
import { TableColumn } from "@goauthentik/elements/table/Table";
import { TablePage } from "@goauthentik/elements/table/TablePage";
import { msg } from "@lit/localize";
import { msg, str } from "@lit/localize";
import { CSSResult, TemplateResult, css, html } from "lit";
import { customElement, property, state } from "lit/decorators.js";
@ -148,17 +148,23 @@ export class EnterpriseLicenseListPage extends TablePage<License> {
class="pf-l-grid__item"
icon="pf-icon pf-icon-user"
header=${msg("Forecast default users")}
subtext=${msg("Estimated user count one year from now")}
subtext=${msg(
str`Estimated user count one year from now based on ${this.forecast?.users} current users and ${this.forecast?.forecastedUsers} forecasted users.`,
)}
>
~&nbsp;${this.forecast?.users}
~&nbsp;${(this.forecast?.users || 0) +
(this.forecast?.forecastedUsers || 0)}
</ak-aggregate-card>
<ak-aggregate-card
class="pf-l-grid__item"
icon="pf-icon pf-icon-user"
header=${msg("Forecast external users")}
subtext=${msg("Estimated external user count one year from now")}
subtext=${msg(
str`Estimated user count one year from now based on ${this.forecast?.externalUsers} current external users and ${this.forecast?.forecastedExternalUsers} forecasted external users.`,
)}
>
~&nbsp;${this.forecast?.externalUsers}
~&nbsp;${(this.forecast?.externalUsers || 0) +
(this.forecast?.forecastedExternalUsers || 0)}
</ak-aggregate-card>
<ak-aggregate-card
class="pf-l-grid__item"