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++)
28 E('
<input class=
"cbi-button cbi-button-remove" type=
"button" value=
"<%:Delete%>" onclick=
"upnp_delete_fwd(%d)" />'.format(st[i].num))
31 cbi_update_table(tb, rows, '
<em><%:There are no active redirects.%
></em>');
37 <div class=
"cbi-section">
38 <legend><%:Active UPnP Redirects%
></legend>
39 <div class=
"cbi-section-node">
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"><%:Client Port%
></div>
46 <div class=
"th"><%:Description%
></div>
47 <div class=
"th cbi-section-actions"> </div>
50 <div class=
"td" colspan=
"5"><em><%:Collecting data...%
></em></div>