X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fadmin-full%2Fluasrc%2Fview%2Fadmin_status%2Fconnections.htm;h=80c8b70e3c3e9a0687ca71863d223f1c8575c47a;hp=9c9eb01c966408682693eee45b5ed1caa9a4f992;hb=f16df257b8ba224661d3707f7f69b43b4d47e36b;hpb=b22f022f2c3652a5af3c1ef843a9b06eba851404 diff --git a/modules/admin-full/luasrc/view/admin_status/connections.htm b/modules/admin-full/luasrc/view/admin_status/connections.htm index 9c9eb01c9..80c8b70e3 100644 --- a/modules/admin-full/luasrc/view/admin_status/connections.htm +++ b/modules/admin-full/luasrc/view/admin_status/connections.htm @@ -8,8 +8,6 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -$Id$ - -%> <%+header%> @@ -161,6 +159,10 @@ $Id$ for (var i = 0; i < conn.length; i++) { var c = conn[i]; + + if (c.src == '127.0.0.1' && c.dst == '127.0.0.1') + continue; + var tr = conn_table.rows[0].parentNode.insertRow(-1); tr.className = 'cbi-section-table-row cbi-rowstyle-' + (1 + (i % 2)); @@ -279,6 +281,18 @@ $Id$ pt_otr += ' ' + width + ',' + y_otr + ' ' + width + ',' + height; + var order = [ + [ line_udp, data_udp[data_udp.length-1] ], + [ line_tcp, data_tcp[data_tcp.length-1] ], + [ line_otr, data_otr[data_otr.length-1] ] + ]; + + order.sort(function(a, b) { return b[1] - a[1] }); + + for (var i = 0; i < order.length; i++) + order[i][0].parentNode.appendChild(order[i][0]); + + line_udp.setAttribute('points', pt_udp); line_tcp.setAttribute('points', pt_tcp); line_otr.setAttribute('points', pt_otr);