Can query hypervisor information
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user