X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e6cd7c31ee28851d3ead992437fc93f2fc73ef92..6b9eafb0de63da57e7b1a3945e7d16823e1c25df:/apps/workbench/app/views/work_units/_show_log.html.erb diff --git a/apps/workbench/app/views/work_units/_show_log.html.erb b/apps/workbench/app/views/work_units/_show_log.html.erb index 566da5ba86..1f643acdc9 100644 --- a/apps/workbench/app/views/work_units/_show_log.html.erb +++ b/apps/workbench/app/views/work_units/_show_log.html.erb @@ -1,3 +1,7 @@ +<%# Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 %> + <% wu = obj.work_unit(name) %> <% render_log = wu.render_log %> @@ -9,16 +13,20 @@ <% end %> -<%# Show log in terminal window %> +<% live_log_lines = wu.live_log_lines(Rails.configuration.running_job_log_records_to_fetch).join("\n") %> +<% if !render_log or (live_log_lines.size > 0) %> +<%# Still running, or recently finished and logs are still available from logs table %> +<%# Show recent logs in terminal window %>

Recent logs

-
<%= wu.live_log_lines(Rails.configuration.running_job_log_records_to_fetch).join("\n") %> -
+ data-object-uuids="<%= wu.log_object_uuids.join(' ') %>" + ><%= live_log_lines %> + <%# Applying a long throttle suppresses the auto-refresh of this partial that would normally be triggered by arv-log-event. %>
>
+<% end %>