2 Copyright 2014 Aedan Renner <chipdankly@gmail.com>
3 Copyright 2018 Florian Eckert <fe@dev.tdt.de>
4 Licensed to the public under the GNU General Public License v2.
7 <script type="text/javascript">//<![CDATA[
8 XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_status")%>', null,
11 var statusDiv = document.getElementById('mwan_status_text');
12 if (status.interfaces)
15 for ( var iface in status.interfaces)
19 switch (status.interfaces[iface].status)
22 state = '<%:Online (tracking active)%>';
26 state = '<%:Offline%>';
30 state = '<%:Disabled%>';
34 statusview += String.format(
35 '<div class="alert-message %s">',
38 statusview += String.format(
39 '<div><strong>Interface: </strong>%s</div>',
42 statusview += String.format(
43 '<div><strong>Status: </strong>%s</div>',
46 statusview += '</div>'
48 statusDiv.innerHTML = statusview;
52 statusDiv.innerHTML = '<strong><%:No MWAN interfaces found%></strong>';
58 <style type="text/css">
59 #mwan_status_text > div {
60 display: inline-block;
69 <fieldset id="interface_field" class="cbi-section">
70 <legend><%:MWAN Interfaces%></legend>
71 <div id="mwan_status_text">
72 <img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" />
73 <%:Collecting data...%>