[ARVADOS] updated: 55442fc4576a69bf41589a2572cda522227fb9ac

git at public.curoverse.com git at public.curoverse.com
Thu Jun 12 22:24:40 EDT 2014


Summary of changes:
 apps/workbench/app/assets/javascripts/selection.js |  3 ++
 .../app/assets/stylesheets/application.css.scss    |  2 +-
 .../app/controllers/actions_controller.rb          |  2 +-
 .../app/controllers/application_controller.rb      | 54 ++++++++++++++++++++-
 .../app/controllers/collections_controller.rb      |  2 +-
 .../app/controllers/projects_controller.rb         | 50 ++++++-------------
 .../app/views/application/_content.html.erb        |  2 +-
 .../views/application/_selection_checkbox.html.erb |  2 +-
 apps/workbench/app/views/collections/show.html.erb | 16 +++----
 .../app/views/layouts/application.html.erb         | 21 ++++----
 .../pipeline_instances/_show_components.html.erb   | 54 ---------------------
 .../app/views/pipeline_instances/show.html.erb     | 56 +++++++++++++++++++++-
 apps/workbench/app/views/projects/_choose.html.erb |  2 +-
 .../projects/_index_jobs_and_pipelines.html.erb    |  4 +-
 .../app/views/projects/_show_contents.html.erb     | 16 +++----
 .../views/projects/_show_contents_rows.html.erb    |  2 +-
 apps/workbench/app/views/projects/index.html.erb   |  6 +--
 .../workbench/test/integration/collections_test.rb |  3 +-
 apps/workbench/test/integration/projects_test.rb   |  2 +-
 .../functional/arvados/v1/users_controller_test.rb |  2 +-
 20 files changed, 164 insertions(+), 137 deletions(-)
 mode change 120000 => 100644 apps/workbench/app/views/pipeline_instances/show.html.erb

       via  55442fc4576a69bf41589a2572cda522227fb9ac (commit)
       via  f233795c54fbfd3b0481e5bce0914a9192e2b8ff (commit)
       via  bf43b9c625657fa745bbb237248f7d33ccb4cd2b (commit)
      from  1b97a93f4a0e51836331c298c3946e02b6fe82ae (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 55442fc4576a69bf41589a2572cda522227fb9ac
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Jun 12 22:24:14 2014 -0400

    2872: Fix test, to match fixed fixture.

diff --git a/services/api/test/functional/arvados/v1/users_controller_test.rb b/services/api/test/functional/arvados/v1/users_controller_test.rb
index f02d62b..04e74aa 100644
--- a/services/api/test/functional/arvados/v1/users_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/users_controller_test.rb
@@ -718,7 +718,7 @@ class Arvados::V1::UsersControllerTest < ActionController::TestCase
     assert active_user['is_invited'], 'expected is_invited for active user'
 
     verify_link_existence active_user['uuid'], active_user['email'],
-          false, false, false, true, true
+          false, true, false, true, true
 
     authorize_with :admin
 

commit f233795c54fbfd3b0481e5bce0914a9192e2b8ff
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Jun 12 20:53:05 2014 -0400

    2872: Move project_tree code into helper_methods, fix up tests.

diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index 3a9ccf2..ebd8661 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -550,7 +550,8 @@ class ApplicationController < ActionController::Base
 
   helper_method :all_projects
   def all_projects
-    @all_projects ||= Group.filter([['group_class','in',['project','folder']]])
+    @all_projects ||= Group.
+      filter([['group_class','in',['project','folder']]]).order('name')
   end
 
   helper_method :my_projects
@@ -594,6 +595,57 @@ class ApplicationController < ActionController::Base
     end
   end
 
+  helper_method :my_project_tree
+  def my_project_tree
+    build_project_trees
+    @my_project_tree
+  end
+
+  helper_method :shared_project_tree
+  def shared_project_tree
+    build_project_trees
+    @shared_project_tree
+  end
+
+  def build_project_trees
+    return if @my_project_tree and @shared_project_tree
+    parent_of = {current_user.uuid => 'me'}
+    all_projects.each do |ob|
+      parent_of[ob.uuid] = ob.owner_uuid
+    end
+    children_of = {false => [], 'me' => [current_user]}
+    all_projects.each do |ob|
+      if ob.owner_uuid != current_user.uuid and
+          not parent_of.has_key? ob.owner_uuid
+        parent_of[ob.uuid] = false
+      end
+      children_of[parent_of[ob.uuid]] ||= []
+      children_of[parent_of[ob.uuid]] << ob
+    end
+    buildtree = lambda do |children_of, root_uuid=false|
+      tree = {}
+      children_of[root_uuid].andand.each do |ob|
+        tree[ob] = buildtree.call(children_of, ob.uuid)
+      end
+      tree
+    end
+    sorted_paths = lambda do |tree, depth=0|
+      paths = []
+      tree.keys.sort_by { |ob|
+        ob.is_a?(String) ? ob : ob.friendly_link_name
+      }.each do |ob|
+        paths << {object: ob, depth: depth}
+        paths += sorted_paths.call tree[ob], depth+1
+      end
+      paths
+    end
+    @my_project_tree =
+      sorted_paths.call buildtree.call(children_of, 'me')
+    @shared_project_tree =
+      sorted_paths.call({'Shared with me' =>
+                          buildtree.call(children_of, false)})
+  end
+
   helper_method :get_object
   def get_object uuid
     if @get_object.nil? and @objects
diff --git a/apps/workbench/app/controllers/projects_controller.rb b/apps/workbench/app/controllers/projects_controller.rb
index cd32c65..8f6b96e 100644
--- a/apps/workbench/app/controllers/projects_controller.rb
+++ b/apps/workbench/app/controllers/projects_controller.rb
@@ -64,45 +64,8 @@ class ProjectsController < ApplicationController
   end
 
   def find_objects_for_index
-    @objects = Group.
-      filter([['group_class','in',['project','folder']]]).
-      order('name')
+    @objects = all_projects
     super
-    parent_of = {current_user.uuid => 'me'}
-    @objects.each do |ob|
-      parent_of[ob.uuid] = ob.owner_uuid
-    end
-    children_of = {false => [], 'me' => [current_user]}
-    @objects.each do |ob|
-      if ob.owner_uuid != current_user.uuid and
-          not parent_of.has_key? ob.owner_uuid
-        parent_of[ob.uuid] = false
-      end
-      children_of[parent_of[ob.uuid]] ||= []
-      children_of[parent_of[ob.uuid]] << ob
-    end
-    buildtree = lambda do |children_of, root_uuid=false|
-      tree = {}
-      children_of[root_uuid].andand.each do |ob|
-        tree[ob] = buildtree.call(children_of, ob.uuid)
-      end
-      tree
-    end
-    sorted_paths = lambda do |tree, depth=0|
-      paths = []
-      tree.keys.sort_by { |ob|
-        ob.is_a?(String) ? ob : ob.friendly_link_name
-      }.each do |ob|
-        paths << {object: ob, depth: depth}
-        paths += sorted_paths.call tree[ob], depth+1
-      end
-      paths
-    end
-    @my_project_tree =
-      sorted_paths.call buildtree.call(children_of, 'me')
-    @shared_project_tree =
-      sorted_paths.call({'Shared with me' =>
-                          buildtree.call(children_of, false)})
   end
 
   def show
diff --git a/apps/workbench/app/views/layouts/application.html.erb b/apps/workbench/app/views/layouts/application.html.erb
index ef9bdee..5ec45ef 100644
--- a/apps/workbench/app/views/layouts/application.html.erb
+++ b/apps/workbench/app/views/layouts/application.html.erb
@@ -173,7 +173,7 @@
                 <% end %>
                 My projects
               </li>
-              <% @my_project_tree.each do |pnode| %>
+              <% my_project_tree.each do |pnode| %>
                 <% next if pnode[:object].class != Group %>
                 <li style="padding-left: <%= pnode[:depth]-1 %>em">
                   <%= link_to(pnode[:object].name, project_path(pnode[:object].uuid)) %>
@@ -183,7 +183,7 @@
               <li role="presentation" class="dropdown-header">
                 Projects shared with me
               </li>
-              <% @shared_project_tree.each do |pnode| %>
+              <% shared_project_tree.each do |pnode| %>
                 <% next if pnode[:object].class != Group %>
                 <li style="padding-left: <%= pnode[:depth]-1 %>em">
                   <%= link_to project_path(pnode[:object].uuid) do %>
diff --git a/apps/workbench/app/views/projects/_choose.html.erb b/apps/workbench/app/views/projects/_choose.html.erb
index 3481fdd..93c0c49 100644
--- a/apps/workbench/app/views/projects/_choose.html.erb
+++ b/apps/workbench/app/views/projects/_choose.html.erb
@@ -9,7 +9,7 @@
 
       <div class="modal-body">
         <div class="selectable-container" style="height: 15em; overflow-y: scroll">
-          <% [@my_project_tree, @shared_project_tree].each do |tree| %>
+          <% [my_project_tree, shared_project_tree].each do |tree| %>
             <% tree.each do |projectnode| %>
               <% if projectnode[:object].is_a? String %>
                 <div class="row" style="padding-left: <%= 1 + projectnode[:depth] %>em;">
diff --git a/apps/workbench/app/views/projects/index.html.erb b/apps/workbench/app/views/projects/index.html.erb
index 832b5d4..2c76433 100644
--- a/apps/workbench/app/views/projects/index.html.erb
+++ b/apps/workbench/app/views/projects/index.html.erb
@@ -37,7 +37,7 @@
           </h3>
         </div>
         <div class="panel-body scroll-20em">
-          <%= render partial: 'index_projects', locals: {tree: @my_project_tree, show_root_node: false} %>
+          <%= render partial: 'index_projects', locals: {tree: my_project_tree, show_root_node: false} %>
         </div>
       </div>
     </div>
@@ -49,7 +49,7 @@
           </h3>
         </div>
         <div class="panel-body scroll-20em">
-          <%= render partial: 'index_projects', locals: {tree: @shared_project_tree, show_root_node: false} %>
+          <%= render partial: 'index_projects', locals: {tree: shared_project_tree, show_root_node: false} %>
         </div>
       </div>
     </div>
diff --git a/apps/workbench/test/integration/collections_test.rb b/apps/workbench/test/integration/collections_test.rb
index 8978f73..8ac8fe4 100644
--- a/apps/workbench/test/integration/collections_test.rb
+++ b/apps/workbench/test/integration/collections_test.rb
@@ -41,7 +41,8 @@ class CollectionsTest < ActionDispatch::IntegrationTest
   test "Collection page renders default name links" do
     uuid = api_fixture('collections')['foo_file']['uuid']
     coll_name = api_fixture('links')['foo_collection_name_in_aproject']['name']
-    visit page_with_token('active', "/collections/#{uuid}")
+    name_uuid = api_fixture('links')['foo_collection_name_in_aproject']['uuid']
+    visit page_with_token('active', "/collections/#{name_uuid}")
     assert(page.has_text?(coll_name), "Collection page did not include name")
     # Now check that the page is otherwise normal, and the collection name
     # isn't only showing up in an error message.
diff --git a/apps/workbench/test/integration/projects_test.rb b/apps/workbench/test/integration/projects_test.rb
index 76a61b4..5758fc7 100644
--- a/apps/workbench/test/integration/projects_test.rb
+++ b/apps/workbench/test/integration/projects_test.rb
@@ -70,7 +70,7 @@ class ProjectsTest < ActionDispatch::IntegrationTest
     end
     wait_for_ajax
 
-    click_link 'Move to...'
+    click_link 'Move project...'
     find('.selectable', text: 'Project 1234').click
     find('.modal-footer a,button', text: 'Move').click
     wait_for_ajax

commit bf43b9c625657fa745bbb237248f7d33ccb4cd2b
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Jun 12 18:03:26 2014 -0400

    2872: Fix bugs, tweak formatting

diff --git a/apps/workbench/app/assets/javascripts/selection.js b/apps/workbench/app/assets/javascripts/selection.js
index 0fa2e9a..a313c8b 100644
--- a/apps/workbench/app/assets/javascripts/selection.js
+++ b/apps/workbench/app/assets/javascripts/selection.js
@@ -186,6 +186,9 @@ function dispatch_selection_action() {
     var data = [];
     var param_name = $(this).attr('data-selection-param-name');
     var href = $(this).attr('data-href');
+    if ($(this).closest('.disabled').length > 0) {
+	return false;
+    }
     $('.persistent-selection:checkbox:checked').each(function() {
         data.push({name: param_name, value: $(this).val()});
     });
diff --git a/apps/workbench/app/assets/stylesheets/application.css.scss b/apps/workbench/app/assets/stylesheets/application.css.scss
index c01195c..4fea7ae 100644
--- a/apps/workbench/app/assets/stylesheets/application.css.scss
+++ b/apps/workbench/app/assets/stylesheets/application.css.scss
@@ -211,7 +211,7 @@ div#wrapper {
   padding-bottom: 1em;
 }
 .arv-description-in-table {
-  max-height: 3.5em;
+  height: 4em;
   overflow-x: hidden;
   overflow-y: hidden;
 }
diff --git a/apps/workbench/app/controllers/actions_controller.rb b/apps/workbench/app/controllers/actions_controller.rb
index 6fbdf29..c1e2617 100644
--- a/apps/workbench/app/controllers/actions_controller.rb
+++ b/apps/workbench/app/controllers/actions_controller.rb
@@ -39,7 +39,7 @@ class ActionsController < ApplicationController
                          tail_uuid: @object.uuid,
                          head_uuid: src.uuid,
                          link_class: 'name',
-                         name: @object.uuid)
+                         name: src.uuid)
         else
           case action
           when :copy
diff --git a/apps/workbench/app/controllers/collections_controller.rb b/apps/workbench/app/controllers/collections_controller.rb
index 88dadbb..fa83714 100644
--- a/apps/workbench/app/controllers/collections_controller.rb
+++ b/apps/workbench/app/controllers/collections_controller.rb
@@ -162,7 +162,7 @@ class CollectionsController < ApplicationController
       @project_links = Link.limit(RELATION_LIMIT).order("modified_at DESC")
         .where(head_uuid: @object.uuid, link_class: 'name').results
       project_hash = Group.where(uuid: @project_links.map(&:tail_uuid)).to_hash
-      @projects = @project_links.map { |link| project_hash[link.tail_uuid] }
+      @projects = project_hash.values
       @permissions = Link.limit(RELATION_LIMIT).order("modified_at DESC")
         .where(head_uuid: @object.uuid, link_class: 'permission',
                name: 'can_read').results
diff --git a/apps/workbench/app/controllers/projects_controller.rb b/apps/workbench/app/controllers/projects_controller.rb
index 89a50b2..cd32c65 100644
--- a/apps/workbench/app/controllers/projects_controller.rb
+++ b/apps/workbench/app/controllers/projects_controller.rb
@@ -48,6 +48,21 @@ class ProjectsController < ApplicationController
     end
   end
 
+  def destroy
+    while (objects = Link.filter([['owner_uuid','=', at object.uuid],
+                                  ['tail_uuid','=', at object.uuid]])).any?
+      objects.each do |object|
+        object.destroy
+      end
+    end
+    while (objects = @object.contents(include_linked: false)).any?
+      objects.each do |object|
+        object.update_attributes! owner_uuid: current_user.uuid
+      end
+    end
+    super
+  end
+
   def find_objects_for_index
     @objects = Group.
       filter([['group_class','in',['project','folder']]]).
diff --git a/apps/workbench/app/views/application/_content.html.erb b/apps/workbench/app/views/application/_content.html.erb
index 0cd3a2c..bcea406 100644
--- a/apps/workbench/app/views/application/_content.html.erb
+++ b/apps/workbench/app/views/application/_content.html.erb
@@ -1,5 +1,5 @@
 <% content_for :content_top do %>
-  <% if @object and not @object.is_a?(Group) and @object.class.goes_in_projects? and @object.owner_uuid == current_user.uuid %>
+  <% if @object and not @object.is_a?(Group) and @object.class.goes_in_projects? and @object.owner_uuid == current_user.uuid and not @name_link %>
     <div class="pull-right" style="width: 40%">
       <div class="alert alert-warning alert-dismissable">
         <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
diff --git a/apps/workbench/app/views/application/_selection_checkbox.html.erb b/apps/workbench/app/views/application/_selection_checkbox.html.erb
index 9d279bc..25aef94 100644
--- a/apps/workbench/app/views/application/_selection_checkbox.html.erb
+++ b/apps/workbench/app/views/application/_selection_checkbox.html.erb
@@ -1,4 +1,4 @@
-<%if object and object.class.goes_in_projects? %>
+<%if object and (object.class.goes_in_projects? or (object.is_a?(Link) and ArvadosBase::resource_class_for_uuid(object.head_uuid).to_s == 'Collection')) %>
   <% fn = if defined? friendly_name
             friendly_name
           else
diff --git a/apps/workbench/app/views/collections/show.html.erb b/apps/workbench/app/views/collections/show.html.erb
index bf2e7aa..f3af64e 100644
--- a/apps/workbench/app/views/collections/show.html.erb
+++ b/apps/workbench/app/views/collections/show.html.erb
@@ -3,22 +3,20 @@
     <div class="panel panel-info">
       <div class="panel-heading">
 	<h3 class="panel-title">
-          <% i = 0 %>
-            <% @project_links.each do |l| %>
-              <%= if i > 0 then ', ' end %>
-              <% i += 1 %>
-              <%= l.name %>
-            <% end %>
+	  <%= @name_link.andand.name || @object.uuid %>
 	</h3>
       </div>
       <div class="panel-body">
         <img src="/favicon.ico" class="pull-right" alt="" style="opacity: 0.3"/>
+	<p><i>Content hash:</i><br />
+	  <span class="arvados-uuid"><%= @object.uuid %></span></p>
+
         <% if not (@output_of.andand.any? or @log_of.andand.any?) %>
           <p><i>No source information available.</i></p>
         <% end %>
 
         <% if @output_of.andand.any? %>
-          <p>This collection was the output of:<br />
+          <p><i>This collection was the output of:</i><br />
           <%= render_arvados_object_list_start(@output_of, 'Show all jobs',
                 jobs_path(filter: [['output', '=', @object.uuid]].to_json)) do |job| %>
             <%= link_to_if_arvados_object(job, friendly_name: true) %><br />
@@ -27,7 +25,7 @@
         <% end %>
 
         <% if @log_of.andand.any? %>
-          <p>This collection contains log messages from:<br />
+          <p><i>This collection contains log messages from:</i><br />
           <%= render_arvados_object_list_start(@log_of, 'Show all jobs',
                 jobs_path(filter: [['log', '=', @object.uuid]].to_json)) do |job| %>
             <%= link_to_if_arvados_object(job, friendly_name: true) %><br />
@@ -93,7 +91,7 @@
           <%= render_arvados_object_list_start(@projects, 'Show all projects',
                 links_path(filter: [['head_uuid', '=', @object.uuid],
                                     ['link_class', '=', 'name']].to_json)) do |project| %>
-          <%= link_to_if_arvados_object(project, friendly_name: true) %><br />
+            <%= link_to_if_arvados_object(project, friendly_name: true) %><br />
           <% end %>
           </p>
         <% end %>
diff --git a/apps/workbench/app/views/layouts/application.html.erb b/apps/workbench/app/views/layouts/application.html.erb
index c42abfe..ef9bdee 100644
--- a/apps/workbench/app/views/layouts/application.html.erb
+++ b/apps/workbench/app/views/layouts/application.html.erb
@@ -173,19 +173,21 @@
                 <% end %>
                 My projects
               </li>
-              <% my_projects.each do |p| %>
-                <li>
-                  <%= link_to(p.name, project_path(p.uuid)) %>
+              <% @my_project_tree.each do |pnode| %>
+                <% next if pnode[:object].class != Group %>
+                <li style="padding-left: <%= pnode[:depth]-1 %>em">
+                  <%= link_to(pnode[:object].name, project_path(pnode[:object].uuid)) %>
                 </li>
               <% end %>
               <li class="divider">
               <li role="presentation" class="dropdown-header">
                 Projects shared with me
               </li>
-              <% projects_shared_with_me.each do |p| %>
-                <li>
-                  <%= link_to project_path(p.uuid) do %>
-                    <i class="fa fa-fw fa-share-alt"></i> <%= p.name %>
+              <% @shared_project_tree.each do |pnode| %>
+                <% next if pnode[:object].class != Group %>
+                <li style="padding-left: <%= pnode[:depth]-1 %>em">
+                  <%= link_to project_path(pnode[:object].uuid) do %>
+                    <i class="fa fa-fw fa-share-alt" style="color:#aaa"></i> <%= pnode[:object].name %>
                   <% end %>
                 </li>
               <% end %>
@@ -199,11 +201,6 @@
               <%= link_to(p.name, project_path(p.uuid), data: {object_uuid: p.uuid, name: 'name'}) %>
             </li>
           <% end %>
-          <% if current_project_uuid.andand != @object.andand.uuid %>
-            <li class="nav-separator">
-              <i class="fa fa-lg fa-angle-double-right"></i>
-            </li>
-          <% end %>
         </ul>
       </nav>
     <% end %>
diff --git a/apps/workbench/app/views/pipeline_instances/_show_components.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
index d7b86bf..8658219 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
@@ -1,46 +1,5 @@
-<% template = PipelineTemplate.find(@object.pipeline_template_uuid) rescue nil %>
-<%= content_for :content_top do %>
-  <h2>
-    <%= render_editable_attribute @object, 'name', nil %>
-  </h2>
-  <% if template %>
-  <blockquote><span class="deemphasize">From template:</span><br />
-    <%= link_to_if_arvados_object template, friendly_name: true %><br />
-    <%= template.description %>
-  </blockquote>
-  <% end %>
-<% end %>
-
-<% content_for :tab_line_buttons do %>
-  <%= link_to(copy_pipeline_instance_path('id' => @object.uuid, 'pipeline_instance[state]' => 'New'),
-      class: 'btn btn-primary',
-      #data: {toggle: :tooltip, placement: :top}, title: 'copy and modify',
-      method: :post,
-      ) do %>
-    Clone and edit <i class="fa fa-fw fa-copy"></i>
-  <% end %>
-<% end %>
-
 <% if !@object.state.in? ['New', 'Ready'] %>
 
-  <% content_for :tab_line_buttons do %>
-    <% if @object.state.in? ['RunningOnClient', 'RunningOnServer'] %>
-      <%= link_to(url_for('pipeline_instance[state]' => 'Paused'),
-          class: 'btn btn-primary run-pipeline-button',
-          method: :patch
-          ) do %>
-        Stop <i class="fa fa-fw fa-stop"></i>
-      <% end %>
-    <% elsif @object.state == 'Paused' %>
-      <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
-          class: 'btn btn-primary run-pipeline-button',
-          method: :patch
-          ) do %>
-        Resume <i class="fa fa-fw fa-play"></i>
-      <% end %>
-    <% end %>
-  <% end %>
-
   <% pipeline_job_uuids = [] %>
 
   <div class="pull-right">
@@ -117,10 +76,6 @@
 
   <% if @object.state.in? %w(RunningOnServer RunningOnClient) %>
 
-    <% content_for :js do %>
-      setInterval(function(){$('a.refresh').click()}, 15000);
-    <% end %>
-
     <% if !pipeline_job_uuids.empty? %>
       <h4>Log messages from running jobs</h4>
       <% log_history = pipeline_log_history(pipeline_job_uuids) %>
@@ -140,15 +95,6 @@
     <p><i>Here are all of the pipeline's components (jobs that will need to run in order to complete the pipeline). If you know what you're doing (or you're experimenting) you can modify these parameters before starting the pipeline. Usually, you only need to edit the settings presented on the "Inputs" tab above.</i></p>
   <% end %>
 
-  <% content_for :tab_line_buttons do %>
-    <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
-        class: 'btn btn-primary run-pipeline-button',
-        method: :patch
-        ) do %>
-      Run <i class="fa fa-fw fa-play"></i>
-    <% end %>
-  <% end %>
-
   <% if @object.state.in? ['New', 'Ready'] %>
     <%= render partial: 'show_components_editable', locals: {editable: true} %>
   <% else %>
diff --git a/apps/workbench/app/views/pipeline_instances/show.html.erb b/apps/workbench/app/views/pipeline_instances/show.html.erb
deleted file mode 120000
index 4316b10..0000000
--- a/apps/workbench/app/views/pipeline_instances/show.html.erb
+++ /dev/null
@@ -1 +0,0 @@
-../application/show.html.erb
\ No newline at end of file
diff --git a/apps/workbench/app/views/pipeline_instances/show.html.erb b/apps/workbench/app/views/pipeline_instances/show.html.erb
new file mode 100644
index 0000000..28972a4
--- /dev/null
+++ b/apps/workbench/app/views/pipeline_instances/show.html.erb
@@ -0,0 +1,55 @@
+<% template = PipelineTemplate.find?(@object.pipeline_template_uuid) %>
+<%= content_for :content_top do %>
+  <h2>
+    <%= render_editable_attribute @object, 'name', nil %>
+  </h2>
+  <% if template %>
+  <blockquote><span class="deemphasize">From template:</span><br />
+    <%= link_to_if_arvados_object template, friendly_name: true %><br />
+    <%= template.description %>
+  </blockquote>
+  <% end %>
+<% end %>
+
+<% content_for :tab_line_buttons do %>
+  <%= link_to(copy_pipeline_instance_path('id' => @object.uuid, 'pipeline_instance[state]' => 'New'),
+      class: 'btn btn-primary',
+      #data: {toggle: :tooltip, placement: :top}, title: 'copy and modify',
+      method: :post,
+      ) do %>
+    Clone and edit <i class="fa fa-fw fa-copy"></i>
+  <% end %>
+
+  <% if @object.state.in? ['New', 'Ready'] %>
+    <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
+        class: 'btn btn-primary run-pipeline-button',
+        method: :patch
+        ) do %>
+      Run <i class="fa fa-fw fa-play"></i>
+    <% end %>
+  <% else %>
+    <% if @object.state.in? ['RunningOnClient', 'RunningOnServer'] %>
+      <%= link_to(url_for('pipeline_instance[state]' => 'Paused'),
+          class: 'btn btn-primary run-pipeline-button',
+          method: :patch
+          ) do %>
+        Stop <i class="fa fa-fw fa-stop"></i>
+      <% end %>
+    <% elsif @object.state == 'Paused' %>
+      <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
+          class: 'btn btn-primary run-pipeline-button',
+          method: :patch
+          ) do %>
+        Resume <i class="fa fa-fw fa-play"></i>
+      <% end %>
+    <% end %>
+  <% end %>
+<% end %>
+
+<% if @object.state.in? %w(RunningOnServer RunningOnClient) %>
+  <% content_for :js do %>
+    setInterval(function(){$('a.refresh').click()}, 15000);
+  <% end %>
+<% end %>
+
+<%= render partial: 'content', layout: 'content_layout', locals: {pane_list: controller.show_pane_list }%>
diff --git a/apps/workbench/app/views/projects/_index_jobs_and_pipelines.html.erb b/apps/workbench/app/views/projects/_index_jobs_and_pipelines.html.erb
index 4c066f9..fb9a305 100644
--- a/apps/workbench/app/views/projects/_index_jobs_and_pipelines.html.erb
+++ b/apps/workbench/app/views/projects/_index_jobs_and_pipelines.html.erb
@@ -2,11 +2,11 @@
   <% any = false %>
   <% recent_jobs_and_pipelines[0..9].each do |object| %>
     <% any = true %>
-    <div class="row">
+    <div class="row" style="height: 4.5em">
       <div class="col-sm-4">
         <%= render :partial => "show_object_button", :locals => {object: object, size: 'xs'} %>
         <% if object.respond_to?(:name) %>
-          <%= render_editable_attribute object, 'name', nil, {tiptitle: 'rename', btnplacement: :left} %>
+          <%= render_editable_attribute object, 'name', nil, {tiptitle: 'rename'} %>
         <% else %>
           <%= object.class_for_display %> <%= object.uuid %>
         <% end %>
diff --git a/apps/workbench/app/views/projects/_show_contents.html.erb b/apps/workbench/app/views/projects/_show_contents.html.erb
index 3b21b40..bfd63dd 100644
--- a/apps/workbench/app/views/projects/_show_contents.html.erb
+++ b/apps/workbench/app/views/projects/_show_contents.html.erb
@@ -21,7 +21,7 @@
 	    action_method: 'post',
 	    action_data: {selection_param: 'selection[]', copy_selections_into_project: @object.uuid, success: 'page-refresh'}.to_json),
 	  { class: "btn btn-primary btn-sm", remote: true, method: 'get', data: {'event-after-select' => 'page-refresh'} }) do %>
-      <i class="fa fa-fw fa-plus"></i> Add data
+      <i class="fa fa-fw fa-plus"></i> Add data...
     <% end %>
     <%= link_to(
 	  choose_pipeline_templates_path(
@@ -31,9 +31,9 @@
 	    action_method: 'post',
 	    action_data: {'selection_param' => 'pipeline_instance[pipeline_template_uuid]', 'pipeline_instance[owner_uuid]' => @object.uuid, 'success' => 'redirect-to-created-object'}.to_json),
 	  { class: "btn btn-primary btn-sm", remote: true, method: 'get' }) do %>
-      <i class="fa fa-fw fa-gear"></i> Run a pipeline
+      <i class="fa fa-fw fa-gear"></i> Run a pipeline...
     <% end %>
-    <%= link_to projects_path(method: 'post', owner_uuid: @object.uuid), class: 'btn btn-sm btn-primary' do %>
+    <%= link_to projects_path('project[owner_uuid]' => @object.uuid), method: 'post', class: 'btn btn-sm btn-primary' do %>
       <i class="fa fa-fw fa-plus"></i>
       Add a subproject
     <% end %>
@@ -46,12 +46,10 @@
 	 action_method: 'put',
 	 action_data: {selection_param: 'project[owner_uuid]', success: 'page-refresh'}.to_json),
 	{ class: "btn btn-sm btn-primary arv-move-to-project", remote: true, method: 'get' }) do %>
-      <i class="fa fa-fw fa-truck"></i> Move to...
+      <i class="fa fa-fw fa-truck"></i> Move project...
     <% end %>
-    <% if @objects_and_names.empty? %>
-      <%= button_to(project_path(id: @object.uuid, return_to: projects_path), method: 'delete', class: 'btn btn-sm btn-primary', data: {confirm: "Really delete project '#{@object.name}'?"}) do %>
-	<i class="fa fa-fw fa-trash-o"></i> Delete project
-      <% end %>
+    <%= link_to(project_path(id: @object.uuid, return_to: projects_path), method: 'delete', class: 'btn btn-sm btn-primary', data: {confirm: "Really delete project '#{@object.name}'?"}) do %>
+      <i class="fa fa-fw fa-trash-o"></i> Delete project
     <% end %>
   <% end %>
 <% end %>
@@ -60,7 +58,7 @@
   <div class="row">
     <div class="col-sm-5">
       <div class="btn-group btn-group-sm">
-        <button type="button" class="btn btn-default">Selection...</button>
+        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Selection...</button>
         <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
           <span class="caret"></span>
           <span class="sr-only">Toggle Dropdown</span>
diff --git a/apps/workbench/app/views/projects/_show_contents_rows.html.erb b/apps/workbench/app/views/projects/_show_contents_rows.html.erb
index 68561f8..b690a1b 100644
--- a/apps/workbench/app/views/projects/_show_contents_rows.html.erb
+++ b/apps/workbench/app/views/projects/_show_contents_rows.html.erb
@@ -5,7 +5,7 @@
       data-kind="<%= object.kind %>"
       >
     <td>
-      <%= render partial: 'selection_checkbox', locals: {object: object, friendly_name: ((name_object.name rescue '') || '')} %>
+      <%= render partial: 'selection_checkbox', locals: {object: name_object, friendly_name: ((name_object.name rescue '') || '')} %>
 
       <% if project.editable? %>
         <%= link_to({action: 'remove_item', id: project.uuid, item_uuid: ((name_link && name_link.uuid) || object.uuid)}, method: :delete, remote: true, data: {confirm: "Remove #{object.class_for_display.downcase} #{name_object.name rescue object.uuid} from this project?", toggle: 'tooltip', placement: 'top'}, class: 'btn btn-sm btn-default btn-nodecorate', title: 'remove') do %>
diff --git a/apps/workbench/app/views/projects/index.html.erb b/apps/workbench/app/views/projects/index.html.erb
index 6d79bc4..832b5d4 100644
--- a/apps/workbench/app/views/projects/index.html.erb
+++ b/apps/workbench/app/views/projects/index.html.erb
@@ -45,7 +45,7 @@
       <div class="panel panel-default">
         <div class="panel-heading">
           <h3 class="panel-title">
-            Shared projects
+            Projects shared with me
           </h3>
         </div>
         <div class="panel-body scroll-20em">

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list