From b40f14bb409d54fda957e2d8269f1bc86bd34e58 Mon Sep 17 00:00:00 2001
From: Frederick Muriuki Muriithi
Date: Mon, 29 Dec 2025 11:42:58 -0600
Subject: Samples: Move feature to new UI templates.
---
uploader/templates/samples/base.html | 29 ++--
uploader/templates/samples/list-samples.html | 50 ++-----
uploader/templates/samples/sui-base.html | 25 ----
uploader/templates/samples/sui-list-samples.html | 98 -------------
uploader/templates/samples/sui-upload-failure.html | 32 -----
.../templates/samples/sui-upload-progress.html | 26 ----
uploader/templates/samples/sui-upload-samples.html | 153 ---------------------
uploader/templates/samples/sui-upload-success.html | 31 -----
uploader/templates/samples/upload-failure.html | 5 -
uploader/templates/samples/upload-progress.html | 5 -
uploader/templates/samples/upload-samples.html | 81 +++++------
uploader/templates/samples/upload-success.html | 5 -
12 files changed, 67 insertions(+), 473 deletions(-)
delete mode 100644 uploader/templates/samples/sui-base.html
delete mode 100644 uploader/templates/samples/sui-list-samples.html
delete mode 100644 uploader/templates/samples/sui-upload-failure.html
delete mode 100644 uploader/templates/samples/sui-upload-progress.html
delete mode 100644 uploader/templates/samples/sui-upload-samples.html
delete mode 100644 uploader/templates/samples/sui-upload-success.html
(limited to 'uploader/templates/samples')
diff --git a/uploader/templates/samples/base.html b/uploader/templates/samples/base.html
index 291782b..7fd5020 100644
--- a/uploader/templates/samples/base.html
+++ b/uploader/templates/samples/base.html
@@ -1,12 +1,25 @@
{%extends "populations/base.html"%}
+{%from "populations/macro-display-population-card.html" import display_sui_population_card%}
-{%block lvl3_breadcrumbs%}
-
@@ -124,7 +96,3 @@
{%endif%}
{%endblock%}
-
-{%block sidebarcontents%}
-{{display_population_card(species, population)}}
-{%endblock%}
diff --git a/uploader/templates/samples/sui-base.html b/uploader/templates/samples/sui-base.html
deleted file mode 100644
index 8ec7505..0000000
--- a/uploader/templates/samples/sui-base.html
+++ /dev/null
@@ -1,25 +0,0 @@
-{%extends "populations/sui-base.html"%}
-{%from "populations/macro-display-population-card.html" import display_sui_population_card%}
-
-{%block breadcrumbs%}
-{{super()}}
-
-
- Samples
-
-
-{%endblock%}
-
-{%block contents%}
-
-
{{population.FullName}} ({{population.Name}})
-
-{%endblock%}
-
-
-
-{%block sidebarcontents%}
-{{display_sui_population_card(species, population)}}
-{%endblock%}
diff --git a/uploader/templates/samples/sui-list-samples.html b/uploader/templates/samples/sui-list-samples.html
deleted file mode 100644
index e9ed71a..0000000
--- a/uploader/templates/samples/sui-list-samples.html
+++ /dev/null
@@ -1,98 +0,0 @@
-{%extends "samples/sui-base.html"%}
-{%from "flash_messages.html" import flash_all_messages%}
-{%from "populations/macro-select-population.html" import select_population_form%}
-
-{%block title%}Samples — List Samples{%endblock%}
-
-{%block contents%}
-{{super()}}
-
-
-
manage samples
- {{flash_all_messages()}}
-
-
-
-
-{%if samples | length > 0%}
-
-
- Population "{{population.FullName}} ({{population.Name}})" already has
- {{total_samples}} samples/individuals entered. You can
- explore the list of samples in the table below.
-
-
-
-
-
-
-
- Samples {{offset}} — {{offset+(count if offset + count < total_samples else total_samples - offset)}} / {{total_samples}}
-
-
-
- {%if offset + count < total_samples:%}
-
- Next
-
-
- {%endif%}
-
-
-
-
-
-
- |
- Name |
- Auxilliary Name |
- Symbol |
- Alias |
-
-
-
-
- {%for sample in samples%}
-
- | {{sample.sequence_number}} |
- {{sample.Name}} |
- {{sample.Name2}} |
- {{sample.Symbol or "-"}} |
- {{sample.Alias or "-"}} |
-
- {%endfor%}
-
-
-
-{%else%}
-
-
There are no samples entered for this population. Click the "Add Samples"
- button above, to add some new samples.
-
-{%endif%}
-
-{%endblock%}
diff --git a/uploader/templates/samples/sui-upload-failure.html b/uploader/templates/samples/sui-upload-failure.html
deleted file mode 100644
index d950c50..0000000
--- a/uploader/templates/samples/sui-upload-failure.html
+++ /dev/null
@@ -1,32 +0,0 @@
-{%extends "sui-base.html"%}
-{%from "cli-output.html" import cli_output%}
-
-{%block title%}Samples Upload Failure{%endblock%}
-
-{%block contents%}
-
-
{{job.job_name[0:50]}}…
-
-
There was a failure attempting to upload the samples.
-
-
Here is some information to help with debugging the issue. Provide this
- information to the developer/maintainer.
-
-
Debugging Information
-
- - job id: {{job.jobid}}
- - status: {{job.status}}
- - job type: {{job["job-type"]}}
-
-
-
-
-
stdout
-{{cli_output(job, "stdout")}}
-
-
-
-
stderr
-{{cli_output(job, "stderr")}}
-
-{%endblock%}
diff --git a/uploader/templates/samples/sui-upload-progress.html b/uploader/templates/samples/sui-upload-progress.html
deleted file mode 100644
index 8412c46..0000000
--- a/uploader/templates/samples/sui-upload-progress.html
+++ /dev/null
@@ -1,26 +0,0 @@
-{%extends "samples/sui-base.html"%}
-{%from "cli-output.html" import cli_output%}
-
-{%block extrameta%}
-
-{%endblock%}
-
-{%block title%}Job Status{%endblock%}
-
-{%block contents%}
-
-
{{job.job_name[0:50]}}…
-
-
-status:
-{{job["status"]}} ({{job.get("message", "-")}})
-
-
-
saving to database...
-
-
-
- {{cli_output(job, "stdout")}}
-
-
-{%endblock%}
diff --git a/uploader/templates/samples/sui-upload-samples.html b/uploader/templates/samples/sui-upload-samples.html
deleted file mode 100644
index 83c2061..0000000
--- a/uploader/templates/samples/sui-upload-samples.html
+++ /dev/null
@@ -1,153 +0,0 @@
-{%extends "samples/sui-base.html"%}
-{%from "flash_messages.html" import flash_all_messages%}
-
-{%block title%}Samples — Upload Samples{%endblock%}
-
-{%block breadcrumbs%}
-{{super()}}
-
-
- Upload
-
-
-{%endblock%}
-
-{%block contents%}
-{{flash_all_messages()}}
-
-
-
-
-
Preview File Content
-
-
- preview content
-
-
-
- | Name |
- Name2 |
- Symbol |
- Alias |
-
-
-
-
-
- |
- Please make some selections in the form above to preview the data. |
-
-
-
-
-
-
-
-
-
File Format
-
- Upload a character-separated value (CSV) file that contains
- details about your samples. The CSV file should have the following fields:
-
- - Name
- - The primary name/identifier for the sample/individual.
-
- - Name2
- - A secondary name for the sample. This can simply be the same as
- Name above. This field MUST contain a
- value.
-
- - Symbol
- - A symbol for the sample. This can be a strain name, e.g. 'BXD60' for
- species that have strains. This field can be left empty for species like
- Humans that do not have strains..
-
- - Alias
- - An alias for the sample. Can be an empty field, or take on the same
- value as that of the Symbol.
-
-
-
-{%endblock%}
-
-{%block javascript%}
-
-{%endblock%}
diff --git a/uploader/templates/samples/sui-upload-success.html b/uploader/templates/samples/sui-upload-success.html
deleted file mode 100644
index 054bde8..0000000
--- a/uploader/templates/samples/sui-upload-success.html
+++ /dev/null
@@ -1,31 +0,0 @@
-{%extends "samples/sui-base.html"%}
-{%from "cli-output.html" import cli_output%}
-
-{%block title%}Job Status{%endblock%}
-
-{%block contents%}
-
-
-
{{job.job_name[0:50]}}…
-
-
- status:
- {{job["status"]}} ({{job.get("message", "-")}})
-
-
-
Successfully uploaded the samples.
-
-
- View samples
-
-
-
-
-
- {{cli_output(job, "stdout")}}
-
-
-{%endblock%}
diff --git a/uploader/templates/samples/upload-failure.html b/uploader/templates/samples/upload-failure.html
index 2cf8053..75192ec 100644
--- a/uploader/templates/samples/upload-failure.html
+++ b/uploader/templates/samples/upload-failure.html
@@ -1,6 +1,5 @@
{%extends "base.html"%}
{%from "cli-output.html" import cli_output%}
-{%from "populations/macro-display-population-card.html" import display_population_card%}
{%block title%}Samples Upload Failure{%endblock%}
@@ -31,7 +30,3 @@
{{cli_output(job, "stderr")}}
{%endblock%}
-
-{%block sidebarcontents%}
-{{display_population_card(species, population)}}
-{%endblock%}
diff --git a/uploader/templates/samples/upload-progress.html b/uploader/templates/samples/upload-progress.html
index 677d457..38f931b 100644
--- a/uploader/templates/samples/upload-progress.html
+++ b/uploader/templates/samples/upload-progress.html
@@ -1,6 +1,5 @@
{%extends "samples/base.html"%}
{%from "cli-output.html" import cli_output%}
-{%from "populations/macro-display-population-card.html" import display_population_card%}
{%block extrameta%}