mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-30 11:45:13 +08:00
🐶 Sync 2026-09-17 14:25:52
This commit is contained in:
1 parent
003c64d07f
commit
a5ccfb4b8c
13 files changed
+240
-116
No files matched your search
@@ -1402,6 +1402,16 @@ function yaml2json(content, command) {
|
||||
|
||||
return callYaml2Json(content, command).then(res => res.result);
|
||||
}
|
||||
function yamlfile2json(type, filename, command) {
|
||||
const callYamlfile2Json = rpc.declare({
|
||||
object: 'luci.fchomo',
|
||||
method: 'yamlfile2json',
|
||||
params: ['type', 'filename', 'command'],
|
||||
expect: { '': {} }
|
||||
});
|
||||
|
||||
return callYamlfile2Json(type, filename, command).then(res => res.result);
|
||||
}
|
||||
|
||||
function isEmpty(res) {
|
||||
if (res == null) return true; // null, undefined
|
||||
@@ -1623,6 +1633,8 @@ function renderResDownload(section_id) {
|
||||
if (type === 'http') {
|
||||
return downloadFile(section_type, section_id, url, header).then((res) => {
|
||||
ui.addNotification(null, E('p', _('Download successful.')), 'info');
|
||||
if (this.callback)
|
||||
this.callback(section_type, section_id);
|
||||
}).catch((e) => {
|
||||
ui.addNotification(null, E('p', _('Download failed: %s').format(e)), 'error');
|
||||
});
|
||||
@@ -2188,6 +2200,7 @@ return baseclass.extend({
|
||||
shuffle,
|
||||
json2yaml,
|
||||
yaml2json,
|
||||
yamlfile2json,
|
||||
isEmpty,
|
||||
removeBlankAttrs,
|
||||
toUciname,
|
||||
|
||||
@@ -2701,7 +2701,26 @@ return view.extend({
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.option(form.DummyValue, '_update');
|
||||
so.cfgvalue = hm.renderResDownload;
|
||||
so.cfgvalue = function(section_id, set_value) {
|
||||
const section_type = this.section.sectiontype;
|
||||
|
||||
// For providers that use private DNS to resolve node domains.
|
||||
const command = '.dns | [keys[] | select(. == "proxy-server-nameserver" or . == "proxy-server-nameserver-policy" or . == "nameserver-policy")]';
|
||||
|
||||
this.callback = L.bind(function(command, section_type, section_id) {
|
||||
return hm.yamlfile2json(section_type, section_id, command).then((res) => {
|
||||
if (res.length > 0) {
|
||||
const label = this.map.data.get(this.section.config, section_id, 'label');
|
||||
ui.addNotification(null, E('p',
|
||||
_('Note: The subscription of provider %s is includes %s.').format(label || section_id, res.map(v => `<code>dns.${v}</code>`).join(', ')) + '</br>' +
|
||||
_('Recommended to adjust Client DNS configuration based on actual conditions.')),
|
||||
'warning');
|
||||
}
|
||||
});
|
||||
}, this, command);
|
||||
|
||||
return hm.renderResDownload.apply(this, arguments);
|
||||
}
|
||||
so.editable = true;
|
||||
so.modalonly = false;
|
||||
|
||||
|
||||
@@ -68,10 +68,10 @@ msgstr ""
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:1117
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:1373
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:305
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2751
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2762
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2770
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2781
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2792
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2800
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2811
|
||||
msgid "-- Please choose --"
|
||||
msgstr ""
|
||||
|
||||
@@ -230,7 +230,7 @@ msgstr ""
|
||||
msgid "Add a provider"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2725
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2744
|
||||
msgid "Add a proxy chain"
|
||||
msgstr ""
|
||||
|
||||
@@ -803,11 +803,11 @@ msgstr ""
|
||||
msgid "Destination addresses allowed to be forwarded via Wireguard."
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2748
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2767
|
||||
msgid "Destination provider"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2759
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2778
|
||||
msgid "Destination proxy node"
|
||||
msgstr ""
|
||||
|
||||
@@ -815,8 +815,8 @@ msgstr ""
|
||||
msgid "Dial fields"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2771
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2801
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2790
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2820
|
||||
msgid "Different chain head/tail"
|
||||
msgstr ""
|
||||
|
||||
@@ -905,11 +905,11 @@ msgstr ""
|
||||
msgid "Download bandwidth in Mbps."
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1627
|
||||
#: htdocs/luci-static/resources/fchomo.js:1639
|
||||
msgid "Download failed: %s"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1625
|
||||
#: htdocs/luci-static/resources/fchomo.js:1635
|
||||
msgid "Download successful."
|
||||
msgstr ""
|
||||
|
||||
@@ -992,7 +992,7 @@ msgstr ""
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:267
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2358
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2640
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2735
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2754
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:274
|
||||
#: htdocs/luci-static/resources/view/fchomo/server.js:49
|
||||
msgid "Enable"
|
||||
@@ -1159,8 +1159,8 @@ msgstr ""
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:900
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:1414
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:1541
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2771
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2801
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2790
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2820
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:302
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:316
|
||||
msgid "Expecting: %s"
|
||||
@@ -1885,7 +1885,7 @@ msgstr ""
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:1878
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:262
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2353
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2730
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2749
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:269
|
||||
msgid "Label"
|
||||
msgstr ""
|
||||
@@ -2336,10 +2336,14 @@ msgstr ""
|
||||
msgid "Not Installed"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1585
|
||||
#: htdocs/luci-static/resources/fchomo.js:1595
|
||||
msgid "Not Running"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2715
|
||||
msgid "Note: The subscription of provider %s is includes %s."
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:490
|
||||
msgid "OFF"
|
||||
msgstr ""
|
||||
@@ -2409,7 +2413,7 @@ msgstr ""
|
||||
msgid "Only the address %s is valid."
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1579
|
||||
#: htdocs/luci-static/resources/fchomo.js:1589
|
||||
msgid "Open Dashboard"
|
||||
msgstr ""
|
||||
|
||||
@@ -2702,7 +2706,7 @@ msgstr ""
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:1112
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2222
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2231
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2741
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2760
|
||||
msgid "Provider"
|
||||
msgstr ""
|
||||
|
||||
@@ -2729,12 +2733,12 @@ msgid "Proxy MAC-s"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:225
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2740
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2759
|
||||
msgid "Proxy Node"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2716
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2725
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2735
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2744
|
||||
msgid "Proxy chain"
|
||||
msgstr ""
|
||||
|
||||
@@ -2856,6 +2860,11 @@ msgstr ""
|
||||
msgid "Realm name pattern"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2716
|
||||
msgid ""
|
||||
"Recommended to adjust Client DNS configuration based on actual conditions."
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/global.js:481
|
||||
msgid "Redir port"
|
||||
msgstr ""
|
||||
@@ -2880,7 +2889,7 @@ msgstr ""
|
||||
msgid "Refresh every %s seconds."
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1572
|
||||
#: htdocs/luci-static/resources/fchomo.js:1582
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:970
|
||||
#: htdocs/luci-static/resources/view/fchomo/global.js:193
|
||||
#: htdocs/luci-static/resources/view/fchomo/server.js:45
|
||||
@@ -3085,7 +3094,7 @@ msgstr ""
|
||||
msgid "Ruleset-URI-Scheme"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1585
|
||||
#: htdocs/luci-static/resources/fchomo.js:1595
|
||||
msgid "Running"
|
||||
msgstr ""
|
||||
|
||||
@@ -3610,11 +3619,11 @@ msgstr ""
|
||||
msgid "Traffic pattern"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2778
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2797
|
||||
msgid "Transit proxy group"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2789
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2808
|
||||
msgid "Transit proxy node"
|
||||
msgstr ""
|
||||
|
||||
@@ -3685,7 +3694,7 @@ msgstr ""
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:1073
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:271
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2362
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2739
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2758
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:287
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
@@ -3748,7 +3757,7 @@ msgstr ""
|
||||
msgid "UUID"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1630
|
||||
#: htdocs/luci-static/resources/fchomo.js:1642
|
||||
msgid "Unable to download unsupported type: %s"
|
||||
msgstr ""
|
||||
|
||||
@@ -3940,7 +3949,7 @@ msgid "Valid 16-digit Moon World ID and 10-digit Node ID of Moon Root server."
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2368
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2745
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2764
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:330
|
||||
msgid "Value"
|
||||
msgstr ""
|
||||
@@ -4249,7 +4258,7 @@ msgstr ""
|
||||
msgid "least one keypair required"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2710
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2729
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:435
|
||||
msgid "luci-app-tinyfilemanager is not installed, please install it first."
|
||||
msgstr ""
|
||||
@@ -4514,6 +4523,6 @@ msgstr ""
|
||||
msgid "zero"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1632
|
||||
#: htdocs/luci-static/resources/fchomo.js:1644
|
||||
msgid "🡇"
|
||||
msgstr ""
|
||||
@@ -75,10 +75,10 @@ msgstr ""
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:1117
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:1373
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:305
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2751
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2762
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2770
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2781
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2792
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2800
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2811
|
||||
msgid "-- Please choose --"
|
||||
msgstr "-- 请选择 --"
|
||||
|
||||
@@ -239,7 +239,7 @@ msgstr "新增 入站"
|
||||
msgid "Add a provider"
|
||||
msgstr "新增 供应商"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2725
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2744
|
||||
msgid "Add a proxy chain"
|
||||
msgstr "新增 代理链"
|
||||
|
||||
@@ -817,11 +817,11 @@ msgstr "从私钥派生"
|
||||
msgid "Destination addresses allowed to be forwarded via Wireguard."
|
||||
msgstr "允许通过 WireGuard 转发的目的地址"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2748
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2767
|
||||
msgid "Destination provider"
|
||||
msgstr "落地供应商"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2759
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2778
|
||||
msgid "Destination proxy node"
|
||||
msgstr "落地代理节点"
|
||||
|
||||
@@ -829,8 +829,8 @@ msgstr "落地代理节点"
|
||||
msgid "Dial fields"
|
||||
msgstr "拨号字段"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2771
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2801
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2790
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2820
|
||||
msgid "Different chain head/tail"
|
||||
msgstr "不同的链头/链尾"
|
||||
|
||||
@@ -921,11 +921,11 @@ msgstr "下载带宽"
|
||||
msgid "Download bandwidth in Mbps."
|
||||
msgstr "下载带宽(单位:Mbps)。"
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1627
|
||||
#: htdocs/luci-static/resources/fchomo.js:1639
|
||||
msgid "Download failed: %s"
|
||||
msgstr "下载失败: %s"
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1625
|
||||
#: htdocs/luci-static/resources/fchomo.js:1635
|
||||
msgid "Download successful."
|
||||
msgstr "下载成功。"
|
||||
|
||||
@@ -1008,7 +1008,7 @@ msgstr "为空时回退"
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:267
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2358
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2640
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2735
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2754
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:274
|
||||
#: htdocs/luci-static/resources/view/fchomo/server.js:49
|
||||
msgid "Enable"
|
||||
@@ -1181,8 +1181,8 @@ msgstr "预期状态"
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:900
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:1414
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:1541
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2771
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2801
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2790
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2820
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:302
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:316
|
||||
msgid "Expecting: %s"
|
||||
@@ -1913,7 +1913,7 @@ msgstr "L2"
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:1878
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:262
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2353
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2730
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2749
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:269
|
||||
msgid "Label"
|
||||
msgstr "标签"
|
||||
@@ -2368,10 +2368,14 @@ msgstr "正常"
|
||||
msgid "Not Installed"
|
||||
msgstr "未安装"
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1585
|
||||
#: htdocs/luci-static/resources/fchomo.js:1595
|
||||
msgid "Not Running"
|
||||
msgstr "未在运行"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2715
|
||||
msgid "Note: The subscription of provider %s is includes %s."
|
||||
msgstr "注意:供应商 %s 的订阅包含 %s。"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:490
|
||||
msgid "OFF"
|
||||
msgstr ""
|
||||
@@ -2441,7 +2445,7 @@ msgstr "只处理来自指定接口的流量。留空表示全部。"
|
||||
msgid "Only the address %s is valid."
|
||||
msgstr "只有地址 %s 是有效的。"
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1579
|
||||
#: htdocs/luci-static/resources/fchomo.js:1589
|
||||
msgid "Open Dashboard"
|
||||
msgstr "打开面板"
|
||||
|
||||
@@ -2737,7 +2741,7 @@ msgstr "协议参数。 如启用会随机浪费流量(在 v2ray 中默认启
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:1112
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2222
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2231
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2741
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2760
|
||||
msgid "Provider"
|
||||
msgstr "供应商"
|
||||
|
||||
@@ -2764,12 +2768,12 @@ msgid "Proxy MAC-s"
|
||||
msgstr "代理 MAC 地址"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:225
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2740
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2759
|
||||
msgid "Proxy Node"
|
||||
msgstr "代理节点"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2716
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2725
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2735
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2744
|
||||
msgid "Proxy chain"
|
||||
msgstr "代理链"
|
||||
|
||||
@@ -2891,6 +2895,11 @@ msgstr "Realm ID"
|
||||
msgid "Realm name pattern"
|
||||
msgstr "Realm 名称模式"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2716
|
||||
msgid ""
|
||||
"Recommended to adjust Client DNS configuration based on actual conditions."
|
||||
msgstr "建议根据实际情况调整客户端 DNS 配置。"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/global.js:481
|
||||
msgid "Redir port"
|
||||
msgstr "Redir 端口"
|
||||
@@ -2915,7 +2924,7 @@ msgstr "降低后台流量和网络配置刷新频率。"
|
||||
msgid "Refresh every %s seconds."
|
||||
msgstr "每 %s 秒刷新。"
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1572
|
||||
#: htdocs/luci-static/resources/fchomo.js:1582
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:970
|
||||
#: htdocs/luci-static/resources/view/fchomo/global.js:193
|
||||
#: htdocs/luci-static/resources/view/fchomo/server.js:45
|
||||
@@ -3120,7 +3129,7 @@ msgstr "规则集"
|
||||
msgid "Ruleset-URI-Scheme"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1585
|
||||
#: htdocs/luci-static/resources/fchomo.js:1595
|
||||
msgid "Running"
|
||||
msgstr "正在运行"
|
||||
|
||||
@@ -3651,11 +3660,11 @@ msgstr "Tproxy 端口"
|
||||
msgid "Traffic pattern"
|
||||
msgstr "流量模式"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2778
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2797
|
||||
msgid "Transit proxy group"
|
||||
msgstr "中转代理组"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2789
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2808
|
||||
msgid "Transit proxy node"
|
||||
msgstr "中转代理节点"
|
||||
|
||||
@@ -3726,7 +3735,7 @@ msgstr "关闭 TCP 中继。"
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:1073
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:271
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2362
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2739
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2758
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:287
|
||||
msgid "Type"
|
||||
msgstr "类型"
|
||||
@@ -3789,7 +3798,7 @@ msgstr "自动选择"
|
||||
msgid "UUID"
|
||||
msgstr "UUID"
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1630
|
||||
#: htdocs/luci-static/resources/fchomo.js:1642
|
||||
msgid "Unable to download unsupported type: %s"
|
||||
msgstr "无法下载不支持的类型: %s"
|
||||
|
||||
@@ -3981,7 +3990,7 @@ msgid "Valid 16-digit Moon World ID and 10-digit Node ID of Moon Root server."
|
||||
msgstr "有效的 16-位数 Moon World ID 和 10-位数 Moon Root 服务器 Node ID。"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2368
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2745
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2764
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:330
|
||||
msgid "Value"
|
||||
msgstr "可视化值"
|
||||
@@ -4290,7 +4299,7 @@ msgstr ""
|
||||
msgid "least one keypair required"
|
||||
msgstr "至少需要一对密钥"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2710
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2729
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:435
|
||||
msgid "luci-app-tinyfilemanager is not installed, please install it first."
|
||||
msgstr "luci-app-tinyfilemanager 未安装,请先安装它。"
|
||||
@@ -4555,7 +4564,7 @@ msgstr ""
|
||||
msgid "zero"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1632
|
||||
#: htdocs/luci-static/resources/fchomo.js:1644
|
||||
msgid "🡇"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -75,10 +75,10 @@ msgstr ""
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:1117
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:1373
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:305
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2751
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2762
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2770
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2781
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2792
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2800
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2811
|
||||
msgid "-- Please choose --"
|
||||
msgstr "-- 請選擇 --"
|
||||
|
||||
@@ -239,7 +239,7 @@ msgstr "新增 入站"
|
||||
msgid "Add a provider"
|
||||
msgstr "新增 供應商"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2725
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2744
|
||||
msgid "Add a proxy chain"
|
||||
msgstr "新增 代理鏈"
|
||||
|
||||
@@ -817,11 +817,11 @@ msgstr "從私鑰派生"
|
||||
msgid "Destination addresses allowed to be forwarded via Wireguard."
|
||||
msgstr "允許通過 WireGuard 轉發的目的位址"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2748
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2767
|
||||
msgid "Destination provider"
|
||||
msgstr "落地供應商"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2759
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2778
|
||||
msgid "Destination proxy node"
|
||||
msgstr "落地代理節點"
|
||||
|
||||
@@ -829,8 +829,8 @@ msgstr "落地代理節點"
|
||||
msgid "Dial fields"
|
||||
msgstr "撥號欄位"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2771
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2801
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2790
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2820
|
||||
msgid "Different chain head/tail"
|
||||
msgstr "不同的鏈頭/鏈尾"
|
||||
|
||||
@@ -921,11 +921,11 @@ msgstr "下載頻寬"
|
||||
msgid "Download bandwidth in Mbps."
|
||||
msgstr "下載頻寬(單位:Mbps)。"
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1627
|
||||
#: htdocs/luci-static/resources/fchomo.js:1639
|
||||
msgid "Download failed: %s"
|
||||
msgstr "下載失敗: %s"
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1625
|
||||
#: htdocs/luci-static/resources/fchomo.js:1635
|
||||
msgid "Download successful."
|
||||
msgstr "下載成功。"
|
||||
|
||||
@@ -1008,7 +1008,7 @@ msgstr "為空時回退"
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:267
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2358
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2640
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2735
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2754
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:274
|
||||
#: htdocs/luci-static/resources/view/fchomo/server.js:49
|
||||
msgid "Enable"
|
||||
@@ -1181,8 +1181,8 @@ msgstr "預期狀態"
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:900
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:1414
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:1541
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2771
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2801
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2790
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2820
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:302
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:316
|
||||
msgid "Expecting: %s"
|
||||
@@ -1913,7 +1913,7 @@ msgstr "L2"
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:1878
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:262
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2353
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2730
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2749
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:269
|
||||
msgid "Label"
|
||||
msgstr "標籤"
|
||||
@@ -2368,10 +2368,14 @@ msgstr "正常"
|
||||
msgid "Not Installed"
|
||||
msgstr "未安裝"
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1585
|
||||
#: htdocs/luci-static/resources/fchomo.js:1595
|
||||
msgid "Not Running"
|
||||
msgstr "未在運作"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2715
|
||||
msgid "Note: The subscription of provider %s is includes %s."
|
||||
msgstr "注意:供應商 %s 的訂閱包含 %s。"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:490
|
||||
msgid "OFF"
|
||||
msgstr ""
|
||||
@@ -2441,7 +2445,7 @@ msgstr "只處理來自指定介面的流量。留空表示全部。"
|
||||
msgid "Only the address %s is valid."
|
||||
msgstr "只有位址 %s 是有效的。"
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1579
|
||||
#: htdocs/luci-static/resources/fchomo.js:1589
|
||||
msgid "Open Dashboard"
|
||||
msgstr "打開面板"
|
||||
|
||||
@@ -2737,7 +2741,7 @@ msgstr "協議參數。 如啟用會隨機浪費流量(在 v2ray 中預設為
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:1112
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2222
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2231
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2741
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2760
|
||||
msgid "Provider"
|
||||
msgstr "供應商"
|
||||
|
||||
@@ -2764,12 +2768,12 @@ msgid "Proxy MAC-s"
|
||||
msgstr "代理 MAC 位址"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:225
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2740
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2759
|
||||
msgid "Proxy Node"
|
||||
msgstr "代理節點"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2716
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2725
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2735
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2744
|
||||
msgid "Proxy chain"
|
||||
msgstr "代理鏈"
|
||||
|
||||
@@ -2891,6 +2895,11 @@ msgstr "Realm ID"
|
||||
msgid "Realm name pattern"
|
||||
msgstr "Realm 名稱模式"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2716
|
||||
msgid ""
|
||||
"Recommended to adjust Client DNS configuration based on actual conditions."
|
||||
msgstr "建議根據實際情況調整客戶端 DNS 配置。"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/global.js:481
|
||||
msgid "Redir port"
|
||||
msgstr "Redir 連接埠"
|
||||
@@ -2915,7 +2924,7 @@ msgstr "降低後台流量和網路配置刷新頻率。"
|
||||
msgid "Refresh every %s seconds."
|
||||
msgstr "每 %s 秒刷新。"
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1572
|
||||
#: htdocs/luci-static/resources/fchomo.js:1582
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:970
|
||||
#: htdocs/luci-static/resources/view/fchomo/global.js:193
|
||||
#: htdocs/luci-static/resources/view/fchomo/server.js:45
|
||||
@@ -3120,7 +3129,7 @@ msgstr "規則集"
|
||||
msgid "Ruleset-URI-Scheme"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1585
|
||||
#: htdocs/luci-static/resources/fchomo.js:1595
|
||||
msgid "Running"
|
||||
msgstr "正在運作"
|
||||
|
||||
@@ -3651,11 +3660,11 @@ msgstr "Tproxy 連接埠"
|
||||
msgid "Traffic pattern"
|
||||
msgstr "流量模式"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2778
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2797
|
||||
msgid "Transit proxy group"
|
||||
msgstr "中轉代理組"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2789
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2808
|
||||
msgid "Transit proxy node"
|
||||
msgstr "中轉代理節點"
|
||||
|
||||
@@ -3726,7 +3735,7 @@ msgstr "關閉 TCP 中繼。"
|
||||
#: htdocs/luci-static/resources/view/fchomo/client.js:1073
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:271
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2362
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2739
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2758
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:287
|
||||
msgid "Type"
|
||||
msgstr "類型"
|
||||
@@ -3789,7 +3798,7 @@ msgstr "自動選擇"
|
||||
msgid "UUID"
|
||||
msgstr "UUID"
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1630
|
||||
#: htdocs/luci-static/resources/fchomo.js:1642
|
||||
msgid "Unable to download unsupported type: %s"
|
||||
msgstr "無法下載不支援的類型: %s"
|
||||
|
||||
@@ -3981,7 +3990,7 @@ msgid "Valid 16-digit Moon World ID and 10-digit Node ID of Moon Root server."
|
||||
msgstr "有效的 16-位數 Moon World ID 和 10-位數 Moon Root 伺服器 Node ID。"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2368
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2745
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2764
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:330
|
||||
msgid "Value"
|
||||
msgstr "可視化值"
|
||||
@@ -4290,7 +4299,7 @@ msgstr ""
|
||||
msgid "least one keypair required"
|
||||
msgstr "至少需要一對密鑰"
|
||||
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2710
|
||||
#: htdocs/luci-static/resources/view/fchomo/node.js:2729
|
||||
#: htdocs/luci-static/resources/view/fchomo/ruleset.js:435
|
||||
msgid "luci-app-tinyfilemanager is not installed, please install it first."
|
||||
msgstr "luci-app-tinyfilemanager 未安裝,請先安裝它。"
|
||||
@@ -4555,7 +4564,7 @@ msgstr ""
|
||||
msgid "zero"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/fchomo.js:1632
|
||||
#: htdocs/luci-static/resources/fchomo.js:1644
|
||||
msgid "🡇"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -319,6 +319,20 @@ const methods = {
|
||||
}
|
||||
},
|
||||
|
||||
yamlfile2json: {
|
||||
args: { type: 'type', filename: 'filename', command: 'command' },
|
||||
call: function(req) {
|
||||
if (!(req.args?.type in RES_TYPE))
|
||||
return { content: null, error: 'illegal type' };
|
||||
|
||||
if ((!req.args?.filename) || match(req.args?.filename, /\.\.\//))
|
||||
return { content: null, error: 'illegal filename' };
|
||||
|
||||
const filepath = `${HM_DIR}/${req.args?.type}/${req.args?.filename}`;
|
||||
return { result: json(trim(yqReadFile('-oj', req.args?.command || '.', filepath)) || '{}') };
|
||||
}
|
||||
},
|
||||
|
||||
dir_ls: {
|
||||
args: { type: 'type' },
|
||||
call: function(req) {
|
||||
|
||||
@@ -11,8 +11,8 @@ LUCI_DESCRIPTION:=Live firewall log table (nftables/fw4 and iptables LOG) with f
|
||||
LUCI_DEPENDS:=+luci-base +logd +jsonfilter
|
||||
LUCI_PKGARCH:=all
|
||||
|
||||
PKG_VERSION:=0.1.41
|
||||
PKG_RELEASE:=21
|
||||
PKG_VERSION:=0.1.42
|
||||
PKG_RELEASE:=22
|
||||
|
||||
# Reproducible build: honor SOURCE_DATE_EPOCH from the build environment (set by docker-sdk.sh / CI).
|
||||
ifdef SOURCE_DATE_EPOCH
|
||||
|
||||
@@ -18,6 +18,7 @@ LuCI **Firewall Live View** — client-side JS view polling `ubus fwlive poll` (
|
||||
| `htdocs/luci-static/resources/fwlive/table.js` | Table thead/rows DOM renderer (`renderThead`, `renderRows`) |
|
||||
| `htdocs/luci-static/resources/fwlive/buffer.js` | Ring-buffer apply/merge helpers (pause ingest + resume merge) |
|
||||
| `htdocs/luci-static/resources/fwlive/poll-coordinator.js` | Request coalescing, visibility, cadence, and disposal |
|
||||
| `htdocs/luci-static/resources/fwlive/render-policy.js` | Pure weak-device display-cap and render-cost decisions |
|
||||
| `htdocs/luci-static/resources/fwlive/hostname.js` | Hostname cache LRU + failure TTL helpers |
|
||||
| `root/usr/share/luci/menu.d/*.json` | Menu entry (`admin/status/fwlive`) |
|
||||
| `root/usr/share/rpcd/acl.d/*.json` | ubus ACL (read + write for logging enable/disable) |
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
return baseclass.extend({
|
||||
/* Keep in sync with openwrt-feed/luci-app-fwlive/Makefile PKG_VERSION. */
|
||||
APP_VERSION: '0.1.41',
|
||||
APP_VERSION: '0.1.42',
|
||||
ROW_LIMIT_OPTIONS: [25, 50, 100, 250, 500, 1000, 2000],
|
||||
DEFAULT_ROW_LIMIT: 100,
|
||||
FETCH_MODE_OPTIONS: ['auto', 'manual'],
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
'use strict';
|
||||
/* SPDX-License-Identifier: Apache-2.0 */
|
||||
/* Copyright 2025-2026 Lucas Albers <lucas.b.albers@gmail.com> */
|
||||
|
||||
'require baseclass';
|
||||
|
||||
/* Pure render-policy decisions for the fwlive view. The module does not
|
||||
* mutate state, schedule work, inspect the DOM, or know how rows render. */
|
||||
|
||||
/**
|
||||
* @param {object} opts
|
||||
* @param {number} opts.rowLimit - User-selected stored-row limit.
|
||||
* @param {boolean} opts.weakDevice - Whether the weak-device cap is active.
|
||||
* @param {number} opts.weakDeviceDisplayRowCap - Maximum visible rows when capped.
|
||||
* @returns {number} Maximum rows to render.
|
||||
*/
|
||||
function displayRowCap(opts) {
|
||||
opts = opts || {};
|
||||
return opts.weakDevice ? Math.min(opts.rowLimit, opts.weakDeviceDisplayRowCap) : opts.rowLimit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the token cost for the next render.
|
||||
*
|
||||
* @param {object} opts
|
||||
* @param {number} opts.visibleRowCount - Number of candidate visible rows.
|
||||
* @param {*} opts.visibleHeadId - First candidate row identity.
|
||||
* @param {number} opts.lastRenderedRowCount - Count from the previous render.
|
||||
* @param {*} opts.lastRenderedHeadId - First row identity from the previous render.
|
||||
* @param {number} opts.lastBatchNewIdCount - Session-new IDs in the last batch.
|
||||
* @returns {number} Token cost for the next render.
|
||||
*/
|
||||
function renderCost(opts) {
|
||||
opts = opts || {};
|
||||
|
||||
const count = opts.visibleRowCount || 0;
|
||||
const headId = count ? opts.visibleHeadId : '';
|
||||
const lastRenderedRowCount = opts.lastRenderedRowCount || 0;
|
||||
const lastRenderedHeadId = opts.lastRenderedHeadId || '';
|
||||
|
||||
/* This cheap identity check intentionally does not compare full row content. */
|
||||
if (!count && !lastRenderedRowCount) return 0;
|
||||
if (count === lastRenderedRowCount && headId === lastRenderedHeadId) return 0;
|
||||
|
||||
/* Count changes must stay cheap so Limit/filter/trim updates remain paintable. */
|
||||
if (count !== lastRenderedRowCount) return 1;
|
||||
return Math.max(1, opts.lastBatchNewIdCount || 1);
|
||||
}
|
||||
|
||||
return baseclass.extend({
|
||||
displayRowCap: displayRowCap,
|
||||
renderCost: renderCost
|
||||
});
|
||||
@@ -20,6 +20,7 @@
|
||||
'require fwlive.hostname as hostname';
|
||||
'require fwlive.proto as proto';
|
||||
'require fwlive.poll-coordinator as pollCoordinator';
|
||||
'require fwlive.render-policy as renderPolicy';
|
||||
|
||||
const callFwlivePoll = rpc.declare({
|
||||
object: 'fwlive',
|
||||
@@ -985,9 +986,11 @@ return view.extend({
|
||||
},
|
||||
|
||||
displayRowCap() {
|
||||
return this.weakDevice
|
||||
? Math.min(this.rowLimit, constants.WEAK_DEVICE_DISPLAY_ROW_CAP)
|
||||
: this.rowLimit;
|
||||
return renderPolicy.displayRowCap({
|
||||
rowLimit: this.rowLimit,
|
||||
weakDevice: this.weakDevice,
|
||||
weakDeviceDisplayRowCap: constants.WEAK_DEVICE_DISPLAY_ROW_CAP
|
||||
});
|
||||
},
|
||||
|
||||
statusSuffix() {
|
||||
@@ -1343,18 +1346,13 @@ return view.extend({
|
||||
const count = rows ? rows.length : 0;
|
||||
const headId = count ? rows[0].id : '';
|
||||
|
||||
if (!count && !this.lastRenderedRowCount) return 0;
|
||||
|
||||
if (count === this.lastRenderedRowCount && headId === this.lastRenderedHeadId) return 0;
|
||||
|
||||
/*
|
||||
* Visible row-count changes (Limit up/down, trim) must not be skipped by
|
||||
* the flood throttle — otherwise status can show N/limit while the table
|
||||
* still paints the previous size under ping -A.
|
||||
*/
|
||||
if (count !== this.lastRenderedRowCount) return 1;
|
||||
|
||||
return Math.max(1, this.lastBatchNewIdCount || 1);
|
||||
return renderPolicy.renderCost({
|
||||
visibleRowCount: count,
|
||||
visibleHeadId: headId,
|
||||
lastRenderedRowCount: this.lastRenderedRowCount,
|
||||
lastRenderedHeadId: this.lastRenderedHeadId,
|
||||
lastBatchNewIdCount: this.lastBatchNewIdCount
|
||||
});
|
||||
},
|
||||
|
||||
updateFloodBanner() {
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"admin/quickstart/*": {
|
||||
"title": "QuickStart",
|
||||
"order": 1,
|
||||
"action": {
|
||||
"type": "template",
|
||||
"path": "quickstart/home"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"admin/dashboard": {
|
||||
"depends": {
|
||||
"uci": {
|
||||
"disabled_by_quickstart": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user