hanbaoshan
2020-10-19 8e12e678decdf72f546e488601dc0842127aeabc
加入集群添加loading
2个文件已修改
18 ■■■■■ 已修改文件
src/pages/settings/components/CloudNode.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/settings/components/ClusterManagement.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/settings/components/CloudNode.vue
@@ -27,7 +27,7 @@
        ></serfDiagram>
      </div>
    </div>
    <div class="outer">
    <div class="outer" v-if="outsideNodes.length">
      <serfDiagram
        ref="outer-nodes"
        :members="outsideNodes"
@@ -252,7 +252,6 @@
<style lang="scss">
.cloud {
  width: 100%;
  height: 500px;
  display: flex;
  .inner {
    background: url('/images/settings/easy-cloud.png') no-repeat;
src/pages/settings/components/ClusterManagement.vue
@@ -30,7 +30,7 @@
          <!-- 加入已有集群 -->
          <el-tab-pane label="加入已有集群" name="2" :disabled="isHasColony">
            <el-form label-width="80px" :model="joinForm" :rules="joinRules" ref="joinForm">
            <el-form label-width="80px" :model="joinForm" :rules="joinRules" ref="joinForm" v-loading="joinLoading">
              <el-form-item label="IP地址" style="width:440px">
                <el-input
                  v-model="joinForm.clusterip"
@@ -125,7 +125,7 @@
      </el-col>
    </el-row>
    <div class="ui-top-view">
    <!-- <div class="ui-top-view">
      <div class="ui-top-title">存储集群管理</div>
    </div>
    <el-row>
@@ -138,7 +138,7 @@
              size="small"
              @click="createEsCluster()"
            >创建存储集群</el-button>
            <!-- <p>点击将本机创建为存储集群</p> -->
          </el-tab-pane>
          <el-tab-pane label="加入已有集群" name="s-second" v-if="sActiveName != 's-third1'">
            <el-form label-width="80px">
@@ -175,7 +175,7 @@
          </el-tab-pane>
        </el-tabs>
      </el-col>
    </el-row>
    </el-row> -->
  </div>
</template>
@@ -289,6 +289,7 @@
      members: [],
      innerNodes: [],
      intervalTimer: null,
      joinLoading: false
    };
  },
  mounted() {
@@ -350,8 +351,10 @@
    },
    join(formName) {
      let _this = this;
      this.$refs[formName].validate(valid => {
        if (valid) {
          _this.joinLoading = true;
          if (Object.keys(this.currentCluster).length === 0) {
            this.$notify({
              type: "info",
@@ -369,7 +372,11 @@
            nodeIps: nodeIps
          };
          this.joinCluster(json).then(() => {
            _this.joinLoading = false;
            this.findCluster();
          }).catch(e=>{
            console.log(e);
            _this.joinLoading = false;
          });
        } else {
          console.log("error submit!!");