diff --git a/app/assets/javascripts/components/PipelineSampleReads.jsx b/app/assets/javascripts/components/PipelineSampleReads.jsx
index ff49c4242d..cf423944e1 100644
--- a/app/assets/javascripts/components/PipelineSampleReads.jsx
+++ b/app/assets/javascripts/components/PipelineSampleReads.jsx
@@ -45,6 +45,7 @@ class PipelineSampleReads extends React.Component {
}
let pipeline_run = null;
+ let download_section = null;
if (this.pipelineOutput) {
pipeline_run = (
@@ -80,7 +81,22 @@ class PipelineSampleReads extends React.Component {
- )
+ );
+
+ download_section = (
+
+ );
+
} else {
pipeline_run = (
@@ -192,16 +208,11 @@ class PipelineSampleReads extends React.Component {
diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb
index 033f45974f..2740489c5f 100644
--- a/app/controllers/reports_controller.rb
+++ b/app/controllers/reports_controller.rb
@@ -18,7 +18,11 @@ def show
# GET /reports/new
def new
- @report = Report.new
+ @report = if params[:report]
+ Report.new(params.require(:report).permit(:pipeline_output_id))
+ else
+ Report.new
+ end
end
# GET /reports/1/edit
diff --git a/app/models/sample.rb b/app/models/sample.rb
index 4996a3bbbe..c108616ba7 100644
--- a/app/models/sample.rb
+++ b/app/models/sample.rb
@@ -79,6 +79,14 @@ def sample_output_folder_url
"https://s3.console.aws.amazon.com/s3/object/#{SAMPLES_BUCKET_NAME}/#{sample_path}/results/"
end
+ def sample_input_folder_url
+ "https://s3.console.aws.amazon.com/s3/object/#{SAMPLES_BUCKET_NAME}/#{sample_path}/fastqs/"
+ end
+
+ def as_json(_options = {})
+ super(methods: [:sample_input_folder_url, :sample_output_folder_url, :sample_annotated_fasta_url])
+ end
+
def pipeline_command
script_name = File.basename(IdSeqPipeline::S3_SCRIPT_LOC)
batch_command_env_variables = "INPUT_BUCKET=#{sample_input_s3_path} OUTPUT_BUCKET=#{sample_output_s3_path} " \