SAAS-1022: Re-implement disk quota status on side nav bar

This commit is contained in:
drigato 2015-08-21 09:08:36 -04:00
parent d9455f86ea
commit f48c7186ca
3 changed files with 80 additions and 17 deletions

View file

@ -88,6 +88,24 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
<?php echo $this->navigation()->menu(); ?>
</div>
<?php
$partitions = Application_Model_Systemstatus::GetDiskInfo();
$status = new StdClass;
$partitions = $partitions;
$disk = $partitions[0];
$used = $disk->totalSpace-$disk->totalFreeSpace;
$total = $disk->totalSpace;
?>
<div id="disk_usage">
<div style="padding-bottom: 2px;">Disk Usage</div>
<div class="disk_usage_progress_bar"></div>
<div class="disk_usage_percent_in_use"><?php echo sprintf("%01.1f%% ", $used/$total*100) . _("in use") ?></div>
<div class="disk_usage_used" style="width:<?php echo sprintf("%01.1f%%", $used/$total*100) ?>;"></div>
<div style="margin-top: 15px; font-size: 12px;"><?php echo sprintf("%01.1fGB of %01.1fGB", $used/pow(2, 30), $total/pow(2, 30)); ?></div>
</div>
</div>
<?php $hint = Application_Common_UsabilityHints::getUsabilityHint(); ?>

View file

@ -97,6 +97,24 @@
<div id="nav">
<?php echo $this->navigation()->menu(); ?>
</div>
<?php
$partitions = Application_Model_Systemstatus::GetDiskInfo();
$status = new StdClass;
$partitions = $partitions;
$disk = $partitions[0];
$used = $disk->totalSpace-$disk->totalFreeSpace;
$total = $disk->totalSpace;
?>
<div id="disk_usage">
<div style="padding-bottom: 2px;">Disk Usage</div>
<div class="disk_usage_progress_bar"></div>
<div class="disk_usage_percent_in_use"><?php echo sprintf("%01.1f%% ", $used/$total*100) . _("in use") ?></div>
<div class="disk_usage_used" style="width:<?php echo sprintf("%01.1f%%", $used/$total*100) ?>;"></div>
<div style="margin-top: 15px; font-size: 12px;"><?php echo sprintf("%01.1fGB of %01.1fGB", $used/pow(2, 30), $total/pow(2, 30)); ?></div>
</div>
</div>
<?php $hint = Application_Common_UsabilityHints::getUsabilityHint(); ?>