mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-07 22:15:49 +01:00
🐛 Fixing bugs in system info
This commit is contained in:
@@ -40,23 +40,22 @@ export default function SystemInfo(args: any) {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
}, [args]);
|
}, [args]);
|
||||||
|
|
||||||
// Update data every time data changes
|
// Update data every time data changes
|
||||||
const [cpuLoadHistory, cpuLoadHistoryHandlers] =
|
const [cpuLoadHistory, cpuLoadHistoryHandlers] =
|
||||||
useListState<si.Systeminformation.CurrentLoadData>([]);
|
useListState<si.Systeminformation.CurrentLoadData>([]);
|
||||||
|
|
||||||
// useEffect(() => {
|
// useEffect(() => {
|
||||||
|
|
||||||
// }, [data]);
|
// }, [data]);
|
||||||
|
|
||||||
const theme = useMantineTheme();
|
const theme = useMantineTheme();
|
||||||
const currentLoad = data?.load?.currentLoad ?? 0;
|
const currentLoad = data?.load?.currentLoad ?? 0;
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Center>
|
<Center>
|
||||||
<Group p="sm" direction="column" align="center">
|
<Group p="sm" direction="column" align="center">
|
||||||
<Title order={3}>Current CPU load</Title>
|
<Title order={3}>Current CPU load</Title>
|
||||||
<ResponsiveLine
|
{/* <ResponsiveLine
|
||||||
isInteractive
|
isInteractive
|
||||||
enableSlices="x"
|
enableSlices="x"
|
||||||
sliceTooltip={({ slice }) => {
|
sliceTooltip={({ slice }) => {
|
||||||
@@ -108,7 +107,7 @@ export default function SystemInfo(args: any) {
|
|||||||
// Green
|
// Green
|
||||||
theme.colors.green[5],
|
theme.colors.green[5],
|
||||||
]}
|
]}
|
||||||
/>
|
/> */}
|
||||||
<RingProgress
|
<RingProgress
|
||||||
size={120}
|
size={120}
|
||||||
label={<Center>{`${(currentLoad * 100).toFixed(2)}%`}</Center>}
|
label={<Center>{`${(currentLoad * 100).toFixed(2)}%`}</Center>}
|
||||||
|
|||||||
Reference in New Issue
Block a user