mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 15:45:27 +03:00
Merge branch '0.16' of https://github.com/blakeblackshear/frigate into 0.16
This commit is contained in:
commit
c3eae3ea2b
@ -38,7 +38,7 @@ cd ../../
|
|||||||
if [ ! -d /lib/firmware/hailo ]; then
|
if [ ! -d /lib/firmware/hailo ]; then
|
||||||
sudo mkdir /lib/firmware/hailo
|
sudo mkdir /lib/firmware/hailo
|
||||||
fi
|
fi
|
||||||
sudo mv hailo8_fw.4.17.0.bin /lib/firmware/hailo/hailo8_fw.bin
|
sudo mv hailo8_fw.4.18.0.bin /lib/firmware/hailo/hailo8_fw.bin
|
||||||
|
|
||||||
# Install udev rules
|
# Install udev rules
|
||||||
sudo cp ./linux/pcie/51-hailo-udev.rules /etc/udev/rules.d/
|
sudo cp ./linux/pcie/51-hailo-udev.rules /etc/udev/rules.d/
|
||||||
|
|||||||
@ -51,7 +51,7 @@ class PendingReviewSegment:
|
|||||||
frame_time: float,
|
frame_time: float,
|
||||||
severity: SeverityEnum,
|
severity: SeverityEnum,
|
||||||
detections: dict[str, str],
|
detections: dict[str, str],
|
||||||
sub_labels: set[str],
|
sub_labels: dict[str, str],
|
||||||
zones: list[str],
|
zones: list[str],
|
||||||
audio: set[str],
|
audio: set[str],
|
||||||
):
|
):
|
||||||
@ -135,7 +135,7 @@ class PendingReviewSegment:
|
|||||||
ReviewSegment.data.name: {
|
ReviewSegment.data.name: {
|
||||||
"detections": list(set(self.detections.keys())),
|
"detections": list(set(self.detections.keys())),
|
||||||
"objects": list(set(self.detections.values())),
|
"objects": list(set(self.detections.values())),
|
||||||
"sub_labels": list(self.sub_labels),
|
"sub_labels": list(self.sub_labels.values()),
|
||||||
"zones": self.zones,
|
"zones": self.zones,
|
||||||
"audio": list(self.audio),
|
"audio": list(self.audio),
|
||||||
},
|
},
|
||||||
@ -261,7 +261,7 @@ class ReviewSegmentMaintainer(threading.Thread):
|
|||||||
segment.detections[object["id"]] = object["sub_label"][0]
|
segment.detections[object["id"]] = object["sub_label"][0]
|
||||||
else:
|
else:
|
||||||
segment.detections[object["id"]] = f'{object["label"]}-verified'
|
segment.detections[object["id"]] = f'{object["label"]}-verified'
|
||||||
segment.sub_labels.add(object["sub_label"][0])
|
segment.sub_labels[object["id"]] = object["sub_label"][0]
|
||||||
|
|
||||||
# if object is alert label
|
# if object is alert label
|
||||||
# and has entered required zones or required zones is not set
|
# and has entered required zones or required zones is not set
|
||||||
@ -347,7 +347,7 @@ class ReviewSegmentMaintainer(threading.Thread):
|
|||||||
|
|
||||||
if len(active_objects) > 0:
|
if len(active_objects) > 0:
|
||||||
detections: dict[str, str] = {}
|
detections: dict[str, str] = {}
|
||||||
sub_labels = set()
|
sub_labels = dict[str, str] = {}
|
||||||
zones: list[str] = []
|
zones: list[str] = []
|
||||||
severity = None
|
severity = None
|
||||||
|
|
||||||
@ -358,7 +358,7 @@ class ReviewSegmentMaintainer(threading.Thread):
|
|||||||
detections[object["id"]] = object["sub_label"][0]
|
detections[object["id"]] = object["sub_label"][0]
|
||||||
else:
|
else:
|
||||||
detections[object["id"]] = f'{object["label"]}-verified'
|
detections[object["id"]] = f'{object["label"]}-verified'
|
||||||
sub_labels.add(object["sub_label"][0])
|
sub_labels[object["id"]] = object["sub_label"][0]
|
||||||
|
|
||||||
# if object is alert label
|
# if object is alert label
|
||||||
# and has entered required zones or required zones is not set
|
# and has entered required zones or required zones is not set
|
||||||
@ -566,7 +566,7 @@ class ReviewSegmentMaintainer(threading.Thread):
|
|||||||
frame_time,
|
frame_time,
|
||||||
severity,
|
severity,
|
||||||
{},
|
{},
|
||||||
set(),
|
{},
|
||||||
[],
|
[],
|
||||||
detections,
|
detections,
|
||||||
)
|
)
|
||||||
@ -576,7 +576,7 @@ class ReviewSegmentMaintainer(threading.Thread):
|
|||||||
frame_time,
|
frame_time,
|
||||||
SeverityEnum.alert,
|
SeverityEnum.alert,
|
||||||
{manual_info["event_id"]: manual_info["label"]},
|
{manual_info["event_id"]: manual_info["label"]},
|
||||||
set(),
|
{},
|
||||||
[],
|
[],
|
||||||
set(),
|
set(),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -216,7 +216,7 @@ export function CombinedStorageGraph({
|
|||||||
</Popover>
|
</Popover>
|
||||||
)}
|
)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>{getUnitSize(item.usage)}</TableCell>
|
<TableCell>{getUnitSize(item.usage ?? 0)}</TableCell>
|
||||||
<TableCell>{item.data[0].toFixed(2)}%</TableCell>
|
<TableCell>{item.data[0].toFixed(2)}%</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
{item.name === "Unused"
|
{item.name === "Unused"
|
||||||
|
|||||||
@ -25,7 +25,13 @@ export function MobilePage({
|
|||||||
const [uncontrolledOpen, setUncontrolledOpen] = useState(false);
|
const [uncontrolledOpen, setUncontrolledOpen] = useState(false);
|
||||||
|
|
||||||
const open = controlledOpen ?? uncontrolledOpen;
|
const open = controlledOpen ?? uncontrolledOpen;
|
||||||
const setOpen = onOpenChange ?? setUncontrolledOpen;
|
const setOpen = (value: boolean) => {
|
||||||
|
if (onOpenChange) {
|
||||||
|
onOpenChange(value);
|
||||||
|
} else {
|
||||||
|
setUncontrolledOpen(value);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MobilePageContext.Provider value={{ open, onOpenChange: setOpen }}>
|
<MobilePageContext.Provider value={{ open, onOpenChange: setOpen }}>
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import { getIconForLabel } from "@/utils/iconUtil";
|
|||||||
import { useApiHost } from "@/api";
|
import { useApiHost } from "@/api";
|
||||||
import { ReviewDetailPaneType, ReviewSegment } from "@/types/review";
|
import { ReviewDetailPaneType, ReviewSegment } from "@/types/review";
|
||||||
import { Event } from "@/types/event";
|
import { Event } from "@/types/event";
|
||||||
import { useEffect, useMemo, useRef, useState } from "react";
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { FrigatePlusDialog } from "../dialog/FrigatePlusDialog";
|
import { FrigatePlusDialog } from "../dialog/FrigatePlusDialog";
|
||||||
import ObjectLifecycle from "./ObjectLifecycle";
|
import ObjectLifecycle from "./ObjectLifecycle";
|
||||||
@ -91,6 +91,22 @@ export default function ReviewDetailDialog({
|
|||||||
review != undefined,
|
review != undefined,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const handleOpenChange = useCallback(
|
||||||
|
(open: boolean) => {
|
||||||
|
setIsOpen(open);
|
||||||
|
if (!open) {
|
||||||
|
// short timeout to allow the mobile page animation
|
||||||
|
// to complete before updating the state
|
||||||
|
setTimeout(() => {
|
||||||
|
setReview(undefined);
|
||||||
|
setSelectedEvent(undefined);
|
||||||
|
setPane("overview");
|
||||||
|
}, 300);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[setReview, setIsOpen],
|
||||||
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setIsOpen(review != undefined);
|
setIsOpen(review != undefined);
|
||||||
// we know that these deps are correct
|
// we know that these deps are correct
|
||||||
@ -109,16 +125,7 @@ export default function ReviewDetailDialog({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Overlay
|
<Overlay open={isOpen ?? false} onOpenChange={handleOpenChange}>
|
||||||
open={isOpen ?? false}
|
|
||||||
onOpenChange={(open) => {
|
|
||||||
if (!open) {
|
|
||||||
setReview(undefined);
|
|
||||||
setSelectedEvent(undefined);
|
|
||||||
setPane("overview");
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<FrigatePlusDialog
|
<FrigatePlusDialog
|
||||||
upload={upload}
|
upload={upload}
|
||||||
onClose={() => setUpload(undefined)}
|
onClose={() => setUpload(undefined)}
|
||||||
@ -140,7 +147,7 @@ export default function ReviewDetailDialog({
|
|||||||
>
|
>
|
||||||
<span tabIndex={0} className="sr-only" />
|
<span tabIndex={0} className="sr-only" />
|
||||||
{pane == "overview" && (
|
{pane == "overview" && (
|
||||||
<Header className="justify-center" onClose={() => setIsOpen(false)}>
|
<Header className="justify-center">
|
||||||
<Title>Review Item Details</Title>
|
<Title>Review Item Details</Title>
|
||||||
<Description className="sr-only">Review item details</Description>
|
<Description className="sr-only">Review item details</Description>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@ -109,6 +109,20 @@ export default function SearchDetailDialog({
|
|||||||
|
|
||||||
const [isOpen, setIsOpen] = useState(search != undefined);
|
const [isOpen, setIsOpen] = useState(search != undefined);
|
||||||
|
|
||||||
|
const handleOpenChange = useCallback(
|
||||||
|
(open: boolean) => {
|
||||||
|
setIsOpen(open);
|
||||||
|
if (!open) {
|
||||||
|
// short timeout to allow the mobile page animation
|
||||||
|
// to complete before updating the state
|
||||||
|
setTimeout(() => {
|
||||||
|
setSearch(undefined);
|
||||||
|
}, 300);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[setSearch],
|
||||||
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (search) {
|
if (search) {
|
||||||
setIsOpen(search != undefined);
|
setIsOpen(search != undefined);
|
||||||
@ -158,14 +172,7 @@ export default function SearchDetailDialog({
|
|||||||
const Description = isDesktop ? DialogDescription : MobilePageDescription;
|
const Description = isDesktop ? DialogDescription : MobilePageDescription;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Overlay
|
<Overlay open={isOpen} onOpenChange={handleOpenChange}>
|
||||||
open={isOpen}
|
|
||||||
onOpenChange={() => {
|
|
||||||
if (search) {
|
|
||||||
setSearch(undefined);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Content
|
<Content
|
||||||
className={cn(
|
className={cn(
|
||||||
"scrollbar-container overflow-y-auto",
|
"scrollbar-container overflow-y-auto",
|
||||||
@ -174,7 +181,7 @@ export default function SearchDetailDialog({
|
|||||||
isMobile && "px-4",
|
isMobile && "px-4",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<Header onClose={() => setIsOpen(false)}>
|
<Header>
|
||||||
<Title>Tracked Object Details</Title>
|
<Title>Tracked Object Details</Title>
|
||||||
<Description className="sr-only">Tracked object details</Description>
|
<Description className="sr-only">Tracked object details</Description>
|
||||||
</Header>
|
</Header>
|
||||||
|
|||||||
@ -190,6 +190,7 @@ export default function HlsVideoPlayer({
|
|||||||
minScale={1.0}
|
minScale={1.0}
|
||||||
wheel={{ smoothStep: 0.005 }}
|
wheel={{ smoothStep: 0.005 }}
|
||||||
onZoom={(zoom) => setZoomScale(zoom.state.scale)}
|
onZoom={(zoom) => setZoomScale(zoom.state.scale)}
|
||||||
|
disabled={!frigateControls}
|
||||||
>
|
>
|
||||||
{frigateControls && (
|
{frigateControls && (
|
||||||
<VideoControls
|
<VideoControls
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user