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
4508f85a
Commit
4508f85a
authored
Oct 20, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds user column with avatar url
parent
c02a4f38
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
13 deletions
+34
-13
app/controllers/projects/environments_controller.rb
app/controllers/projects/environments_controller.rb
+5
-2
app/views/projects/environments/components/_environment.html.haml
...s/projects/environments/components/_environment.html.haml
+29
-11
No files found.
app/controllers/projects/environments_controller.rb
View file @
4508f85a
...
...
@@ -74,7 +74,10 @@ class Projects::EnvironmentsController < Projects::ApplicationController
resource
.
as_json
(
include:
{
last_deployment:
{
include:
[
:deployable
,
:user
]
include:
{
user:
{
only:
[
:id
,
:name
,
:username
],
methods:
[
:avatar_url
]
},
deployable:
{
only:
[
:id
,
:name
]
}
}
}
}
)
...
...
app/views/projects/environments/components/_environment.html.haml
View file @
4508f85a
...
...
@@ -18,9 +18,15 @@
%span
{
"v-if"
=>
"!isFolder && model.last_deployment && model.last_deployment.iid"
}
{{model.last_deployment.iid}}
by
%span
{
"v-if"
=>
"model.last_deployment.user"
}
{{model.last_deployment.user.name}}
by
%a
{
":href"
=>
"'/' + model.last_deployment.user.username"
}
%img
.avatar.has-tooltip.s20
{
":src"
=>
"model.last_deployment.user.avatar_url"
,
":alt"
=>
"model.last_deployment.user.username + ' avatar'"
,
":title"
=>
"model.last_deployment.user.username"
,
data:
{
container:
'body'
},
width:
20
,
height:
20
}
%td
%a
{
"v-if"
=>
"!isFolder && model.last_deployment && model.last_deployment.deployable"
,
...
...
@@ -30,7 +36,7 @@
%td
%a
{
"v-if"
=>
"!isFolder && model.last_deployment"
}
column 4
/ = render "projects/deployments/commit", deployment: "{{model.last_deployment}}"
%p
.commit-title
{
"v-if"
=>
"!isFolder && !model.last_deployment"
}
No deployments yet
...
...
@@ -40,7 +46,10 @@
%td
.hidden-xs
.pull-right
{
"v-if"
=>
"!isFolder"
}
actions
-# = render "projects/environments/external_url", environment: "{{model}}"
-# = render "projects/deployments/actions", deployment: "{{model.last_deployment}}"
-# = render "projects/environments/stop", environment: "{{model}}"
-# = render "projects/deployments/rollback", deployment: "{{model.last_deployment}}"
%tr
.environment-children
{
"v-show"
=>
"open"
,
"v-if"
=>
"isFolder"
,
...
...
@@ -55,19 +64,25 @@
%span
{
"v-if"
=>
"child.last_deployment && child.last_deployment.iid"
}
{{child.last_deployment.iid}}
%span
{
"v-if"
=>
"child.last_deployment.user"
}
by
%span
{
"v-if"
=>
"model.last_deployment.user"
}
{{child.last_deployment.user.name}}
%a
{
":href"
=>
"'/' + child.last_deployment.user.username"
}
%img
.avatar.has-tooltip.s20
{
":src"
=>
"child.last_deployment.user.avatar_url"
,
":alt"
=>
"child.last_deployment.user.username + ' avatar'"
,
":title"
=>
"child.last_deployment.user.username"
,
data:
{
container:
'body'
},
width:
20
,
height:
20
}
%td
%a
{
"v-if"
=>
" child.last_deployment && child.last_deployment.deployable"
,
":class"
=>
"build-link"
,
":href"
=>
""
}
{{
model.last_deployment.deployable.name}} (## {{model
.last_deployment.deployable.id}})
{{
chil.last_deployment.deployable.name}} (## {{child
.last_deployment.deployable.id}})
%td
%a
{
"v-if"
=>
"child.last_deployment"
}
column 4
/ = render "projects/deployments/commit", deployment: "{{child.last_deployment}}"
%p
.commit-title
{
"v-if"
=>
"!child.last_deployment"
}
No deployments yet
...
...
@@ -76,5 +91,8 @@
{{child.last_deployment.created_at}}
%td
.hidden-xs
.pull-right
{
"v-if"
=>
"!isFolder"
}
actions
\ No newline at end of file
.pull-right
-# = render "projects/environments/external_url", environment: "{{child}}"
-# = render "projects/deployments/actions", deployment: "{{child.last_deployment}}"
-# = render "projects/environments/stop", environment: "{{child}}"
-
# = render "projects/deployments/rollback", deployment: "{{child.last_deployment}}"
\ No newline at end of file
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