mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-10 08:42:49 +03:00
add field messages for recording and notifications (#24272)
CI / AMD64 Build (push) Canceled after 0s
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s
CI / AMD64 Build (push) Canceled after 0s
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s
recording and notifications require enabled_in_config to be true at startup to build the correct ffmpeg commands and start the notifications worker
This commit is contained in:
@@ -1952,7 +1952,11 @@
|
|||||||
"modelSizeLarge": "The 'large' model is optimized for multi-line license plates. The 'small' model provides better performance over 'large' and should be used unless your region uses multi-line plate formats."
|
"modelSizeLarge": "The 'large' model is optimized for multi-line license plates. The 'small' model provides better performance over 'large' and should be used unless your region uses multi-line plate formats."
|
||||||
},
|
},
|
||||||
"record": {
|
"record": {
|
||||||
"noRecordRole": "No streams have the record role defined. Recording will not function."
|
"noRecordRole": "No streams have the record role defined. Recording will not function.",
|
||||||
|
"profileBaseDisabled": "Recording is disabled in this camera's base config, so enabling it in a profile has no effect. Enable recording in the base config and use a profile to disable it instead."
|
||||||
|
},
|
||||||
|
"notifications": {
|
||||||
|
"profileBaseDisabled": "No cameras have notifications enabled in their base config, so enabling them in a profile has no effect. Enable notifications in the base config of at least one camera."
|
||||||
},
|
},
|
||||||
"birdseye": {
|
"birdseye": {
|
||||||
"objectsModeDetectDisabled": "Birdseye is set to 'objects' mode, but object detection is disabled for this camera. The camera will not appear in Birdseye."
|
"objectsModeDetectDisabled": "Birdseye is set to 'objects' mode, but object detection is disabled for this camera. The camera will not appear in Birdseye."
|
||||||
|
|||||||
@@ -8,6 +8,23 @@ const notifications: SectionConfigOverrides = {
|
|||||||
fieldGroups: {},
|
fieldGroups: {},
|
||||||
hiddenFields: ["enabled_in_config"],
|
hiddenFields: ["enabled_in_config"],
|
||||||
advancedFields: [],
|
advancedFields: [],
|
||||||
|
fieldMessages: [
|
||||||
|
{
|
||||||
|
key: "profile-base-notifications-disabled",
|
||||||
|
field: "enabled",
|
||||||
|
messageKey: "configMessages.notifications.profileBaseDisabled",
|
||||||
|
severity: "warning",
|
||||||
|
position: "after",
|
||||||
|
condition: (ctx) =>
|
||||||
|
!!ctx.profileName &&
|
||||||
|
ctx.formData?.enabled === true &&
|
||||||
|
!Object.values(ctx.fullConfig.cameras).some(
|
||||||
|
(camera) =>
|
||||||
|
camera.enabled_in_config &&
|
||||||
|
camera.notifications.enabled_in_config,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
global: {
|
global: {
|
||||||
uiSchema: {
|
uiSchema: {
|
||||||
|
|||||||
@@ -16,6 +16,21 @@ const record: SectionConfigOverrides = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
fieldMessages: [
|
||||||
|
{
|
||||||
|
key: "profile-base-record-disabled",
|
||||||
|
field: "enabled",
|
||||||
|
messageKey: "configMessages.record.profileBaseDisabled",
|
||||||
|
severity: "warning",
|
||||||
|
position: "after",
|
||||||
|
docLink:
|
||||||
|
"/configuration/profiles#why-cant-a-profile-enable-recording-when-its-disabled-in-the-base-config",
|
||||||
|
condition: (ctx) =>
|
||||||
|
!!ctx.profileName &&
|
||||||
|
ctx.formData?.enabled === true &&
|
||||||
|
ctx.fullCameraConfig?.record.enabled_in_config === false,
|
||||||
|
},
|
||||||
|
],
|
||||||
fieldDocs: {
|
fieldDocs: {
|
||||||
"alerts.pre_capture":
|
"alerts.pre_capture":
|
||||||
"/configuration/record#pre-capture-and-post-capture",
|
"/configuration/record#pre-capture-and-post-capture",
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export type MessageConditionContext = {
|
|||||||
fullCameraConfig?: CameraConfig;
|
fullCameraConfig?: CameraConfig;
|
||||||
level: "global" | "camera";
|
level: "global" | "camera";
|
||||||
cameraName?: string;
|
cameraName?: string;
|
||||||
|
profileName?: string;
|
||||||
formData: ConfigSectionData;
|
formData: ConfigSectionData;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -619,9 +619,10 @@ export function ConfigSection({
|
|||||||
: undefined,
|
: undefined,
|
||||||
level: effectiveLevel,
|
level: effectiveLevel,
|
||||||
cameraName,
|
cameraName,
|
||||||
|
profileName,
|
||||||
formData: currentFormData as ConfigSectionData,
|
formData: currentFormData as ConfigSectionData,
|
||||||
};
|
};
|
||||||
}, [config, currentFormData, effectiveLevel, cameraName]);
|
}, [config, currentFormData, effectiveLevel, cameraName, profileName]);
|
||||||
|
|
||||||
const { activeMessages, activeFieldMessages } = useConfigMessages(
|
const { activeMessages, activeFieldMessages } = useConfigMessages(
|
||||||
sectionConfig.messages,
|
sectionConfig.messages,
|
||||||
|
|||||||
Reference in New Issue
Block a user