From 1e1e5f612f252d66b0d0386cf52873bb1f3f7d7b Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期五, 01 九月 2023 16:10:37 +0800
Subject: [PATCH] 系统维护+系统监控器+调试工具的app 增加

---
 src/pages/settings/components/ClusterManagement.vue |   78 +++++++++++++++++++++-----------------
 1 files changed, 43 insertions(+), 35 deletions(-)

diff --git a/src/pages/settings/components/ClusterManagement.vue b/src/pages/settings/components/ClusterManagement.vue
index d18c0c1..bedd193 100644
--- a/src/pages/settings/components/ClusterManagement.vue
+++ b/src/pages/settings/components/ClusterManagement.vue
@@ -321,12 +321,12 @@
     checkPsd(psd) {
       return psd.trim().length === 6
     },
-    cleanValue() {
-      this.members = [];
-    },
-    sHandleClick(tab, event) {
-      console.log(tab, event);
-    },
+    // cleanValue() {
+    //   this.members = [];
+    // },
+    // sHandleClick(tab, event) {
+    //   console.log(tab, event);
+    // },
     submitForm(formName) {
       this.$refs[formName].validate(valid => {
         if (valid) {
@@ -347,25 +347,25 @@
       });
     },
 
-    saveForm(formName) {
-      this.$refs[formName].validate(valid => {
-        if (valid) {
-          alert("submit!");
-          let json = {
-            enable: this.vrIpForm.enable,
-            serve_port: this.vrIpForm.serve_port,
-            virtual_ip: this.vrIpForm.virtual_ip,
+    // saveForm(formName) {
+    //   this.$refs[formName].validate(valid => {
+    //     if (valid) {
+    //       alert("submit!");
+    //       let json = {
+    //         enable: this.vrIpForm.enable,
+    //         serve_port: this.vrIpForm.serve_port,
+    //         virtual_ip: this.vrIpForm.virtual_ip,
 
-          };
-          setVrrp(json).then(() => {
-            this.getVrrpInfo();
-          });
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
+    //       };
+    //       setVrrp(json).then(() => {
+    //         this.getVrrpInfo();
+    //       });
+    //     } else {
+    //       console.log("error submit!!");
+    //       return false;
+    //     }
+    //   });
+    // },
 
     join(formName) {
       let _this = this;
@@ -552,16 +552,16 @@
         }
       }
     },
-    getVrrpInfo() {
-      getVrrp().then(res => {
-        if (res.success) {
-          this.vrIpForm.virtual_ip = res.data.virtual_ip;
-          this.vrIpForm.enable = res.data.enable;
-        }
-      }).catch(e => {
-        console.log(e)
-      })
-    },
+    // getVrrpInfo() {
+    //   getVrrp().then(res => {
+    //     if (res.success) {
+    //       this.vrIpForm.virtual_ip = res.data.virtual_ip;
+    //       this.vrIpForm.enable = res.data.enable;
+    //     }
+    //   }).catch(e => {
+    //     console.log(e)
+    //   })
+    // },
     async updateCluster() {
       if (this.ruleForm.clustername === "") {
         this.$message({
@@ -614,7 +614,15 @@
           this.members = [];
           this.innerNodes = [];
         }
-      }).catch(() => { });
+      }).catch(() => {
+         this.ruleForm.clustername = "";
+          this.ruleForm.clusterpwd = ""
+          this.clusterid = "";
+          this.isHasColony = false;
+          this.activeName = "1";
+          this.members = [];
+          this.innerNodes = [];
+       });
 
     },
     joinNode(event, node) {

--
Gitblit v1.8.0