Remove service being provided as a prop on environments table
This commit is contained in:
parent
2d6f1e9600
commit
a5989900c9
2 changed files with 6 additions and 11 deletions
|
@ -1,6 +1,4 @@
|
|||
<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.'));
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<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"
|
||||
|
|
Loading…
Reference in a new issue