mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
parent
86bf7ea73a
commit
c8971dd0ef
@ -115,9 +115,10 @@ type CronjobInfo struct {
|
||||
DownloadAccountID uint `json:"downloadAccountID"`
|
||||
RetainCopies int `json:"retainCopies"`
|
||||
|
||||
LastRecordTime string `json:"lastRecordTime"`
|
||||
Status string `json:"status"`
|
||||
Secret string `json:"secret"`
|
||||
LastRecordStatus string `json:"lastRecordStatus"`
|
||||
LastRecordTime string `json:"lastRecordTime"`
|
||||
Status string `json:"status"`
|
||||
Secret string `json:"secret"`
|
||||
}
|
||||
|
||||
type SearchRecord struct {
|
||||
|
@ -50,6 +50,7 @@ func (u *CronjobService) SearchWithPage(search dto.PageCronjob) (int64, interfac
|
||||
}
|
||||
record, _ := cronjobRepo.RecordFirst(cronjob.ID)
|
||||
if record.ID != 0 {
|
||||
item.LastRecordStatus = record.Status
|
||||
item.LastRecordTime = record.StartTime.Format(constant.DateTimeLayout)
|
||||
} else {
|
||||
item.LastRecordTime = "-"
|
||||
|
@ -873,7 +873,7 @@ const message = {
|
||||
website: 'Backup Website',
|
||||
rulesHelper:
|
||||
'When there are multiple compression exclusion rules, they need to be displayed with line breaks. For example: \n*.log \n*.sql',
|
||||
lastRecordTime: 'Last Execution Time',
|
||||
lastRecordTime: 'Last Execution',
|
||||
all: 'All',
|
||||
failedRecord: 'Failed Records',
|
||||
successRecord: 'Successful Records',
|
||||
@ -957,6 +957,8 @@ const message = {
|
||||
today: 'Today',
|
||||
yesterday: 'Yesterday',
|
||||
lastNDay: 'Last {0} day',
|
||||
lastNMonth: 'Last {0} months',
|
||||
lastHalfYear: 'Last half year',
|
||||
memory: 'Memory',
|
||||
cache: 'Cache',
|
||||
disk: 'Disk',
|
||||
|
@ -833,7 +833,7 @@ const message = {
|
||||
app: '備份應用',
|
||||
website: '備份網站',
|
||||
rulesHelper: '當存在多個壓縮排除規則時,需要換行顯示,例:\n*.log \n*.sql',
|
||||
lastRecordTime: '上次執行時間',
|
||||
lastRecordTime: '上次執行情況',
|
||||
database: '備份數據庫',
|
||||
missBackupAccount: '未能找到備份賬號',
|
||||
syncDate: '同步時間 ',
|
||||
@ -912,6 +912,8 @@ const message = {
|
||||
today: '今天',
|
||||
yesterday: '昨天',
|
||||
lastNDay: '近 {0} 天',
|
||||
lastNMonth: '近 {0} 月',
|
||||
lastHalfYear: '近半年',
|
||||
memory: '內存',
|
||||
cache: '緩存',
|
||||
disk: '磁盤',
|
||||
|
@ -834,7 +834,7 @@ const message = {
|
||||
app: '备份应用',
|
||||
website: '备份网站',
|
||||
rulesHelper: '当存在多个压缩排除规则时,需要换行显示,例:\n*.log \n*.sql',
|
||||
lastRecordTime: '上次执行时间',
|
||||
lastRecordTime: '上次执行情况',
|
||||
database: '备份数据库',
|
||||
missBackupAccount: '未能找到备份账号',
|
||||
syncDate: '同步时间 ',
|
||||
@ -913,6 +913,8 @@ const message = {
|
||||
today: '今天',
|
||||
yesterday: '昨天',
|
||||
lastNDay: '近 {0} 天',
|
||||
lastNMonth: '近 {0} 月',
|
||||
lastHalfYear: '近半年',
|
||||
memory: '内存',
|
||||
cache: '缓存',
|
||||
disk: '磁盘',
|
||||
|
@ -42,4 +42,22 @@ export const shortcuts = [
|
||||
return [start, end];
|
||||
},
|
||||
},
|
||||
{
|
||||
text: i18n.global.t('monitor.lastNMonth', [3]),
|
||||
value: () => {
|
||||
const end = new Date();
|
||||
const start = new Date(end);
|
||||
start.setMonth(end.getMonth() - 3);
|
||||
return [start, end];
|
||||
},
|
||||
},
|
||||
{
|
||||
text: i18n.global.t('monitor.lastHalfYear', [30]),
|
||||
value: () => {
|
||||
const end = new Date();
|
||||
const start = new Date(end);
|
||||
start.setMonth(end.getMonth() - 6);
|
||||
return [start, end];
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -105,6 +105,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('cronjob.lastRecordTime')" :min-width="120" prop="lastRecordTime">
|
||||
<template #default="{ row }">
|
||||
<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'" icon="SemiSelect" link type="info" />
|
||||
{{ row.lastRecordTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
Loading…
x
Reference in New Issue
Block a user