minor re-formating of joblog to fit larger screens & phone screens better

This commit is contained in:
2022-01-14 11:03:03 +11:00
parent a2fb877f12
commit 71951ca04c

View File

@@ -3,43 +3,44 @@
{% block main_content %} {% block main_content %}
<div class="container-fluid"> <div class="container-fluid">
<h3>Show Job Details</h3> <h3>Show Job Details</h3>
<dl class="row sm-txt"> <dl class="row">
<dt class="col-2">Job #:</dt>
<dd class="col-10">{{job.id}}</dt>
<dt class="col-2">Name:</dt> <dt class="col-2">Name:</dt>
<dd class="col-10">{{job.name}}</dt> <dd class="col-4">{{job.name}}</dt>
<dt class="col-2">Start Time:</dt> {% if job.wait_for != None %}
<dd class="col-10">{{job.start_time|vicdate}}</dt> <dt class="col-2">Job #:</dt>
<dt class="col-2">Duration:</dt> <dd class="col-4">{{job.id}} [Waiting on: <a href="{{url_for('joblog', id=job.wait_for)}}">Job (id={{job.wait_for}})</a>]</dd>
<dd class="col-10">{{duration}} {% else %}
<dt class="col-2">Job #:</dt>
<dd class="col-4">{{job.id}}</dt>
{% endif %}
{% if estimate != None %} {% if estimate != None %}
(estimated time remaining: {{estimate}}) (estimated time remaining: {{estimate}})
{% endif %} {% endif %}
</dd> </dd>
<dt class="col-2">Last Update:</dt>
<dd class="col-10">{{job.last_update|vicdate}}</dd>
<dt class="col-2">Current state:</dt> <dt class="col-2">Current state:</dt>
{% if job.state == "Failed" %} {% if job.state == "Failed" %}
<dd class="col-10 bg-danger text-white">{{job.state}}</dd> <dd class="col-4 bg-danger text-white">{{job.state}}</dd>
{% elif job.state == "Withdrawn" %} {% elif job.state == "Withdrawn" %}
<dd class="col-10 bg-secondary text-white">{{job.state}}</dd> <dd class="col-4 bg-secondary text-white">{{job.state}}</dd>
{% else %} {% else %}
<dd class="col-10">{{job.state}}</dd> <dd class="col-4">{{job.state}}</dd>
{% endif %} {% endif %}
{% if job.wait_for != None %} <dt class="col-2">Start Time:</dt>
<dd class="col-2">Waiting on Job:</dd> <dd class="col-4">{{job.start_time|vicdate}}</dt>
<dl class="col-10"><a href="{{url_for('joblog', id=job.wait_for)}}">Job (id={{job.wait_for}})</a></dl> <dt class="col-2">Run Time:</dt>
{% endif %} <dd class="col-4">{{duration}}
<dt class="col-2">Current File:</dt> <dt class="col-2">Last Update:</dt>
<dd class="col-10">{{job.current_file}}</dd> <dd class="col-4">{{job.last_update|vicdate}}</dd>
<dt class="col-2">Files in pass:</label> <dt class="col-2">Files in pass:</label>
{% if job.num_files and job.num_files > 0 %} {% if job.num_files and job.num_files > 0 %}
<dd class="col-10"> <dd class="col-4">
{% set prog=(job.current_file_num/job.num_files*100)|round|int %} {% set prog=(job.current_file_num/job.num_files*100)|round|int %}
<div title="{{job.current_file_num}} of {{job.num_files}} - {{prog}}%" class="progress my-auto h-100"> <div title="{{job.current_file_num}} of {{job.num_files}} - {{prog}}%" class="progress my-auto h-100">
<div class="progress-bar bg-info" role="progressbar" style="width: {{prog}}%;" aria-valuenow="{{prog}}" aria-valuemin="0" aria-valuemax="100">{{job.current_file_num}} of {{job.num_files}} - {{prog}}%</div> <div class="progress-bar bg-info" role="progressbar" style="width: {{prog}}%;" aria-valuenow="{{prog}}" aria-valuemin="0" aria-valuemax="100">{{job.current_file_num}} of {{job.num_files}} - {{prog}}%</div>
</div> </div>
</dd> </dd>
<dt class="col-2">Current File:</dt>
<dd class="col-4">{{job.current_file}}</dd>
{% elif job.num_files == 0 and job.current_file_num > 0 %} {% elif job.num_files == 0 and job.current_file_num > 0 %}
<dd class="col-10">{{job.current_file_num}} of Unknown Total</dd> <dd class="col-10">{{job.current_file_num}} of Unknown Total</dd>
{% else %} {% else %}
@@ -57,9 +58,9 @@
<tr><td>{{log.log_date|vicdate}}</td><td>{{log.log|safe}}</td></tr> <tr><td>{{log.log_date|vicdate}}</td><td>{{log.log|safe}}</td></tr>
{% if display_more and loop.index == NEWEST_LOG_LIMIT %} {% if display_more and loop.index == NEWEST_LOG_LIMIT %}
<tr> <tr>
<td class="align-middle">Remaining logs truncated</td> <td class="align-middle">Remaining logs hidden</td>
<td> <td>
<button type="button" class="btn btn-outline-info my-0 py-1" onClick="document.body.innerHTML+='<form id=_fm method=POST action={{url_for('joblog', id=job.id)}}></form>';document.getElementById('_fm').submit();">Show all logs</button> <button type="button" class="btn btn-outline-info my-0 py-1 sm-txt" onClick="document.body.innerHTML+='<form id=_fm method=POST action={{url_for('joblog', id=job.id)}}></form>';document.getElementById('_fm').submit();">Show all logs</button>
</td> </td>
</tr> </tr>
{% endif %} {% endif %}