Fix PrevCycle because monIdx was empty.
This commit is contained in:
parent
4fa804e9a2
commit
f6d0274f74
|
@ -904,9 +904,10 @@ function initPage() {
|
|||
|
||||
if (monitorType != 'WebSite') {
|
||||
if (streamMode == 'single') {
|
||||
statusCmdTimer = setTimeout(statusCmdQuery, (Math.random()+0.1)*statusRefreshTimeout);
|
||||
statusCmdTimer = setTimeout(statusCmdQuery, 100);
|
||||
setInterval(watchdogCheck, statusRefreshTimeout*2, 'status');
|
||||
} else {
|
||||
streamCmdTimer = setTimeout(streamCmdQuery, 100);
|
||||
setInterval(watchdogCheck, statusRefreshTimeout*2, 'stream');
|
||||
}
|
||||
|
||||
|
@ -1054,9 +1055,11 @@ function cycleNext() {
|
|||
}
|
||||
|
||||
function cyclePrev() {
|
||||
console.log(monIdx);
|
||||
monIdx --;
|
||||
if (monIdx < 0) {
|
||||
monIdx = monitorData.length - 1;
|
||||
console.log(monIdx);
|
||||
}
|
||||
if (!monitorData[monIdx]) {
|
||||
console.log('No monitorData for ' + monIdx);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
global $monIdx;
|
||||
global $monitor_index;
|
||||
global $nextMid;
|
||||
global $options;
|
||||
global $monitors;
|
||||
|
@ -53,7 +53,7 @@ var monitorRefresh = '<?php echo $monitor->Refresh() ?>';
|
|||
var monitorStreamReplayBuffer = <?php echo $monitor->StreamReplayBuffer() ?>;
|
||||
var monitorControllable = <?php echo $monitor->Controllable()?'true':'false' ?>;
|
||||
|
||||
var monIdx = '<?php echo $monIdx; ?>';
|
||||
var monIdx = <?php echo $monitor_index; ?>;
|
||||
var nextMid = "<?php echo isset($nextMid)?$nextMid:'' ?>";
|
||||
var mode = "<?php echo $options['mode'] ?>";
|
||||
|
||||
|
|
Loading…
Reference in New Issue