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
d873a3bd
Commit
d873a3bd
authored
Oct 20, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds commit partial for vue component
parent
e4ff8dd2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
app/controllers/projects/environments_controller.rb
app/controllers/projects/environments_controller.rb
+3
-2
app/views/projects/environments/components/_commit.html.haml
app/views/projects/environments/components/_commit.html.haml
+20
-0
app/views/projects/environments/components/_environment.html.haml
...s/projects/environments/components/_environment.html.haml
+3
-3
No files found.
app/controllers/projects/environments_controller.rb
View file @
d873a3bd
...
@@ -76,8 +76,9 @@ class Projects::EnvironmentsController < Projects::ApplicationController
...
@@ -76,8 +76,9 @@ class Projects::EnvironmentsController < Projects::ApplicationController
last_deployment:
{
last_deployment:
{
include:
{
include:
{
user:
{
only:
[
:id
,
:name
,
:username
],
methods:
[
:avatar_url
]
},
user:
{
only:
[
:id
,
:name
,
:username
],
methods:
[
:avatar_url
]
},
deployable:
{
only:
[
:id
,
:name
,
:ref
,
:tag
,
:short_sha
]
}
deployable:
{
only:
[
:id
,
:name
,
:ref
,
:tag
]
}
}
},
methods:
[
:short_sha
,
:commit_title
,
:commit
]
}
}
}
}
)
)
...
...
app/views/projects/environments/components/_commit.html.haml
0 → 100644
View file @
d873a3bd
.branch-commit
{
"v-if"
=>
"!isFolder && model.last_deployment"
}
%div
{
"v-if"
=>
"model.last_deployment.ref"
}
.icon-container
{
"v-if"
=>
"model.last_deployment.tag"
}
=
icon
(
"tag"
)
.icon-container
{
"v-if"
=>
"!model.last_deployment.tag"
}
=
icon
(
"code-fork"
)
%a
.monospace.branch-name
{}
{{model.last_deployment.ref}}
.icon-container.commit-icon
=
custom_icon
(
"icon_commit"
)
%a
.commit-id.monospace
{
":href"
=>
""
}
{{model.last_deployment.short_sha}}
%p
.commit-title
%span
{
"v-if"
=>
"model.last_deployment.commit_title"
}
%a
.commit-row-message
{
":href"
=>
""
}
{{model.last_deployment.commit_title}}
%span
{
"v-if"
=>
"!model.last_deployment.commit_title"
}
Cant find HEAD commit for this branch
app/views/projects/environments/components/_environment.html.haml
View file @
d873a3bd
...
@@ -31,13 +31,13 @@
...
@@ -31,13 +31,13 @@
%td
%td
%a
.build-link
{
"v-if"
=>
"!isFolder && model.last_deployment && model.last_deployment.deployable"
,
%a
.build-link
{
"v-if"
=>
"!isFolder && model.last_deployment && model.last_deployment.deployable"
,
":href"
=>
"'#{namespace_project_builds_path(@project.namespace, @project)}/' + model.last_deployment.deployable.id"
}
":href"
=>
"'#{namespace_project_builds_path(@project.namespace, @project)}/' + model.last_deployment.deployable.id"
}
{{model.last_deployment.deployble.name}}
{{model.last_deployment.deploy
a
ble.name}}
=
precede
"#"
do
=
precede
"#"
do
{{model.last_deployment.deployable.id}}
{{model.last_deployment.deployable.id}}
%td
%td
%a
{
"v-if"
=>
"!isFolder && model.last_deployment"
}
=
render
"projects/environments/components/commit"
commit message goes here
%p
.commit-title
{
"v-if"
=>
"!isFolder && !model.last_deployment"
}
%p
.commit-title
{
"v-if"
=>
"!isFolder && !model.last_deployment"
}
No deployments yet
No deployments yet
...
...
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