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;
|
||||
}
|
||||
}
|
||||
|
@ -11,11 +11,10 @@ import {
|
||||
} from "@mui/material";
|
||||
import Box from "@mui/material/Box";
|
||||
import Button from "@mui/material/Button";
|
||||
import Grid from "@mui/material/Grid";
|
||||
import TextField from "@mui/material/TextField";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import * as React from "react";
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { useAuth } from "../../App";
|
||||
import { AuthApi } from "../../api/AuthApi";
|
||||
import { ServerApi } from "../../api/ServerApi";
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { mdiDisc, mdiHome, mdiLanPending } from "@mdi/js";
|
||||
import Icon from "@mdi/react";
|
||||
import {
|
||||
Box,
|
||||
List,
|
||||
@ -5,13 +7,10 @@ import {
|
||||
ListItemIcon,
|
||||
ListItemSecondaryAction,
|
||||
ListItemText,
|
||||
ListSubheader,
|
||||
} from "@mui/material";
|
||||
import { VirtWebAppBar } from "./VirtWebAppBar";
|
||||
import { RouterLink } from "./RouterLink";
|
||||
import { Outlet, useLocation } from "react-router-dom";
|
||||
import Icon from "@mdi/react";
|
||||
import { mdiDisc, mdiHome, mdiLanPending } from "@mdi/js";
|
||||
import { RouterLink } from "./RouterLink";
|
||||
import { VirtWebAppBar } from "./VirtWebAppBar";
|
||||
|
||||
export function BaseAuthenticatedPage(): React.ReactElement {
|
||||
return (
|
||||
|
Reference in New Issue
Block a user