mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
updated stats
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
<el-input v-model="spiderForm.col" :placeholder="$t('Results Collection')"
|
||||
:disabled="isView"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('Site')">
|
||||
<el-form-item v-if="false" :label="$t('Site')">
|
||||
<el-autocomplete v-model="spiderForm.site"
|
||||
:placeholder="$t('Site')"
|
||||
:fetch-suggestions="fetchSiteSuggestions"
|
||||
|
||||
@@ -78,7 +78,7 @@ export default {
|
||||
this.$refs['spider-stats'].update()
|
||||
}, 0)
|
||||
}
|
||||
this.$st.sendEv('爬虫详情', '切换标签', 'tabName', tab.name)
|
||||
this.$st.sendEv('爬虫详情', '切换标签', tab.name)
|
||||
},
|
||||
onSpiderChange (id) {
|
||||
this.$router.push(`/spiders/${id}`)
|
||||
|
||||
@@ -83,7 +83,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
onTabClick (tab) {
|
||||
this.$st.sendEv('任务详情', '切换标签', 'tabName', tab.name)
|
||||
this.$st.sendEv('任务详情', '切换标签', tab.name)
|
||||
},
|
||||
onSpiderChange (id) {
|
||||
this.$router.push(`/spiders/${id}`)
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
<el-table :data="filteredTableData"
|
||||
class="table"
|
||||
:header-cell-style="{background:'rgb(48, 65, 86)',color:'white'}"
|
||||
border>
|
||||
border
|
||||
@row-click="onRowClick"
|
||||
>
|
||||
<template v-for="col in columns">
|
||||
<el-table-column v-if="col.name === 'spider_name'"
|
||||
:key="col.name"
|
||||
@@ -295,6 +297,11 @@ export default {
|
||||
getTotalDuration (row) {
|
||||
if (row.finish_ts.match('^0001')) return 'NA'
|
||||
return dayjs(row.finish_ts).diff(row.create_ts, 'second')
|
||||
},
|
||||
onRowClick (row, event, column) {
|
||||
if (column.label !== this.$t('Action')) {
|
||||
this.onView(row)
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@@ -362,3 +369,9 @@ export default {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
.el-table >>> tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user