Changeset 6601
- Timestamp:
- 12/01/10 22:17:39 (2 years ago)
- Location:
- luci/trunk/modules/admin-full/luasrc/view/admin_network
- Files:
-
- 2 modified
-
iface_overview.htm (modified) (4 diffs)
-
iface_status.htm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
luci/trunk/modules/admin-full/luasrc/view/admin_network/iface_overview.htm
r6508 r6601 82 82 var txp = ifc.stats ? ifc.stats["tx_packets"] : 0; 83 83 var mac = ifc.macaddr ? ifc.macaddr : '00:00:00:00:00:00'; 84 var upt = '-'; 84 85 85 86 var icon; 86 87 if (is_up) 88 { 89 if (ifc.uptime) 90 upt = String.format('%t', ifc.uptime); 91 87 92 icon = "<%=resource%>/icons/ethernet.png"; 93 } 88 94 else 95 { 89 96 icon = "<%=resource%>/icons/ethernet_disabled.png"; 97 } 90 98 91 99 var s = document.getElementById(ifc.id + '-ifc-signal'); … … 97 105 icon, ifc.ifname ? ifc.ifname : '?' 98 106 ); 107 } 108 109 var u = document.getElementById(ifc.id + '-ifc-uptime'); 110 if (u) 111 { 112 u.innerHTML = upt; 99 113 } 100 114 … … 185 199 <th class="cbi-section-table-cell"> </th> 186 200 <th class="cbi-section-table-cell"><%:Interface%></th> 201 <th class="cbi-section-table-cell"><%:Uptime%></th> 187 202 <th class="cbi-section-table-cell"><%:MAC%></th> 188 203 <th class="cbi-section-table-cell" style="text-align:left"><%:Addresses%></th> … … 199 214 <small>?</small> 200 215 </td> 216 <td class="cbi-value-field" id="<%=net%>-ifc-uptime">?</td> 201 217 <td class="cbi-value-field" id="<%=net%>-ifc-mac">?</td> 202 218 <td class="cbi-value-field" style="text-align:left; padding:3px" id="<%=net%>-ifc-addrs"><em><%:Collecting data...%></em></td> -
luci/trunk/modules/admin-full/luasrc/view/admin_network/iface_status.htm
r6496 r6601 15 15 var txp = ifc.stats ? ifc.stats["tx_packets"] : 0; 16 16 var mac = ifc.macaddr ? ifc.macaddr : '00:00:00:00:00:00'; 17 var upt = '-'; 17 18 18 19 var icon; 19 20 if (is_up) 21 { 22 if (ifc.uptime) 23 upt = String.format('%t', ifc.uptime); 24 20 25 icon = "<%=resource%>/icons/ethernet.png"; 26 } 21 27 else 28 { 22 29 icon = "<%=resource%>/icons/ethernet_disabled.png"; 30 } 23 31 24 32 var s = document.getElementById('<%=self.option%>-ifc-signal'); … … 33 41 { 34 42 d.innerHTML = String.format( 43 '<strong><%:Uptime%>:</strong> %s<br />' + 35 44 '<strong><%:MAC Address%>:</strong> %s<br />' + 36 45 '<strong><%:RX%></strong>: %.2f <%:KB%> (%d <%:Pkts.%>)<br />' + 37 46 '<strong><%:TX%></strong>: %.2f <%:KB%> (%d <%:Pkts.%>)<br />', 38 mac, rxb, rxp, txb, txp47 upt, mac, rxb, rxp, txb, txp 39 48 ); 40 49
