diff --git a/src/components/HeartBeat/HeartBeat.vue b/src/components/HeartBeat/HeartBeat.vue
index 5e8c49c00687d1dd05d19d6f3f94114ec0aa69f3..314655cc9618970305a66d73f97b8390fe7369a4 100644
--- a/src/components/HeartBeat/HeartBeat.vue
+++ b/src/components/HeartBeat/HeartBeat.vue
@@ -77,7 +77,6 @@ export default {
created() {
let _this = this;
getConfigs().then((res) => {
- console.log(res.data.data)
// console.log('bijiao', (res.data.data).constructor == Object)
//判断心跳配置数据是否正常,正常数据类型为object
if((res.data.data).constructor == Object) {
@@ -91,7 +90,6 @@ export default {
_this.form.hbaddrs2.flag = true
} else if(res.data.data.hbaddrs1) {
res.data.data.hbaddrs1.forEach(item => {
- console.log('res.data.data.hbaddrs1',item)
_this.form.hbaddrs2.push({
nodeid: item.nodeid,
ip: ''
@@ -100,7 +98,6 @@ export default {
_this.form.hbaddrs2.flag = false
}
} else {
- // console.log( '_this.nodesError',_this.nodesError)
_this.nodesError = true
}
});
@@ -177,7 +174,6 @@ export default {
nodeid: item.nodeid
})
})
- // console.log('1pushdata', pushData)
//向后端提交数据
_this.loadingBtn = true //确定按钮loading状态
@@ -205,12 +201,10 @@ export default {
}
}
- console.log('hb2 flag', _this.form.hbaddrs2.flag)
- console.log('hb1 flag', _this.form.hbaddrs1.flag)
if(_this.form.hbaddrs2.flag && _this.form.hbaddrs1.flag) {
pushData.hbaddrs1 = []
pushData.hbaddrs2 = []
- console.log('form', _this.form)
+
_this.form.hbaddrs1.forEach(item => {
pushData.hbaddrs1.push({
ip: item.ip,
@@ -223,7 +217,6 @@ export default {
nodeid: item.nodeid
})
})
- // console.log('2pushdata', pushData)
//向后端提交数据
_this.loadingBtn = true //确定按钮loading状态
diff --git a/src/components/Layout/Operations/Operations.vue b/src/components/Layout/Operations/Operations.vue
index 2b7454508076eaae8c20c873374549adb657f1d9..b6ce6b1b0d754924dfc3286a2013677511990664 100644
--- a/src/components/Layout/Operations/Operations.vue
+++ b/src/components/Layout/Operations/Operations.vue
@@ -126,12 +126,12 @@
{{ chosenItem.id }}
-
+
@@ -331,6 +331,7 @@ export default {
period: "",
to_node: "",
},
+ migrateNodes: [], //可迁移节点
resources_id: [],
rscLocationVisible: false,
rscColocationVisible: false,
@@ -339,6 +340,7 @@ export default {
rscColocation: {},
rscOrder: {},
nodeList: [],
+
};
},
computed: {
@@ -391,7 +393,6 @@ export default {
getNodeList() {
let _this = this;
_this.nodeList = JSON.parse(JSON.stringify(_this.nodeLists));
- console.log(_this.nodeList);
this.$forceUpdate();
},
handleClickRelation(str) {
@@ -480,7 +481,16 @@ export default {
operate(action) {
let _this = this;
if (action == "migrate") {
+ // console.log(_this.chosenItem)
+ // console.log(_this.nodeLists)
+ //选中的数据的running_node有值,则该值不可作为迁移的节点
+ _this.nodeLists.forEach(item => {
+ if(_this.chosenItem.running_node.indexOf(item.id) == -1) {
+ _this.migrateNodes.push(item.id)
+ }
+ })
_this.disableMigrateDialog = true;
+
} else {
let req = "/resources/" + this.chosenItem.id + "/" + action;
easyRequest(req).then(() => {