diff --git a/comm/server/main.py b/comm/server/main.py index 5f98e468e2e5a3e65148474a4439103634e8b548..c6363aabca1331f92d08953a45a452afdc2ec6cd 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 9e718c2f4f3bc24ea62981258dd3439ed9faca1f..915e1a776de822b179b4b157b45fc04a7f3b4215 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); + }); + });