| | |
| | | updateClusterName, |
| | | joinCluster, |
| | | leave, |
| | | getVrrp, |
| | | setVrrp, |
| | | createESNode, |
| | | addESNode, |
| | |
| | | }, |
| | | data() { |
| | | const checkPwd = (rule, value, callback) => { |
| | | debugger |
| | | debugger; |
| | | if (!value) { |
| | | return callback(new Error("密码不能为空")); |
| | | } |
| | |
| | | async search(json) { |
| | | let res = await search(json); |
| | | if (res && res.success) { |
| | | console.log(res, "搜索集群"); |
| | | this.searchNum = res.data; |
| | | } |
| | | this.searchDis = true; |
| | |
| | | } |
| | | } |
| | | }, |
| | | // 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({ |
| | |
| | | }) |
| | | .then(async () => { |
| | | let res = await leave(); |
| | | this.$notify({ |
| | | title: res.success ? "成功" : "失败", |
| | | message: res.msg, |
| | | type: res.success ? "success" : "error", |
| | | }); |
| | | |
| | | if (res && res.success) { |
| | | this.ruleForm.clustername = ""; |
| | | this.ruleForm.clusterpwd = ""; |
| | |
| | | this.activeName = "1"; |
| | | this.members = []; |
| | | this.innerNodes = []; |
| | | this.$notify({ |
| | | title: "成功", |
| | | message: "退出成功", |
| | | type: "success", |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | |
| | | this.activeName = "1"; |
| | | this.members = []; |
| | | this.innerNodes = []; |
| | | this.$notify({ |
| | | title: "失败", |
| | | message: "退出失败", |
| | | type: "error", |
| | | }); |
| | | }); |
| | | }, |
| | | joinNode(event, node) { |
| | |
| | | #h-alaycluster { |
| | | .el-form-item__content { |
| | | text-align: left; |
| | | // input { |
| | | // max-width: 360px; |
| | | // } |
| | | } |
| | | } |
| | | } |