[ARVADOS] updated: d23d4ce9e4c52605cb23286b9e9b46a808f7437d

git at public.curoverse.com git at public.curoverse.com
Tue Sep 23 09:25:04 EDT 2014


Summary of changes:
 apps/workbench/app/controllers/application_controller.rb  |  4 ++--
 .../views/pipeline_instances/_running_component.html.erb  |  2 +-
 .../pipeline_instances/_show_components_running.html.erb  | 15 ++++++++-------
 3 files changed, 11 insertions(+), 10 deletions(-)

       via  d23d4ce9e4c52605cb23286b9e9b46a808f7437d (commit)
       via  5af4f00db1cbac83f52bf02b424968fd0ef387b1 (commit)
      from  104244f9ab68f409dbad2272910c21e317994a5d (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 d23d4ce9e4c52605cb23286b9e9b46a808f7437d
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Sep 22 21:51:08 2014 -0400

    3605: Fallback to 0 (instead of nil) when tasks is empty

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 a14a2d9..0841ed7 100644
--- a/apps/workbench/app/views/pipeline_instances/_running_component.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_running_component.html.erb
@@ -25,7 +25,7 @@
                      else
                        0
                      end
-                   }.reduce(:+) %>
+                   }.reduce(:+) || 0 %>
                 <%= render_runtime(walltime, false, false) %>
                 <% if cputime > 0 %> / <%= render_runtime(cputime, false, false) %> (<%= (cputime/walltime).round(1) %>⨯)<% end %>
               <% end %>
diff --git a/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb
index 6b87ef1..9140780 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb
@@ -51,13 +51,14 @@
       ran
     <% end %>
     for
-    <%= render_runtime(runningtime, true, false) %><% cputime = tasks.map { |task|
-                  if task.started_at
-                    (if task.finished_at then task.finished_at else Time.now() end) - task.started_at
-                  else
-                    0
-                  end
-                }.reduce(:+) %><% if walltime - runningtime > 0 %>
+    <% cputime = tasks.map { |task|
+         if task.started_at
+           (if task.finished_at then task.finished_at else Time.now() end) - task.started_at
+           else
+         0
+       end
+       }.reduce(:+) || 0 %>
+    <%= render_runtime(runningtime, true, false) %><% if walltime - runningtime > 0 %>
       (<%= render_runtime(walltime - runningtime, true) %> queued)<% end %><% if cputime == 0 %>.<% else %>
       and used
     <%= render_runtime(cputime, true) %>

commit 5af4f00db1cbac83f52bf02b424968fd0ef387b1
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Sep 22 21:46:56 2014 -0400

    3605: Check that a pipeline component entry is a hash before trying to render it.

diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index dc8325c..d66dbd3 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -698,7 +698,7 @@ class ApplicationController < ActionController::Base
     jobs = {}
     pi.each do |pl|
       pl.components.each do |k,v|
-        if v[:job]
+        if v.is_a? Hash and v[:job]
           jobs[v[:job][:uuid]] = {}
         end
       end
@@ -710,7 +710,7 @@ class ApplicationController < ActionController::Base
 
     pi.each do |pl|
       pl.components.each do |k,v|
-        if v[:job]
+        if v.is_a? Hash and v[:job]
           v[:job] = jobs[v[:job][:uuid]]
         end
       end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list