Skip to content

Commit

Permalink
Update rule based collection builder for pre-built outputs.
Browse files Browse the repository at this point in the history
As soon the initial fetch request is complete there should be collections and datasets in the history so do a refresh of the history so Galaxy polls on those items. When jobs fail - you will now see red collections/datasets. Also fixes a bug where the modal polling wouldn't actually display an error message when the fetch job fails.
  • Loading branch information
jmchilton committed Mar 1, 2018
1 parent ca4f6d2 commit 99a93f7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion client/galaxy/scripts/components/RuleCollectionBuilder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1770,6 +1770,12 @@ export default {
removeMapping(index) {
this.mapping.splice(index, 1);
},
refreshAndWait(response) {
if (Galaxy && Galaxy.currHistoryPanel) {
Galaxy.currHistoryPanel.refreshContents();
}
this.waitOnJob(response);
},
waitOnJob(response) {
const jobId = response.data.jobs[0].id;
const handleJobShow = (jobResponse) => {
Expand All @@ -1778,6 +1784,7 @@ export default {
if (JobStatesModel.NON_TERMINAL_STATES.indexOf(state) !== -1) {
setTimeout(doJobCheck, 1000);
} else if (JobStatesModel.ERROR_STATES.indexOf(state) !== -1) {
this.state = 'error';
this.errorMessage = "Unknown error encountered while running your upload job, this could be a server issue or a problem with the upload definition.";
} else {
const history = parent.Galaxy && parent.Galaxy.currHistoryPanel && parent.Galaxy.currHistoryPanel.model;
Expand Down Expand Up @@ -1862,7 +1869,7 @@ export default {
"history_id": historyId,
"targets": targets,
})
.then(this.waitOnJob)
.then(this.refreshAndWait)
.catch(this.renderFetchError);
}
},
Expand Down

0 comments on commit 99a93f7

Please sign in to comment.