From d41429f1e4e2a1c0a101124247a8614eec469dbf Mon Sep 17 00:00:00 2001 From: Kento HASEGAWA Date: Fri, 10 Aug 2018 14:10:32 +0900 Subject: [PATCH] Improve UI: remove mergin spaces (#8) --- comm/server/main.py | 12 ++++-------- comm/server/static/css/pynq-manager.css | 12 ++++++++---- comm/server/static/js/pynq-manager.js | 6 ------ comm/server/templates/index.html | 12 +++++------- comm/server/templates/part_question_table.html | 8 ++------ 5 files changed, 19 insertions(+), 31 deletions(-) diff --git a/comm/server/main.py b/comm/server/main.py index 8827217..845e070 100644 --- a/comm/server/main.py +++ b/comm/server/main.py @@ -185,7 +185,7 @@ def start(): else: # Format check #cmd = "/usr/bin/python /home/pi/conmgr/adc2017/server/nlcheck.py --input {} --target {}".format(probpath, outpath) - cmd = "/usr/bin/python /home/pi/adc2017/conmgr/adc2017/server/nlcheck.py --input {} --target {}".format(probpath, outpath) + cmd = "/usr/bin/python /home/pi/adc2018/conmgr/adc2018/server/nlcheck.py --input {} --target {}".format(probpath, outpath) print("`{}`".format(cmd)) subprocess.call(cmd.strip().split(" ")) @@ -318,7 +318,6 @@ def main(args): if __name__ == "__main__": parser = argparse.ArgumentParser(description="PYNQ control panel.") - parser.add_argument("--no-gui", action="store_false", dest="gui", default=True, help="No GUI") parser.add_argument("-c", "--client", action="store", type=str, default=None, required=True, help="Client list.") parser.add_argument("-q", "--question", action="store", type=str, default="./problems", help="Path to the question folder.") parser.add_argument("-o", "--out", action="store", type=str, default="./answers", help="Path to the output folder.") @@ -328,9 +327,6 @@ if __name__ == "__main__": args = vars(parser.parse_args()) app_args = args - if args["gui"]: - if args["debug"]: - app.debug = True - app.run(host='0.0.0.0', threaded=True) - else: - main(args) + if args["debug"]: + app.debug = True + app.run(host='0.0.0.0', threaded=True) diff --git a/comm/server/static/css/pynq-manager.css b/comm/server/static/css/pynq-manager.css index 82aa991..a909fe9 100644 --- a/comm/server/static/css/pynq-manager.css +++ b/comm/server/static/css/pynq-manager.css @@ -5,12 +5,12 @@ html, body{ overflow: hidden; } body{ - margin-top: 20px; + padding-top: 10px; } /* scrollbar settings */ ::-webkit-scrollbar{ - width: 30px; + width: 25px; border: 1px solid rgba(0, 0, 50, .2); } ::-webkit-scrollbar-thumb{ @@ -18,7 +18,7 @@ body{ } #question-table-wrapper{ - height: 350px; + height: 300px; overflow-y: scroll; overflow-x: hidden; } @@ -42,7 +42,7 @@ body{ } #client-control-pane{ - height: 350px; + height: 330px; overflow: scroll; } @@ -50,3 +50,7 @@ body{ #client-control-pane table td{ width: 50%; } + +#question-control-pane h3{ + display: inline-block; +} diff --git a/comm/server/static/js/pynq-manager.js b/comm/server/static/js/pynq-manager.js index 49631f2..5bd3a91 100644 --- a/comm/server/static/js/pynq-manager.js +++ b/comm/server/static/js/pynq-manager.js @@ -97,12 +97,6 @@ $(function(){ $("#question-table-wrapper").find("#question-table").remove(); $("#question-table-wrapper").html(d); - $(".show-question-status-button").click(function(){ - var qname = $(this).data("qname"); - show_question_status(qname); - return false; - }); - $(".question-row td").click(function(){ var $tr = $(this).parent("tr.question-row"); $(".question-row").removeClass("q-selected"); diff --git a/comm/server/templates/index.html b/comm/server/templates/index.html index dc6412e..ea68022 100644 --- a/comm/server/templates/index.html +++ b/comm/server/templates/index.html @@ -15,20 +15,18 @@
-
-

問題一覧

-

クライアント状況

+
-
- +
+

問題一覧

  + クライアント状況
-

Loading...

-
+

Loading...

diff --git a/comm/server/templates/part_question_table.html b/comm/server/templates/part_question_table.html index ebe9e0f..5b8d1f5 100644 --- a/comm/server/templates/part_question_table.html +++ b/comm/server/templates/part_question_table.html @@ -1,10 +1,9 @@ - + - - + {% for k, v in questions.items() %} @@ -12,9 +11,6 @@ - {% endfor %}
ファイル名File Name Size Lineステータス操作Status
{{v.board_size}} {{v.line_num}} {{v.status}} - 選択 -
-- 2.22.0