mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 05:35:25 +03:00
Add y axis to gneral graph too
This commit is contained in:
parent
404f9f9a33
commit
de11e97e59
@ -40,7 +40,7 @@ export function ThresholdBarGraph({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const date = new Date(updateTimes[Math.round(val as number)] * 1000);
|
const date = new Date(updateTimes[Math.round(val as number) - 1] * 1000);
|
||||||
return date.toLocaleTimeString([], {
|
return date.toLocaleTimeString([], {
|
||||||
hour12: config?.ui.time_format != "24hour",
|
hour12: config?.ui.time_format != "24hour",
|
||||||
hour: "2-digit",
|
hour: "2-digit",
|
||||||
@ -110,9 +110,11 @@ export function ThresholdBarGraph({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
yaxis: {
|
yaxis: {
|
||||||
show: false,
|
show: true,
|
||||||
|
labels: {
|
||||||
|
formatter: (val: number) => Math.ceil(val).toString(),
|
||||||
|
},
|
||||||
min: 0,
|
min: 0,
|
||||||
max: threshold.warning + 10,
|
|
||||||
},
|
},
|
||||||
} as ApexCharts.ApexOptions;
|
} as ApexCharts.ApexOptions;
|
||||||
}, [graphId, threshold, systemTheme, theme, formatTime]);
|
}, [graphId, threshold, systemTheme, theme, formatTime]);
|
||||||
|
|||||||
@ -99,7 +99,7 @@ export default function GeneralMetrics({
|
|||||||
series[key] = { name: key, data: [] };
|
series[key] = { name: key, data: [] };
|
||||||
}
|
}
|
||||||
|
|
||||||
series[key].data.push({ x: statsIdx, y: stats.inference_speed });
|
series[key].data.push({ x: statsIdx + 1, y: stats.inference_speed });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return Object.values(series);
|
return Object.values(series);
|
||||||
@ -125,7 +125,7 @@ export default function GeneralMetrics({
|
|||||||
}
|
}
|
||||||
|
|
||||||
series[key].data.push({
|
series[key].data.push({
|
||||||
x: statsIdx,
|
x: statsIdx + 1,
|
||||||
y: stats.cpu_usages[detStats.pid.toString()].cpu,
|
y: stats.cpu_usages[detStats.pid.toString()].cpu,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -153,7 +153,7 @@ export default function GeneralMetrics({
|
|||||||
}
|
}
|
||||||
|
|
||||||
series[key].data.push({
|
series[key].data.push({
|
||||||
x: statsIdx,
|
x: statsIdx + 1,
|
||||||
y: stats.cpu_usages[detStats.pid.toString()].mem,
|
y: stats.cpu_usages[detStats.pid.toString()].mem,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -182,7 +182,7 @@ export default function GeneralMetrics({
|
|||||||
series[key] = { name: key, data: [] };
|
series[key] = { name: key, data: [] };
|
||||||
}
|
}
|
||||||
|
|
||||||
series[key].data.push({ x: statsIdx, y: stats.gpu });
|
series[key].data.push({ x: statsIdx + 1, y: stats.gpu });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return Object.keys(series).length > 0 ? Object.values(series) : [];
|
return Object.keys(series).length > 0 ? Object.values(series) : [];
|
||||||
@ -207,7 +207,7 @@ export default function GeneralMetrics({
|
|||||||
series[key] = { name: key, data: [] };
|
series[key] = { name: key, data: [] };
|
||||||
}
|
}
|
||||||
|
|
||||||
series[key].data.push({ x: statsIdx, y: stats.mem });
|
series[key].data.push({ x: statsIdx + 1, y: stats.mem });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return Object.values(series);
|
return Object.values(series);
|
||||||
@ -236,7 +236,7 @@ export default function GeneralMetrics({
|
|||||||
}
|
}
|
||||||
|
|
||||||
series[key].data.push({
|
series[key].data.push({
|
||||||
x: statsIdx,
|
x: statsIdx + 1,
|
||||||
y: stats.cpu_usages[procStats.pid.toString()].cpu,
|
y: stats.cpu_usages[procStats.pid.toString()].cpu,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -266,7 +266,7 @@ export default function GeneralMetrics({
|
|||||||
}
|
}
|
||||||
|
|
||||||
series[key].data.push({
|
series[key].data.push({
|
||||||
x: statsIdx,
|
x: statsIdx + 1,
|
||||||
y: stats.cpu_usages[procStats.pid.toString()].mem,
|
y: stats.cpu_usages[procStats.pid.toString()].mem,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user