diff --git a/frontend/src/components/stats/Charts.tsx b/frontend/src/components/stats/Charts.tsx index 4db056863..37fcfb8ab 100644 --- a/frontend/src/components/stats/Charts.tsx +++ b/frontend/src/components/stats/Charts.tsx @@ -40,7 +40,7 @@ const SingleStatChart: Component<{ "padding-bottom": "0.2rem", }} > - + {p.header}}>

{p.header}

; + small?: boolean; + disableScroll?: boolean; +}> = (p) => { + const line = () => { + return p.stats()?.map((s) => { + return { + time: convertTsMsToLocalUnixTsInSecs( + (s as SystemStatsRecord).ts || (s as SystemStats).refresh_ts + ), + value: s.system_load!, + }; + }); + }; + return ( + + ); +}; + export const CpuChart: Component<{ stats: Accessor<(SystemStatsRecord | SystemStats)[] | undefined>; small?: boolean; @@ -71,7 +98,7 @@ export const CpuChart: Component<{ }; return ( ; + small?: boolean; + disableScroll?: boolean; +}> = (p) => { + const line = () => { + return p.stats()?.map((s) => { + return { + time: convertTsMsToLocalUnixTsInSecs( + (s as SystemStatsRecord).ts || (s as SystemStats).refresh_ts + ), + value: s.cpu_freq_mhz! / 1000, + }; + }); + }; + return ( + + ); +}; + export const MemChart: Component<{ stats: Accessor<(SystemStatsRecord | SystemStats)[] | undefined>; small?: boolean; diff --git a/frontend/src/components/stats/CurrentStats.tsx b/frontend/src/components/stats/CurrentStats.tsx index c18933429..8838ca2c2 100644 --- a/frontend/src/components/stats/CurrentStats.tsx +++ b/frontend/src/components/stats/CurrentStats.tsx @@ -17,18 +17,18 @@ import { client, URL } from "../.."; import { SystemProcess, SystemStats } from "../../types"; import { generateQuery } from "../../util/helpers"; import { useLocalStorage } from "../../util/hooks"; -import Circle from "../shared/Circle"; import HeatBar from "../shared/HeatBar"; import Flex from "../shared/layout/Flex"; import Grid from "../shared/layout/Grid"; import Loading from "../shared/loading/Loading"; -import HoverMenu from "../shared/menu/HoverMenu"; import SimpleTabs from "../shared/tabs/SimpleTabs"; import { CpuChart, + CpuFreqChart, DiskChart, DiskReadChart, DiskWriteChart, + LoadChart, MemChart, NetworkRecvChart, NetworkSentChart, @@ -64,8 +64,8 @@ const CurrentStats: Component<{ setWsOpen: Setter }> = (p) => { title: "network io", element: () => ( - - + + ), }, @@ -73,8 +73,8 @@ const CurrentStats: Component<{ setWsOpen: Setter }> = (p) => { title: "disk io", element: () => ( - - + + ), }, @@ -136,12 +136,25 @@ const BasicInfo: Component<{ }; return ( <> + + + {(latest().cpu_freq_mhz / 1000).toFixed(1)} GHz + + } /> ; percentage: number; @@ -208,8 +221,14 @@ const StatsHeatbarRow: Component<{
+ + + - + + + + @@ -273,6 +292,7 @@ function useStatsWs(params: Params, setStats: Setter, setWsOpen: networks: "true", components: "true", processes: "true", + cpus: "true", })}` ); ws.addEventListener("open", () => { diff --git a/frontend/src/components/stats/Stats.tsx b/frontend/src/components/stats/Stats.tsx index 51e84db14..d45b4a7d9 100644 --- a/frontend/src/components/stats/Stats.tsx +++ b/frontend/src/components/stats/Stats.tsx @@ -5,7 +5,6 @@ import { createResource, createSignal, Match, - Resource, Setter, Show, Switch, @@ -64,8 +63,14 @@ const Stats: Component<{}> = () => { /> - - + +
{sysInfo()?.os}
+ {/*
{sysInfo()?.kernel}
*/} +
{sysInfo()?.cpu_brand}
+
{sysInfo()?.core_count} cores
diff --git a/frontend/src/components/stats/stats.module.scss b/frontend/src/components/stats/stats.module.scss index 15e4942f7..5eada80dc 100644 --- a/frontend/src/components/stats/stats.module.scss +++ b/frontend/src/components/stats/stats.module.scss @@ -1,7 +1,7 @@ @use "../../style/colors.scss" as c; .HeaderArea { - grid-template-columns: repeat(3, 1fr); + grid-template-columns: 2fr 1fr 2fr; } .Charts {