* display area as proper percentage in debug view

* match replay objects list with debug view

* motion search fixes

- tweak progress bar to exclude heatmap and inactive segments
- show metrics immediately on search start
- fix preview frame loading race
- fix polygon missing after dialog remount
- don't try to drag the image when dragging vertex of polygon

* add activity indicator to storage metrics

* make sub label query for events API endpoints case insensitive
This commit is contained in:
Josh Hawkins
2026-04-08 09:21:48 -05:00
committed by GitHub
parent 5d2a725428
commit 8f13932c64
9 changed files with 204 additions and 116 deletions

View File

@@ -407,7 +407,7 @@ async def _execute_search_objects(
query_params = EventsQueryParams(
cameras=arguments.get("camera", "all"),
labels=arguments.get("label", "all"),
sub_labels=arguments.get("sub_label", "all").lower(),
sub_labels=arguments.get("sub_label", "all"), # case-insensitive on the backend
zones=zones,
zone=zones,
after=after,

View File

@@ -199,13 +199,18 @@ def events(
sub_label_clauses.append((Event.sub_label.is_null()))
for label in filtered_sub_labels:
lowered = label.lower()
sub_label_clauses.append(
(Event.sub_label.cast("text") == label)
) # include exact matches
(fn.LOWER(Event.sub_label.cast("text")) == lowered)
) # include exact matches (case-insensitive)
# include this label when part of a list
sub_label_clauses.append((Event.sub_label.cast("text") % f"*{label},*"))
sub_label_clauses.append((Event.sub_label.cast("text") % f"*, {label}*"))
# include this label when part of a list (LIKE is case-insensitive in sqlite for ASCII)
sub_label_clauses.append(
(fn.LOWER(Event.sub_label.cast("text")) % f"*{lowered},*")
)
sub_label_clauses.append(
(fn.LOWER(Event.sub_label.cast("text")) % f"*, {lowered}*")
)
sub_label_clause = reduce(operator.or_, sub_label_clauses)
clauses.append((sub_label_clause))
@@ -609,13 +614,18 @@ def events_search(
sub_label_clauses.append((Event.sub_label.is_null()))
for label in filtered_sub_labels:
lowered = label.lower()
sub_label_clauses.append(
(Event.sub_label.cast("text") == label)
) # include exact matches
(fn.LOWER(Event.sub_label.cast("text")) == lowered)
) # include exact matches (case-insensitive)
# include this label when part of a list
sub_label_clauses.append((Event.sub_label.cast("text") % f"*{label},*"))
sub_label_clauses.append((Event.sub_label.cast("text") % f"*, {label}*"))
# include this label when part of a list (LIKE is case-insensitive in sqlite for ASCII)
sub_label_clauses.append(
(fn.LOWER(Event.sub_label.cast("text")) % f"*{lowered},*")
)
sub_label_clauses.append(
(fn.LOWER(Event.sub_label.cast("text")) % f"*, {lowered}*")
)
event_filters.append((reduce(operator.or_, sub_label_clauses)))