优化显示

pull/109/head
Mr Chen 7 years ago
parent 2ec74ed29a
commit dd2fbe86b4
  1. 3
      plugins/openresty/index.py
  2. 4
      plugins/openresty/js/openresty.js

@ -203,6 +203,7 @@ def initdUinstall():
def runInfo():
# 取Openresty负载状态
try:
result = public.httpGet('http://127.0.0.1:6666/nginx_status')
tmp = result.split()
data = {}
@ -214,6 +215,8 @@ def runInfo():
data['Writing'] = tmp[13]
data['Waiting'] = tmp[15]
return public.getJson(data)
except Exception as e:
return 'oprenresty not started'
def errorLogPath():

@ -254,6 +254,7 @@ function getOpenrestyStatus() {
return;
}
try {
var rdata = $.parseJSON(data.data);
var con = "<div><table class='table table-hover table-bordered'>\
<tr><th>活动连接(Active connections)</th><td>" + rdata.active + "</td></tr>\
@ -265,6 +266,9 @@ function getOpenrestyStatus() {
<tr><th>驻留进程(Waiting)</th><td>" + rdata.Waiting + "</td></tr>\
</table></div>";
$(".soft-man-con").html(con);
}catch(err){
showMsg(data.data, function(){}, null,3000);
}
},'json');
}

Loading…
Cancel
Save