From 63bfe23eabacdaec291f4f832ee6658c6079d44b Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 13 Mar 2011 11:13:52 +0000 Subject: modules/admin-full: use %m format in interface overview --- modules/admin-full/luasrc/view/admin_network/iface_overview.htm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules') 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 ); } -- cgit v1.2.3