⛄ Sync 2026-10-17 22:53:14

This commit is contained in:
github-actions[bot] committed 2026-10-17 22:53:14 +08:00
1 parent 94fcee8f81
commit 61e7ec8357
4 files changed
+19 -15

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-vantage
PKG_VERSION:=1.0.8
PKG_RELEASE:=12
PKG_RELEASE:=13
PKG_LICENSE:=GPL-3.0-or-later
LUCI_TITLE:=Vantage dashboard
@@ -173,10 +173,10 @@ return baseclass.extend({
},
/* Pick the interface carrying traffic in/out of this device, and the
physical device its counters live on. Routers: wan/wan6/*wan*.
Access points: the interface with the default route, else the first
one that is up. A bridge is followed to its wired member (wireless
members are skipped; netifd 'ethernet' members preferred); DSA with
physical device its counters live on. Prefer interfaces with a default
route, keeping wan/wan6/*wan* priority within that set. Fall back to
WAN names, then the first up interface. A bridge is followed to its
wired member (wireless members skipped; netifd 'ethernet' preferred); DSA with
hardware offload uses the conduit's counters. */
resolveUplink: function(ifaces, devs, wirelessNames) {
var self = this;
@@ -186,15 +186,19 @@ return baseclass.extend({
var up = ifaces.filter(function(i) {
return i && i.up && i.interface !== 'loopback' && (i.l3_device || i.device);
});
function named(re) { return up.filter(function(i) { return re.test(i.interface); })[0]; }
function named(list, re) { return list.filter(function(i) { return re.test(i.interface); })[0]; }
function preferredWan(list) {
return named(list, /^wan$/) || named(list, /^wan6$/) || named(list, /wan/i);
}
function defRoute(i) {
return arr(i.route).filter(function(r) {
return r && +r.mask === 0 && (r.target === '0.0.0.0' || r.target === '::');
})[0] || null;
}
var wan = named(/^wan$/) || named(/^wan6$/) || named(/wan/i);
var pick = wan || up.filter(defRoute)[0] || up[0];
/* An AP may retain an up, unmanaged WAN port without any routes. */
var routed = up.filter(defRoute);
var pick = preferredWan(routed) || routed[0] || preferredWan(up) || up[0];
if (!pick) return null;
var l3 = pick.l3_device || pick.device, dev = l3, d = devs[dev];
@@ -216,7 +220,7 @@ return baseclass.extend({
l3dev: l3,
dev: dev,
statsDev: statsDev,
isWan: !!wan,
isWan: /wan/i.test(pick.interface),
proto: pick.proto || null,
uptime: finite(pick.uptime) ? pick.uptime : null,
up: !!pick.up,
+3 -3
View File
@@ -1332,7 +1332,7 @@ msgstr ""
msgid "Open network"
msgstr ""
#: luci-app-vantage/htdocs/luci-static/resources/vantage/model.js:484
#: luci-app-vantage/htdocs/luci-static/resources/vantage/model.js:488
msgid "OpenWrt device"
msgstr ""
@@ -1464,7 +1464,7 @@ msgstr ""
msgid "Reverse DNS of its address"
msgstr ""
#: luci-app-vantage/htdocs/luci-static/resources/vantage/model.js:496
#: luci-app-vantage/htdocs/luci-static/resources/vantage/model.js:500
msgid "Root (overlay)"
msgstr ""
@@ -1605,7 +1605,7 @@ msgstr ""
msgid "Tbit/s"
msgstr ""
#: luci-app-vantage/htdocs/luci-static/resources/vantage/model.js:496
#: luci-app-vantage/htdocs/luci-static/resources/vantage/model.js:500
msgid "Temporary (RAM)"
msgstr ""
+3 -3
View File
@@ -1348,7 +1348,7 @@ msgstr "对互联网开放:%d"
msgid "Open network"
msgstr "开放网络"
#: luci-app-vantage/htdocs/luci-static/resources/vantage/model.js:484
#: luci-app-vantage/htdocs/luci-static/resources/vantage/model.js:488
msgid "OpenWrt device"
msgstr "OpenWrt 设备"
@@ -1484,7 +1484,7 @@ msgstr ""
msgid "Reverse DNS of its address"
msgstr "其地址的反向 DNS"
#: luci-app-vantage/htdocs/luci-static/resources/vantage/model.js:496
#: luci-app-vantage/htdocs/luci-static/resources/vantage/model.js:500
msgid "Root (overlay)"
msgstr "Root(overlay)"
@@ -1625,7 +1625,7 @@ msgstr "系统设置"
msgid "Tbit/s"
msgstr "Tbit/s"
#: luci-app-vantage/htdocs/luci-static/resources/vantage/model.js:496
#: luci-app-vantage/htdocs/luci-static/resources/vantage/model.js:500
msgid "Temporary (RAM)"
msgstr "临时(RAM)"