fix: lose `Monitored` in cluster editing (#123)
Co-authored-by: yaojiping <yaojiping@infini.ltd>
This commit is contained in:
parent
304fad0121
commit
2f94f14d79
|
@ -68,17 +68,7 @@ class ClusterForm extends React.Component {
|
||||||
];
|
];
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
//console.log(this.props.clusterConfig.editMode)
|
|
||||||
const { match, dispatch, clusterConfig } = this.props;
|
const { match, dispatch, clusterConfig } = this.props;
|
||||||
if (clusterConfig?.editValue) {
|
|
||||||
|
|
||||||
this.setState({
|
|
||||||
monitored: clusterConfig?.editValue.hasOwnProperty("monitored")
|
|
||||||
? clusterConfig?.editValue?.monitored
|
|
||||||
: false,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: "clusterConfig/fetchCluster",
|
type: "clusterConfig/fetchCluster",
|
||||||
payload: {
|
payload: {
|
||||||
|
@ -107,7 +97,8 @@ class ClusterForm extends React.Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
needAuth,
|
needAuth,
|
||||||
isManual,
|
isManual,
|
||||||
collectMode
|
collectMode,
|
||||||
|
monitored: editValue?.hasOwnProperty("monitored") ? editValue?.monitored : false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue