small-package/luci-app-bridge/luasrc/view/bridge/bridge_status.htm

23 lines
576 B
HTML

<script type="text/javascript">//<![CDATA[
XHR.poll(3, '<%=url([[admin]], [[network]], [[bridge]], [[status]])%>', null,
function(x, data) {
var tb = document.getElementById('bridge_status');
if (data && tb) {
if (data.running) {
tb.innerHTML = '<font color=green><%:RUNNING%></font>';
} else {
tb.innerHTML = '<font color=red><%:NOT RUNNING%></font>';
}
}
}
);
//]]>
</script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
<p id="bridge_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>