aboutsummaryrefslogtreecommitdiff
path: root/qc_app/templates/parse_results.html
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-06-02 09:58:05 +0300
committerFrederick Muriuki Muriithi2022-06-02 09:58:05 +0300
commitdfb56175278409fc56298890b1ca617d0e00992c (patch)
tree5db7fe8622c329bafaeaf3fa9e1f4ec0067c2869 /qc_app/templates/parse_results.html
parent8bb941deef5208bdccd3805af93c982aac627752 (diff)
downloadgn-uploader-dfb56175278409fc56298890b1ca617d0e00992c.tar.gz
Add an error display to the progress status report
Enable the progress status page to show all the errors found at any point during the processing of the file.
Diffstat (limited to 'qc_app/templates/parse_results.html')
-rw-r--r--qc_app/templates/parse_results.html41
1 files changed, 2 insertions, 39 deletions
diff --git a/qc_app/templates/parse_results.html b/qc_app/templates/parse_results.html
index a750bb5..8d39359 100644
--- a/qc_app/templates/parse_results.html
+++ b/qc_app/templates/parse_results.html
@@ -1,48 +1,11 @@
{%extends "base.html"%}
+{%from "errors_display.html" import errors_display%}
{%block title%}Parse Results{%endblock%}
{%block contents%}
<h1 class="heading">{{job_name}}: parse results</h2>
-{%if errors | length == 0 %}
-<span class="alert-success">No errors found in the file</span>
-{%else %}
-<p class="alert-error">We found the following errors</p>
-
-<table class="reports-table">
- <thead>
- <tr>
- <th>line number</th>
- <th>column(s)</th>
- <th>error</th>
- <th>error message</th>
- </tr>
- </thead>
-
- <tbody>
- {%for error in errors%}
- <tr>
- <td>{{error["line"]}}</td>
- <td>
- {%if isinvalidvalue(error):%}
- {{error.column}}
- {%else: %}
- {{error.columns}}
- {%endif %}
- </td>
- <td>
- {%if isinvalidvalue(error):%}
- Invalid Value
- {%else: %}
- Duplicate Header
- {%endif %}
- </td>
- <td>{{error["message"]}}</td>
- </tr>
- {%endfor%}
- </tbody>
-</table>
-{%endif%}
+{{errors_display(errors, "No errors found in the file", "We found the following errors")}}
{%endblock%}