1 class ContainerRequestsController < ApplicationController
2 skip_around_filter :require_thread_api_token, if: proc { |ctrl|
3 Rails.configuration.anonymous_user_token and
4 'show' == ctrl.action_name
8 panes = %w(Status Log Advanced)
9 if @object.andand.state == 'Uncommitted'
10 panes = %w(Inputs) + panes - %w(Log)
16 @object.update_attributes! priority: 0
18 redirect_to params[:return_to]
25 @updates ||= params[@object.class.to_s.underscore.singularize.to_sym]
26 input_obj = @updates[:mounts].andand[:"/var/lib/cwl/cwl.input.json"].andand[:content]
28 workflow = @object.mounts[:"/var/lib/cwl/workflow.json"][:content]
29 get_cwl_inputs(workflow).each do |input_schema|
30 if not input_obj.include? cwl_shortname(input_schema[:id])
33 required, primary_type, param_id = cwl_input_info(input_schema)
34 if input_obj[param_id] == ""
35 input_obj[param_id] = nil
36 elsif primary_type == "boolean"
37 input_obj[param_id] = input_obj[param_id] == "true"
38 elsif ["int", "long"].include? primary_type
39 input_obj[param_id] = input_obj[param_id].to_i
40 elsif ["float", "double"].include? primary_type
41 input_obj[param_id] = input_obj[param_id].to_f
42 elsif ["File", "Directory"].include? primary_type
43 re = CollectionsHelper.match_uuid_with_optional_filepath(input_obj[param_id])
45 c = Collection.find(re[1])
46 input_obj[param_id] = {"class" => primary_type,
47 "location" => "keep:#{c.portable_data_hash}#{re[4]}",
48 "arv:collection" => input_obj[param_id]}
57 flash[:error] = e.to_s