mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-08 06:00:24 +08:00
节点IP地址可以设置专属集群
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>是否可以访问</td>
|
||||
<td>允许公开访问</td>
|
||||
<td>
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" name="canAccess" value="1" checked="checked"/>
|
||||
@@ -46,6 +46,10 @@
|
||||
<node-ip-address-thresholds-box></node-ip-address-thresholds-box>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="clusters != null && clusters.length > 0">
|
||||
<td>专属集群</td>
|
||||
<td><node-ip-address-clusters-selector :v-clusters="clusters"></node-ip-address-clusters-selector></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>是否可以访问</td>
|
||||
<td>允许公开访问</td>
|
||||
<td>
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" name="canAccess" value="1" v-model="address.canAccess"/>
|
||||
@@ -28,7 +28,7 @@
|
||||
</tr>
|
||||
<tbody v-show="moreOptionsVisible">
|
||||
<tr>
|
||||
<td>是否启用</td>
|
||||
<td>启用当前IP</td>
|
||||
<td>
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" name="isOn" value="1" v-model="address.isOn"/>
|
||||
@@ -58,6 +58,10 @@
|
||||
<node-ip-address-thresholds-box :v-thresholds="address.thresholds"></node-ip-address-thresholds-box>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="clusters != null && clusters.length > 0">
|
||||
<td>专属集群</td>
|
||||
<td><node-ip-address-clusters-selector :v-clusters="clusters"></node-ip-address-clusters-selector></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
|
||||
@@ -4,5 +4,15 @@ Tea.context(function () {
|
||||
this.address = window.parent.UPDATING_NODE_IP_ADDRESS
|
||||
if (this.address != null) {
|
||||
this.address.isUp = (this.address.isUp ? 1 : 0)
|
||||
|
||||
// 专属集群
|
||||
if (this.address.clusters != null) {
|
||||
let selectedClusterIds = this.address.clusters.map(function (cluster) {
|
||||
return cluster.id
|
||||
})
|
||||
this.clusters.forEach(function (cluster) {
|
||||
cluster.isChecked = selectedClusterIds.$contains(cluster.id)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user