mirror of
https://github.com/fankes/beszel.git
synced 2025-10-20 10:19:27 +08:00
site updates
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
} from '@/components/ui/chart'
|
||||
import { formatShortDate, formatShortTime } from '@/lib/utils'
|
||||
import { useMemo } from 'react'
|
||||
import Spinner from '../spinner'
|
||||
|
||||
const chartConfig = {
|
||||
memUsed: {
|
||||
@@ -25,6 +26,10 @@ export default function ({
|
||||
return Math.ceil(chartData[0]?.mem)
|
||||
}, [chartData])
|
||||
|
||||
if (!chartData.length) {
|
||||
return <Spinner />
|
||||
}
|
||||
|
||||
return (
|
||||
<ChartContainer config={chartConfig} className="h-full w-full absolute aspect-auto">
|
||||
<AreaChart
|
||||
@@ -33,8 +38,8 @@ export default function ({
|
||||
margin={{
|
||||
left: 0,
|
||||
right: 0,
|
||||
top: 7,
|
||||
bottom: 7,
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
}}
|
||||
>
|
||||
<CartesianGrid vertical={false} />
|
||||
|
Reference in New Issue
Block a user