Code optimization

This commit is contained in:
刘河
2019-03-23 22:19:59 +08:00
parent efa341c7e8
commit b189fb1b6e
260 changed files with 50746 additions and 851 deletions

View File

@@ -5,7 +5,7 @@
<div class="ibox-content">
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 control-label">mode </label>
<label class="col-sm-2 control-label" langtag="info-mode">类型 </label>
<div class="col-sm-10">
<select class="form-control" name="type" id="type">
<option {{if eq "tcp" .type}}selected{{end}} value="tcp">tcp</option>
@@ -21,7 +21,7 @@
</div>
<div class="form-group">
<label class="col-sm-2 control-label">remark</label>
<label class="col-sm-2 control-label" langtag="info-remark">备注</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="remark"
placeholder="empty means to be unrestricted">
@@ -29,14 +29,14 @@
</div>
<div class="form-group" id="port">
<label class="col-sm-2 control-label">port of server</label>
<label class="col-sm-2 control-label" langtag="info-server-port">服务端端口</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="port" placeholder="such as 8024">
</div>
</div>
<div class="form-group" id="target">
<label class="col-sm-2 control-label">target of Intranet(ip:port)</label>
<label class="col-sm-2 control-label" langtag="info-target">内网目标(ip:端口)</label>
<div class="col-sm-10">
<textarea class="form-control" name="target" rows="4" placeholder="10.1.50.203:22
10.1.50.202:22"></textarea>
@@ -47,7 +47,7 @@
</div>
<div class="form-group" id="client_id">
<label class="col-sm-2 control-label">id of client</label>
<label class="col-sm-2 control-label" langtag="info-client-id">客户端id</label>
<div class="col-sm-10">
<input value="{{.client_id}}" class="form-control" type="text" name="client_id"
placeholder="id of client">
@@ -55,7 +55,7 @@
</div>
<div class="form-group" id="local_path">
<label class="col-sm-2 control-label">local path</label>
<label class="col-sm-2 control-label" langtag="info-local-path">本地路径</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="local_path"
placeholder="such as /tmp">
@@ -63,7 +63,7 @@
</div>
<div class="form-group" id="strip_pre">
<label class="col-sm-2 control-label">strip pre</label>
<label class="col-sm-2 control-label" langtag="info-strip-pre">访问前缀</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="strip_pre"
placeholder="such as static">
@@ -71,7 +71,7 @@
</div>
<div class="form-group" id="password">
<label class="col-sm-2 control-label">unique identification key</label>
<label class="col-sm-2 control-label" langtag="info-unique-vkey">唯一验证密钥</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="password"
placeholder="unique identification key">
@@ -82,7 +82,7 @@
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
&nbsp;<button class="btn btn-success" href="#" id="add"><i
class="fa fa-fw fa-lg fa-eye"></i>add
class="fa fa-fw fa-lg fa-eye"></i>新增
</button>
</div>
</div>

View File

@@ -6,7 +6,7 @@
<form class="form-horizontal">
<input type="hidden" name="id" value="{{.t.Id}}">
<div class="form-group">
<label class="col-sm-2 control-label">mode </label>
<label class="col-sm-2 control-label" langtag="info-mode">类型 </label>
<div class="col-sm-10">
<select class="form-control" name="type" id="type">
<option {{if eq "tcp" .t.Mode}}selected{{end}} value="tcp">tcp</option>
@@ -22,7 +22,7 @@
</div>
<div class="form-group">
<label class="col-sm-2 control-label">remark</label>
<label class="col-sm-2 control-label" langtag="info-remark">备注</label>
<div class="col-sm-10">
<input value="{{.t.Remark}}" class="form-control" type="text" name="remark"
placeholder="empty means to be unrestricted">
@@ -30,24 +30,24 @@
</div>
<div class="form-group" id="port">
<label class="col-sm-2 control-label">port of server</label>
<label class="col-sm-2 control-label" langtag="info-server-port">服务端端口</label>
<div class="col-sm-10">
<input value="{{.t.Port}}" class="form-control" type="text" name="port"
placeholder="such as 8024">
</div>
</div>
<div class="form-group" id="target">
<label class="col-sm-2 control-label">target of Intranet(ip:port)</label>
<label class="col-sm-2 control-label" langtag="info-target">内网目标(ip:端口)</label>
<div class="col-sm-10">
<textarea class="form-control" name="target" rows="4" placeholder="10.1.50.203:22
10.1.50.202:22">{{.t.Target}}</textarea>
<span class="help-block m-b-none">can only fill in ports if it is local machine proxy, only tcp supports load balancing
</span> </div>
</span></div>
</div>
<div class="form-group" id="client_id">
<label class="col-sm-2 control-label">id of client</label>
<label class="col-sm-2 control-label" langtag="info-client-id">客户端id</label>
<div class="col-sm-10">
<input value="{{.t.Client.Id}}" value="{{.client_id}}" class="form-control" type="text"
name="client_id"
@@ -56,7 +56,7 @@
</div>
<div class="form-group" id="local_path">
<label class="col-sm-2 control-label">local path</label>
<label class="col-sm-2 control-label" langtag="info-local-path">本地路径</label>
<div class="col-sm-10">
<input value="{{.t.LocalPath}}" class="form-control" type="text" name="local_path"
placeholder="such as /tmp">
@@ -64,7 +64,7 @@
</div>
<div class="form-group" id="strip_pre">
<label class="col-sm-2 control-label">strip pre</label>
<label class="col-sm-2 control-label" langtag="info-strip-pre">访问前缀</label>
<div class="col-sm-10">
<input value="{{.t.StripPre}}" class="form-control" type="text" name="strip_pre"
placeholder="such as static">
@@ -72,7 +72,7 @@
</div>
<div class="form-group" id="password">
<label class="col-sm-2 control-label">unique identification key</label>
<label class="col-sm-2 control-label" langtag="info-unique-vkey">唯一验证密钥</label>
<div class="col-sm-10">
<input value="{{.t.Password}}" class="form-control" type="text" name="password"
placeholder="unique identification key">
@@ -83,7 +83,7 @@
<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
class="fa fa-fw fa-lg fa-eye"></i>新增
</button>
</div>
</div>

View File

@@ -5,19 +5,19 @@
<div class="ibox-content">
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 control-label">remark</label>
<label class="col-sm-2 control-label" langtag="info-remark">备注</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="remark" placeholder="remark">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">host</label>
<label class="col-sm-2 control-label" langtag="info-host">域名</label>
<div class="col-sm-10">
<input 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>
<label class="control-label col-sm-2" langtag="info-scheme">协议类型</label>
<div class="col-sm-10">
<select class="form-control" name="scheme">
<option value="all">all</option>
@@ -27,21 +27,21 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">url router</label>
<label class="col-sm-2 control-label" langtag="info-url-router">url路由</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="location"
placeholder="empty means to be unrestricted">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">client id</label>
<label class="col-sm-2 control-label" langtag="info-client-id">客户端id</label>
<div class="col-sm-10">
<input value="{{.client_id}}" class="form-control" type="text" name="client_id"
placeholder="client id">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">target of Intranet(ip:port)</label>
<label class="col-sm-2 control-label" langtag="info-target">内网目标(ip:端口)</label>
<div class="col-sm-10">
<textarea class="form-control" rows="4" type="text" name="target"
placeholder="such as
@@ -52,7 +52,7 @@
</div>
</div>
<div class="form-group" id="header">
<label class="col-sm-2 control-label">header modify</label>
<label class="col-sm-2 control-label" langtag="info-header-modify">request header修改</label>
<div class="col-sm-10">
<textarea class="form-control" rows="4" type="text" name="header"
placeholder="Cache-Control: no-cache"></textarea>
@@ -60,8 +60,8 @@
</div>
</div>
<div class="form-group" id="hostchange">
<label class="col-sm-2 control-label">host modify</label>
<div class="form-group" id="hostchange" >
<label class="col-sm-2 control-label" langtag="info-host-change">request host修改</label>
<div class="col-sm-10">
<input class="form-control" value="" type="text" name="hostchange"
placeholder="host modify">
@@ -71,7 +71,7 @@
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
&nbsp;<button class="btn btn-success" href="#" id="add"><i
class="fa fa-fw fa-lg fa-eye"></i>add
class="fa fa-fw fa-lg fa-eye"></i>新增
</button>
</div>
</div>

View File

@@ -6,21 +6,21 @@
<form class="form-horizontal">
<input type="hidden" name="id" value="{{.h.Id}}">
<div class="form-group">
<label class="col-sm-2 control-label">remark</label>
<label class="col-sm-2 control-label" langtag="info-remark">备注</label>
<div class="col-sm-10">
<input value="{{.h.Remark}}" class="form-control" type="text" name="remark"
placeholder="remark">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">host</label>
<label class="col-sm-2 control-label" langtag="info-host">域名</label>
<div class="col-sm-10">
<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>
<label class="control-label col-sm-2" langtag="info-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>
@@ -30,21 +30,21 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">url router</label>
<label class="col-sm-2 control-label" langtag="info-url-router">url路由</label>
<div class="col-sm-10">
<input value="{{.h.Location}}" class="form-control" type="text" name="location"
placeholder="empty means to be unrestricted">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">client id</label>
<label class="col-sm-2 control-label" langtag="info-client-id">客户端id</label>
<div class="col-sm-10">
<input value="{{.h.Client.Id}}" class="form-control" type="text" name="client_id"
placeholder="client id">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">target of Intranet(ip:port)</label>
<label class="col-sm-2 control-label" langtag="info-target">内网目标(ip:端口)</label>
<div class="col-sm-10">
<textarea class="form-control" rows="4" type="text" name="target"
placeholder="such as
@@ -55,7 +55,7 @@
</div>
</div>
<div class="form-group" id="header">
<label class="col-sm-2 control-label">header modify</label>
<label class="col-sm-2 control-label" langtag="info-header-modify">request header修改</label>
<div class="col-sm-10">
<textarea class="form-control" rows="4" type="text" name="header"
placeholder="Cache-Control: no-cache">{{.h.HeaderChange}}</textarea>
@@ -64,7 +64,7 @@
</div>
<div class="form-group" id="hostchange">
<label class="col-sm-2 control-label">host modify</label>
<label class="col-sm-2 control-label" langtag="info-host-change">request host修改</label>
<div class="col-sm-10">
<input value="{{.h.HostChange}}" class="form-control" value="" type="text" name="hostchange"
placeholder="host modify">
@@ -74,7 +74,7 @@
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
&nbsp;<button class="btn btn-success" href="#" id="add"><i
class="fa fa-fw fa-lg fa-eye"></i>save
class="fa fa-fw fa-lg fa-eye"></i>新增
</button>
</div>
</div>

View File

@@ -20,7 +20,7 @@
<div id="toolbar">
<a href="/index/addhost?vkey={{.task_id}}&client_id={{.client_id}}"
class="btn btn-primary dim"
type="button">new</a>
type="button" langtag="info-new">新增</a>
</div>
<table id="taskList_table" class="table-striped table-hover"
data-mobile-responsive="true"></table>
@@ -46,8 +46,10 @@
return {
"offset": params.offset,
"limit": params.limit,
"search": params.search
}
},
search: true,
contentType: "application/x-www-form-urlencoded",
striped: true, // 设置为true会有隔行变色效果
showHeader: true,
@@ -60,13 +62,14 @@
detailView: true,
smartDisplay: true, // 智能显示 pagination 和 cardview 等
detailFormatter: function (index, row, element) {
return '<b>export flow: </b>' + change(row.Flow.ExportFlow) + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
+ '<b>inlet flow: </b>' + change(row.Flow.InletFlow) + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
+ '<b>crypt: </b>' + row.Client.Cnf.Crypt + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
+ '<b>compress: </b>' + row.Client.Cnf.Compress + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp` + "<br/><br>"
+ '<b>username: </b>' + row.Client.Cnf.U + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
+ '<b>password: </b>' + row.Client.Cnf.P + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp` + "<br/><br>"
+ '<b>header_change: </b>' + row.HeaderChange + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
return '<b langtag="info-export-flow">出口流量</b>' + change(row.Flow.ExportFlow) + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
+ '<b langtag="info-inlet-flow">入口流量</b>' + change(row.Flow.InletFlow) + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
+ '<b langtag="info-crypt">加密</b>' + row.Client.Cnf.Crypt + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
+ '<b langtag="info-compress">压缩</b>' + row.Client.Cnf.Compress + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp` + "<br/><br>"
+ '<b langtag="info-web-auth-username">basic权限认证用户名</b>' + row.Client.Cnf.U + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
+ '<b langtag="info-web-auth-password">basic权限认证密码</b>' + row.Client.Cnf.P + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp` + "<br/><br>"
+ '<b langtag="info-header-change">request header修改</b>' + row.HeaderChange + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp` + "<br/><br>"
+ '<b langtag="info-host-change">request host 修改</b>' + row.HostChange + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
},
//表格的列
columns: [

View File

@@ -3,7 +3,7 @@
<div class="col-lg-3">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>client connection port</h5>
<h5>客户端连接端口</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">{{.p}}</h1>
@@ -13,7 +13,7 @@
<div class="col-lg-3">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>number of clients</h5>
<h5>总客户端数</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">{{.data.clientCount}}</h1>
@@ -24,7 +24,7 @@
<div class="ibox float-e-margins">
<div class="ibox-title">
{{/*<span class="label label-primary pull-right">今日</span>*/}}
<h5>number of online clients</h5>
<h5>在线客户端数</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">{{.data.clientOnlineCount}}</h1>
@@ -36,7 +36,7 @@
<div class="col-lg-3">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>number of tcp connections</h5>
<h5>当前TCP连接总数</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">{{.data.tcpCount}}</h1>
@@ -49,7 +49,7 @@
<div class="col-lg-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>config information</h5>
<h5>配置信息</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
@@ -65,7 +65,7 @@
<li class="list-group-item">
<div class="row">
<div class="col-sm-6">
<strong>bridge type</strong>
<strong>桥接模式</strong>
</div>
<div class="col-sm-6 text-right">
<strong>{{.data.bridgeType}}</strong>
@@ -75,7 +75,7 @@
<li class="list-group-item">
<div class="row">
<div class="col-sm-6">
<strong>http proxy port</strong>
<strong>http代理端口</strong>
</div>
<div class="col-sm-6 text-right">
<strong>{{.data.httpProxyPort}}</strong>
@@ -85,7 +85,7 @@
<li class="list-group-item">
<div class="row">
<div class="col-sm-6">
<strong>https proxy port</strong>
<strong>https代理端口</strong>
</div>
<div class="col-sm-6 text-right">
<strong>{{.data.httpsProxyPort}}</strong>
@@ -95,7 +95,7 @@
<li class="list-group-item ">
<div class="row">
<div class="col-sm-6">
<strong>ip limit</strong>
<strong>ip限制</strong>
</div>
<div class="col-sm-6 text-right">
<strong>{{.data.ipLimit}}</strong>
@@ -105,7 +105,7 @@
<li class="list-group-item ">
<div class="row">
<div class="col-sm-6">
<strong>flow store interval</strong>
<strong>流量持久化</strong>
</div>
<div class="col-sm-6 text-right">
<strong>{{.data.flowStoreInterval}}</strong>
@@ -115,7 +115,7 @@
<li class="list-group-item ">
<div class="row">
<div class="col-sm-6">
<strong>log level</strong>
<strong>日志级别</strong>
</div>
<div class="col-sm-6 text-right">
<strong>{{.data.logLevel}}</strong>
@@ -125,7 +125,7 @@
<li class="list-group-item ">
<div class="row">
<div class="col-sm-6">
<strong>p2p port</strong>
<strong>p2p端口</strong>
</div>
<div class="col-sm-6 text-right">
<strong>{{.data.p2pPort}}</strong>
@@ -135,7 +135,7 @@
<li class="list-group-item ">
<div class="row">
<div class="col-sm-6">
<strong>server ip</strong>
<strong>服务端IP</strong>
</div>
<div class="col-sm-6 text-right">
<strong>{{.data.serverIp}}</strong>
@@ -148,7 +148,7 @@
</div>
<div class="col-lg-6">
<div class="ibox-title">
<h5>system now</h5>
<h5>系统信息</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
@@ -162,7 +162,7 @@
<div>
<div>
<span>cpu</span>
<span>CPU</span>
<small class="pull-right">{{.data.cpu}}%</small>
</div>
<div class="progress progress-small">
@@ -171,7 +171,7 @@
<div>
<span>virtual memory</span>
<span>虚拟内存</span>
<small class="pull-right">{{.data.virtual_mem}}%</small>
</div>
<div class="progress progress-small">
@@ -189,7 +189,7 @@
<li class="list-group-item">
<div class="row">
<div class="col-sm-6">
<strong>load</strong>
<strong>负载</strong>
</div>
<div class="col-sm-6 text-right">
<strong>{{.data.load}}</strong>
@@ -199,7 +199,7 @@
<li class="list-group-item ">
<div class="row">
<div class="col-sm-6">
<strong>tcp num(establish)</strong>
<strong>TCP连接数establish</strong>
</div>
<div class="col-sm-6 text-right">
<strong>{{.data.tcp}}</strong>
@@ -209,7 +209,7 @@
<li class="list-group-item ">
<div class="row">
<div class="col-sm-6">
<strong>udp num(establish)</strong>
<strong>UDP连接数establish</strong>
</div>
<div class="col-sm-6 text-right">
<strong>{{.data.udp}}</strong>
@@ -219,7 +219,7 @@
<li class="list-group-item ">
<div class="row">
<div class="col-sm-6">
<strong>out</strong>
<strong>出口带宽</strong>
</div>
<div class="col-sm-6 text-right">
<strong id="send"></strong>
@@ -229,7 +229,7 @@
<li class="list-group-item ">
<div class="row">
<div class="col-sm-6">
<strong>in</strong>
<strong>入口带宽</strong>
</div>
<div class="col-sm-6 text-right">
<strong id="recv"></strong>
@@ -247,7 +247,7 @@
<div class="col-lg-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>load</h5>
<h5>负载</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
@@ -265,7 +265,7 @@
<div class="col-lg-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>cpu</h5>
<h5>CPU</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
@@ -285,7 +285,7 @@
<div class="col-lg-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>virtual_mem</h5>
<h5>内存</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
@@ -303,7 +303,7 @@
<div class="col-lg-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>connection num</h5>
<h5>连接数</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
@@ -324,7 +324,7 @@
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>bandwidth</h5>
<h5>带宽</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
@@ -345,7 +345,7 @@
<div class="col-lg-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>traffic</h5>
<h5>流量统计</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
@@ -363,7 +363,7 @@
<div class="col-lg-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>types</h5>
<h5>类型</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
@@ -397,7 +397,7 @@
legend: {
orient: 'vertical',
left: 'left',
data: ['inlet flow', 'export flow']
data: ['出口流量', '入口流量']
},
series: [
{
@@ -406,8 +406,8 @@
radius: '55%',
center: ['50%', '60%'],
data: [
{value:{{.data.inletFlowCount}}, name: 'inlet flow'},
{value:{{.data.exportFlowCount}}, name: 'export flow'},
{value:{{.data.inletFlowCount}}, name: '入口流量'},
{value:{{.data.exportFlowCount}}, name: '出口流量'},
],
itemStyle: {
emphasis: {
@@ -435,7 +435,7 @@
legend: {
orient: 'vertical',
left: 'left',
data: ['tcp', 'socks5', 'http', 'udp', 'host', 'secret', 'p2p']
data: ['tcp隧道数量', 'socks5隧道数量', 'http代理隧道数量', 'udp隧道数量', '域名解析数量', '私密代理数量', 'p2p数量']
},
series: [
{
@@ -444,13 +444,13 @@
radius: '55%',
center: ['50%', '60%'],
data: [
{value:{{.data.tcpC}}, name: 'tcp'},
{value:{{.data.socks5Count}}, name: 'socks5'},
{value:{{.data.httpProxyCount}}, name: 'http'},
{value:{{.data.udpCount}}, name: 'udp'},
{value:{{.data.hostCount}}, name: 'host'},
{value:{{.data.secretCount}}, name: 'secret'},
{value:{{.data.p2pCount}}, name: 'p2p'},
{value:{{.data.tcpC}}, name: 'tcp隧道数量'},
{value:{{.data.socks5Count}}, name: 'socks5隧道数量'},
{value:{{.data.httpProxyCount}}, name: 'http代理隧道数量'},
{value:{{.data.udpCount}}, name: 'udp隧道数量'},
{value:{{.data.hostCount}}, name: '域名解析数量'},
{value:{{.data.secretCount}}, name: '私密代理数量'},
{value:{{.data.p2pCount}}, name: 'p2p数量'},
],
itemStyle: {
emphasis: {
@@ -477,7 +477,7 @@
option = null;
option = {
title: {
text: 'load'
text: '负载'
},
tooltip: {
trigger: 'axis'
@@ -536,7 +536,7 @@
option = null;
option = {
title: {
text: 'cpu'
text: 'CPU'
},
tooltip: {
trigger: 'axis'
@@ -583,7 +583,7 @@
option = null;
option = {
title: {
text: 'memory'
text: '内存'
},
tooltip: {
trigger: 'axis'
@@ -637,7 +637,7 @@
option = null;
option = {
title: {
text: 'connection num(establish)'
text: '连接数establish'
},
tooltip: {
trigger: 'axis'
@@ -691,7 +691,7 @@
option = null;
option = {
title: {
text: 'bandwidth'
text: '带宽'
},
tooltip: {
trigger: 'axis',
@@ -753,4 +753,4 @@
this.myChart7.resize();
});
</script>
</script>

View File

@@ -19,7 +19,7 @@
<div class="table-responsive">
<div id="toolbar">
<a href="/index/add?type={{.type}}&client_id={{.client_id}}" class="btn btn-primary dim"
type="button">new</a>
type="button" langtag="info-new">新增</a>
</div>
<table id="taskList_table" class="table-striped table-hover"
data-mobile-responsive="true"></table>
@@ -47,8 +47,10 @@
"limit": params.limit,
"type":{{.type}},
"client_id":{{.client_id}},
"search": params.search
}
},
search: true,
contentType: "application/x-www-form-urlencoded",
striped: true, // 设置为true会有隔行变色效果
showHeader: true,
@@ -61,12 +63,12 @@
detailView: true,
smartDisplay: true, // 智能显示 pagination 和 cardview 等
detailFormatter: function (index, row, element) {
return '<b>export flow: </b>' + change(row.Flow.ExportFlow) + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
+ '<b>inlet flow: </b>' + change(row.Flow.InletFlow) + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp` + "<br/><br>"
+ '<b>crypt: </b>' + row.Client.Cnf.Crypt + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
+ '<b>compress: </b>' + row.Client.Cnf.Compress + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
+ '<b>username: </b>' + row.Client.Cnf.U + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
+ '<b>password: </b>' + row.Client.Cnf.P + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
return '<b langtag="info-export-flow">出口流量</b>' + change(row.Flow.ExportFlow) + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
+ '<b langtag="info-inlet-flow">入口流量</b>' + change(row.Flow.InletFlow) + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp` + "<br/><br>"
+ '<b langtag="info-crypt">加密</b>' + row.Client.Cnf.Crypt + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
+ '<b langtag="info-compress">压缩</b>' + row.Client.Cnf.Compress + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
+ '<b langtag="info-web-auth-username">basic权限认证用户名</b>' + row.Client.Cnf.U + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
+ '<b langtag="info-web-auth-password">basic权限认证密码</b>' + row.Client.Cnf.P + `&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp`
},
//表格的列
columns: [