Commit fc1bbeff authored by jakeburden's avatar jakeburden

Replace mountedToShow with onSingleEnvironmentPage

parent ebe5d683
...@@ -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