From bcf72f0284d7db211fd4e86fe5ec084bfcdd078d Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 23 Jun 2026 07:46:35 -0400 Subject: [PATCH] feat: hide analysis image, fps and blend fields when Motion Detection is None Implement the previously empty Analysing_onChange handler in the monitor edit view to hide the Analysis Image, AnalysisFPS and Ref/Alarm blend percentage fields when Analysing is set to None, since no analysis runs in that mode. Invoke it on page load so the fields reflect the saved setting. Co-Authored-By: Claude Opus 4.8 (1M context) --- web/skins/classic/views/js/monitor.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/skins/classic/views/js/monitor.js b/web/skins/classic/views/js/monitor.js index 73fb43b50..1628b985a 100644 --- a/web/skins/classic/views/js/monitor.js +++ b/web/skins/classic/views/js/monitor.js @@ -555,6 +555,11 @@ function initPage() { manageChannelStream(); checkVerAudioMotion(); + + // Reflect the current Motion Detection (Analysing) setting on load. + if (form.elements['newMonitor[Analysing]']) { + Analysing_onChange(form.elements['newMonitor[Analysing]']); // eslint-disable-line new-cap + } } // end function initPage() async function checkVerAudioMotion() { @@ -802,6 +807,10 @@ function Capturing_onChange(e) { } function Analysing_onChange(e) { + // When motion detection is None there is no analysis, so hide the + // analysis image, analysis fps and ref/alarm blend fields. + const show = (e.value != 'None'); + $j('#AnalysisImage, li.AnalysisFPS, li.RefBlendPerc, li.AlarmRefBlendPerc, li.AlarmRefImageBlendPct').toggle(show); } function Recording_onChange(e) {