Improve System Health pane (#24188)

* build out system health pane

* tweaks

* fixes

* fix notice link so it opens the correct camera

* tweak language
This commit is contained in:
Josh Hawkins
2026-09-12 07:30:04 -06:00
committed by Nicolas Mowen
parent 6d33b31bc6
commit 70ce193e09
57 changed files with 3965 additions and 464 deletions
@@ -6,6 +6,7 @@ const audio: SectionConfigOverrides = {
messages: [
{
key: "no-audio-role",
health: (ctx) => ctx.fullCameraConfig?.audio?.enabled === true,
messageKey: "configMessages.audio.noAudioRole",
severity: "warning",
condition: (ctx) => {
@@ -6,6 +6,8 @@ const audioTranscription: SectionConfigOverrides = {
messages: [
{
key: "audio-detection-disabled",
health: (ctx) =>
ctx.fullCameraConfig?.audio_transcription?.enabled === true,
messageKey: "configMessages.audioTranscription.audioDetectionDisabled",
severity: "warning",
condition: (ctx) => {
@@ -15,6 +15,7 @@ const detect: SectionConfigOverrides = {
fieldMessages: [
{
key: "detect-resolution-not-multiple-of-four",
health: true,
field: "width",
position: "before",
messageKey: "configMessages.detect.resolutionShouldBeMultipleOfFour",
@@ -46,6 +47,7 @@ const detect: SectionConfigOverrides = {
},
{
key: "detect-resolution-high",
health: true,
field: "width",
position: "before",
messageKey: "configMessages.detect.resolutionHigh",
@@ -61,6 +63,7 @@ const detect: SectionConfigOverrides = {
},
{
key: "detect-square-resolution",
health: true,
field: "width",
position: "before",
messageKey: "configMessages.detect.squareResolution",
@@ -112,6 +115,7 @@ const detect: SectionConfigOverrides = {
},
{
key: "detect-scene-without-model",
health: true,
field: "scene",
position: "after",
messageKey: "configMessages.detect.sceneWithoutModel",
@@ -127,6 +131,7 @@ const detect: SectionConfigOverrides = {
},
{
key: "fps-greater-than-five",
health: true,
field: "fps",
messageKey: "configMessages.detect.fpsGreaterThanFive",
severity: "info",
@@ -6,6 +6,8 @@ const faceRecognition: SectionConfigOverrides = {
messages: [
{
key: "global-disabled",
health: (ctx) =>
ctx.fullCameraConfig?.face_recognition?.enabled === true,
messageKey: "configMessages.faceRecognition.globalDisabled",
severity: "warning",
condition: (ctx) => {
@@ -15,6 +17,9 @@ const faceRecognition: SectionConfigOverrides = {
},
{
key: "person-not-tracked",
health: (ctx) =>
ctx.fullCameraConfig?.face_recognition?.enabled === true &&
ctx.fullConfig.face_recognition?.enabled === true,
messageKey: "configMessages.faceRecognition.personNotTracked",
severity: "info",
condition: (ctx) => {
@@ -52,6 +52,7 @@ const ffmpeg: SectionConfigOverrides = {
},
{
key: "inputs-missing-go2rtc-stream",
health: true,
field: "inputs",
position: "before",
messageKey: "configMessages.ffmpeg.inputsMissingGo2rtcStream",
@@ -7,6 +7,7 @@ const lpr: SectionConfigOverrides = {
messages: [
{
key: "global-disabled",
health: (ctx) => ctx.fullCameraConfig?.lpr?.enabled === true,
messageKey: "configMessages.lpr.globalDisabled",
severity: "warning",
condition: (ctx) => {
@@ -16,6 +17,9 @@ const lpr: SectionConfigOverrides = {
},
{
key: "vehicle-not-tracked",
health: (ctx) =>
ctx.fullCameraConfig?.lpr?.enabled === true &&
ctx.fullConfig.lpr?.enabled === true,
messageKey: "configMessages.lpr.vehicleNotTracked",
severity: "info",
condition: (ctx) => {
@@ -35,6 +35,7 @@ const models: SectionConfigOverrides = {
},
{
key: "model-input-dimensions-not-detect-resolution",
health: true,
field: "height",
position: "after",
messageKey: "configMessages.model.inputDimensionsNotDetectResolution",
@@ -72,6 +72,9 @@ const objects: SectionConfigOverrides = {
fieldMessages: [
{
key: "genai-no-descriptions-provider",
health: (ctx) =>
(ctx.formData as { genai?: { enabled?: boolean } })?.genai
?.enabled === true,
field: "genai.enabled",
messageKey: "configMessages.objects.genaiNoDescriptionsProvider",
severity: "warning",
@@ -28,6 +28,8 @@ const onvif: SectionConfigOverrides = {
fieldMessages: [
{
key: "autotracking-no-zones",
health: (ctx) =>
ctx.fullCameraConfig?.onvif?.autotracking?.enabled === true,
field: "autotracking.required_zones",
messageKey: "configMessages.onvif.autotrackingNoZones",
severity: "error",
@@ -6,6 +6,7 @@ const record: SectionConfigOverrides = {
messages: [
{
key: "no-record-role",
health: (ctx) => ctx.fullCameraConfig?.record?.enabled === true,
messageKey: "configMessages.record.noRecordRole",
severity: "warning",
condition: (ctx) => {
@@ -17,6 +18,7 @@ const record: SectionConfigOverrides = {
},
{
key: "no-record-sub-role",
health: (ctx) => ctx.fullCameraConfig?.record?.sub?.enabled === true,
messageKey: "configMessages.record.noRecordSubRole",
severity: "warning",
condition: (ctx) => {
@@ -43,6 +43,9 @@ const review: SectionConfigOverrides = {
},
{
key: "genai-no-descriptions-provider",
health: (ctx) =>
(ctx.formData as { genai?: { enabled?: boolean } })?.genai
?.enabled === true,
field: "genai.enabled",
messageKey: "configMessages.objects.genaiNoDescriptionsProvider",
severity: "warning",
@@ -57,6 +60,7 @@ const review: SectionConfigOverrides = {
},
{
key: "genai-image-source-recordings-record-disabled",
health: true,
field: "genai.image_source",
messageKey:
"configMessages.review.genaiImageSourceRecordingsRecordDisabled",
@@ -21,6 +21,7 @@ const semanticSearch: SectionConfigOverrides = {
fieldMessages: [
{
key: "jinav2-small-model-size",
health: (ctx) => ctx.fullConfig.semantic_search?.enabled === true,
field: "model_size",
messageKey: "configMessages.semanticSearch.jinav2SmallModelSize",
severity: "warning",
@@ -28,6 +28,13 @@ export type ConditionalMessage = {
values?: Record<string, unknown>;
/** Optional documentation path (e.g. "/configuration/object_detectors#model"). */
docLink?: string;
/**
* Whether the Health tab evaluates this message against the saved config.
* Absent or false: form only. true: shown whenever condition() holds. A
* function: shown when both condition(ctx) and health(ctx) hold, for
* messages the form deliberately shows even when the feature is off.
*/
health?: boolean | ((ctx: MessageConditionContext) => boolean);
};
/** Field-level conditional message, adds field targeting */