<%#
 Copyright 2017 Lede by stones
-%>

<% include("cbi/map") %>
<script type="text/javascript">//<![CDATA[
	XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "kuainiao", "status")%>', null,
		function(x, result)
		{
			var status = document.getElementById('kuainiao_status');
			status.innerHTML = result.running?'<font color=green><%=translate("RUNNING")%></font>':'<font color=red><%=translate("NOT RUNNING")%></font>';
		}
	);
	XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "kuainiao", "dwonstatus")%>', null,
		function(x, result)
		{
			var dwonstatus = document.getElementById('dwon_status');
			dwonstatus.innerHTML = (result.dwonstatus?result.dwonstatus:"--");
		}
	);
	XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "kuainiao", "upstatus")%>', null,
		function(x, result)
		{
			var upstatus = document.getElementById('up_status');
			upstatus.innerHTML = (result.upstatus?result.upstatus:"--");
		}
	);
//]]>
</script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
	<%:快鸟运行状态：%><em id="kuainiao_status"><%:Collecting data...%></em>
	<legend></legend>
	<legend></legend>
	<%:下行提速状态：%><em id="dwon_status"><%:Collecting data...%></em>
	<legend></legend>
	<%:上行提速状态：%><em id="up_status"><%:Collecting data...%></em>
</fieldset>