diff --git a/web/src/components/input/InputWithTags.tsx b/web/src/components/input/InputWithTags.tsx index 45dfd6c32..29a6f8a31 100644 --- a/web/src/components/input/InputWithTags.tsx +++ b/web/src/components/input/InputWithTags.tsx @@ -296,6 +296,14 @@ export default function InputWithTags({ ); } break; + case "has_snapshot": + if (!newFilters.has_snapshot) newFilters.has_snapshot = undefined; + newFilters.has_snapshot = value == "yes" ? 1 : 0; + break; + case "has_clip": + if (!newFilters.has_clip) newFilters.has_clip = undefined; + newFilters.has_clip = value == "yes" ? 1 : 0; + break; case "event_id": newFilters.event_id = value; break; @@ -341,6 +349,8 @@ export default function InputWithTags({ }`; } else if (filterType === "min_score" || filterType === "max_score") { return Math.round(Number(filterValues) * 100).toString() + "%"; + } else if (filterType === "has_clip" || filterType === "has_snapshot") { + return filterValues ? "Yes" : "No"; } else { return filterValues as string; } diff --git a/web/src/views/search/SearchView.tsx b/web/src/views/search/SearchView.tsx index 07842fed6..4b84d0ac5 100644 --- a/web/src/views/search/SearchView.tsx +++ b/web/src/views/search/SearchView.tsx @@ -153,6 +153,8 @@ export default function SearchView({ after: [formatDateToLocaleString(-5)], min_score: ["50"], max_score: ["100"], + has_clip: ["yes", "no"], + has_snapshot: ["yes", "no"], }), [config, allLabels, allZones, allSubLabels], );