about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-12-03 16:37:28 -0600
committerFrederick Muriuki Muriithi2024-12-03 16:38:00 -0600
commit70e626514fe205ca85a03adf60e4211e140ac7e4 (patch)
treec3ac87085edfa6de3f20b79662067d1d9dac45a3
parent65a05ea7aa9f703d35aa5e424c8038410a3e4be9 (diff)
downloadgn-uploader-70e626514fe205ca85a03adf60e4211e140ac7e4.tar.gz
Display the files metadata in progress section.
-rw-r--r--uploader/phenotypes/views.py5
-rw-r--r--uploader/templates/phenotypes/job-status.html26
2 files changed, 29 insertions, 2 deletions
diff --git a/uploader/phenotypes/views.py b/uploader/phenotypes/views.py
index 9d1c024..a664ba9 100644
--- a/uploader/phenotypes/views.py
+++ b/uploader/phenotypes/views.py
@@ -414,5 +414,8 @@ def job_status(
                                dataset=dataset,
                                job_id=job_id,
                                job=job,
-                               errors=jobs.job_errors(rconn, jobs.jobsnamespace(), job['jobid']),
+                               errors=jobs.job_errors(
+                                   rconn, jobs.jobsnamespace(), job['jobid']),
+                               metadata=jobs.job_files_metadata(
+                                   rconn, jobs.jobsnamespace(), job['jobid']),
                                activelink="add-phenotypes")
diff --git a/uploader/templates/phenotypes/job-status.html b/uploader/templates/phenotypes/job-status.html
index 726d301..30316b5 100644
--- a/uploader/templates/phenotypes/job-status.html
+++ b/uploader/templates/phenotypes/job-status.html
@@ -30,8 +30,32 @@
 {%block contents%}
 
 {%if job%}
+<h4 class="subheading">Progress</h4>
 <div class="row">
-  <p><strong>Status:</strong> {{job.status}}</p>
+  <p><strong>Process Status:</strong> {{job.status}}</p>
+  {%if metadata%}
+  <table class="table">
+    <thead>
+      <tr>
+        <th>File</th>
+        <th>Status</th>
+        <th>Lines Processed</th>
+        <th>Total Errors</th>
+      </tr>
+    </thead>
+
+    <tbody>
+      {%for file,meta in metadata.items()%}
+      <tr>
+        <td>{{file}}</td>
+        <td>{{meta.status}}</td>
+        <td>{{meta.linecount}}</td>
+        <td>{{meta["total-errors"]}}</td>
+      </tr>
+      {%endfor%}
+    </tbody>
+  </table>
+  {%endif%}
   {%if job.status in ("completed:success", "success")%}
   <p><a href="#"
         class="not-implemented btn btn-primary"