Skip to content

Commit

Permalink
Progress commit, switching machines
Browse files Browse the repository at this point in the history
  • Loading branch information
jorvis committed Aug 21, 2024
1 parent 9312f20 commit 1ad8044
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 3 deletions.
13 changes: 12 additions & 1 deletion www/js/upload_dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ window.onload=function() {
});
});

// Add click listeners for submissions-in-progress-table-tbody rows, even if they don't exist yet
document.addEventListener('click', (event) => {
if (event.target.classList.contains('submission-history-row')) {
const share_id = event.target.dataset.shareId;
const step = event.target.dataset.step;

// Do we want to dynamically load the next step or page refresh for it?
// If dynamic we have to reset all the forms.
}
});

document.getElementById('metadata-form-submit').addEventListener('click', (event) => {
event.preventDefault();
let errored_fields = validateMetadataForm();
Expand Down Expand Up @@ -309,7 +320,7 @@ const storeMetadata = async () => {
upload_step_marker.classList.add('is-light');
upload_step_icon.firstElementChild.classList.add('mdi-wrench');

document.getElementById('step-upload-metadata-c').classList.add('is-hidden');
document.getElementById('step-enter-metadata-c').classList.add('is-hidden');
document.getElementById('step-upload-dataset-c').classList.remove('is-hidden');

// Scroll to the top of the page
Expand Down
54 changes: 52 additions & 2 deletions www/upload_dataset.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ <h1>Submissions in progress</h1>
<tbody id="submissions-in-progress-table-tbody"></tbody>
</table>
<template id="submission-history-row">
<tr data-share-id="">
<tr class="submission-history-row" data-share-id="" data-step="">
<td class="submission-share-id"></td>
<td class="submission-status"></td>
<td class="submission-dataset-type"></td>
Expand All @@ -99,6 +99,12 @@ <h1>Submissions in progress</h1>
<h1>Or start a new submission:</h1>
</div>


<!--
Naming convention here. Every step has an id like 'step-enter-metadata',
which corresponds to a container below, 'step-enter-metadata-c'. That basename
'enter-metadata' can be passed via a link to resume the submission at that step.
-->
<div id="step-graphic-c">
<ul class="steps has-content-centered">
<li id='step-enter-metadata' class="steps-segment is-active">
Expand Down Expand Up @@ -147,7 +153,7 @@ <h1>Or start a new submission:</h1>
</ul>
</div> <!-- end #step-c -->
<hr />
<div id="step-upload-metadata-c" class="step-c">
<div id="step-enter-metadata-c" class="step-c">
<h1>Step - Enter metadata (via form OR upload)</h1>
<p>
The 'metadata' is the data describing your dataset, including things like title, authorship, sequencing
Expand Down Expand Up @@ -757,6 +763,50 @@ <h3>H5AD / Python</h3>
</div>
</div>
</div>
<div id="step-process-dataset-c" class="step-c is-hidden">
<h1>Step - Process dataset</h1>
<p>
Your dataset is being processed on the server. This may take a few minutes, depending on the size of the dataset.
</p>
<p>
You can check the status of the processing below.
</p>
<hr />
<div class="columns">
<div class="column is-6">
<div class="field">
<label class="label">
Dataset processing status
<span class="icon has-tooltip-right has-tooltip-arrow"
data-tooltip="The status of the dataset processing.">
<i class="mdi mdi-information"></i>
</span>
</label>
<div class="control">
<input class="input" type="text" name="dataset-processing-status" placeholder="Processing status" disabled>
</div>
</div>
</div>
<div class="column is-6">
<div class="field">
<label class="label">
Processing log
<span class="icon has-tooltip-right has-tooltip-arrow"
data-tooltip="Log of the processing steps taken.">
<i class="mdi mdi-information"></i>
</span>
</label>
<div class="control">
<textarea class="textarea" name="dataset-processing-log" placeholder="Processing log" disabled></textarea>
</div>
</div>
</div>
</div>
<div class="field">
<progress id="dataset-processing-progress" class="progress is-medium" value="0" max="100"></progress>
</div>
</div>



</div> <!-- end #logged-in-c -->
Expand Down

0 comments on commit 1ad8044

Please sign in to comment.