Commit a5989900 authored by Filipa Lacerda's avatar Filipa Lacerda

Remove service being provided as a prop on environments table

parent 2d6f1e96
<script>
/* eslint-disable no-new */
/* global Flash */
import EnvironmentsService from '../services/environments_service';
import EnvironmentTable from './environments_table.vue';
......@@ -123,6 +121,7 @@ export default {
})
.catch(() => {
this.isLoading = false;
// eslint-disable-next-line no-new
new Flash('An error occurred while fetching the environments.');
});
},
......@@ -138,19 +137,15 @@ export default {
})
.catch(() => {
this.isLoadingFolderContent = false;
// eslint-disable-next-line no-new
new Flash('An error occurred while fetching the environments.');
});
},
postAction(endpoint) {
this.service.postAction(endpoint)
.then(() => {
this.fetchEnvironments();
})
.catch(() => {
// eslint-disable-next-line no-new
new Flash('An error occured while making the request.');
});
.then(() => this.fetchEnvironments())
.catch(() => new Flash('An error occured while making the request.'));
},
},
};
......
<script>
/* eslint-disable no-new */
/* global Flash */
import EnvironmentsService from '../services/environments_service';
import EnvironmentTable from '../components/environments_table.vue';
......@@ -99,6 +98,7 @@ export default {
})
.catch(() => {
this.isLoading = false;
// eslint-disable-next-line no-new
new Flash('An error occurred while fetching the environments.', 'alert');
});
},
......@@ -169,7 +169,7 @@ export default {
:environments="state.environments"
:can-create-deployment="canCreateDeploymentParsed"
:can-read-environment="canReadEnvironmentParsed"
:service="service"/>
/>
<table-pagination
v-if="state.paginationInformation && state.paginationInformation.totalPages > 1"
......
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