1 <%# Copyright (C) The Arvados Authors. All rights reserved.
3 SPDX-License-Identifier: AGPL-3.0 %>
5 <% content_for :tab_panes do %>
7 <% comparable = controller.respond_to? :compare %>
9 <ul class="nav nav-tabs" data-tab-counts-url="<%= url_for(action: :tab_counts) rescue '' %>">
10 <% pane_list.each_with_index do |pane, i| %>
11 <% pane_name = (pane.is_a?(Hash) ? pane[:name] : pane) %>
13 <% data_toggle = "tab" %>
14 <% tab_tooltip = "" %>
15 <% link_disabled = "" %>
17 <% if (pane_name == "Log") and !(ArvadosBase.find(@object.owner_uuid).writable_by.include?(current_user.andand.uuid) rescue nil)
18 if controller.model_class.to_s == 'Job'
19 if @object.log and !@object.log.empty?
20 logCollection = Collection.find? @object.log
22 data_toggle = "disabled"
23 tab_tooltip = "Log data is not available"
24 link_disabled = "disabled"
27 elsif (controller.model_class.to_s == 'PipelineInstance' and
28 !@object.has_readable_logs?)
29 data_toggle = "disabled"
30 tab_tooltip = "Log data is not available"
31 link_disabled = "disabled"
36 <li class="<%= 'active' if i==0 %> <%= link_disabled %> tab-pane-<%=pane_name%>" data-toggle="tooltip" data-placement="top" title="<%=tab_tooltip%>">
37 <a href="#<%= pane_name %>"
38 id="<%= pane_name %>-tab"
39 data-toggle="<%= data_toggle %>"
41 data-tab-history-update-url=true
43 <%= pane_name.gsub('_', ' ') %> <span id="<%= pane_name %>-count"></span>
49 <div class="tab-content">
50 <% pane_list.each_with_index do |pane, i| %>
51 <% pane_name = (pane.is_a?(Hash) ? pane[:name] : pane) %>
52 <div id="<%= pane_name %>"
53 class="tab-pane fade <%= 'in active pane-loaded' if i==0 %> arv-log-event-listener arv-refresh-on-log-event arv-log-event-subscribe-to-pipeline-job-uuids"
54 <% if controller.action_name == "index" %>
55 data-object-kind="arvados#<%= ArvadosApiClient.class_kind controller.model_class %>"
57 data-object-uuid="<%= @object.uuid %>"
59 data-pane-content-url="<%= url_for(params.permit!.merge(tab_pane: pane_name)) %>"
60 style="margin-top:0.5em;"
62 <div class="pane-content">
64 <%= render_pane pane_name, to_string: true %>
66 <div class="spinner spinner-32px spinner-h-center"></div>