mirror of
https://github.com/openwrt/luci.git
synced 2026-02-04 12:06:01 +08:00
luci-mod-status: fix incorrect unit for port speed
The kernel reports port speeds in decimal Mbps (e.g. 1000 for Gigabit). Currently, the interface labels this value as 'Mibit/s' (binary), which creates a unit mismatch. This patch updates the label to 'Mbit/s' to match the source data. Signed-off-by: qianxu <qianxuuuu@qq.com>
This commit is contained in:
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
LUCI_TITLE:=LuCI Status Pages
|
||||
LUCI_DEPENDS:=+luci-base +libiwinfo +rpcd-mod-iwinfo
|
||||
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
PKG_BUILD_DEPENDS:=iwinfo
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@ function buildInterfaceMapping(zones, networks) {
|
||||
function formatSpeed(carrier, speed, duplex) {
|
||||
if ((speed > 0) && duplex) {
|
||||
var d = (duplex == 'half') ? '\u202f(H)' : '',
|
||||
e = E('span', { 'title': _('Speed: %d Mibit/s, Duplex: %s').format(speed, duplex) });
|
||||
e = E('span', { 'title': _('Speed: %d Mbit/s, Duplex: %s').format(speed, duplex) });
|
||||
|
||||
switch (true) {
|
||||
case (speed < 1000):
|
||||
|
||||
Reference in New Issue
Block a user