From 6812f2efe7ba059bee14d74f83e55bf7dd4c2552 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 16 Jan 2024 09:56:28 -0500 Subject: [PATCH] Fix eslint --- web/js/MonitorStream.js | 10 ++++++---- web/skins/classic/views/js/console.js | 8 +++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/web/js/MonitorStream.js b/web/js/MonitorStream.js index b8ac4cf88..a6a156bed 100644 --- a/web/js/MonitorStream.js +++ b/web/js/MonitorStream.js @@ -644,10 +644,12 @@ function MonitorStream(monitorData) { } }); } else { - if (analysisFPSValue.length && (analysisFPSValue.text() != monitor.AnalysisFPS)) + if (analysisFPSValue.length && (analysisFPSValue.text() != monitor.AnalysisFPS)) { analysisFPSValue.text(monitor.AnalysisFPS); - if (captureFPSValue.length && (captureFPSValue.text() != monitor.CaptureFPS)) + } + if (captureFPSValue.length && (captureFPSValue.text() != monitor.CaptureFPS)) { captureFPSValue.text(monitor.CaptureFPS); + } if (viewingFPSValue.length && viewingFPSValue.text() == '') { $j('#viewingFPS'+this.id).hide(); } @@ -909,14 +911,14 @@ function startRTSP2WebPlay(videoEl, url) { method: 'POST', body: new URLSearchParams({data: btoa(webrtc.localDescription.sdp)}) }) - .catch(rejected => { + .catch((rejected) => { console.log(rejected); }) .then((response) => response.text()) .then((data) => { try { webrtc.setRemoteDescription( - new RTCSessionDescription({type: 'answer', sdp: atob(data)}) + new RTCSessionDescription({type: 'answer', sdp: atob(data)}) ); } catch (e) { console.warn(e); diff --git a/web/skins/classic/views/js/console.js b/web/skins/classic/views/js/console.js index 85be09c58..8155a359a 100644 --- a/web/skins/classic/views/js/console.js +++ b/web/skins/classic/views/js/console.js @@ -36,10 +36,11 @@ function scanNetwork(element) { window.location.assign('?view=add_monitors'); } function addMonitor(element) { - if (user.Monitors == 'Create') + if (user.Monitors == 'Create') { window.location.assign('?view=monitor'); - else + } else { alert('Need create monitors privilege'); + } } function cloneMonitor(element) { @@ -185,8 +186,9 @@ function manageFunctionModal(evt) { } // end function manageFunctionModal function initPage() { - if (consoleRefreshTimeout > 0) + if (consoleRefreshTimeout > 0) { setInterval(reloadWindow, consoleRefreshTimeout); + } if ( showDonatePopup ) { $j.getJSON(thisUrl + '?request=modal&modal=donate') .done(function(data) {