add more config messages

This commit is contained in:
Josh Hawkins 2026-05-07 11:00:51 -05:00
parent beeb7f1331
commit 425fc95e04
6 changed files with 70 additions and 4 deletions

View File

@ -1651,7 +1651,8 @@
"review": { "review": {
"recordDisabled": "Recording is disabled, review items will not be generated.", "recordDisabled": "Recording is disabled, review items will not be generated.",
"detectDisabled": "Object detection is disabled. Review items require detected objects to categorize alerts and detections.", "detectDisabled": "Object detection is disabled. Review items require detected objects to categorize alerts and detections.",
"allNonAlertDetections": "All non-alert activity will be included as detections." "allNonAlertDetections": "All non-alert activity will be included as detections.",
"genaiImageSourceRecordingsRecordDisabled": "Image source is set to 'recordings', but recording is disabled. Frigate will fall back to preview images."
}, },
"audio": { "audio": {
"noAudioRole": "No streams have the audio role defined. You must enable the audio role for audio detection to function." "noAudioRole": "No streams have the audio role defined. You must enable the audio role for audio detection to function."
@ -1660,18 +1661,21 @@
"audioDetectionDisabled": "Audio detection is not enabled for this camera. Audio transcription requires audio detection to be active." "audioDetectionDisabled": "Audio detection is not enabled for this camera. Audio transcription requires audio detection to be active."
}, },
"detect": { "detect": {
"fpsGreaterThanFive": "Setting the detect FPS higher than 5 is not recommended. Higher values may cause performance issues and will not provide any benefit." "fpsGreaterThanFive": "Setting the detect FPS higher than 5 is not recommended. Higher values may cause performance issues and will not provide any benefit.",
"disabled": "Object detection is disabled. Snapshots, review items, and enrichments such as face recognition, license plate recognition, and Generative AI will not function."
}, },
"objects": { "objects": {
"genaiNoDescriptionsProvider": "You must configure a GenAI provider with the 'descriptions' role for descriptions to be generated." "genaiNoDescriptionsProvider": "You must configure a GenAI provider with the 'descriptions' role for descriptions to be generated."
}, },
"faceRecognition": { "faceRecognition": {
"globalDisabled": "The face recognition enrichment must be enabled for face recognition features to function on this camera.", "globalDisabled": "The face recognition enrichment must be enabled for face recognition features to function on this camera.",
"personNotTracked": "Face recognition requires the 'person' object to be tracked. Enable 'person' in Objects for this camera." "personNotTracked": "Face recognition requires the 'person' object to be tracked. Enable 'person' in Objects for this camera.",
"modelSizeLarge": "The 'large' model requires a GPU or NPU for reasonable performance. Use 'small' on CPU-only systems."
}, },
"lpr": { "lpr": {
"globalDisabled": "The license plate recognition enrichment must be enabled for LPR features to function on this camera.", "globalDisabled": "The license plate recognition enrichment must be enabled for LPR features to function on this camera.",
"vehicleNotTracked": "License plate recognition requires 'car' or 'motorcycle' to be tracked. Enable 'car' or 'motorcycle' in Objects for this camera." "vehicleNotTracked": "License plate recognition requires 'car' or 'motorcycle' to be tracked. Enable 'car' or 'motorcycle' in Objects for this camera.",
"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."
@ -1685,6 +1689,9 @@
"detectors": { "detectors": {
"mixedTypes": "All detectors must use the same type. Remove existing detectors to use a different type.", "mixedTypes": "All detectors must use the same type. Remove existing detectors to use a different type.",
"mixedTypesSuggestion": "All detectors must use the same type. Remove existing detectors or select {{type}}." "mixedTypesSuggestion": "All detectors must use the same type. Remove existing detectors or select {{type}}."
},
"semanticSearch": {
"jinav2SmallModelSize": "The 'small' size with the Jina V2 model has high RAM and inference cost. The 'large' model with a discrete GPU is recommended."
} }
} }
} }

View File

@ -3,6 +3,15 @@ import type { SectionConfigOverrides } from "./types";
const detect: SectionConfigOverrides = { const detect: SectionConfigOverrides = {
base: { base: {
sectionDocs: "/configuration/camera_specific", sectionDocs: "/configuration/camera_specific",
messages: [
{
key: "detect-disabled",
messageKey: "configMessages.detect.disabled",
severity: "warning",
condition: (ctx) =>
ctx.level === "camera" && ctx.formData?.enabled === false,
},
],
fieldMessages: [ fieldMessages: [
{ {
key: "fps-greater-than-five", key: "fps-greater-than-five",

View File

@ -53,6 +53,16 @@ const faceRecognition: SectionConfigOverrides = {
"device", "device",
], ],
restartRequired: ["enabled", "model_size", "device"], restartRequired: ["enabled", "model_size", "device"],
fieldMessages: [
{
key: "model-size-large",
field: "model_size",
messageKey: "configMessages.faceRecognition.modelSizeLarge",
severity: "info",
position: "after",
condition: (ctx) => ctx.formData?.model_size === "large",
},
],
uiSchema: { uiSchema: {
model_size: { model_size: {
"ui:options": { size: "xs" }, "ui:options": { size: "xs" },

View File

@ -65,6 +65,16 @@ const lpr: SectionConfigOverrides = {
"replace_rules", "replace_rules",
], ],
restartRequired: ["model_size", "enhancement", "device"], restartRequired: ["model_size", "enhancement", "device"],
fieldMessages: [
{
key: "model-size-large",
field: "model_size",
messageKey: "configMessages.lpr.modelSizeLarge",
severity: "info",
position: "after",
condition: (ctx) => ctx.formData?.model_size === "large",
},
],
uiSchema: { uiSchema: {
format: { format: {
"ui:options": { size: "md" }, "ui:options": { size: "md" },

View File

@ -55,6 +55,24 @@ const review: SectionConfigOverrides = {
); );
}, },
}, },
{
key: "genai-image-source-recordings-record-disabled",
field: "genai.image_source",
messageKey:
"configMessages.review.genaiImageSourceRecordingsRecordDisabled",
severity: "warning",
position: "after",
condition: (ctx) => {
const genai = ctx.formData?.genai as
| Record<string, unknown>
| undefined;
if (genai?.image_source !== "recordings") return false;
if (ctx.level === "camera" && ctx.fullCameraConfig) {
return ctx.fullCameraConfig.record?.enabled === false;
}
return ctx.fullConfig.record?.enabled === false;
},
},
], ],
fieldDocs: { fieldDocs: {
"alerts.labels": "/configuration/review/#alerts-and-detections", "alerts.labels": "/configuration/review/#alerts-and-detections",

View File

@ -18,6 +18,18 @@ const semanticSearch: SectionConfigOverrides = {
advancedFields: ["reindex", "device"], advancedFields: ["reindex", "device"],
restartRequired: ["enabled", "model", "model_size", "device"], restartRequired: ["enabled", "model", "model_size", "device"],
hiddenFields: ["reindex"], hiddenFields: ["reindex"],
fieldMessages: [
{
key: "jinav2-small-model-size",
field: "model_size",
messageKey: "configMessages.semanticSearch.jinav2SmallModelSize",
severity: "warning",
position: "after",
condition: (ctx) =>
ctx.formData?.model === "jinav2" &&
ctx.formData?.model_size === "small",
},
],
uiSchema: { uiSchema: {
model: { model: {
"ui:widget": "semanticSearchModel", "ui:widget": "semanticSearchModel",