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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
27d1349f
Commit
27d1349f
authored
8 years ago
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add raw trace output for GitLab Workhorse
parent
c3cc3320
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
app/controllers/projects/builds_controller.rb
app/controllers/projects/builds_controller.rb
+9
-1
app/views/projects/builds/show.html.haml
app/views/projects/builds/show.html.haml
+3
-0
config/routes.rb
config/routes.rb
+1
-0
No files found.
app/controllers/projects/builds_controller.rb
View file @
27d1349f
class
Projects::BuildsController
<
Projects
::
ApplicationController
before_action
:build
,
except:
[
:index
,
:cancel_all
]
before_action
:authorize_read_build!
,
except:
[
:cancel
,
:cancel_all
,
:retry
]
before_action
:authorize_update_build!
,
except:
[
:index
,
:show
,
:status
]
before_action
:authorize_update_build!
,
except:
[
:index
,
:show
,
:status
,
:raw_trace
]
layout
'project'
def
index
...
...
@@ -62,6 +62,14 @@ class Projects::BuildsController < Projects::ApplicationController
notice:
"Build has been sucessfully erased!"
end
def
raw
if
@build
.
has_trace?
render
json:
{
trace_file:
@build
.
path_to_trace
}
else
render
json:
{},
status:
404
end
end
private
def
build
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/builds/show.html.haml
View file @
27d1349f
...
...
@@ -127,6 +127,9 @@
data:
{
confirm:
'Are you sure you want to erase this build?'
}
do
=
icon
(
'eraser'
)
Erase
-
if
@build
.
has_trace?
=
link_to
'Raw'
,
raw_namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'btn btn-sm btn-success'
,
target:
'_blank'
.clearfix
-
if
@build
.
duration
...
...
This diff is collapsed.
Click to expand it.
config/routes.rb
View file @
27d1349f
...
...
@@ -669,6 +669,7 @@ Rails.application.routes.draw do
post
:cancel
post
:retry
post
:erase
get
:raw
,
format:
false
end
resource
:artifacts
,
only:
[]
do
...
...
This diff is collapsed.
Click to expand it.
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