Files
frigate/web/src/components/config-form/section-configs/detect.ts
T

78 lines
1.8 KiB
TypeScript
Raw Normal View History

2026-02-27 09:55:36 -06:00
import type { SectionConfigOverrides } from "./types";
const detect: SectionConfigOverrides = {
base: {
sectionDocs: "/configuration/camera_specific",
2026-05-07 13:23:02 -05:00
messages: [
{
key: "detect-disabled",
messageKey: "configMessages.detect.disabled",
severity: "info",
condition: (ctx) =>
ctx.level === "camera" && ctx.formData?.enabled === false,
},
],
2026-03-29 16:25:40 -05:00
fieldMessages: [
{
key: "fps-greater-than-five",
field: "fps",
messageKey: "configMessages.detect.fpsGreaterThanFive",
severity: "info",
position: "after",
condition: (ctx) => {
if (ctx.level !== "camera" || !ctx.fullCameraConfig) return false;
2026-05-06 11:01:50 -05:00
if (ctx.fullCameraConfig.type === "lpr") return false;
2026-03-29 16:25:40 -05:00
const detectFps = ctx.formData?.fps as number | undefined;
const streamFps = ctx.fullCameraConfig.detect?.fps;
return detectFps != null && streamFps != null && detectFps > 5;
},
},
],
2026-02-27 09:55:36 -06:00
fieldOrder: [
"enabled",
"width",
"height",
"fps",
"min_initialized",
"max_disappeared",
"annotation_offset",
"stationary",
"interval",
"threshold",
"max_frames",
],
restartRequired: [],
fieldGroups: {
2026-03-20 08:24:34 -05:00
resolution: ["width", "height", "fps"],
2026-02-27 09:55:36 -06:00
tracking: ["min_initialized", "max_disappeared"],
},
hiddenFields: ["enabled_in_config"],
advancedFields: [
"min_initialized",
"max_disappeared",
"annotation_offset",
"stationary",
],
},
global: {
2026-03-08 12:27:53 -05:00
restartRequired: [
"fps",
"width",
"height",
"min_initialized",
"max_disappeared",
],
2026-02-27 09:55:36 -06:00
},
camera: {
2026-03-08 12:27:53 -05:00
restartRequired: [
"fps",
"width",
"height",
"min_initialized",
"max_disappeared",
],
2026-02-27 09:55:36 -06:00
},
};
export default detect;