🌈 Sync 2026-09-29 11:54:37

This commit is contained in:
github-actions[bot] committed 2026-09-29 11:54:37 +08:00
1 parent eb664281f6
commit 7eac2a209f
44 files changed
+1356 -869

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Status Pages
LUCI_DEPENDS:=+luci-base +luci-app-oui +luci-mod-dashboard +libiwinfo +rpcd-mod-iwinfo +rpcd-mod-rrdns +ucode +ucode-mod-fs +ucode-mod-ubus +ucode-mod-socket
PKG_RELEASE:=22
PKG_RELEASE:=23
PKG_BUILD_DEPENDS:=iwinfo
PKG_LICENSE:=Apache-2.0
@@ -96,6 +96,13 @@ return baseclass.extend({
return value != null ? [Number(value), String(value)] : [-1, '-'];
}
if (direction == 'total') {
const traffic = data?.traffic?.[mac?.toUpperCase()];
if (traffic?.upload != null && traffic?.download != null) {
const upload = Number(traffic.upload), download = Number(traffic.download);
return [upload + download, upload || download
? '%1024.2mB'.format(upload) + ' / ' + '%1024.2mB'.format(download)
: '%1024.2mB'.format(0)];
}
const value = data?.totals?.[mac?.toUpperCase()];
return value != null ? [Number(value), '%1024.2mB'.format(value)] : [-1, '-'];
}
@@ -422,7 +429,7 @@ return baseclass.extend({
E('th', { 'class': 'th' }, _('MAC address')),
E('th', { 'class': 'th' }, _('Upload')),
E('th', { 'class': 'th' }, _('Download')),
E('th', { 'class': 'th', 'data-total-traffic': '1' }, _('Total traffic')),
E('th', { 'class': 'th', 'data-total-traffic': '1' }, _('Total traffic') + ' (↑ / ↓)'),
E('th', { 'class': 'th' }, _('Connection count')),
isReadonlyView ? E([]) : E('th', { 'class': 'th cbi-section-actions center' }, _('Static Lease'))
])