Skip to content

Commit

Permalink
ping time delay tips
Browse files Browse the repository at this point in the history
  • Loading branch information
ubuntu committed Dec 21, 2018
1 parent 85f361b commit e664a3a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions web/js/serverstatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e664a3a

Please sign in to comment.