Execute perftest list auto update only when target test exists
}
updatePerftestStatus() {
+ const ids = this.autoUpdateTargets.map(test => test.id).join(',');
+ if (ids) {
this.$http.get('/perftest/api/status', {
params: {
- ids: this.autoUpdateTargets.map(test => test.id).join(','),
+ ids,
},
}).then(res => {
const status = res.data.status.reverse();
$ball.attr('data-original-title', status[index].name);
$ball.data('popover').options.content = status[index].message;
});
+ })
+ .catch(error => console.error(error))
+ .finally(() => this.updateStatusTimeoutId = setTimeout(this.updatePerftestStatus, 2000));
+ } else {
this.updateStatusTimeoutId = setTimeout(this.updatePerftestStatus, 2000);
- }).catch(error => console.error(error));
+ }
}
}
</script>
