Loading openflexure_microscope/api/static/src/components/genericComponents/taskSubmitter.vue +31 −38 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ class="uk-button uk-button-danger uk-margin-remove uk-float-right uk-width-1-1" @click="terminateTask()" > Terminate Cancel </button> </div> Loading Loading @@ -193,9 +193,7 @@ export default { var checkCondition = (resolve, reject) => { // If the condition is met, we're done! axios .get(this.taskUrl) .then(response => { axios.get(this.taskUrl).then(response => { console.log(response.data.status); var result = response.data.status; // If the task ends with success Loading @@ -211,8 +209,7 @@ export default { else if (result == "cancelled") { // Pass a generic termination error back with reject reject(new Error("Task cancelled")); } else { } else { // Since the task is still running, we can update the progress bar this.progress = response.data.progress; // Check again after timeout Loading @@ -227,18 +224,14 @@ export default { pollProgress: function() { console.log("Starting progress polling"); axios .get(this.taskUrl) .then(response => { axios.get(this.taskUrl).then(response => { console.log("PROGRESS RESPONSE: ", response.data.progress); this.progress = response.data.progress; }); }, terminateTask: function() { axios .delete(this.taskUrl) .then(response => { axios.delete(this.taskUrl).then(response => { console.log("TERMINATION RESPONSE: ", response.data); }); } Loading Loading
openflexure_microscope/api/static/src/components/genericComponents/taskSubmitter.vue +31 −38 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ class="uk-button uk-button-danger uk-margin-remove uk-float-right uk-width-1-1" @click="terminateTask()" > Terminate Cancel </button> </div> Loading Loading @@ -193,9 +193,7 @@ export default { var checkCondition = (resolve, reject) => { // If the condition is met, we're done! axios .get(this.taskUrl) .then(response => { axios.get(this.taskUrl).then(response => { console.log(response.data.status); var result = response.data.status; // If the task ends with success Loading @@ -211,8 +209,7 @@ export default { else if (result == "cancelled") { // Pass a generic termination error back with reject reject(new Error("Task cancelled")); } else { } else { // Since the task is still running, we can update the progress bar this.progress = response.data.progress; // Check again after timeout Loading @@ -227,18 +224,14 @@ export default { pollProgress: function() { console.log("Starting progress polling"); axios .get(this.taskUrl) .then(response => { axios.get(this.taskUrl).then(response => { console.log("PROGRESS RESPONSE: ", response.data.progress); this.progress = response.data.progress; }); }, terminateTask: function() { axios .delete(this.taskUrl) .then(response => { axios.delete(this.taskUrl).then(response => { console.log("TERMINATION RESPONSE: ", response.data); }); } Loading