1 <script type="text/javascript">//<![CDATA[
2 function upnp_delete_fwd(idx) {
3 (new XHR()).post('<%=url('admin/services/upnp/delete')%>/' + idx, { token: '<%=token%>' },
6 var tb = document.getElementById('upnp_status_table');
7 if (tb && (idx + 1 < tb.childNodes.length))
8 tb.removeChild(tb.childNodes[idx + 1]);
13 XHR.poll(5, '<%=url('admin/services/upnp/status')%>', null,
16 var tb = document.getElementById('upnp_status_table');
21 for (var i = 0; i < st.length; i++)
26 st[i].host_hint || "<%:Unknown%>",
29 E('<div><input class="cbi-button cbi-button-remove" type="button" value="<%:Delete%>" onclick="upnp_delete_fwd(%d)" /></div>'.format(st[i].num))
32 cbi_update_table(tb, rows, '<em><%:There are no active redirects.%></em>');
38 <div class="cbi-section">
39 <h3><%:Active UPnP Redirects%></h3>
40 <div class="table" id="upnp_status_table">
41 <div class="tr table-titles">
42 <div class="th"><%:Protocol%></div>
43 <div class="th"><%:External Port%></div>
44 <div class="th"><%:Client Address%></div>
45 <div class="th"><%:Host%></div>
46 <div class="th"><%:Client Port%></div>
47 <div class="th"><%:Description%></div>
48 <div class="th cbi-section-actions"> </div>
50 <div class="tr placeholder">
51 <div class="td"><em><%:Collecting data...%></em></div>