Merge branch 'saas-dev' of github.com:sourcefabric/airtime into saas-dev

This commit is contained in:
Duncan Sommerville 2015-11-26 18:54:54 -05:00
commit 5eaf74bbd9
2 changed files with 17 additions and 12 deletions

View File

@ -1,16 +1,4 @@
<div id="listenerstat_content" class="alpha-block padded">
<?php $bandwidthUsage = Application_Model_Preference::getBandwidthLimitCounter(); ?>
<?php $bandwidthLimit = Application_Model_Preference::getBandwidthLimit(); ?>
<?php $percentInUse = sprintf("%01.1f%% ", $bandwidthUsage/$bandwidthLimit*100); ?>
<div id="bandwidth_usage">
<div style="padding-bottom: 2px;"><?php echo _("Monthly Listener Bandwidth Usage") ?></div>
<div class="bandwidth_usage_progress_bar"></div>
<div class="bandwidth_usage_percent_in_use"><?php echo $percentInUse . _("in use") ?></div>
<div class="bandwidth_usage_used" style="width:<?php echo sprintf("%01.1f%%", min(100, $bandwidthUsage/$bandwidthLimit*100)) ?>;"></div>
<div style="margin-top: 17px; font-size: 12px;"><?php echo sprintf("%01.1fGB of %01.1fGB", $bandwidthUsage/pow(2, 30), $bandwidthLimit/pow(2, 30)); ?></div>
</div>
<H2><?php echo _("Listeners")?></H2>
<div id="flot_placeholder" style="height:300px;margin:0px 50px 0px 50px"></div>
<div id="legend" style="width:600px;height:70px;margin:0px 50px 0px 50px"></div>
@ -26,4 +14,16 @@
<?php }?>
</fieldset>
</div>
<div style="clear: both;"></div>
<?php $bandwidthUsage = Application_Model_Preference::getBandwidthLimitCounter(); ?>
<?php $bandwidthLimit = Application_Model_Preference::getBandwidthLimit(); ?>
<?php $percentInUse = sprintf("%01.1f%% ", $bandwidthUsage/$bandwidthLimit*100); ?>
<div id="bandwidth_usage">
<div style="padding-bottom: 2px;"><?php echo _("Monthly Listener Bandwidth Usage") ?></div>
<div class="bandwidth_usage_progress_bar"></div>
<div class="bandwidth_usage_percent_in_use"><?php echo $percentInUse . _("in use") ?></div>
<div class="bandwidth_usage_used" style="width:<?php echo sprintf("%01.1f%%", min(100, $bandwidthUsage/$bandwidthLimit*100)) ?>;"></div>
<div style="margin-top: 17px; font-size: 12px;"><?php echo sprintf("%01.1fGB of %01.1fGB", $bandwidthUsage/pow(2, 30), $bandwidthLimit/pow(2, 30)); ?></div>
</div>
</div>

View File

@ -3925,6 +3925,11 @@ hr {
color: #ccc;
}
/* Remove me! */
#bandwidth_usage {
display: none;
}
.disk_usage_progress_bar, .bandwidth_usage_progress_bar {
float: left;
width: 100%;