mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 16:29:17 +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 {
|
if cronjob.ID == 0 {
|
||||||
return constant.ErrRecordNotFound
|
return constant.ErrRecordNotFound
|
||||||
}
|
}
|
||||||
|
u.HandleJob(&cronjob)
|
||||||
record := cronjobRepo.StartRecords(cronjob.ID, "")
|
|
||||||
record.FromLocal = cronjob.KeepLocal
|
|
||||||
go u.HandleJob(&cronjob)
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,6 +164,7 @@ export default {
|
|||||||
status: {
|
status: {
|
||||||
running: 'Running',
|
running: 'Running',
|
||||||
stopped: 'Stopped',
|
stopped: 'Stopped',
|
||||||
|
waiting: 'Waiting',
|
||||||
success: 'Success',
|
success: 'Success',
|
||||||
failed: 'Failed',
|
failed: 'Failed',
|
||||||
error: 'Error',
|
error: 'Error',
|
||||||
|
@ -170,6 +170,7 @@ export default {
|
|||||||
status: {
|
status: {
|
||||||
running: '已启动',
|
running: '已启动',
|
||||||
success: '成功',
|
success: '成功',
|
||||||
|
waiting: '执行中',
|
||||||
failed: '失败',
|
failed: '失败',
|
||||||
stopped: '已停止',
|
stopped: '已停止',
|
||||||
error: '失败',
|
error: '失败',
|
||||||
|
@ -94,6 +94,7 @@
|
|||||||
<template #prefix>{{ $t('commons.table.status') }}</template>
|
<template #prefix>{{ $t('commons.table.status') }}</template>
|
||||||
<el-option :label="$t('commons.table.all')" value="" />
|
<el-option :label="$t('commons.table.all')" value="" />
|
||||||
<el-option :label="$t('commons.status.success')" value="Success" />
|
<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-option :label="$t('commons.status.failed')" value="Failed" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -111,6 +112,7 @@
|
|||||||
class="infinite-list-item"
|
class="infinite-list-item"
|
||||||
>
|
>
|
||||||
<el-icon v-if="item.status === 'Success'"><Select /></el-icon>
|
<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>
|
<el-icon v-if="item.status === 'Failed'"><CloseBold /></el-icon>
|
||||||
<span v-if="index === currentRecordIndex" style="color: red">
|
<span v-if="index === currentRecordIndex" style="color: red">
|
||||||
{{ dateFormat(0, 0, item.startTime) }}
|
{{ dateFormat(0, 0, item.startTime) }}
|
||||||
@ -242,9 +244,12 @@
|
|||||||
>
|
>
|
||||||
<el-tag type="danger">{{ $t('commons.table.statusFailed') }}</el-tag>
|
<el-tag type="danger">{{ $t('commons.table.statusFailed') }}</el-tag>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tag type="success" v-else>
|
<el-tag type="success" v-if="currentRecord?.status === 'Success'">
|
||||||
{{ $t('commons.table.statusSuccess') }}
|
{{ $t('commons.table.statusSuccess') }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
|
<el-tag type="info" v-if="currentRecord?.status === 'Waiting'">
|
||||||
|
{{ $t('commons.table.statusWaiting') }}
|
||||||
|
</el-tag>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user