- <%
- for i, net in ipairs(netlist) do
- local z = net[3]
- local c = z and z:get_color() or "#EEEEEE"
- local t = z and translate("Part of zone %q" % z:name()) or translate("No zone assigned")
- %>
-
-
-
-
- <%=net[1]:upper()%>
-
-
-

-
?
+
+
- <% end %>
+ <% end %>
+
'" />
-
+
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm
index 58f5400da7..9c5173dae2 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm
@@ -6,29 +6,18 @@
{
if (ifc && (ifc = ifc[0]))
{
- var html = '';
+ var s = document.getElementById('<%=self.option%>-ifc-status'),
+ img = s.querySelector('img'),
+ info = s.querySelector('span'),
+ html = '
<%:Device%>: %h
'.format(ifc.ifname);
- var s = document.getElementById('<%=self.option%>-ifc-signal');
- if (s)
- s.innerHTML = String.format(
- '

' +
- '
%s',
- ifc.type, ifc.is_up ? '' : '_disabled',
- ifc.name
- );
-
- var d = document.getElementById('<%=self.option%>-ifc-description');
- if (d && ifc.ifname)
+ if (ifc.ifname)
{
if (ifc.is_up)
- {
html += String.format('
<%:Uptime%>: %t
', ifc.uptime);
- }
if (ifc.macaddr)
- {
html += String.format('
<%:MAC-Address%>: %s
', ifc.macaddr);
- }
html += String.format(
'
<%:RX%>: %.2mB (%d <%:Pkts.%>)
' +
@@ -38,50 +27,40 @@
);
if (ifc.ipaddrs && ifc.ipaddrs.length)
- {
for (var i = 0; i < ifc.ipaddrs.length; i++)
html += String.format(
'
<%:IPv4%>: %s
',
ifc.ipaddrs[i]
);
- }
if (ifc.ip6addrs && ifc.ip6addrs.length)
- {
for (var i = 0; i < ifc.ip6addrs.length; i++)
html += String.format(
'
<%:IPv6%>: %s
',
ifc.ip6addrs[i]
);
- }
-
- if (ifc.ip6prefix)
- {
- html += String.format('
<%:IPv6-PD%>: %s
', ifc.ip6prefix);
- }
- d.innerHTML = html;
+ if (ifc.ip6prefix)
+ html += String.format('
<%:IPv6-PD%>: %s
', ifc.ip6prefix);
+
+ info.innerHTML = html;
}
- else if (d)
+ else
{
- d.innerHTML = '
<%:Interface not present or not connected yet.%>';
+ info.innerHTML = '
<%:Interface not present or not connected yet.%>';
}
+
+ img.src = '<%=resource%>/icons/%s%s.png'.format(ifc.type, ifc.is_up ? '' : '_disabled');
}
}
);
//]]>
-
-
-
-
-

-
?
-
-
- <%:Collecting data...%>
-
-
-
+
+
+
+ <%:Collecting data...%>
+
+
<%+cbi/valuefooter%>
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm
index 9005279a4e..a1b2c8454d 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm
@@ -34,7 +34,7 @@
else
timestr = String.format('%t', st[0][i].expires);
- tb.appendChild(E('
'.format((i % 2) + 1), [
+ tb.appendChild(E('
'.format((i % 2) + 1), [
E('
', st[0][i].hostname || '?'),
E('
', st[0][i].ipaddr),
E('
', st[0][i].macaddr),
@@ -43,7 +43,7 @@
}
if (tb.firstElementChild === tb.lastElementChild)
- tb.appendChild(E('
<%:There are no active leases.%>
'));
+ tb.appendChild(E('
<%:There are no active leases.%>
'));
}
var tb6 = document.getElementById('lease6_status_table');
@@ -79,8 +79,8 @@
hint = host.name;
}
- tb6.appendChild(E('
'.format((i % 2) + 1), [
- E('
', hint ? '
%h (%h)
'.format(name || '?', hint) : (name || '?')),
+ tb6.appendChild(E('
'.format((i % 2) + 1), [
+ E('
', hint ? '%h (%h)'.format(name || '?', hint) : (name || '?')),
E('
', st[1][i].ip6addr),
E('
', st[1][i].duid),
E('
', timestr)
@@ -88,7 +88,7 @@
}
if (tb6.firstElementChild === tb6.lastElementChild)
- tb6.appendChild(E('
<%:There are no active leases.%>
'));
+ tb6.appendChild(E('
<%:There are no active leases.%>
'));
}
}
);
@@ -96,14 +96,14 @@