mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-15 04:26:36 +08:00
[节点]可以设置节点区域
This commit is contained in:
@@ -14,6 +14,12 @@
|
||||
<p class="comment">每行一个节点IP。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>所属区域</td>
|
||||
<td>
|
||||
<node-region-selector></node-region-selector>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>所属分组</td>
|
||||
<td>
|
||||
|
||||
@@ -27,6 +27,12 @@
|
||||
<p class="comment">可用线路是根据集群设置的域名获取的,注意DNS服务商可能对这些线路有所限制。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>所属区域</td>
|
||||
<td>
|
||||
<node-region-selector></node-region-selector>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>所属分组</td>
|
||||
<td>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<td class="title">选择分组</td>
|
||||
<td>
|
||||
<div v-if="groups.length > 0">
|
||||
<a href="" class="ui label tiny" v-for="group in groups" :class="{blue:group.id == groupId}" style="margin-bottom:0.5em" @click.prevent="selectGroup(group)">{{group.name}}</a>
|
||||
<a href="" class="ui label small basic" v-for="group in groups" :class="{blue:group.id == groupId}" style="margin-bottom:0.5em" @click.prevent="selectGroup(group)">{{group.name}}</a>
|
||||
<p class="comment">点击可已选中要使用的分组。</p>
|
||||
</div>
|
||||
<div v-else>
|
||||
|
||||
@@ -5,31 +5,28 @@
|
||||
<form class="ui form" action="/clusters/cluster">
|
||||
<input type="hidden" name="clusterId" :value="clusterId"/>
|
||||
<div class="ui fields inline">
|
||||
<div class="ui field" v-if="groups.length > 0" style="padding-right: 0">
|
||||
所属分组:
|
||||
</div>
|
||||
<div class="ui field" v-if="regions.length > 0">
|
||||
<select class="ui dropdown" name="regionId" v-model="regionId">
|
||||
<option value="0">[全部区域]</option>
|
||||
<option v-for="region in regions" :value="region.id">{{region.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="ui field" v-if="groups.length > 0">
|
||||
<select class="ui dropdown" name="groupId" v-model="groupId">
|
||||
<option value="0">[全部]</option>
|
||||
<option value="0">[全部分组]</option>
|
||||
<option v-for="group in groups" :value="group.id">{{group.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="ui field" style="padding-right: 0">
|
||||
安装状态:
|
||||
</div>
|
||||
<div class="ui field">
|
||||
<select class="ui dropdown" name="installedState" v-model="installState">
|
||||
<option value="0">[全部]</option>
|
||||
<option value="0">[安装状态]</option>
|
||||
<option value="1">已安装</option>
|
||||
<option value="2">未安装</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="ui field" style="padding-right: 0">
|
||||
在线状态:
|
||||
</div>
|
||||
<div class="ui field">
|
||||
<select class="ui dropdown" name="activeState" v-model="activeState">
|
||||
<option value="0">[全部]</option>
|
||||
<option value="0">[在线状态]</option>
|
||||
<option value="1">在线</option>
|
||||
<option value="2">不在线</option>
|
||||
</select>
|
||||
@@ -48,10 +45,10 @@
|
||||
<table class="ui table selectable celled" v-if="nodes.length > 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="one wide center">ID</th>
|
||||
<th>节点名称</th>
|
||||
<th class="width10">所属分组</th>
|
||||
<th class="width10">IP</th>
|
||||
<th>所属区域</th>
|
||||
<th>所属分组</th>
|
||||
<th>IP</th>
|
||||
<th class="width10">DNS线路</th>
|
||||
<th class="width5 center">CPU</th>
|
||||
<th class="width5 center">内存</th>
|
||||
@@ -62,10 +59,13 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="node in nodes">
|
||||
<td nowrap="" class="center">{{node.id}}</td>
|
||||
<td>{{node.name}}</td>
|
||||
<td>
|
||||
<span v-if="node.region != null">{{node.region.name}}</span>
|
||||
<span v-else class="disabled">-</span>
|
||||
</td>
|
||||
<td>
|
||||
<tiny-basic-label v-if="node.group != null">{{node.group.name}}</tiny-basic-label>
|
||||
<span v-if="node.group != null">{{node.group.name}}</span>
|
||||
<span v-else class="disabled">-</span>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -35,10 +35,17 @@
|
||||
<span class="ui label tiny basic" v-for="route in dnsRoutes">{{route.name}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>所属区域</td>
|
||||
<td>
|
||||
<span v-if="node.region != null" class="ui label small basic">{{node.region.name}}</span>
|
||||
<span v-else class="disabled">没有设置区域。</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>所属分组</td>
|
||||
<td>
|
||||
<span v-if="node.group != null" class="ui label tiny">{{node.group.name}}</span>
|
||||
<span v-if="node.group != null" class="ui label small basic">{{node.group.name}}</span>
|
||||
<span v-else class="disabled">没有设置分组。</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -35,6 +35,12 @@
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>所属区域</td>
|
||||
<td>
|
||||
<node-region-selector :v-region="node.region"></node-region-selector>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>所属分组</td>
|
||||
<td>
|
||||
|
||||
23
web/views/@default/clusters/regions/selectPopup.html
Normal file
23
web/views/@default/clusters/regions/selectPopup.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>选择分组</h3>
|
||||
|
||||
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
<input type="hidden" name="regionId" :value="regionId"/>
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">选择区域</td>
|
||||
<td>
|
||||
<div v-if="regions.length > 0">
|
||||
<a href="" class="ui label small basic" v-for="region in regions" :class="{blue:region.id == regionId}" style="margin-bottom:0.5em" @click.prevent="selectRegion(region)">{{region.name}}</a>
|
||||
<p class="comment">点击可已选中要使用的区域。</p>
|
||||
</div>
|
||||
<div v-else>
|
||||
<p class="comment">暂时还没有可以使用的区域。</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<submit-btn>确定</submit-btn>
|
||||
</form>
|
||||
8
web/views/@default/clusters/regions/selectPopup.js
Normal file
8
web/views/@default/clusters/regions/selectPopup.js
Normal file
@@ -0,0 +1,8 @@
|
||||
Tea.context(function () {
|
||||
this.success = NotifyPopup
|
||||
this.regionId = 0
|
||||
|
||||
this.selectRegion = function (region) {
|
||||
this.regionId = region.id
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user