Merge branch 'id_on_console' into storageareas

This commit is contained in:
Isaac Connor 2016-05-26 11:17:41 -04:00
commit 05709f3084
2 changed files with 21 additions and 5 deletions

View File

@ -1564,6 +1564,16 @@ our @options =
type => $types{boolean}, type => $types{boolean},
category => "web", category => "web",
}, },
{
name => "ZM_WEB_ID_ON_CONSOLE",
default => "no",
description => "Should the console list the monitor id",
help => qqq("Some find it useful to have the id always visible
on the console. This option will add a column listing it.
"),
type => $types{boolean},
category => "web",
},
{ {
name => "ZM_WEB_POPUP_ON_ALARM", name => "ZM_WEB_POPUP_ON_ALARM",
default => "yes", default => "yes",

View File

@ -113,6 +113,10 @@ $seqUpFile = getSkinFile( 'graphics/seq-u.gif' );
$seqDownFile = getSkinFile( 'graphics/seq-d.gif' ); $seqDownFile = getSkinFile( 'graphics/seq-d.gif' );
$eventsView = ZM_WEB_EVENTS_VIEW; $eventsView = ZM_WEB_EVENTS_VIEW;
$eventsWindow = 'zm'.ucfirst(ZM_WEB_EVENTS_VIEW); $eventsWindow = 'zm'.ucfirst(ZM_WEB_EVENTS_VIEW);
$left_columns = 3;
if ( count($servers) ) $left_columns += 1;
if ( ZM_WEB_ID_ON_CONSOLE ) ) $left_columns += 1;
if ( $show_storage_areas ) $left_columns += 1;
xhtmlHeaders( __FILE__, translate('Console') ); xhtmlHeaders( __FILE__, translate('Console') );
?> ?>
@ -127,6 +131,9 @@ xhtmlHeaders( __FILE__, translate('Console') );
<table class="table table-striped table-hover table-condensed"> <table class="table table-striped table-hover table-condensed">
<thead> <thead>
<tr> <tr>
<?php if ( ZM_WEB_ID_ON_CONSOLE ) { ?>
<th class="colId"><?php echo translate('Id') ?></th>
<?php } ?>
<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) ) { ?> <?php if ( count($servers) ) { ?>
@ -158,11 +165,7 @@ if ( canEdit('Monitors') )
</thead> </thead>
<tfoot> <tfoot>
<tr> <tr>
<td class="colLeftButtons" colspan="<?php $columns = 3; <td class="colLeftButtons" colspan="<?php echo $left_columns ?>">
if ( count($servers) > 1 ) { $columns += 1; }
if ( $show_storage_areas ) { $columns += 1; }
echo $columns;
?>">
<input type="button" value="<?php echo translate('Refresh') ?>" onclick="location.reload(true);"/> <input type="button" value="<?php echo translate('Refresh') ?>" onclick="location.reload(true);"/>
<input type="button" class="btn btn-primary" name="addBtn" value="<?php echo translate('AddNewMonitor') ?>" onclick="addMonitor( this )"/> <input type="button" class="btn btn-primary" name="addBtn" value="<?php echo translate('AddNewMonitor') ?>" onclick="addMonitor( this )"/>
<!-- <?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']) ) ?> -->
@ -209,6 +212,9 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
$fclass .= " disabledText"; $fclass .= " disabledText";
$scale = max( reScale( SCALE_BASE, $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE ), SCALE_BASE ); $scale = max( reScale( SCALE_BASE, $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE ), SCALE_BASE );
?> ?>
<?php if ( ZM_WEB_ID_ON_CONSOLE ) { ?>
<td class="colId"><?php echo makePopupLink( '?view=watch&amp;mid='.$monitor['Id'], 'zmWatch'.$monitor['Id'], array( 'watch', reScale( $monitor['Width'], $scale ), reScale( $monitor['Height'], $scale ) ), $monitor['Id'], $running && ($monitor['Function'] != 'None') && canView( 'Stream' ) ) ?></td>
<?php } ?>
<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="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> <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) ) { ?> <?php if ( count($servers) ) { ?>