[ARVADOS] updated: a12cd27da6ba612f2f6ca96cd1b398b3fa621a64
git at public.curoverse.com
git at public.curoverse.com
Sat Apr 11 23:07:24 EDT 2015
Summary of changes:
apps/workbench/app/helpers/application_helper.rb | 8 ++------
apps/workbench/app/views/application/_content.html.erb | 10 +++++-----
.../app/views/pipeline_instances/_running_component.html.erb | 10 +++++-----
.../pipeline_instances/_show_components_editable.html.erb | 2 +-
apps/workbench/test/controllers/application_controller_test.rb | 8 --------
apps/workbench/test/integration/anonymous_access_test.rb | 4 ++--
6 files changed, 15 insertions(+), 27 deletions(-)
via a12cd27da6ba612f2f6ca96cd1b398b3fa621a64 (commit)
from 02840ce904bef5542090fda327c072cdd05c32b3 (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 a12cd27da6ba612f2f6ca96cd1b398b3fa621a64
Author: Radhika Chippada <radhika at curoverse.com>
Date: Sat Apr 11 23:06:31 2015 -0400
5365: updated signature for link_to_arvados_object_if_readable
diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb
index a445c90..d842e82 100644
--- a/apps/workbench/app/helpers/application_helper.rb
+++ b/apps/workbench/app/helpers/application_helper.rb
@@ -177,7 +177,7 @@ module ApplicationHelper
end
end
- def link_to_arvados_object_if_readable(attrvalue, link_text, link_text_if_not_readable, use_friendly_name=false)
+ def link_to_arvados_object_if_readable(attrvalue, link_text_if_not_readable, opts={})
resource_class = resource_class_for_uuid(attrvalue)
if !resource_class
return link_text_if_not_readable
@@ -194,11 +194,7 @@ module ApplicationHelper
end
if readable
- if use_friendly_name
- link_to_if_arvados_object attrvalue, friendly_name: true
- else
- link_to_if_arvados_object attrvalue, link_text: link_text
- end
+ link_to_if_arvados_object attrvalue, opts
else
link_text_if_not_readable
end
diff --git a/apps/workbench/app/views/application/_content.html.erb b/apps/workbench/app/views/application/_content.html.erb
index 3cfadee..99fbfaa 100644
--- a/apps/workbench/app/views/application/_content.html.erb
+++ b/apps/workbench/app/views/application/_content.html.erb
@@ -6,32 +6,32 @@
<% pane_list.each_with_index do |pane, i| %>
<% pane_name = (pane.is_a?(Hash) ? pane[:name] : pane) %>
- <% data_toggle = "tab" %>
<% tab_tooltip = "" %>
+ <% link_disabled = "" %>
<% if (pane_name == "Log") and !(ArvadosBase.find(@object.owner_uuid).writable_by.include?(current_user.andand.uuid) rescue nil)
if controller.model_class.to_s == 'Job'
if @object.log and !@object.log.empty?
logCollection = Collection.find? @object.log
if !logCollection
- data_toggle = "disabled"
tab_tooltip = "Log data is not available"
+ link_disabled = "disabled"
end
end
elsif controller.model_class.to_s == 'PipelineInstance'
log_uuids = [@object.uuid] + pipeline_jobs(@object).collect{|x|x[:job].andand[:uuid]}.compact
if stderr_log_history(log_uuids, 1).empty?
- data_toggle = "disabled"
tab_tooltip = "Log data is not available"
+ link_disabled = "disabled"
end
end
end
%>
- <li class="<%= 'active' if i==0 %>" data-toggle="tooltip" data-placement="top" title="<%=tab_tooltip%>">
+ <li class="<%= 'active' if i==0 %> <%= link_disabled %>" data-toggle="tooltip" data-placement="top" title="<%=tab_tooltip%>">
<a href="#<%= pane_name %>"
id="<%= pane_name %>-tab"
- data-toggle="<%= data_toggle %>"
+ data-toggle="tab"
data-tab-history=true
data-tab-history-update-url=true
>
diff --git a/apps/workbench/app/views/pipeline_instances/_running_component.html.erb b/apps/workbench/app/views/pipeline_instances/_running_component.html.erb
index 7c528b0..1a9cb35 100644
--- a/apps/workbench/app/views/pipeline_instances/_running_component.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_running_component.html.erb
@@ -66,9 +66,9 @@
<%# column offset 8 %>
<div class="col-md-4 text-overflow-ellipsis">
<% if pj[:output_uuid] %>
- <%= link_to_arvados_object_if_readable(pj[:output_uuid], pj[:output_uuid], 'Output data not available', true) %>
+ <%= link_to_arvados_object_if_readable(pj[:output_uuid], 'Output data not available', friendly_name: true) %>
<% elsif current_job[:output] %>
- <%= link_to_arvados_object_if_readable(current_job[:output], "Output of #{pj[:name]}", 'Output data not available') %>
+ <%= link_to_arvados_object_if_readable(current_job[:output], 'Output data not available', link_text: "Output of #{pj[:name]}") %>
<% else %>
No output.
<% end %>
@@ -125,7 +125,7 @@
</td>
<td>
<%= link_to_arvados_object_if_readable(current_component[:docker_image_locator],
- current_component[:docker_image_locator], current_component[:docker_image_locator], true) %>
+ current_component[:docker_image_locator], friendly_name: true) %>
</td>
</tr>
<% else %>
@@ -149,9 +149,9 @@
</td>
<td>
<% if k == :uuid %>
- <%= link_to_arvados_object_if_readable(current_component[k], current_component[k], current_component[k], false) %>
+ <%= link_to_arvados_object_if_readable(current_component[k], current_component[k], link_text: current_component[k]) %>
<% elsif k.to_s.end_with? 'uuid' %>
- <%= link_to_arvados_object_if_readable(current_component[k], current_component[k], current_component[k], true) %>
+ <%= link_to_arvados_object_if_readable(current_component[k], current_component[k], friendly_name: true) %>
<% elsif k.to_s.end_with? '_at' %>
<%= render_localized_date(current_component[k]) %>
<% else %>
diff --git a/apps/workbench/app/views/pipeline_instances/_show_components_editable.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components_editable.html.erb
index 4277909..51fe8d4 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_components_editable.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_components_editable.html.erb
@@ -4,7 +4,7 @@
@object.components.each do |k, component|
next if !component
component[:script_parameters].andand.each do |p, tv|
- if tv.is_a? Hash and !tv[:value].nil? and tv[:dataclass].andand.eql?('Collection')
+ if tv.is_a? Hash and !tv[:value].nil? and (tv[:dataclass] == "Collection")
if CollectionsHelper.match(tv[:value])
input_pdhs << tv[:value]
else
diff --git a/apps/workbench/test/controllers/application_controller_test.rb b/apps/workbench/test/controllers/application_controller_test.rb
index 7e9c0bc..22ff7d4 100644
--- a/apps/workbench/test/controllers/application_controller_test.rb
+++ b/apps/workbench/test/controllers/application_controller_test.rb
@@ -324,14 +324,6 @@ class ApplicationControllerTest < ActionController::TestCase
assert_equal collections[pdh1].size, 1, 'Expected one collection for the passed in pdh #{pdh1}'
assert collections[pdh2], 'Expected collections for the passed in pdh #{pdh2}'
assert_equal collections[pdh2].size, 1, 'Expected one collection for the passed in pdh #{pdh2}'
-
- # invoke again for this same input. this time, the preloaded data will be returned
- collections = ac.send :preload_collections_for_objects, pdhs
- assert collections, 'Expected collections map'
- assert collections.is_a?(Hash), 'Expected a hash'
- assert collections.size == 2, 'Expected two objects in the preloaded collection hash'
- assert collections[pdh1], 'Expected collection for the passed in pdh #{pdh1}'
- assert collections[pdh2], 'Expected collection for the passed in pdh #{pdh2}'
end
test "requesting a nonexistent object returns 404" do
diff --git a/apps/workbench/test/integration/anonymous_access_test.rb b/apps/workbench/test/integration/anonymous_access_test.rb
index dedcd4c..d00e20a 100644
--- a/apps/workbench/test/integration/anonymous_access_test.rb
+++ b/apps/workbench/test/integration/anonymous_access_test.rb
@@ -219,7 +219,7 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
end
assert_no_text 'Output data not available'
assert_selector 'a[href="#Log"]', text: 'Log'
- assert_no_selector 'a[data-toggle="disabled"]', text: 'Log'
+ assert_no_selector 'a[class="disabled"]', text: 'Log'
else
if pipeline_page
assert_no_text 'This pipeline was created from' # template is not readable
@@ -228,7 +228,7 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
assert_text 'Output data not available'
assert_text object['job']
assert_selector 'a[href="#Log"]', text: 'Log'
- assert_selector 'a[data-toggle="disabled"]', text: 'Log'
+ assert_selector 'a[class="disabled"]', text: 'Log'
end
click_link 'Log'
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list