Restore full disk usage not based on quota

This is mostly a restore of how this used to be implemented.
This commit is contained in:
Lucas Bickel 2017-03-08 15:55:33 +01:00
parent b15abbd82f
commit 70e6135e93
3 changed files with 13 additions and 44 deletions

View file

@ -17,12 +17,6 @@
$r1 = array_reduce($phpDependencies, "booleanReduce", true);
$r2 = array_reduce($externalServices, "booleanReduce", true);
$result = $r1 && $r2;
// Disk information. We only use the [0]th index
// because we don't have Watched/Media Folders
$disk = $this->status->partitions[0];
$used = $disk->totalSpace-$disk->totalFreeSpace;
$total = $disk->totalSpace;
?>
<table width="60%" cellpadding="0" cellspacing="0" border="0" class="statustable">
@ -159,22 +153,4 @@
<tr id="partitions" class="even">
<th colspan="5"><?php echo _("Disk Space") ?></th>
</tr>
<tr class="partition-info">
<td><span class="strong"><?php echo _("Disk") ?></span>
<ul id="watched-dir-list">
</ul>
</td>
<td>
<?php
echo sprintf("%01.1fGB of %01.1fGB", $used/pow(2, 30), $total/pow(2, 30))
?>
</td>
<td colspan="3">
<div class="big">
<div class="diskspace" style="width:<?php echo sprintf("%01.1f%%", $used/$total*100) ?>;">
</div>
</div>
<div><?php echo sprintf("%01.1f%% ", $used/$total*100) . _("in use") ?></div>
</td>
</tr>
</table>