[ARVADOS] updated: b3883baf33bb023917b2b8a0082eb7635dab38a6
Git user
git at public.curoverse.com
Mon Nov 7 21:15:33 EST 2016
Summary of changes:
.../app/controllers/projects_controller.rb | 4 ++-
.../app/views/projects/_show_workflows.html.erb | 5 ++++
.../test/controllers/disabled_api_test.rb | 29 ++++++++++++++++++++++
3 files changed, 37 insertions(+), 1 deletion(-)
create mode 100644 apps/workbench/app/views/projects/_show_workflows.html.erb
via b3883baf33bb023917b2b8a0082eb7635dab38a6 (commit)
from 99ee07ef79d83bb1e1384e45466435ba04744e58 (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 b3883baf33bb023917b2b8a0082eb7635dab38a6
Author: radhika <radhika at curoverse.com>
Date: Mon Nov 7 21:14:35 2016 -0500
10310: Rename "Pipeline templates" tab in projects#show page as "Workflows" when running crunch2 environment.
diff --git a/apps/workbench/app/controllers/projects_controller.rb b/apps/workbench/app/controllers/projects_controller.rb
index a0b48fd..16ad811 100644
--- a/apps/workbench/app/controllers/projects_controller.rb
+++ b/apps/workbench/app/controllers/projects_controller.rb
@@ -60,8 +60,10 @@ class ProjectsController < ApplicationController
end
workflows = ["arvados#workflow"]
+ workflows_pane_name = 'Workflows'
if arvados_api_exists(:pipeline_templates, :index)
workflows << "arvados#pipelineTemplate"
+ workflows_pane_name = 'Pipeline_templates'
end
if @object.uuid != current_user.andand.uuid
@@ -79,7 +81,7 @@ class ProjectsController < ApplicationController
}
pane_list <<
{
- :name => 'Pipeline_templates',
+ :name => workflows_pane_name,
:filters => [%w(uuid is_a) + [workflows]]
}
pane_list <<
diff --git a/apps/workbench/app/views/projects/_show_workflows.html.erb b/apps/workbench/app/views/projects/_show_workflows.html.erb
new file mode 100644
index 0000000..133fddc
--- /dev/null
+++ b/apps/workbench/app/views/projects/_show_workflows.html.erb
@@ -0,0 +1,5 @@
+<%= render_pane 'tab_contents', to_string: true, locals: {
+ limit: 50,
+ filters: [['uuid', 'is_a', ["arvados#workflow"]]],
+ sortable_columns: { 'name' => 'workflows.name', 'description' => 'workflows.description' }
+ }.merge(local_assigns) %>
diff --git a/apps/workbench/test/controllers/disabled_api_test.rb b/apps/workbench/test/controllers/disabled_api_test.rb
index bc4ce33..7aa87f0 100644
--- a/apps/workbench/test/controllers/disabled_api_test.rb
+++ b/apps/workbench/test/controllers/disabled_api_test.rb
@@ -42,4 +42,33 @@ class DisabledApiTest < ActionController::TestCase
assert_includes @response.body, "index method is not supported for #{ctrl_name.to_s}"
end
end
+
+ [
+ :active,
+ nil,
+ ].each do |user|
+ test "project tabs as user #{user} in crunch2 environment" do
+ @controller = ProjectsController.new
+
+ Rails.configuration.anonymous_user_token = api_fixture('api_client_authorizations')['anonymous']['api_token']
+
+ dd = ArvadosApiClient.new_or_current.discovery.deep_dup
+ dd[:resources][:pipeline_templates][:methods].delete(:index)
+ ArvadosApiClient.any_instance.stubs(:discovery).returns(dd)
+
+ proj_uuid = api_fixture('groups')['anonymously_accessible_project']['uuid']
+
+ if user
+ get(:show, {id: proj_uuid}, session_for(user))
+ else
+ get(:show, {id: proj_uuid})
+ end
+
+ resp = @response.body
+ assert_includes resp, "href=\"#Data_collections\""
+ assert_includes resp, "href=\"#Pipelines_and_processes\""
+ assert_includes resp, "href=\"#Workflows\""
+ assert_not_includes resp, "href=\"#Pipeline_templates\""
+ end
+ end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list