2020-12-01 21:17:07 +00:00
import { gettext } from "django" ;
import { CSSResult , customElement , html , LitElement , property , TemplateResult } from "lit-element" ;
2020-12-16 22:02:43 +00:00
import { DefaultClient } from "../../api/Client" ;
2020-12-01 21:17:07 +00:00
import { COMMON_STYLES } from "../../common/styles" ;
2020-12-02 14:44:40 +00:00
import "../../elements/AdminLoginsChart" ;
2020-12-16 21:57:43 +00:00
import "../../elements/cards/AggregatePromiseCard" ;
2020-12-02 14:44:40 +00:00
import "./TopApplicationsTable" ;
2020-12-16 21:57:43 +00:00
import "./cards/AdminStatusCard" ;
import "./cards/FlowCacheStatusCard" ;
import "./cards/PolicyCacheStatusCard" ;
import "./cards/PolicyUnboundStatusCard" ;
import "./cards/ProviderStatusCard" ;
2020-12-16 22:28:04 +00:00
import "./cards/UserCountStatusCard" ;
2020-12-16 21:57:43 +00:00
import "./cards/VersionStatusCard" ;
import "./cards/WorkerStatusCard" ;
2020-12-01 21:17:07 +00:00
2020-12-05 21:08:42 +00:00
@customElement ( "ak-admin-overview" )
2020-12-01 21:17:07 +00:00
export class AdminOverviewPage extends LitElement {
static get styles ( ) : CSSResult [ ] {
return COMMON_STYLES ;
}
render ( ) : TemplateResult {
return html ` <section class="pf-c-page__main-section pf-m-light">
< div class = "pf-c-content" >
< h1 > $ { gettext ( "System Overview" ) } < / h1 >
< / div >
< / section >
< section class = "pf-c-page__main-section" >
< div class = "pf-l-gallery pf-m-gutter" >
2020-12-05 21:08:42 +00:00
< ak - aggregate - card class = "pf-l-gallery__item pf-m-4-col" icon = "pf-icon pf-icon-server" header = "Logins over the last 24 hours" style = "grid-column-end: span 3;grid-row-end: span 2;" >
< ak - admin - logins - chart url = "${DefaultClient.makeUrl([" admin " , " metrics " ] ) } " > < / a k - a d m i n - l o g i n s - c h a r t >
< / a k - a g g r e g a t e - c a r d >
< ak - aggregate - card class = "pf-l-gallery__item pf-m-4-col" icon = "pf-icon pf-icon-server" header = "Apps with most usage" style = "grid-column-end: span 2;grid-row-end: span 3;" >
< ak - top - applications - table > < / a k - t o p - a p p l i c a t i o n s - t a b l e >
< / a k - a g g r e g a t e - c a r d >
2020-12-16 21:25:44 +00:00
< ak - admin - status - card - provider class = "pf-l-gallery__item pf-m-4-col" icon = "pf-icon pf-icon-plugged" header = "Providers" headerLink = "#/administration/providers/" >
< / a k - a d m i n - s t a t u s - c a r d - p r o v i d e r >
< ak - admin - status - card - policy - unbound class = "pf-l-gallery__item pf-m-4-col" icon = "pf-icon pf-icon-infrastructure" header = "Policies" headerLink = "#/administration/policies/" >
< / a k - a d m i n - s t a t u s - c a r d - p o l i c y - u n b o u n d >
2020-12-16 22:28:04 +00:00
< ak - admin - status - card - user - count class = "pf-l-gallery__item pf-m-4-col" icon = "pf-icon pf-icon-user" header = "Users" headerLink = "#/administration/users/" >
< / a k - a d m i n - s t a t u s - c a r d - u s e r - c o u n t >
2020-12-16 22:32:14 +00:00
< ak - admin - status - version class = "pf-l-gallery__item pf-m-4-col" icon = "pf-icon pf-icon-bundle" header = "Version" headerLink = "https://github.com/BeryJu/authentik/releases" >
2020-12-16 21:57:43 +00:00
< / a k - a d m i n - s t a t u s - v e r s i o n >
< ak - admin - status - card - workers class = "pf-l-gallery__item pf-m-4-col" icon = "pf-icon pf-icon-server" header = "Workers" >
< / a k - a d m i n - s t a t u s - c a r d - w o r k e r s >
2020-12-16 21:25:44 +00:00
< ak - admin - status - card - policy - cache class = "pf-l-gallery__item pf-m-4-col" icon = "pf-icon pf-icon-server" header = "Cached Policies" >
< / a k - a d m i n - s t a t u s - c a r d - p o l i c y - c a c h e >
< ak - admin - status - card - flow - cache class = "pf-l-gallery__item pf-m-4-col" icon = "pf-icon pf-icon-server" header = "Cached Flows" >
< / a k - a d m i n - s t a t u s - c a r d - f l o w - c a c h e >
2020-12-01 21:17:07 +00:00
< / div >
< / section > ` ;
}
}