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
2bc956cf
Commit
2bc956cf
authored
Feb 02, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed merge request environment not displaying
Closes
https://gitlab.com/gitlab-org/gitlab-ce/issues/27080
parent
70a17615
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
3 deletions
+29
-3
app/assets/javascripts/merge_request_widget.js.es6
app/assets/javascripts/merge_request_widget.js.es6
+2
-3
changelogs/unreleased-ee/merge-request-enrvironments-link.yml
...gelogs/unreleased-ee/merge-request-enrvironments-link.yml
+4
-0
spec/features/merge_requests/environments_link_spec.rb
spec/features/merge_requests/environments_link_spec.rb
+23
-0
No files found.
app/assets/javascripts/merge_request_widget.js.es6
View file @
2bc956cf
...
@@ -41,7 +41,6 @@
...
@@ -41,7 +41,6 @@
// ci_status_url - String, URL to use to check CI status
// ci_status_url - String, URL to use to check CI status
//
//
this.opts = opts;
this.opts = opts;
this.$widgetBody = $('.mr-widget-body');
$('#modal_merge_info').modal({
$('#modal_merge_info').modal({
show: false
show: false
});
});
...
@@ -106,7 +105,7 @@
...
@@ -106,7 +105,7 @@
urlSuffix = deleteSourceBranch ? '?deleted_source_branch=true' : '';
urlSuffix = deleteSourceBranch ? '?deleted_source_branch=true' : '';
return window.location.href = window.location.pathname + urlSuffix;
return window.location.href = window.location.pathname + urlSuffix;
} else if (data.merge_error) {
} else if (data.merge_error) {
return
_this.$widgetBody
.html("<h4>" + data.merge_error + "</h4>");
return
$('.mr-widget-body')
.html("<h4>" + data.merge_error + "</h4>");
} else {
} else {
callback = function() {
callback = function() {
return merge_request_widget.mergeInProgress(deleteSourceBranch);
return merge_request_widget.mergeInProgress(deleteSourceBranch);
...
@@ -226,7 +225,7 @@
...
@@ -226,7 +225,7 @@
environment.ci_success_icon = this.$ciSuccessIcon;
environment.ci_success_icon = this.$ciSuccessIcon;
const templateString = _.unescape($template[0].outerHTML);
const templateString = _.unescape($template[0].outerHTML);
const template = _.template(templateString)(environment);
const template = _.template(templateString)(environment);
this.$widgetBody
.before(template);
$('.mr-widget-body')
.before(template);
}
}
};
};
...
...
changelogs/unreleased-ee/merge-request-enrvironments-link.yml
0 → 100644
View file @
2bc956cf
---
title
:
Fixed merge request environment link not displaying
merge_request
:
author
:
spec/features/merge_requests/environments_link_spec.rb
0 → 100644
View file @
2bc956cf
require
'spec_helper'
feature
'Merge request environments'
,
:feature
,
:js
do
include
WaitForAjax
it
'shows environments link'
do
project
=
create
(
:project
)
merge_request
=
create
(
:merge_request
,
source_project:
project
)
environment
=
create
(
:environment
,
project:
project
)
create
(
:deployment
,
environment:
environment
,
ref:
'feature'
,
sha:
merge_request
.
diff_head_sha
)
login_as
:admin
visit
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request
)
wait_for_ajax
page
.
within
(
'.mr-widget-heading'
)
do
expect
(
page
).
to
have_content
(
"Deployed to
#{
environment
.
name
}
"
)
expect
(
find
(
'.js-environment-link'
)[
:href
]).
to
include
(
environment
.
formatted_external_url
)
end
end
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