<% if current_job %>
<%# column offset 4 %>
- <% if current_job[:state].in? ["Complete", "Failed", "Cancelled"] %>
- <div class="col-md-1">
- <% if current_job[:log] %>
- <% logCollection = Collection.find? current_job[:log] %>
- <% if logCollection %>
+ <% if(pipeline_display rescue nil) %>
+ <% if current_job[:state].in? ["Complete", "Failed", "Cancelled"] %>
+ <div class="col-md-1">
+ <% if current_job[:log] %>
+ <% logCollection = Collection.find? current_job[:log] %>
+ <% if logCollection %>
+ <%= link_to "Log", job_path(current_job[:uuid], anchor: "Log") %>
+ <% else %>
+ Log unavailable
+ <% end %>
+ <% end %>
+ </div>
+ <% elsif current_job[:state] == "Running" %>
+ <div class="col-md-1">
+ <% job = Job.find? current_job[:uuid] %>
+ <% if job %>
<%= link_to "Log", job_path(current_job[:uuid], anchor: "Log") %>
<% else %>
Log unavailable
<% end %>
+ </div>
<% end %>
- </div>
- <% elsif current_job[:state] == "Running" %>
- <div class="col-md-1">
- <% job = Job.find? current_job[:uuid] %>
- <% if job %>
- <%= link_to "Log", job_path(current_job[:uuid], anchor: "Log") %>
- <% else %>
- Log unavailable
- <% end %>
- </div>
<% end %>
<%# column offset 5 %>
%>
<% pipeline_jobs.each_with_index do |pj, i| %>
- <%= render partial: 'running_component', locals: {pj: pj, i: i, expanded: false} %>
+ <%= render partial: 'running_component', locals: {pj: pj, i: i, expanded: false, pipeline_display: true} %>
<% end %>
# Function.prototype.bind, which is used by job_log_graph.js.
find(:xpath, "//a[@href='#Log']").click
assert_text expect_log_text
- else
- assert_selector "a[href=\"/jobs/#{object['uuid']}#Log\"]", text: 'Log'
end
else
assert_selector 'a[data-toggle="disabled"]', text: 'Log'
- assert_text 'Log unavailable'
assert_text 'Output data not available'
assert_text object['job']
if pipeline_page
assert_no_text 'This pipeline was created from' # template is not readable
assert_no_selector 'a', text: object['components']['foo']['job']['uuid']
+ assert_text 'Log unavailable'
end
find(:xpath, "//a[@href='#Log']").click
assert_text 'Output data not available'