aboutsummaryrefslogtreecommitdiff
path: root/qc_app/templates/insert_progress.html
blob: 0e1a9e0bb54acd0a0820bdd554a87c472e32adcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{%extends "base.html"%}
{%from "stdout_output.html" import stdout_output%}

{%block extrameta%}
<meta http-equiv="refresh" content="5">
{%endblock%}

{%block title%}Job Status{%endblock%}

{%block contents%}
<h1 class="heading">{{job_name}}</h1>

<label for="job_status">status:</label>
<span>{{job_status}}: {{message}}</span><br />

{%if job.get("stdout", "").split("\n\n") | length < 3 %}
{%set lines = 0%}
{%else%}
{%set lines = (job.get("stdout", "").split("\n\n") | length / 3) %}
{%endif%}
{%set totallines = job.get("totallines", lines+3) | int %}
{%if totallines > 1000 %}
{%set fraction = ((lines*1000)/totallines) %}
{%else%}
{%set fraction = (lines/totallines)%}
{%endif%}

<label for="job_{{job_id}}">inserting: </label>
<progress id="jobs_{{job_id}}" value="{{(fraction)}}">{{fraction*100}}</progress>
<span>{{"%.2f" | format(fraction * 100 | float)}}%</span><br />


{{stdout_output(job)}}

{%endblock%}