
<fieldset class="cbi-section">
	<legend><%:Running Status%></legend>
	<table width="100%" cellspacing="10" id="_speederv2_status_table">
		<tr>
			<td width="33%"><%:Binary Version%></td>
			<td>
				<% if speederv2_version == "" then -%>
				<em><%:Invalid Binary File.%></em>
				<% else -%>
				<%=pcdata(speederv2_version)%>
				<%- end %>
			</td>
		</tr>
		<% if speederv2_build ~= "" then -%>
		<tr><td width="33%"><%:Build Time%></td><td><%=pcdata(speederv2_build)%></td></tr>
		<% end -%>
		<tr><td width="33%"><%:Running Status%></td><td id="_speederv2_status"><em><%:Collecting data...%></em></td></tr>
	</table>
</fieldset>

<script type="text/javascript">//<![CDATA[
	var speederv2_status = document.getElementById('_speederv2_status');
	XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "speederv2", "status")%>', null, function(x, status) {
		if ( x && x.status == 200 ) {
			speederv2_status.innerHTML = status.running ? '<%:RUNNING%>' : '<%:NOT RUNNING%>';
		}
	});
//]]></script>
