X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/78e0599b0773976167ccb720fc1596236295337a..ad25d712525293ce4f95f5a059b390036ec60dc3:/apps/workbench/app/views/application/_content.html.erb diff --git a/apps/workbench/app/views/application/_content.html.erb b/apps/workbench/app/views/application/_content.html.erb index 03dff65464..c4656e659d 100644 --- a/apps/workbench/app/views/application/_content.html.erb +++ b/apps/workbench/app/views/application/_content.html.erb @@ -1,3 +1,7 @@ +<%# Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 %> + <% content_for :tab_panes do %> <% comparable = controller.respond_to? :compare %> @@ -8,27 +12,28 @@ <% data_toggle = "tab" %> <% tab_tooltip = "" %> + <% link_disabled = "" %> - <% if (pane_name == "Log") and (@object.owner_uuid != current_user) + <% if (pane_name == "Log") and !(ArvadosBase.find(@object.owner_uuid).writable_by.include?(current_user.andand.uuid) rescue nil) if controller.model_class.to_s == 'Job' if @object.log and !@object.log.empty? logCollection = Collection.find? @object.log if !logCollection data_toggle = "disabled" tab_tooltip = "Log data is not available" + link_disabled = "disabled" end end - elsif controller.model_class.to_s == 'PipelineInstance' - log_uuids = [@object.uuid] + pipeline_jobs(@object).collect{|x|x[:job].andand[:uuid]}.compact - if stderr_log_history(log_uuids, 1).empty? - data_toggle = "disabled" - tab_tooltip = "Log data is not available" - end + elsif (controller.model_class.to_s == 'PipelineInstance' and + !@object.has_readable_logs?) + data_toggle = "disabled" + tab_tooltip = "Log data is not available" + link_disabled = "disabled" end end %> -
  • +