summaryrefslogtreecommitdiffstats
path: root/usr/local/www/index.php
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-09-15 02:55:19 +0000
committerBill Marquette <billm@pfsense.org>2005-09-15 02:55:19 +0000
commit1804023da9ad604cb57af7e934352ef84e127736 (patch)
tree9e0289ec45e291b749467dab96dbe59b1cbf2b1a /usr/local/www/index.php
parent9f0309d3ab54a3c781fdbce3358e12f07eb7b893 (diff)
downloadpfsense-1804023da9ad604cb57af7e934352ef84e127736.zip
pfsense-1804023da9ad604cb57af7e934352ef84e127736.tar.gz
Make 4801 temp monitor work (and make it work with sajax)
Diffstat (limited to 'usr/local/www/index.php')
-rwxr-xr-xusr/local/www/index.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/local/www/index.php b/usr/local/www/index.php
index cfbd15b..be6e120 100755
--- a/usr/local/www/index.php
+++ b/usr/local/www/index.php
@@ -50,7 +50,7 @@
$oSajax = new sajax();
$oSajax->sajax_remote_uri = 'sajax/index.sajax.php';
$oSajax->sajax_request_type = 'POST';
- $oSajax->sajax_export("mem_usage","cpu_usage","get_uptime","get_pfstate");
+ $oSajax->sajax_export("mem_usage","cpu_usage","get_uptime","get_pfstate", "get_temp");
$oSajax->sajax_handle_client_request();
############################################################################
@@ -211,14 +211,16 @@ include("fbegin.inc");
<?php
/* XXX - Stub in the HW monitor for net4801 - needs to use platform var's once we start using them */
/* XXX - this should be grep net4801, but the graph doesn't update right now and I don't want to fix it right now - billm */
- $is4801 = `/sbin/dmesg -a | grep NET4801`;
+ $is4801 = `/sbin/dmesg -a | /usr/bin/grep net4801`;
if($is4801 <> ""):
exec("/usr/local/sbin/env4801 -i");
- $Temp = rtrim(`/usr/local/sbin/env4801 | grep Temp |cut -c24-25`);
+ $hwtype = "4801";
+
?>
<tr>
<td width='25%' class='vncellt'>Temperature</td>
<td width='75%' class='listr'>
+ <?php $temp = get_temp($hwtype); ?>
<img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" /><img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_blue.gif" height="15" name="Tempwidtha" id="tempwidtha" width="<?= $temp; ?>" border="0" align="middle" alt="blue bar" /><img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_gray.gif" height="15" name="Tempwidthb" id="tempwidthb" width="<?= (100 - $temp); ?>" border="0" align="middle" alt="gray bar" /><img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" />
&nbsp;
<input style="border: 0px solid white;" size="30" name="Tempmeter" id="Tempmeter" value="<?= $temp."C"; ?>" />
OpenPOWER on IntegriCloud