web: migrate admin overview cards to separate files

This commit is contained in:
Jens Langhammer
2020-12-16 22:57:43 +01:00
parent 48438e28fd
commit 2d9efe035e
12 changed files with 257 additions and 195 deletions

View File

@ -1,20 +0,0 @@
import { DefaultClient } from "./client";
export class AdminOverview {
version: string;
version_latest: string;
worker_count: number;
providers_without_application: number;
policies_without_binding: number;
cached_policies: number;
cached_flows: number;
constructor() {
throw Error();
}
static get(): Promise<AdminOverview> {
return DefaultClient.fetch<AdminOverview>(["admin", "overview"]);
}
}

21
web/src/api/version.ts Normal file
View File

@ -0,0 +1,21 @@
import { DefaultClient } from "./client";
export class Version {
version_current: string;
version_latest: string;
outdated: boolean;
constructor() {
throw Error();
}
static get(): Promise<Version> {
return DefaultClient.fetch<Version>(["admin", "version"]);
}
toString(): string {
return this.version_current;
}
}