Expose `has_trace` in job API
Problem to solve
Expose has_trace
inside of Project::JobController#show.json
as part of #50101 (closed)
Further details
app/views/projects/jobs/show.html.haml
has the following conditions which frontend needs to migrate to vue, adding has_trace
in the response as a boolean field that is always present, they should be able to used that to have the same logic.
- if @build.running? || @build.has_trace?
.build-trace-container.prepend-top-default
.top-bar.js-top-bar
.js-truncated-info.truncated-info.d-none.d-sm-block.float-left.hidden<
Showing last
%span.js-truncated-info-size.truncated-info-size><
of log -
%a.js-raw-link.raw-link{ href: raw_project_job_path(@project, @build) }>< Complete Raw
.controllers.float-right
- if @build.has_trace?
= link_to raw_project_job_path(@project, @build),
title: 'Show complete raw',
data: { placement: 'top', container: 'body' },
class: 'js-raw-link-controller has-tooltip controllers-buttons' do
= icon('file-text-o')