mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-02 03:16:53 +00:00
Code optimization
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
<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>
|
||||
10.1.50.202:22">{{.t.Target.TargetStr}}</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>
|
||||
@@ -89,7 +89,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>新增
|
||||
class="fa fa-fw fa-lg fa-eye"></i><span langtag="info-save">保存</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -49,7 +49,7 @@
|
||||
<textarea class="form-control" rows="4" type="text" name="target"
|
||||
placeholder="such as
|
||||
10.1.50.203:80
|
||||
10.1.50.202:80">{{.h.Target}}</textarea>
|
||||
10.1.50.202:80">{{.h.Target.TargetStr}}</textarea>
|
||||
<span class="help-block m-b-none">Line break if load balancing</span>
|
||||
|
||||
</div>
|
||||
@@ -74,7 +74,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>新增
|
||||
class="fa fa-fw fa-lg fa-eye"></i><span langtag="info-save">保存</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -77,13 +77,13 @@
|
||||
field: 'Id',//域值
|
||||
title: 'id',//标题
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
|
||||
},
|
||||
{
|
||||
field: 'Id',//域值
|
||||
title: 'client id',//标题
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
|
||||
formatter: function (value, row, index) {
|
||||
return row.Client.Id
|
||||
}
|
||||
@@ -92,37 +92,40 @@
|
||||
field: 'Remark',//域值
|
||||
title: 'remark',//标题
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
|
||||
},
|
||||
{
|
||||
field: 'Host',//域值
|
||||
title: 'host',//标题
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
|
||||
},
|
||||
{
|
||||
field: 'Scheme',//域值
|
||||
title: 'scheme',//标题
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
|
||||
},
|
||||
{
|
||||
field: 'Target',//域值
|
||||
title: 'target',//标题
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
|
||||
formatter: function (value, row, index) {
|
||||
return row.Target.TargetStr
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'Location',//域值
|
||||
title: 'location',//标题
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
|
||||
},
|
||||
{
|
||||
field: '',//域值
|
||||
title: 'client status',//内容
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
|
||||
formatter: function (value, row, index) {
|
||||
if (row.Client.IsConnect) {
|
||||
return '<span class="badge badge-primary">online</span>'
|
||||
@@ -135,7 +138,7 @@
|
||||
field: 'option',//域值
|
||||
title: 'option',//内容
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
|
||||
formatter: function (value, row, index) {
|
||||
btn_group = '<div class="btn-group">'
|
||||
btn = `<button onclick="del(` + row.Id + `)" class="btn-danger"><i class="fa fa-trash"></i></button><button onclick="edit(` + row.Id + `)" class="btn-primary"><i class="fa fa-edit"></i></button></div>`
|
||||
|
@@ -76,13 +76,11 @@
|
||||
field: 'Id',//域值
|
||||
title: 'id',//标题
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
},
|
||||
{
|
||||
field: 'Id',//域值
|
||||
title: 'client id',//标题
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
formatter: function (value, row, index) {
|
||||
return row.Client.Id
|
||||
}
|
||||
@@ -91,37 +89,36 @@
|
||||
field: 'Remark',//域值
|
||||
title: 'remark',//标题
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
},
|
||||
{
|
||||
field: 'Mode',//域值
|
||||
title: 'mode',//标题
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
},
|
||||
{
|
||||
field: 'Port',//域值
|
||||
title: 'port',//标题
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
},
|
||||
{
|
||||
field: 'Target',//域值
|
||||
title: 'target',//标题
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
formatter: function (value, row, index) {
|
||||
return row.Target.TargetStr
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'Password',//域值
|
||||
title: 'secret',//标题
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
|
||||
},
|
||||
{
|
||||
field: 'Status',//域值
|
||||
title: 'setting',//内容
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
|
||||
formatter: function (value, row, index) {
|
||||
if (value) {
|
||||
return '<span class="badge badge-primary">open</span>'
|
||||
@@ -134,7 +131,7 @@
|
||||
field: 'RunStatus',//域值
|
||||
title: 'run',//内容
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
|
||||
formatter: function (value, row, index) {
|
||||
if (value) {
|
||||
return '<span class="badge badge-primary">open</span>'
|
||||
@@ -147,7 +144,7 @@
|
||||
field: '',//域值
|
||||
title: 'client',//内容
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
|
||||
formatter: function (value, row, index) {
|
||||
if (row.Client.IsConnect) {
|
||||
return '<span class="badge badge-primary">online</span>'
|
||||
@@ -160,7 +157,7 @@
|
||||
field: 'option',//域值
|
||||
title: 'option',//内容
|
||||
visible: true,//false表示不显示
|
||||
sortable: true,//启用排序
|
||||
|
||||
formatter: function (value, row, index) {
|
||||
btn_group = '<div class="btn-group">'
|
||||
btn = `<button onclick="del(` + row.Id + `)" class="btn-danger"><i class="fa fa-trash"></i></button><button onclick="edit(` + row.Id + `)" class="btn-primary"><i class="fa fa-edit"></i></button></div>`
|
||||
|
Reference in New Issue
Block a user