Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
adc2018-system
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
adc2018
adc2018-system
Commits
d41429f1
Commit
d41429f1
authored
Aug 10, 2018
by
Kento HASEGAWA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve UI: remove mergin spaces (#8)
parent
b33ac986
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
31 deletions
+19
-31
main.py
comm/server/main.py
+4
-8
pynq-manager.css
comm/server/static/css/pynq-manager.css
+8
-4
pynq-manager.js
comm/server/static/js/pynq-manager.js
+0
-6
index.html
comm/server/templates/index.html
+5
-7
part_question_table.html
comm/server/templates/part_question_table.html
+2
-6
No files found.
comm/server/main.py
View file @
d41429f1
...
@@ -185,7 +185,7 @@ def start():
...
@@ -185,7 +185,7 @@ def start():
else
:
else
:
# Format check
# Format check
#cmd = "/usr/bin/python /home/pi/conmgr/adc2017/server/nlcheck.py --input {} --target {}".format(probpath, outpath)
#cmd = "/usr/bin/python /home/pi/conmgr/adc2017/server/nlcheck.py --input {} --target {}".format(probpath, outpath)
cmd
=
"/usr/bin/python /home/pi/adc201
7/conmgr/adc2017
/server/nlcheck.py --input {} --target {}"
.
format
(
probpath
,
outpath
)
cmd
=
"/usr/bin/python /home/pi/adc201
8/conmgr/adc2018
/server/nlcheck.py --input {} --target {}"
.
format
(
probpath
,
outpath
)
print
(
"`{}`"
.
format
(
cmd
))
print
(
"`{}`"
.
format
(
cmd
))
subprocess
.
call
(
cmd
.
strip
()
.
split
(
" "
))
subprocess
.
call
(
cmd
.
strip
()
.
split
(
" "
))
...
@@ -318,7 +318,6 @@ def main(args):
...
@@ -318,7 +318,6 @@ def main(args):
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
parser
=
argparse
.
ArgumentParser
(
description
=
"PYNQ control panel."
)
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
(
"-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
(
"-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."
)
parser
.
add_argument
(
"-o"
,
"--out"
,
action
=
"store"
,
type
=
str
,
default
=
"./answers"
,
help
=
"Path to the output folder."
)
...
@@ -328,9 +327,6 @@ if __name__ == "__main__":
...
@@ -328,9 +327,6 @@ if __name__ == "__main__":
args
=
vars
(
parser
.
parse_args
())
args
=
vars
(
parser
.
parse_args
())
app_args
=
args
app_args
=
args
if
args
[
"gui"
]:
if
args
[
"debug"
]:
if
args
[
"debug"
]:
app
.
debug
=
True
app
.
debug
=
True
app
.
run
(
host
=
'0.0.0.0'
,
threaded
=
True
)
app
.
run
(
host
=
'0.0.0.0'
,
threaded
=
True
)
else
:
main
(
args
)
comm/server/static/css/pynq-manager.css
View file @
d41429f1
...
@@ -5,12 +5,12 @@ html, body{
...
@@ -5,12 +5,12 @@ html, body{
overflow
:
hidden
;
overflow
:
hidden
;
}
}
body
{
body
{
margin-top
:
2
0px
;
padding-top
:
1
0px
;
}
}
/* scrollbar settings */
/* scrollbar settings */
::-webkit-scrollbar
{
::-webkit-scrollbar
{
width
:
30
px
;
width
:
25
px
;
border
:
1px
solid
rgba
(
0
,
0
,
50
,
.2
);
border
:
1px
solid
rgba
(
0
,
0
,
50
,
.2
);
}
}
::-webkit-scrollbar-thumb
{
::-webkit-scrollbar-thumb
{
...
@@ -18,7 +18,7 @@ body{
...
@@ -18,7 +18,7 @@ body{
}
}
#question-table-wrapper
{
#question-table-wrapper
{
height
:
3
5
0px
;
height
:
3
0
0px
;
overflow-y
:
scroll
;
overflow-y
:
scroll
;
overflow-x
:
hidden
;
overflow-x
:
hidden
;
}
}
...
@@ -42,7 +42,7 @@ body{
...
@@ -42,7 +42,7 @@ body{
}
}
#client-control-pane
{
#client-control-pane
{
height
:
3
5
0px
;
height
:
3
3
0px
;
overflow
:
scroll
;
overflow
:
scroll
;
}
}
...
@@ -50,3 +50,7 @@ body{
...
@@ -50,3 +50,7 @@ body{
#client-control-pane
table
td
{
#client-control-pane
table
td
{
width
:
50%
;
width
:
50%
;
}
}
#question-control-pane
h3
{
display
:
inline-block
;
}
comm/server/static/js/pynq-manager.js
View file @
d41429f1
...
@@ -97,12 +97,6 @@ $(function(){
...
@@ -97,12 +97,6 @@ $(function(){
$
(
"#question-table-wrapper"
).
find
(
"#question-table"
).
remove
();
$
(
"#question-table-wrapper"
).
find
(
"#question-table"
).
remove
();
$
(
"#question-table-wrapper"
).
html
(
d
);
$
(
"#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
(){
$
(
".question-row td"
).
click
(
function
(){
var
$tr
=
$
(
this
).
parent
(
"tr.question-row"
);
var
$tr
=
$
(
this
).
parent
(
"tr.question-row"
);
$
(
".question-row"
).
removeClass
(
"q-selected"
);
$
(
".question-row"
).
removeClass
(
"q-selected"
);
...
...
comm/server/templates/index.html
View file @
d41429f1
...
@@ -15,20 +15,18 @@
...
@@ -15,20 +15,18 @@
<div
id=
"wrapper"
>
<div
id=
"wrapper"
>
<div
id=
"contorol-panel-wrapper"
class=
"container"
>
<div
id=
"contorol-panel-wrapper"
class=
"container-fluid"
>
<h3>
問題一覧
</h3>
<p><a
href=
"#"
id=
"view-server-status-button"
>
クライアント状況
</a></p>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col"
id=
"question-control-pane"
>
<div
class=
"col-5"
id=
"question-control-pane"
>
<h3>
問題一覧
</h3>
<span><a
href=
"#"
id=
"view-server-status-button"
>
クライアント状況
</a></span>
<div
id=
"question-table-wrapper"
>
<div
id=
"question-table-wrapper"
>
<p>
Loading...
</p>
<p>
Loading...
</p>
</div>
</div>
</div>
</div>
<div
class=
"col"
id=
"client-control-pane"
>
<div
class=
"col
-7
"
id=
"client-control-pane"
>
<p>
Loading...
</p>
<p>
Loading...
</p>
</div>
</div>
</div>
</div>
...
...
comm/server/templates/part_question_table.html
View file @
d41429f1
<table
class=
"table table-bordered table-hover"
id=
"question-table"
>
<table
class=
"table table-bordered table-hover"
id=
"question-table"
>
<tr>
<tr>
<th
class=
"large-cell"
>
ファイル名
</th>
<th
class=
"large-cell"
>
File Name
</th>
<th
class=
"large-cell"
>
Size
</th>
<th
class=
"large-cell"
>
Size
</th>
<th
class=
"small-cell"
>
Line
</th>
<th
class=
"small-cell"
>
Line
</th>
<th
class=
"large-cell"
>
ステータス
</th>
<th
class=
"large-cell"
>
Status
</th>
<th
class=
"small-cell"
>
操作
</th>
</tr>
</tr>
{% for k, v in questions.items() %}
{% for k, v in questions.items() %}
<tr
class=
"question-row"
data-qname=
"{{k}}"
>
<tr
class=
"question-row"
data-qname=
"{{k}}"
>
...
@@ -12,9 +11,6 @@
...
@@ -12,9 +11,6 @@
<td
class=
"large-cell"
>
{{v.board_size}}
</td>
<td
class=
"large-cell"
>
{{v.board_size}}
</td>
<td
class=
"small-cell"
>
{{v.line_num}}
</td>
<td
class=
"small-cell"
>
{{v.line_num}}
</td>
<td
class=
"large-cell"
>
{{v.status}}
</td>
<td
class=
"large-cell"
>
{{v.status}}
</td>
<td
class=
"small-cell"
>
<a
href=
"#"
class=
"show-question-status-button"
data-qname=
"{{k}}"
>
選択
</a>
</td>
</tr>
</tr>
{% endfor %}
{% endfor %}
</table>
</table>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment