Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
adc2019-system
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
adc2019
adc2019-system
Commits
2dcebcae
Commit
2dcebcae
authored
Jul 23, 2019
by
Kento HASEGAWA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve /part/problem view
parent
e88e9f9c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
37 deletions
+64
-37
adc2019.css
static/css/adc2019.css
+15
-0
adc2019.js
static/js/adc2019.js
+13
-2
part_problem_status.html
templates/part_problem_status.html
+36
-35
No files found.
static/css/adc2019.css
View file @
2dcebcae
...
@@ -80,3 +80,18 @@ body{
...
@@ -80,3 +80,18 @@ body{
#content-right
h4
.inline-heading
{
#content-right
h4
.inline-heading
{
display
:
inline-block
;
display
:
inline-block
;
}
}
#content-right
h4
#problem-status-title
{
vertical-align
:
bottom
;
margin-right
:
10px
;
}
#content-right
#solution-list-container
{
height
:
calc
(
100vh
-
55px
);
overflow-y
:
scroll
;
}
#content-right
#solution-list-container
table
>
tbody
>
tr
,
#content-right
#solution-list-container
table
>
tbody
>
tr
>
td
{
cursor
:
pointer
;
}
static/js/adc2019.js
View file @
2dcebcae
...
@@ -26,6 +26,13 @@ class StatusView {
...
@@ -26,6 +26,13 @@ class StatusView {
_this
.
container
.
find
(
'.start-button'
).
click
(()
=>
{
_this
.
container
.
find
(
'.start-button'
).
click
(()
=>
{
_this
.
start_solver
();
_this
.
start_solver
();
});
});
_this
.
container
.
find
(
'.solution-detail-row td'
).
click
((
e
)
=>
{
var
solution_id
=
$
(
e
.
target
).
parent
(
"tr"
).
data
(
"solution-id"
);
var
problem_name
=
$
(
e
.
target
).
parent
(
"tr"
).
data
(
"problem"
);
var
viewer_url
=
"/viewer/solution#"
+
problem_name
+
"/"
+
solution_id
;
window
.
open
(
viewer_url
,
"_blank"
);
})
});
});
}
}
...
@@ -46,8 +53,13 @@ class StatusView {
...
@@ -46,8 +53,13 @@ class StatusView {
var
request_id
=
d
[
'request_id'
];
var
request_id
=
d
[
'request_id'
];
var
timeout
=
d
[
'timeout'
];
var
timeout
=
d
[
'timeout'
];
_this
.
container
.
find
(
'#solver-processing-modal'
).
modal
(
'show'
);
_this
.
container
.
find
(
'#solver-processing-modal'
).
modal
({
backdrop
:
'static'
,
keyboard
:
false
,
show
:
true
});
_this
.
container
.
find
(
'#solver-processing-modal'
).
on
(
'hidden.bs.modal'
,
function
(
e
){
_this
.
container
.
find
(
'#solver-processing-modal'
).
on
(
'hidden.bs.modal'
,
function
(
e
){
console
.
log
(
e
);
_this
.
show_problem
();
_this
.
show_problem
();
})
})
...
@@ -69,7 +81,6 @@ class StatusView {
...
@@ -69,7 +81,6 @@ class StatusView {
console
.
log
(
status
);
console
.
log
(
status
);
if
(
status
==
'done'
){
if
(
status
==
'done'
){
_this
.
request_refresh_timer
=
null
;
_this
.
request_refresh_timer
=
null
;
// _this.show_problem();
}
else
{
}
else
{
_this
.
request_refresh_timer
=
setTimeout
(
_this
.
get_request_status
(
request_id
,
timeout
),
1000
);
_this
.
request_refresh_timer
=
setTimeout
(
_this
.
get_request_status
(
request_id
,
timeout
),
1000
);
}
}
...
...
templates/part_problem_status.html
View file @
2dcebcae
<div>
<div>
<!-- <div class="col-4"> -->
<h4
class=
'inline-heading'
id=
'problem-status-title'
>
{{problem.name}}
</h4>
<h3>
【{{problem.name}}】
</h3>
{#% # if localmode %#}
{#% # if localmode %#}
<p>
<button
class=
"btn btn-primary btn-lg start-button"
type=
"button"
data-qname=
"{{problem.name}}"
>
Start
</button>
<button
class=
"btn btn-primary btn-lg start-button"
type=
"button"
data-qname=
"{{problem.name}}"
>
Start
</button>
<!-- <button class="btn btn-danger btn-lg stop-button" type="button" data-qname="all">Stop</button> -->
<button
class=
"btn btn-danger btn-lg stop-button"
type=
"button"
data-qname=
"all"
>
Stop
</button>
<button
class=
"btn btn-info btn-lg save-button"
type=
"button"
data-qname=
"{{problem.name}}"
>
Save
</button>
<button
class=
"btn btn-info btn-lg save-button"
type=
"button"
data-qname=
"{{problem.name}}"
>
Save
</button>
<button
class=
"btn btn-success btn-lg submit-button"
type=
"button"
data-qname=
"{{problem.name}}"
>
Up
</button>
<button
class=
"btn btn-success btn-lg submit-button"
type=
"button"
data-qname=
"{{problem.name}}"
>
Up
</button>
</p>
{#% else %#}
{#% else %#}
<!-- [View Only] -->
<!-- [View Only] -->
{#% endif %#}
{#% endif %#}
</div>
</div>
<div>
<div
id=
'solution-list-container'
>
<h4>
処理結果一覧
</h4>
<h4>
処理結果一覧
</h4>
<table
class=
"table table-bordered table-striped"
>
<table
class=
"table table-bordered table-striped"
>
<tr>
<thead>
<th>
Timestamp
</th>
<tr>
<th>
Client
</th>
<th>
Timestamp
</th>
<th>
Score
</th>
<th>
Client
</th>
</tr>
<th>
Score
</th>
{% for k, v in problem.get_solutions().items() %}
</tr>
{#% if (qdata.best_json == k) and (v.answer != "") %#}
</thead>
<!-- <tr class="answer-detail-row submit-answer" data-json="{#{k}#}" data-qname="{#{qname}#}"> -->
<tbody>
{#% else %#}
{% for k, v in problem.get_solutions().items() %}
<tr
class=
"solution-detail-row"
data-json=
"{{k}}"
data-qname=
"{{problem.name}}"
>
{#% if (qdata.best_json == k) and (v.answer != "") %#}
{#% endif %#}
<!-- <tr class="answer-detail-row submit-answer" data-json="{#{k}#}" data-qname="{#{qname}#}"> -->
<td>
{{v.timestamp_str}}
</td>
{#% else %#}
<td>
{{v.worker}}
</td>
<tr
class=
"solution-detail-row"
data-solution-id=
"{{k}}"
data-problem=
"{{problem.name}}"
>
<td>
{#% endif %#}
{#% if v.nlcheck == -1 %#}
<td>
{{v.timestamp_str}}
</td>
<!-- Not solved -->
<td>
{{v.worker}}
</td>
{#% else %#}
<td>
{#{v.nlcheck}#}
{#% if v.nlcheck == -1 %#}
{#% endif %#}
<!-- Not solved -->
</td>
{#% else %#}
</tr>
{#{v.nlcheck}#}
{% endfor %}
{#% endif %#}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</table>
</div>
</div>
...
@@ -46,16 +47,16 @@
...
@@ -46,16 +47,16 @@
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"solver-processing-modal-title"
>
{{problem.name}}
</h5>
<h5
class=
"modal-title"
id=
"solver-processing-modal-title"
>
{{problem.name}}
</h5>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
>
<
!-- <
button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
<span aria-hidden="true">×</span>
</button>
</button>
-->
</div>
</div>
<div
class=
"modal-body"
id=
"request-status-container"
>
<div
class=
"modal-body"
id=
"request-status-container"
>
処理中...
処理中...
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-
secondary"
data-dismiss=
"modal"
>
Close
</button>
<button
type=
"button"
class=
"btn btn-
danger"
>
Stop
</button>
<button
type=
"button"
class=
"btn btn-primary"
>
Save changes
</button>
<button
type=
"button"
class=
"btn btn-primary"
data-dismiss=
"modal"
>
Close
</button>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
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