<div class="cbi-section">
	<div class="cbi-section-node">
		<h3><%:Status%></h3>
		<table class="table">
			<tbody>
			<tr class="tr"><td class="td"><%:Thermal zone%></td><td class="td"><%=self.thermal_zone%> (<%:type:%> <%=self.thermal_type%>)</td></tr>
			<tr class="tr"><td class="td"><%:Trip point%></td><td class="td">trip_point_<%=self.trip_point%></td></tr>
			<tr class="tr"><td class="td"><%:Fan start temperature%></td><td class="td" id="fan_on_temp"></td></tr>
			<tr class="tr"><td class="td"><%:Current temperature%></td><td class="td" id="zone_temp"></td></tr>
			</tbody>
		</table>
	</div>
</div>

<script type="text/javascript">//<![CDATA[
(function(){
	var fan_on_temp = document.getElementById('fan_on_temp');
	var zone_temp = document.getElementById('zone_temp');
	XHR.poll(3, '<%=url("admin/system/luci-fan/get_fan_info/"..self.thermal_zone.."/"..self.trip_point)%>', null,
		function(x, st) {
			if (st) {
				if (fan_on_temp)
					fan_on_temp.innerHTML = st.fan_on_temp + ' &#8451;';
				if (zone_temp)
					zone_temp.innerHTML = st.zone_temp + ' &#8451;';
			}
		}
	);
})()
//]]></script>