mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
feature 调度任务可以暂停/运行
feature 任务列表可以批量删除
This commit is contained in:
@@ -214,6 +214,9 @@ export default {
|
||||
'Add Schedule': '添加定时任务',
|
||||
'stop': '暂停',
|
||||
'running': '运行',
|
||||
'error': '错误',
|
||||
'Not Found Node': '节点配置错误',
|
||||
'Not Found Spider': '爬虫配置错误',
|
||||
|
||||
// 网站
|
||||
'Site': '网站',
|
||||
|
||||
@@ -110,7 +110,14 @@
|
||||
:align="col.align"
|
||||
:width="col.width">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row[col.name] ? $t(scope.row[col.name]) : $t('NA') }}
|
||||
<el-tooltip v-if="scope.row[col.name] === 'error'" :content="$t(scope.row['message'])" placement="top">
|
||||
<el-tag class="status-tag" type="danger">
|
||||
{{scope.row[col.name] ? $t(scope.row[col.name]) : $t('NA')}}
|
||||
</el-tag>
|
||||
</el-tooltip>
|
||||
<el-tag class="status-tag" v-else>
|
||||
{{scope.row[col.name] ? $t(scope.row[col.name]) : $t('NA')}}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-else :key="col.name"
|
||||
@@ -289,24 +296,6 @@ export default {
|
||||
})
|
||||
}).catch(() => {})
|
||||
}
|
||||
},
|
||||
onCrontabFill (value) {
|
||||
value = value.replace(/[?]/g, '*')
|
||||
this.$set(this.scheduleForm, 'cron', value)
|
||||
|
||||
this.$st.sendEv('定时任务', '提交生成Cron', 'cron', this.scheduleForm.cron)
|
||||
},
|
||||
onShowCronDialog () {
|
||||
this.showCron = true
|
||||
if (this.expression.split(' ').length < 7) {
|
||||
// this.expression = (this.scheduleForm.cron + ' ').replace(/[?]/g, '*')
|
||||
this.expression = this.scheduleForm.cron + ' '
|
||||
} else {
|
||||
// this.expression = this.scheduleForm.cron.replace(/[?]/g, '*')
|
||||
this.expression = this.scheduleForm.cron
|
||||
}
|
||||
|
||||
this.$st.sendEv('定时任务', '点击生成Cron', 'cron', this.scheduleForm.cron)
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@@ -343,4 +332,7 @@ export default {
|
||||
min-height: 360px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.status-tag {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -229,6 +229,7 @@ export default {
|
||||
type: 'error',
|
||||
message: '请选择要删除的任务'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$confirm('确定删除任务', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
|
||||
Reference in New Issue
Block a user