From 0ce9fd9b2e54a237dfcc56c51f6688c12e90bd33 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 1 Aug 2022 09:59:57 +0200 Subject: [PATCH] web: fix updates Signed-off-by: Jens Langhammer --- .../pages/admin-overview/charts/LDAPSyncStatusChart.ts | 4 ++-- web/src/pages/sources/ldap/LDAPSourceViewPage.ts | 6 +++--- web/src/pages/system-tasks/SystemTaskListPage.ts | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/web/src/pages/admin-overview/charts/LDAPSyncStatusChart.ts b/web/src/pages/admin-overview/charts/LDAPSyncStatusChart.ts index 5749d5b9d..c9149ce26 100644 --- a/web/src/pages/admin-overview/charts/LDAPSyncStatusChart.ts +++ b/web/src/pages/admin-overview/charts/LDAPSyncStatusChart.ts @@ -7,7 +7,7 @@ import { t } from "@lingui/macro"; import { customElement } from "lit/decorators.js"; -import { SourcesApi, StatusEnum } from "@goauthentik/api"; +import { SourcesApi, TaskStatusEnum } from "@goauthentik/api"; interface LDAPSyncStats { healthy: number; @@ -50,7 +50,7 @@ export class LDAPSyncStatusChart extends AKChart { }); health.forEach((task) => { - if (task.status !== StatusEnum.Successful) { + if (task.status !== TaskStatusEnum.Successful) { sourceKey = "failed"; } const now = new Date().getTime(); diff --git a/web/src/pages/sources/ldap/LDAPSourceViewPage.ts b/web/src/pages/sources/ldap/LDAPSourceViewPage.ts index 83a7acfd1..a4dfe3e3a 100644 --- a/web/src/pages/sources/ldap/LDAPSourceViewPage.ts +++ b/web/src/pages/sources/ldap/LDAPSourceViewPage.ts @@ -24,7 +24,7 @@ import PFPage from "@patternfly/patternfly/components/Page/page.css"; import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; -import { LDAPSource, SourcesApi, StatusEnum } from "@goauthentik/api"; +import { LDAPSource, SourcesApi, TaskStatusEnum } from "@goauthentik/api"; @customElement("ak-source-ldap-view") export class LDAPSourceViewPage extends LitElement { @@ -145,9 +145,9 @@ export class LDAPSourceViewPage extends LitElement { return html`
    ${tasks.map((task) => { let header = ""; - if (task.status === StatusEnum.Warning) { + if (task.status === TaskStatusEnum.Warning) { header = t`Task finished with warnings`; - } else if (task.status === StatusEnum.Error) { + } else if (task.status === TaskStatusEnum.Error) { header = t`Task finished with errors`; } else { header = t`Last sync: ${task.taskFinishTimestamp.toLocaleString()}`; diff --git a/web/src/pages/system-tasks/SystemTaskListPage.ts b/web/src/pages/system-tasks/SystemTaskListPage.ts index f074feb4a..1a3dae35c 100644 --- a/web/src/pages/system-tasks/SystemTaskListPage.ts +++ b/web/src/pages/system-tasks/SystemTaskListPage.ts @@ -14,7 +14,7 @@ import { customElement, property } from "lit/decorators.js"; import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList/description-list.css"; -import { AdminApi, StatusEnum, Task } from "@goauthentik/api"; +import { AdminApi, Task, TaskStatusEnum } from "@goauthentik/api"; @customElement("ak-system-task-list") export class SystemTaskListPage extends TablePage { @@ -67,11 +67,11 @@ export class SystemTaskListPage extends TablePage { taskStatus(task: Task): TemplateResult { switch (task.status) { - case StatusEnum.Successful: + case TaskStatusEnum.Successful: return html`${t`Successful`}`; - case StatusEnum.Warning: + case TaskStatusEnum.Warning: return html`${t`Warning`}`; - case StatusEnum.Error: + case TaskStatusEnum.Error: return html`${t`Error`}`; default: return html`${t`Unknown`}`;