123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="row">
- <div class="col-lg-12">
- <div class="ibox float-e-margins">
- <div class="ibox-title">
- <h5 langtag="page-hostlist"></h5>
- <div class="ibox-tools">
- <a class="collapse-link">
- <i class="fa fa-chevron-up"></i>
- </a>
- <a class="close-link">
- <i class="fa fa-times"></i>
- </a>
- </div>
- </div>
- <div class="content">
- <div class="table-responsive">
- <div id="toolbar">
- <a href="{{.web_base_url}}/index/addhost?vkey={{.task_id}}&client_id={{.client_id}}" class="btn btn-primary dim">
- <i class="fa fa-fw fa-lg fa-plus"></i> <span langtag="word-add"></span></a>
- </div>
- <table id="taskList_table" class="table-striped table-hover"
- data-mobile-responsive="true"></table>
- </div>
- </div>
- <div class="ibox-content">
- <table id="table"></table>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
-
- $('#table').bootstrapTable({
- toolbar: "#toolbar",
- method: 'post',
- url: window.location,
- queryParams: function (params) {
- return {
- "offset": params.offset,
- "limit": params.limit,
- "search": params.search
- }
- },
- search: true,
- contentType: "application/x-www-form-urlencoded",
- striped: true,
- showHeader: true,
- showColumns: true,
- showRefresh: true,
- pagination: true,
- sidePagination: 'server',
- pageNumber: 1,
- pageList: [5, 10, 20, 50],
- detailView: true,
- smartDisplay: true,
- onExpandRow: function () {$('body').setLang ('.detail-view');},
- onPostBody: function (data) { if ($(this)[0].locale != undefined ) $('body').setLang ('#table'); },
- detailFormatter: function (index, row, element) {
- return '<b langtag="word-exportflow"></b>: ' + changeunit(row.Flow.ExportFlow) + ' '
- + '<b langtag="word-inletflow"></b>: ' + changeunit(row.Flow.InletFlow) + ' '
- + '<b langtag="word-crypt"></b>: ' + row.Client.Cnf.Crypt + ' '
- + '<b langtag="word-compress"></b>: ' + row.Client.Cnf.Compress + ' '
- + '<b langtag="word-basicusername"></b>: ' + row.Client.Cnf.U + ' '
- + '<b langtag="word-basicpassword"></b>: ' + row.Client.Cnf.P + ' <br/><br>'
- + '<b langtag="word-httpscert"></b>: ' + row.CertFilePath + ' '
- + '<b langtag="word-httpskey"></b>: ' + row.KeyFilePath + ' <br/><br>'
- + '<b langtag="word-requestheader"></b>: ' + row.HeaderChange + ' <br/><br>'
- + '<b langtag="word-requesthost"></b>: ' + row.HostChange + ' '
- },
-
- columns: [
- {
- field: 'Id',
- title: '<span langtag="word-id"></span>',
- halign: 'center',
- visible: true
- },
- {
- field: 'Id',
- title: '<span langtag="word-clientid"></span>',
- halign: 'center',
- visible: true,
- formatter: function (value, row, index) {
- return row.Client.Id
- }
- },
- {
- field: 'Remark',
- title: '<span langtag="word-remark"></span>',
- halign: 'center',
- visible: true
- },
- {
- field: 'Host',
- title: '<span langtag="word-host"></span>',
- halign: 'center',
- visible: true
- },
- {
- field: 'Scheme',
- title: '<span langtag="word-scheme"></span>',
- halign: 'center',
- visible: true,
- formatter: function (value, row, index) {
- return '<span langtag="word-' +value+ '"></span>'
- }
- },
- {
- field: 'Target',
- title: '<span langtag="word-target"></span>',
- halign: 'center',
- visible: true,
- formatter: function (value, row, index) {
- return row.Target.TargetStr
- }
- },
- {
- field: 'Location',
- title: '<span langtag="word-location"></span>',
- halign: 'center',
- visible: true
- },
- {
- field: '',
- title: '<span langtag="word-clientstatus"></span>',
- align: 'center',
- halign: 'center',
- visible: true,
- formatter: function (value, row, index) {
- hosturl = ((row.Scheme == 'http' ) ? 'http://' : 'https://') + row.Host + row.Location
- if (row.Client.IsConnect) {
- return '<a href="' + hosturl + '" target="_blank"><span class="badge badge-primary" langtag="word-online"></span></a>'
- } else {
- return '<span class="badge badge-badge" langtag="word-offline"></span>'
- }
- }
- },
- {
- field: 'option',
- title: '<span langtag="word-option"></span>',
- align: 'center',
- halign: 'center',
- visible: true,
- formatter: function (value, row, index) {
- btn_group = '<div class="btn-group">'
- btn_group += "<a onclick=\"submitform('delete', '{{.web_base_url}}/index/delhost', {'id':" + row.Id
- btn_group += '})" class="btn btn-outline btn-danger"><i class="fa fa-trash"></i></a>'
- btn_group += '<a href="{{.web_base_url}}/index/edithost?id=' + row.Id
- btn_group += '" class="btn btn-outline btn-success"><i class="fa fa-edit"></i></a></div>'
- return btn_group
- }
- }
- ]
- });
- </script>
|