Merge branch 'storageareas' of github.com:ZoneMinder/ZoneMinder into storageareas
This commit is contained in:
commit
cc763a858e
|
@ -1477,12 +1477,12 @@ function getDiskPercent() {
|
||||||
else {
|
else {
|
||||||
$spaceString = '';
|
$spaceString = '';
|
||||||
}
|
}
|
||||||
$storageAreas = dbFetchAll("select path, name from Storage order by Id");
|
$storageAreas = Storage::find_all();
|
||||||
foreach($storageAreas as $storagePath) {
|
foreach($storageAreas as $storageArea) {
|
||||||
$storageTotal = disk_total_space($storagePath['path']);
|
$storageTotal = disk_total_space($storageArea->Path);
|
||||||
$storageFree = disk_free_space($storagePath['path']);
|
$storageFree = disk_free_space($storageArea->Path);
|
||||||
$storageSpace = round(($storageTotal - $storageFree) / $storageTotal * 100);
|
$storageSpace = round(($storageTotal - $storageFree) / $storageTotal * 100);
|
||||||
$spaceString .= ', '.$storagePath['name'].' '.$storageSpace;
|
$spaceString .= ', '.$storageArea->Name.' '.$storageSpace.'%';
|
||||||
}
|
}
|
||||||
return( $spaceString );
|
return( $spaceString );
|
||||||
}
|
}
|
||||||
|
|
|
@ -249,7 +249,7 @@ function getNavBarHTML() {
|
||||||
</div>
|
</div>
|
||||||
<ul class="list-inline">
|
<ul class="list-inline">
|
||||||
<li><?php echo translate('Load') ?>: <?php echo getLoad() ?></li>
|
<li><?php echo translate('Load') ?>: <?php echo getLoad() ?></li>
|
||||||
<li><?php echo translate('Storage') ?>: <?php echo getDiskPercent() ?>%</li>
|
<li><?php echo translate('Storage') ?>: <?php echo getDiskPercent() ?></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div> <!-- End .footer -->
|
</div> <!-- End .footer -->
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue