From de11181890f3ae811f81142db34d07a72a306538 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 9 Jun 2021 09:31:30 +0200 Subject: [PATCH] web/admin: fix outpost/ldap charts when no healthy objects exist Signed-off-by: Jens Langhammer --- web/package-lock.json | 11 +++++++---- .../admin-overview/charts/LDAPSyncStatusChart.ts | 2 +- .../pages/admin-overview/charts/OutpostStatusChart.ts | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index c7a93aae4..f52dc0a01 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -61,12 +61,13 @@ "typescript": "^4.3.2", "webcomponent-qr-code": "^1.0.5", "yaml": "^1.10.2" - } + }, + "devDependencies": {} }, "api": { "name": "authentik-api", - "version": "0.0.1", - "dependencies": { + "version": "1.0.0", + "devDependencies": { "typescript": "^3.6" } }, @@ -74,6 +75,7 @@ "version": "3.9.9", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", + "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -9963,7 +9965,8 @@ "typescript": { "version": "3.9.9", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", - "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==" + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", + "dev": true } } }, diff --git a/web/src/pages/admin-overview/charts/LDAPSyncStatusChart.ts b/web/src/pages/admin-overview/charts/LDAPSyncStatusChart.ts index 73b2c83f4..2df1a7de3 100644 --- a/web/src/pages/admin-overview/charts/LDAPSyncStatusChart.ts +++ b/web/src/pages/admin-overview/charts/LDAPSyncStatusChart.ts @@ -57,7 +57,7 @@ export class LDAPSyncStatusChart extends AKChart { })); this.centerText = sources.pagination.count.toString(); return { - healthy: healthy === 0 ? -1 : healthy, + healthy: sources.pagination.count === 0 ? -1 : healthy, failed, unsynced }; diff --git a/web/src/pages/admin-overview/charts/OutpostStatusChart.ts b/web/src/pages/admin-overview/charts/OutpostStatusChart.ts index 89f14a828..2e923d889 100644 --- a/web/src/pages/admin-overview/charts/OutpostStatusChart.ts +++ b/web/src/pages/admin-overview/charts/OutpostStatusChart.ts @@ -53,7 +53,7 @@ export class OutpostStatusChart extends AKChart { })); this.centerText = outposts.pagination.count.toString(); return { - healthy: healthy === 0 ? -1 : healthy, + healthy: outposts.pagination.count === 0 ? -1 : healthy, outdated, unhealthy };