hanbaoshan
2020-10-20 e9e3db616fd3a1de44c0a1f3df73a39281b4281d
加入集群节点优化,更新虚拟/外部IP名称
1个文件已修改
13 ■■■■■ 已修改文件
src/pages/settings/components/ClusterManagement.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/settings/components/ClusterManagement.vue
@@ -52,7 +52,7 @@
                <!-- <el-button size="mini" :disabled="searchDis" @click="searchColony">搜索集群</el-button>
                <el-button size="mini" @click="stopSearch">停止搜索</el-button>-->
              </el-form-item>
              <el-form-item label="集群密码" prop="clusterpwd" style="width:500px">
              <el-form-item label="集群密码" prop="clusterpwd" style="width:440px">
                <el-input
                  v-model="joinForm.clusterpwd"
                  placeholder="请输入集群密码"
@@ -85,7 +85,7 @@
              ></el-input>
            </el-form-item>
            <el-form-item label="虚拟IP" prop="virtualIp">
            <el-form-item label="虚拟/外部IP" prop="virtualIp">
              <ip-input :ip="ruleForm.virtualIp" :on-blur="onIpBlur"></ip-input>
            </el-form-item>
            <el-form-item style="width:440px;text-align: right;">
@@ -290,7 +290,8 @@
      members: [],
      innerNodes: [],
      intervalTimer: null,
      joinLoading: false
      joinLoading: false,
      showJoinConfirm: false
    };
  },
  mounted() {
@@ -600,7 +601,7 @@
    },
    joinNode(event, node) {
      debugger
      let _this = this;
      this.currentCluster.cluster_id = node.cluster_id;
      if (this.activeName === "3") {
        this.manageForm.clustername = node.clusterName;
@@ -610,6 +611,8 @@
      if (this.activeName === "2") {
        this.$refs["joinForm"].validate(valid => {
          if (valid) {
            if(_this.showJoinConfirm) return;
            _this.showJoinConfirm = true;
            this.$confirm("是否要加入节点 " + node.nodeName + "?", "加入集群", {
              confirmButtonText: "确定",
              cancelButtonText: "取消",
@@ -629,6 +632,7 @@
                // })
                console.log(this.currentCluster, '选择的集群节点')
                this.join("joinForm");
                _this.showJoinConfirm = false;
              })
              .catch(() => {
                this.$notify({
@@ -636,6 +640,7 @@
                  duration: 1000,
                  message: "已取消"
                });
                _this.showJoinConfirm = false;
              });
          } else {
            console.log("error submit!!");