Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2810dfd7
Commit
2810dfd7
authored
Dec 15, 2020
by
pburdette
Committed by
Stan Hu
Jan 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply BE feedback
Use model directly to determine if job has a trace.
parent
917dc2bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
app/controllers/projects/jobs_controller.rb
app/controllers/projects/jobs_controller.rb
+4
-8
No files found.
app/controllers/projects/jobs_controller.rb
View file @
2810dfd7
...
...
@@ -40,7 +40,9 @@ class Projects::JobsController < Projects::ApplicationController
format
.
json
do
Gitlab
::
PollingInterval
.
set_header
(
response
,
interval:
10_000
)
render
json:
build_details
render
json:
BuildSerializer
.
new
(
project:
@project
,
current_user:
@current_user
)
.
represent
(
@build
,
{},
BuildDetailsEntity
)
end
end
end
...
...
@@ -57,7 +59,7 @@ class Projects::JobsController < Projects::ApplicationController
stream:
stream
,
state:
params
[
:state
])
if
build_details
[
:has_trace
]
if
@build
.
has_trace?
render
json:
BuildTraceSerializer
.
new
(
project:
@project
,
current_user:
@current_user
)
.
represent
(
build_trace
)
...
...
@@ -257,10 +259,4 @@ class Projects::JobsController < Projects::ApplicationController
::
Gitlab
::
Workhorse
.
channel_websocket
(
service
)
end
def
build_details
BuildSerializer
.
new
(
project:
@project
,
current_user:
@current_user
)
.
represent
(
@build
,
{},
BuildDetailsEntity
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment