Merge branch 'multi-server' into storageareas

This commit is contained in:
Isaac Connor 2016-01-04 14:53:52 -05:00
commit 75f6da3526
1 changed files with 6 additions and 1 deletions

View File

@ -19,6 +19,7 @@
//
require_once('includes/Server.php');
$servers = Server::find_all();
$eventCounts = array(
array(
@ -237,7 +238,9 @@ else
<tr>
<th class="colName"><?php echo translate('Name') ?></th>
<th class="colFunction"><?php echo translate('Function') ?></th>
<?php if ( count($servers) > 1 ) { ?>
<th class="colServer"><?php echo translate('Server') ?></th>
<?php } ?>
<th class="colSource"><?php echo translate('Source') ?></th>
<?php
for ( $i = 0; $i < count($eventCounts); $i++ )
@ -261,7 +264,7 @@ if ( canEdit('Monitors') )
</thead>
<tfoot>
<tr>
<td class="colLeftButtons" colspan="4">
<td class="colLeftButtons" colspan="<?php echo count($servers) > 1 ? 4 : 3 ?>">
<input type="button" value="<?php echo translate('Refresh') ?>" onclick="location.reload(true);"/>
<?php echo makePopupButton( '?view=monitor', 'zmMonitor0', 'monitor', translate('AddNewMonitor'), (canEdit( 'Monitors' ) && !$user['MonitorIds']) ) ?>
<?php echo makePopupButton( '?view=filter&amp;filter[terms][0][attr]=DateTime&amp;filter[terms][0][op]=%3c&amp;filter[terms][0][val]=now', 'zmFilter', 'filter', translate('Filters'), canView( 'Events' ) ) ?>
@ -308,10 +311,12 @@ foreach( $displayMonitors as $monitor )
?>
<td class="colName"><?php echo makePopupLink( '?view=watch&amp;mid='.$monitor['Id'], 'zmWatch'.$monitor['Id'], array( 'watch', reScale( $monitor['Width'], $scale ), reScale( $monitor['Height'], $scale ) ), $monitor['Name'], $running && ($monitor['Function'] != 'None') && canView( 'Stream' ) ) ?></td>
<td class="colFunction"><?php echo makePopupLink( '?view=function&amp;mid='.$monitor['Id'], 'zmFunction', 'function', '<span class="'.$fclass.'">'.translate('Fn'.$monitor['Function']).( empty($monitor['Enabled']) ? ', disabled' : '' ) .'</span>', canEdit( 'Monitors' ) ) ?></td>
<?php if ( count($servers) > 1 ) { ?>
<td class="colServer"><?php
$Server = new Server( $monitor['ServerId'] );
echo $Server->Name();
?></td>
<?php } ?>
<?php if ( $monitor['Type'] == "Local" ) { ?>
<td class="colSource"><?php echo makePopupLink( '?view=monitor&amp;mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.$monitor['Device'].' ('.$monitor['Channel'].')</span>', canEdit( 'Monitors' ) ) ?></td>
<?php } elseif ( $monitor['Type'] == "Remote" ) { ?>