Update index.py

pull/109/head
midoks 3 years ago
parent 82f012b912
commit 9f21ee6937
  1. 21
      plugins/varnish/index.py

@ -106,16 +106,17 @@ def reload():
def runInfo():
cmd = getServerDir() + "/usr/bin/varnishstat -j"
data = mw.execShell(cmd)[0].strip()
print(data)
result = {}
for d in data:
if len(d) < 3:
continue
t = d.strip().split(':')
if not t[0] in res:
continue
result[t[0]] = t[1]
return mw.getJson(result)
return data
# print(data)
# result = {}
# for d in data:
# if len(d) < 3:
# continue
# t = d.strip().split(':')
# if not t[0] in res:
# continue
# result[t[0]] = t[1]
# return mw.getJson(result)
def configTpl():

Loading…
Cancel
Save