mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-28 21:39:06 +08:00
feat: 增加启动日志
This commit is contained in:
parent
f7bd16076e
commit
701da484c6
@ -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
|
||||
}
|
||||
|
||||
|
@ -164,6 +164,7 @@ export default {
|
||||
status: {
|
||||
running: 'Running',
|
||||
stopped: 'Stopped',
|
||||
waiting: 'Waiting',
|
||||
success: 'Success',
|
||||
failed: 'Failed',
|
||||
error: 'Error',
|
||||
|
@ -170,6 +170,7 @@ export default {
|
||||
status: {
|
||||
running: '已启动',
|
||||
success: '成功',
|
||||
waiting: '执行中',
|
||||
failed: '失败',
|
||||
stopped: '已停止',
|
||||
error: '失败',
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user