build(deps): bump chart.js from 2.9.4 to 3.0.2 in /web (#696)

* build(deps): bump chart.js from 2.9.4 to 3.0.2 in /web

Bumps [chart.js](https://github.com/chartjs/Chart.js) from 2.9.4 to 3.0.2.
- [Release notes](https://github.com/chartjs/Chart.js/releases)
- [Commits](https://github.com/chartjs/Chart.js/compare/v2.9.4...v3.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

* web/elements/chart: upgrade to chart.js 3

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
dependabot[bot]
2021-04-05 11:28:22 +02:00
committed by GitHub
parent 3da23829d3
commit a6608c140e
9 changed files with 71 additions and 85 deletions

View File

@ -1,8 +1,8 @@
import { customElement, property } from "lit-element";
import Chart from "chart.js";
import { CoreApi, UserMetrics } from "authentik-api";
import { AKChart } from "./Chart";
import { DEFAULT_CONFIG } from "../../api/Config";
import { ChartDataset } from "chart.js";
@customElement("ak-charts-user")
export class UserChart extends AKChart<UserMetrics> {
@ -16,7 +16,7 @@ export class UserChart extends AKChart<UserMetrics> {
});
}
getDatasets(data: UserMetrics): Chart.ChartDataSets[] {
getDatasets(data: UserMetrics): ChartDataset[] {
return [
{
label: "Failed Logins",
@ -24,10 +24,10 @@ export class UserChart extends AKChart<UserMetrics> {
spanGaps: true,
data: data.loginsFailedPer1h?.map((cord) => {
return {
x: cord.xCord,
y: cord.yCord,
x: cord.xCord || 0,
y: cord.yCord || 0,
};
}),
}) || [],
},
{
label: "Successful Logins",
@ -35,10 +35,10 @@ export class UserChart extends AKChart<UserMetrics> {
spanGaps: true,
data: data.loginsPer1h?.map((cord) => {
return {
x: cord.xCord,
y: cord.yCord,
x: cord.xCord || 0,
y: cord.yCord || 0,
};
}),
}) || [],
},
{
label: "Application authorizations",
@ -46,10 +46,10 @@ export class UserChart extends AKChart<UserMetrics> {
spanGaps: true,
data: data.authorizationsPer1h?.map((cord) => {
return {
x: cord.xCord,
y: cord.yCord,
x: cord.xCord || 0,
y: cord.yCord || 0,
};
}),
}) || [],
},
];
}