%>
<%
+ 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 PipelineInstance.api_exists?(:index) %>
+ <% 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>
assert_includes @response.body, "Run a process"
end
- test "dashboard compute node status when pipeline_instance index API is disabled" do
+ test "dashboard compute node status not shown when pipeline_instance index API is disabled" do
@controller = ProjectsController.new
dd = ArvadosApiClient.new_or_current.discovery.deep_dup