Commit e88ac812 authored by Kento HASEGAWA's avatar Kento HASEGAWA

Merge branch 'feature/gui'

parents 07b70bb9 6fe69911
......@@ -61,10 +61,11 @@ def webui_part_problem_status(name=None):
if (adc2019system.role is not None) and (adc2019system.role.type == 'host'):
problem = adc2019system.role.get_problem(name)
workers = adc2019system.role.get_workers()
solutions = reversed(sorted(problem.get_solutions().items(), key=lambda x:x[0]))
if problem is None:
return abort(404)
else:
return render_template('part_problem_status.html', problem=problem, workers=workers)
return render_template('part_problem_status.html', problem=problem, workers=workers, solutions=solutions)
else:
return abort(404)
......
......@@ -92,12 +92,17 @@ body{
display: inline-block;
}
#content-right #list-wrapper{
height: calc(100vh - 55px);
overflow-y: scroll;
}
#content-right h4#problem-status-title{
vertical-align: bottom;
margin-right: 10px;
}
#content-right #solution-list-container{
height: calc(100vh - 55px);
overflow-y: scroll;
/* height: calc(100vh - 55px); */
/* overflow-y: scroll; */
}
This diff is collapsed.
/* Created with Themestr.app */
/*! `Custom` Bootstrap 4 theme */@import url(https://cdnjs.cloudflare.com/ajax/libs/ionicons/3.0.0/css/ionicons.min.css);/*! Import Bootstrap 4 variables *//*!
/* Created with Themestr.app */
/*! `Custom` Bootstrap 4 theme */@import url(/static/css/ionicons.min.css);/*! Import Bootstrap 4 variables *//*!
* Bootstrap v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
......
......@@ -11,69 +11,73 @@
{#% endif %#}
</div>
<div id="solver-list-container">
<h4>ソルバ一覧</h4>
<div id="solver-list-table-wrapper">
<table class="table table-bordered table-sm" id="workers-table">
<div id="list-wrapper">
<div id="solver-list-container">
<h4>ソルバ一覧</h4>
<div id="solver-list-table-wrapper">
<table class="table table-bordered table-sm" id="workers-table">
<thead>
<tr>
<th>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" name="solver-all" id="chk-solver-all">
</div>
</th>
<th class="">Worker</th>
<th class="">Status</th>
</tr>
</thead>
<tbody>
{% for k, w in workers.items() %}
<tr class="worker-status-row" data-cname="{{w.name}}">
<td>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input chk-solver" name="solver-{{k}}" id="chk-solver-{{k}}" value="{{k}}">
</div>
</td>
<td class="worker-status-name">
{{w.name}} ({{w.address}})
</td>
<td class="worker-status-value">{{w.status}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div id='solution-list-container'>
<h4>処理結果一覧</h4>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" name="solver-all" id="chk-solver-all">
</div>
</th>
<th class="">Worker</th>
<th class="">Status</th>
<th>Timestamp</th>
<th>Client</th>
<th>Score</th>
</tr>
</thead>
<tbody>
{% for k, w in workers.items() %}
<tr class="worker-status-row" data-cname="{{w.name}}">
{% for k, v in solutions %}
{% set tr_class = '' %}
{% set tr_class = tr_class + ' submit-solution' if k == problem.best_solution else '' %}
{% set tr_class = tr_class + ' valid-solution' if v.is_valid_solution() else '' %}
<tr class="solution-detail-row {{tr_class}}" data-solution-id="{{k}}" data-problem="{{problem.name}}">
<td>{{v.timestamp_str}}</td>
<td>{{v.worker}}</td>
<td>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input chk-solver" name="solver-{{k}}" id="chk-solver-{{k}}" value="{{k}}">
</div>
{% if v.is_valid_solution() %}
{{v.score}} ({{v.size_str}})
{% else %}
{{v.status}}
{% endif %}
</td>
<td class="worker-status-name">
{{w.name}} ({{w.address}})
</td>
<td class="worker-status-value">{{w.status}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div id='solution-list-container'>
<h4>処理結果一覧</h4>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Timestamp</th>
<th>Client</th>
<th>Score</th>
</tr>
</thead>
<tbody>
{% for k, v in problem.get_solutions().items() %}
{% set tr_class = '' %}
{% set tr_class = tr_class + ' submit-solution' if k == problem.best_solution else '' %}
{% set tr_class = tr_class + ' valid-solution' if v.is_valid_solution() else '' %}
<tr class="solution-detail-row {{tr_class}}" data-solution-id="{{k}}" data-problem="{{problem.name}}">
<td>{{v.timestamp_str}}</td>
<td>{{v.worker}}</td>
<td>
{% if v.is_valid_solution() %}
{{v.score}} ({{v.size_str}})
{% else %}
{{v.status}}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="modal fade" id="solver-processing-modal" tabindex="-1" role="dialog" aria-labelledby="solver-processing-modal-title" aria-hidden="true">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment