Skip to content

Commit

Permalink
oZones: generate host usage bars with sunstone-util function
Browse files Browse the repository at this point in the history
(cherry picked from commit 510f9e8)
  • Loading branch information
Hector Sanjuan authored and rsmontero committed Jul 18, 2012
1 parent 477c032 commit 228933c
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/ozones/Server/public/js/ozones-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,19 +301,9 @@ function hostElementArray(host,zone_id,zone_name){


//progressbars html code - hardcoded jquery html result
var pb_mem =
'<div style="height:10px" class="ratiobar ui-progressbar ui-widget ui-widget-content ui-corner-all" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="'+ratio_mem+'">\
<div class="ui-progressbar-value ui-widget-header ui-corner-left ui-corner-right" style="width: '+ratio_mem+'%;"/>\
<span style="position:relative;left:68px;top:-4px;font-size:0.6em">'+ratio_mem+'%</span>\
</div>\
</div>';

var pb_cpu =
'<div style="height:10px" class="ratiobar ui-progressbar ui-widget ui-widget-content ui-corner-all" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="'+ratio_cpu+'">\
<div class="ui-progressbar-value ui-widget-header ui-corner-left ui-corner-right" style="width: '+ratio_cpu+'%;"/>\
<span style="position:relative;left:68px;top:-4px;font-size:0.6em">'+ratio_cpu+'%</span>\
</div>\
</div>';
var pb_mem = progressBar(ratio_mem, {label: ratio_mem + '%', labelHPos: '65px'});

var pb_cpu = progressBar(ratio_cpu, {label: ratio_cpu + '%', labelHPos: '65px'});

if (zone_id){
return [
Expand Down

0 comments on commit 228933c

Please sign in to comment.