Changeset 6949

Show
Ignore:
Timestamp:
03/13/11 12:13:52 (2 years ago)
Author:
jow
Message:

modules/admin-full: use %m format in interface overview

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/modules/admin-full/luasrc/view/admin_network/iface_overview.htm

    r6843 r6949  
    7777                        var ifc = ifcs[i]; 
    7878                        var is_up = (ifc.flags && ifc.flags.up); 
    79                         var rxb = ifc.stats ? (ifc.stats["rx_bytes"] / 1024) : 0; 
    80                         var txb = ifc.stats ? (ifc.stats["tx_bytes"] / 1024) : 0; 
     79                        var rxb = ifc.stats ? ifc.stats["rx_bytes"] : 0; 
     80                        var txb = ifc.stats ? ifc.stats["tx_bytes"] : 0; 
    8181                        var rxp = ifc.stats ? ifc.stats["rx_packets"] : 0; 
    8282                        var txp = ifc.stats ? ifc.stats["tx_packets"] : 0; 
     
    169169                        { 
    170170                            t.innerHTML = String.format( 
    171                                 '<strong><%:RX%></strong>: %.2f <%:KB%> (%d <%:Pkts.%>)<br />' + 
    172                                 '<strong><%:TX%></strong>: %.2f <%:KB%> (%d <%:Pkts.%>)<br />', 
     171                                '<strong><%:RX%></strong>: %1024.2mB (%d <%:Pkts.%>)<br />' + 
     172                                '<strong><%:TX%></strong>: %1024.2mB (%d <%:Pkts.%>)<br />', 
    173173                                    rxb, rxp, txb, txp 
    174174                            );