diff --git a/src/locales/en-US.json b/src/locales/en-US.json index 3fc2f8c6..6d0c8f44 100644 --- a/src/locales/en-US.json +++ b/src/locales/en-US.json @@ -459,6 +459,7 @@ "新增定时规则": "Add Timing Rules", "运行任务前执行的命令,比如 cp/mv/python3 xxx.py/node xxx.js": "Run commands before executing the task, e.g., cp/mv/python3 xxx.py/node xxx.js", "运行任务后执行的命令,比如 cp/mv/python3 xxx.py/node xxx.js": "Run commands after executing the task, e.g., cp/mv/python3 xxx.py/node xxx.js", - "请输入运行任务前要执行的命令": "Please enter the command to run before executing the task", - "请输入运行任务后要执行的命令": "Please enter the command to run after executing the task" + "请输入运行任务前要执行的命令,不能包含 task 命令": "Please enter the command to run before executing the task, cannot contain task commands", + "请输入运行任务后要执行的命令,不能包含 task 命令": "Please enter the command to run after executing the task, cannot contain task commands", + "不能包含 task 命令": "Cannot contain task commands" } diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json index 65d85d14..541f23db 100644 --- a/src/locales/zh-CN.json +++ b/src/locales/zh-CN.json @@ -459,6 +459,7 @@ "新增定时规则": "新增定时规则", "运行任务前执行的命令,比如 cp/mv/python3 xxx.py/node xxx.js": "运行任务前执行的命令,比如 cp/mv/python3 xxx.py/node xxx.js", "运行任务后执行的命令,比如 cp/mv/python3 xxx.py/node xxx.js": "运行任务后执行的命令,比如 cp/mv/python3 xxx.py/node xxx.js", - "请输入运行任务前要执行的命令": "请输入运行任务前要执行的命令", - "请输入运行任务后要执行的命令": "请输入运行任务后要执行的命令" + "请输入运行任务前要执行的命令,不能包含 task 命令": "请输入运行任务前要执行的命令,不能包含 task 命令", + "请输入运行任务后要执行的命令,不能包含 task 命令": "请输入运行任务后要执行的命令,不能包含 task 命令", + "不能包含 task 命令": "不能包含 task 命令" } diff --git a/src/pages/crontab/modal.tsx b/src/pages/crontab/modal.tsx index 7f5924a9..a950dc43 100644 --- a/src/pages/crontab/modal.tsx +++ b/src/pages/crontab/modal.tsx @@ -153,11 +153,23 @@ const CronModal = ({ tooltip={intl.get( '运行任务前执行的命令,比如 cp/mv/python3 xxx.py/node xxx.js', )} + rules={[ + { + validator(rule, value) { + if (value.includes(' task ') || value.startsWith('task ')) { + return Promise.reject(intl.get('不能包含 task 命令')); + } + return Promise.resolve(); + }, + }, + ]} > diff --git a/src/pages/dependence/index.tsx b/src/pages/dependence/index.tsx index 3c3a2fd6..131a189d 100644 --- a/src/pages/dependence/index.tsx +++ b/src/pages/dependence/index.tsx @@ -92,7 +92,7 @@ const Dependence = () => { const columns: any = [ { title: intl.get('序号'), - width: 80, + width: 90, render: (text: string, record: any, index: number) => { return {index + 1} ; }, diff --git a/src/pages/setting/index.tsx b/src/pages/setting/index.tsx index a037dcdf..03a8e035 100644 --- a/src/pages/setting/index.tsx +++ b/src/pages/setting/index.tsx @@ -334,7 +334,7 @@ const Setting = () => { dataSource={dataSource} rowKey="id" size="middle" - scroll={{ x: 768 }} + scroll={{ x: 1000 }} loading={loading} /> ),