mirror of
https://github.com//cppla/ServerStatus
synced 2025-07-04 16:35:58 +08:00
ping time delay tips
This commit is contained in:
parent
85f361b4b4
commit
e664a3ac10
@ -286,10 +286,17 @@ function uptime() {
|
||||
var PING_10010 = result.servers[i].ping_10010.toFixed(0);
|
||||
var PING_189 = result.servers[i].ping_189.toFixed(0);
|
||||
var PING_10086 = result.servers[i].ping_10086.toFixed(0);
|
||||
var pingTime = result.servers[i].time_10010 + "ms💻" + result.servers[i].time_189 + "ms💻" + result.servers[i].time_10086 + "ms"
|
||||
if (PING_10010 >= 10 || PING_189 >= 10 || PING_10086 >= 10)
|
||||
TableRow.children["ping"].children[0].children[0].className = "progress-bar progress-bar-danger";
|
||||
TableRow.children["ping"].children[0].children[0].setAttribute("data-toggle", "tooltip");
|
||||
TableRow.children["ping"].children[0].children[0].setAttribute("data-placement", "right");
|
||||
TableRow.children["ping"].children[0].children[0].setAttribute("title", '0ms💻0ms💻0ms');
|
||||
else
|
||||
TableRow.children["ping"].children[0].children[0].className = "progress-bar progress-bar-success";
|
||||
TableRow.children["ping"].children[0].children[0].setAttribute("data-toggle", "tooltip");
|
||||
TableRow.children["ping"].children[0].children[0].setAttribute("data-placement", "right");
|
||||
TableRow.children["ping"].children[0].children[0].setAttribute("title", pingTime);
|
||||
TableRow.children["ping"].children[0].children[0].innerHTML = PING_10010 + "%💻" + PING_189 + "%💻" + PING_10086 + "%";
|
||||
|
||||
// Custom
|
||||
|
Loading…
x
Reference in New Issue
Block a user