<fieldset class="cbi-section">
	<legend><%:Running Status%></legend>
	<table width="100%" cellspacing="10" id="_xlnetacc_status_table">
		<tr><td width="33%">FLOW 加速状态</td><td id="_run_state"><em><%:Collecting data...%></em></td></tr>
		<tr><td width="33%">BBR 加速</td><td id="_down_state"><em><%:Collecting data...%></em></td></tr>
		<tr><td width="33%">FULLCONE NAT加速</td><td id="_up_state"><em><%:Collecting data...%></em></td></tr>
		<tr><td width="33%">DNS 加速</td><td id="_dns_state"><em><%:Collecting data...%></em></td></tr>
	</table>
</fieldset>

<script type="text/javascript">//<![CDATA[
	var run_state = document.getElementById('_run_state');
	var down_state = document.getElementById('_down_state');
	var up_state = document.getElementById('_up_state');
	var dns_state = document.getElementById('_dns_state');
	XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "network", "flowoffload", "status")%>', null, function(x, status) {
		if ( x && x.status == 200 ) {
			run_state.innerHTML = status.run_state ? '<em><b><font color=green><%:RUNNING%></font></b></em>' : '<em><b><font color=red><%:NOT RUNNING%></font></b></em>';
			down_state.innerHTML = status.down_state ? '<em><b><font color=green><%:RUNNING%></font></b></em>' : '<em><b><font color=red><%:NOT RUNNING%></font></b></em>';
			up_state.innerHTML = status.up_state ? '<em><b><font color=green><%:RUNNING%></font></b></em>' : '<em><b><font color=red><%:NOT RUNNING%></font></b></em>';
			dns_state.innerHTML = status.dns_state ? '<em><b><font color=green><%:RUNNING%></font></b></em>' : '<em><b><font color=red><%:NOT RUNNING%></font></b></em>';
		}
	});
//]]></script>
