[ARVADOS] updated: 1d1069684c35353f9f0ee4020b76f5dfc7406a47
git at public.curoverse.com
git at public.curoverse.com
Thu Aug 7 10:47:53 EDT 2014
Summary of changes:
apps/workbench/app/helpers/application_helper.rb | 7 ++++++-
apps/workbench/app/models/pipeline_instance.rb | 9 ++++++++-
.../workbench/app/views/pipeline_instances/_show_inputs.html.erb | 3 +--
apps/workbench/test/integration/pipeline_instances_test.rb | 2 ++
4 files changed, 17 insertions(+), 4 deletions(-)
via 1d1069684c35353f9f0ee4020b76f5dfc7406a47 (commit)
from 1865158987c87ef6e6b1c53db65615b17b6324af (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 1d1069684c35353f9f0ee4020b76f5dfc7406a47
Author: Brett Smith <brett at curoverse.com>
Date: Thu Aug 7 10:44:53 2014 -0400
3438: Show input title when choosing Collections for pipeline instances.
Closes #3438.
diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb
index ec29b03..1130036 100644
--- a/apps/workbench/app/helpers/application_helper.rb
+++ b/apps/workbench/app/helpers/application_helper.rb
@@ -260,8 +260,13 @@ module ApplicationHelper
display_value = value_info[:link_name]
end
end
+ if (attr == :components) and (subattr.size > 2)
+ chooser_title = "Choose a dataset for #{object.component_input_title(subattr[0], subattr[2])}:"
+ else
+ chooser_title = "Choose a dataset:"
+ end
modal_path = choose_collections_path \
- ({ title: 'Choose a dataset:',
+ ({ title: chooser_title,
filters: [['tail_uuid', '=', object.owner_uuid]].to_json,
action_name: 'OK',
action_href: pipeline_instance_path(id: object.uuid),
diff --git a/apps/workbench/app/models/pipeline_instance.rb b/apps/workbench/app/models/pipeline_instance.rb
index c3b1475..fa9fab6 100644
--- a/apps/workbench/app/models/pipeline_instance.rb
+++ b/apps/workbench/app/models/pipeline_instance.rb
@@ -28,7 +28,7 @@ class PipelineInstance < ArvadosBase
end
end
end
-
+
def attribute_editable? attr, *args
super && (attr.to_sym == :name ||
(attr.to_sym == :components and
@@ -42,4 +42,11 @@ class PipelineInstance < ArvadosBase
def self.creatable?
false
end
+
+ def component_input_title(component_name, input_name)
+ component = components[component_name]
+ return nil if component.nil?
+ component[:script_parameters].andand[input_name.to_sym].andand[:title] ||
+ "\"#{input_name.to_s}\" parameter for #{component[:script]} script in #{component_name} component"
+ end
end
diff --git a/apps/workbench/app/views/pipeline_instances/_show_inputs.html.erb b/apps/workbench/app/views/pipeline_instances/_show_inputs.html.erb
index 5106710..4573919 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_inputs.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_inputs.html.erb
@@ -12,8 +12,7 @@
not pvalue_spec[:value])) %>
<% n_inputs += 1 %>
<label for="<% "#{cname}-#{pname}" %>">
- <%= pvalue_spec[:title] ||
- "\"#{pname.to_s}\" parameter for #{component[:script]} script in #{cname} component" %>
+ <%= @object.component_input_title(cname, pname) %>
</label>
<div>
<p class="form-control-static">
diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb
index f5d6e63..56e2c69 100644
--- a/apps/workbench/test/integration/pipeline_instances_test.rb
+++ b/apps/workbench/test/integration/pipeline_instances_test.rb
@@ -57,6 +57,8 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
click
within('.modal-dialog') do
+ assert(has_text?("Foo/bar pair"),
+ "pipeline input picker missing name of input")
first('span', text: 'foo_tag').click
find('button', text: 'OK').click
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list