diff options
-rw-r--r-- | qc_app/templates/insert_error.html | 28 | ||||
-rw-r--r-- | qc_app/templates/insert_success.html | 15 | ||||
-rw-r--r-- | qc_app/templates/stdout_output.html | 10 | ||||
-rw-r--r-- | tests/test_data/average_inconsistent_columns.tsv | 7 |
4 files changed, 60 insertions, 0 deletions
diff --git a/qc_app/templates/insert_error.html b/qc_app/templates/insert_error.html new file mode 100644 index 0000000..56dd195 --- /dev/null +++ b/qc_app/templates/insert_error.html @@ -0,0 +1,28 @@ +{%extends "base.html"%} + +{%block title%}Data Insertion Failure{%endblock%} + +{%block contents%} +<h1 class="heading">Insertion Failure</h1> + +<p> + There was an error inserting data into the database +</p> + +<p> + Please notify the developers of this issue when you encounter it, + providing the information below. +</p> + +<h4>Debugging Information</h4> + +<ul> + <li><strong>job id</strong>: {{job["job_id"]}}</li> +</ul> + +<h4>STDERR Output</h4> +<div class="cli-output"> + {{job["stderr"]}} +</div> + +{%endblock%} diff --git a/qc_app/templates/insert_success.html b/qc_app/templates/insert_success.html new file mode 100644 index 0000000..4406c66 --- /dev/null +++ b/qc_app/templates/insert_success.html @@ -0,0 +1,15 @@ +{%extends "base.html"%} +{%from "stdout_output.html" import stdout_output%} + +{%block title%}Insertion Success{%endblock%} + +{%block contents%} +<h1 class="heading">Insertion Success</h1> + +<p>Data inserted successfully!</p> + +<p>The following queries were run:</p> + +{{stdout_output(job)}} + +{%endblock%} diff --git a/qc_app/templates/stdout_output.html b/qc_app/templates/stdout_output.html new file mode 100644 index 0000000..f3fcde5 --- /dev/null +++ b/qc_app/templates/stdout_output.html @@ -0,0 +1,10 @@ +{%macro stdout_output(job)%} + +<h4>STDOUT Output</h4> +<div class="cli-output"> + {%for line in job.get("stdout", "").split("\n\n"):%} + <p>{{line}}</p> + {%endfor%} +</div> + +{%endmacro%} diff --git a/tests/test_data/average_inconsistent_columns.tsv b/tests/test_data/average_inconsistent_columns.tsv new file mode 100644 index 0000000..77fcbeb --- /dev/null +++ b/tests/test_data/average_inconsistent_columns.tsv @@ -0,0 +1,7 @@ +ProbeSetID BXD95 BXD27 BXD98 +10608724 6.356 6.532 6.515 +10608724 6.356 6.532 6.515 +10608724 6.356 6.532 6.515 6.563 +10608724 6.356 6.532 +10608724 6.356 6.532 6.515 6.563 6.471 6.472 +10608724 6.356 6.532 6.515
\ No newline at end of file |