[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot]
2026-04-04 03:29:02 +00:00
committed by GitHub
parent 28845c145e
commit 1730f427df
6 changed files with 10 additions and 25 deletions

View File

@@ -73,13 +73,10 @@ export const DockerBlockChart = ({ accumulativeData }: Props) => {
<ChartTooltipContent
labelFormatter={(_, payload) => {
const time = payload?.[0]?.payload?.time;
return time
? format(new Date(time), "PPpp")
: "";
return time ? format(new Date(time), "PPpp") : "";
}}
formatter={(value, name) => {
const label =
name === "readMb" ? "Read" : "Write";
const label = name === "readMb" ? "Read" : "Write";
return [`${value} MB`, label];
}}
/>

View File

@@ -61,9 +61,7 @@ export const DockerCpuChart = ({ accumulativeData }: Props) => {
<ChartTooltipContent
labelFormatter={(_, payload) => {
const time = payload?.[0]?.payload?.time;
return time
? format(new Date(time), "PPpp")
: "";
return time ? format(new Date(time), "PPpp") : "";
}}
formatter={(value) => [`${value}%`, "CPU Usage"]}
/>

View File

@@ -80,13 +80,10 @@ export const DockerDiskChart = ({ accumulativeData, diskTotal }: Props) => {
<ChartTooltipContent
labelFormatter={(_, payload) => {
const time = payload?.[0]?.payload?.time;
return time
? format(new Date(time), "PPpp")
: "";
return time ? format(new Date(time), "PPpp") : "";
}}
formatter={(value, name) => {
const label =
name === "usedGb" ? "Used" : "Free";
const label = name === "usedGb" ? "Used" : "Free";
return [`${value} GB`, label];
}}
/>

View File

@@ -124,7 +124,8 @@ export const DockerDiskUsageChart = () => {
if (!item) return [formatSize(value as number), name];
return [
`${item.size}${item.active} active / ${item.totalCount} total — Reclaimable: ${item.reclaimable}`,
chartConfig[name as keyof typeof chartConfig]?.label ?? name,
chartConfig[name as keyof typeof chartConfig]?.label ??
name,
];
}}
/>

View File

@@ -67,9 +67,7 @@ export const DockerMemoryChart = ({
<ChartTooltipContent
labelFormatter={(_, payload) => {
const time = payload?.[0]?.payload?.time;
return time
? format(new Date(time), "PPpp")
: "";
return time ? format(new Date(time), "PPpp") : "";
}}
formatter={(value) => [`${value} GB`, "Memory"]}
/>

View File

@@ -41,11 +41,7 @@ export const DockerNetworkChart = ({ accumulativeData }: Props) => {
>
<defs>
<linearGradient id="fillNetIn" x1="0" y1="0" x2="0" y2="1">
<stop
offset="5%"
stopColor="var(--color-inMB)"
stopOpacity={0.8}
/>
<stop offset="5%" stopColor="var(--color-inMB)" stopOpacity={0.8} />
<stop
offset="95%"
stopColor="var(--color-inMB)"
@@ -73,9 +69,7 @@ export const DockerNetworkChart = ({ accumulativeData }: Props) => {
<ChartTooltipContent
labelFormatter={(_, payload) => {
const time = payload?.[0]?.payload?.time;
return time
? format(new Date(time), "PPpp")
: "";
return time ? format(new Date(time), "PPpp") : "";
}}
formatter={(value, name) => {
const label = name === "inMB" ? "In" : "Out";