nps/web/views/index/hadd.html

62 lines
2.7 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>
<div class="form-group">
<label class="control-label"></label>
<input class="form-control" type="text" name="remark" placeholder="备注">
</div>
<div class="form-group">
<label class="control-label"></label>
<input class="form-control" type="text" name="host" placeholder="域名">
</div>
<div class="form-group">
<label class="control-label">id</label>
<input value="{{.client_id}}" class="form-control" type="text" name="client_id"
placeholder="客户端id">
</div>
<div class="form-group">
<label class="control-label"></label>
<textarea class="form-control" rows="4" type="text" name="target"
placeholder="内网隧道目标例如10.1.50.203:22换行分隔"></textarea>
</div>
<div class="form-group" id="header">
<label class="control-label">header()</label>
<textarea class="form-control" rows="4" type="text" name="header"
placeholder="Cache-Control: no-cache"></textarea>
</div>
<div class="form-group" id="hostchange">
<label class="control-label">host</label>
<input class="form-control" value="" type="text" name="hostchange"
placeholder="host修改">
</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: "/index/addhost",
data: $("form").serializeArray(),
success: function (res) {
alert(res.msg)
if (res.status) {
history.back(-1)
}
}
})
})
})
</script>