From 8fe8010627faacf1195047a48252e26bf44f2f67 Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@iotlink.com> Date: 星期一, 19 十月 2020 11:56:22 +0800 Subject: [PATCH] 修复轮询周期计算问题 --- src/pages/settings/components/ClusterManagement.vue | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/src/pages/settings/components/ClusterManagement.vue b/src/pages/settings/components/ClusterManagement.vue index f9aa80c..51173b1 100644 --- a/src/pages/settings/components/ClusterManagement.vue +++ b/src/pages/settings/components/ClusterManagement.vue @@ -288,11 +288,19 @@ agentName: "", members: [], innerNodes: [], + intervalTimer: null, }; }, mounted() { this.findCluster(); + let _this = this; + this.intervalTimer = setInterval(()=>{ + _this.findCluster(); + },30000); this.getEsClusterNodes(); + }, + beforeDestroy(){ + clearInterval(this.intervalTimer); }, methods: { cleanValue() { @@ -505,7 +513,7 @@ obj.node_ip = i.node_ip; obj.nodeName = i.node_name; obj.Address = i.node_ip; - obj.role = i.role ? i.role : "pc"; + obj.role = i.drift_state ? i.drift_state : "pc"; return obj; }); -- Gitblit v1.8.0