增加独立的IP地址管理功能

This commit is contained in:
GoEdgeLab
2021-08-31 17:24:30 +08:00
parent 06d7f8d754
commit 31aa942c0f
31 changed files with 822 additions and 50 deletions

View File

@@ -1,9 +1,10 @@
// 节点IP地址管理标签形式
Vue.component("node-ip-addresses-box", {
props: ["vIpAddresses"],
props: ["v-ip-addresses", "role"],
data: function () {
return {
ipAddresses: (this.vIpAddresses == null) ? [] : this.vIpAddresses
ipAddresses: (this.vIpAddresses == null) ? [] : this.vIpAddresses,
supportThresholds: this.role != "ns"
}
},
methods: {
@@ -12,7 +13,7 @@ Vue.component("node-ip-addresses-box", {
window.UPDATING_NODE_IP_ADDRESS = null
let that = this;
teaweb.popup("/nodes/ipAddresses/createPopup", {
teaweb.popup("/nodes/ipAddresses/createPopup?supportThresholds=" + (this.supportThresholds ? 1 : 0), {
callback: function (resp) {
that.ipAddresses.push(resp.data.ipAddress);
},
@@ -26,7 +27,7 @@ Vue.component("node-ip-addresses-box", {
window.UPDATING_NODE_IP_ADDRESS = address
let that = this;
teaweb.popup("/nodes/ipAddresses/updatePopup", {
teaweb.popup("/nodes/ipAddresses/updatePopup?supportThresholds=" + (this.supportThresholds ? 1 : 0), {
callback: function (resp) {
Vue.set(that.ipAddresses, index, resp.data.ipAddress);
},