From 12b1acb4c3f627754e6f9efe32a9f2b65ceb2e8b Mon Sep 17 00:00:00 2001 From: yaojp123 <15989103230@163.com> Date: Fri, 14 Feb 2025 15:18:31 +0800 Subject: [PATCH] fix: error state of Node stats and Index stats in cluster editing (#134) Co-authored-by: yaojiping --- web/src/pages/System/Cluster/CollectMode.jsx | 3 --- web/src/pages/System/Cluster/Form.js | 16 ++++++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/web/src/pages/System/Cluster/CollectMode.jsx b/web/src/pages/System/Cluster/CollectMode.jsx index 54c1d8d5..5501b863 100644 --- a/web/src/pages/System/Cluster/CollectMode.jsx +++ b/web/src/pages/System/Cluster/CollectMode.jsx @@ -16,9 +16,6 @@ export default (props) => { if (mode === "agent") { monitor_configs["node_stats"] = { enabled: false }; monitor_configs["index_stats"] = { enabled: false }; - } else { - monitor_configs["node_stats"] = { enabled: true }; - monitor_configs["index_stats"] = { enabled: true }; } form.setFieldsValue({ monitor_configs }); }, [mode]); diff --git a/web/src/pages/System/Cluster/Form.js b/web/src/pages/System/Cluster/Form.js index 3e3e6171..d9f7ee3e 100644 --- a/web/src/pages/System/Cluster/Form.js +++ b/web/src/pages/System/Cluster/Form.js @@ -594,12 +594,16 @@ class ClusterForm extends React.Component { /> ) } - + { + editValue?.monitor_configs && ( + + ) + }