This commit is contained in:
Isaac Connor 2021-08-23 17:11:40 -04:00
parent 848a537a0f
commit 2640791b89
1 changed files with 9 additions and 9 deletions

View File

@ -73,10 +73,10 @@ function processRows(rows) {
function showEvents() { function showEvents() {
$j('#ptzControls').addClass('hidden'); $j('#ptzControls').addClass('hidden');
$j('#events').removeClass('hidden'); $j('#events').removeClass('hidden');
if ( $j('#eventsControl') ) { if ($j('#eventsControl')) {
$j('#eventsControl').addClass('hidden'); $j('#eventsControl').addClass('hidden');
} }
if ( $j('#controlControl') ) { if ($j('#controlControl')) {
$j('#controlControl').removeClass('hidden'); $j('#controlControl').removeClass('hidden');
} }
showMode = 'events'; showMode = 'events';
@ -85,10 +85,10 @@ function showEvents() {
function showPtzControls() { function showPtzControls() {
$j('#events').addClass('hidden'); $j('#events').addClass('hidden');
$j('#ptzControls').removeClass('hidden'); $j('#ptzControls').removeClass('hidden');
if ( $j('#eventsControl') ) { if ($j('#eventsControl')) {
$j('#eventsControl').removeClass('hidden'); $j('#eventsControl').removeClass('hidden');
} }
if ( $j('#controlControl') ) { if ($j('#controlControl')) {
$j('#controlControl').addClass('hidden'); $j('#controlControl').addClass('hidden');
} }
showMode = 'control'; showMode = 'control';
@ -132,13 +132,13 @@ function setAlarmState(currentAlarmState) {
alarmState = currentAlarmState; alarmState = currentAlarmState;
var stateClass = ''; var stateClass = '';
if ( alarmState == STATE_ALARM ) { if (alarmState == STATE_ALARM) {
stateClass = 'alarm'; stateClass = 'alarm';
} else if ( alarmState == STATE_ALERT ) { } else if (alarmState == STATE_ALERT) {
stateClass = 'alert'; stateClass = 'alert';
} }
$j('#stateValue').text(stateStrings[alarmState]); $j('#stateValue').text(stateStrings[alarmState]);
if ( stateClass ) { if (stateClass) {
$j('#stateValue').addClass(stateClass); $j('#stateValue').addClass(stateClass);
} else { } else {
$j('#stateValue').removeClass(); $j('#stateValue').removeClass();
@ -855,10 +855,10 @@ function initPage() {
if (monitorType != 'WebSite') { if (monitorType != 'WebSite') {
if (streamMode == 'single') { if (streamMode == 'single') {
statusCmdTimer = setTimeout(statusCmdQuery, (Math.random()+0.1)*statusRefreshTimeout ); statusCmdTimer = setTimeout(statusCmdQuery, (Math.random()+0.1)*statusRefreshTimeout);
setInterval(watchdogCheck, statusRefreshTimeout*2, 'status'); setInterval(watchdogCheck, statusRefreshTimeout*2, 'status');
} else { } else {
streamCmdTimer = setTimeout(streamCmdQuery, (Math.random()+0.1)*statusRefreshTimeout ); streamCmdTimer = setTimeout(streamCmdQuery, (Math.random()+0.1)*statusRefreshTimeout);
setInterval(watchdogCheck, statusRefreshTimeout*2, 'stream'); setInterval(watchdogCheck, statusRefreshTimeout*2, 'stream');
} }