diff options
author | Frederick Muriuki Muriithi | 2022-06-02 09:58:05 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-06-02 09:58:05 +0300 |
commit | dfb56175278409fc56298890b1ca617d0e00992c (patch) | |
tree | 5db7fe8622c329bafaeaf3fa9e1f4ec0067c2869 /qc_app/templates/errors_display.html | |
parent | 8bb941deef5208bdccd3805af93c982aac627752 (diff) | |
download | gn-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/errors_display.html')
-rw-r--r-- | qc_app/templates/errors_display.html | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/qc_app/templates/errors_display.html b/qc_app/templates/errors_display.html new file mode 100644 index 0000000..0c9a212 --- /dev/null +++ b/qc_app/templates/errors_display.html @@ -0,0 +1,43 @@ +{%macro errors_display(errors, no_error_msg, error_message)%} + +{%if errors | length == 0 %} +<span class="alert-success">{{no_error_msg}}</span> +{%else %} +<p class="alert-error">{{error_message}}</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%} + +{%endmacro%} |