From 38546223ee7d3a6b79ce8958de1b70538bd2afb5 Mon Sep 17 00:00:00 2001 From: Charlie Marshall Date: Wed, 14 Aug 2013 14:34:55 +0100 Subject: ammend css for jquery progressbars --- usr/local/www/javascript/jquery/jquery-ui.custom.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/javascript/jquery/jquery-ui.custom.css b/usr/local/www/javascript/jquery/jquery-ui.custom.css index 6f4a5ac..de3fe12 100755 --- a/usr/local/www/javascript/jquery/jquery-ui.custom.css +++ b/usr/local/www/javascript/jquery/jquery-ui.custom.css @@ -58,7 +58,7 @@ .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Helvetica, Arial, sans-serif; font-size: 1em; } .ui-widget-content { border: 1px solid #aaaaaa; background: #c9c9c9 url(images/ui-bg_inset-soft_50_c9c9c9_1x100.png) 50% bottom repeat-x; color: #333333; } .ui-widget-content a { color: #333333; } -.ui-widget-header { border: 1px solid #bbbbbb; background: #dddddd url(images/ui-bg_glass_35_dddddd_1x400.png) 50% 50% repeat-x; color: #444444; font-weight: bold; } +.ui-widget-header { border: 1px solid #bbbbbb; color: #444444; font-weight: bold; } .ui-widget-header a { color: #444444; } /* Interaction states @@ -562,4 +562,4 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad * http://docs.jquery.com/UI/Progressbar#theming */ .ui-progressbar { height:2em; text-align: left; overflow: hidden; } -.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; background-color:#990000; } -- cgit v1.1 From bc0a344b926c28b305245c93d80a5b09d6e1f431 Mon Sep 17 00:00:00 2001 From: Charlie Marshall Date: Wed, 14 Aug 2013 15:05:34 +0100 Subject: convert dashboard progress bars to jqueryUI --- usr/local/www/javascript/index/ajax.js | 33 ++++++--------- .../widgets/widgets/system_information.widget.php | 48 +++++++++++++--------- 2 files changed, 41 insertions(+), 40 deletions(-) (limited to 'usr/local') 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 +}); + diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php index 2bba499..bfb39cb 100644 --- a/usr/local/www/widgets/widgets/system_information.widget.php +++ b/usr/local/www/widgets/widgets/system_information.widget.php @@ -85,6 +85,16 @@ if($_REQUEST['getupdatestatus']) { $curcfg = $config['system']['firmware']; ?> + + @@ -189,8 +199,8 @@ $curcfg = $config['system']['firmware']; - left barred bargray barright bar -
() +
+ ()
@@ -202,8 +212,8 @@ $curcfg = $config['system']['firmware']; $mbufstext = get_mbuf(); $mbufusage = get_mbuf(true); ?> - left barred bargray barright bar -
() +
+ () @@ -211,8 +221,10 @@ $curcfg = $config['system']['firmware']; @@ -226,19 +238,16 @@ $curcfg = $config['system']['firmware']; @@ -246,9 +255,11 @@ $curcfg = $config['system']['firmware']; @@ -256,9 +267,8 @@ $curcfg = $config['system']['firmware']; -- cgit v1.1 From 9a478340a55ec0005bbf8c7a1d7873723d4bd006 Mon Sep 17 00:00:00 2001 From: Charlie Marshall Date: Wed, 14 Aug 2013 15:56:11 +0100 Subject: reduce height of progress bars --- usr/local/www/javascript/jquery/jquery-ui.custom.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local') diff --git a/usr/local/www/javascript/jquery/jquery-ui.custom.css b/usr/local/www/javascript/jquery/jquery-ui.custom.css index de3fe12..7dca82a 100755 --- a/usr/local/www/javascript/jquery/jquery-ui.custom.css +++ b/usr/local/www/javascript/jquery/jquery-ui.custom.css @@ -561,5 +561,5 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad * * http://docs.jquery.com/UI/Progressbar#theming */ -.ui-progressbar { height:2em; text-align: left; overflow: hidden; } +.ui-progressbar { height:1em; text-align: left; overflow: hidden; } .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; background-color:#990000; } -- cgit v1.1 From 5ef8ec8891b59d08d8d6f947cba2c88d4785a2fc Mon Sep 17 00:00:00 2001 From: Charlie Marshall Date: Thu, 15 Aug 2013 19:17:27 +0100 Subject: fix swap & temp --- .../www/widgets/widgets/system_information.widget.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php index bfb39cb..398fc47 100644 --- a/usr/local/www/widgets/widgets/system_information.widget.php +++ b/usr/local/www/widgets/widgets/system_information.widget.php @@ -91,7 +91,14 @@ $curcfg = $config['system']['firmware']; jQuery("#mbufPB").progressbar( { value: } ); jQuery("#cpuPB").progressbar( { value:false } ); jQuery("#memUsagePB").progressbar( { value: } ); - jQuery("#diskUsagePB").progressbar( { value: } ); + jQuery("#diskUsagePB").progressbar( { value: } ); + + + jQuery("#swapUsagePB").progressbar( { value: } ); + + + jQuery("#tempPB").progressbar( { value: } ); + }); @@ -221,9 +228,6 @@ $curcfg = $config['system']['firmware']; @@ -255,9 +259,6 @@ $curcfg = $config['system']['firmware']; -- cgit v1.1
- left barred bargray barright bar -   + +
- - left barred bargray barright bar -   -
(Updating in 10 seconds) +
+ (Updating in 10 seconds)
- left barred bargray barright bar -   -
of MB +
+ of MB
- left barred bargray barright bar -   -
of MB + +
+ of MB
- /images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" />/images/misc/bar_blue.gif" height="15" width="" border="0" align="middle" alt="red bar" />/images/misc/bar_gray.gif" height="15" width="" border="0" align="middle" alt="gray bar" />/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" /> -   -
of +
+ of
-
-
of MB