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
7f944ed8
Commit
7f944ed8
authored
Feb 01, 2019
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose last pipeline in operations dashboard
parent
8850e61c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
ee/app/serializers/dashboard_operations_project_entity.rb
ee/app/serializers/dashboard_operations_project_entity.rb
+13
-0
No files found.
ee/app/serializers/dashboard_operations_project_entity.rb
View file @
7f944ed8
...
...
@@ -9,6 +9,15 @@ class DashboardOperationsProjectEntity < Grape::Entity
remove_operations_project_path
(
project_id:
dashboard_project
.
project
.
id
)
end
expose
:last_pipeline
,
if:
->
(
*
)
{
last_pipeline
}
do
|
dashboard_project
,
options
|
new_request
=
EntityRequest
.
new
(
current_user:
request
.
current_user
,
project:
dashboard_project
.
project
)
PipelineEntity
.
represent
(
last_pipeline
,
options
.
merge
(
request:
new_request
))
end
expose
:last_deployment
,
if:
->
(
*
)
{
last_deployment?
}
do
|
dashboard_project
,
options
|
new_request
=
EntityRequest
.
new
(
current_user:
request
.
current_user
,
...
...
@@ -32,6 +41,10 @@ class DashboardOperationsProjectEntity < Grape::Entity
alias_method
:dashboard_project
,
:object
def
last_pipeline
dashboard_project
.
project
.
commit
.
last_pipeline
end
def
last_deployment?
dashboard_project
.
last_deployment
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