diff options
Diffstat (limited to 'qc_app/templates/insert_progress.html')
-rw-r--r-- | qc_app/templates/insert_progress.html | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/qc_app/templates/insert_progress.html b/qc_app/templates/insert_progress.html index 52beaa4..0e1a9e0 100644 --- a/qc_app/templates/insert_progress.html +++ b/qc_app/templates/insert_progress.html @@ -13,9 +13,21 @@ <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="job_{{job_id}}" value="{{(job['percent'] | float) / 100}}">{{job["percent"]}}</progress> -<span>{{"%.2f" | format(job['percent'] | float)}}%</span> +<progress id="jobs_{{job_id}}" value="{{(fraction)}}">{{fraction*100}}</progress> +<span>{{"%.2f" | format(fraction * 100 | float)}}%</span><br /> {{stdout_output(job)}} |