From 9a30b809b6fa78a7faa065e6bf5a13724cc06531 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 17 Dec 2025 13:04:31 -0600 Subject: Update samples UI to new streamlined UI format. --- uploader/templates/samples/sui-base.html | 8 +- 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 +++++ 5 files changed, 249 insertions(+), 1 deletion(-) create mode 100644 uploader/templates/samples/sui-upload-failure.html create mode 100644 uploader/templates/samples/sui-upload-progress.html create mode 100644 uploader/templates/samples/sui-upload-samples.html create mode 100644 uploader/templates/samples/sui-upload-success.html (limited to 'uploader/templates/samples') diff --git a/uploader/templates/samples/sui-base.html b/uploader/templates/samples/sui-base.html index ee08e2e..8ec7505 100644 --- a/uploader/templates/samples/sui-base.html +++ b/uploader/templates/samples/sui-base.html @@ -3,7 +3,13 @@ {%block breadcrumbs%} {{super()}} - + {%endblock%} {%block contents%} diff --git a/uploader/templates/samples/sui-upload-failure.html b/uploader/templates/samples/sui-upload-failure.html new file mode 100644 index 0000000..d950c50 --- /dev/null +++ b/uploader/templates/samples/sui-upload-failure.html @@ -0,0 +1,32 @@ +{%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

+ +
+ +
+

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 new file mode 100644 index 0000000..8412c46 --- /dev/null +++ b/uploader/templates/samples/sui-upload-progress.html @@ -0,0 +1,26 @@ +{%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 new file mode 100644 index 0000000..83c2061 --- /dev/null +++ b/uploader/templates/samples/sui-upload-samples.html @@ -0,0 +1,153 @@ +{%extends "samples/sui-base.html"%} +{%from "flash_messages.html" import flash_all_messages%} + +{%block title%}Samples — Upload Samples{%endblock%} + +{%block breadcrumbs%} +{{super()}} + +{%endblock%} + +{%block contents%} +{{flash_all_messages()}} + +
+
+ upload samples + + + + +
+ + + + See the documentation below for + details on expected file format. +
+ +
+ + + + + If you select 'Other' for the field separator value, + enter the character that separates the fields in your CSV file in the form + field below. + +
+ +
+ + + + Select this if the first line in your file contains headings for the + columns. + +
+ +
+ + + + If there is a character delimiting the string texts within particular + fields in your CSV, provide the character here. This can be left blank if + no such delimiters exist in your file. + +
+ + +
+
+ +
+

Preview File Content

+ + + + + + + + + + + + + + + + + + +
preview content
NameName2SymbolAlias
+ 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 new file mode 100644 index 0000000..054bde8 --- /dev/null +++ b/uploader/templates/samples/sui-upload-success.html @@ -0,0 +1,31 @@ +{%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%} -- cgit 1.4.1