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
Jérome Perrin
gitlab-ce
Commits
d697b9c8
Commit
d697b9c8
authored
Oct 24, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds link to actions. Cleans spaces
parent
a265826e
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
51 additions
and
42 deletions
+51
-42
app/assets/javascripts/environments/components/environment_item.js.es6
...vascripts/environments/components/environment_item.js.es6
+3
-4
app/assets/javascripts/environments/stores/environmnets_store.js.es6
...javascripts/environments/stores/environmnets_store.js.es6
+14
-7
app/assets/stylesheets/pages/environments.scss
app/assets/stylesheets/pages/environments.scss
+0
-1
app/controllers/projects/environments_controller.rb
app/controllers/projects/environments_controller.rb
+4
-3
app/views/projects/environments/components/_actions.html.haml
...views/projects/environments/components/_actions.html.haml
+4
-2
app/views/projects/environments/components/_environment.html.haml
...s/projects/environments/components/_environment.html.haml
+22
-22
app/views/projects/environments/components/_rollback.html.haml
...iews/projects/environments/components/_rollback.html.haml
+2
-2
app/views/projects/environments/components/_stop.html.haml
app/views/projects/environments/components/_stop.html.haml
+2
-1
No files found.
app/assets/javascripts/environments/components/environment_item.js.es6
View file @
d697b9c8
...
@@ -53,7 +53,6 @@
...
@@ -53,7 +53,6 @@
return this.model['vue-isChildren'];
return this.model['vue-isChildren'];
},
},
/**
/**
* Counts the number of environments in each folder.
* Counts the number of environments in each folder.
* Used to show a badge with the counter.
* Used to show a badge with the counter.
...
...
app/assets/javascripts/environments/stores/environmnets_store.js.es6
View file @
d697b9c8
...
@@ -88,7 +88,14 @@
...
@@ -88,7 +88,14 @@
return environmentsTree;
return environmentsTree;
},
},
sortByName (a,b) {
/**
* Sorts the two objects provided by their name.
*
* @param {Object} a
* @param {Object} b
* @returns {Number}
*/
sortByName (a, b) {
const nameA = a.name.toUpperCase();
const nameA = a.name.toUpperCase();
const nameB = b.name.toUpperCase();
const nameB = b.name.toUpperCase();
...
...
app/assets/stylesheets/pages/environments.scss
View file @
d697b9c8
...
@@ -86,7 +86,6 @@
...
@@ -86,7 +86,6 @@
}
}
.table.ci-table.environments
{
.table.ci-table.environments
{
.icon-container
{
.icon-container
{
width
:
20px
;
width
:
20px
;
text-align
:
center
;
text-align
:
center
;
...
...
app/controllers/projects/environments_controller.rb
View file @
d697b9c8
...
@@ -75,11 +75,12 @@ class Projects::EnvironmentsController < Projects::ApplicationController
...
@@ -75,11 +75,12 @@ class Projects::EnvironmentsController < Projects::ApplicationController
include:
{
include:
{
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
]
}
},
},
methods:
[
:short_sha
,
:commit_title
,
:
deployable
,
:
commit
]
methods:
[
:short_sha
,
:commit_title
,
:commit
]
},
},
project:
{
methods:
[
:namespace
]}
project:
{
methods:
[
:namespace
]
}
}
}
)
)
end
end
...
...
app/views/projects/environments/components/_actions.html.haml
View file @
d697b9c8
...
@@ -7,8 +7,10 @@
...
@@ -7,8 +7,10 @@
%ul
.dropdown-menu.dropdown-menu-align-right
%ul
.dropdown-menu.dropdown-menu-align-right
%li
{
"v-for"
=>
"action in model.last_deployment.manual_actions"
}
%li
{
"v-for"
=>
"action in model.last_deployment.manual_actions"
}
-# transform this = link_to [:play, @project.namespace.becomes(Namespace), @project, action] into href
%a
{
":ref"
=>
"'#{namespace_project_path(@project.namespace, @project)}/' + action.id + '/play'"
,
%a
{
data:
{
"method"
=>
":post"
,
"rel"
=>
"nofollow"
}}
"data-method"
=>
"post"
,
"rel"
=>
"nofollow"
}
=
custom_icon
(
'icon_play'
)
=
custom_icon
(
'icon_play'
)
%span
%span
{{action.name}}
{{action.name}}
\ No newline at end of file
app/views/projects/environments/components/_environment.html.haml
View file @
d697b9c8
%script
#environment-item-template
{
"type"
=>
"text/x-template"
}
%script
#environment-item-template
{
"type"
=>
"text/x-template"
}
%tr
%tr
%td
{
"v-bind:class"
=>
"{ 'children-row': isChildren}"
}
%td
{
"v-bind:class"
=>
"{ 'children-row': isChildren}"
}
%a
.environment-name
{
"v-if"
=>
"!isFolder"
,
%a
.environment-name
{
"v-if"
=>
"!isFolder"
,
":href"
=>
"'#{namespace_project_environments_path(@project.namespace, @project)}/' + model.id"
}
":href"
=>
"'#{namespace_project_environments_path(@project.namespace, @project)}/' + model.id"
}
{{model.name}}
{{model.name}}
...
@@ -8,9 +8,9 @@
...
@@ -8,9 +8,9 @@
%span
.folder-name
{
"v-if"
=>
"isFolder"
,
%span
.folder-name
{
"v-if"
=>
"isFolder"
,
"@click"
=>
"toggle"
}
"@click"
=>
"toggle"
}
%i
.folder-icon
{
"v-show"
=>
"open"
}
%i
.folder-icon
{
"v-show"
=>
"open"
}
=
icon
(
"caret-down"
)
=
icon
(
"caret-down"
)
%i
.folder-icon
{
"v-show"
=>
"!open"
}
%i
.folder-icon
{
"v-show"
=>
"!open"
}
=
icon
(
"caret-right"
)
=
icon
(
"caret-right"
)
{{model.name}}
{{model.name}}
...
@@ -19,22 +19,22 @@
...
@@ -19,22 +19,22 @@
{{childrenCounter}}
{{childrenCounter}}
%td
.deployment-column
%td
.deployment-column
%span
{
"v-if"
=>
"!isFolder && model.last_deployment && model.last_deployment.iid"
}
%span
{
"v-if"
=>
"!isFolder && model.last_deployment && model.last_deployment.iid"
}
=
precede
"#"
do
=
precede
"#"
do
{{model.last_deployment.iid}}
{{model.last_deployment.iid}}
%span
{
"v-if"
=>
"model.last_deployment.user"
}
%span
{
"v-if"
=>
"model.last_deployment.user"
}
by
by
%a
{
":href"
=>
"'/' + model.last_deployment.user.username"
}
%a
{
":href"
=>
"'/' + model.last_deployment.user.username"
}
%img
.avatar.has_tooltip.s20
{
":src"
=>
"model.last_deployment.user.avatar_url"
,
%img
.avatar.has_tooltip.s20
{
":src"
=>
"model.last_deployment.user.avatar_url"
,
":alt"
=>
"model.last_deployment.user.username + 'avatar'"
,
":alt"
=>
"model.last_deployment.user.username + 'avatar'"
,
":title"
=>
"model.last_deployment.user.username"
,
":title"
=>
"model.last_deployment.user.username"
,
data:
{
container:
"body"
},
data:
{
container:
"body"
},
width:
20
,
height:
20
}
width:
20
,
height:
20
}
%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.deployable.name}}
{{model.last_deployment.deployable.name}}
=
precede
"#"
do
=
precede
"#"
do
{{model.last_deployment.deployable.id}}
{{model.last_deployment.deployable.id}}
...
@@ -42,15 +42,15 @@
...
@@ -42,15 +42,15 @@
%td
%td
=
render
"projects/environments/components/commit"
=
render
"projects/environments/components/commit"
%p
.commit-title
{
"v-if"
=>
"!isFolder && !model.last_deployment"
}
%p
.commit-title
{
"v-if"
=>
"!isFolder && !model.last_deployment"
}
No deployments yet
No deployments yet
%td
%td
%span
{
"v-if"
=>
"!isFolder && model.last_deployment"
}
%span
{
"v-if"
=>
"!isFolder && model.last_deployment"
}
{{model.last_deployment.created_at}}
{{model.last_deployment.created_at}}
%td
.hidden-xs
%td
.hidden-xs
.pull-right
{
"v-if"
=>
"!isFolder"
}
.pull-right
{
"v-if"
=>
"!isFolder"
}
=
render
"projects/environments/components/external_url"
=
render
"projects/environments/components/external_url"
=
render
"projects/environments/components/actions"
=
render
"projects/environments/components/actions"
=
render
"projects/environments/components/stop"
=
render
"projects/environments/components/stop"
...
@@ -59,4 +59,4 @@
...
@@ -59,4 +59,4 @@
%tr
{
"v-if"
=>
"open && isFolder"
,
%tr
{
"v-if"
=>
"open && isFolder"
,
"is"
=>
"environment-item"
,
"is"
=>
"environment-item"
,
"v-for"
=>
"model in model.children"
,
"v-for"
=>
"model in model.children"
,
":model"
=>
"model"
}
":model"
=>
"model"
}
app/views/projects/environments/components/_rollback.html.haml
View file @
d697b9c8
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"data-method"
=>
"post"
,
"data-method"
=>
"post"
,
"rel"
=>
"nofollow"
}
"rel"
=>
"nofollow"
}
%span
{
"v-if"
=>
"model.last_deployment.last"
}
%span
{
"v-if"
=>
"model.last_deployment.last"
}
Re-deploy
Re-deploy
%span
{
"v-if"
=>
"!model.last_deployment.last"
}
%span
{
"v-if"
=>
"!model.last_deployment.last"
}
Rollback
Rollback
app/views/projects/environments/components/_stop.html.haml
View file @
d697b9c8
...
@@ -2,5 +2,6 @@
...
@@ -2,5 +2,6 @@
.inline
{
"v-if"
=>
"model.stop_action"
}
.inline
{
"v-if"
=>
"model.stop_action"
}
%a
.btn.stop-env-link
{
":href"
=>
"'#{namespace_project_environments_path(@project.namespace, @project)}/' + model.id"
,
%a
.btn.stop-env-link
{
":href"
=>
"'#{namespace_project_environments_path(@project.namespace, @project)}/' + model.id"
,
"method"
=>
":post"
,
"method"
=>
":post"
,
"rel"
=>
"nofollow"
,
"confirm"
=>
"Are you sure you want to stop this environment?"
}
"rel"
=>
"nofollow"
,
"confirm"
=>
"Are you sure you want to stop this environment?"
}
=
icon
(
"stop"
,
class:
"stop-env-icon"
)
=
icon
(
"stop"
,
class:
"stop-env-icon"
)
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