Fix sysinfo compatibility issue
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9b14d62830
commit
5917068add
@ -73,7 +73,7 @@ interface SystemInfo {
|
|||||||
secs: number;
|
secs: number;
|
||||||
nanos: number;
|
nanos: number;
|
||||||
};
|
};
|
||||||
global_cpu_info: GlobalCPUInfo;
|
global_cpu_usage: number;
|
||||||
cpus: CpuCore[];
|
cpus: CpuCore[];
|
||||||
physical_core_count: number;
|
physical_core_count: number;
|
||||||
total_memory: number;
|
total_memory: number;
|
||||||
@ -94,14 +94,6 @@ interface SystemInfo {
|
|||||||
host_name: string;
|
host_name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface GlobalCPUInfo {
|
|
||||||
cpu_usage: number;
|
|
||||||
name: string;
|
|
||||||
vendor_id: string;
|
|
||||||
brand: string;
|
|
||||||
frequency: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CpuCore {
|
interface CpuCore {
|
||||||
cpu_usage: number;
|
cpu_usage: number;
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -134,13 +134,13 @@ export function SysInfoRouteInner(p: {
|
|||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
value: 100 - p.info.system.global_cpu_info.cpu_usage,
|
value: 100 - p.info.system.global_cpu_usage,
|
||||||
label: "Free",
|
label: "Free",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
value: p.info.system.global_cpu_info.cpu_usage,
|
value: p.info.system.global_cpu_usage,
|
||||||
label: "Used",
|
label: "Used",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -180,18 +180,18 @@ export function SysInfoRouteInner(p: {
|
|||||||
label="CPU info"
|
label="CPU info"
|
||||||
icon={<Icon size={"1rem"} path={mdiMemory} />}
|
icon={<Icon size={"1rem"} path={mdiMemory} />}
|
||||||
entries={[
|
entries={[
|
||||||
{ label: "Brand", value: p.info.system.global_cpu_info.brand },
|
{ label: "Brand", value: p.info.system.cpus[0].brand },
|
||||||
{
|
{
|
||||||
label: "Vendor ID",
|
label: "Vendor ID",
|
||||||
value: p.info.system.global_cpu_info.vendor_id,
|
value: p.info.system.cpus[0].vendor_id,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "CPU usage",
|
label: "CPU usage",
|
||||||
value: p.info.system.global_cpu_info.cpu_usage,
|
value: p.info.system.cpus[0].cpu_usage,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Name",
|
label: "Name",
|
||||||
value: p.info.system.global_cpu_info.name,
|
value: p.info.system.cpus[0].name,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "CPU model",
|
label: "CPU model",
|
||||||
|
Loading…
Reference in New Issue
Block a user