mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-22 09:10:25 +08:00
实现基本的反向代理
This commit is contained in:
@@ -43,6 +43,7 @@ func (this *IndexAction) RunPost(params struct {
|
||||
IsBreak bool
|
||||
IsCaseInsensitive bool
|
||||
IsReverse bool
|
||||
IsOn bool
|
||||
|
||||
Must *actions.Must
|
||||
}) {
|
||||
@@ -74,6 +75,7 @@ func (this *IndexAction) RunPost(params struct {
|
||||
Description: params.Description,
|
||||
Pattern: resultPattern,
|
||||
IsBreak: params.IsBreak,
|
||||
IsOn: params.IsOn,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
|
||||
4
web/public/js/components/common/labels.js
Normal file
4
web/public/js/components/common/labels.js
Normal file
@@ -0,0 +1,4 @@
|
||||
Vue.component("label-on", {
|
||||
props: ["v-is-on"],
|
||||
template: '<div><span v-if="vIsOn" class="ui label tiny green">已启用</span><span v-if="!vIsOn" class="ui label tiny red">已关闭</span></div>'
|
||||
})
|
||||
@@ -11,11 +11,15 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>匹配规则</th>
|
||||
<th class="two wide">状态</th>
|
||||
<th class="two op">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="location in locations">
|
||||
<td>{{location.pattern}}</td>
|
||||
<td>
|
||||
<label-on :v-is-on="location.isOn"></label-on>
|
||||
</td>
|
||||
<td>
|
||||
<a :href="'/servers/server/settings/locations/location?serverId=' + serverId + '&locationId=' + location.id">详情</a>
|
||||
<a href="" @click.prevent="deleteLocation(location.id)">删除</a>
|
||||
|
||||
@@ -42,6 +42,15 @@
|
||||
<p class="comment">可以用来说明此规则用途。。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>是否启用</td>
|
||||
<td>
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" name="isOn" v-model="locationConfig.isOn"/>
|
||||
<label></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><more-options-indicator></more-options-indicator></td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user