web/admin: migrate more components
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
		| @ -11,7 +11,7 @@ export class ApplicationAuthorizeChart extends AKChart<Coordinate[]> { | ||||
|     applicationSlug!: string; | ||||
|  | ||||
|     apiRequest(): Promise<Coordinate[]> { | ||||
|         return new CoreApi(DEFAULT_CONFIG).coreApplicationsMetrics({ slug: this.applicationSlug }); | ||||
|         return new CoreApi(DEFAULT_CONFIG).coreApplicationsMetricsList({ slug: this.applicationSlug }); | ||||
|     } | ||||
|  | ||||
|     getChartData(data: Coordinate[]): ChartData { | ||||
|  | ||||
| @ -11,7 +11,7 @@ export class UserChart extends AKChart<UserMetrics> { | ||||
|     userId?: number; | ||||
|  | ||||
|     apiRequest(): Promise<UserMetrics> { | ||||
|         return new CoreApi(DEFAULT_CONFIG).coreUsersMetrics({ | ||||
|         return new CoreApi(DEFAULT_CONFIG).coreUsersMetricsRetrieve({ | ||||
|             id: this.userId || 0, | ||||
|         }); | ||||
|     } | ||||
|  | ||||
| @ -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 { | ||||
|  | ||||
| @ -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 { | ||||
|                 <button class="pf-c-dropdown__toggle pf-m-plain" type="button" @click=${() => { | ||||
|                     new EventsApi(DEFAULT_CONFIG).eventsNotificationsPartialUpdate({ | ||||
|                         uuid: item.pk || "", | ||||
|                         data: { | ||||
|                         patchedNotificationRequest: { | ||||
|                             seen: true, | ||||
|                         } | ||||
|                     }).then(() => { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer