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 {
deleteEnvironment(environment) {
const endpoint = environment.delete_path;
const mountedToShow = environment.mounted_to_show;
const { onSingleEnvironmentPage } = environment;
const errorMessage = s__(
'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 {
this.service
.deleteAction(endpoint)
.then(() => {
if (!mountedToShow) {
if (!onSingleEnvironmentPage) {
// Reload as a first solution to bust the ETag cache
window.location.reload();
return;
......
......@@ -15,7 +15,7 @@ export default () => {
data() {
const environment = JSON.parse(JSON.stringify(container.dataset));
environment.delete_path = environment.deletePath;
environment.mounted_to_show = true;
environment.onSingleEnvironmentPage = true;
return {
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