mirror of
https://github.com/xiaorouji/openwrt-passwall2.git
synced 2025-05-01 13:19:08 +08:00
luci: optimize node list page load
This commit is contained in:
parent
1de410fc94
commit
6c7d34d860
@ -313,6 +313,7 @@ table td, .table .td {
|
||||
}
|
||||
|
||||
/* 自动Ping */
|
||||
function pingAllNodes() {
|
||||
if (auto_detection_time == "icmp" || auto_detection_time == "tcping") {
|
||||
var nodes = [];
|
||||
const ping_value = document.getElementsByClassName(auto_detection_time == "tcping" ? 'tcping_value' : 'ping_value');
|
||||
@ -391,6 +392,7 @@ table td, .table .td {
|
||||
thread()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var edit_btn = document.getElementById("cbi-passwall2-nodes").getElementsByClassName("cbi-button cbi-button-edit");
|
||||
for (var i = 0; i < edit_btn.length; i++) {
|
||||
@ -445,6 +447,14 @@ table td, .table .td {
|
||||
}
|
||||
document.getElementById("div_node_count").innerHTML = "<div style='margin-top:5px'>" + str + "</div>";
|
||||
}
|
||||
|
||||
//UI渲染完成后再自动Ping
|
||||
window.onload = function () {
|
||||
setTimeout(function () {
|
||||
pingAllNodes();
|
||||
}, 800);
|
||||
};
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user