Skip to content

Commit 1915c57

Browse files
author
yaojiping
committed
fix: error state of Node stats and Index stats in cluster editing
1 parent c76875c commit 1915c57

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

web/src/pages/System/Cluster/CollectMode.jsx

-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ export default (props) => {
1616
if (mode === "agent") {
1717
monitor_configs["node_stats"] = { enabled: false };
1818
monitor_configs["index_stats"] = { enabled: false };
19-
} else {
20-
monitor_configs["node_stats"] = { enabled: true };
21-
monitor_configs["index_stats"] = { enabled: true };
2219
}
2320
form.setFieldsValue({ monitor_configs });
2421
}, [mode]);

web/src/pages/System/Cluster/Form.js

+10-6
Original file line numberDiff line numberDiff line change
@@ -594,12 +594,16 @@ class ClusterForm extends React.Component {
594594
/>
595595
)
596596
}
597-
<MonitorConfigsForm
598-
form={this.props.form}
599-
editValue={editValue}
600-
visible={this.state.monitored}
601-
collectMode={this.state.collectMode}
602-
/>
597+
{
598+
editValue?.monitor_configs && (
599+
<MonitorConfigsForm
600+
form={this.props.form}
601+
editValue={editValue}
602+
visible={this.state.monitored}
603+
collectMode={this.state.collectMode}
604+
/>
605+
)
606+
}
603607
<MetadataConfigsForm
604608
form={this.props.form}
605609
editValue={editValue}

0 commit comments

Comments
 (0)