Skip to content

Commit

Permalink
fix: prevent disabled job's next trigger date parse error
Browse files Browse the repository at this point in the history
If a job is disabled (by setting its cron expression to some time in the past), job list will have error showing this job.
  • Loading branch information
sam80180 committed Aug 19, 2023
1 parent 6f7c8c3 commit 88887e2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/locales/lang/en_US.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ const jobsTS = {
},
addCron: 'Add a timed task',
whatCron: 'What is a Cron expression?',
cronNoNext: "N/A",
cronInfo: {
one: '* The first bit, indicating seconds, value range: 0-59',
two: '* The second bit, indicating minutes, value range: 0-59',
Expand Down
1 change: 1 addition & 0 deletions src/locales/lang/ja_JP.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ const jobsTS = {
},
addCron: '添加定时任务',
whatCron: '什么是Cron表达式?',
cronNoNext: "N/A",
cronInfo: {
one: '* 第一位,表示秒,取值 0-59',
two: '* 第二位,表示分,取值 0-59',
Expand Down
1 change: 1 addition & 0 deletions src/locales/lang/zh_CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ const jobsTS = {
},
addCron: '添加定时任务',
whatCron: '什么是Cron表达式?',
cronNoNext: "N/A",
cronInfo: {
one: '* 第一位,表示秒,取值 0-59',
two: '* 第二位,表示分,取值 0-59',
Expand Down
1 change: 1 addition & 0 deletions src/locales/lang/zh_TW.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ const jobsTS = {
},
addCron: '新增排程任務',
whatCron: '什麼是Cron表達式?',
cronNoNext: "N/A",
cronInfo: {
one: '* 第一位,表示秒,取值 0-59',
two: '* 第二位,表示分,取值 0-59',
Expand Down
2 changes: 1 addition & 1 deletion src/views/Setting/SysJobs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ onMounted(() => {
prop="cronNext"
>
<template #default="scope">
{{ new Date(scope.row['cronNext']) }}
{{(scope.row["cronNext"] ? new Date(scope.row["cronNext"]) : $t("jobsTS.cronNoNext"))}}
</template>
</el-table-column>
<el-table-column :label="$t('common.operate')" width="150" align="center">
Expand Down

0 comments on commit 88887e2

Please sign in to comment.