diff --git a/web/app/src/components/jobs/JobsTable.vue b/web/app/src/components/jobs/JobsTable.vue index 2c2299e9..166b2b56 100644 --- a/web/app/src/components/jobs/JobsTable.vue +++ b/web/app/src/components/jobs/JobsTable.vue @@ -150,19 +150,16 @@ export default { // updateData() will only overwrite properties that are actually set on // jobUpdate, and leave the rest as-is. if (this.tabulator.initialized) { - this.tabulator.updateData([jobUpdate]) - .then(this.sortData) - .then(() => { this.tabulator.redraw(); }) // Resize columns based on new data. - } - this._refreshAvailableStatuses(); - }, - processNewJob(jobUpdate) { - if (this.tabulator.initialized) { - this.tabulator.addData([jobUpdate]) - .then(this.sortData) - .then(() => { this.tabulator.redraw(); }) // Resize columns based on new data. - } + const row = this.tabulator.rowManager.findRow(jobUpdate.id); + let promise = null; + if (row) promise = this.tabulator.updateData([jobUpdate]); + else promise = this.tabulator.addData([jobUpdate]); + + promise + .then(this.sortData) + .then(() => { this.tabulator.redraw(); }) // Resize columns based on new data. + } this._refreshAvailableStatuses(); }, diff --git a/web/app/src/views/JobsView.vue b/web/app/src/views/JobsView.vue index a5b21675..f5eaf45b 100644 --- a/web/app/src/views/JobsView.vue +++ b/web/app/src/views/JobsView.vue @@ -146,10 +146,7 @@ export default { this.jobs.setIsJobless(false); if (this.$refs.jobsTable) { - if (jobUpdate.previous_status) - this.$refs.jobsTable.processJobUpdate(jobUpdate); - else - this.$refs.jobsTable.processNewJob(jobUpdate); + this.$refs.jobsTable.processJobUpdate(jobUpdate); } if (this.jobID != jobUpdate.id) return;