Skip to content

Commit

Permalink
feat(datasource): 优化 RocketMQ 数据源配置
Browse files Browse the repository at this point in the history
- 移除不必要的输入框,将组名、区域、访问密钥和秘密密钥分为两组
- 为所有输入框添加 autoComplete="off" 属性,提高安全性
- 调整输入框的顺序,使配置更加清晰
  • Loading branch information
aide-cloud committed Dec 13, 2024
1 parent 7b4ea72 commit a8d87c3
Showing 1 changed file with 43 additions and 39 deletions.
82 changes: 43 additions & 39 deletions src/pages/datasource/event/options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export function kafkaFormOptions(saslEnable?: 'true' | 'false'): (DataFromItem |
label: '版本(version)',
name: 'version',
type: 'input',
props: { placeholder: '请输入版本' }
props: { placeholder: '请输入版本', autoComplete: 'off' }
}
]
]
Expand All @@ -171,51 +171,55 @@ export function kafkaFormOptions(saslEnable?: 'true' | 'false'): (DataFromItem |
*/
export function rocketmqFormOptions(): (DataFromItem | DataFromItem[])[] {
return [
{
label: '组名',
name: 'groupName',
type: 'input',
formProps: {
tooltip: 'groupName'
},
props: { placeholder: '请输入组名' }
},
{
label: '区域',
name: 'region',
type: 'input',
formProps: {
tooltip: 'region'
},
props: { placeholder: '请输入区域' }
},
{
label: '访问密钥',
name: 'accessKey',
type: 'input',
formProps: {
tooltip: 'accessKey'
},
props: { placeholder: '请输入访问密钥' }
},
{
label: '秘密密钥',
name: 'secretKey',
type: 'input',
formProps: {
tooltip: 'secretKey'
},
props: { placeholder: '请输入秘密密钥' }
},
{
label: '命名空间',
name: 'namespace',
type: 'input',
formProps: {
tooltip: 'namespace'
},
props: { placeholder: '请输入命名空间' }
}
props: { placeholder: '请输入命名空间', autoComplete: 'off' }
},
[
{
label: '组名',
name: 'groupName',
type: 'input',
formProps: {
tooltip: 'groupName'
},
props: { placeholder: '请输入组名', autoComplete: 'off' }
},
{
label: '区域',
name: 'region',
type: 'input',
formProps: {
tooltip: 'region'
},
props: { placeholder: '请输入区域', autoComplete: 'off' }
}
],
[
{
label: '访问密钥',
name: 'accessKey',
type: 'input',
formProps: {
tooltip: 'accessKey'
},
props: { placeholder: '请输入访问密钥', autoComplete: 'off' }
},
{
label: '秘密密钥',
name: 'secretKey',
type: 'input',
formProps: {
tooltip: 'secretKey'
},
props: { placeholder: '请输入秘密密钥', autoComplete: 'off' }
}
]
]
}

Expand Down

0 comments on commit a8d87c3

Please sign in to comment.