outposts: fix schema for outposts health
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
		| @ -8,7 +8,7 @@ import { AdminStatusCard, AdminStatus } from "./AdminStatusCard"; | ||||
| export class VersionStatusCard extends AdminStatusCard<Version> { | ||||
|  | ||||
|     getPrimaryValue(): Promise<Version> { | ||||
|         return new AdminApi(DEFAULT_CONFIG).adminVersionList(); | ||||
|         return new AdminApi(DEFAULT_CONFIG).adminVersionRetrieve(); | ||||
|     } | ||||
|  | ||||
|     getStatus(value: Version): Promise<AdminStatus> { | ||||
|  | ||||
| @ -8,8 +8,8 @@ import { AdminStatus, AdminStatusCard } from "./AdminStatusCard"; | ||||
| export class WorkersStatusCard extends AdminStatusCard<number> { | ||||
|  | ||||
|     getPrimaryValue(): Promise<number> { | ||||
|         return new AdminApi(DEFAULT_CONFIG).adminWorkersList({}).then((workers) => { | ||||
|             return workers.pagination.count; | ||||
|         return new AdminApi(DEFAULT_CONFIG).adminWorkersRetrieve().then((workers) => { | ||||
|             return workers.count; | ||||
|         }); | ||||
|     } | ||||
|  | ||||
|  | ||||
| @ -31,7 +31,7 @@ export class PolicyStatusChart extends AKChart<FlowMetrics> { | ||||
|  | ||||
|     async apiRequest(): Promise<FlowMetrics> { | ||||
|         const api = new FlowsApi(DEFAULT_CONFIG); | ||||
|         const cached = (await api.flowsInstancesCacheInfo()).count || 0; | ||||
|         const cached = (await api.flowsInstancesCacheInfoRetrieve()).count || 0; | ||||
|         const count = (await api.flowsInstancesList({ | ||||
|             pageSize: 1 | ||||
|         })).pagination.count; | ||||
|  | ||||
| @ -37,7 +37,7 @@ export class OutpostStatusChart extends AKChart<OutpostStats> { | ||||
|         let outdated = 0; | ||||
|         let unhealthy = 0; | ||||
|         await Promise.all(outposts.results.map(async (element) => { | ||||
|             const health = await api.outpostsOutpostsHealth({ | ||||
|             const health = await api.outpostsOutpostsHealthList({ | ||||
|                 uuid: element.pk || "", | ||||
|             }); | ||||
|             if (health.length === 0) { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer