Commit 4628e01684fbad8e810be576a03281b66949ef12
Merge branch 'fix/rule-dataflowmodal-bug' into 'main_dev'
fix: 修改数据流转的问题 See merge request yunteng/thingskit-front!734
Showing
2 changed files
with
21 additions
and
1 deletions
@@ -52,6 +52,7 @@ export const modeMqttForm: FormSchema[] = [ | @@ -52,6 +52,7 @@ export const modeMqttForm: FormSchema[] = [ | ||
52 | label: '主机', | 52 | label: '主机', |
53 | colProps: { span: 12 }, | 53 | colProps: { span: 12 }, |
54 | component: 'Input', | 54 | component: 'Input', |
55 | + required: true, | ||
55 | componentProps: { | 56 | componentProps: { |
56 | maxLength: 255, | 57 | maxLength: 255, |
57 | placeholder: '请输入Host', | 58 | placeholder: '请输入Host', |
@@ -98,7 +98,26 @@ | @@ -98,7 +98,26 @@ | ||
98 | getDataFlowParams?.clientProperties | 98 | getDataFlowParams?.clientProperties |
99 | ); | 99 | ); |
100 | const data = getValue(description, name, getDataFlowMethod, getDataFlowParams); | 100 | const data = getValue(description, name, getDataFlowMethod, getDataFlowParams); |
101 | - const rest = await postAddConvertApi({ ...restData.data, ...data }); | 101 | + const { caCertFileName, certFileName, privateKeyFileName } = getDataFlowParams.credentials; |
102 | + const configuration = { | ||
103 | + topicPattern: getDataFlowParams.topicPattern, | ||
104 | + host: getDataFlowParams.host, | ||
105 | + port: getDataFlowParams.port, | ||
106 | + connectTimeoutSec: getDataFlowParams.connectTimeoutSec, | ||
107 | + clientId: getDataFlowParams.clientId ? getDataFlowParams.clientId : null, | ||
108 | + cleanSession: getDataFlowParams.cleanSession, | ||
109 | + ssl: getDataFlowParams.ssl, | ||
110 | + appendClientIdSuffix: getDataFlowParams.appendClientIdSuffix, | ||
111 | + credentials: { | ||
112 | + type: getDataFlowParams.type, | ||
113 | + caCertFileName: caCertFileName ? caCertFileName : undefined, | ||
114 | + certFileName: certFileName ? certFileName : undefined, | ||
115 | + privateKeyFileName: privateKeyFileName ? privateKeyFileName : undefined, | ||
116 | + username: getDataFlowParams.username ? getDataFlowParams.username : undefined, | ||
117 | + password: getDataFlowParams.password ? getDataFlowParams.password : undefined, | ||
118 | + }, | ||
119 | + }; | ||
120 | + const rest = await postAddConvertApi({ ...restData.data, ...data, configuration }); | ||
102 | if (rest) { | 121 | if (rest) { |
103 | closeModalAfterSuccess && createMessage.success(`${businessText.value}成功`); | 122 | closeModalAfterSuccess && createMessage.success(`${businessText.value}成功`); |
104 | closeModalAfterSuccess && closeModal(); | 123 | closeModalAfterSuccess && closeModal(); |