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(); ?> <?php echo $this->navigation()->menu(); ?>
</div> </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> </div>
<?php $hint = Application_Common_UsabilityHints::getUsabilityHint(); ?> <?php $hint = Application_Common_UsabilityHints::getUsabilityHint(); ?>

View file

@ -97,6 +97,24 @@
<div id="nav"> <div id="nav">
<?php echo $this->navigation()->menu(); ?> <?php echo $this->navigation()->menu(); ?>
</div> </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> </div>
<?php $hint = Application_Common_UsabilityHints::getUsabilityHint(); ?> <?php $hint = Application_Common_UsabilityHints::getUsabilityHint(); ?>

View file

@ -2930,23 +2930,7 @@ tfoot tr th {
-moz-border-radius: 4px; -moz-border-radius: 4px;
font-size:13px; font-size:13px;
} }
.statustable .big {
width:120px;
height:10px;
background:#444444;
background: -moz-linear-gradient(top, #464646 0, #3e3e3e 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #3e3e3e), color-stop(100%, #464646));
border-bottom:1px solid #fff;
margin: 0 auto;
padding: 1px;
display:inline-block;
}
.diskspace {
background-color:#e76400;
background: -moz-linear-gradient(top, #ff6f01 0, #bc5200 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #ff6f01), color-stop(100%, #bc5200));
height:10px;
}
.statustable a { .statustable a {
color: #222; color: #222;
text-decoration: underline; text-decoration: underline;
@ -3673,3 +3657,46 @@ hr {
display:inline; display:inline;
margin-right:4px margin-right:4px
} }
#disk_usage {
border-radius: 1px;
position: fixed;
width: 120px;
font-size: 14px;
text-align: center;
bottom: 5px;
left: 10px;
padding: 3px 5px;
background-color: #242424;
border: 1px solid #5b5b5b;
color: #ccc;
}
.disk_usage_progress_bar {
width:120px;
height:13px;
background:#444444;
background: -moz-linear-gradient(top, #464646 0, #3e3e3e 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #3e3e3e), color-stop(100%, #464646));
margin: 0 auto;
z-index: 1;
position:absolute;
}
.disk_usage_percent_in_use {
color: #fff;
font-size: 10px;
z-index: 3;
position:absolute;
width: 120px;
line-height: 13px;
}
.disk_usage_used {
background-color:#e76400;
background: -moz-linear-gradient(top, #ff6f01 0, #bc5200 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #ff6f01), color-stop(100%, #bc5200));
height:13px;
z-index: 2;
position:absolute;
}