mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-01-13 18:44:14 +08:00
parent
cfe9e94e16
commit
6296aa04c6
15 changed files with 20 additions and 3 deletions
|
|
@ -173,7 +173,7 @@ func (u *CronjobRepo) AddFailedRecord(cronjobID uint, message string) {
|
|||
var record model.JobRecords
|
||||
record.StartTime = time.Now()
|
||||
record.CronjobID = cronjobID
|
||||
record.Status = constant.StatusFailed
|
||||
record.Status = constant.StatusUnexecuted
|
||||
record.Message = message
|
||||
if err := global.DB.Create(&record).Error; err != nil {
|
||||
global.LOG.Errorf("create record status failed, err: %v", err)
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ const (
|
|||
StatusInstallErr = "InstallErr"
|
||||
StatusUninstalling = "Uninstalling"
|
||||
StatusWaitingRestart = "WaitingRestart"
|
||||
StatusUnexecuted = "Unexecuted"
|
||||
|
||||
OrderDesc = "descending"
|
||||
OrderAsc = "ascending"
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ const getType = (status: string) => {
|
|||
case 'conflict':
|
||||
return 'warning';
|
||||
case 'duplicate':
|
||||
case 'unexecuted':
|
||||
return 'info';
|
||||
default:
|
||||
return 'primary';
|
||||
|
|
|
|||
|
|
@ -344,6 +344,7 @@ const message = {
|
|||
new: 'New',
|
||||
conflict: 'Conflict',
|
||||
duplicate: 'Duplicate',
|
||||
unexecuted: 'Unexecuted',
|
||||
},
|
||||
units: {
|
||||
second: ' second | second | seconds',
|
||||
|
|
|
|||
|
|
@ -351,6 +351,7 @@ const message = {
|
|||
new: 'Nuevo',
|
||||
conflict: 'Conflicto',
|
||||
duplicate: 'Duplicado',
|
||||
unexecuted: 'No Ejecutado',
|
||||
},
|
||||
units: {
|
||||
second: ' segundo | segundo | segundos',
|
||||
|
|
|
|||
|
|
@ -333,6 +333,7 @@ const message = {
|
|||
new: '新規',
|
||||
conflict: '競合',
|
||||
duplicate: '重複',
|
||||
unexecuted: '未実行',
|
||||
},
|
||||
units: {
|
||||
second: '2番目|2番目|秒',
|
||||
|
|
|
|||
|
|
@ -335,6 +335,7 @@ const message = {
|
|||
new: '신규',
|
||||
conflict: '충돌',
|
||||
duplicate: '중복',
|
||||
unexecuted: '실행되지 않음',
|
||||
},
|
||||
units: {
|
||||
second: '초 | 초 | 초',
|
||||
|
|
|
|||
|
|
@ -341,6 +341,7 @@ const message = {
|
|||
new: 'Baru',
|
||||
conflict: 'Konflik',
|
||||
duplicate: 'Pendua',
|
||||
unexecuted: 'Tidak Dilaksanakan',
|
||||
},
|
||||
units: {
|
||||
second: 'saat | saat | saat',
|
||||
|
|
|
|||
|
|
@ -339,6 +339,7 @@ const message = {
|
|||
new: 'Novo',
|
||||
conflict: 'Conflito',
|
||||
duplicate: 'Duplicado',
|
||||
unexecuted: 'Não Executado',
|
||||
},
|
||||
units: {
|
||||
second: 'segundo | segundos | segundos',
|
||||
|
|
|
|||
|
|
@ -336,6 +336,7 @@ const message = {
|
|||
new: 'Новый',
|
||||
conflict: 'Конфликт',
|
||||
duplicate: 'Дубликат',
|
||||
unexecuted: 'Не Выполнено',
|
||||
},
|
||||
units: {
|
||||
second: ' секунда | секунда | секунд',
|
||||
|
|
|
|||
|
|
@ -348,6 +348,7 @@ const message = {
|
|||
new: 'Yeni',
|
||||
conflict: 'Çakışma',
|
||||
duplicate: 'Yinelenen',
|
||||
unexecuted: 'Yürütülmedi',
|
||||
},
|
||||
units: {
|
||||
second: ' saniye | saniye | saniye',
|
||||
|
|
|
|||
|
|
@ -332,6 +332,7 @@ const message = {
|
|||
new: '新',
|
||||
conflict: '衝突',
|
||||
duplicate: '重複',
|
||||
unexecuted: '未執行',
|
||||
},
|
||||
units: {
|
||||
second: '秒',
|
||||
|
|
|
|||
|
|
@ -332,6 +332,7 @@ const message = {
|
|||
new: '新',
|
||||
conflict: '冲突',
|
||||
duplicate: '重复',
|
||||
unexecuted: '未执行',
|
||||
},
|
||||
units: {
|
||||
second: '秒',
|
||||
|
|
|
|||
|
|
@ -141,6 +141,7 @@
|
|||
<el-button v-if="row.lastRecordStatus === 'Success'" icon="Select" link type="success" />
|
||||
<el-button v-if="row.lastRecordStatus === 'Failed'" icon="CloseBold" link type="danger" />
|
||||
<el-button v-if="row.lastRecordStatus === 'Waiting'" :loading="true" link type="info" />
|
||||
<el-button v-if="row.lastRecordStatus === 'Unexecuted'" icon="Minus" link type="info" />
|
||||
{{ row.lastRecordTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@
|
|||
<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.unexecuted')" value="Unexecuted" />
|
||||
<el-option :label="$t('commons.status.failed')" value="Failed" />
|
||||
</el-select>
|
||||
<TableRefresh @search="search(false)" />
|
||||
|
|
@ -100,7 +101,7 @@
|
|||
<el-table-column min-width="230px">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.id === currentRecord.id" class="select-sign"></span>
|
||||
<Status class="mr-2 ml-1 float-left" :status="row.status" />
|
||||
<Status class="mr-2 ml-1 float-left w-20" :status="row.status" />
|
||||
<div class="mt-0.5">
|
||||
<span>
|
||||
{{ row.startTime }}
|
||||
|
|
@ -182,7 +183,10 @@
|
|||
<el-button
|
||||
class="mt-0.5"
|
||||
type="danger"
|
||||
v-if="currentRecord?.status === 'Failed'"
|
||||
v-if="
|
||||
currentRecord?.status === 'Failed' ||
|
||||
currentRecord?.status === 'Unexecuted'
|
||||
"
|
||||
icon="Warning"
|
||||
link
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue