diff --git a/applications/luci-app-upnp/luasrc/view/upnp_status.htm b/applications/luci-app-upnp/luasrc/view/upnp_status.htm index 1e09225793..459c63c1d7 100644 --- a/applications/luci-app-upnp/luasrc/view/upnp_status.htm +++ b/applications/luci-app-upnp/luasrc/view/upnp_status.htm @@ -16,40 +16,39 @@ var tb = document.getElementById('upnp_status_table'); if (st && tb) { - /* clear all rows */ - while (tb.firstElementChild !== tb.lastElementChild) - tb.removeChild(tb.lastElementChild); + var rows = []; for (var i = 0; i < st.length; i++) - tb.appendChild(E('
'.format((i % 2) + 1), [ - E('
', st[i].proto), - E('
', st[i].extport), - E('
', st[i].intaddr), - E('
', st[i].intport), - E('
', st[i].descr), - E(''.format(st[i].num)) - ])); + rows.push([ + st[i].proto, + st[i].extport, + st[i].intaddr, + st[i].intport, + st[i].descr, + E(''.format(st[i].num)) + ]); - if (tb.firstElementChild === tb.lastElementChild) - tb.appendChild(E('

<%:There are no active redirects.%>
')); + cbi_update_table(tb, rows, '<%:There are no active redirects.%>'); } } ); //]]> -
+
<%:Active UPnP Redirects%> -
-
-
<%:Protocol%>
-
<%:External Port%>
-
<%:Client Address%>
-
<%:Client Port%>
-
<%:Description%>
-
 
-
-
-

<%:Collecting data...%>
+
+
+
+
<%:Protocol%>
+
<%:External Port%>
+
<%:Client Address%>
+
<%:Client Port%>
+
<%:Description%>
+
 
+
+
+
<%:Collecting data...%>
+
-
+