web: fix updates
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
d17ad65435
commit
0ce9fd9b2e
|
@ -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<LDAPSyncStats> {
|
|||
});
|
||||
|
||||
health.forEach((task) => {
|
||||
if (task.status !== StatusEnum.Successful) {
|
||||
if (task.status !== TaskStatusEnum.Successful) {
|
||||
sourceKey = "failed";
|
||||
}
|
||||
const now = new Date().getTime();
|
||||
|
|
|
@ -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`<ul class="pf-c-list">
|
||||
${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()}`;
|
||||
|
|
|
@ -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<Task> {
|
||||
|
@ -67,11 +67,11 @@ export class SystemTaskListPage extends TablePage<Task> {
|
|||
|
||||
taskStatus(task: Task): TemplateResult {
|
||||
switch (task.status) {
|
||||
case StatusEnum.Successful:
|
||||
case TaskStatusEnum.Successful:
|
||||
return html`<ak-label color=${PFColor.Green}>${t`Successful`}</ak-label>`;
|
||||
case StatusEnum.Warning:
|
||||
case TaskStatusEnum.Warning:
|
||||
return html`<ak-label color=${PFColor.Orange}>${t`Warning`}</ak-label>`;
|
||||
case StatusEnum.Error:
|
||||
case TaskStatusEnum.Error:
|
||||
return html`<ak-label color=${PFColor.Red}>${t`Error`}</ak-label>`;
|
||||
default:
|
||||
return html`<ak-label color=${PFColor.Grey}>${t`Unknown`}</ak-label>`;
|
||||
|
|
Reference in a new issue