[ARVADOS] updated: 266a9bdf1ca1d16d0517b738f7c0c347b15e2f35

Git user git at public.curoverse.com
Wed Jun 29 10:55:10 EDT 2016


Summary of changes:
 .../app/views/work_unit/_show_log.html.erb         | 43 ++++++++++------------
 .../container_requests_controller_test.rb          |  2 +-
 .../test/controllers/containers_controller_test.rb |  2 +-
 3 files changed, 21 insertions(+), 26 deletions(-)

       via  266a9bdf1ca1d16d0517b738f7c0c347b15e2f35 (commit)
      from  fe7bd6e426f08bc9edb16baf297b5958a53c1afa (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 266a9bdf1ca1d16d0517b738f7c0c347b15e2f35
Author: radhika <radhika at curoverse.com>
Date:   Wed Jun 29 10:54:21 2016 -0400

    9407: include the log terminal window even when the container is finished.

diff --git a/apps/workbench/app/views/work_unit/_show_log.html.erb b/apps/workbench/app/views/work_unit/_show_log.html.erb
index e3e6c23..566da5b 100644
--- a/apps/workbench/app/views/work_unit/_show_log.html.erb
+++ b/apps/workbench/app/views/work_unit/_show_log.html.erb
@@ -1,29 +1,24 @@
 <% wu = obj.work_unit(name) %>
 
-<% if !wu.log_collection %>
-  <%# Still running. Show running log. %>
-  <div id="event_log_div"
-       class="arv-log-event-listener arv-log-event-handler-append-logs arv-job-log-window"
-       data-object-uuid="<%= wu.uuid %>"
-    ><%= wu.live_log_lines(Rails.configuration.running_job_log_records_to_fetch).join("\n") %>
+<% render_log = wu.render_log %>
+<% if render_log %>
+  <div>
+    <% log_url = url_for render_log[:log] %>
+    <p> <a href="<%= log_url %>">Download the log</a> </p>
+    <%= render(partial: render_log[:partial], locals: render_log[:locals]) %>
   </div>
+<% end %>
 
-  <%# Applying a long throttle suppresses the auto-refresh of this
-      partial that would normally be triggered by arv-log-event. %>
-  <div class="arv-log-refresh-control"
-       data-load-throttle="86486400000" <%# 1001 nights %>>
-  </div>
+<%# Show log in terminal window %>
+<h4>Recent logs</h4>
+<div id="event_log_div"
+     class="arv-log-event-listener arv-log-event-handler-append-logs arv-job-log-window"
+     data-object-uuid="<%= wu.uuid %>"
+  ><%= wu.live_log_lines(Rails.configuration.running_job_log_records_to_fetch).join("\n") %>
+</div>
 
-<% else %>
-  <%# Finished running. Show log if exists. %>
-  <% render_log = wu.render_log %>
-  <% if render_log %>
-    <div>
-      <% log_url = url_for render_log[:log] %>
-      <p> <a href="<%= log_url %>">Download the full log</a> </p>
-      <%= render(partial: render_log[:partial], locals: render_log[:locals]) %>
-    </div>
-  <% else %>
-    <div> Log not accessible </div>
-  <% end %>
-<% end %>
+<%# Applying a long throttle suppresses the auto-refresh of this
+    partial that would normally be triggered by arv-log-event. %>
+<div class="arv-log-refresh-control"
+     data-load-throttle="86486400000" <%# 1001 nights %>>
+</div>
diff --git a/apps/workbench/test/controllers/container_requests_controller_test.rb b/apps/workbench/test/controllers/container_requests_controller_test.rb
index f90e4e4..c738343 100644
--- a/apps/workbench/test/controllers/container_requests_controller_test.rb
+++ b/apps/workbench/test/controllers/container_requests_controller_test.rb
@@ -11,7 +11,7 @@ class ContainerRequestsControllerTest < ActionController::TestCase
     get :show, {id: cr['uuid'], tab_pane: 'Log'}, session_for(:active)
     assert_response :success
 
-    assert_select "a", {:href=>"/collections/#{container['log']}", :text=>"Download the full log"}
+    assert_select "a", {:href=>"/collections/#{container['log']}", :text=>"Download the log"}
     assert_select "a", {:href=>"#{container['log']}/baz"}
   end
 end
diff --git a/apps/workbench/test/controllers/containers_controller_test.rb b/apps/workbench/test/controllers/containers_controller_test.rb
index 69ff656..ce37239 100644
--- a/apps/workbench/test/controllers/containers_controller_test.rb
+++ b/apps/workbench/test/controllers/containers_controller_test.rb
@@ -9,7 +9,7 @@ class ContainersControllerTest < ActionController::TestCase
     get :show, {id: container['uuid'], tab_pane: 'Log'}, session_for(:active)
     assert_response :success
 
-    assert_select "a", {:href=>"/collections/#{container['log']}", :text=>"Download the full log"}
+    assert_select "a", {:href=>"/collections/#{container['log']}", :text=>"Download the log"}
     assert_select "a", {:href=>"#{container['log']}/baz"}
   end
 end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list