-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #567 from JamesGlover/issue560/gpl-712-as-a-user-w…
…hen-the-destination-plate-is-ready-i-would-like-to-scan-the-barcode-into-the-limber-pipeline-and-decide-whether-it-will-be-processed-as-a-384-or-96-well-plate issue560/gpl 712 as a user when the destination plate is ready i would like to scan the barcode into the limber pipeline and decide whether it will be processed as a 384 or 96 well plate
- Loading branch information
Showing
89 changed files
with
1,132 additions
and
367 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
app/controllers/concerns/sequencescape_submission_behaviour.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# frozen_string_literal: true | ||
|
||
# Module SequencescapeSubmissionBehaviour provides the ability to | ||
# generate submissions to controllers | ||
# | ||
# @author Genome Research Ltd. | ||
# | ||
module SequencescapeSubmissionBehaviour | ||
# Builds a submission using the supplied params[:sequencescape_submission] | ||
def create_submission | ||
ss = SequencescapeSubmission.new(sequencescape_submission_parameters) | ||
if ss.save | ||
flash[:notice] ||= [] | ||
flash[:notice] << 'Your submissions have been made and should be built shortly.' | ||
else | ||
flash[:alert] = truncate_flash(ss.errors.full_messages) | ||
end | ||
end | ||
|
||
def sequencescape_submission_parameters | ||
params | ||
.require(:sequencescape_submission).permit(:template_uuid, request_options: {}, assets: [], asset_groups: {}) | ||
.merge(api: api, user: current_user_uuid) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
# Handles generation of submissions in Sequencescape | ||
class SequencescapeSubmissionsController < ApplicationController | ||
include SequencescapeSubmissionBehaviour | ||
|
||
before_action :check_for_current_user! | ||
|
||
def create | ||
create_submission | ||
redirect_back fallback_location: :root | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.