diff --git a/webapp/src/components/genericComponents/taskSubmitter.vue b/webapp/src/components/genericComponents/taskSubmitter.vue
index 041e638c..d0efbdc4 100644
--- a/webapp/src/components/genericComponents/taskSubmitter.vue
+++ b/webapp/src/components/genericComponents/taskSubmitter.vue
@@ -41,6 +41,9 @@
{{ item.message }}
+
+ The task failed due to an error - use the button below to close this dialog.
+
@@ -62,6 +65,14 @@
>
Cancel
+
@@ -134,7 +145,8 @@ export default {
progress: null,
taskStarted: false,
taskRunning: false,
- log: []
+ log: [],
+ taskStatus: ""
};
},
@@ -242,7 +254,10 @@ export default {
if (this.selfUpdate) {
this.getFormData();
}
- UIkit.modal(this.$refs.statusModal).hide();
+ if (this.taskStatus != "error") {
+ // Leave the modal up if there was an error.
+ UIkit.modal(this.$refs.statusModal).hide();
+ }
}
},
@@ -267,6 +282,7 @@ export default {
.get(this.taskUrl, { baseURL: this.$store.getters.baseUri })
.then(response => {
var result = response.data.status;
+ this.taskStatus = result;
// If the task ends with success
if (result == "completed") {
resolve(response.data);
@@ -274,13 +290,13 @@ export default {
// If task ends with an error
else if (result == "error") {
// Pass the error string back with reject
-
+ if (!this.progress) this.progress = 1;
reject(new Error(response.data.output));
}
// If task ends with termination
else if (result == "cancelled") {
// Pass a generic termination error back with reject
-
+ if (!this.progress) this.progress = 100;
reject(new Error("Task cancelled"));
} else {
// Since the task is still running, we can update the progress bar
@@ -301,6 +317,10 @@ export default {
});
},
+ hideModal() {
+ UIkit.modal(this.$refs.statusModal).hide()
+ },
+
terminateTask: function() {
axios.delete(this.taskUrl);
}