From 9a3e870d2161f4e87f17daf3ce804a902b8ce3b3 Mon Sep 17 00:00:00 2001 From: Richard Bowman Date: Mon, 8 Jan 2024 17:34:47 +0000 Subject: [PATCH] Remove unused taskId data taskSubmitter's "taskId" data member was usually incorrect and wasn't necessary - it is removed. --- .../components/genericComponents/taskSubmitter.vue | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/webapp/src/components/genericComponents/taskSubmitter.vue b/webapp/src/components/genericComponents/taskSubmitter.vue index f8b7cb67..8c011091 100644 --- a/webapp/src/components/genericComponents/taskSubmitter.vue +++ b/webapp/src/components/genericComponents/taskSubmitter.vue @@ -168,7 +168,6 @@ export default { data: function() { return { - taskId: null, taskUrl: null, progress: null, taskStarted: false, @@ -233,7 +232,7 @@ export default { for (const task of response.data) { if (task.status == "pending" || task.status == "running") { this.taskStarted = true; - this.$emit("taskStarted", this.taskId); + this.$emit("taskStarted"); this.startPolling( task.id, task.links.find(t => t.rel == self).href @@ -264,7 +263,7 @@ export default { // Send a request to start a task this.taskStarted = true; - this.$emit("taskStarted", this.taskId); + this.$emit("taskStarted"); try { let response = await axios.post(this.submitUrl, this.submitData); if (this.modalProgress) { @@ -289,7 +288,6 @@ export default { // Reset taskRunning and taskId this.taskRunning = false; this.taskStarted = false; - this.taskId = null; // Update the form data if we're self-updating if (this.selfUpdate) { this.getFormData(); @@ -300,12 +298,11 @@ export default { startPolling: function(taskId, taskUrl) { if (this.taskRunning != true) { // Starts polling an existing Action task - this.taskId = taskId; this.taskUrl = taskUrl; // Start the store polling TaskId for success this.taskRunning = true; - this.$emit("taskRunning", this.taskId); - return this.pollTask(this.taskId, this.pollInterval); + this.$emit("taskRunning", taskId); + return this.pollTask(taskId, this.pollInterval); } },