updated frontend to adapt changes of golang version

This commit is contained in:
Marvin Zhang
2019-07-22 12:32:36 +08:00
parent 67c299e5d9
commit c6bd35bd02
11 changed files with 44 additions and 25 deletions

View File

@@ -104,9 +104,11 @@ export default {
this.$store.dispatch('task/getTaskLog', this.$route.params.id)
this.$store.dispatch('task/getTaskResults', this.$route.params.id)
this.handle = setInterval(() => {
this.$store.dispatch('task/getTaskLog', this.$route.params.id)
}, 5000)
if (['running'].includes(this.taskForm.status)) {
this.handle = setInterval(() => {
this.$store.dispatch('task/getTaskLog', this.$route.params.id)
}, 5000)
}
},
destroyed () {
clearInterval(this.handle)