Add monitor json data

This commit is contained in:
Isaac Connor 2020-09-03 18:25:00 -04:00
parent 1f810c8947
commit 46790bf401
1 changed files with 18 additions and 0 deletions

View File

@ -22,3 +22,21 @@ if ( canEdit('System') ) {
?> ?>
var showVersionPopup = <?php echo isset($showVersionPopup )?'true':'false' ?>; var showVersionPopup = <?php echo isset($showVersionPopup )?'true':'false' ?>;
var showDonatePopup = <?php echo isset($showDonatePopup )?'true':'false' ?>; var showDonatePopup = <?php echo isset($showDonatePopup )?'true':'false' ?>;
var monitors = new Array();
<?php
global $monitors;
foreach ( $monitors as $monitor ) {
?>
monitors[<?php echo $monitor->Id() ?>] = {
'Id': <?php echo $monitor->Id() ?>,
'Name': '<?php echo $monitor->Name() ?>',
'ViewWidth': <?php echo $monitor->ViewWidth() ?>,
'ViewHeight':<?php echo $monitor->ViewHeight() ?>,
'Url': '<?php echo $monitor->UrlToIndex( ZM_MIN_STREAMING_PORT ? ($monitor->Id() + ZM_MIN_STREAMING_PORT) : '') ?>',
'Type': '<?php echo $monitor->Type() ?>',
'Function': '<?php echo $monitor->Function() ?>',
'Enabled': '<?php echo $monitor->Enabled() ?>'
};
<?php
}
?>