X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fadmin-full%2Fluasrc%2Fview%2Fadmin_network%2Fiface_status.htm;h=ed5002bc6ce783b7aefa772720f0080472058d33;hp=7c0376965713b271c98648607f2398468028c2f8;hb=4e1bf37c4345bffa149f144a0c435df9b7fc4e1a;hpb=a493e28e91248d6c4e9dbf4682d882a22647d914
diff --git a/modules/admin-full/luasrc/view/admin_network/iface_status.htm b/modules/admin-full/luasrc/view/admin_network/iface_status.htm
index 7c0376965..ed5002bc6 100644
--- a/modules/admin-full/luasrc/view/admin_network/iface_status.htm
+++ b/modules/admin-full/luasrc/view/admin_network/iface_status.htm
@@ -14,12 +14,20 @@
var rxp = ifc.stats ? ifc.stats["rx_packets"] : 0;
var txp = ifc.stats ? ifc.stats["tx_packets"] : 0;
var mac = ifc.macaddr ? ifc.macaddr : '00:00:00:00:00:00';
+ var upt = '-';
var icon;
if (is_up)
+ {
+ if (ifc.uptime)
+ upt = String.format('%t', ifc.uptime);
+
icon = "<%=resource%>/icons/ethernet.png";
+ }
else
+ {
icon = "<%=resource%>/icons/ethernet_disabled.png";
+ }
var s = document.getElementById('<%=self.option%>-ifc-signal');
if (s)
@@ -32,10 +40,11 @@
if (d && ifc.ifname)
{
d.innerHTML = String.format(
+ '<%:Uptime%>: %s
' +
'<%:MAC Address%>: %s
' +
'<%:RX%>: %.2f <%:KB%> (%d <%:Pkts.%>)
' +
'<%:TX%>: %.2f <%:KB%> (%d <%:Pkts.%>)
',
- mac, rxb, rxp, txb, txp
+ upt, mac, rxb, rxp, txb, txp
);
if (ifc.ipaddrs && ifc.ipaddrs.length)