mirror of
https://github.com//cppla/ServerStatus
synced 2025-06-06 15:49:50 +08:00
some change css for view
This commit is contained in:
parent
0b9e747cc9
commit
830ea094a3
@ -80,14 +80,14 @@
|
||||
<th id="name">节点名</th>
|
||||
<th id="type">虚拟化</th>
|
||||
<th id="location">位置</th>
|
||||
<th id="uptime">在线时间</th>
|
||||
<th id="uptime">在线</th>
|
||||
<th id="load">负载</th>
|
||||
<th id="network">网络 ↓|↑</th>
|
||||
<th id="traffic">总流量 ↓|↑</th>
|
||||
<th id="cpu">处理器</th>
|
||||
<th id="cpu">核芯</th>
|
||||
<th id="ram">内存</th>
|
||||
<th id="hdd">硬盘</th>
|
||||
<th id="ping">丢包率(CU|CT|CM)</th>
|
||||
<th id="ping">联通|电信|移动</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="servers">
|
||||
|
@ -155,14 +155,14 @@ function uptime() {
|
||||
var trafficdiff_in = result.servers[i].network_in - result.servers[i].last_network_in;
|
||||
var trafficdiff_out = result.servers[i].network_out - result.servers[i].last_network_out;
|
||||
if(trafficdiff_in < 1024*1024*1024*1024)
|
||||
monthtraffic += (trafficdiff_in/1024/1024/1024).toFixed(2) + "G";
|
||||
monthtraffic += (trafficdiff_in/1024/1024/1024).toFixed(1) + "G";
|
||||
else
|
||||
monthtraffic += (trafficdiff_in/1024/1024/1024/1024).toFixed(2) + "T";
|
||||
monthtraffic += (trafficdiff_in/1024/1024/1024/1024).toFixed(1) + "T";
|
||||
monthtraffic += " | "
|
||||
if(trafficdiff_out < 1024*1024*1024*1024)
|
||||
monthtraffic += (trafficdiff_out/1024/1024/1024).toFixed(2) + "G";
|
||||
monthtraffic += (trafficdiff_out/1024/1024/1024).toFixed(1) + "G";
|
||||
else
|
||||
monthtraffic += (trafficdiff_out/1024/1024/1024/1024).toFixed(2) + "T";
|
||||
monthtraffic += (trafficdiff_out/1024/1024/1024/1024).toFixed(1) + "T";
|
||||
TableRow.children["month_traffic"].children[0].children[0].className = "progress-bar progress-bar-success";
|
||||
TableRow.children["month_traffic"].children[0].children[0].innerHTML = "<small>"+monthtraffic+"</small>";
|
||||
|
||||
@ -173,7 +173,7 @@ function uptime() {
|
||||
if(result.servers[i].load == -1) {
|
||||
TableRow.children["load"].innerHTML = "–";
|
||||
} else {
|
||||
TableRow.children["load"].innerHTML = result.servers[i].load_1.toFixed(2);
|
||||
TableRow.children["load"].innerHTML = result.servers[i].load_1.toFixed(1);
|
||||
}
|
||||
|
||||
// Network
|
||||
@ -192,14 +192,14 @@ function uptime() {
|
||||
//Traffic
|
||||
var trafficstr = "";
|
||||
if(result.servers[i].network_in < 1024*1024*1024*1024)
|
||||
trafficstr += (result.servers[i].network_in/1024/1024/1024).toFixed(2) + "G";
|
||||
trafficstr += (result.servers[i].network_in/1024/1024/1024).toFixed(1) + "G";
|
||||
else
|
||||
trafficstr += (result.servers[i].network_in/1024/1024/1024/1024).toFixed(2) + "T";
|
||||
trafficstr += (result.servers[i].network_in/1024/1024/1024/1024).toFixed(1) + "T";
|
||||
trafficstr += " | "
|
||||
if(result.servers[i].network_out < 1024*1024*1024*1024)
|
||||
trafficstr += (result.servers[i].network_out/1024/1024/1024).toFixed(2) + "G";
|
||||
trafficstr += (result.servers[i].network_out/1024/1024/1024).toFixed(1) + "G";
|
||||
else
|
||||
trafficstr += (result.servers[i].network_out/1024/1024/1024/1024).toFixed(2) + "T";
|
||||
trafficstr += (result.servers[i].network_out/1024/1024/1024/1024).toFixed(1) + "T";
|
||||
TableRow.children["traffic"].innerHTML = trafficstr;
|
||||
|
||||
// CPU
|
||||
|
Loading…
x
Reference in New Issue
Block a user