[ARVADOS] updated: 7330db33df73dbb204d362253668436cb5caa7b3

git at public.curoverse.com git at public.curoverse.com
Sat Feb 1 19:08:08 EST 2014


Summary of changes:
 .../controllers/pipeline_instances_controller.rb   |    2 +-
 .../app/views/pipeline_instances/compare.html.erb  |    2 +
 .../app/views/pipeline_instances/index.html.erb    |   22 +++++++++++++++++++-
 apps/workbench/config/routes.rb                    |    5 ++-
 4 files changed, 27 insertions(+), 4 deletions(-)

       via  7330db33df73dbb204d362253668436cb5caa7b3 (commit)
       via  f222423ba06019e796e5024d300398577e9987e1 (commit)
       via  dfca93f7d608930350b8aa680a3ffb3d35d63306 (commit)
       via  eaa436ddd4aadf4fad387ea6115e35c885828ce0 (commit)
       via  043f54270bb129da9f5f07c2c975c6e89edd4a22 (commit)
      from  9fd96762299e182afbf69e76e0560c748591af47 (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 7330db33df73dbb204d362253668436cb5caa7b3
Author: Tom Clegg <tom at curoverse.com>
Date:   Sat Feb 1 16:06:33 2014 -0800

    Fix crash when component has missing attributes (e.g., no job was run).
    
    refs #1978

diff --git a/apps/workbench/app/views/pipeline_instances/compare.html.erb b/apps/workbench/app/views/pipeline_instances/compare.html.erb
index cf1aa5f..08128a1 100644
--- a/apps/workbench/app/views/pipeline_instances/compare.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/compare.html.erb
@@ -48,6 +48,8 @@
               <% unless key=='output' and pj[:result] != 'complete' %>
               <% val = pj[key.to_sym] || pj[:job].andand[key.to_sym] %>
               <% link_name = case
+                 when !val
+                   val = ''
                  when key == 'script_version' && val.match(/^[0-9a-f]{7,}$/)
                    val = val[0..7] # TODO: leave val alone, make link_to handle git commits
                  when key == 'output'

commit f222423ba06019e796e5024d300398577e9987e1
Author: Tom Clegg <tom at curoverse.com>
Date:   Sat Feb 1 16:05:55 2014 -0800

    Add basic select-and-compare interface to pipeline_instances#index.
    
    refs #1978

diff --git a/apps/workbench/app/controllers/pipeline_instances_controller.rb b/apps/workbench/app/controllers/pipeline_instances_controller.rb
index 507131f..d776941 100644
--- a/apps/workbench/app/controllers/pipeline_instances_controller.rb
+++ b/apps/workbench/app/controllers/pipeline_instances_controller.rb
@@ -71,7 +71,7 @@ class PipelineInstancesController < ApplicationController
   end
 
   def find_objects_by_uuid
-    @objects = model_class.where(uuid: params[:uuid].split('/'))
+    @objects = model_class.where(uuid: params[:uuids])
   end
 
 end
diff --git a/apps/workbench/app/views/pipeline_instances/index.html.erb b/apps/workbench/app/views/pipeline_instances/index.html.erb
index f5b672d..2789ca1 100644
--- a/apps/workbench/app/views/pipeline_instances/index.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/index.html.erb
@@ -1,7 +1,11 @@
+<%= form_tag({action: 'compare', controller: 'pipeline_instances', method: 'get'}, {method: 'get', id: 'compare'}) do |f| %>
+
 <table class="table table-hover">
   <thead>
     <tr class="contain-align-left">
       <th>
+	<%= submit_tag 'Compare', {class: 'btn btn-primary', disabled: true} %>
+      </th><th>
 	status
       </th><th>
 	id
@@ -22,10 +26,12 @@
   </thead>
   <tbody>
 
-    <% @objects.sort_by { |ob| ob[:created_at] }.reverse.each do |ob| %>
+    <% @objects.sort_by { |ob| ob.created_at }.reverse.each do |ob| %>
 
     <tr>
       <td>
+        <%= check_box_tag 'uuids[]', ob.uuid, false %>
+      </td><td>
         <% if ob.success %>
         <span class="label label-success">success</span>
         <% elsif ob.active %>
@@ -59,3 +65,17 @@
 
   </tbody>
 </table>
+
+<% end %>
+
+<% content_for :footer_js do %>
+$('form#compare input[name="uuids[]"]').on('click', function() {
+    var form = $('form#compare')[0]
+    $('input[type=submit]', form).prop('disabled',true);
+    $('input[name="uuids[]"]', form).each(function(){
+        if(this.checked) {
+            $('input[type=submit]', form).prop('disabled',false);
+        }
+    });
+});
+<% end %>
diff --git a/apps/workbench/config/routes.rb b/apps/workbench/config/routes.rb
index c9bf19b..5330a91 100644
--- a/apps/workbench/config/routes.rb
+++ b/apps/workbench/config/routes.rb
@@ -26,8 +26,9 @@ ArvadosWorkbench::Application.routes.draw do
   resources :groups
   resources :specimens
   resources :pipeline_templates
-  resources :pipeline_instances
-  get '/pipeline_instances/compare/*uuid' => 'pipeline_instances#compare'
+  resources :pipeline_instances do
+    get 'compare', on: :collection
+  end
   resources :links
   match '/collections/graph' => 'collections#graph'
   resources :collections

commit dfca93f7d608930350b8aa680a3ffb3d35d63306
Merge: eaa436d 9fd9676
Author: Tom Clegg <tom at curoverse.com>
Date:   Sat Feb 1 15:34:44 2014 -0800

    Merge branch 'master' into 1978-compare-pipelines
    
    Conflicts:
    	apps/workbench/app/controllers/pipeline_instances_controller.rb
    	apps/workbench/app/views/pipeline_instances/compare.html.erb


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


hooks/post-receive
-- 




More information about the arvados-commits mailing list