Remove unused taskId data
taskSubmitter's "taskId" data member was usually incorrect and wasn't necessary - it is removed.
This commit is contained in:
parent
d615522712
commit
9a3e870d21
1 changed files with 4 additions and 7 deletions
|
|
@ -168,7 +168,6 @@ export default {
|
||||||
|
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
taskId: null,
|
|
||||||
taskUrl: null,
|
taskUrl: null,
|
||||||
progress: null,
|
progress: null,
|
||||||
taskStarted: false,
|
taskStarted: false,
|
||||||
|
|
@ -233,7 +232,7 @@ export default {
|
||||||
for (const task of response.data) {
|
for (const task of response.data) {
|
||||||
if (task.status == "pending" || task.status == "running") {
|
if (task.status == "pending" || task.status == "running") {
|
||||||
this.taskStarted = true;
|
this.taskStarted = true;
|
||||||
this.$emit("taskStarted", this.taskId);
|
this.$emit("taskStarted");
|
||||||
this.startPolling(
|
this.startPolling(
|
||||||
task.id,
|
task.id,
|
||||||
task.links.find(t => t.rel == self).href
|
task.links.find(t => t.rel == self).href
|
||||||
|
|
@ -264,7 +263,7 @@ export default {
|
||||||
// Send a request to start a task
|
// Send a request to start a task
|
||||||
|
|
||||||
this.taskStarted = true;
|
this.taskStarted = true;
|
||||||
this.$emit("taskStarted", this.taskId);
|
this.$emit("taskStarted");
|
||||||
try {
|
try {
|
||||||
let response = await axios.post(this.submitUrl, this.submitData);
|
let response = await axios.post(this.submitUrl, this.submitData);
|
||||||
if (this.modalProgress) {
|
if (this.modalProgress) {
|
||||||
|
|
@ -289,7 +288,6 @@ export default {
|
||||||
// Reset taskRunning and taskId
|
// Reset taskRunning and taskId
|
||||||
this.taskRunning = false;
|
this.taskRunning = false;
|
||||||
this.taskStarted = false;
|
this.taskStarted = false;
|
||||||
this.taskId = null;
|
|
||||||
// Update the form data if we're self-updating
|
// Update the form data if we're self-updating
|
||||||
if (this.selfUpdate) {
|
if (this.selfUpdate) {
|
||||||
this.getFormData();
|
this.getFormData();
|
||||||
|
|
@ -300,12 +298,11 @@ export default {
|
||||||
startPolling: function(taskId, taskUrl) {
|
startPolling: function(taskId, taskUrl) {
|
||||||
if (this.taskRunning != true) {
|
if (this.taskRunning != true) {
|
||||||
// Starts polling an existing Action task
|
// Starts polling an existing Action task
|
||||||
this.taskId = taskId;
|
|
||||||
this.taskUrl = taskUrl;
|
this.taskUrl = taskUrl;
|
||||||
// Start the store polling TaskId for success
|
// Start the store polling TaskId for success
|
||||||
this.taskRunning = true;
|
this.taskRunning = true;
|
||||||
this.$emit("taskRunning", this.taskId);
|
this.$emit("taskRunning", taskId);
|
||||||
return this.pollTask(this.taskId, this.pollInterval);
|
return this.pollTask(taskId, this.pollInterval);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue