feat: 增加启动日志

This commit is contained in:
zhengkunwang223 2023-03-01 18:17:31 +08:00 committed by ssongliu
parent f7bd16076e
commit 701da484c6
4 changed files with 9 additions and 5 deletions

View File

@ -162,10 +162,7 @@ func (u *CronjobService) HandleOnce(id uint) error {
if cronjob.ID == 0 {
return constant.ErrRecordNotFound
}
record := cronjobRepo.StartRecords(cronjob.ID, "")
record.FromLocal = cronjob.KeepLocal
go u.HandleJob(&cronjob)
u.HandleJob(&cronjob)
return nil
}

View File

@ -164,6 +164,7 @@ export default {
status: {
running: 'Running',
stopped: 'Stopped',
waiting: 'Waiting',
success: 'Success',
failed: 'Failed',
error: 'Error',

View File

@ -170,6 +170,7 @@ export default {
status: {
running: '已启动',
success: '成功',
waiting: '执行中',
failed: '失败',
stopped: '已停止',
error: '失败',

View File

@ -94,6 +94,7 @@
<template #prefix>{{ $t('commons.table.status') }}</template>
<el-option :label="$t('commons.table.all')" value="" />
<el-option :label="$t('commons.status.success')" value="Success" />
<el-option :label="$t('commons.status.waiting')" value="Waiting" />
<el-option :label="$t('commons.status.failed')" value="Failed" />
</el-select>
</el-col>
@ -111,6 +112,7 @@
class="infinite-list-item"
>
<el-icon v-if="item.status === 'Success'"><Select /></el-icon>
<el-icon v-if="item.status === 'Waiting'"><Loading /></el-icon>
<el-icon v-if="item.status === 'Failed'"><CloseBold /></el-icon>
<span v-if="index === currentRecordIndex" style="color: red">
{{ dateFormat(0, 0, item.startTime) }}
@ -242,9 +244,12 @@
>
<el-tag type="danger">{{ $t('commons.table.statusFailed') }}</el-tag>
</el-tooltip>
<el-tag type="success" v-else>
<el-tag type="success" v-if="currentRecord?.status === 'Success'">
{{ $t('commons.table.statusSuccess') }}
</el-tag>
<el-tag type="info" v-if="currentRecord?.status === 'Waiting'">
{{ $t('commons.table.statusWaiting') }}
</el-tag>
</el-form-item>
</el-col>
</el-row>