From 9c75b94e64efcab5867aeed560827b1538a0409b Mon Sep 17 00:00:00 2001 From: ubuntu Date: Tue, 29 Jan 2019 19:51:21 +0800 Subject: [PATCH] reduce cpu used --- web/index.html | 7 ++----- web/js/serverstatus.js | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/web/index.html b/web/index.html index 6955cf76..91164dff 100644 --- a/web/index.html +++ b/web/index.html @@ -65,14 +65,11 @@
-
-
加载中...
-
- 如果出现此消息,请确保您已启用Javascript!
否则云监控主服务没启动或已关闭. + 警告:如果出现此消息,请确保您已启用Javascript!
否则云监控主服务没启动或已关闭.

diff --git a/web/js/serverstatus.js b/web/js/serverstatus.js index 0d7dcc27..6af157e3 100644 --- a/web/js/serverstatus.js +++ b/web/js/serverstatus.js @@ -94,10 +94,10 @@ function uptime() { "加载中" + "加载中" + "加载中" + - "
加载中
" + - "
加载中
" + - "
加载中
" + - "
加载中
" + + "
加载中
" + + "
加载中
" + + "
加载中
" + + "
加载中
" + "" + "
" + "
加载中
" + @@ -318,10 +318,14 @@ function uptime() { //TableRow.children["online6"].children[0].children[0].innerHTML = "错误"; TableRow.children["ip_status"].children[0].children[0].className = "progress-bar progress-bar-error"; TableRow.children["ip_status"].children[0].children[0].innerHTML = "错误"; - TableRow.children["uptime"].innerHTML = "
错误
"; - TableRow.children["load"].innerHTML = "
错误
"; - TableRow.children["network"].innerHTML = "
错误
"; - TableRow.children["traffic"].innerHTML = "
错误
"; + TableRow.children["uptime"].children[0].children[0].className = "progress-bar progress-bar-error"; + TableRow.children["uptime"].children[0].children[0].innerHTML = "错误"; + TableRow.children["load"].children[0].children[0].className = "progress-bar progress-bar-error"; + TableRow.children["load"].children[0].children[0].innerHTML = "错误"; + TableRow.children["network"].children[0].children[0].className = "progress-bar progress-bar-error"; + TableRow.children["network"].children[0].children[0].innerHTML = "错误"; + TableRow.children["traffic"].children[0].children[0].className = "progress-bar progress-bar-error"; + TableRow.children["traffic"].children[0].children[0].innerHTML = "错误"; TableRow.children["cpu"].children[0].children[0].className = "progress-bar progress-bar-error"; TableRow.children["cpu"].children[0].children[0].style.width = "100%"; TableRow.children["cpu"].children[0].children[0].innerHTML = "错误";