Can query hypervisor information

This commit is contained in:
2023-09-06 18:54:38 +02:00
parent fbe11af121
commit 57c023b45b
14 changed files with 253 additions and 9 deletions

View File

@ -9,6 +9,8 @@ export interface ServerConfig {
let config: ServerConfig | null = null;
export interface ServerInfo {}
export class ServerApi {
/**
* Get server configuration
@ -29,4 +31,16 @@ export class ServerApi {
if (config === null) throw new Error("Missing configuration!");
return config;
}
/**
* Get server information
*/
static async SystemInfo(): Promise<ServerInfo> {
return (
await APIClient.exec({
method: "GET",
uri: "/server/info",
})
).data;
}
}