diff --git a/beszel/site/src/components/routes/system.tsx b/beszel/site/src/components/routes/system.tsx
index 234421a..9bfbd96 100644
--- a/beszel/site/src/components/routes/system.tsx
+++ b/beszel/site/src/components/routes/system.tsx
@@ -4,12 +4,20 @@ import { Suspense, lazy, useCallback, useEffect, useMemo, useRef, useState } fro
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from '../ui/card'
import { useStore } from '@nanostores/react'
import Spinner from '../spinner'
-import { ClockArrowUp, CpuIcon, GlobeIcon } from 'lucide-react'
+import { ClockArrowUp, CpuIcon, GlobeIcon, LayoutGridIcon } from 'lucide-react'
import ChartTimeSelect from '../charts/chart-time-select'
-import { chartTimeData, cn, getPbTimestamp, useClampedIsInViewport } from '@/lib/utils'
+import {
+ chartTimeData,
+ cn,
+ getPbTimestamp,
+ useClampedIsInViewport,
+ useLocalStorage,
+} from '@/lib/utils'
import { Separator } from '../ui/separator'
import { scaleTime } from 'd3-scale'
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../ui/tooltip'
+import { Toggle } from '../ui/toggle'
+import { buttonVariants } from '../ui/button'
const CpuChart = lazy(() => import('../charts/cpu-chart'))
const ContainerCpuChart = lazy(() => import('../charts/container-cpu-chart'))
@@ -25,6 +33,7 @@ const TemperatureChart = lazy(() => import('../charts/temperature-chart'))
export default function SystemDetail({ name }: { name: string }) {
const systems = useStore($systems)
const chartTime = useStore($chartTime)
+ const [grid, setGrid] = useLocalStorage('grid', true)
const [ticks, setTicks] = useState([] as number[])
const [system, setSystem] = useState({} as SystemRecord)
const [systemStats, setSystemStats] = useState([] as SystemStatsRecord[])
@@ -244,57 +253,96 @@ export default function SystemDetail({ name }: { name: string }) {
)}
-
+
+
+
+
+
+
+
+
+
+
+
+ Toggle grid
+
+
+
-
+
{hasDockerStats && (
-
+
)}
-
+
{hasDockerStats && (
-
+
)}
{(systemStats.at(-1)?.stats.s ?? 0) > 0 && (
-
+
)}
+
+
+
+
{systemStats.at(-1)?.stats.t && (
-
+
)}
-
-
-
-
-
+
-
+
{hasDockerStats && dockerNetChartData.length > 0 && (
<>
@@ -319,21 +367,23 @@ function ChartCard({
title,
description,
children,
+ grid,
}: {
title: string
description: string
children: React.ReactNode
+ grid: boolean
}) {
const target = useRef(null)
const [isInViewport, wrappedTargetRef] = useClampedIsInViewport({ target: target })
return (
-
+
{title}
{description}
- {/*
-
-
*/}
{}
diff --git a/beszel/site/src/components/systems-table/systems-table.tsx b/beszel/site/src/components/systems-table/systems-table.tsx
index 07a3267..6953473 100644
--- a/beszel/site/src/components/systems-table/systems-table.tsx
+++ b/beszel/site/src/components/systems-table/systems-table.tsx
@@ -135,7 +135,7 @@ export default function SystemsTable({ filter }: { filter?: string }) {