nps/web/views/client/edit.html

84 lines
4.3 KiB
Go
Executable File
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<div class="row tile">
<div class="col-md-6 col-md-auto">
<div>
<h3 class="tile-title"></h3>
<div class="tile-body">
<form>
<input type="hidden" name="id" value="{{.c.Id}}">
<div class="form-group" id="target">
<label class="control-label"></label>
<input class="form-control" value="{{.c.Remark}}" type="text" name="remark" placeholder="客户端备注">
</div>
<div class="form-group" id="flow_limit">
<label class="control-label">(M)</label>
<input class="form-control" value="{{.c.Flow.FlowLimit}}" type="text" name="flow_limit"
placeholder="为空不限制">
</div>
<div class="form-group" id="rate_limit">
<label class="control-label">(KB)</label>
<input class="form-control" value="{{.c.RateLimit}}" type="text" name="rate_limit"
placeholder="为空不限制">
</div>
<div class="form-group" id="max_conn">
<label class="control-label"></label>
<input class="form-control" value="{{.c.MaxConn}}" type="text" name="max_conn"
placeholder="为空不限制">
</div>
<div class="form-group" id="u">
<label class="control-label">(socks5,web穿)</label>
<input class="form-control" value="{{.c.Cnf.U}}" type="text" name="u"
placeholder="不填则无需验证">
</div>
<div class="form-group" id="p">
<label class="control-label">(socks5,web穿)</label>
<input class="form-control" value="{{.c.Cnf.P}}" type="text" name="p"
placeholder="不填则无需验证">
</div>
<div class="form-group" id="vkey">
<label class="control-label">()</label>
<input class="form-control" value="{{.c.VerifyKey}}" type="text" name="vkey"
placeholder="客户端连接密钥">
</div>
<div class="form-group" id="compress">
<label class="control-label">()</label>
<select class="form-control" name="compress">
<option {{if eq "" .c.Cnf.Compress}}selected{{end}} value=""></option>
<option {{if eq "snappy" .c.Cnf.Compress}}selected{{end}} value="snappy">snappy</option>
</select>
</div>
<div class="form-group" id="compress">
<label class="control-label">()</label>
<select class="form-control" name="crypt">
<option {{if eq false .c.Cnf.Crypt}}selected{{end}} value="0"></option>
<option {{if eq true .c.Cnf.Crypt}}selected{{end}} value="1"></option>
</select>
</div>
</form>
</div>
<div class="tile-footer">
&nbsp;&nbsp;<button class="btn btn-success" href="#" id="add"><i
class="fa fa-fw fa-lg fa-eye"></i>
</button>
</div>
</div>
</div>
</div>
</main>
<script>
$(function () {
$("#add").on("click", function () {
$.ajax({
type: "POST",
url: "/client/edit",
data: $("form").serializeArray(),
success: function (res) {
alert(res.msg)
if (res.status) {
history.back(-1)
}
}
})
})
})
</script>