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

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:
Josh Hawkins
2026-09-13 11:53:44 -06:00
committed by GitHub
parent 51171319a4
commit b02aea03cd
5 changed files with 40 additions and 2 deletions
@@ -8,6 +8,23 @@ const notifications: SectionConfigOverrides = {
fieldGroups: {},
hiddenFields: ["enabled_in_config"],
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: {
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: {
"alerts.pre_capture":
"/configuration/record#pre-capture-and-post-capture",
@@ -8,6 +8,7 @@ export type MessageConditionContext = {
fullCameraConfig?: CameraConfig;
level: "global" | "camera";
cameraName?: string;
profileName?: string;
formData: ConfigSectionData;
};
@@ -619,9 +619,10 @@ export function ConfigSection({
: undefined,
level: effectiveLevel,
cameraName,
profileName,
formData: currentFormData as ConfigSectionData,
};
}, [config, currentFormData, effectiveLevel, cameraName]);
}, [config, currentFormData, effectiveLevel, cameraName, profileName]);
const { activeMessages, activeFieldMessages } = useConfigMessages(
sectionConfig.messages,