From: qianxu Date: Tue, 6 Jan 2026 10:48:15 +0000 (+0800) Subject: luci-mod-status: fix incorrect unit for port speed X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=64e8a43cc3dc3cf0d35d7c3023aaf105fbe2cfb3;p=openwrt-luci.git 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 --- diff --git a/modules/luci-mod-status/Makefile b/modules/luci-mod-status/Makefile index ee00c1d763..6b86e8472c 100644 --- a/modules/luci-mod-status/Makefile +++ b/modules/luci-mod-status/Makefile @@ -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 diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/29_ports.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/29_ports.js index a4a55ce760..905f1f36dd 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/29_ports.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/29_ports.js @@ -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):