}
def show_pane_list
- panes = %w(Status Log Graph Advanced)
- if @object and @object.state == 'Uncommitted'
+ panes = %w(Status Log Advanced)
+ if @object.andand.state == 'Uncommitted'
panes = %w(Inputs) + panes - %w(Log)
end
panes
if input_obj
workflow = @object.mounts[:"/var/lib/cwl/workflow.json"][:content]
workflow[:inputs].each do |input_schema|
- if input_obj.include? input_schema[:id]
- required, primary_type, param_id = cwl_input_info(input_schema)
- if input_obj[param_id] == ""
- input_obj[param_id] = nil
- elsif primary_type == "boolean"
- input_obj[param_id] = input_obj[param_id] == "true"
- elsif ["int", "long"].include? primary_type
- input_obj[param_id] = input_obj[param_id].to_i
- elsif ["float", "double"].include? primary_type
- input_obj[param_id] = input_obj[param_id].to_f
- elsif ["File", "Directory"].include? primary_type
- input_obj[param_id].match /^([0-9a-z]{5}-([0-9a-z]{5})-[0-9a-z]{15})(\/.*)?$/ do |re|
- c = display_value = Collection.find(re[1])
- input_obj[param_id] = {"class" => primary_type,
- "location" => "keep:#{c.portable_data_hash}#{re[3]}",
- "arv:collection" => input_obj[param_id]}
- end
+ if not input_obj.include? input_schema[:id]
+ next
+ end
+ required, primary_type, param_id = cwl_input_info(input_schema)
+ if input_obj[param_id] == ""
+ input_obj[param_id] = nil
+ elsif primary_type == "boolean"
+ input_obj[param_id] = input_obj[param_id] == "true"
+ elsif ["int", "long"].include? primary_type
+ input_obj[param_id] = input_obj[param_id].to_i
+ elsif ["float", "double"].include? primary_type
+ input_obj[param_id] = input_obj[param_id].to_f
+ elsif ["File", "Directory"].include? primary_type
+ re = CollectionsHelper.match_uuid_with_optional_filepath(input_obj[param_id])
+ if re
+ c = Collection.find(re[1])
+ input_obj[param_id] = {"class" => primary_type,
+ "location" => "keep:#{c.portable_data_hash}#{re[4]}",
+ "arv:collection" => input_obj[param_id]}
end
end
end
end
end
elsif "boolean" == primary_type
- return link_to attrvalue, '#', {
+ return link_to attrvalue.to_s, '#', {
"data-emptytext" => "none",
"data-placement" => "bottom",
"data-type" => "select",
"data-title" => "Set value for #{input_schema[:id]}",
"data-name" => dn,
"data-pk" => "{id: \"#{object.uuid}\", key: \"#{object.class.to_s.underscore}\"}",
- "data-value" => attrvalue,
+ "data-value" => attrvalue.to_s,
# "clear" button interferes with form-control's up/down arrows
"data-clear" => false,
:class => "editable #{'required' if required} form-control",