Improve System Health pane (#24188)

* build out system health pane

* tweaks

* fixes

* fix notice link so it opens the correct camera

* tweak language
This commit is contained in:
Josh Hawkins
2026-09-12 07:30:04 -06:00
committed by Nicolas Mowen
parent 6d33b31bc6
commit 70ce193e09
57 changed files with 3965 additions and 464 deletions
+9 -1
View File
@@ -705,7 +705,9 @@ export default function Settings() {
.sort((aConf, bConf) => aConf.ui.order - bConf.ui.order);
}, [config]);
const [selectedCamera, setSelectedCamera] = useState<string>("");
const [selectedCamera, setSelectedCamera] = useState<string>(
() => searchParams.get("camera") ?? "",
);
// Get all camera overrides for the selected camera
const cameraOverrides = useAllCameraOverrides(config, selectedCamera);
@@ -1164,6 +1166,12 @@ export default function Settings() {
});
useSearchEffect("camera", (camera: string) => {
// the config drives the camera list, so keep the param until it loads
// rather than consuming it against an empty list
if (cameras.length === 0) {
return false;
}
const cameraNames = cameras.map((c) => c.name);
if (cameraNames.includes(camera)) {
setSelectedCamera(camera);
+1 -1
View File
@@ -122,7 +122,7 @@ function System() {
</ToggleGroup>
<div className="flex h-full items-center">
{lastUpdated && (
{lastUpdated && pageToggle != "health" && (
<div className="h-full content-center text-sm text-muted-foreground">
{t("lastRefreshed")}
<TimeAgo time={lastUpdated * 1000} dense />