main page auto refresh
This commit is contained in:
parent
cb86421688
commit
5957bc66f3
5
test.py
5
test.py
@ -15,7 +15,9 @@ om = OManager(session_folder)
|
||||
|
||||
class MainHandler(tornado.web.RequestHandler):
|
||||
def get(self):
|
||||
buf = f"ops len: {len(om.ops)} <br/>\n"
|
||||
buf = "<html>\n<head><meta http-equiv=\"refresh\" content=\"5\"></head>\n"
|
||||
buf += "<body>\n"
|
||||
buf += f"ops len: {len(om.ops)} <br/>\n"
|
||||
if len(om.ops):
|
||||
for idx, op in enumerate(om.ops):
|
||||
buf += f"op #{idx}, name: {op.name} <br/>\n"
|
||||
@ -30,6 +32,7 @@ class MainHandler(tornado.web.RequestHandler):
|
||||
buf += "\nping_stat\n"
|
||||
buf += "\n".join(op.get_ping_stat().splitlines()[-5:])
|
||||
buf += "\n</pre>\n"
|
||||
buf += "</body>\n</html>"
|
||||
self.write(buf)
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user