mirror of
https://github.com/alexhopeoconnor/frigate.git
synced 2026-10-22 11:17:50 +10:00
Add object classification attributes to Tracked Object Details (#21348)
* attributes endpoint * event endpoints * add attributes to more filters * add to suggestions and query in explore * support attributes in search input * i18n * add object type filter to endpoint * add attributes to tracked object details pane * add generic multi select dialog * save object attributes endpoint * add group by param to fetch attributes endpoint * add attribute editing to tracked object details * docs * fix docs * update openapi spec to match python
This commit is contained in:
@@ -143,6 +143,13 @@ export default function SearchView({
|
||||
}, [config, searchFilter, allowedCameras]);
|
||||
|
||||
const { data: allSubLabels } = useSWR("sub_labels");
|
||||
const hasCustomClassificationModels = useMemo(
|
||||
() => Object.keys(config?.classification?.custom ?? {}).length > 0,
|
||||
[config],
|
||||
);
|
||||
const { data: allAttributes } = useSWR(
|
||||
hasCustomClassificationModels ? "classification/attributes" : null,
|
||||
);
|
||||
const { data: allRecognizedLicensePlates } = useSWR(
|
||||
"recognized_license_plates",
|
||||
);
|
||||
@@ -182,6 +189,7 @@ export default function SearchView({
|
||||
labels: Object.values(allLabels || {}),
|
||||
zones: Object.values(allZones || {}),
|
||||
sub_labels: allSubLabels,
|
||||
...(hasCustomClassificationModels && { attributes: allAttributes }),
|
||||
search_type: ["thumbnail", "description"] as SearchSource[],
|
||||
time_range:
|
||||
config?.ui.time_format == "24hour"
|
||||
@@ -204,9 +212,11 @@ export default function SearchView({
|
||||
allLabels,
|
||||
allZones,
|
||||
allSubLabels,
|
||||
allAttributes,
|
||||
allRecognizedLicensePlates,
|
||||
searchFilter,
|
||||
allowedCameras,
|
||||
hasCustomClassificationModels,
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user