mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-03 22:04:53 +03:00
add a basic set of messages
This commit is contained in:
parent
78ea005724
commit
6ee5e70005
@ -1609,13 +1609,34 @@
|
|||||||
},
|
},
|
||||||
"configMessages": {
|
"configMessages": {
|
||||||
"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."
|
||||||
},
|
},
|
||||||
"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."
|
||||||
},
|
},
|
||||||
|
"audioTranscription": {
|
||||||
|
"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."
|
"fpsGreaterThanFive": "Setting the detect FPS higher than 5 is not recommended."
|
||||||
|
},
|
||||||
|
"faceRecognition": {
|
||||||
|
"globalDisabled": "Face recognition is not enabled at the global level. Enable it in global settings for camera-level face recognition to function.",
|
||||||
|
"personNotTracked": "Face recognition requires the 'person' object to be tracked. Ensure 'person' is in the object tracking list."
|
||||||
|
},
|
||||||
|
"lpr": {
|
||||||
|
"globalDisabled": "License plate recognition is not enabled at the global level. Enable it in global settings for camera-level LPR to function.",
|
||||||
|
"vehicleNotTracked": "License plate recognition requires 'car' or 'motorcycle' to be tracked."
|
||||||
|
},
|
||||||
|
"record": {
|
||||||
|
"noRecordRole": "No streams have the record role defined. Recording will not function."
|
||||||
|
},
|
||||||
|
"birdseye": {
|
||||||
|
"objectsModeDetectDisabled": "Birdseye is set to 'objects' mode, but object detection is disabled for this camera. The camera will not appear in Birdseye."
|
||||||
|
},
|
||||||
|
"snapshots": {
|
||||||
|
"detectDisabled": "Object detection is disabled. Snapshots are generated from tracked objects and will not be created."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,12 +36,12 @@ export function ConfigMessageBanner({ messages }: ConfigMessageBannerProps) {
|
|||||||
if (messages.length === 0) return null;
|
if (messages.length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="space-y-2">
|
<div className="max-w-5xl space-y-2">
|
||||||
{messages.map((msg) => (
|
{messages.map((msg) => (
|
||||||
<Alert
|
<Alert
|
||||||
key={msg.key}
|
key={msg.key}
|
||||||
variant={severityVariantMap[msg.severity]}
|
variant={severityVariantMap[msg.severity]}
|
||||||
className="flex items-center [&>svg]:static [&>svg~*]:pl-2 [&>svg+div]:translate-y-0"
|
className="flex items-center [&>svg+div]:translate-y-0 [&>svg]:static [&>svg~*]:pl-2"
|
||||||
>
|
>
|
||||||
<SeverityIcon severity={msg.severity} />
|
<SeverityIcon severity={msg.severity} />
|
||||||
<AlertDescription>{t(msg.messageKey)}</AlertDescription>
|
<AlertDescription>{t(msg.messageKey)}</AlertDescription>
|
||||||
|
|||||||
@ -3,6 +3,19 @@ import type { SectionConfigOverrides } from "./types";
|
|||||||
const audioTranscription: SectionConfigOverrides = {
|
const audioTranscription: SectionConfigOverrides = {
|
||||||
base: {
|
base: {
|
||||||
sectionDocs: "/configuration/audio_detectors#audio-transcription",
|
sectionDocs: "/configuration/audio_detectors#audio-transcription",
|
||||||
|
messages: [
|
||||||
|
{
|
||||||
|
key: "audio-detection-disabled",
|
||||||
|
messageKey: "configMessages.audioTranscription.audioDetectionDisabled",
|
||||||
|
severity: "warning",
|
||||||
|
condition: (ctx) => {
|
||||||
|
if (ctx.level === "camera" && ctx.fullCameraConfig) {
|
||||||
|
return ctx.fullCameraConfig.audio.enabled === false;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
restartRequired: [],
|
restartRequired: [],
|
||||||
fieldOrder: ["enabled", "language", "device", "model_size"],
|
fieldOrder: ["enabled", "language", "device", "model_size"],
|
||||||
hiddenFields: ["enabled_in_config", "live_enabled"],
|
hiddenFields: ["enabled_in_config", "live_enabled"],
|
||||||
|
|||||||
@ -3,6 +3,20 @@ import type { SectionConfigOverrides } from "./types";
|
|||||||
const birdseye: SectionConfigOverrides = {
|
const birdseye: SectionConfigOverrides = {
|
||||||
base: {
|
base: {
|
||||||
sectionDocs: "/configuration/birdseye",
|
sectionDocs: "/configuration/birdseye",
|
||||||
|
messages: [
|
||||||
|
{
|
||||||
|
key: "objects-mode-detect-disabled",
|
||||||
|
messageKey: "configMessages.birdseye.objectsModeDetectDisabled",
|
||||||
|
severity: "info",
|
||||||
|
condition: (ctx) => {
|
||||||
|
if (ctx.level !== "camera" || !ctx.fullCameraConfig) return false;
|
||||||
|
return (
|
||||||
|
ctx.formData?.mode === "objects" &&
|
||||||
|
ctx.fullCameraConfig.detect?.enabled === false
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
restartRequired: [],
|
restartRequired: [],
|
||||||
fieldOrder: ["enabled", "mode", "order"],
|
fieldOrder: ["enabled", "mode", "order"],
|
||||||
hiddenFields: [],
|
hiddenFields: [],
|
||||||
|
|||||||
@ -3,6 +3,26 @@ import type { SectionConfigOverrides } from "./types";
|
|||||||
const faceRecognition: SectionConfigOverrides = {
|
const faceRecognition: SectionConfigOverrides = {
|
||||||
base: {
|
base: {
|
||||||
sectionDocs: "/configuration/face_recognition",
|
sectionDocs: "/configuration/face_recognition",
|
||||||
|
messages: [
|
||||||
|
{
|
||||||
|
key: "global-disabled",
|
||||||
|
messageKey: "configMessages.faceRecognition.globalDisabled",
|
||||||
|
severity: "warning",
|
||||||
|
condition: (ctx) => {
|
||||||
|
if (ctx.level !== "camera") return false;
|
||||||
|
return ctx.fullConfig.face_recognition?.enabled === false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "person-not-tracked",
|
||||||
|
messageKey: "configMessages.faceRecognition.personNotTracked",
|
||||||
|
severity: "info",
|
||||||
|
condition: (ctx) => {
|
||||||
|
if (ctx.level !== "camera" || !ctx.fullCameraConfig) return false;
|
||||||
|
return !ctx.fullCameraConfig.objects?.track?.includes("person");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
restartRequired: [],
|
restartRequired: [],
|
||||||
fieldOrder: ["enabled", "min_area"],
|
fieldOrder: ["enabled", "min_area"],
|
||||||
hiddenFields: [],
|
hiddenFields: [],
|
||||||
|
|||||||
@ -3,6 +3,28 @@ import type { SectionConfigOverrides } from "./types";
|
|||||||
const lpr: SectionConfigOverrides = {
|
const lpr: SectionConfigOverrides = {
|
||||||
base: {
|
base: {
|
||||||
sectionDocs: "/configuration/license_plate_recognition",
|
sectionDocs: "/configuration/license_plate_recognition",
|
||||||
|
messages: [
|
||||||
|
{
|
||||||
|
key: "global-disabled",
|
||||||
|
messageKey: "configMessages.lpr.globalDisabled",
|
||||||
|
severity: "warning",
|
||||||
|
condition: (ctx) => {
|
||||||
|
if (ctx.level !== "camera") return false;
|
||||||
|
return ctx.fullConfig.lpr?.enabled === false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "vehicle-not-tracked",
|
||||||
|
messageKey: "configMessages.lpr.vehicleNotTracked",
|
||||||
|
severity: "info",
|
||||||
|
condition: (ctx) => {
|
||||||
|
if (ctx.level !== "camera" || !ctx.fullCameraConfig) return false;
|
||||||
|
if (ctx.fullCameraConfig.type === "lpr") return false;
|
||||||
|
const tracked = ctx.fullCameraConfig.objects?.track ?? [];
|
||||||
|
return !tracked.some((o) => ["car", "motorcycle"].includes(o));
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
fieldDocs: {
|
fieldDocs: {
|
||||||
enhancement: "/configuration/license_plate_recognition#enhancement",
|
enhancement: "/configuration/license_plate_recognition#enhancement",
|
||||||
},
|
},
|
||||||
|
|||||||
@ -3,6 +3,19 @@ import type { SectionConfigOverrides } from "./types";
|
|||||||
const record: SectionConfigOverrides = {
|
const record: SectionConfigOverrides = {
|
||||||
base: {
|
base: {
|
||||||
sectionDocs: "/configuration/record",
|
sectionDocs: "/configuration/record",
|
||||||
|
messages: [
|
||||||
|
{
|
||||||
|
key: "no-record-role",
|
||||||
|
messageKey: "configMessages.record.noRecordRole",
|
||||||
|
severity: "warning",
|
||||||
|
condition: (ctx) => {
|
||||||
|
if (ctx.level !== "camera" || !ctx.fullCameraConfig) return false;
|
||||||
|
return !ctx.fullCameraConfig.ffmpeg?.inputs?.some((i) =>
|
||||||
|
i.roles?.includes("record"),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
restartRequired: [],
|
restartRequired: [],
|
||||||
fieldOrder: [
|
fieldOrder: [
|
||||||
"enabled",
|
"enabled",
|
||||||
|
|||||||
@ -15,6 +15,17 @@ const review: SectionConfigOverrides = {
|
|||||||
return ctx.fullConfig.record?.enabled === false;
|
return ctx.fullConfig.record?.enabled === false;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: "detect-disabled",
|
||||||
|
messageKey: "configMessages.review.detectDisabled",
|
||||||
|
severity: "info",
|
||||||
|
condition: (ctx) => {
|
||||||
|
if (ctx.level === "camera" && ctx.fullCameraConfig) {
|
||||||
|
return ctx.fullCameraConfig.detect?.enabled === false;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
fieldDocs: {
|
fieldDocs: {
|
||||||
"alerts.labels": "/configuration/review/#alerts-and-detections",
|
"alerts.labels": "/configuration/review/#alerts-and-detections",
|
||||||
|
|||||||
@ -3,6 +3,17 @@ import type { SectionConfigOverrides } from "./types";
|
|||||||
const snapshots: SectionConfigOverrides = {
|
const snapshots: SectionConfigOverrides = {
|
||||||
base: {
|
base: {
|
||||||
sectionDocs: "/configuration/snapshots",
|
sectionDocs: "/configuration/snapshots",
|
||||||
|
messages: [
|
||||||
|
{
|
||||||
|
key: "detect-disabled",
|
||||||
|
messageKey: "configMessages.snapshots.detectDisabled",
|
||||||
|
severity: "info",
|
||||||
|
condition: (ctx) => {
|
||||||
|
if (ctx.level !== "camera" || !ctx.fullCameraConfig) return false;
|
||||||
|
return ctx.fullCameraConfig.detect?.enabled === false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
restartRequired: [],
|
restartRequired: [],
|
||||||
fieldOrder: [
|
fieldOrder: [
|
||||||
"enabled",
|
"enabled",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user