Merge branch 'multi-server' into storageareas
This commit is contained in:
commit
75f6da3526
|
@ -19,6 +19,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
require_once('includes/Server.php');
|
require_once('includes/Server.php');
|
||||||
|
$servers = Server::find_all();
|
||||||
|
|
||||||
$eventCounts = array(
|
$eventCounts = array(
|
||||||
array(
|
array(
|
||||||
|
@ -237,7 +238,9 @@ else
|
||||||
<tr>
|
<tr>
|
||||||
<th class="colName"><?php echo translate('Name') ?></th>
|
<th class="colName"><?php echo translate('Name') ?></th>
|
||||||
<th class="colFunction"><?php echo translate('Function') ?></th>
|
<th class="colFunction"><?php echo translate('Function') ?></th>
|
||||||
|
<?php if ( count($servers) > 1 ) { ?>
|
||||||
<th class="colServer"><?php echo translate('Server') ?></th>
|
<th class="colServer"><?php echo translate('Server') ?></th>
|
||||||
|
<?php } ?>
|
||||||
<th class="colSource"><?php echo translate('Source') ?></th>
|
<th class="colSource"><?php echo translate('Source') ?></th>
|
||||||
<?php
|
<?php
|
||||||
for ( $i = 0; $i < count($eventCounts); $i++ )
|
for ( $i = 0; $i < count($eventCounts); $i++ )
|
||||||
|
@ -261,7 +264,7 @@ if ( canEdit('Monitors') )
|
||||||
</thead>
|
</thead>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<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);"/>
|
<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=monitor', 'zmMonitor0', 'monitor', translate('AddNewMonitor'), (canEdit( 'Monitors' ) && !$user['MonitorIds']) ) ?>
|
||||||
<?php echo makePopupButton( '?view=filter&filter[terms][0][attr]=DateTime&filter[terms][0][op]=%3c&filter[terms][0][val]=now', 'zmFilter', 'filter', translate('Filters'), canView( 'Events' ) ) ?>
|
<?php echo makePopupButton( '?view=filter&filter[terms][0][attr]=DateTime&filter[terms][0][op]=%3c&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&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="colName"><?php echo makePopupLink( '?view=watch&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&mid='.$monitor['Id'], 'zmFunction', 'function', '<span class="'.$fclass.'">'.translate('Fn'.$monitor['Function']).( empty($monitor['Enabled']) ? ', disabled' : '' ) .'</span>', canEdit( 'Monitors' ) ) ?></td>
|
<td class="colFunction"><?php echo makePopupLink( '?view=function&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
|
<td class="colServer"><?php
|
||||||
$Server = new Server( $monitor['ServerId'] );
|
$Server = new Server( $monitor['ServerId'] );
|
||||||
echo $Server->Name();
|
echo $Server->Name();
|
||||||
?></td>
|
?></td>
|
||||||
|
<?php } ?>
|
||||||
<?php if ( $monitor['Type'] == "Local" ) { ?>
|
<?php if ( $monitor['Type'] == "Local" ) { ?>
|
||||||
<td class="colSource"><?php echo makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.$monitor['Device'].' ('.$monitor['Channel'].')</span>', canEdit( 'Monitors' ) ) ?></td>
|
<td class="colSource"><?php echo makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.$monitor['Device'].' ('.$monitor['Channel'].')</span>', canEdit( 'Monitors' ) ) ?></td>
|
||||||
<?php } elseif ( $monitor['Type'] == "Remote" ) { ?>
|
<?php } elseif ( $monitor['Type'] == "Remote" ) { ?>
|
||||||
|
|
Loading…
Reference in New Issue