Redirects importers page to processes page when runnning. Fixes undefined funtion in importer edition fom.

This commit is contained in:
Mateus Machado Luna 2018-08-02 09:38:33 -03:00
parent 9537bd6a38
commit 1adb6b0c71
2 changed files with 3 additions and 14 deletions

View File

@ -161,7 +161,6 @@ export default {
importerFile: null,
importerSourceInfo: null,
collections: [],
collectionMetadata: [],
collectionId: undefined,
url: '',
backgroundProcess: undefined
@ -317,6 +316,7 @@ export default {
this.runImporter(this.sessionId)
.then(backgroundProcess => {
this.backgroundProcess = backgroundProcess;
this.$router.push(this.$routerHelper.getProcessesPage());
})
.catch((errors) => {
this.$console.log(errors);
@ -340,19 +340,7 @@ export default {
},
onSelectCollection(collectionId) {
this.collectionId = collectionId;
this.mappedCollection['id'] = collectionId;
// Generates options for metadata listing
this.isFetchingCollectionMetadata = true;
this.fetchMetadata({collectionId: this.collectionId, isRepositoryLevel: false, isContextEdit: false })
.then((metadata) => {
this.collectionMetadata = JSON.parse(JSON.stringify(metadata));
this.isFetchingCollectionMetadata = false;
})
.catch((error) => {
this.$console.error(error);
this.isFetchingCollectionMetadata = false;
});
this.mappedCollection['id'] = collectionId;
}
},
created() {

View File

@ -295,6 +295,7 @@ export default {
this.runImporter(this.sessionId)
.then(backgroundProcess => {
this.backgroundProcess = backgroundProcess;
this.$router.push(this.$routerHelper.getProcessesPage());
})
.catch((errors) => {
this.$console.log(errors);