[ARVADOS] updated: 15409c5e2b7946ff7f5fd104a6757a4d874448d4

git at public.curoverse.com git at public.curoverse.com
Mon Sep 22 11:03:57 EDT 2014


Summary of changes:
 .../app/assets/stylesheets/projects.css.scss       |  3 +-
 .../app/controllers/application_controller.rb      | 24 ++++++++++++-
 .../_show_components_running.html.erb              | 42 +++++++++++-----------
 .../app/views/projects/_show_dashboard.html.erb    | 35 +++++++++---------
 4 files changed, 65 insertions(+), 39 deletions(-)

       via  15409c5e2b7946ff7f5fd104a6757a4d874448d4 (commit)
      from  ba46f409f9c572263cb7907eb2f36139a2c0320b (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 15409c5e2b7946ff7f5fd104a6757a4d874448d4
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Sep 22 11:03:04 2014 -0400

    3605: Additional layout fixes.  Better handling of pipelines where started_at and finished_at is missing or bogus.

diff --git a/apps/workbench/app/assets/stylesheets/projects.css.scss b/apps/workbench/app/assets/stylesheets/projects.css.scss
index d9edfd8..28cde66 100644
--- a/apps/workbench/app/assets/stylesheets/projects.css.scss
+++ b/apps/workbench/app/assets/stylesheets/projects.css.scss
@@ -59,8 +59,9 @@ div.scroll-20em {
 }
 
 .x-ellip {
-  overflow-x: hide;
+  overflow-x: hidden;
   text-overflow: ellipsis;
+  white-space: nowrap;
 }
 
 .dashboard-panel-info-row:hover {
diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index 1dec57c..dc8325c 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -694,7 +694,29 @@ class ApplicationController < ActionController::Base
 
   helper_method :running_pipelines
   def running_pipelines
-    PipelineInstance.order(["started_at asc", "created_at asc"]).filter([["state", "in", ["RunningOnServer", "RunningOnClient"]]])
+    pi = PipelineInstance.order(["started_at asc", "created_at asc"]).filter([["state", "in", ["RunningOnServer"]]])
+    jobs = {}
+    pi.each do |pl|
+      pl.components.each do |k,v|
+        if v[:job]
+          jobs[v[:job][:uuid]] = {}
+        end
+      end
+    end
+
+    Job.filter([["uuid", "in", jobs.keys]]).each do |j|
+      jobs[j[:uuid]] = j
+    end
+
+    pi.each do |pl|
+      pl.components.each do |k,v|
+        if v[:job]
+          v[:job] = jobs[v[:job][:uuid]]
+        end
+      end
+    end
+
+    pi
   end
 
   helper_method :finished_pipelines
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 18ae9b0..2c95c92 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
@@ -12,27 +12,27 @@
     Started at <span data-utc-date="<%= @object.started_at %>"><%= @object.started_at %></span>.
   <% end %>
 
-  <% if @object.state == 'Complete' %>
-    Completed in
-  <% elsif @object.state == 'Failed' %>
-    Failed after
+  <% if @object.started_at %>
+    <% if @object.state == 'Complete' %>
+      Completed in
+    <% elsif @object.state == 'Failed' %>
+      Failed after
+    <% else %>
+      Has been active for
+    <% end %>
+
+    <% walltime = if @object.finished_at then
+                    @object.finished_at - @object.started_at
+                  else
+                    Time.now - @object.started_at
+                  end %>
+    
+    <%= runtime(walltime, true) %><% if @object.finished_at %> at <span data-utc-date="<%= @object.finished_at %>"><%= @object.finished_at %></span><% end %>.
   <% else %>
-    Has been active for
+    Pipeline is <%= @object.state.downcase %>.
+    <% walltime = 0%>
   <% end %>
 
-  <% walltime = if @object.started_at
-        if @object.finished_at
-          @object.finished_at - @object.started_at
-        else
-          Time.now - @object.started_at
-        end
-      else
-        0
-      end
-      %>
-
-  <%= runtime(walltime, true) %><% if @object.finished_at %> at <span data-utc-date="<%= @object.finished_at %>"><%= @object.finished_at %></span><% end %>.
-
   <% if @object.state == 'Failed' %>
     Check the Log tab for more detail about why this pipeline failed.
   <% end %>
@@ -48,7 +48,9 @@
       Ran
     <% end %>
     for
-    <%= runtime(runningtime, true) %> (<%= runtime(walltime - runningtime, true) %> queued)<% if tasks.size == 0 %>.<% else %>
+    <%= runtime(runningtime, true) %> 
+    <% if walltime - runningtime > 0 %>
+      (<%= runtime(walltime - runningtime, true) %> queued)<% end %><% if tasks.size == 0 %>.<% else %>
       and used
       <% cputime = tasks.map { |task|
            puts "started at #{task.started_at}"
@@ -104,7 +106,7 @@
             <% if Job::state(current_job).in? ["Completed", "Failed", "Canceled"] %>
               <div class="col-md-3">
                 <% if pj[:output_uuid] %>
-                  <%= link_to_if_arvados_object pj[:output_uuid] %>
+                  <%= link_to_if_arvados_object pj[:output_uuid], friendly_name: true %>
                 <% elsif current_job.andand[:output] %>
                   <%= link_to_if_arvados_object current_job[:output], link_text: "Output of #{pj[:name]}" %>
                 <% else %>
diff --git a/apps/workbench/app/views/projects/_show_dashboard.html.erb b/apps/workbench/app/views/projects/_show_dashboard.html.erb
index a197059..3a70562 100644
--- a/apps/workbench/app/views/projects/_show_dashboard.html.erb
+++ b/apps/workbench/app/views/projects/_show_dashboard.html.erb
@@ -53,7 +53,7 @@
                     <div class="progress-bar progress-bar-success" style="width: <%= completed_pct %>%">
                       <span class="sr-only"></span>
                     </div>
-                    <div class="progress-bar progress-bar-warning" style="width: <%= failed_pct %>%">
+                    <div class="progress-bar progress-bar-danger" style="width: <%= failed_pct %>%">
                       <span class="sr-only"></span>
                     </div>
                     <div class="progress-bar progress-bar-primary" style="width: <%= running_pct %>%">
@@ -93,15 +93,15 @@
             <div class="dashboard-panel-info-row">
               <div class="row">
                 <div class="col-md-6 x-ellip">
-                <%= link_to_if_arvados_object p, friendly_name: true %>
-              </div>
-              <div class="col-md-2">
-                <%= render partial: "pipeline_status_label", locals: {p: p}%>
-              </div>
-              <div class="col-md-4">
-                <span class="utc-date" data-utc-date="<%= p[:finished_at] || p[:modified_at] %>"
-                      data-utc-date-opts="noseconds"><%= p[:modified_at] %></span>
-              </div>
+                  <%= link_to_if_arvados_object p, friendly_name: true %>
+                </div>
+                <div class="col-md-2">
+                  <%= render partial: "pipeline_status_label", locals: {p: p}%>
+                </div>
+                <div class="col-md-4">
+                  <span class="utc-date" data-utc-date="<%= p[:finished_at] || p[:modified_at] %>"
+                        data-utc-date-opts="noseconds"><%= p[:modified_at] %></span>
+                </div>
               </div>
               <div class="row">
                 <div class="col-md-12">
@@ -110,7 +110,7 @@
                     Active for <%= runtime(pipeline_time, false) %>
                   <% end %>
 
-                  <span class="pull-right">
+                  <span class="pull-right x-ellip" style="max-width: 100%">
                     <% outputs = [] %>
                     <% p.components.each do |k, c| %>
                       <% outputs << c[:output_uuid] if c[:output_uuid] %>
@@ -120,22 +120,23 @@
                     <% elsif outputs.size == 1 %>
                       <i class="fa fa-fw fa-archive"></i> <%= link_to_if_arvados_object outputs[0], friendly_name: true %>
                     <% else %>
-                      <a href="#<%= p[:uuid] %>" data-toggle="collapse">Outputs <span class="caret"></span></a>
+                      <a href="#<%= p[:uuid] %>-outputs" data-toggle="collapse">Outputs <span class="caret"></span></a>
                     <% end %>
                   </span>
                 </div>
               </div>
 
-                <div class="row collapse" id="<%= p[:uuid] %>" >
-                  <div class="col-md-offset-3 col-md-10">
+              <div class="row collapse" id="<%= p[:uuid] %>-outputs" >
+                <div class="col-md-12">
+                  <div class="pull-right" style="max-width: 100%">
                     <% outputs.each do |out| %>
-                      <div>
+                      <div class="x-ellip">
                         <i class="fa fa-fw fa-archive"></i> <%= link_to_if_arvados_object out, friendly_name: true %>
                       </div>
                     <% end %>
                   </div>
                 </div>
-
+              </div>              
             </div>
           <% end %>
         </div>
@@ -167,7 +168,7 @@
                                              data-utc-date="<%= p[:modified_at] %>"
                                              data-utc-date-opts="noseconds"><%= p[:modified_at]%></span></span>
             </div>
-            <div class="x-ellip" style="margin-left: 1em"><%= link_to_if_arvados_object p, friendly_name: true %>
+            <div class="x-ellip" style="margin-left: 1em; width: 100%"><%= link_to_if_arvados_object p, friendly_name: true %>
             </div>
             </div>
           <% end %>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list