mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-06-29 08:31:27 +03:00
siimplify object filters handling
live updating was getting very messy. users will just need to save once they enable a new object in order to see filters for that object
This commit is contained in:
parent
feff214d73
commit
bbc79f98c2
@ -521,11 +521,7 @@ export function ConfigSection({
|
|||||||
setPendingOverrides(undefined);
|
setPendingOverrides(undefined);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const sanitizedData = synthesizeMissingObjectFilters(
|
const sanitizedData = sanitizeSectionData(data as ConfigSectionData);
|
||||||
sectionPath,
|
|
||||||
sanitizeSectionData(data as ConfigSectionData),
|
|
||||||
modifiedSchema ?? undefined,
|
|
||||||
) as ConfigSectionData;
|
|
||||||
const nextBaselineFormData = baselineSnapshot;
|
const nextBaselineFormData = baselineSnapshot;
|
||||||
const overrides = buildOverrides(
|
const overrides = buildOverrides(
|
||||||
sanitizedData,
|
sanitizedData,
|
||||||
@ -565,8 +561,6 @@ export function ConfigSection({
|
|||||||
setPendingOverrides,
|
setPendingOverrides,
|
||||||
setDirtyOverrides,
|
setDirtyOverrides,
|
||||||
baselineSnapshot,
|
baselineSnapshot,
|
||||||
sectionPath,
|
|
||||||
modifiedSchema,
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -109,7 +109,7 @@ export function getEffectiveDefaultsForSection(
|
|||||||
* Add default filter entries for any label in `objects.track` that isn't
|
* Add default filter entries for any label in `objects.track` that isn't
|
||||||
* already in `objects.filters`, so each tracked label gets a collapsible.
|
* already in `objects.filters`, so each tracked label gets a collapsible.
|
||||||
* The backend only auto-populates filters at config init, not after profile
|
* The backend only auto-populates filters at config init, not after profile
|
||||||
* merges or live track edits.
|
* merges.
|
||||||
*/
|
*/
|
||||||
export function synthesizeMissingObjectFilters(
|
export function synthesizeMissingObjectFilters(
|
||||||
sectionPath: string,
|
sectionPath: string,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user