Commit a6d90fcc authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'environemnts-mixin-js-var-rename' into 'master'

Change variable 'mountedToShow' to more descriptive 'onSingleEnvironmentPage'

See merge request gitlab-org/gitlab!28487
parents 9a2cbf0a fc1bbeff
...@@ -145,7 +145,7 @@ export default { ...@@ -145,7 +145,7 @@ export default {
deleteEnvironment(environment) { deleteEnvironment(environment) {
const endpoint = environment.delete_path; const endpoint = environment.delete_path;
const mountedToShow = environment.mounted_to_show; const { onSingleEnvironmentPage } = environment;
const errorMessage = s__( const errorMessage = s__(
'Environments|An error occurred while deleting the environment. Check if the environment stopped; if not, stop it and try again.', 'Environments|An error occurred while deleting the environment. Check if the environment stopped; if not, stop it and try again.',
); );
...@@ -153,7 +153,7 @@ export default { ...@@ -153,7 +153,7 @@ export default {
this.service this.service
.deleteAction(endpoint) .deleteAction(endpoint)
.then(() => { .then(() => {
if (!mountedToShow) { if (!onSingleEnvironmentPage) {
// Reload as a first solution to bust the ETag cache // Reload as a first solution to bust the ETag cache
window.location.reload(); window.location.reload();
return; return;
......
...@@ -15,7 +15,7 @@ export default () => { ...@@ -15,7 +15,7 @@ export default () => {
data() { data() {
const environment = JSON.parse(JSON.stringify(container.dataset)); const environment = JSON.parse(JSON.stringify(container.dataset));
environment.delete_path = environment.deletePath; environment.delete_path = environment.deletePath;
environment.mounted_to_show = true; environment.onSingleEnvironmentPage = true;
return { return {
environment, environment,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment