Add stats to other types

This commit is contained in:
Nicolas Mowen 2024-04-28 15:45:26 -06:00
parent e55d13f377
commit 87c7cddcaf
2 changed files with 5 additions and 1 deletions

View File

@ -139,7 +139,7 @@ export default function GeneralSettings({ className }: GeneralSettings) {
<DropdownMenuLabel>System</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuGroup className={isDesktop ? "" : "flex flex-col"}>
<Link to="/system">
<Link to="/system#general">
<MenuItem
className={
isDesktop

View File

@ -34,11 +34,13 @@ export default function useStats(stats: FrigateStats | undefined) {
problems.push({
text: `${capitalizeFirstLetter(key)} is very slow (${det["inference_speed"]} ms)`,
color: "text-danger",
relevantLink: "/system#general",
});
} else if (det["inference_speed"] > InferenceThreshold.warning) {
problems.push({
text: `${capitalizeFirstLetter(key)} is slow (${det["inference_speed"]} ms)`,
color: "text-orange-400",
relevantLink: "/system#general",
});
}
});
@ -71,6 +73,7 @@ export default function useStats(stats: FrigateStats | undefined) {
problems.push({
text: `${capitalizeFirstLetter(name.replaceAll("_", " "))} has high FFMPEG CPU usage (${ffmpegAvg}%)`,
color: "text-danger",
relevantLink: "/system#cameras",
});
}
@ -78,6 +81,7 @@ export default function useStats(stats: FrigateStats | undefined) {
problems.push({
text: `${capitalizeFirstLetter(name.replaceAll("_", " "))} has high detect CPU usage (${detectAvg}%)`,
color: "text-danger",
relevantLink: "/system#cameras",
});
}
});