mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 06:46:09 +08:00
定时任务增加前后规则校验,不能包含 task 命令
This commit is contained in:
parent
5e73f0390f
commit
99f6073c8e
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -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 命令"
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
},
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input.TextArea
|
||||
rows={4}
|
||||
autoSize={{ minRows: 1, maxRows: 5 }}
|
||||
placeholder={intl.get('请输入运行任务前要执行的命令')}
|
||||
placeholder={intl.get(
|
||||
'请输入运行任务前要执行的命令,不能包含 task 命令',
|
||||
)}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
|
@ -166,11 +178,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();
|
||||
},
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input.TextArea
|
||||
rows={4}
|
||||
autoSize={{ minRows: 1, maxRows: 5 }}
|
||||
placeholder={intl.get('请输入运行任务后要执行的命令')}
|
||||
placeholder={intl.get(
|
||||
'请输入运行任务后要执行的命令,不能包含 task 命令',
|
||||
)}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
|
|
|
@ -92,7 +92,7 @@ const Dependence = () => {
|
|||
const columns: any = [
|
||||
{
|
||||
title: intl.get('序号'),
|
||||
width: 80,
|
||||
width: 90,
|
||||
render: (text: string, record: any, index: number) => {
|
||||
return <span style={{ cursor: 'text' }}>{index + 1} </span>;
|
||||
},
|
||||
|
|
|
@ -334,7 +334,7 @@ const Setting = () => {
|
|||
dataSource={dataSource}
|
||||
rowKey="id"
|
||||
size="middle"
|
||||
scroll={{ x: 768 }}
|
||||
scroll={{ x: 1000 }}
|
||||
loading={loading}
|
||||
/>
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue
Block a user