mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-13 06:35:24 +03:00
Fix camera filtering logic
This commit is contained in:
parent
5066fa369d
commit
31ff890de7
@ -34,7 +34,7 @@ import { useResizeObserver } from "@/hooks/resize-observer";
|
|||||||
|
|
||||||
type LiveDashboardViewProps = {
|
type LiveDashboardViewProps = {
|
||||||
cameras: CameraConfig[];
|
cameras: CameraConfig[];
|
||||||
cameraGroup?: string;
|
cameraGroup: string;
|
||||||
includeBirdseye: boolean;
|
includeBirdseye: boolean;
|
||||||
onSelectCamera: (camera: string) => void;
|
onSelectCamera: (camera: string) => void;
|
||||||
fullscreen: boolean;
|
fullscreen: boolean;
|
||||||
@ -69,7 +69,15 @@ export default function LiveDashboardView({
|
|||||||
{
|
{
|
||||||
limit: 10,
|
limit: 10,
|
||||||
severity: "alert",
|
severity: "alert",
|
||||||
cameras: cameraGroup && cameras.filter((cam) => cam.name).join(","),
|
cameras:
|
||||||
|
config == undefined || cameraGroup == "default"
|
||||||
|
? null
|
||||||
|
: cameras
|
||||||
|
.filter((cam) =>
|
||||||
|
config.camera_groups[cameraGroup].cameras.includes(cam.name),
|
||||||
|
)
|
||||||
|
.map((cam) => cam.name)
|
||||||
|
.join(","),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user