summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorCharlie Marshall <charlie0440@gmail.com>2013-08-15 19:17:27 +0100
committerCharlie Marshall <charlie0440@gmail.com>2013-08-15 19:17:27 +0100
commit5ef8ec8891b59d08d8d6f947cba2c88d4785a2fc (patch)
tree667765cfec51ae5c0a94950e162ddc3b97d6f0b2 /usr/local
parent9a478340a55ec0005bbf8c7a1d7873723d4bd006 (diff)
downloadpfsense-5ef8ec8891b59d08d8d6f947cba2c88d4785a2fc.zip
pfsense-5ef8ec8891b59d08d8d6f947cba2c88d4785a2fc.tar.gz
fix swap & temp
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/www/widgets/widgets/system_information.widget.php15
1 files changed, 8 insertions, 7 deletions
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: <?php echo get_mbuf(true); ?> } );
jQuery("#cpuPB").progressbar( { value:false } );
jQuery("#memUsagePB").progressbar( { value: <?php echo mem_usage(); ?> } );
- jQuery("#diskUsagePB").progressbar( { value: <?php echo disk_usage(); ?> } );
+ jQuery("#diskUsagePB").progressbar( { value: <?php echo disk_usage(); ?> } );
+
+ <?php if($showswap == true): ?>
+ jQuery("#swapUsagePB").progressbar( { value: <?php echo swap_usage(); ?> } );
+ <?php endif; ?>
+ <?php if (get_temp() != ""): ?>
+ jQuery("#tempPB").progressbar( { value: <?php echo get_temp(); ?> } );
+ <?php endif; ?>
});
</script>
<link rel="stylesheet" href="javascript/jquery/jquery-ui.custom.css" />
@@ -221,9 +228,6 @@ $curcfg = $config['system']['firmware'];
<td width="25%" class="vncellt"><?=gettext("Temperature");?></td>
<td width="75%" class="listr">
<?php $TempMeter = $temp = get_temp(); ?>
- <script>
- jQuery("#tempPB").progressbar( { value: <?php echo get_temp(); ?> } );
- </script>
<div id="tempPB"></div>
<span id="tempmeter"><?= $temp."&#176;C"; ?></span>
</td>
@@ -255,9 +259,6 @@ $curcfg = $config['system']['firmware'];
<td width="25%" class="vncellt"><?=gettext("SWAP usage");?></td>
<td width="75%" class="listr">
<?php $swapusage = swap_usage(); ?>
- <script>
- jQuery("#swapUsagePB").progressbar( { value: <?php echo swap_usage(); ?> } );
- </script>
<div id="swapUsagePB"></div>
<span id="swapusagemeter"><?= $swapusage.'%'; ?></span> of <?= sprintf("%.0f", `/usr/sbin/swapinfo -m | /usr/bin/grep -v Device | /usr/bin/awk '{ print $2;}'`) ?> MB
</td>
OpenPOWER on IntegriCloud