Fix eslint

pull/3805/head
Isaac Connor 2024-01-16 09:56:28 -05:00
parent 1ab66b10b1
commit 6812f2efe7
2 changed files with 11 additions and 7 deletions

View File

@ -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);

View File

@ -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) {