From: Jo-Philipp Wich Date: Sun, 13 Mar 2011 11:13:52 +0000 (+0000) Subject: modules/admin-full: use %m format in interface overview X-Git-Tag: 0.11.0~2216 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=63bfe23eabacdaec291f4f832ee6658c6079d44b;p=oweals%2Fluci.git modules/admin-full: use %m format in interface overview --- 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 8df2de0ef..92376207a 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( - '<%:RX%>: %.2f <%:KB%> (%d <%:Pkts.%>)
' + - '<%:TX%>: %.2f <%:KB%> (%d <%:Pkts.%>)
', + '<%:RX%>: %1024.2mB (%d <%:Pkts.%>)
' + + '<%:TX%>: %1024.2mB (%d <%:Pkts.%>)
', rxb, rxp, txb, txp ); }