diff --git a/plugins/supervisor/index.py b/plugins/supervisor/index.py index 0e9dcea7b..1ec826843 100755 --- a/plugins/supervisor/index.py +++ b/plugins/supervisor/index.py @@ -224,7 +224,7 @@ def getSupList(): data = {} statusFile = getServerDir() + "/status.txt" - supCtl = 'supervisorctl' + supCtl = 'supervisorctl -c ' + getServerDir() + "/supervisor.conf" cmd = "%s update; %s status > %s" % (supCtl, supCtl, statusFile) mw.execShell(cmd) @@ -379,6 +379,22 @@ def getJobInfo(): return data[1] name = args['name'] + program = getServerDir() + "/conf.d/" + name + ".ini" + with open(program, "r") as fr: + infos = fr.readlines() + + for line in infos: + if "user=" in line.strip(): + mess["user"] = line.strip().split('=')[1] + if "numprocs=" in line.strip(): + mess["numprocs"] = line.strip().split('=')[1] + if "priority=" in line.strip(): + mess["priority"] = line.strip().split('=')[1] + userlist = getUserList() + info["userlist"] = userlist + info["daemoninfo"] = mess + return mw.getJson(info) + def runLog(): return getServerDir() + '/log/supervisor.log' diff --git a/plugins/supervisor/js/supervisor.js b/plugins/supervisor/js/supervisor.js index e8d5bdaf4..707a05fc7 100755 --- a/plugins/supervisor/js/supervisor.js +++ b/plugins/supervisor/js/supervisor.js @@ -43,7 +43,7 @@ function supList(page, search){ myPost('get_sup_list', _data, function(data){ var rdata = $.parseJSON(data.data); - console.log(rdata.data); + // console.log(rdata.data); var list = ''; for(i in rdata.data){ list += '