2026-02-27 18:55:36 +03:00
|
|
|
import type { SectionConfigOverrides } from "./types";
|
|
|
|
|
|
|
|
|
|
const review: SectionConfigOverrides = {
|
|
|
|
|
base: {
|
|
|
|
|
sectionDocs: "/configuration/review",
|
2026-03-30 00:25:40 +03:00
|
|
|
messages: [
|
|
|
|
|
{
|
|
|
|
|
key: "record-disabled",
|
|
|
|
|
messageKey: "configMessages.review.recordDisabled",
|
|
|
|
|
severity: "warning",
|
|
|
|
|
condition: (ctx) => {
|
|
|
|
|
if (ctx.level === "camera" && ctx.fullCameraConfig) {
|
|
|
|
|
return ctx.fullCameraConfig.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;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
fieldMessages: [
|
|
|
|
|
{
|
|
|
|
|
key: "detections-all-non-alert",
|
|
|
|
|
field: "detections.labels",
|
|
|
|
|
messageKey: "configMessages.review.allNonAlertDetections",
|
|
|
|
|
severity: "info",
|
|
|
|
|
position: "after",
|
|
|
|
|
condition: (ctx) => {
|
|
|
|
|
const labels = (
|
|
|
|
|
ctx.formData?.detections as Record<string, unknown> | undefined
|
|
|
|
|
)?.labels;
|
|
|
|
|
return !Array.isArray(labels) || labels.length === 0;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
2026-03-27 17:45:50 +03:00
|
|
|
fieldDocs: {
|
|
|
|
|
"alerts.labels": "/configuration/review/#alerts-and-detections",
|
|
|
|
|
"detections.labels": "/configuration/review/#alerts-and-detections",
|
2026-04-20 16:19:09 +03:00
|
|
|
genai: "/configuration/genai/genai_review",
|
|
|
|
|
"genai.image_source": "/configuration/genai/genai_review#image-source",
|
|
|
|
|
"genai.additional_concerns":
|
|
|
|
|
"/configuration/genai/genai_review#additional-concerns",
|
2026-03-27 17:45:50 +03:00
|
|
|
},
|
2026-02-27 18:55:36 +03:00
|
|
|
restartRequired: [],
|
2026-04-04 01:46:43 +03:00
|
|
|
fieldOrder: ["alerts", "detections", "genai", "genai.enabled"],
|
2026-02-27 18:55:36 +03:00
|
|
|
fieldGroups: {},
|
|
|
|
|
hiddenFields: [
|
|
|
|
|
"enabled_in_config",
|
|
|
|
|
"alerts.enabled_in_config",
|
|
|
|
|
"detections.enabled_in_config",
|
|
|
|
|
"genai.enabled_in_config",
|
|
|
|
|
],
|
|
|
|
|
advancedFields: [],
|
|
|
|
|
uiSchema: {
|
|
|
|
|
alerts: {
|
|
|
|
|
"ui:before": { render: "CameraReviewStatusToggles" },
|
2026-03-27 17:45:50 +03:00
|
|
|
labels: {
|
|
|
|
|
"ui:widget": "reviewLabels",
|
|
|
|
|
"ui:options": {
|
|
|
|
|
suppressMultiSchema: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-02-27 18:55:36 +03:00
|
|
|
required_zones: {
|
|
|
|
|
"ui:widget": "hidden",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
detections: {
|
2026-03-27 17:45:50 +03:00
|
|
|
labels: {
|
|
|
|
|
"ui:widget": "reviewLabels",
|
|
|
|
|
"ui:options": {
|
|
|
|
|
suppressMultiSchema: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-02-27 18:55:36 +03:00
|
|
|
required_zones: {
|
|
|
|
|
"ui:widget": "hidden",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
genai: {
|
|
|
|
|
additional_concerns: {
|
2026-03-26 21:47:24 +03:00
|
|
|
"ui:widget": "ArrayAsTextWidget",
|
2026-02-27 18:55:36 +03:00
|
|
|
"ui:options": {
|
|
|
|
|
size: "full",
|
2026-03-26 21:47:24 +03:00
|
|
|
multiline: true,
|
2026-02-27 18:55:36 +03:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
activity_context_prompt: {
|
|
|
|
|
"ui:widget": "textarea",
|
|
|
|
|
"ui:options": {
|
|
|
|
|
size: "full",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
global: {
|
2026-03-06 23:45:39 +03:00
|
|
|
restartRequired: [],
|
2026-02-27 18:55:36 +03:00
|
|
|
},
|
|
|
|
|
camera: {
|
|
|
|
|
restartRequired: [],
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default review;
|