[BugFix]JMX端口维护信息错误

This commit is contained in:
erge
2023-11-27 20:18:42 +08:00
parent cceff91f81
commit a9eb4ae30e

View File

@@ -537,7 +537,7 @@ const ConnectorForm = (props: {
setSelectedTabKey(undefined); setSelectedTabKey(undefined);
try { try {
const jmxPortInfo = JSON.parse(initFieldsValue.jmxProperties) || {}; const jmxPortInfo = JSON.parse(initFieldsValue.jmxProperties) || {};
form.setFieldsValue({ ...initFieldsValue, jmxProperties: jmxPortInfo.jmxProperties }); form.setFieldsValue({ ...initFieldsValue, jmxProperties: jmxPortInfo.jmxPort });
} catch { } catch {
form.setFieldsValue({ ...initFieldsValue }); form.setFieldsValue({ ...initFieldsValue });
} }
@@ -546,7 +546,7 @@ const ConnectorForm = (props: {
useLayoutEffect(() => { useLayoutEffect(() => {
try { try {
const jmxPortInfo = JSON.parse(initFieldsValue.jmxProperties) || {}; const jmxPortInfo = JSON.parse(initFieldsValue.jmxProperties) || {};
form.setFieldsValue({ ...initFieldsValue, jmxProperties: jmxPortInfo.jmxProperties }); form.setFieldsValue({ ...initFieldsValue, jmxProperties: jmxPortInfo.jmxPort });
} catch { } catch {
form.setFieldsValue({ ...initFieldsValue }); form.setFieldsValue({ ...initFieldsValue });
} }