diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-03-13 11:13:52 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-03-13 11:13:52 +0000 |
commit | 63bfe23eabacdaec291f4f832ee6658c6079d44b (patch) | |
tree | e60a982b69517e12b5e79a9ededca0095df17a22 /modules/admin-full/luasrc/view | |
parent | a8688343d6dcddfaeae2ed3c696c752ab276a23e (diff) |
modules/admin-full: use %m format in interface overview
Diffstat (limited to 'modules/admin-full/luasrc/view')
-rw-r--r-- | modules/admin-full/luasrc/view/admin_network/iface_overview.htm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/admin-full/luasrc/view/admin_network/iface_overview.htm b/modules/admin-full/luasrc/view/admin_network/iface_overview.htm index 8df2de0ef8..92376207a4 100644 --- a/modules/admin-full/luasrc/view/admin_network/iface_overview.htm +++ b/modules/admin-full/luasrc/view/admin_network/iface_overview.htm @@ -76,8 +76,8 @@ $Id$ { var ifc = ifcs[i]; var is_up = (ifc.flags && ifc.flags.up); - var rxb = ifc.stats ? (ifc.stats["rx_bytes"] / 1024) : 0; - var txb = ifc.stats ? (ifc.stats["tx_bytes"] / 1024) : 0; + var rxb = ifc.stats ? ifc.stats["rx_bytes"] : 0; + var txb = ifc.stats ? ifc.stats["tx_bytes"] : 0; 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'; @@ -168,8 +168,8 @@ $Id$ if (t) { t.innerHTML = String.format( - '<strong><%:RX%></strong>: %.2f <%:KB%> (%d <%:Pkts.%>)<br />' + - '<strong><%:TX%></strong>: %.2f <%:KB%> (%d <%:Pkts.%>)<br />', + '<strong><%:RX%></strong>: %1024.2mB (%d <%:Pkts.%>)<br />' + + '<strong><%:TX%></strong>: %1024.2mB (%d <%:Pkts.%>)<br />', rxb, rxp, txb, txp ); } |