update to current.

pull/3038/head
Isaac Connor 2017-02-02 12:15:16 -05:00
parent d8c79cb750
commit 7b73eb350f
5 changed files with 27 additions and 102 deletions

View File

@ -82,7 +82,7 @@ function xhtmlHeaders( $file, $title )
<script type="text/javascript" src="skins/<?php echo $skin; ?>/js/jquery-1.11.3.js"></script>
<script type="text/javascript" src="skins/<?php echo $skin; ?>/js/jquery-ui-1.11.3.js"></script>
<script type="text/javascript" src="skins/<?php echo $skin; ?>/js/bootstrap.min.js"></script>
<script type="text/javascript">
<script type="text/javascript">
//<![CDATA[
<!--
var $j = jQuery.noConflict();
@ -263,18 +263,17 @@ if ( canView( 'Stream' ) && $cycleCount > 1 ) {
</div>
<ul class="list-inline">
<li><?php echo translate('Load') ?>: <?php echo getLoad() ?></li>
<li><?php echo translate('Storage') ?>: <?php
$storage_areas = Storage::find_all();
$storage_paths = null;
foreach ( $storage_areas as $area ) {
$storage_paths[$area->Path()] = $area;
}
if ( ! isset($storage_paths[ZM_DIR_EVENTS]) ) {
array_push( $storage_areas, new Storage() );
}
<li><?php echo translate('Storage') ?>:
<?php
$storage_areas = Storage::find_all();
$storage_paths = null;
foreach ( $storage_areas as $area ) {
$storage_paths[$area->Path()] = $area;
}
if ( ! isset($storage_paths[ZM_DIR_EVENTS]) ) {
array_push( $storage_areas, new Storage() );
}
$func = function($S){ return $S->Name() . ': ' . $S->disk_usage_percent().'%'; };
echo implode( ', ', array_map ( $func, $storage_areas ) );
echo ' ' . ZM_PATH_MAP .': '. getDiskPercent(ZM_PATH_MAP).'%';
?></li>

View File

@ -1,59 +0,0 @@
AUTOMAKE_OPTIONS = gnu
SUBDIRS = \
js
webdir = @WEB_PREFIX@/skins/classic/views
dist_web_DATA = \
bandwidth.php \
blank.php \
console.php \
controlcap.php \
controlcaps.php \
control.php \
controlpreset.php \
cycle.php \
device.php \
devices.php \
donate.php \
error.php \
eventdetail.php \
event.php \
events.php \
export.php \
filter.php \
filtersave.php \
frame.php \
frames.php \
function.php \
group.php \
groups.php \
header.php \
log.php \
login.php \
logout.php \
Makefile.am \
monitor.php \
monitorpreset.php \
monitorprobe.php \
montage.php \
montagereview.php \
none.php \
onvifprobe.php \
optionhelp.php \
options.php \
postlogin.php \
server.php \
settings.php \
state.php \
stats.php \
status.php \
storage.php \
timeline.php \
user.php \
version.php \
video.php \
watch.php \
zone.php \
zones.php

View File

@ -143,16 +143,11 @@ xhtmlHeaders( __FILE__, translate('Console') );
<?php if ( $show_storage_areas ) { ?>
<th class="colStorage"><?php echo translate('Storage') ?></th>
<?php } ?>
<?php
for ( $i = 0; $i < count($eventCounts); $i++ )
{
?>
<?php for ( $i = 0; $i < count($eventCounts); $i++ ) { ?>
<th class="colEvents"><?php echo $eventCounts[$i]['title'] ?></th>
<?php
}
?>
<?php } ?>
<th class="colZones"><?php echo translate('Zones') ?></th>
<?php if ( canEdit( 'Monitors' ) ) { ?>
<?php if ( canEdit('Monitors') ) { ?>
<th class="colMark"><?php echo translate('Mark') ?></th>
<?php } ?>
</tr>
@ -167,9 +162,7 @@ for ( $i = 0; $i < count($eventCounts); $i++ )
<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>
<?php
for ( $i = 0; $i < count($eventCounts); $i++ )
{
<?php for ( $i = 0; $i < count($eventCounts); $i++ ) {
parseFilter( $eventCounts[$i]['filter'] );
?>
<td class="colEvents"><?php echo makePopupLink( '?view='.$eventsView.'&amp;page=1'.$eventCounts[$i]['filter']['query'], $eventsWindow, $eventsView, $eventCounts[$i]['total'], canView( 'Events' ) ) ?></td>
@ -177,8 +170,8 @@ for ( $i = 0; $i < count($eventCounts); $i++ )
}
?>
<td class="colZones"><?php echo $zoneCount ?></td>
<?php if ( canEdit( 'Monitors' ) ) { ?>
<td> </td>
<?php if ( canEdit('Monitors') ) { ?>
<td class="colMark"></td>
<?php } ?>
</tr>
</tfoot>
@ -210,15 +203,12 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
$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>
<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>
<?php if ( count($servers) ) { ?>
<td class="colServer"><?php
$Server = new Server( $monitor['ServerId'] );
echo $Server->Name();
?></td>
<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>
@ -250,10 +240,10 @@ echo $Server->Name();
}
?>
<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>
<?php if ( canEdit( 'Monitors' ) ) { ?>
<?php if ( canEdit('Monitors') ) { ?>
<td class="colMark">
<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>
<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>
</td>
<?php } ?>
</tr>
@ -281,5 +271,4 @@ if ( canEdit('System') ) {
$j( "#consoleTableBody" ).disableSelection();
} );
</script>
</html>

View File

@ -207,9 +207,7 @@ for ( $i = 0; isset($_REQUEST['filter']) && $i < count($_REQUEST['filter']['term
<td><?php echo buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td>
<td><input name="filter[terms][<?php echo $i ?>][val]" id="filter[terms][<?php echo $i ?>][val]" value="<?php echo isset($_REQUEST['filter']['terms'][$i]['val'])?validHtmlStr($_REQUEST['filter']['terms'][$i]['val']):'' ?>"/><?php if ( $hasCal ) { ?><script type="text/javascript">Calendar.setup( { inputField: "filter[terms][<?php echo $i ?>][val]", ifFormat: "%Y-%m-%d", showOthers: true, weekNumbers: false });</script><?php } ?></td>
<?php
}
elseif ( $_REQUEST['filter']['terms'][$i]['attr'] == "StateId" )
{
} elseif ( $_REQUEST['filter']['terms'][$i]['attr'] == "StateId" ) {
$states = array();
foreach ( dbFetchAll( 'SELECT Id,Name FROM States ORDER BY lower(Name) ASC' ) as $state_row ) {
$states[$state_row['Id']] = $state_row['Name'];
@ -218,9 +216,7 @@ for ( $i = 0; isset($_REQUEST['filter']) && $i < count($_REQUEST['filter']['term
<td><?php echo buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td>
<td><?php echo buildSelect( "filter[terms][$i][val]", $states ); ?></td>
<?php
}
elseif ( $_REQUEST['filter']['terms'][$i]['attr'] == "Weekday" )
{
} elseif ( $_REQUEST['filter']['terms'][$i]['attr'] == "Weekday" ) {
?>
<td><?php echo buildSelect( "filter[terms][$i][op]", $opTypes ); ?></td>
<td><?php echo buildSelect( "filter[terms][$i][val]", $weekdays ); ?></td>

View File

@ -97,9 +97,9 @@ function initPage()
function applySort(event, ui) {
var monitor_ids = $j(this).sortable('toArray');
var ajax = new Request.JSON( {
url: '/index.php?request=console',
url: '/index.php?request=console',
data: { monitor_ids: monitor_ids, action: 'sort' },
method: 'post',
method: 'post',
timeout: AJAX_TIMEOUT
} );
ajax.send();