Merge ../ZoneMinder.master
commit
70b28eb8c2
|
@ -1429,15 +1429,15 @@ function getLoad() {
|
|||
return( $load[0] );
|
||||
}
|
||||
|
||||
function getDiskPercent() {
|
||||
$total = disk_total_space(ZM_DIR_EVENTS);
|
||||
function getDiskPercent($path = ZM_DIR_EVENTS) {
|
||||
$total = disk_total_space($path);
|
||||
if ( ! $total ) {
|
||||
Error("disk_total_space returned false for " . ZM_DIR_EVENTS );
|
||||
Error("disk_total_space returned false for " . $path );
|
||||
return 0;
|
||||
}
|
||||
$free = disk_free_space(ZM_DIR_EVENTS);
|
||||
$free = disk_free_space($path);
|
||||
if ( ! $free ) {
|
||||
Error("disk_free_space returned false for " . ZM_DIR_EVENTS );
|
||||
Error("disk_free_space returned false for " . $path );
|
||||
}
|
||||
$space = round(($total - $free) / $total * 100);
|
||||
return( $space );
|
||||
|
|
|
@ -195,7 +195,7 @@ xhtmlHeaders( __FILE__, translate('Console') );
|
|||
<input type="hidden" name="action" value=""/>
|
||||
<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() ?>%</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>
|
||||
<h3 id="development"><center><?php echo ZM_WEB_CONSOLE_BANNER ?></center></h3>
|
||||
|
|
Loading…
Reference in New Issue