From f85bdc55ee7ac2e4dca6e6aa012aa32986850164 Mon Sep 17 00:00:00 2001 From: Kento HASEGAWA Date: Tue, 14 Aug 2018 17:40:56 +0900 Subject: [PATCH] Fix small bugs in UI --- comm/server/main.py | 3 ++- comm/server/static/js/pynq-manager.js | 19 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/comm/server/main.py b/comm/server/main.py index 5f98e46..c6363aa 100644 --- a/comm/server/main.py +++ b/comm/server/main.py @@ -115,13 +115,14 @@ def post(): _qname = request.form["qname"] _answer = request.form["answer"] + _client = request.form["client"] receive_time = datetime.datetime.now() receive_time_str = receive_time.strftime("%Y%m%d%H%M%S") dat = { "req_id": request.form['req_id'], - "client": request.form['client'], + "client": _client, "answer": _answer, "cputime": request.form['cputime'], "timestamp": receive_time.strftime("%Y/%m/%d %H:%M:%S") diff --git a/comm/server/static/js/pynq-manager.js b/comm/server/static/js/pynq-manager.js index 9e718c2..915e1a7 100644 --- a/comm/server/static/js/pynq-manager.js +++ b/comm/server/static/js/pynq-manager.js @@ -121,16 +121,6 @@ $(function(){ }).done(function(d){ $("#client-control-pane").html(""); $("#client-control-pane").html(d); - - $.ajax({ - type: "GET", - dataType: "json", - url: "/get_clients" - }).done(function(d){ - pynqClients = d; - pm = PynqManager(pynqClients); - pm.getStatus(); - }); }); } @@ -162,4 +152,13 @@ $(function(){ refresh_question_table(); + $.ajax({ + type: "GET", + dataType: "json", + url: "/get_clients" + }).done(function(d){ + pynqClients = d; + pm = PynqManager(pynqClients); + }); + }); -- 2.22.0