aboutsummaryrefslogtreecommitdiff
path: root/qc_app/templates
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-11-16 03:09:22 +0300
committerFrederick Muriuki Muriithi2022-11-16 03:09:22 +0300
commit838049cedefc5209ff9666624b2b24eccb120fb8 (patch)
tree421a0c82d6533d58d81cf2f65abe51e9e34344a3 /qc_app/templates
parent460b68cbafeb179c8af203b829de3f3337f87078 (diff)
downloadgn-uploader-838049cedefc5209ff9666624b2b24eccb120fb8.tar.gz
ui: Only display the "alert-success" green on completion
* To avoid confusion, only display the "alert-success" green on completion of the parsing process. While parsing, if there are no errors, then display the "No errors found so far" message without the green colour.
Diffstat (limited to 'qc_app/templates')
-rw-r--r--qc_app/templates/errors_display.html4
-rw-r--r--qc_app/templates/job_progress.html2
-rw-r--r--qc_app/templates/parse_results.html2
3 files changed, 4 insertions, 4 deletions
diff --git a/qc_app/templates/errors_display.html b/qc_app/templates/errors_display.html
index 39144a9..f1e27a6 100644
--- a/qc_app/templates/errors_display.html
+++ b/qc_app/templates/errors_display.html
@@ -1,7 +1,7 @@
-{%macro errors_display(errors, no_error_msg, error_message)%}
+{%macro errors_display(errors, no_error_msg, error_message, complete)%}
{%if errors | length == 0 %}
-<span class="alert-success">{{no_error_msg}}</span>
+<span {%if complete%}class="alert-success"{%endif%}>{{no_error_msg}}</span>
{%else %}
<p class="alert-error">{{error_message}}</p>
diff --git a/qc_app/templates/job_progress.html b/qc_app/templates/job_progress.html
index acced9b..1b08814 100644
--- a/qc_app/templates/job_progress.html
+++ b/qc_app/templates/job_progress.html
@@ -25,7 +25,7 @@
</div>
<div>
- {{errors_display(errors, "No errors found so far", "We have found the following errors so far")}}
+ {{errors_display(errors, "No errors found so far", "We have found the following errors so far", False)}}
</div>
{%endblock%}
diff --git a/qc_app/templates/parse_results.html b/qc_app/templates/parse_results.html
index 80d6a2d..ec19812 100644
--- a/qc_app/templates/parse_results.html
+++ b/qc_app/templates/parse_results.html
@@ -10,7 +10,7 @@
<span class="alert-warning">Job aborted by the user</span>
{%endif%}
-{{errors_display(errors, "No errors found in the file", "We found the following errors")}}
+{{errors_display(errors, "No errors found in the file", "We found the following errors", True)}}
{%if errors | length == 0 %}
<form method="post" action="{{url_for('dbinsert.select_platform')}}">