[反向代理]源站可以设置名称、描述、是否启用
This commit is contained in:
@@ -9,7 +9,7 @@ Vue.component("origin-list-box", {
|
||||
methods: {
|
||||
createPrimaryOrigin: function () {
|
||||
teaweb.popup("/servers/server/settings/origins/addPopup?originType=primary&" + this.vParams, {
|
||||
height: "22em",
|
||||
height: "24em",
|
||||
callback: function (resp) {
|
||||
window.location.reload()
|
||||
}
|
||||
@@ -17,7 +17,7 @@ Vue.component("origin-list-box", {
|
||||
},
|
||||
createBackupOrigin: function () {
|
||||
teaweb.popup("/servers/server/settings/origins/addPopup?originType=backup&" + this.vParams, {
|
||||
height: "22em",
|
||||
height: "24em",
|
||||
callback: function (resp) {
|
||||
window.location.reload()
|
||||
}
|
||||
@@ -25,7 +25,7 @@ Vue.component("origin-list-box", {
|
||||
},
|
||||
updateOrigin: function (originId, originType) {
|
||||
teaweb.popup("/servers/server/settings/origins/updatePopup?originType=" + originType + "&" + this.vParams + "&originId=" + originId, {
|
||||
height: "22em",
|
||||
height: "24em",
|
||||
callback: function (resp) {
|
||||
window.location.reload()
|
||||
}
|
||||
@@ -72,12 +72,20 @@ Vue.component("origin-list-table", {
|
||||
<tr>
|
||||
<th>源站地址</th>
|
||||
<th>权重</th>
|
||||
<th class="width10">状态</th>
|
||||
<th class="two op">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="origin in vOrigins">
|
||||
<td>{{origin.addr}}</td>
|
||||
<td>{{origin.addr}}
|
||||
<div v-if="origin.name.length > 0" style="margin-top: 0.5em">
|
||||
<tiny-basic-label>{{origin.name}}</tiny-basic-label>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{origin.weight}}</td>
|
||||
<td>
|
||||
<label-on :v-is-on="origin.isOn"></label-on>
|
||||
</td>
|
||||
<td>
|
||||
<a href="" @click.prevent="updateOrigin(origin.id)">修改</a>
|
||||
<a href="" @click.prevent="deleteOrigin(origin.id)">删除</a>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>添加源站地址</h3>
|
||||
<h3>添加源站</h3>
|
||||
|
||||
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<input type="hidden" name="reverseProxyId" :value="reverseProxyId"/>
|
||||
@@ -23,7 +23,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="title">源站地址</td>
|
||||
<td class="title">源站地址 *</td>
|
||||
<td>
|
||||
<input type="text" name="addr" ref="focus"/>
|
||||
<p class="comment">源站服务器地址,通常是一个IP(或域名)加端口<span v-if="serverType == 'httpProxy'">,不需要加 http:// 或 https://</span>。</p>
|
||||
@@ -36,6 +36,30 @@
|
||||
<p class="comment">数字越大,代表分配的请求比例越多。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><more-options-indicator></more-options-indicator></td>
|
||||
</tr>
|
||||
<tbody v-show="moreOptionsVisible">
|
||||
<tr>
|
||||
<td>名称</td>
|
||||
<td>
|
||||
<input type="text" name="name" maxlength="100"/>
|
||||
<p class="comment">给当前源站起一个容易识别的名称。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>备注</td>
|
||||
<td>
|
||||
<textarea name="description" rows="3" maxlength="100"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>是否启用</td>
|
||||
<td>
|
||||
<checkbox name="isOn" :value="true"></checkbox>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
@@ -1,6 +1,6 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>添加源站地址</h3>
|
||||
<h3>修改源站</h3>
|
||||
|
||||
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<input type="hidden" name="reverseProxyId" :value="reverseProxyId"/>
|
||||
@@ -38,6 +38,30 @@
|
||||
<p class="comment">数字越大,代表分配的请求比例越多。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><more-options-indicator></more-options-indicator></td>
|
||||
</tr>
|
||||
<tbody v-show="moreOptionsVisible">
|
||||
<tr>
|
||||
<td>名称</td>
|
||||
<td>
|
||||
<input type="text" name="name" maxlength="100" v-model="origin.name"/>
|
||||
<p class="comment">给当前源站起一个容易识别的名称。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>备注</td>
|
||||
<td>
|
||||
<textarea name="description" rows="3" maxlength="100" v-model="origin.description"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>是否启用</td>
|
||||
<td>
|
||||
<checkbox name="isOn" :value="origin.isOn"></checkbox>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
Reference in New Issue
Block a user