style: auto-fix lint and format

This commit is contained in:
ajnart authored and github-actions[bot] committed 2026-06-15 14:14:28 +00:00
1 parent 8134b168e1
commit 4857b72804
2 files changed
+100 -46

No files matched your search

@@ -232,7 +232,14 @@ export default function BeszelSystemStatsWidget({
<BeszelChartPanel <BeszelChartPanel
title={t("chart.cpu.title")} title={t("chart.cpu.title")}
subtitle={t("chart.cpu.subtitle")} subtitle={t("chart.cpu.subtitle")}
chartProps={{ h: CHART_HEIGHT, data: cpuData, series: cpuSeries, yAxisFormatter: chartAxisFormatters.percent, yAxisDomain: CPU_Y_AXIS_DOMAIN, tooltipProps: tooltipPercent }} chartProps={{
h: CHART_HEIGHT,
data: cpuData,
series: cpuSeries,
yAxisFormatter: chartAxisFormatters.percent,
yAxisDomain: CPU_Y_AXIS_DOMAIN,
tooltipProps: tooltipPercent,
}}
/> />
)} )}
@@ -240,7 +247,14 @@ export default function BeszelSystemStatsWidget({
<BeszelChartPanel <BeszelChartPanel
title={t("chart.memory.title")} title={t("chart.memory.title")}
subtitle={t("chart.memory.subtitle")} subtitle={t("chart.memory.subtitle")}
chartProps={{ h: CHART_HEIGHT, data: memoryData, type: "stacked", series: memorySeries, yAxisFormatter: chartAxisFormatters.gb, tooltipProps: tooltipGB }} chartProps={{
h: CHART_HEIGHT,
data: memoryData,
type: "stacked",
series: memorySeries,
yAxisFormatter: chartAxisFormatters.gb,
tooltipProps: tooltipGB,
}}
/> />
)} )}
@@ -248,7 +262,13 @@ export default function BeszelSystemStatsWidget({
<BeszelChartPanel <BeszelChartPanel
title={t("chart.disk.title")} title={t("chart.disk.title")}
subtitle={t("chart.disk.subtitle")} subtitle={t("chart.disk.subtitle")}
chartProps={{ h: CHART_HEIGHT, data: diskData, series: diskSeries, yAxisFormatter: chartAxisFormatters.gb, tooltipProps: tooltipGB }} chartProps={{
h: CHART_HEIGHT,
data: diskData,
series: diskSeries,
yAxisFormatter: chartAxisFormatters.gb,
tooltipProps: tooltipGB,
}}
/> />
)} )}
@@ -256,7 +276,13 @@ export default function BeszelSystemStatsWidget({
<BeszelChartPanel <BeszelChartPanel
title={t("chart.diskIO.title")} title={t("chart.diskIO.title")}
subtitle={t("chart.diskIO.subtitle")} subtitle={t("chart.diskIO.subtitle")}
chartProps={{ h: CHART_HEIGHT, data: diskIOData, series: diskIOSeries, yAxisFormatter: chartAxisFormatters.rate, tooltipProps: tooltipRate }} chartProps={{
h: CHART_HEIGHT,
data: diskIOData,
series: diskIOSeries,
yAxisFormatter: chartAxisFormatters.rate,
tooltipProps: tooltipRate,
}}
/> />
)} )}
@@ -264,7 +290,13 @@ export default function BeszelSystemStatsWidget({
<BeszelChartPanel <BeszelChartPanel
title={t("chart.network.title")} title={t("chart.network.title")}
subtitle={t("chart.network.subtitle")} subtitle={t("chart.network.subtitle")}
chartProps={{ h: CHART_HEIGHT, data: networkData, series: networkSeries, yAxisFormatter: chartAxisFormatters.rate, tooltipProps: tooltipRate }} chartProps={{
h: CHART_HEIGHT,
data: networkData,
series: networkSeries,
yAxisFormatter: chartAxisFormatters.rate,
tooltipProps: tooltipRate,
}}
/> />
)} )}
@@ -274,7 +306,14 @@ export default function BeszelSystemStatsWidget({
<BeszelChartPanel <BeszelChartPanel
title={t("chart.dockerCpu.title")} title={t("chart.dockerCpu.title")}
subtitle={t("chart.dockerCpu.subtitle")} subtitle={t("chart.dockerCpu.subtitle")}
chartProps={{ h: CHART_HEIGHT, data: dockerCpuData, type: "stacked", series: containerSeries, yAxisFormatter: chartAxisFormatters.percent, tooltipProps: tooltipPercentTotal }} chartProps={{
h: CHART_HEIGHT,
data: dockerCpuData,
type: "stacked",
series: containerSeries,
yAxisFormatter: chartAxisFormatters.percent,
tooltipProps: tooltipPercentTotal,
}}
/> />
)} )}
@@ -282,7 +321,14 @@ export default function BeszelSystemStatsWidget({
<BeszelChartPanel <BeszelChartPanel
title={t("chart.dockerMemory.title")} title={t("chart.dockerMemory.title")}
subtitle={t("chart.dockerMemory.subtitle")} subtitle={t("chart.dockerMemory.subtitle")}
chartProps={{ h: CHART_HEIGHT, data: dockerMemData, type: "stacked", series: containerSeries, yAxisFormatter: chartAxisFormatters.bytes, tooltipProps: tooltipBytesTotal }} chartProps={{
h: CHART_HEIGHT,
data: dockerMemData,
type: "stacked",
series: containerSeries,
yAxisFormatter: chartAxisFormatters.bytes,
tooltipProps: tooltipBytesTotal,
}}
/> />
)} )}
@@ -290,7 +336,13 @@ export default function BeszelSystemStatsWidget({
<BeszelChartPanel <BeszelChartPanel
title={t("chart.dockerNetwork.title")} title={t("chart.dockerNetwork.title")}
subtitle={t("chart.dockerNetwork.subtitle")} subtitle={t("chart.dockerNetwork.subtitle")}
chartProps={{ h: CHART_HEIGHT, data: dockerNetData, series: containerSeries, yAxisFormatter: chartAxisFormatters.rate, tooltipProps: tooltipRate }} chartProps={{
h: CHART_HEIGHT,
data: dockerNetData,
series: containerSeries,
yAxisFormatter: chartAxisFormatters.rate,
tooltipProps: tooltipRate,
}}
/> />
)} )}
</> </>
+40 -38
View File
@@ -51,45 +51,47 @@ type BeszelAreaChartProps = Omit<AreaChartProps, "dataKey" | "curveType" | "with
yAxisDomain?: [number, string]; yAxisDomain?: [number, string];
}; };
const BeszelAreaChart = memo(({ const BeszelAreaChart = memo(
yAxisFormatter, ({
yAxisDomain, yAxisFormatter,
yAxisProps: yAxisPropsOverride, yAxisDomain,
type = "default", yAxisProps: yAxisPropsOverride,
...props type = "default",
}: BeszelAreaChartProps) => { ...props
const mergedYAxis = useMemo( }: BeszelAreaChartProps) => {
() => ({ const mergedYAxis = useMemo(
...yAxisBase, () => ({
width: 32, ...yAxisBase,
tickMargin: 2, width: 32,
...(yAxisDomain ? { domain: yAxisDomain } : {}), tickMargin: 2,
tickFormatter: yAxisFormatter, ...(yAxisDomain ? { domain: yAxisDomain } : {}),
...yAxisPropsOverride, tickFormatter: yAxisFormatter,
}), ...yAxisPropsOverride,
[yAxisFormatter, yAxisDomain, yAxisPropsOverride], }),
); [yAxisFormatter, yAxisDomain, yAxisPropsOverride],
);
return ( return (
<AreaChart <AreaChart
dataKey="time" dataKey="time"
curveType="monotone" curveType="monotone"
withGradient={false} withGradient={false}
connectNulls connectNulls
withDots={false} withDots={false}
type={type} type={type}
strokeWidth={1} strokeWidth={1}
fillOpacity={0.2} fillOpacity={0.2}
areaChartProps={noAnimation} areaChartProps={noAnimation}
withXAxis withXAxis
withYAxis withYAxis
w="100%" w="100%"
style={chartStyle} style={chartStyle}
yAxisProps={mergedYAxis} yAxisProps={mergedYAxis}
{...props} {...props}
/> />
); );
}); },
);
export const useSystemChartData = ( export const useSystemChartData = (
systemStats: BeszelSystemStatsRecord[] | undefined, systemStats: BeszelSystemStatsRecord[] | undefined,