[ARVADOS] created: 29356d0c02566aa33b3dbb9513dc701bad8fd16b

Git user git at public.curoverse.com
Mon Nov 21 13:14:52 EST 2016


        at  29356d0c02566aa33b3dbb9513dc701bad8fd16b (commit)


commit 29356d0c02566aa33b3dbb9513dc701bad8fd16b
Author: radhika <radhika at curoverse.com>
Date:   Mon Nov 21 13:02:07 2016 -0500

    10524: update workbench titles to use "processes" instead of "pipelines and processes" when pipelines are disabled.

diff --git a/apps/workbench/app/controllers/projects_controller.rb b/apps/workbench/app/controllers/projects_controller.rb
index 0a2044a..48b2c42 100644
--- a/apps/workbench/app/controllers/projects_controller.rb
+++ b/apps/workbench/app/controllers/projects_controller.rb
@@ -55,8 +55,10 @@ class ProjectsController < ApplicationController
     pane_list = []
 
     procs = ["arvados#containerRequest"]
+    procs_pane_name = 'Processes'
     if PipelineInstance.api_exists?(:index)
       procs << "arvados#pipelineInstance"
+      procs_pane_name = 'Pipelines_and_processes'
     end
 
     workflows = ["arvados#workflow"]
@@ -76,7 +78,7 @@ class ProjectsController < ApplicationController
       }
     pane_list <<
       {
-        :name => 'Pipelines_and_processes',
+        :name => procs_pane_name,
         :filters => [%w(uuid is_a) + [procs]]
       }
     pane_list <<
diff --git a/apps/workbench/app/views/projects/_show_dashboard.html.erb b/apps/workbench/app/views/projects/_show_dashboard.html.erb
index e0093bf..478b397 100644
--- a/apps/workbench/app/views/projects/_show_dashboard.html.erb
+++ b/apps/workbench/app/views/projects/_show_dashboard.html.erb
@@ -24,23 +24,32 @@
   preload_links_for_objects(collection_pdhs + collection_uuids)
 %>
 
+<%
+  no_jobs_api = !PipelineInstance.api_exists?(:index)
+  recent_procs_title = 'Recent pipelines and processes'
+  recent_procs_title = 'Recent processes' if no_jobs_api
+
+  run_proc_title = 'Choose a pipeline or workflow to run:'
+  run_proc_title = 'Choose a workflow to run:' if no_jobs_api
+%>
+
   <div class="row">
     <div class="col-md-6">
       <div class="panel panel-default" style="min-height: 10.5em">
         <div class="panel-heading">
-          <span class="panel-title">Recent pipelines and processes</span>
+          <span class="panel-title"><%=recent_procs_title%></span>
           <% if current_user.andand.is_active %>
             <span class="pull-right recent-processes-actions">
               <span>
                 <%= link_to(
                 choose_work_unit_templates_path(
-                  title: 'Choose a pipeline or workflow to run:',
+                  title: run_proc_title,
                   action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
                   action_href: work_units_path,
                   action_method: 'post',
                   action_data: {'selection_param' => 'work_unit[template_uuid]', 'work_unit[owner_uuid]' => current_user.uuid, 'success' => 'redirect-to-created-object'}.to_json),
                 { class: "btn btn-primary btn-xs", remote: true }) do %>
-                  <i class="fa fa-fw fa-gear"></i> Run a pipeline...
+                  <i class="fa fa-fw fa-gear"></i> Run a process...
                 <% end %>
               </span>
               <span>
diff --git a/apps/workbench/app/views/projects/_show_processes.html.erb b/apps/workbench/app/views/projects/_show_processes.html.erb
new file mode 100644
index 0000000..71f6a89
--- /dev/null
+++ b/apps/workbench/app/views/projects/_show_processes.html.erb
@@ -0,0 +1,5 @@
+<%= render_pane 'tab_contents', to_string: true, locals: {
+      limit: 50,
+      filters: [['uuid', 'is_a', ["arvados#containerRequest"]]],
+      sortable_columns: { 'name' => 'container_requests.name', 'description' => 'container_requests.description' }
+    }.merge(local_assigns) %>
diff --git a/apps/workbench/app/views/projects/show.html.erb b/apps/workbench/app/views/projects/show.html.erb
index e52d826..1129def 100644
--- a/apps/workbench/app/views/projects/show.html.erb
+++ b/apps/workbench/app/views/projects/show.html.erb
@@ -9,6 +9,16 @@
   </h2>
 <% end %>
 
+<%
+  no_jobs_api = !PipelineInstance.api_exists?(:index)
+
+  run_proc_title = 'Choose a pipeline or workflow to run:'
+  run_proc_title = 'Choose a workflow to run:' if no_jobs_api
+
+  run_proc_hover = 'Run a pipeline or workflow in this project'
+  run_proc_hover = 'Run a workflow in this project' if no_jobs_api
+%>
+
 <% content_for :tab_line_buttons do %>
   <% if @object.editable? %>
     <div class="btn-group btn-group-sm">
@@ -38,13 +48,13 @@
     </div>
     <%= link_to(
           choose_work_unit_templates_path(
-            title: 'Choose a pipeline or workflow to run:',
+            title: run_proc_title,
             action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
             action_href: work_units_path,
             action_method: 'post',
             action_data: {'selection_param' => 'work_unit[template_uuid]', 'work_unit[owner_uuid]' => @object.uuid, 'success' => 'redirect-to-created-object'}.to_json),
-          { class: "btn btn-primary btn-sm", remote: true, title: "Run a pipeline or workflow in this project" }) do %>
-      <i class="fa fa-fw fa-gear"></i> Run a pipeline...
+          { class: "btn btn-primary btn-sm", remote: true, title: run_proc_hover }) do %>
+      <i class="fa fa-fw fa-gear"></i> Run a process...
     <% end %>
     <%= link_to projects_path({'project[owner_uuid]' => @object.uuid, 'options' => {'ensure_unique_name' => true}}), method: :post, title: "Add a subproject to this project", class: 'btn btn-sm btn-primary' do %>
       <i class="fa fa-fw fa-plus"></i>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list