mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-10 10:33:11 +03:00
form tweaks
This commit is contained in:
parent
3b5b4bffb9
commit
ba1d5d42c5
@ -25,7 +25,7 @@ class AudioFilterConfig(FrigateBaseModel):
|
||||
class AudioConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(
|
||||
default=False,
|
||||
title="Enable audio",
|
||||
title="Enable audio detection",
|
||||
description="Enable or disable audio event detection; can be overridden per-camera.",
|
||||
)
|
||||
max_not_heard: int = Field(
|
||||
|
||||
@ -69,12 +69,12 @@ class DetectConfig(FrigateBaseModel):
|
||||
)
|
||||
min_initialized: Optional[int] = Field(
|
||||
default=None,
|
||||
title="Min initialization hits",
|
||||
title="Minimum initialization frames",
|
||||
description="Number of consecutive detection hits required before creating a tracked object. Increase to reduce false initializations. Default value is fps divided by 2.",
|
||||
)
|
||||
max_disappeared: Optional[int] = Field(
|
||||
default=None,
|
||||
title="Max disappeared frames",
|
||||
title="Maximum disappeared frames",
|
||||
description="Number of frames without a detection before a tracked object is considered gone.",
|
||||
)
|
||||
stationary: StationaryConfig = Field(
|
||||
|
||||
@ -124,8 +124,8 @@ class CameraInput(FrigateBaseModel):
|
||||
)
|
||||
global_args: Union[str, list[str]] = Field(
|
||||
default_factory=list,
|
||||
title="FFmpeg args",
|
||||
description="FFmpeg arguments for this input stream.",
|
||||
title="FFmpeg global args",
|
||||
description="FFmpeg global arguments for this input stream.",
|
||||
)
|
||||
hwaccel_args: Union[str, list[str]] = Field(
|
||||
default_factory=list,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"label": "Audio events",
|
||||
"description": "Settings for audio-based event detection; can be overridden per-camera.",
|
||||
"enabled": {
|
||||
"label": "Enable audio",
|
||||
"label": "Enable audio detection",
|
||||
"description": "Enable or disable audio event detection; can be overridden per-camera."
|
||||
},
|
||||
"max_not_heard": {
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
"label": "Audio events",
|
||||
"description": "Settings for audio-based event detection; can be overridden per-camera.",
|
||||
"enabled": {
|
||||
"label": "Enable audio",
|
||||
"label": "Enable audio detection",
|
||||
"description": "Enable or disable audio event detection; can be overridden per-camera."
|
||||
},
|
||||
"max_not_heard": {
|
||||
@ -96,11 +96,11 @@
|
||||
"description": "Desired frames per second to run detection on; lower values reduce CPU usage (recommended value is 5, only set higher - at most 10 - if tracking extremely fast moving objects)."
|
||||
},
|
||||
"min_initialized": {
|
||||
"label": "Min initialization hits",
|
||||
"label": "Minimum initialization frames",
|
||||
"description": "Number of consecutive detection hits required before creating a tracked object. Increase to reduce false initializations. Default value is fps divided by 2."
|
||||
},
|
||||
"max_disappeared": {
|
||||
"label": "Max disappeared frames",
|
||||
"label": "Maximum disappeared frames",
|
||||
"description": "Number of frames without a detection before a tracked object is considered gone."
|
||||
},
|
||||
"stationary": {
|
||||
@ -203,8 +203,8 @@
|
||||
"description": "Roles for this input stream (for example: detect, record, audio)."
|
||||
},
|
||||
"global_args": {
|
||||
"label": "FFmpeg args",
|
||||
"description": "FFmpeg arguments for this input stream."
|
||||
"label": "FFmpeg global args",
|
||||
"description": "FFmpeg global arguments for this input stream."
|
||||
},
|
||||
"hwaccel_args": {
|
||||
"label": "Hardware acceleration args",
|
||||
|
||||
@ -18,11 +18,11 @@
|
||||
"description": "Desired frames per second to run detection on; lower values reduce CPU usage (recommended value is 5, only set higher - at most 10 - if tracking extremely fast moving objects)."
|
||||
},
|
||||
"min_initialized": {
|
||||
"label": "Min initialization hits",
|
||||
"label": "Minimum initialization frames",
|
||||
"description": "Number of consecutive detection hits required before creating a tracked object. Increase to reduce false initializations. Default value is fps divided by 2."
|
||||
},
|
||||
"max_disappeared": {
|
||||
"label": "Max disappeared frames",
|
||||
"label": "Maximum disappeared frames",
|
||||
"description": "Number of frames without a detection before a tracked object is considered gone."
|
||||
},
|
||||
"stationary": {
|
||||
|
||||
@ -53,8 +53,8 @@
|
||||
"description": "Roles for this input stream (for example: detect, record, audio)."
|
||||
},
|
||||
"global_args": {
|
||||
"label": "FFmpeg args",
|
||||
"description": "FFmpeg arguments for this input stream."
|
||||
"label": "FFmpeg global args",
|
||||
"description": "FFmpeg global arguments for this input stream."
|
||||
},
|
||||
"hwaccel_args": {
|
||||
"label": "Hardware acceleration args",
|
||||
|
||||
@ -16,7 +16,7 @@ export const AudioSection = createConfigSection({
|
||||
"num_threads",
|
||||
],
|
||||
fieldGroups: {
|
||||
detection: ["listen", "filters"],
|
||||
detection: ["enabled", "listen", "filters"],
|
||||
sensitivity: ["min_volume", "max_not_heard"],
|
||||
},
|
||||
hiddenFields: ["enabled_in_config"],
|
||||
|
||||
@ -18,7 +18,7 @@ export const DetectSection = createConfigSection({
|
||||
"stationary",
|
||||
],
|
||||
fieldGroups: {
|
||||
resolution: ["width", "height"],
|
||||
resolution: ["enabled", "width", "height"],
|
||||
tracking: ["min_initialized", "max_disappeared"],
|
||||
},
|
||||
hiddenFields: ["enabled_in_config"],
|
||||
|
||||
@ -20,7 +20,7 @@ export const MotionSection = createConfigSection({
|
||||
"mqtt_off_delay",
|
||||
],
|
||||
fieldGroups: {
|
||||
sensitivity: ["threshold", "contour_area"],
|
||||
sensitivity: ["enabled", "threshold", "contour_area"],
|
||||
algorithm: ["improve_contrast", "delta_alpha", "frame_alpha"],
|
||||
},
|
||||
hiddenFields: ["enabled_in_config", "mask", "raw_mask"],
|
||||
|
||||
@ -18,7 +18,7 @@ export const RecordSection = createConfigSection({
|
||||
"export",
|
||||
],
|
||||
fieldGroups: {
|
||||
retention: ["continuous", "motion"],
|
||||
retention: ["enabled", "continuous", "motion"],
|
||||
events: ["alerts", "detections"],
|
||||
},
|
||||
hiddenFields: ["enabled_in_config", "sync_recordings"],
|
||||
|
||||
@ -7,7 +7,7 @@ export const ReviewSection = createConfigSection({
|
||||
sectionPath: "review",
|
||||
i18nNamespace: "config/review",
|
||||
defaultConfig: {
|
||||
fieldOrder: ["alerts", "detections"],
|
||||
fieldOrder: ["alerts", "detections", "genai"],
|
||||
fieldGroups: {},
|
||||
hiddenFields: [
|
||||
"enabled_in_config",
|
||||
@ -20,6 +20,16 @@ export const ReviewSection = createConfigSection({
|
||||
"genai.enabled_in_config",
|
||||
],
|
||||
advancedFields: [],
|
||||
uiSchema: {
|
||||
genai: {
|
||||
additional_concerns: {
|
||||
"ui:widget": "textarea",
|
||||
},
|
||||
activity_context_prompt: {
|
||||
"ui:widget": "textarea",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ export const SnapshotsSection = createConfigSection({
|
||||
"retain",
|
||||
],
|
||||
fieldGroups: {
|
||||
display: ["bounding_box", "crop", "quality", "timestamp"],
|
||||
display: ["enabled", "bounding_box", "crop", "quality", "timestamp"],
|
||||
},
|
||||
hiddenFields: ["enabled_in_config"],
|
||||
advancedFields: ["quality", "retain"],
|
||||
|
||||
@ -8,10 +8,7 @@ export const TimestampSection = createConfigSection({
|
||||
i18nNamespace: "config/timestamp_style",
|
||||
defaultConfig: {
|
||||
fieldOrder: ["position", "format", "color", "thickness"],
|
||||
fieldGroups: {
|
||||
appearance: ["color", "thickness"],
|
||||
},
|
||||
hiddenFields: ["enabled_in_config"],
|
||||
hiddenFields: ["effect", "enabled_in_config"],
|
||||
advancedFields: [],
|
||||
},
|
||||
});
|
||||
|
||||
@ -46,7 +46,9 @@ export function FieldTemplate(props: FieldTemplateProps) {
|
||||
|
||||
// Determine field characteristics
|
||||
const isAdvanced = uiOptions.advanced === true;
|
||||
const isBoolean = schema.type === "boolean";
|
||||
const isBoolean =
|
||||
schema.type === "boolean" ||
|
||||
(Array.isArray(schema.type) && schema.type.includes("boolean"));
|
||||
const isObjectField = schema.type === "object";
|
||||
const isNullableUnion = isNullableUnionSchema(schema as StrictRJSFSchema);
|
||||
const suppressMultiSchema =
|
||||
@ -135,7 +137,7 @@ export function FieldTemplate(props: FieldTemplateProps) {
|
||||
</Label>
|
||||
)}
|
||||
{finalDescription && !isMultiSchemaWrapper && (
|
||||
<p className="max-w-md text-xs text-muted-foreground">
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{finalDescription}
|
||||
</p>
|
||||
)}
|
||||
|
||||
@ -175,7 +175,7 @@ const globalSectionConfigs: Record<
|
||||
telemetry: {
|
||||
i18nNamespace: "config/telemetry",
|
||||
fieldOrder: ["network_interfaces", "stats", "version_check"],
|
||||
advancedFields: ["stats"],
|
||||
advancedFields: [],
|
||||
},
|
||||
birdseye: {
|
||||
i18nNamespace: "config/birdseye",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user