web/admin: fix chart label on dashboard user page (#7434)
* web: fix chart label on dashboard user page * update translation files * fix prettier lint
This commit is contained in:
@ -54,6 +54,7 @@ export class DashboardUserPage extends AKElement {
|
||||
context__model__app: "authentik_core",
|
||||
context__model__model_name: "user",
|
||||
}}
|
||||
label=${msg("Users created")}
|
||||
>
|
||||
</ak-charts-admin-model-per-day>
|
||||
</ak-aggregate-card>
|
||||
@ -66,7 +67,10 @@ export class DashboardUserPage extends AKElement {
|
||||
class="pf-l-grid__item pf-m-12-col pf-m-6-col-on-xl pf-m-6-col-on-2xl big-graph-container"
|
||||
>
|
||||
<ak-aggregate-card header=${msg("Logins per day in the last month")}>
|
||||
<ak-charts-admin-model-per-day action=${EventActions.Login}>
|
||||
<ak-charts-admin-model-per-day
|
||||
action=${EventActions.Login}
|
||||
label=${msg("Logins")}
|
||||
>
|
||||
</ak-charts-admin-model-per-day>
|
||||
</ak-aggregate-card>
|
||||
</div>
|
||||
@ -74,7 +78,10 @@ export class DashboardUserPage extends AKElement {
|
||||
class="pf-l-grid__item pf-m-12-col pf-m-6-col-on-xl pf-m-6-col-on-2xl big-graph-container"
|
||||
>
|
||||
<ak-aggregate-card header=${msg("Failed Logins per day in the last month")}>
|
||||
<ak-charts-admin-model-per-day action=${EventActions.LoginFailed}>
|
||||
<ak-charts-admin-model-per-day
|
||||
action=${EventActions.LoginFailed}
|
||||
label=${msg("Failed logins")}
|
||||
>
|
||||
</ak-charts-admin-model-per-day>
|
||||
</ak-aggregate-card>
|
||||
</div>
|
||||
|
||||
@ -12,6 +12,9 @@ export class AdminModelPerDay extends AKChart<Coordinate[]> {
|
||||
@property()
|
||||
action: EventActions = EventActions.ModelCreated;
|
||||
|
||||
@property()
|
||||
label?: string;
|
||||
|
||||
@property({ attribute: false })
|
||||
query?: { [key: string]: unknown } | undefined;
|
||||
|
||||
@ -33,7 +36,7 @@ export class AdminModelPerDay extends AKChart<Coordinate[]> {
|
||||
return {
|
||||
datasets: [
|
||||
{
|
||||
label: msg("Objects created"),
|
||||
label: this.label || msg("Objects created"),
|
||||
backgroundColor: "rgba(189, 229, 184, .5)",
|
||||
spanGaps: true,
|
||||
data:
|
||||
|
||||
Reference in New Issue
Block a user