3821: integration test to remove files from a collection
[arvados.git] / apps / workbench / app / views / projects / _show_dashboard.html.erb
index 478b3971f64ea982b3cdb43b05c22a8ab6113a36..bcfeb6a466e544926dc4a8c7555dcbcd0cdd4ab7 100644 (file)
 %>
 
 <%
-  no_jobs_api = !PipelineInstance.api_exists?(:index)
-  recent_procs_title = 'Recent pipelines and processes'
-  recent_procs_title = 'Recent processes' if no_jobs_api
-
-  run_proc_title = 'Choose a pipeline or workflow to run:'
-  run_proc_title = 'Choose a workflow to run:' if no_jobs_api
+  recent_procs_panel_width = 6
+  if !PipelineInstance.api_exists?(:index)
+    recent_procs_title = 'Recent processes'
+    run_proc_title = 'Choose a workflow to run:'
+    show_node_status = false
+    # Recent processes panel should take the entire width when is the only one
+    # being rendered.
+    if !Rails.configuration.show_recent_collections_on_dashboard
+      recent_procs_panel_width = 12
+    end
+  else
+    recent_procs_title = 'Recent pipelines and processes'
+    run_proc_title = 'Choose a pipeline or workflow to run:'
+    show_node_status = true
+  end
 %>
 
   <div class="row">
-    <div class="col-md-6">
+    <div class="col-md-<%= recent_procs_panel_width %>">
       <div class="panel panel-default" style="min-height: 10.5em">
         <div class="panel-heading">
           <span class="panel-title"><%=recent_procs_title%></span>
     </div>
 
     <div class="col-md-6">
+      <% if show_node_status %>
       <% nodes = Node.filter([["last_ping_at", ">", Time.now - 3600]]).results %>
       <div class="panel panel-default" style="min-height: 10.5em">
         <div class="panel-heading"><span class="panel-title">Compute node status</span>
           </div>
         </div>
       </div>
+      <% end %>
       <% if Rails.configuration.show_recent_collections_on_dashboard %>
       <div class="panel panel-default">
         <div class="panel-heading"><span class="panel-title">Recent collections</span>