2019-01-12 16:09:12 +00:00
|
|
|
<div class="row tile">
|
2019-03-01 09:23:14 +00:00
|
|
|
<div class="col-md-12 col-md-auto">
|
|
|
|
<div class="ibox float-e-margins">
|
|
|
|
<h3 class="ibox-title">add host</h3>
|
|
|
|
<div class="ibox-content">
|
|
|
|
<form class="form-horizontal">
|
2019-02-15 14:59:28 +00:00
|
|
|
<input type="hidden" name="id" value="{{.h.Id}}">
|
2019-01-12 16:09:12 +00:00
|
|
|
<div class="form-group">
|
2019-03-01 09:23:14 +00:00
|
|
|
<label class="col-sm-2 control-label">remark</label>
|
|
|
|
<div class="col-sm-10">
|
2019-03-05 01:23:18 +00:00
|
|
|
<input value="{{.h.Remark}}" class="form-control" type="text" name="remark"
|
|
|
|
placeholder="remark">
|
2019-03-01 09:23:14 +00:00
|
|
|
</div>
|
2019-02-15 14:59:28 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-03-01 09:23:14 +00:00
|
|
|
<label class="col-sm-2 control-label">host</label>
|
|
|
|
<div class="col-sm-10">
|
2019-03-05 01:23:18 +00:00
|
|
|
<input value="{{.h.Host}}" class="form-control" type="text" name="host"
|
|
|
|
placeholder="such as a.proxy.com">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group" id="scheme">
|
|
|
|
<label class="control-label col-sm-2">scheme</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<select class="form-control" name="scheme">
|
|
|
|
<option {{if eq "all" .h.Scheme}}selected{{end}} value="all">all</option>
|
|
|
|
<option {{if eq "http" .h.Scheme}}selected{{end}} value="http">http</option>
|
|
|
|
<option {{if eq "https" .h.Scheme}}selected{{end}} value="https">https</option>
|
|
|
|
</select>
|
2019-03-01 09:23:14 +00:00
|
|
|
</div>
|
2019-01-12 16:09:12 +00:00
|
|
|
</div>
|
2019-01-25 04:10:12 +00:00
|
|
|
<div class="form-group">
|
2019-03-01 09:23:14 +00:00
|
|
|
<label class="col-sm-2 control-label">url router</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<input value="{{.h.Location}}" class="form-control" type="text" name="location"
|
|
|
|
placeholder="empty means to be unrestricted">
|
|
|
|
</div>
|
2019-01-25 04:10:12 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-03-01 09:23:14 +00:00
|
|
|
<label class="col-sm-2 control-label">client id</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<input value="{{.h.Client.Id}}" class="form-control" type="text" name="client_id"
|
|
|
|
placeholder="client id">
|
|
|
|
</div>
|
2019-01-25 04:10:12 +00:00
|
|
|
</div>
|
2019-01-12 16:09:12 +00:00
|
|
|
<div class="form-group">
|
2019-03-01 09:23:14 +00:00
|
|
|
<label class="col-sm-2 control-label">target of Intranet(ip:port)</label>
|
|
|
|
<div class="col-sm-10">
|
2019-02-02 16:54:43 +00:00
|
|
|
<textarea class="form-control" rows="4" type="text" name="target"
|
2019-03-01 09:23:14 +00:00
|
|
|
placeholder="such as
|
|
|
|
10.1.50.203:80
|
|
|
|
10.1.50.202:80">{{.h.Target}}</textarea>
|
|
|
|
<span class="help-block m-b-none">Line break if load balancing</span>
|
|
|
|
|
|
|
|
</div>
|
2019-01-12 16:09:12 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group" id="header">
|
2019-03-01 09:23:14 +00:00
|
|
|
<label class="col-sm-2 control-label">header modify</label>
|
|
|
|
<div class="col-sm-10">
|
2019-01-12 16:09:12 +00:00
|
|
|
<textarea class="form-control" rows="4" type="text" name="header"
|
|
|
|
placeholder="Cache-Control: no-cache">{{.h.HeaderChange}}</textarea>
|
2019-03-01 09:23:14 +00:00
|
|
|
<span class="help-block m-b-none"> Colon separated, multiple lines please fill in</span>
|
|
|
|
</div>
|
|
|
|
|
2019-01-12 16:09:12 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group" id="hostchange">
|
2019-03-01 09:23:14 +00:00
|
|
|
<label class="col-sm-2 control-label">host modify</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<input value="{{.h.HostChange}}" class="form-control" value="" type="text" name="hostchange"
|
|
|
|
placeholder="host modify">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="hr-line-dashed"></div>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="col-sm-4 col-sm-offset-2">
|
|
|
|
<button class="btn btn-success" href="#" id="add"><i
|
|
|
|
class="fa fa-fw fa-lg fa-eye"></i>save
|
|
|
|
</button>
|
|
|
|
</div>
|
2019-01-12 16:09:12 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-03-01 09:23:14 +00:00
|
|
|
|
2019-01-12 16:09:12 +00:00
|
|
|
<script>
|
|
|
|
$(function () {
|
|
|
|
$("#add").on("click", function () {
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: "/index/edithost",
|
|
|
|
data: $("form").serializeArray(),
|
|
|
|
success: function (res) {
|
|
|
|
alert(res.msg)
|
|
|
|
if (res.status) {
|
|
|
|
history.back(-1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
</script>
|