[ARVADOS] updated: bf03dd4f523463b896428527fa0685631e9ac649

Git user git at public.curoverse.com
Fri Mar 17 10:20:22 EDT 2017


Summary of changes:
 apps/workbench/app/views/projects/_show_dashboard.html.erb | 12 ++++++++++--
 apps/workbench/test/controllers/disabled_api_test.rb       |  2 +-
 2 files changed, 11 insertions(+), 3 deletions(-)

       via  bf03dd4f523463b896428527fa0685631e9ac649 (commit)
      from  73dbf5bf94b162e5e9ed74cb60f17ee2c7018059 (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 bf03dd4f523463b896428527fa0685631e9ac649
Author: Lucas Di Pentima <lucas at curoverse.com>
Date:   Fri Mar 17 11:16:05 2017 -0300

    11014: When PipelineInstance API is off and also show_recent_collections_on_dashboard configuration is off, now the "Recent processes" panel will take full screen width.
    Corrected test name.
    Avoid calling PipelineInstance.api_exist?(:index) more than once.

diff --git a/apps/workbench/app/views/projects/_show_dashboard.html.erb b/apps/workbench/app/views/projects/_show_dashboard.html.erb
index 4f01f9d..bcfeb6a 100644
--- a/apps/workbench/app/views/projects/_show_dashboard.html.erb
+++ b/apps/workbench/app/views/projects/_show_dashboard.html.erb
@@ -25,17 +25,25 @@
 %>
 
 <%
+  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>
@@ -140,7 +148,7 @@
     </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>
diff --git a/apps/workbench/test/controllers/disabled_api_test.rb b/apps/workbench/test/controllers/disabled_api_test.rb
index 55c7b24..334b89c 100644
--- a/apps/workbench/test/controllers/disabled_api_test.rb
+++ b/apps/workbench/test/controllers/disabled_api_test.rb
@@ -15,7 +15,7 @@ class DisabledApiTest < ActionController::TestCase
     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

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list