EricJoy2048 opened a new issue, #3429:
URL: https://github.com/apache/incubator-seatunnel/issues/3429

   ### Search before asking
   
   - [X] I had searched in the 
[feature](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22Feature%22)
 and found no similar feature requirement.
   
   
   ### Description
   
   The connector form json is like this:
   
   ```
   {
        task: 'shell',
        locales: {
                zh_CN: {
                        node_name: '节点名称',
                        node_name_tips: '请输入节点名称',
                        node_name_validate_message: '节点名称不能为空',
                        script_validate_message: '脚本内容不能为空',
                        task_priority: '任务优先级',
                        highest: '最高',
                        high: '高',
                        medium: '中',
                        low: '低',
                        lowest: '最低',
                        worker_group: 'Worker 分组',
                        script: '脚本'
                },
                en_US: {
                        node_name: 'Node Name',
                        node_name_tips: 'Please entry node name',
                        node_name_validate_message: 'Node name cannot be empty',
                        script_validate_message: 'Script content cannot be 
empty',
                        task_priority: 'Task Priority',
                        highest: 'Highest',
                        high: 'High',
                        medium: 'Medium',
                        low: 'Low',
                        lowest: 'Lowest',
                        worker_group: 'Worker Group',
                        script: 'Script'
                }
        },
        apis: {
                getWorkerGroupList: {
                        url: '/worker-groups/all',
                        method: 'get'
                }
        },
        forms: [{
                        label: 'task_components.node_name',
                        type: 'input',
                        field: 'name',
                        defaultValue: '',
                        clearable: true,
                        placeholder: 'task_components.node_name_tips',
                        validate: {
                                required: true,
                                trigger: ['input', 'blur'],
                                type: 'non-empty',
                                message: 
'task_components.node_name_validate_message'
                        }
                },
                {
                        label: 'task_components.task_priority',
                        type: 'select',
                        field: 'taskPriority',
                        options: [{
                                        label: 'task_components.highest',
                                        value: 'HIGHEST'
                                },
                                {
                                        label: 'task_components.high',
                                        value: 'HIGH'
                                },
                                {
                                        label: 'task_components.medium',
                                        value: 'MEDIUM'
                                },
                                {
                                        label: 'task_components.low',
                                        value: 'LOW'
                                },
                                {
                                        label: 'task_components.lowest',
                                        value: 'LOWEST'
                                }
                        ],
                        optionsLocale: true,
                        defaultValue: 'MEDIUM',
                        validate: {
                                required: true,
                                trigger: ['input', 'blur']
                        }
                },
                {
                        label: 'task_components.worker_group',
                        type: 'select',
                        field: 'workerGroup',
                        options: [],
                        optionsLocale: false,
                        defaultValue: 'default',
                        api: 'getWorkerGroupList',
                        validate: {
                                required: true,
                                trigger: ['input', 'blur']
                        }
                },
                {
                        label: 'task_components.script',
                        type: 'studio',
                        field: 'taskParams.rawScript',
                        defaultValue: '',
                        validate: {
                                required: true,
                                trigger: ['input', 'blur'],
                                type: 'non-empty',
                                message: 
'task_components.script_validate_message'
                        }
                }
        ]
   }
   ```
   
   We need a wrapper to wrapper seatunnel  option rules to this json format.
   
   ### Usage Scenario
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to