[ARVADOS] updated: 3baf79475a93929350590d17a95b636408cd603e

git at public.curoverse.com git at public.curoverse.com
Thu Feb 27 17:08:01 EST 2014


Summary of changes:
 .../app/helpers/pipeline_instances_helper.rb       |   14 ++++++-
 .../pipeline_instances/_show_components.html.erb   |   41 ++++++++++++--------
 .../views/pipeline_instances/_show_recent.html.erb |   10 +++--
 3 files changed, 43 insertions(+), 22 deletions(-)

       via  3baf79475a93929350590d17a95b636408cd603e (commit)
      from  89355aa0e2727373fa60c781ec6c00c31a79a7dc (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 3baf79475a93929350590d17a95b636408cd603e
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu Feb 27 17:09:16 2014 -0500

    Improved/fixed color coding of job status for pipelines.

diff --git a/apps/workbench/app/helpers/pipeline_instances_helper.rb b/apps/workbench/app/helpers/pipeline_instances_helper.rb
index 3480046..3a923e1 100644
--- a/apps/workbench/app/helpers/pipeline_instances_helper.rb
+++ b/apps/workbench/app/helpers/pipeline_instances_helper.rb
@@ -43,9 +43,19 @@ module PipelineInstancesHelper
 
   def render_pipeline_job pj
     if pj[:percent_done]
-      pj[:progress_bar] = raw("<div class=\"progress\" style=\"width:100px\"><span class=\"progress-bar progress-bar-success\" style=\"width:#{pj[:percent_done]}%\"></span><span class=\"progress-bar\" style=\"width:#{pj[:percent_running]}%\"></span></div>")
+      pj[:progress_bar] = raw <<EOF
+<div class="progress" style="width:100px">
+  <span class="progress-bar progress-bar-success" style="width:#{pj[:percent_done]}%"></span>
+  <span class="progress-bar" style="width:#{pj[:percent_running]}%"></span>
+</div>
+EOF
     elsif pj[:progress]
-      raw("<div class=\"progress\" style=\"width:100px\"><span class=\"progress-bar\" style=\"width:#{pj[:progress]*100}%\"></span></div>")
+      raw <<EOF
+<div class="progress" style="width:100px">
+<span class="progress-bar" style="width:#{pj[:progress]*100}%">
+</span>
+</div>
+EOF
     end
     pj[:output_link] = link_to_if_arvados_object pj[:output]
     pj[:job_link] = link_to_if_arvados_object pj[:job][:uuid]
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 af6da56..c7caa0f 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
@@ -27,12 +27,18 @@ td.required {
 
 <% end %>
 
+<% template = PipelineTemplate.find(@object.pipeline_template_uuid) %>
+<% if template %>
+  <h2><%= template.name %></h2>
+<% end %>
+
 <% if @object.active != nil %>
 <table class="table pipeline-components-table">
   <colgroup>
     <col style="width: 15%" />
     <col style="width: 20%" />
-    <col style="width: 20%" />
+    <col style="width: 12%" />
+    <col style="width: 8%" />
     <col style="width: 45%" />
   </colgroup>
   <thead>
@@ -45,6 +51,7 @@ td.required {
         progress
         <%= link_to '(refresh)', request.fullpath, class: 'refresh', remote: true, method: 'get' %>
       </th><th>
+      </th><th>
         output
       </th>
     </tr>
@@ -54,33 +61,36 @@ td.required {
     <tr>
       <td>
         <% label = if pj[:job].andand[:uuid] 
-                       if pj[:job][:running]
-                         'label-info'
-                       elsif pj[:job][:success]
-                         'label-success'
-                       else
-                         'label-danger'
-                       end 
-                     else
-                       'label-default'
-                     end %>
+             if pj[:job][:success] == true
+               'label-success'
+             elsif pj[:job][:success] == false
+               'label-danger'
+             elsif pj[:job][:running] == true
+               'label-info'
+             else
+               'label-default'
+             end
+           else
+             'label-default'
+         end %>
         <% if pj[:job].andand[:uuid] %>
         <%= link_to pj[:name], job_url(id: pj[:job][:uuid]), class: "label #{label}" %>
         <% else %>
           <span class="label <%= label %>"><%= pj[:name] %></span>
         <% end %>
-        </span>
+
       </td><td>
         <%= pj[:script] %>
         <br /><span class="deemphasize"><%= pj[:script_version] %></span>
       </td><td>
         <%= pj[:progress_bar] %>
+      </td><td>
         <% if pj[:job].andand[:cancelled_at] %>
-        <span class="pull-right label label-warning">cancelled</span>
+        <span class="label label-warning">cancelled</span>
         <% elsif pj[:failed] %>
-        <span class="pull-right label label-warning">failed</span>
+        <span class="label label-danger">failed</span>
         <% elsif pj[:result] == 'queued' %>
-        <span class="pull-right label">queued</span>
+        <span class="label">queued</span>
         <% end %>
       </td><td>
         <%= link_to_if_arvados_object pj[:output] %>
@@ -129,7 +139,6 @@ setInterval(function(){$('a.refresh').click()}, 30000);
     </tr>
   </thead>
   <tbody>
-    <% template = PipelineTemplate.find(@object.pipeline_template_uuid) %>
     <% template.components.each do |k, template_value| %>
 
     <tr>
diff --git a/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb b/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb
index 5d31701..ed5b2d0 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb
@@ -57,15 +57,17 @@
       </td>
     </tr>
     <tr>
-      <td style="border-top: 0;" colspan="3">
+      <td style="border-top: 0;" colspan="2">
       </td>
-      <td style="border-top: 0; opacity: 0.5;" colspan="4">
+      <td style="border-top: 0; opacity: 0.5;" colspan="5">
         <% ob.components.each do |cname, c| %>
         <% status = if !(c.is_a?(Hash) && c[:job].is_a?(Hash))
                       nil
-                    elsif c[:job][:success]
+                    elsif c[:job][:success] == true
                       'success'
-                    elsif c[:job][:running]
+                    elsif c[:job][:success] == false
+                      'danger'
+                    elsif c[:job][:running] == true
                       'info'
                     else
                       'warning'

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list