zoneminder/web/skins/classic/views/console.php

409 lines
19 KiB
PHP
Raw Normal View History

<?php
//
// ZoneMinder web console file, $Date$, $Revision$
// Copyright (C) 2001-2008 Philip Coombes
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
$servers = Server::find_all();
2016-02-03 22:42:50 +08:00
require_once('includes/Storage.php');
$storage_areas = Storage::find_all();
$show_storage_areas = count($storage_areas) > 1 and canEdit( 'System' ) ? 1 : 0;
if ( $running == null )
$running = daemonCheck();
$eventCounts = array(
array(
2015-05-10 21:10:30 +08:00
"title" => translate('Events'),
"filter" => array(
"terms" => array(
)
),
"total" => 0,
),
array(
2015-05-10 21:10:30 +08:00
"title" => translate('Hour'),
"filter" => array(
"terms" => array(
array( "attr" => "DateTime", "op" => ">=", "val" => "-1 hour" ),
)
),
"total" => 0,
),
array(
2015-05-10 21:10:30 +08:00
"title" => translate('Day'),
"filter" => array(
"terms" => array(
array( "attr" => "DateTime", "op" => ">=", "val" => "-1 day" ),
)
),
"total" => 0,
),
array(
2015-05-10 21:10:30 +08:00
"title" => translate('Week'),
"filter" => array(
"terms" => array(
array( "attr" => "DateTime", "op" => ">=", "val" => "-7 day" ),
)
),
"total" => 0,
),
array(
2015-05-10 21:10:30 +08:00
"title" => translate('Month'),
"filter" => array(
"terms" => array(
array( "attr" => "DateTime", "op" => ">=", "val" => "-1 month" ),
)
),
"total" => 0,
),
array(
2015-05-10 21:10:30 +08:00
"title" => translate('Archived'),
"filter" => array(
"terms" => array(
array( "attr" => "Archived", "op" => "=", "val" => "1" ),
)
),
"total" => 0,
),
);
2016-05-07 02:32:52 +08:00
$displayMonitors = NULL;
<<<<<<< HEAD
# Also populates displayMonitors
$navbar = getNavBarHTML();
$zoneCount = 0;
2016-05-07 03:52:07 +08:00
for( $i = 0; $i < count($displayMonitors); $i += 1 ) {
$monitor = $displayMonitors[$i];
2016-05-07 02:33:56 +08:00
$monitor['zmc'] = zmcStatus( $monitor );
$monitor['zma'] = zmaStatus( $monitor );
$monitor['ZoneCount'] = dbFetchOne( 'select count(Id) as ZoneCount from Zones where MonitorId = ?', 'ZoneCount', array($monitor['Id']) );
$counts = array();
2016-05-07 03:56:01 +08:00
for ( $j = 0; $j < count($eventCounts); $j += 1 ) {
2016-05-07 02:33:56 +08:00
$filter = addFilterTerm( $eventCounts[$j]['filter'], count($eventCounts[$j]['filter']['terms']), array( "cnj" => "and", "attr" => "MonitorId", "op" => "=", "val" => $monitor['Id'] ) );
parseFilter( $filter );
$counts[] = "count(if(1".$filter['sql'].",1,NULL)) as EventCount$j";
$monitor['eventCounts'][$j]['filter'] = $filter;
}
$sql = "select ".join($counts,", ")." from Events as E where MonitorId = ?";
$counts = dbFetchOne( $sql, NULL, array($monitor['Id']) );
2016-05-07 03:56:01 +08:00
if ( $counts )
$displayMonitors[$i] = $monitor = array_merge( $monitor, $counts );
for ( $j = 0; $j < count($eventCounts); $j += 1 ) {
$eventCounts[$j]['total'] += $monitor['EventCount'.$j];
}
$zoneCount += $monitor['ZoneCount'];
=======
2014-03-22 11:10:13 +08:00
$group = NULL;
if ( ! empty($_COOKIE['zmGroup']) ) {
2017-05-26 02:26:49 +08:00
if ( $group = dbFetchOne( 'select * from Groups where Id = ?', NULL, array($_COOKIE['zmGroup'])) )
$groupIds = array_flip(explode( ',', $group['MonitorIds'] ));
2014-03-22 11:10:13 +08:00
}
noCacheHeaders();
$maxWidth = 0;
$maxHeight = 0;
$cycleCount = 0;
$minSequence = 0;
$maxSequence = 1;
$monitors = dbFetchAll( "select * from Monitors order by Sequence asc" );
$displayMonitors = array();
2017-05-26 02:26:49 +08:00
for ( $i = 0; $i < count($monitors); $i++ ) {
if ( !visibleMonitor( $monitors[$i]['Id'] ) ) {
continue;
}
if ( $group && !empty($groupIds) && !array_key_exists( $monitors[$i]['Id'], $groupIds ) ) {
continue;
}
$monitors[$i]['Show'] = true;
$monitors[$i]['zmc'] = zmcStatus( $monitors[$i] );
$monitors[$i]['zma'] = zmaStatus( $monitors[$i] );
$monitors[$i]['ZoneCount'] = dbFetchOne( 'select count(Id) as ZoneCount from Zones where MonitorId = ?', 'ZoneCount', array($monitors[$i]['Id']) );
$counts = array();
for ( $j = 0; $j < count($eventCounts); $j++ ) {
$filter = addFilterTerm( $eventCounts[$j]['filter'], count($eventCounts[$j]['filter']['terms']), array( "cnj" => "and", "attr" => "MonitorId", "op" => "=", "val" => $monitors[$i]['Id'] ) );
parseFilter( $filter );
$counts[] = "count(if(1".$filter['sql'].",1,NULL)) as EventCount$j";
$monitors[$i]['eventCounts'][$j]['filter'] = $filter;
}
$sql = "select ".join($counts,", ")." from Events as E where MonitorId = ?";
$counts = dbFetchOne( $sql, NULL, array($monitors[$i]['Id']) );
if ( $monitors[$i]['Function'] != 'None' ) {
$cycleCount++;
$scaleWidth = reScale( $monitors[$i]['Width'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE );
$scaleHeight = reScale( $monitors[$i]['Height'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE );
if ( $maxWidth < $scaleWidth ) $maxWidth = $scaleWidth;
if ( $maxHeight < $scaleHeight ) $maxHeight = $scaleHeight;
}
if ( $counts ) $monitors[$i] = array_merge( $monitors[$i], $counts );
$displayMonitors[] = $monitors[$i];
>>>>>>> dragndrop_monitor_sorting
}
noCacheHeaders();
2016-05-07 03:53:19 +08:00
$eventsView = ZM_WEB_EVENTS_VIEW;
$eventsWindow = 'zm'.ucfirst(ZM_WEB_EVENTS_VIEW);
<<<<<<< HEAD
=======
$eventCount = 0;
2017-05-26 02:26:49 +08:00
for ( $i = 0; $i < count($eventCounts); $i++ ) {
$eventCounts[$i]['total'] = 0;
}
$zoneCount = 0;
2017-05-26 02:26:49 +08:00
foreach( $displayMonitors as $monitor ) {
for ( $i = 0; $i < count($eventCounts); $i++ ) {
$eventCounts[$i]['total'] += $monitor['EventCount'.$i];
}
$zoneCount += $monitor['ZoneCount'];
}
$versionClass = (ZM_DYN_DB_VERSION&&(ZM_DYN_DB_VERSION!=ZM_VERSION))?'errorText':'';
>>>>>>> dragndrop_monitor_sorting
$left_columns = 3;
if ( count($servers) ) $left_columns += 1;
2016-05-27 00:18:58 +08:00
if ( ZM_WEB_ID_ON_CONSOLE ) $left_columns += 1;
if ( $show_storage_areas ) $left_columns += 1;
2015-05-10 21:10:30 +08:00
xhtmlHeaders( __FILE__, translate('Console') );
?>
<body>
<form name="monitorForm" method="get" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<input type="hidden" name="view" value="<?php echo $view ?>"/>
<input type="hidden" name="action" value=""/>
<<<<<<< HEAD
2016-03-12 16:28:02 +08:00
<?php echo $navbar ?>
2016-03-12 16:28:02 +08:00
<div class="container-fluid">
<table class="table table-striped table-hover table-condensed">
=======
<div id="header">
<h3 id="systemTime"><?php echo preg_match( '/%/', DATE_FMT_CONSOLE_LONG )?strftime( DATE_FMT_CONSOLE_LONG ):date( DATE_FMT_CONSOLE_LONG ) ?></h3>
<h3 id="systemStats"><?php echo translate('Load') ?>: <?php echo getLoad() ?> - <?php echo translate('Disk') ?>: <?php echo getDiskPercent() ?>% - <?php echo ZM_PATH_MAP ?>: <?php echo getDiskPercent(ZM_PATH_MAP) ?>%</h3>
<h2 id="title"><a href="http://www.zoneminder.com" target="ZoneMinder">ZoneMinder</a> <?php echo translate('Console') ?> - <?php echo makePopupLink( '?view=state', 'zmState', 'state', $status, canEdit( 'System' ) ) ?> - <?php echo $run_state ?> <?php echo makePopupLink( '?view=version', 'zmVersion', 'version', '<span class="'.$versionClass.'">v'.ZM_VERSION.'</span>', canEdit( 'System' ) ) ?></h2>
<div class="clear"></div>
2016-07-10 02:11:30 +08:00
<h3 id="development"><center><?php echo ZM_WEB_CONSOLE_BANNER ?></center></h3>
2015-08-17 01:29:03 +08:00
<div id="monitorSummary"><?php echo makePopupLink( '?view=groups', 'zmGroups', 'groups', sprintf( $CLANG['MonitorCount'], count($displayMonitors), zmVlang( $VLANG['Monitor'], count($displayMonitors) ) ).($group?' ('.$group['Name'].')':''), canView( 'Groups' ) ); ?></div>
<?php
2017-05-26 02:26:49 +08:00
if ( ZM_OPT_X10 && canView( 'Devices' ) ) {
?>
2015-05-10 21:10:30 +08:00
<div id="devices"><?php echo makePopupLink( '?view=devices', 'zmDevices', 'devices', translate('Devices') ) ?></div>
<?php
}
2017-05-26 02:26:49 +08:00
if ( canView( 'System' ) ) {
?>
2015-05-10 21:10:30 +08:00
<div id="options"><?php echo makePopupLink( '?view=options', 'zmOptions', 'options', translate('Options') ) ?><?php if ( logToDatabase() > Logger::NOLOG ) { ?> / <?php echo makePopupLink( '?view=log', 'zmLog', 'log', '<span class="'.logState().'">'.translate('Log').'</span>' ) ?><?php } ?></div>
<?php
}
2017-05-26 02:26:49 +08:00
if ( canView( 'Stream' ) && $cycleCount > 1 ) {
$cycleGroup = isset($_COOKIE['zmGroup'])?$_COOKIE['zmGroup']:0;
?>
<div id="cycleMontage">
2017-05-26 02:26:49 +08:00
<?php echo makePopupLink( '?view=cycle&amp;group='.$cycleGroup, 'zmCycle'.$cycleGroup, array( 'cycle', $cycleWidth, $cycleHeight ), translate('Cycle'), $running ) ?>&nbsp;/&nbsp;
<?php echo makePopupLink( '?view=montage&amp;group='.$cycleGroup, 'zmMontage'.$cycleGroup, 'montage', translate('Montage'), $running ) ?>&nbsp;/&nbsp;
<?php echo makePopupLink( '?view=montagereview&amp;group='.$cycleGroup, 'zmMontage'.$cycleGroup, 'montagereview', translate('Montage Review'), $running ) ?>
</div>
<?php
2017-05-26 02:26:49 +08:00
} else {
?>
<?php
}
?>
<h3 id="loginBandwidth"><?php
2017-05-26 02:26:49 +08:00
if ( ZM_OPT_USE_AUTH ) {
2015-05-10 21:10:30 +08:00
?><?php echo translate('LoggedInAs') ?> <?php echo makePopupLink( '?view=logout', 'zmLogout', 'logout', $user['Username'], (ZM_AUTH_TYPE == "builtin") ) ?>, <?php echo strtolower( translate('ConfiguredFor') ) ?><?php
2017-05-26 02:26:49 +08:00
} else {
2015-05-10 21:10:30 +08:00
?><?php echo translate('ConfiguredFor') ?><?php
}
2015-05-10 21:10:30 +08:00
?>&nbsp;<?php echo makePopupLink( '?view=bandwidth', 'zmBandwidth', 'bandwidth', $bwArray[$_COOKIE['zmBandwidth']], ($user && $user['MaxBandwidth'] != 'low' ) ) ?> <?php echo translate('BandwidthHead') ?></h3>
</div>
<div id="content">
<table id="consoleTable" cellspacing="0">
>>>>>>> dragndrop_monitor_sorting
<thead>
<tr>
<?php if ( ZM_WEB_ID_ON_CONSOLE ) { ?>
<th class="colId"><?php echo translate('Id') ?></th>
<?php } ?>
2015-05-10 21:10:30 +08:00
<th class="colName"><?php echo translate('Name') ?></th>
<th class="colFunction"><?php echo translate('Function') ?></th>
<?php if ( count($servers) ) { ?>
2016-04-15 01:53:10 +08:00
<th class="colServer"><?php echo translate('Server') ?></th>
<?php } ?>
2015-05-10 21:10:30 +08:00
<th class="colSource"><?php echo translate('Source') ?></th>
<<<<<<< HEAD
2016-02-03 22:42:50 +08:00
<?php if ( $show_storage_areas ) { ?>
<th class="colStorage"><?php echo translate('Storage') ?></th>
<?php } ?>
2017-02-03 01:15:16 +08:00
<?php for ( $i = 0; $i < count($eventCounts); $i++ ) { ?>
<th class="colEvents"><?php echo $eventCounts[$i]['title'] ?></th>
2017-02-03 01:15:16 +08:00
<?php } ?>
2017-03-30 22:45:55 +08:00
<th class="colZones"><a href="<?php echo $_SERVER['PHP_SELF'] ?>?view=zones_overview"><?php echo translate('Zones') ?></a></th>
2017-02-03 01:15:16 +08:00
<?php if ( canEdit('Monitors') ) { ?>
=======
<?php
2017-05-26 02:26:49 +08:00
for ( $i = 0; $i < count($eventCounts); $i++ ) {
?>
<th class="colEvents"><?php echo $eventCounts[$i]['title'] ?></th>
<?php
}
?>
2015-05-10 21:10:30 +08:00
<th class="colZones"><?php echo translate('Zones') ?></th>
>>>>>>> dragndrop_monitor_sorting
2015-05-10 21:10:30 +08:00
<th class="colMark"><?php echo translate('Mark') ?></th>
<?php } ?>
</tr>
</thead>
<tfoot>
<tr>
<td class="colLeftButtons" colspan="<?php echo $left_columns ?>">
<<<<<<< HEAD
<input type="button" class="btn btn-primary" 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 )"/>
2016-04-27 03:02:34 +08:00
<!-- <?php echo makePopupButton( '?view=monitor', 'zmMonitor0', 'monitor', translate('AddNewMonitor'), (canEdit( 'Monitors' ) && !$user['MonitorIds']) ) ?> -->
2015-05-10 21:10:30 +08:00
<?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' ) ) ?>
2017-01-24 10:51:17 +08:00
<input class="btn btn-primary" type="button" name="editBtn" value="<?php echo translate('Edit') ?>" onclick="editMonitor( this )" disabled="disabled"/>
<input class="btn btn-danger" type="button" name="deleteBtn" value="<?php echo translate('Delete') ?>" onclick="deleteMonitor( this )" disabled="disabled"/>
</td>
2017-02-03 01:15:16 +08:00
<?php for ( $i = 0; $i < count($eventCounts); $i++ ) {
parseFilter( $eventCounts[$i]['filter'] );
=======
2015-05-10 21:10:30 +08:00
<input type="button" value="<?php echo translate('Refresh') ?>" onclick="location.reload(true);"/>
<input type="button" name="addBtn" value="<?php echo translate('AddNewMonitor') ?>" onclick="addMonitor( this )"/>
2016-04-15 01:53:10 +08:00
<!-- <?php echo makePopupButton( '?view=monitor', 'zmMonitor0', 'monitor', translate('AddNewMonitor'), (canEdit( 'Monitors' ) && !$user['MonitorIds']) ) ?> -->
2015-05-10 21:10:30 +08:00
<?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' ) ) ?>
<input type="button" name="editBtn" value="<?php echo translate('Edit') ?>" onclick="editMonitor( this )" disabled="disabled"/>
<input type="button" name="deleteBtn" value="<?php echo translate('Delete') ?>" onclick="deleteMonitor( this )" disabled="disabled"/>
</td>
<?php
2017-05-26 02:26:49 +08:00
for ( $i = 0; $i < count($eventCounts); $i++ ) {
parseFilter( $eventCounts[$i]['filter'] );
>>>>>>> dragndrop_monitor_sorting
?>
<td class="colEvents"><?php echo makePopupLink( '?view='.$eventsView.'&amp;page=1'.$eventCounts[$i]['filter']['query'], $eventsWindow, $eventsView, $eventCounts[$i]['total'], canView( 'Events' ) ) ?></td>
<?php
}
?>
<td class="colZones"><?php echo $zoneCount ?></td>
<<<<<<< HEAD
2017-02-03 01:15:16 +08:00
<?php if ( canEdit('Monitors') ) { ?>
<td class="colMark"></td>
<?php } ?>
=======
<td class="colMark"></td>
>>>>>>> dragndrop_monitor_sorting
</tr>
</tfoot>
2017-01-23 23:12:57 +08:00
<tbody id="consoleTableBody">
<?php
<<<<<<< HEAD
for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
$monitor = $displayMonitors[$monitor_i];
?>
2017-01-23 23:12:57 +08:00
<tr id="<?php echo 'monitor_id-'.$monitor['Id'] ?>" title="<?php echo $monitor['Id'] ?>">
=======
2017-05-26 02:26:49 +08:00
foreach( $displayMonitors as $monitor ) {
?>
<tr id="<?php echo 'monitor_id-'.$monitor['Id'] ?>">
>>>>>>> dragndrop_monitor_sorting
<?php
2017-05-26 02:26:49 +08:00
if ( !$monitor['zmc'] ) {
$dclass = "errorText";
} else {
2016-04-15 01:53:10 +08:00
// https://github.com/ZoneMinder/ZoneMinder/issues/1082
2017-05-26 02:26:49 +08:00
if ( !$monitor['zma'] && $monitor['Function']!='Monitor' )
$dclass = "warnText";
else
$dclass = "infoText";
}
if ( $monitor['Function'] == 'None' )
2017-05-26 02:26:49 +08:00
$fclass = "errorText";
2015-10-01 23:35:38 +08:00
//elseif ( $monitor['Function'] == 'Monitor' )
// $fclass = "warnText";
else
2017-05-26 02:26:49 +08:00
$fclass = "infoText";
if ( !$monitor['Enabled'] )
2017-05-26 02:26:49 +08:00
$fclass .= " disabledText";
$scale = max( reScale( SCALE_BASE, $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE ), SCALE_BASE );
?>
<?php if ( ZM_WEB_ID_ON_CONSOLE ) { ?>
2017-02-03 01:15:16 +08:00
<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 } ?>
2017-02-03 01:15:16 +08:00
<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) ) { ?>
2017-02-03 01:15:16 +08:00
<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" ) { ?>
<td class="colSource"><?php echo makePopupLink( '?view=monitor&amp;mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.preg_replace( '/^.*@/', '', $monitor['Host'] ).'</span>', canEdit( 'Monitors' ) ) ?></td>
<?php } elseif ( $monitor['Type'] == "File" ) { ?>
<td class="colSource"><?php echo makePopupLink( '?view=monitor&amp;mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.preg_replace( '/^.*\//', '', $monitor['Path'] ).'</span>', canEdit( 'Monitors' ) ) ?></td>
<?php } elseif ( $monitor['Type'] == "Ffmpeg" || $monitor['Type'] == "Libvlc" ) {
$domain = parse_url( $monitor['Path'], PHP_URL_HOST );
$shortpath = $domain ? $domain : preg_replace( '/^.*\//', '', $monitor['Path'] );
2016-04-15 01:53:10 +08:00
if ( $shortpath == '' ) {
2017-05-26 02:26:49 +08:00
$shortpath = 'Monitor ' . $monitor['Id'];
2016-04-15 01:53:10 +08:00
}
?>
<td class="colSource"><?php echo makePopupLink( '?view=monitor&amp;mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.$shortpath.'</span>', canEdit( 'Monitors' ) ) ?></td>
<?php } elseif ( $monitor['Type'] == "cURL" ) { ?>
<td class="colSource"><?php echo makePopupLink( '?view=monitor&amp;mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.preg_replace( '/^.*\//', '', $monitor['Path'] ).'</span>', canEdit( 'Monitors' ) ) ?></td>
<?php } else { ?>
<td class="colSource">&nbsp;</td>
<?php } ?>
2016-02-03 22:42:50 +08:00
<?php if ( $show_storage_areas ) { ?>
<td class="colStorage"><?php $Storage = new Storage( $monitor['StorageId'] ); echo $Storage->Name(); ?></td>
2016-02-03 22:42:50 +08:00
<?php } ?>
<?php
for ( $i = 0; $i < count($eventCounts); $i++ ) {
?>
<td class="colEvents"><?php echo makePopupLink( '?view='.$eventsView.'&amp;page=1'.$monitor['eventCounts'][$i]['filter']['query'], $eventsWindow, $eventsView, $monitor['EventCount'.$i], canView( 'Events' ) ) ?></td>
<?php
}
?>
<td class="colZones"><?php echo makePopupLink( '?view=zones&amp;mid='.$monitor['Id'], 'zmZones', array( 'zones', $monitor['Width'], $monitor['Height'] ), $monitor['ZoneCount'], $running && canView( 'Monitors' ) ) ?></td>
2017-02-03 01:15:16 +08:00
<?php if ( canEdit('Monitors') ) { ?>
2017-01-24 10:51:17 +08:00
<td class="colMark">
2017-02-03 01:15:16 +08:00
<input type="checkbox" name="markMids[]" value="<?php echo $monitor['Id'] ?>" onclick="setButtonStates( this )"<?php if ( !canEdit( 'Monitors' ) ) { ?> disabled="disabled"<?php } ?>/>
<span class="glyphicon glyphicon-sort"></span>
2017-01-24 10:51:17 +08:00
</td>
<?php } ?>
</tr>
<?php
} # end for eacho monitor
?>
</tbody>
</table>
</div>
2016-03-12 16:28:02 +08:00
</form>
<?php
if ( canEdit('System') ) {
include("skins/$skin/views/state.php");
}
?>
</body>
</html>