diff options
author | Charlie Marshall <charlie0440@gmail.com> | 2013-08-14 15:05:34 +0100 |
---|---|---|
committer | Charlie Marshall <charlie0440@gmail.com> | 2013-08-14 15:09:52 +0100 |
commit | bc0a344b926c28b305245c93d80a5b09d6e1f431 (patch) | |
tree | 6e00482ce6d364224fa96a4b77c9865335237e2c /usr/local/www/javascript | |
parent | 38546223ee7d3a6b79ce8958de1b70538bd2afb5 (diff) | |
download | pfsense-bc0a344b926c28b305245c93d80a5b09d6e1f431.zip pfsense-bc0a344b926c28b305245c93d80a5b09d6e1f431.tar.gz |
convert dashboard progress bars to jqueryUI
Diffstat (limited to 'usr/local/www/javascript')
-rw-r--r-- | usr/local/www/javascript/index/ajax.js | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/usr/local/www/javascript/index/ajax.js b/usr/local/www/javascript/index/ajax.js index fa33914..73bd208 100644 --- a/usr/local/www/javascript/index/ajax.js +++ b/usr/local/www/javascript/index/ajax.js @@ -51,10 +51,8 @@ function stats(x) { function updateMemory(x) { if(jQuery('#memusagemeter')) jQuery("#memusagemeter").html(x + '%'); - if(jQuery('#memwidtha')) - jQuery("#memwidtha").css('width',x + 'px'); - if(jQuery('#memwidthb')) - jQuery("#memwidthb").css('width', (100 - x) + 'px'); + if(jQuery('#memUsagePB')) + jQuery('#memUsagePB').progressbar( { value: parseInt(x) } ); } function updateMbuf(x) { @@ -65,19 +63,15 @@ function updateMbuf(x) { function updateMbufMeter(x) { if(jQuery('#mbufusagemeter')) jQuery("#mbufusagemeter").html(x + '%'); - if(jQuery('#mbufwidtha')) - jQuery("#mbufwidtha").css('width',x + 'px'); - if(jQuery('#mbufwidthb')) - jQuery("#mbufwidthb").css('width', (100 - x) + 'px'); + if(jQuery('#mbufPB')) + jQuery('#mbufPB').progressbar( { value: parseInt(x) } ); } function updateCPU(x) { if(jQuery('#cpumeter')) jQuery("#cpumeter").html(x + '%'); - if(jQuery('#cpuwidtha')) - jQuery("#cpuwidtha").css('width',x + 'px'); - if(jQuery('#cpuwidthb')) - jQuery("#cpuwidthb").css('width',(100 - x) + 'px'); + if(jQuery('#cpuPB')) + jQuery('#cpuPB').progressbar( { value: parseInt(x) } ); /* Load CPU Graph widget if enabled */ if(widgetActive('cpu_graphs')) { GraphValue(graph[0], x); @@ -87,10 +81,8 @@ function updateCPU(x) { function updateTemp(x) { if(jQuery("#tempmeter")) jQuery("#tempmeter").html(x + '\u00B0' + 'C'); - if(jQuery('#tempwidtha')) - jQuery("#tempwidtha").css('width',x + 'px'); - if(jQuery('#tempwidthb')) - jQuery("#tempwidthb").css('width',(100 - x) + 'px'); + if(jQuery('#tempPB')) + jQuery("#tempPB").progressbar( { value: parseInt(x) } ); } function updateDateTime(x) { @@ -111,10 +103,8 @@ function updateState(x) { function updateStateMeter(x) { if(jQuery('#pfstateusagemeter')) jQuery("#pfstateusagemeter").html(x + '%'); - if(jQuery('#pfstatewidtha')) - jQuery("#pfstatewidtha").css('width',x + 'px'); - if(jQuery('#pfstatewidthb')) - jQuery("#pfstatewidthb").css('width',(100 - x) + 'px'); + if(jQuery('#statePB')) + jQuery('#statePB').progressbar( { value: parseInt(x) } ); } function updateGatewayStats(x){ @@ -192,4 +182,5 @@ function widgetActive(x) { /* start updater */ jQuery(document).ready(function(){ setTimer(); -});
\ No newline at end of file +}); + |