mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-16 05:30:27 +08:00
增加独立的IP地址管理功能
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// 单个集群选择
|
||||
Vue.component("cluster-selector", {
|
||||
props: ["v-cluster-id"],
|
||||
mounted: function () {
|
||||
let that = this
|
||||
|
||||
@@ -9,7 +10,6 @@ Vue.component("cluster-selector", {
|
||||
that.clusters = resp.data.clusters
|
||||
})
|
||||
},
|
||||
props: ["v-cluster-id"],
|
||||
data: function () {
|
||||
let clusterId = this.vClusterId
|
||||
if (clusterId == null) {
|
||||
@@ -21,7 +21,7 @@ Vue.component("cluster-selector", {
|
||||
}
|
||||
},
|
||||
template: `<div>
|
||||
<select class="ui dropdown auto-width" name="clusterId" v-model="clusterId">
|
||||
<select class="ui dropdown" style="max-width: 10em" name="clusterId" v-model="clusterId">
|
||||
<option value="0">[选择集群]</option>
|
||||
<option v-for="cluster in clusters" :value="cluster.id">{{cluster.name}}</option>
|
||||
</select>
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user