From 833768172d2c60d5af5316d8b3e72c06b1f4777f Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sun, 13 Oct 2024 16:48:54 -0500 Subject: [PATCH] UI tweaks (#14326) * small tweaks for frigate+ submission and debug object list * exclude attributes from labels colormap --- frigate/detectors/detector_config.py | 12 ++++++++++-- .../components/overlay/detail/SearchDetailDialog.tsx | 4 ++-- web/src/views/settings/ObjectSettingsView.tsx | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/frigate/detectors/detector_config.py b/frigate/detectors/detector_config.py index bc0a0ff11..11f08a86c 100644 --- a/frigate/detectors/detector_config.py +++ b/frigate/detectors/detector_config.py @@ -157,8 +157,16 @@ class ModelConfig(BaseModel): self._model_hash = file_hash.hexdigest() def create_colormap(self, enabled_labels: set[str]) -> None: - """Get a list of colors for enabled labels.""" - colors = generate_color_palette(len(enabled_labels)) + """Get a list of colors for enabled labels that aren't attributes.""" + colors = generate_color_palette( + len( + list( + filter( + lambda label: label not in self._all_attributes, enabled_labels + ) + ) + ) + ) self._colormap = {label: color for label, color in zip(enabled_labels, colors)} diff --git a/web/src/components/overlay/detail/SearchDetailDialog.tsx b/web/src/components/overlay/detail/SearchDetailDialog.tsx index 45c0659d8..94d28c7c8 100644 --- a/web/src/components/overlay/detail/SearchDetailDialog.tsx +++ b/web/src/components/overlay/detail/SearchDetailDialog.tsx @@ -534,7 +534,7 @@ function ObjectSnapshotTab({ /> )} - {search.plus_id !== "not_enabled" && ( + {search.plus_id !== "not_enabled" && search.end_time && (
@@ -553,7 +553,7 @@ function ObjectSnapshotTab({
- {state == "reviewing" && search.end_time && ( + {state == "reviewing" && ( <>