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
Boxiang Sun
gitlab-ce
Commits
ffce9fd5
Commit
ffce9fd5
authored
Oct 03, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose failure reason in pipeline error badge
Conflicts: app/serializers/pipeline_entity.rb
parent
9f639b07
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
app/assets/javascripts/pipelines/components/pipeline_url.vue
app/assets/javascripts/pipelines/components/pipeline_url.vue
+7
-0
app/serializers/pipeline_entity.rb
app/serializers/pipeline_entity.rb
+6
-2
No files found.
app/assets/javascripts/pipelines/components/pipeline_url.vue
View file @
ffce9fd5
...
...
@@ -72,6 +72,13 @@
:title=
"pipeline.yaml_errors"
>
yaml invalid
</span>
<span
v-if=
"pipeline.flags.failure_reason"
v-tooltip
class=
"js-pipeline-url-failure label label-danger"
:title=
"pipeline.failure_reason"
>
error
</span>
<a
v-if=
"pipeline.flags.auto_devops"
tabindex=
"0"
...
...
app/serializers/pipeline_entity.rb
View file @
ffce9fd5
...
...
@@ -20,6 +20,7 @@ class PipelineEntity < Grape::Entity
expose
:has_yaml_errors?
,
as: :yaml_errors
expose
:can_retry?
,
as: :retryable
expose
:can_cancel?
,
as: :cancelable
expose
:failure_reason?
,
as: :failure_reason
end
expose
:details
do
...
...
@@ -44,6 +45,11 @@ class PipelineEntity < Grape::Entity
end
expose
:commit
,
using:
CommitEntity
expose
:yaml_errors
,
if:
->
(
pipeline
,
_
)
{
pipeline
.
has_yaml_errors?
}
expose
:failure_reason
,
if:
->
(
pipeline
,
_
)
{
pipeline
.
failure_reason?
}
do
|
pipeline
|
pipeline
.
present
.
failure_reason
end
expose
:retry_path
,
if:
->
(
*
)
{
can_retry?
}
do
|
pipeline
|
retry_project_pipeline_path
(
pipeline
.
project
,
pipeline
)
...
...
@@ -53,8 +59,6 @@ class PipelineEntity < Grape::Entity
cancel_project_pipeline_path
(
pipeline
.
project
,
pipeline
)
end
expose
:yaml_errors
,
if:
->
(
pipeline
,
_
)
{
pipeline
.
has_yaml_errors?
}
private
alias_method
:pipeline
,
:object
...
...
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