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
Tatuya Kamada
gitlab-ce
Commits
829a708a
Commit
829a708a
authored
Oct 18, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix remaining specs failures
parent
e35af6e2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
7 deletions
+14
-7
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+6
-1
app/views/projects/environments/index.html.haml
app/views/projects/environments/index.html.haml
+1
-1
app/views/projects/environments/show.html.haml
app/views/projects/environments/show.html.haml
+1
-1
spec/features/merge_requests/widget_deployments_spec.rb
spec/features/merge_requests/widget_deployments_spec.rb
+6
-4
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
829a708a
...
...
@@ -412,11 +412,16 @@ class Projects::MergeRequestsController < Projects::ApplicationController
project
=
environment
.
project
deployment
=
environment
.
first_deployment_for
(
@merge_request
.
diff_head_commit
)
stop_url
=
if
environment
.
stoppable?
&&
can?
(
current_user
,
:create_deployment
,
environment
)
stop_namespace_project_environment_path
(
project
.
namespace
,
project
,
environment
)
end
{
id:
environment
.
id
,
name:
environment
.
name
,
url:
namespace_project_environment_path
(
project
.
namespace
,
project
,
environment
),
stop_url:
(
stop_namespace_project_environment_path
(
project
.
namespace
,
project
,
environment
)
if
environment
.
stoppable?
)
,
stop_url:
stop_url
,
external_url:
environment
.
external_url
,
external_url_formatted:
environment
.
formatted_external_url
,
deployed_at:
deployment
.
try
(
:created_at
),
...
...
app/views/projects/environments/index.html.haml
View file @
829a708a
...
...
@@ -23,7 +23,7 @@
New environment
.environments-container
-
if
@environments
.
blank?
-
if
@
all_
environments
.
blank?
.blank-state.blank-state-no-icon
%h2
.blank-state-title
You don't have any environments right now.
...
...
app/views/projects/environments/show.html.haml
View file @
829a708a
...
...
@@ -3,7 +3,7 @@
=
render
"projects/pipelines/head"
%div
{
class:
container_class
}
.top-area
.top-area
.adjust
.col-md-9
%h3
.page-title
=
@environment
.
name
.
capitalize
.col-md-3
...
...
spec/features/merge_requests/widget_deployments_spec.rb
View file @
829a708a
...
...
@@ -9,9 +9,8 @@ feature 'Widget Deployments Header', feature: true, js: true do
given
(
:merge_request
)
{
create
(
:merge_request
,
:merged
)
}
given
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
given
(
:role
)
{
:developer
}
given!
(
:deployment
)
do
create
(
:deployment
,
environment:
environment
,
sha:
project
.
commit
(
'master'
).
id
)
end
given
(
:sha
)
{
project
.
commit
(
'master'
).
id
}
given!
(
:deployment
)
{
create
(
:deployment
,
environment:
environment
,
sha:
sha
)
}
given!
(
:manual
)
{
}
background
do
...
...
@@ -31,7 +30,10 @@ feature 'Widget Deployments Header', feature: true, js: true do
given
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
given
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
)
}
given
(
:manual
)
{
create
(
:ci_build
,
:manual
,
pipeline:
pipeline
,
name:
'close_app'
)
}
given
(
:deployment
)
{
create
(
:deployment
,
environment:
environment
,
deployable:
build
,
on_stop:
'close_app'
)
}
given
(
:deployment
)
do
create
(
:deployment
,
environment:
environment
,
ref:
merge_request
.
target_branch
,
sha:
sha
,
deployable:
build
,
on_stop:
'close_app'
)
end
background
do
wait_for_ajax
...
...
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