From 1f05484e3c51e533a66380b451c7860127146f62 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 16 May 2021 17:51:58 +0200 Subject: [PATCH] web/admin: migrate more components Signed-off-by: Jens Langhammer --- web/src/elements/charts/ApplicationAuthorizeChart.ts | 2 +- web/src/elements/charts/UserChart.ts | 2 +- web/src/elements/forms/Form.ts | 2 +- web/src/elements/notifications/NotificationDrawer.ts | 4 ++-- .../pages/admin-overview/charts/GroupCountStatusChart.ts | 2 +- web/src/pages/admin-overview/charts/PolicyStatusChart.ts | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/web/src/elements/charts/ApplicationAuthorizeChart.ts b/web/src/elements/charts/ApplicationAuthorizeChart.ts index 4484de7f4..861f51da7 100644 --- a/web/src/elements/charts/ApplicationAuthorizeChart.ts +++ b/web/src/elements/charts/ApplicationAuthorizeChart.ts @@ -11,7 +11,7 @@ export class ApplicationAuthorizeChart extends AKChart { applicationSlug!: string; apiRequest(): Promise { - return new CoreApi(DEFAULT_CONFIG).coreApplicationsMetrics({ slug: this.applicationSlug }); + return new CoreApi(DEFAULT_CONFIG).coreApplicationsMetricsList({ slug: this.applicationSlug }); } getChartData(data: Coordinate[]): ChartData { diff --git a/web/src/elements/charts/UserChart.ts b/web/src/elements/charts/UserChart.ts index e68e0780d..29dc8ef49 100644 --- a/web/src/elements/charts/UserChart.ts +++ b/web/src/elements/charts/UserChart.ts @@ -11,7 +11,7 @@ export class UserChart extends AKChart { userId?: number; apiRequest(): Promise { - return new CoreApi(DEFAULT_CONFIG).coreUsersMetrics({ + return new CoreApi(DEFAULT_CONFIG).coreUsersMetricsRetrieve({ id: this.userId || 0, }); } diff --git a/web/src/elements/forms/Form.ts b/web/src/elements/forms/Form.ts index 786c4cf03..4eaade5a0 100644 --- a/web/src/elements/forms/Form.ts +++ b/web/src/elements/forms/Form.ts @@ -14,7 +14,7 @@ import PFInputGroup from "@patternfly/patternfly/components/InputGroup/input-gro import { MessageLevel } from "../messages/Message"; import { IronFormElement } from "@polymer/iron-form/iron-form"; import { camelToSnake, convertToSlug } from "../../utils"; -import { ValidationError } from "authentik-api/src"; +import { ValidationError } from "authentik-api"; import { EVENT_REFRESH } from "../../constants"; export class APIError extends Error { diff --git a/web/src/elements/notifications/NotificationDrawer.ts b/web/src/elements/notifications/NotificationDrawer.ts index b97dd2b9f..0185aa111 100644 --- a/web/src/elements/notifications/NotificationDrawer.ts +++ b/web/src/elements/notifications/NotificationDrawer.ts @@ -32,7 +32,7 @@ export class NotificationDrawer extends LitElement { firstUpdated(): void { new EventsApi(DEFAULT_CONFIG).eventsNotificationsList({ - seen: "false", + seen: false, ordering: "-created", }).then(r => { this.notifications = r; @@ -73,7 +73,7 @@ export class NotificationDrawer extends LitElement {