web: migrate admin overview cards to separate files
This commit is contained in:
		| @ -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
									
								
							
							
						
						
									
										21
									
								
								web/src/api/version.ts
									
									
									
									
									
										Normal 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; | ||||
|     } | ||||
|  | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer