From e5cd37f56567a800c78eae86c11de98f5cdd8dec Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期日, 29 十一月 2020 21:38:04 +0800
Subject: [PATCH] 调整左侧目录树及滚动条的宽度
---
src/pages/settings/components/ClusterManagement.vue | 59 +++++++++++++++++++++++++++++------------------------------
1 files changed, 29 insertions(+), 30 deletions(-)
diff --git a/src/pages/settings/components/ClusterManagement.vue b/src/pages/settings/components/ClusterManagement.vue
index 6cb3bec..d18c0c1 100644
--- a/src/pages/settings/components/ClusterManagement.vue
+++ b/src/pages/settings/components/ClusterManagement.vue
@@ -222,7 +222,7 @@
ipInput,
cloudNode
},
- data () {
+ data() {
const checkPwd = (rule, value, callback) => {
if (!value) {
return callback(new Error("瀵嗙爜涓嶈兘涓虹┖"));
@@ -306,7 +306,7 @@
showJoinConfirm: false
};
},
- mounted () {
+ mounted() {
this.findCluster();
let _this = this;
this.intervalTimer = setInterval(() => {
@@ -314,20 +314,20 @@
}, 30000);
//this.getEsClusterNodes();
},
- beforeDestroy () {
+ beforeDestroy() {
clearInterval(this.intervalTimer);
},
methods: {
- checkPsd (psd) {
+ checkPsd(psd) {
return psd.trim().length === 6
},
- cleanValue () {
+ cleanValue() {
this.members = [];
},
- sHandleClick (tab, event) {
+ sHandleClick(tab, event) {
console.log(tab, event);
},
- submitForm (formName) {
+ submitForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
//alert("submit!");
@@ -347,7 +347,7 @@
});
},
- saveForm (formName) {
+ saveForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
alert("submit!");
@@ -367,7 +367,7 @@
});
},
- join (formName) {
+ join(formName) {
let _this = this;
this.$refs[formName].validate(valid => {
if (valid) {
@@ -403,7 +403,7 @@
}
});
},
- async createCluster (json) {
+ async createCluster(json) {
let res = await createSerfCluster(json);
console.log(res, "鍒涘缓闆嗙兢");
this.$notify({
@@ -412,13 +412,13 @@
type: res.success ? "success" : "error"
});
},
- async randomPwd () {
+ async randomPwd() {
let res = await randomPwd();
if (res && res.success) {
this.ruleForm.clusterpwd = res.data;
}
},
- async searchColony () {
+ async searchColony() {
this.isSearch = true;
this.$refs["joinForm"].clearValidate();
this.$refs["joinForm"].validateField('clusterpwd');
@@ -448,7 +448,7 @@
}
//});
},
- async search (json) {
+ async search(json) {
let res = await search(json);
if (res && res.success) {
console.log(res, "鎼滅储闆嗙兢");
@@ -461,7 +461,7 @@
}, 10 * 1000);
},
//鎼滅储闆嗙兢
- async getSearchNodes () {
+ async getSearchNodes() {
let res = await getSearchNodes();
if (res && res.success) {
let list = res.data.map(i => {
@@ -485,12 +485,12 @@
});
}
},
- setSchedule () {
+ setSchedule() {
this.scheduleId = window.setInterval(() => {
this.getSearchNodes();
}, 1000);
},
- async stopSearch () {
+ async stopSearch() {
if (!this.loading) {
return true;
}
@@ -515,7 +515,7 @@
// },2000)
})
},
- async findCluster () {
+ async findCluster() {
let res = await findCluster();
if (res && res.success) {
if (res.data && res.data.clusterId) {
@@ -552,7 +552,7 @@
}
}
},
- getVrrpInfo () {
+ getVrrpInfo() {
getVrrp().then(res => {
if (res.success) {
this.vrIpForm.virtual_ip = res.data.virtual_ip;
@@ -562,7 +562,7 @@
console.log(e)
})
},
- async updateCluster () {
+ async updateCluster() {
if (this.ruleForm.clustername === "") {
this.$message({
type: "error",
@@ -582,7 +582,7 @@
type: res.success ? "success" : "error"
});
},
- async joinCluster (json) {
+ async joinCluster(json) {
let res = await joinCluster(json);
if (res.success) {
this.members = []
@@ -593,7 +593,7 @@
type: res.success ? "success" : "error"
});
},
- leave () {
+ leave() {
this.$confirm(`纭畾閫�鍑洪泦缇ゅ悧?`, {
center: true,
cancelButtonClass: "comfirm-class-cancle",
@@ -617,8 +617,8 @@
}).catch(() => { });
},
- joinNode (event, node) {
- console.log('join',node)
+ joinNode(event, node) {
+ console.log('join', node)
let _this = this;
this.currentCluster.cluster_id = node.cluster_id;
if (this.activeName === "3") {
@@ -627,7 +627,6 @@
return;
}
if (this.activeName === "2") {
- debugger
if (_this.showJoinConfirm) return;
this.$confirm("鏄惁瑕佸姞鍏ヨ妭鐐� " + node.nodeName + "?", "鍔犲叆闆嗙兢", {
@@ -684,7 +683,7 @@
// });
}
},
- generatePassword () {
+ generatePassword() {
var chars =
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
var uuid = [];
@@ -696,7 +695,7 @@
this.ruleForm.clusterpwd = uuid.join("");
},
- async getEsClusterNodes () {
+ async getEsClusterNodes() {
let rsp = await getDevInfo();
let hostIpAddr = "";
if (rsp && rsp.success) {
@@ -722,7 +721,7 @@
}
}
},
- createEsCluster () {
+ createEsCluster() {
createESNode().then(rsp => {
if (rsp && rsp.success) {
this.$message({
@@ -747,7 +746,7 @@
});
})
},
- joinESCluster () {
+ joinESCluster() {
if (!this.esNodeIp.length) {
this.$message({
type: "error",
@@ -781,7 +780,7 @@
});
})
},
- onIpBlur (ip) {
+ onIpBlur(ip) {
//this.vrIpForm.virtual_ip = ip;
this.ruleForm.virtualIp = ip;
console.log(this.ruleForm.virtualIp)
@@ -789,7 +788,7 @@
},
- created () { }
+ created() { }
};
</script>
--
Gitblit v1.8.0