mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-26 19:06:11 +01:00
8173cd7776
* backend score filtering and sorting * score filter frontend * use input for score filtering * use correct score on search thumbnail * add popover to explain top_score * revert sublabel score calc * update filters logic * fix rounding on score * wait until default view is loaded * don't turn button to selected style for similarity searches * clarify language * fix alert dialog buttons to use correct destructive variant * use root level top_score for very old events * better arrangement of thumbnail footer items on smaller screens
57 lines
1.7 KiB
Python
57 lines
1.7 KiB
Python
from typing import Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
DEFAULT_TIME_RANGE = "00:00,24:00"
|
|
|
|
|
|
class EventsQueryParams(BaseModel):
|
|
camera: Optional[str] = "all"
|
|
cameras: Optional[str] = "all"
|
|
label: Optional[str] = "all"
|
|
labels: Optional[str] = "all"
|
|
sub_label: Optional[str] = "all"
|
|
sub_labels: Optional[str] = "all"
|
|
zone: Optional[str] = "all"
|
|
zones: Optional[str] = "all"
|
|
limit: Optional[int] = 100
|
|
after: Optional[float] = None
|
|
before: Optional[float] = None
|
|
time_range: Optional[str] = DEFAULT_TIME_RANGE
|
|
has_clip: Optional[int] = None
|
|
has_snapshot: Optional[int] = None
|
|
in_progress: Optional[int] = None
|
|
include_thumbnails: Optional[int] = 1
|
|
favorites: Optional[int] = None
|
|
min_score: Optional[float] = None
|
|
max_score: Optional[float] = None
|
|
is_submitted: Optional[int] = None
|
|
min_length: Optional[float] = None
|
|
max_length: Optional[float] = None
|
|
sort: Optional[str] = None
|
|
timezone: Optional[str] = "utc"
|
|
|
|
|
|
class EventsSearchQueryParams(BaseModel):
|
|
query: Optional[str] = None
|
|
event_id: Optional[str] = None
|
|
search_type: Optional[str] = "thumbnail,description"
|
|
include_thumbnails: Optional[int] = 1
|
|
limit: Optional[int] = 50
|
|
cameras: Optional[str] = "all"
|
|
labels: Optional[str] = "all"
|
|
zones: Optional[str] = "all"
|
|
after: Optional[float] = None
|
|
before: Optional[float] = None
|
|
time_range: Optional[str] = DEFAULT_TIME_RANGE
|
|
timezone: Optional[str] = "utc"
|
|
min_score: Optional[float] = None
|
|
max_score: Optional[float] = None
|
|
sort: Optional[str] = None
|
|
|
|
|
|
class EventsSummaryQueryParams(BaseModel):
|
|
timezone: Optional[str] = "utc"
|
|
has_clip: Optional[int] = None
|
|
has_snapshot: Optional[int] = None
|