rename job command to script. refs #1416
authorTom Clegg <tom@clinicalfuture.com>
Tue, 19 Mar 2013 17:11:41 +0000 (10:11 -0700)
committerTom Clegg <tom@clinicalfuture.com>
Tue, 19 Mar 2013 17:11:41 +0000 (10:11 -0700)
app/helpers/pipeline_invocations_helper.rb
app/views/collections/index.html.erb
app/views/collections/show.html.erb
app/views/jobs/index.html.erb
app/views/pipeline_invocations/show.html.erb

index 69709364b06455a5dcb9144b36fd94adc755e038..d64acf779d5622e3b96d78cb0fa5be7df24a0a6e 100644 (file)
@@ -37,8 +37,8 @@ module PipelineInvocationsHelper
       end
       pj[:progress_detail] = (step[:progress] rescue nil)
       pj[:job_id] = (step[:warehousejob][:id] rescue nil)
-      pj[:command] = step[:function]
-      pj[:command_version] = (step[:warehousejob][:revision] rescue nil)
+      pj[:script] = step[:function]
+      pj[:script_version] = (step[:warehousejob][:revision] rescue nil)
       pj[:output] = step[:output_data_locator]
       pj[:finished_at] = (Time.parse(step[:warehousejob][:finishtime]) rescue nil)
       pj[:progress_bar] = raw("<div class=\"progress\" style=\"width:100px\"><div class=\"bar\" style=\"width:#{pj[:progress]*100}%\"></div></div>")
index f4b4c43fec90f044b0c17229eeb708b929985a9f..1bd64309367a4e84b3d66a5603cd64aa978d9c5b 100644 (file)
@@ -18,7 +18,7 @@
   </thead>
   <tbody>
 
-    <% @collection_info.sort_by { |k,c| c[:created_at] || Time.now }.reverse.each do |uuid, c| %>
+    <% @collection_info.sort_by { |k,c| c[:created_at].is_a?(Time) ? c[:created_at] : Time.now }.reverse.each do |uuid, c| %>
 
     <tr class="collection">
       <td>
index a473617c65165fc6d14d04ca816e6d42f2d5f273..c325c636df5c8ab72e2b61dce1ea29a9fa8aae4c 100644 (file)
@@ -53,7 +53,7 @@
        <tr class="job">
          <td style="padding-bottom: 3em">
             <table class="table" style="margin-bottom: 0; background: #f0f0ff">
-             <% j.command_parameters.each do |k,v| %>
+             <% j.script_parameters.each do |k,v| %>
               <tr>
                 <td style="width: 60%">
                   <% re = v.match(/^([0-9a-f]+)/) %>
@@ -86,7 +86,7 @@
             <div style="text-align: center">
               &darr;
               <br />
-             <span class="btn deemphasize"><%= j.command %><br /><tt><%= link_to_if j.command_version.match(/[0-9a-f]{40}/), j.command_version, "https://redmine.clinicalfuture.com/projects/freefactories/repository/revisions/#{j.command_version}/entry/mapreduce/mr-#{j.command}" if j.command_version %></tt></span>
+             <span class="btn deemphasize"><%= j.script %><br /><tt><%= link_to_if j.script_version.match(/[0-9a-f]{40}/), j.script_version, "https://redmine.clinicalfuture.com/projects/freefactories/repository/revisions/#{j.script_version}/entry/mapreduce/mr-#{j.script}" if j.script_version %></tt></span>
               <br />
               &darr;
               <br />
            <br />
            <tt class="deemphasize"><%= j.submit_id %></tt>
          </td><td>
-           <%= j.command_version %>
+           <%= j.script_version %>
          </td><td>
             <span class="btn <%= if j.success then 'btn-success'; elsif j.active then 'btn-primary'; else 'btn-warning'; end %>">
              <%= j.success || j.active ? 'ok' : 'failed' %>
index 31d3bcb2752ca8abc0c89b362909ab60a66ef788..210c8a653456e488ed70515b8be7009f9d3090c3 100644 (file)
@@ -15,7 +15,7 @@
       <th>
        id, result, schedule
       </th><th>
-       command, parameters, input, output
+       script, parameters, input, output
       </th><th>
        resource_limits
       </th>
@@ -88,9 +88,9 @@
       </td><td>
         <table class="table table-condensed table-hover">
           <tr class="info"><td colspan="2">
-              <%= j.command %> <%= j.command_version %>
+              <%= j.script %> <%= j.script_version %>
           </td></tr>
-          <% j.command_parameters.sort.each do |k,v| %>
+          <% j.script_parameters.sort.each do |k,v| %>
           <tr>
             <td><%= k %></td><td><%= link_to_if_orvos_object v %></td>
           </tr>
index b2cb23b39ef91a30af4b439d4506f5fb8aa4fba5..23c1eddae0b305caa600e0bcd406bfb9225ab0e8 100644 (file)
@@ -8,9 +8,9 @@
     <tr><td><%= attr %></td><td>
         <table class="table">
           <% pipeline_jobs.each do |pj| %>
-          <tr><% %w(index name result job_id command command_version progress_detail progress_bar output_link).each do |key| %>
+          <tr><% %w(index name result job_id script script_version progress_detail progress_bar output_link).each do |key| %>
             <td>
-              <% if key == 'command_version' %>
+              <% if key == 'script_version' %>
               <%= pj[key.to_sym][0..6] rescue '' %>
               <% else %>
               <%= pj[key.to_sym] %>