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
ed517340
Commit
ed517340
authored
Jun 21, 2016
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle error on trace raw download with old builds (DB stored)
parent
313b09fc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
app/controllers/projects/builds_controller.rb
app/controllers/projects/builds_controller.rb
+1
-1
app/models/ci/build.rb
app/models/ci/build.rb
+4
-0
app/views/projects/builds/_sidebar.html.haml
app/views/projects/builds/_sidebar.html.haml
+1
-1
No files found.
app/controllers/projects/builds_controller.rb
View file @
ed517340
...
@@ -78,7 +78,7 @@ class Projects::BuildsController < Projects::ApplicationController
...
@@ -78,7 +78,7 @@ class Projects::BuildsController < Projects::ApplicationController
end
end
def
raw
def
raw
if
@build
.
has_trace?
if
@build
.
has_trace
_file
?
send_file
@build
.
path_to_trace
,
type:
'text/plain; charset=utf-8'
,
disposition:
'inline'
send_file
@build
.
path_to_trace
,
type:
'text/plain; charset=utf-8'
,
disposition:
'inline'
else
else
render_404
render_404
...
...
app/models/ci/build.rb
View file @
ed517340
...
@@ -208,6 +208,10 @@ module Ci
...
@@ -208,6 +208,10 @@ module Ci
end
end
end
end
def
has_trace_file?
File
.
exist?
(
path_to_trace
)
||
(
project
.
ci_id
&&
File
.
exist?
(
old_path_to_trace
))
end
def
has_trace?
def
has_trace?
raw_trace
.
present?
raw_trace
.
present?
end
end
...
...
app/views/projects/builds/_sidebar.html.haml
View file @
ed517340
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
-
elsif
@build
.
runner
-
elsif
@build
.
runner
\##{@build.runner.id}
\##{@build.runner.id}
.btn-group.btn-group-justified
{
role: :group
}
.btn-group.btn-group-justified
{
role: :group
}
-
if
@build
.
has_trace?
-
if
@build
.
has_trace
_file
?
=
link_to
'Raw'
,
raw_namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'btn btn-sm btn-default'
=
link_to
'Raw'
,
raw_namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'btn btn-sm btn-default'
-
if
@build
.
active?
-
if
@build
.
active?
=
link_to
"Cancel"
,
cancel_namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'btn btn-sm btn-default'
,
method: :post
=
link_to
"Cancel"
,
cancel_namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'btn btn-sm btn-default'
,
method: :post
...
...
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