SAAS-1243: Bandwidth usage status on Listener Stats page

This commit is contained in:
drigato 2015-11-26 13:25:44 -05:00
parent 786b357ed5
commit 21846be7ed
2 changed files with 24 additions and 3 deletions

View file

@ -1,4 +1,16 @@
<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>