Project

General

Profile

« Previous | Next » 

Revision 1804023d

Added by Bill Marquette almost 20 years ago

Make 4801 temp monitor work (and make it work with sajax)

View differences:

usr/local/www/index.php
50 50
	$oSajax = new sajax();
51 51
	$oSajax->sajax_remote_uri = 'sajax/index.sajax.php';
52 52
	$oSajax->sajax_request_type = 'POST';
53
	$oSajax->sajax_export("mem_usage","cpu_usage","get_uptime","get_pfstate");
53
	$oSajax->sajax_export("mem_usage","cpu_usage","get_uptime","get_pfstate", "get_temp");
54 54
	$oSajax->sajax_handle_client_request();
55 55
	############################################################################
56 56

  
......
211 211
<?php
212 212
		/* XXX - Stub in the HW monitor for net4801 - needs to use platform var's once we start using them */
213 213
		/* 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 */
214
		$is4801 = `/sbin/dmesg -a | grep NET4801`;
214
		$is4801 = `/sbin/dmesg -a | /usr/bin/grep net4801`;
215 215
		if($is4801 <> ""):
216 216
			exec("/usr/local/sbin/env4801 -i");
217
			$Temp = rtrim(`/usr/local/sbin/env4801 | grep Temp |cut -c24-25`);
217
			$hwtype = "4801";
218
			
218 219
?>
219 220
		<tr>
220 221
			<td width='25%' class='vncellt'>Temperature</td>
221 222
			<td width='75%' class='listr'>
223
				<?php $temp = get_temp($hwtype); ?>
222 224
				<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" />
223 225
				&nbsp;
224 226
				<input style="border: 0px solid white;" size="30" name="Tempmeter" id="Tempmeter" value="<?= $temp."C"; ?>" />

Also available in: Unified diff