From 2f94f14d79cb6e10b847a465d9f1f0b75a57b862 Mon Sep 17 00:00:00 2001 From: yaojp123 <15989103230@163.com> Date: Thu, 13 Feb 2025 16:07:26 +0800 Subject: [PATCH] fix: lose `Monitored` in cluster editing (#123) Co-authored-by: yaojiping --- web/src/pages/System/Cluster/Form.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/web/src/pages/System/Cluster/Form.js b/web/src/pages/System/Cluster/Form.js index cef881e1..3e3e6171 100644 --- a/web/src/pages/System/Cluster/Form.js +++ b/web/src/pages/System/Cluster/Form.js @@ -68,17 +68,7 @@ class ClusterForm extends React.Component { ]; componentDidMount() { - //console.log(this.props.clusterConfig.editMode) const { match, dispatch, clusterConfig } = this.props; - if (clusterConfig?.editValue) { - - this.setState({ - monitored: clusterConfig?.editValue.hasOwnProperty("monitored") - ? clusterConfig?.editValue?.monitored - : false, - }); - } - dispatch({ type: "clusterConfig/fetchCluster", payload: { @@ -107,7 +97,8 @@ class ClusterForm extends React.Component { this.setState({ needAuth, isManual, - collectMode + collectMode, + monitored: editValue?.hasOwnProperty("monitored") ? editValue?.monitored : false, }); } });