diff --git a/cloudreve/Makefile b/cloudreve/Makefile index d5e5fd0c0..c256e34f8 100644 --- a/cloudreve/Makefile +++ b/cloudreve/Makefile @@ -5,8 +5,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cloudreve -PKG_VERSION:=4.18.0 -PKG_RELEASE:=18 +PKG_VERSION:=4.19.0 +PKG_RELEASE:=19 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/cloudreve/Cloudreve.git diff --git a/luci-app-fwlive/Makefile b/luci-app-fwlive/Makefile index 465fe94c0..d2eff5fd4 100644 --- a/luci-app-fwlive/Makefile +++ b/luci-app-fwlive/Makefile @@ -12,7 +12,7 @@ LUCI_DEPENDS:=+luci-base +logd +jsonfilter LUCI_PKGARCH:=all PKG_VERSION:=0.1.41 -PKG_RELEASE:=17 +PKG_RELEASE:=18 # Reproducible build: honor SOURCE_DATE_EPOCH from the build environment (set by docker-sdk.sh / CI). ifdef SOURCE_DATE_EPOCH diff --git a/luci-app-fwlive/htdocs/luci-static/resources/fwlive/constants.js b/luci-app-fwlive/htdocs/luci-static/resources/fwlive/constants.js index 780fee2a9..28ef92e7d 100644 --- a/luci-app-fwlive/htdocs/luci-static/resources/fwlive/constants.js +++ b/luci-app-fwlive/htdocs/luci-static/resources/fwlive/constants.js @@ -18,6 +18,8 @@ return baseclass.extend({ FETCH_LINES_MAX: 2000 /* ubus poll / logd ring cap (~2000 lines ≈ typical ring) */, /* DOM budget: ~250 new/updated rows painted per second on typical LuCI routers */ RENDER_CAP_PER_SEC: 250, + /* Sustained 4x-throttled evidence keeps this cap within the frame/task budget. */ + WEAK_DEVICE_DISPLAY_ROW_CAP: 250, /* Layer 2 — measured client RTT → poll cadence (seconds). */ POLL_CADENCE_FAST_S: 1, POLL_CADENCE_MID_S: 2, diff --git a/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js b/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js index 286c648f2..bf79405b8 100644 --- a/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js +++ b/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js @@ -116,6 +116,7 @@ return view.extend({ serverAdaptive: 1, serverTruncated: 0, serverShed: null, + weakDevice: false, degradedSampling: false, /* Layer 2 summary fallback — rows remain available behind an explicit toggle. */ summaryMode: false, @@ -532,14 +533,18 @@ return view.extend({ }, async loadLoggingStatus() { + const wasWeakDevice = this.weakDevice; try { this.loggingStatus = await callFwliveLoggingStatus(); + this.weakDevice = !!(this.loggingStatus && this.loggingStatus.weak_device === true); } catch (e) { this.loggingStatus = null; } this.updateBackendUi(); this.updateLoggingToolbarUi(); this.updateEmptyStateUi(); + if (wasWeakDevice !== this.weakDevice && document.getElementById('fwlive-table')) + this.renderRows(true); }, async handleEnableLogging() { @@ -820,6 +825,12 @@ return view.extend({ return buffer.ingestCap(this.paused, this.rowLimit, constants.FETCH_LINES_MAX); }, + displayRowCap() { + return this.weakDevice + ? Math.min(this.rowLimit, constants.WEAK_DEVICE_DISPLAY_ROW_CAP) + : this.rowLimit; + }, + statusSuffix() { const bits = []; if (this.paused) { @@ -829,6 +840,12 @@ return view.extend({ const cap = this.ingestCap(); if (this.entries.length >= cap && cap > 0) bits.push(_('buffer full')); if (this.floodSuppressed) bits.push(_('render paused (high rate)')); + if (this.weakDevice && this.rowLimit > constants.WEAK_DEVICE_DISPLAY_ROW_CAP) + bits.push( + _('Display limited to %d rows on this device').format( + constants.WEAK_DEVICE_DISPLAY_ROW_CAP + ) + ); if (this.degradedSampling && this.serverAdaptive !== 0) bits.push(_('Degraded — sampling')); if (this.serverTruncated && this.serverAdaptive !== 0) bits.push(_('truncated')); if (this.resolveLoadShed && this.serverAdaptive !== 0) @@ -1198,12 +1215,14 @@ return view.extend({ const filters = this.readFilters(); return this.entries .filter((row) => log.matchesFilter(row, filters)) - .slice(-this.rowLimit) + .slice(-this.displayRowCap()) .reverse(); }, compactCountText(matchCount) { const stored = this.entries.length; + /* Keep the stored-buffer denominator tied to the user's Limit. A weak + * device's rendered-row cap is called out separately in statusSuffix(). */ const limit = this.rowLimit; const suffix = this.statusSuffix(); /* While paused the buffer can grow past the display limit — count matches diff --git a/luci-app-fwlive/po/de/luci-app-fwlive.po b/luci-app-fwlive/po/de/luci-app-fwlive.po index 1efcf9384..ce8f68199 100644 --- a/luci-app-fwlive/po/de/luci-app-fwlive.po +++ b/luci-app-fwlive/po/de/luci-app-fwlive.po @@ -141,6 +141,10 @@ msgstr "Ziel-Port" msgid "Degraded — sampling" msgstr "Eingeschränkt — Stichproben" +#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:847 +msgid "Display limited to %d rows on this device" +msgstr "Anzeige auf %d Zeilen auf diesem Gerät begrenzt" + #: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:977 msgid "Degraded — sampling (slow poll RTT; cadence reduced)." msgstr "" diff --git a/luci-app-fwlive/po/ru/luci-app-fwlive.po b/luci-app-fwlive/po/ru/luci-app-fwlive.po index d6b96eabe..c80bb3617 100644 --- a/luci-app-fwlive/po/ru/luci-app-fwlive.po +++ b/luci-app-fwlive/po/ru/luci-app-fwlive.po @@ -145,6 +145,10 @@ msgstr "Порт назн." msgid "Degraded — sampling" msgstr "Упрощённый режим — выборка" +#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:847 +msgid "Display limited to %d rows on this device" +msgstr "На этом устройстве отображение ограничено %d строками" + #: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:977 msgid "Degraded — sampling (slow poll RTT; cadence reduced)." msgstr "Упрощённый режим — выборка (медленный RTT опроса; интервал увеличен)." diff --git a/luci-app-fwlive/po/templates/luci-app-fwlive.pot b/luci-app-fwlive/po/templates/luci-app-fwlive.pot index 87d6b3d76..1e8d6ddb8 100644 --- a/luci-app-fwlive/po/templates/luci-app-fwlive.pot +++ b/luci-app-fwlive/po/templates/luci-app-fwlive.pot @@ -116,6 +116,10 @@ msgstr "" msgid "Degraded — sampling" msgstr "" +#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:847 +msgid "Display limited to %d rows on this device" +msgstr "" + #: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:977 msgid "Degraded — sampling (slow poll RTT; cadence reduced)." msgstr "" diff --git a/luci-app-fwlive/po/zh_Hans/luci-app-fwlive.po b/luci-app-fwlive/po/zh_Hans/luci-app-fwlive.po index 5d9b23e13..6780927bc 100644 --- a/luci-app-fwlive/po/zh_Hans/luci-app-fwlive.po +++ b/luci-app-fwlive/po/zh_Hans/luci-app-fwlive.po @@ -131,6 +131,10 @@ msgstr "目标端口" msgid "Degraded — sampling" msgstr "降级 — 抽样" +#: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:847 +msgid "Display limited to %d rows on this device" +msgstr "此设备上的显示限制为 %d 行" + #: openwrt-feed/luci-app-fwlive/htdocs/luci-static/resources/view/status/fwlive.js:977 msgid "Degraded — sampling (slow poll RTT; cadence reduced)." msgstr "降级 — 抽样(轮询 RTT 较慢;已降低频率)。"