diff --git a/webapp/src/components/labThingsComponents/actionButton.vue b/webapp/src/components/labThingsComponents/actionButton.vue index 38ea5874..cf2ec1a5 100644 --- a/webapp/src/components/labThingsComponents/actionButton.vue +++ b/webapp/src/components/labThingsComponents/actionButton.vue @@ -236,19 +236,24 @@ export default { * */ async checkExistingTasks() { + console.log("Checking for existing tasks for action ", this.action); let response = await this.findOngoingActions(this.thing, this.action); // Exit if response is null, due to an error. if (response == null) return; // Check for a task that is ongoing. // We can't handle multiple tasks ongoing, so this picks the first. const ongoingTask = response.data.find((t) => ["pending", "running"].includes(t.status)); + console.log("Existing tasks: ", response.data, "Ongoing task: ", ongoingTask); if (ongoingTask) { // There is a started task + console.log("Found ongoing task, resuming polling: ", ongoingTask); this.taskStarted = true; this.$emit("taskStarted"); // Find its URL + console.log("Task links: ", ongoingTask.links); const taskUrl = ongoingTask.links.find((t) => t.rel == "self").href; this.startPollingTask(ongoingTask.id, taskUrl); + console.log("Resumed polling on existing task with URL: ", taskUrl); } }, @@ -324,6 +329,7 @@ export default { this.taskUrl = null; this.taskRunning = false; this.taskStarted = false; + console.log("Task ended with status: ", this.taskStatus); this.$emit("finished"); }, diff --git a/webapp/src/components/labThingsComponents/inputFromSchema.vue b/webapp/src/components/labThingsComponents/inputFromSchema.vue index ff4c9fef..f1e27afd 100644 --- a/webapp/src/components/labThingsComponents/inputFromSchema.vue +++ b/webapp/src/components/labThingsComponents/inputFromSchema.vue @@ -50,7 +50,7 @@