mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-29 18:00:51 +01:00
fix #184
This commit is contained in:
@@ -86,15 +86,15 @@ export default {
|
|||||||
return dayjs(str).format('YYYY-MM-DD HH:mm:ss')
|
return dayjs(str).format('YYYY-MM-DD HH:mm:ss')
|
||||||
},
|
},
|
||||||
getWaitDuration (row) {
|
getWaitDuration (row) {
|
||||||
if (row.start_ts.match('^0001')) return 'NA'
|
if (!row.start_ts || row.start_ts.match('^0001')) return 'NA'
|
||||||
return dayjs(row.start_ts).diff(row.create_ts, 'second')
|
return dayjs(row.start_ts).diff(row.create_ts, 'second')
|
||||||
},
|
},
|
||||||
getRuntimeDuration (row) {
|
getRuntimeDuration (row) {
|
||||||
if (row.finish_ts.match('^0001')) return 'NA'
|
if (!row.finish_ts || row.finish_ts.match('^0001')) return 'NA'
|
||||||
return dayjs(row.finish_ts).diff(row.start_ts, 'second')
|
return dayjs(row.finish_ts).diff(row.start_ts, 'second')
|
||||||
},
|
},
|
||||||
getTotalDuration (row) {
|
getTotalDuration (row) {
|
||||||
if (row.finish_ts.match('^0001')) return 'NA'
|
if (!row.finish_ts || row.finish_ts.match('^0001')) return 'NA'
|
||||||
return dayjs(row.finish_ts).diff(row.create_ts, 'second')
|
return dayjs(row.finish_ts).diff(row.create_ts, 'second')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,12 +99,12 @@ export default {
|
|||||||
this.$st.sendEv('任务详情-结果', '下载CSV')
|
this.$st.sendEv('任务详情-结果', '下载CSV')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
async created () {
|
||||||
this.$store.dispatch('task/getTaskData', this.$route.params.id)
|
await this.$store.dispatch('task/getTaskData', this.$route.params.id)
|
||||||
this.$store.dispatch('task/getTaskLog', this.$route.params.id)
|
this.$store.dispatch('task/getTaskLog', this.$route.params.id)
|
||||||
this.$store.dispatch('task/getTaskResults', this.$route.params.id)
|
this.$store.dispatch('task/getTaskResults', this.$route.params.id)
|
||||||
|
|
||||||
if (['running'].includes(this.taskForm.status)) {
|
if (this.taskForm && ['running'].includes(this.taskForm.status)) {
|
||||||
this.handle = setInterval(() => {
|
this.handle = setInterval(() => {
|
||||||
this.$store.dispatch('task/getTaskLog', this.$route.params.id)
|
this.$store.dispatch('task/getTaskLog', this.$route.params.id)
|
||||||
}, 5000)
|
}, 5000)
|
||||||
|
|||||||
Reference in New Issue
Block a user