9318: remove :output method in favor of :outputs method and correct the logic for...
authorradhika <radhika@curoverse.com>
Thu, 9 Jun 2016 17:57:39 +0000 (13:57 -0400)
committerradhika <radhika@curoverse.com>
Thu, 9 Jun 2016 17:57:39 +0000 (13:57 -0400)
17 files changed:
apps/workbench/app/controllers/application_controller.rb
apps/workbench/app/models/container_work_unit.rb
apps/workbench/app/models/job_work_unit.rb
apps/workbench/app/models/pipeline_instance_work_unit.rb
apps/workbench/app/models/proxy_work_unit.rb
apps/workbench/app/models/work_unit.rb
apps/workbench/app/views/projects/_compute_node_status.html.erb
apps/workbench/app/views/projects/_show_dashboard.html.erb
apps/workbench/app/views/work_unit/_component_detail.html.erb
apps/workbench/app/views/work_unit/_show_child.html.erb
apps/workbench/app/views/work_unit/_show_component.html.erb
apps/workbench/app/views/work_unit/_show_outputs.html.erb [new file with mode: 0644]
apps/workbench/test/integration/application_layout_test.rb
apps/workbench/test/integration/logins_test.rb
apps/workbench/test/integration/pipeline_templates_test.rb
apps/workbench/test/integration/user_profile_test.rb
services/api/test/fixtures/containers.yml

index 7ab2403f3cbb38c82a9d6bbc8fa76b7279abad5b..dfa5ebc95c277127b42649fd4f2c141b22490118 100644 (file)
@@ -828,57 +828,23 @@ class ApplicationController < ActionController::Base
     pi
   end
 
-  helper_method :running_processes
-  def running_processes lim
-    lim = 8 if lim.nil?
+  helper_method :recent_processes
+  def recent_processes lim
+    lim = 12 if lim.nil?
 
-    pipelines = PipelineInstance.limit(lim).order(["started_at desc", "created_at desc"]).filter([["state", "in", ["RunningOnServer", "RunningOnClient"]]])
+    pipelines = PipelineInstance.limit(lim).order(["created_at desc"])
 
-    crs = ContainerRequest.order(["modified_at desc"]).filter([["requesting_container_uuid", "=", nil], ["state", "=", "Committed"]])
+    crs = ContainerRequest.limit(lim).order(["created_at desc"]).filter([["requesting_container_uuid", "=", nil]])
     cr_uuids = crs.results.collect { |c| c.container_uuid }
-    containers = Container.limit(lim).order(["started_at desc", "created_at desc"]).filter([["uuid", "in", cr_uuids], ["state", "=", "Running"]]).results if cr_uuids.any?
+    containers = Container.order(["created_at desc"]).results if cr_uuids.any?
 
     procs = {}
-    pipelines.results.each { |pi| procs[pi] = (pi.started_at || pi.created_at)}
+    pipelines.results.each { |pi| procs[pi] = pi.created_at }
     containers.each { |c| procs[c] = c.created_at } if !containers.nil?
 
     Hash[procs.sort_by {|key, value| value}].keys.reverse.first(lim)
   end
 
-  helper_method :finished_pipelines
-  def finished_pipelines lim
-    PipelineInstance.limit(lim).order(["finished_at desc"]).filter([["state", "in", ["Complete", "Failed", "Paused"]], ["finished_at", "!=", nil]])
-  end
-
-  helper_method :finished_processes
-  def finished_processes lim
-    lim = 8 if lim.nil?
-
-    pipelines = PipelineInstance.limit(lim).order(["finished_at desc"]).filter([["state", "in", ["Complete", "Failed", "Paused"]], ["finished_at", "!=", nil]])
-
-    crs = ContainerRequest.order(["modified_at desc"]).filter([["requesting_container_uuid", "=", nil], ["state", "=", "Final"]])
-    cr_uuids = crs.results.collect { |c| c.container_uuid }
-    containers = Container.limit(lim).order(["finished_at desc"]).filter([["uuid", "in", cr_uuids], ["state", "in", ["Complete", "Canceled"]], ["finished_at", "!=", nil]]).results if cr_uuids.any?
-
-    procs = {}
-    pipelines.results.each { |pi| procs[pi] = pi.finished_at }
-    containers.each { |pi| procs[pi] = pi.finished_at } if !containers.nil?
-
-    Hash[procs.sort_by {|key, value| value}].keys.reverse.first(lim)
-  end
-
-  helper_method :queued_processes
-  def queued_processes
-    procs = {}
-    queued_jobs = Job.queue
-    queued_jobs.each { |j| procs[j] = j.priority }
-
-    queued_containers = Container.order(["priority desc", "created_at desc"]).filter([["state", "in", ["Queued", "Locked"]]])
-    queued_containers.results.each { |c| procs[c] = c.priority }
-
-    Hash[procs.sort_by {|key, value| value}].keys.reverse
-  end
-
   helper_method :recent_collections
   def recent_collections lim
     c = Collection.limit(lim).order(["modified_at desc"]).filter([["owner_uuid", "is_a", "arvados#group"]])
index 5d4a353abcb15d10ba3cc537aa8b1eb9859a7403..e23561955f771479dc873c3a38e44316eff4ad71 100644 (file)
@@ -10,7 +10,7 @@ class ContainerWorkUnit < ProxyWorkUnit
 
     containers = Container.where(uuid: crs.keys).results
     containers.each do |c|
-      items << ContainerWorkUnit.new(c, crs[c.uuid])
+      items << c.work_unit(crs[c.uuid])
     end
 
     self.my_children = items
@@ -32,8 +32,10 @@ class ContainerWorkUnit < ProxyWorkUnit
     get(:log)
   end
 
-  def output
-    get(:output)
+  def outputs
+    items = []
+    items << get(:output) if get(:output)
+    items
   end
 
   def uri
index a0a7c8796ef1783f7c7aba1fcfb9f54b3cba5451..43918099119fd0968ae745074a3d98c10c67c415 100644 (file)
@@ -71,8 +71,15 @@ class JobWorkUnit < ProxyWorkUnit
     get(:log)
   end
 
-  def output
-    get(:output)
+  def outputs
+    items = []
+    children.each do |c|
+      items.concat c.outputs
+    end
+    if !items.any?
+      items << get(:output) if get(:output)
+    end
+    items
   end
 
   def can_cancel?
index bc2b3e77a0a74d843404a06b098cdc21045e578f..889fa1a7f3cccecf86c53f5cd837ad4f34cb7ca2 100644 (file)
@@ -32,6 +32,17 @@ class PipelineInstanceWorkUnit < ProxyWorkUnit
     @my_children = items
   end
 
+  def outputs
+    items = []
+    components = get(:components)
+    components.each do |name, c|
+      if c.is_a?(Hash)
+        items << c[:output_uuid] if c[:output_uuid]
+      end
+    end
+    items
+  end
+
   def uri
     uuid = get(:uuid)
     "/pipeline_instances/#{uuid}"
index d1660a260c94617fcad19256d885bf95e8f186af..b1d758b8f2589b3df39e88d6bb1fd73ae2871758 100644 (file)
@@ -35,6 +35,12 @@ class ProxyWorkUnit < WorkUnit
     t
   end
 
+  def modified_at
+    t = get(:modified_at)
+    t = Time.parse(t) if (t.andand.class == String)
+    t
+  end
+
   def finished_at
     t = get(:finished_at)
     t = Time.parse(t) if (t.andand.class == String)
@@ -150,14 +156,7 @@ class ProxyWorkUnit < WorkUnit
   end
 
   def outputs
-    items = []
-    children.each do |c|
-      items << c.output if c.output
-    end
-    if !items.any?
-      items << get(:output) if get(:output)
-    end
-    items
+    []
   end
 
   def title
index c63eb5fc3dc4ec52aedb25eaf902039478789491..5bac42ba2ff53c9620ae0ae3e9b81768d34c4396 100644 (file)
@@ -21,6 +21,10 @@ class WorkUnit
     # returns created_at timestamp
   end
 
+  def modified_at
+    # returns modified_at timestamp
+  end
+
   def started_at
     # returns started_at timestamp for this work unit
   end
@@ -87,13 +91,8 @@ class WorkUnit
     # returns if this is nondeterministic
   end
 
-  def output
-    # returns uuid or pdh of output data, if any
-  end
-
   def outputs
-    # returns array containing uuid or pdh of output data of all children
-    # if no children, return output data if any
+    # returns array containing uuid or pdh of output data
   end
 
   def child_summary
index b7b791b98b4b52f1fa2cf2c8d43f3cec979cdcaa..6ad7ff43843e381a7394770a04fc44772333f667 100644 (file)
@@ -1,46 +1,9 @@
-<h4>Queue</h4>
-<% queue = queued_processes %>
-<% if queue.any? %>
-
-<% queue.each do |q| %>
-  <% wu = q.work_unit %>
-  <div class="row">
-    <div class="col-md-3 text-overflow-ellipsis">
-      <%= link_to_if_arvados_object q, friendly_name: true %>
-    </div>
-    <div class="col-md-4">
-      <%= render_localized_date(wu.created_at) %>
-    </div>
-    <div class="col-md-3">
-      <%= render_runtime(Time.now - wu.created_at, false) %>
-    </div>
-    <div class="col-md-2">
-      <%= wu.priority %>
-    </div>
-  </div>
-<% end %>
-  <div class="row">
-    <div class="col-md-3">
-      <b>Process</b>
-    </div>
-    <div class="col-md-4">
-      <b>Submitted</b>
-    </div>
-    <div class="col-md-3">
-      <b>Queued</b>
-    </div>
-    <div class="col-md-2">
-      <b>Priority</b>
-    </div>
-  </div>
-<% else %>
-  There are currently no processes in your queue.
-<% end %>
-
 <h4>Node status</h4>
+<% active_nodes = 0 %>
 <div class="compute-summary-nodelist">
     <% nodes.sort_by { |n| n.hostname || "" }.each do |n| %>
       <% if n.crunch_worker_state.in? ["busy", "idle"] and (Time.now - n[:last_ping_at]) < 3600 %>
+        <% active_nodes += 1 %>
         <div class="compute-summary">
           <a data-toggle="collapse" href="#detail_<%= n.hostname %>" class="compute-summary-head label label-<%= if n.crunch_worker_state == 'busy' then 'primary' else 'default' end %>">
             <%= n.hostname %>
@@ -54,4 +17,7 @@
         </div>
       <% end %>
     <% end %>
+    <% if active_nodes == 0 %>
+      No active nodes
+    <% end %>
 </div>
index 80e8e23650fdbeaa899aee34627d2646c3f49f1c..efd6acfd65d642c0ce97a9c4118f212ec35a8318 100644 (file)
@@ -1,78 +1,38 @@
   <div class="row">
     <div class="col-md-6">
       <div class="panel panel-default" style="min-height: 10.5em">
-        <div class="panel-heading"><span class="panel-title">Active processes</span>
+        <div class="panel-heading"><span class="panel-title">Recent processes</span>
           <% if current_user.andand.is_active %>
-          <span class="pull-right">
-          <%= link_to(
-          choose_pipeline_templates_path(
-            title: 'Choose a pipeline to run:',
-            action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
-            action_href: pipeline_instances_path,
-            action_method: 'post',
-            action_data: {'selection_param' => 'pipeline_instance[pipeline_template_uuid]', 'pipeline_instance[owner_uuid]' => current_user.uuid, 'success' => 'redirect-to-created-object'}.to_json),
-          { class: "btn btn-primary btn-xs", remote: true }) do %>
-            <i class="fa fa-fw fa-gear"></i> Run a pipeline...
-          <% end %>
-          </span>
-          <% end %>
-        </div>
-
-        <% _running_processes = running_processes(8) %>
-        <% _finished_processes = finished_processes(8) %>
-        <div class="panel-body active-processes">
-          <% if _running_processes.empty? %>
-            No processes are currently running.
-          <% else %>
-          <% _running_processes.each do |p| %>
-            <% wu = p.work_unit %>
-            <div class="dashboard-panel-info-row">
-              <div class="clearfix">
-                <%= link_to_if_arvados_object p, {friendly_name: true} %>
-                <div class="pull-right" style="width: 40%">
-                  <div class="progress" style="margin-bottom: 0px">
-                    <% wu.progress %>
-                  </div>
-                </div>
-              </div>
-
-              <%
-                children = wu.children
-                running = children.select { |c| c.state_label == "Running" }
-                queued = children.select { |c| c.state_label == "Queued" }
-              %>
-
-              <div class="clearfix">
-                Started at <%= render_localized_date(wu.started_at || wu.created_at, "noseconds") %>.
-                <% wu_time = Time.now - (wu.started_at || wu.created_at) %>
-                Active for <%= render_runtime(wu_time, false) %>.
-
-                <div class="pull-right">
-                  <% running.each do |r| %>
-                    <span class="label label-<%= r.state_bootstrap_class %>"> <%= r.label || r.state_label || 'Not ready' %> </span>
-                  <% end %>
-                  <% queued.each do |q| %>
-                    <span class="label label-<%= q.state_bootstrap_class %>"> <%= q.label || r.state_label || 'Not ready' %> </span>
+            <span class="pull-right">
+              <span>
+                <%= link_to(
+                choose_pipeline_templates_path(
+                  title: 'Choose a pipeline to run:',
+                  action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
+                  action_href: pipeline_instances_path,
+                  action_method: 'post',
+                  action_data: {'selection_param' => 'pipeline_instance[pipeline_template_uuid]', 'pipeline_instance[owner_uuid]' => current_user.uuid, 'success' => 'redirect-to-created-object'}.to_json),
+                { class: "btn btn-primary btn-xs", remote: true }) do %>
+                  <i class="fa fa-fw fa-gear"></i> Run a pipeline...
+                <% end %>
+              </span>
+              <span>
+                  <%= link_to pipeline_instances_path, class: 'btn btn-default btn-xs' do %>
+                    All pipelines <i class="fa fa-fw fa-arrow-circle-right"></i>
                   <% end %>
-                </div>
-              </div>
-            </div>
-          <% end %>
+              </span>
+            </span>
           <% end %>
         </div>
-      </div>
 
-      <div class="panel panel-default">
-        <div class="panel-heading"><span class="panel-title">Recently finished processes</span>
-          <span class="pull-right">
-            <%= link_to pipeline_instances_path, class: 'btn btn-default btn-xs' do %>
-              All pipelines <i class="fa fa-fw fa-arrow-circle-right"></i>
-            <% end %>
-          </span>
-        </div>
-        <div class="panel-body finished-processes">
-          <% _finished_processes.each do |p| %>
+        <% _recent_processes = recent_processes(12) %>
+        <div class="panel-body recent-processes">
+          <% if _recent_processes.empty? %>
+            No recent processes.
+          <% else %>
+          <% _recent_processes.each do |p| %>
             <% wu = p.work_unit %>
+            <% if wu.is_finished? %>
             <div class="dashboard-panel-info-row">
               <div class="row">
                 <div class="col-md-6 text-overflow-ellipsis">
                     <% 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="#<%= wu.uuid %>-outputs" data-toggle="collapse">Outputs <span class="caret"></span></a>
+                      <%= render partial: 'work_unit/show_outputs', locals: {id: wu.uuid, outputs: outputs, align:"pull-right"} %>
                     <% end %>
                   </span>
                 </div>
               </div>
 
-              <div class="row collapse" id="<%= wu.uuid %>-outputs" >
-                <div class="col-md-12">
-                  <div class="pull-right" style="max-width: 100%">
-                    <% outputs.each do |out| %>
-                      <div class="text-overflow-ellipsis">
-                        <i class="fa fa-fw fa-archive"></i> <%= link_to_if_arvados_object out, friendly_name: true %>
-                      </div>
-                    <% end %>
+            </div>
+            <% else %>
+            <div class="dashboard-panel-info-row">
+              <div class="clearfix">
+                <%= link_to_if_arvados_object p, {friendly_name: true} %>
+                <div class="pull-right" style="width: 40%">
+                  <div class="progress" style="margin-bottom: 0px">
+                    <% wu.progress %>
                   </div>
                 </div>
               </div>
+
+              <%
+                children = wu.children
+                running = children.select { |c| c.state_label == "Running" }
+                queued = children.select { |c| c.state_label == "Queued" }
+              %>
+
+              <div class="clearfix">
+                Started at <%= render_localized_date(wu.started_at || wu.created_at, "noseconds") %>.
+                <% wu_time = Time.now - (wu.started_at || wu.created_at) %>
+                Active for <%= render_runtime(wu_time, false) %>.
+
+                <div class="pull-right">
+                  <% running.each do |r| %>
+                    <span class="label label-<%= r.state_bootstrap_class %>"> <%= r.label || r.state_label || 'Not ready' %> </span>
+                  <% end %>
+                  <% queued.each do |q| %>
+                    <span class="label label-<%= q.state_bootstrap_class %>"> <%= q.label || r.state_label || 'Not ready' %> </span>
+                  <% end %>
+                </div>
+              </div>
             </div>
+            <% end %>
+          <% end %>
           <% end %>
         </div>
       </div>
     <div class="col-md-6">
       <% nodes = Node.all %>
       <div class="panel panel-default" style="min-height: 10.5em">
-        <div class="panel-heading"><span class="panel-title">Compute and job status</span>
+        <div class="panel-heading"><span class="panel-title">Compute node status</span>
           <span class="pull-right">
-            <%= link_to jobs_path, class: 'btn btn-default btn-xs' do %>
-              All jobs <i class="fa fa-fw fa-arrow-circle-right"></i>
+            <% if current_user.andand.is_admin %>
+              <span>
+                <%= link_to nodes_path, class: 'btn btn-default btn-xs' do %>
+                  All nodes <i class="fa fa-fw fa-arrow-circle-right"></i>
+                <% end %>
+              </span>
             <% end %>
+            <span>
+              <%= link_to jobs_path, class: 'btn btn-default btn-xs' do %>
+                All jobs <i class="fa fa-fw fa-arrow-circle-right"></i>
+              <% end %>
+            </span>
           </span>
         </div>
         <div class="panel-body compute-node-summary-pane">
index 38e1b5ba30d1ea5de837e910813c7a190d16bec9..9ef16d00a8c459f34ac30b8fc93696f2a12c413b 100644 (file)
@@ -5,7 +5,9 @@
               No <%= current_obj.title %> has been submitted yet.
             <% else %>
             <table>
-              <% [:uuid, :modified_by_user_uuid, :created_at, :started_at, :finished_at, :output, :priority].each do |k| %>
+              <% keys = [:uuid, :modified_by_user_uuid, :created_at, :started_at, :finished_at, :priority] %>
+              <% keys << :outputs if @object.uuid == current_obj.uuid %>
+              <% keys.each do |k| %>
                 <% val = current_obj.send(k) if current_obj.respond_to?(k) %>
                 <% if val %>
                 <tr>
                       <%= link_to_arvados_object_if_readable(val, val, friendly_name: true) %>
                     <% elsif k.to_s.end_with? '_at' %>
                       <%= render_localized_date(val) %>
-                    <% elsif k == :output %>
-                      <%= link_to_arvados_object_if_readable(val, 'Output data not available', friendly_name: true) %>
+                    <% elsif k == :outputs and val.any? %>
+                      <% if val.size == 1 %>
+                        <%= link_to_arvados_object_if_readable(val[0], 'Output data not available', friendly_name: true) %>
+                      <% else %>
+                        <%= render partial: 'work_unit/show_outputs', locals: {id: current_obj.uuid, outputs: val, align:""} %>
+                      <% end %>
                     <% else %>
                       <%= val %>
                     <% end %>
index b55d88813ac7fee14a67a5fd367340018d87aec5..a9c8d2f2268c632c4a1de4b811092fb7bc607265 100644 (file)
             </div>
           <% elsif current_obj.is_finished? %>
             <div class="col-md-3 text-overflow-ellipsis">
-              <% if current_obj.output %>
-                <%= link_to_arvados_object_if_readable(current_obj.output, 'Output data not available', link_text: "Output of #{current_obj.label}") %>
+              <% outputs = current_obj.outputs %>
+              <% if outputs.any? %>
+                <% if outputs.size == 1 %>
+                  <%= link_to_arvados_object_if_readable(outputs[0], 'Output data not available', link_text: "Output of #{current_obj.label}") %>
+                <% else %>
+                  <%= render partial: 'work_unit/show_outputs', locals: {id: current_obj.uuid, outputs: outputs, align:"pull-right"} %>
+                <% end %>
               <% else %>
                 No output.
               <% end %>
index 58b8aa861b61e502464a197ee22a55afdf165785..27e6c59ace9bafaa71e79d4c74ba7a0b88bb6a6b 100644 (file)
@@ -55,7 +55,8 @@
     preload_objects_for_dataclass resource_class, uuids
   end
 
-  collections = wu.children.collect {|j| j.output}.compact
+  collections = wu.children.collect {|j| j.outputs}.compact
+  collections = collections.flatten.uniq
   collections.concat wu.children.collect {|j| j.docker_image}.uniq.compact
   collections_pdhs = collections.select {|x| !(m = CollectionsHelper.match(x)).nil?}.uniq.compact
   collections_uuids = collections - collections_pdhs
diff --git a/apps/workbench/app/views/work_unit/_show_outputs.html.erb b/apps/workbench/app/views/work_unit/_show_outputs.html.erb
new file mode 100644 (file)
index 0000000..19a0158
--- /dev/null
@@ -0,0 +1,12 @@
+<span class="<%=align%>"><a href="#<%= id %>-outputs" data-toggle="collapse">Outputs <span class="caret"></span></a></span>
+<div class="row collapse" id="<%= id %>-outputs" >
+  <div class="col-md-12">
+    <div class="pull-right" style="max-width: 100%">
+      <% outputs.each do |out| %>
+        <div class="text-overflow-ellipsis">
+          <i class="fa fa-fw fa-archive"></i> <%= link_to_if_arvados_object out, friendly_name: true %>
+        </div>
+      <% end %>
+    </div>
+  </div>
+</div>
index 4685b0cec918bd374aa9ac175c967143442ee29f..969ec89780ec0f457392ac796ce2cafb243fa9ba 100644 (file)
@@ -179,7 +179,7 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
 
         first('button', text: 'x').click
       end
-      assert_text 'Active processes' # seeing dashboard now
+      assert_text 'Recent processes' # seeing dashboard now
     end
   end
 
@@ -242,30 +242,29 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
     end
   end
 
-  test "dashboard panes" do
-    visit page_with_token('active')
+  [
+    ['active', false],
+    ['admin', true],
+  ].each do |token, is_admin|
+    test "visit dashboard as #{token}" do
+      visit page_with_token(token)
 
-    assert_text 'Active processes' # seeing dashboard now
-    within('.active-processes') do
-      assert_text 'zzzzz-dz642-runningcontainr'
-      assert_text 'zzzzz-dz642-runningcontain2'
-      assert_text 'zzzzz-d1hrv-partdonepipelin'
-      assert_no_text 'zzzzz-d1hrv-twodonepipeline'
-      assert_no_text 'zzzzz-xvhdp-cr4queuedcontnr'
-    end
-    within('.finished-processes') do
-      assert_text 'zzzzz-d1hrv-twodonepipeline'
-      assert_text 'zzzzz-dz642-compltcontainer'
-      assert_text 'zzzzz-dz642-compltcontainr2'
-      assert_no_text 'zzzzz-d1hrv-partdonepipelin'
-      assert_no_text 'zzzzz-dz642-runningcontainr'
-    end
+      assert_text 'Recent processes' # seeing dashboard now
+      within('.recent-processes') do
+        page.has_button? 'Run a pipeline'
+        page.has_link? 'All pipelines'
+        assert_text 'zzzzz-d1hrv-partdonepipelin'
+        assert_text 'zzzzz-d1hrv-twodonepipeline'
+        assert_text 'zzzzz-dz642-runningcontainr'
+        assert_text 'zzzzz-dz642-runningcontain2'
+      end
 
-    within('.compute-node-summary-pane') do
-      click_link 'Details'
-      assert_text 'zzzzz-dz642-lockedcontainer'
-      assert_text 'zzzzz-dz642-queuedcontainer'
-      assert_text '"foo" job submitted'
+      within('.compute-node-summary-pane') do
+        page.has_link?('All nodes') if is_admin
+        page.has_link? 'All jobs'
+        click_link 'Details'
+        assert_text 'compute0'
+      end
     end
   end
 end
index fb8c906ab5e9465ef7ce62bcea4cbcfd5ac14905..ed16e8cf45e3a773ccb2321390e6775a4cf9d2b2 100644 (file)
@@ -7,7 +7,7 @@ class LoginsTest < ActionDispatch::IntegrationTest
 
   test "login with api_token works after redirect" do
     visit page_with_token('active_trustedclient')
-    assert page.has_text?('Active processes'), "Missing 'Active processes' from page"
+    assert page.has_text?('Recent processes'), "Missing 'Recent processes' from page"
     assert_no_match(/\bapi_token=/, current_path)
   end
 
index 0b04c734e62c3293be99cf1e7f6e738375206cbb..ccd97fbb4dea49531642f309e6f5dfe020c50590 100644 (file)
@@ -35,7 +35,7 @@ class PipelineTemplatesTest < ActionDispatch::IntegrationTest
     assert page.has_text? 'Textile description for pipeline template'
     assert page.has_link? 'Go to dashboard'
     click_link 'Go to dashboard'
-    assert page.has_text? 'Active processes'
+    assert page.has_text? 'Recent processes'
 
     # again visit recent templates page and verify edited description
     visit page_with_token("active", "/pipeline_templates")
index 86bf14a2f993143f2d1dd3e9719e4f4fa009663d..ea9b836a81a36ea680e615833dc9d670f1f3d86a 100644 (file)
@@ -20,7 +20,7 @@ class UserProfileTest < ActionDispatch::IntegrationTest
         assert page.has_text?('Save profile'), 'No text - Save profile'
         add_profile user
       else
-        assert page.has_text?('Active processes'), 'Not found text - Active processes'
+        assert page.has_text?('Recent processes'), 'Not found text - Recent processes'
         assert page.has_no_text?('Save profile'), 'Found text - Save profile'
       end
     elsif invited
@@ -119,7 +119,7 @@ class UserProfileTest < ActionDispatch::IntegrationTest
     end
 
     # profile saved and in home page now
-    assert page.has_text?('Active processes'), 'No text - Active processes'
+    assert page.has_text?('Recent processes'), 'No text - Recent processes'
   end
 
   [
index b35499304635f3a6e679609f1ee8478615677545..c049d8498b83386850eadedeb830d8d0f74810f8 100644 (file)
@@ -19,9 +19,9 @@ running:
   owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
   state: Running
   priority: 1
-  created_at: 2016-01-11 11:11:11.111111111 Z
-  updated_at: 2016-01-11 11:11:11.111111111 Z
-  started_at: 2016-01-11 11:11:11.111111111 Z
+  created_at: <%= 1.minute.ago.to_s(:db) %>
+  updated_at: <%= 1.minute.ago.to_s(:db) %>
+  started_at: <%= 1.minute.ago.to_s(:db) %>
   container_image: test
   cwd: test
   output: test
@@ -36,9 +36,9 @@ running-older:
   owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
   state: Running
   priority: 1
-  created_at: 2016-01-11 11:11:11.111111111 Z
-  updated_at: 2016-01-11 11:11:11.111111111 Z
-  started_at: 2016-01-12 11:11:11.111111111 Z
+  created_at: <%= 2.minute.ago.to_s(:db) %>
+  updated_at: <%= 2.minute.ago.to_s(:db) %>
+  started_at: <%= 2.minute.ago.to_s(:db) %>
   container_image: test
   cwd: test
   output: test
@@ -53,8 +53,8 @@ locked:
   owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
   state: Locked
   priority: 2
-  created_at: 2016-01-01 11:11:11.111111111 Z
-  updated_at: 2016-01-01 11:11:11.111111111 Z
+  created_at: <%= 2.minute.ago.to_s(:db) %>
+  updated_at: <%= 2.minute.ago.to_s(:db) %>
   container_image: test
   cwd: test
   output: test