Files
purple-explorer/views/includes/net_list.pug
T
2020-11-20 20:27:02 -07:00

41 lines
1.5 KiB
Plaintext

script.
$(document).ready(function(){
var ctable = $('#connections-table').dataTable( {
autoWidth: true,
searching: false,
ordering: false,
responsive: true,
lengthChange: true,
processing: true,
ajax: {
url: '/ext/connections',
dataSrc: function ( json ) {
/*for ( var i=0;i<json.data.length; i++ ) {
json.data[i]['timestamp'] = new Date((json.data[i]['timestamp']) * 1000).toUTCString();
json.data[i]['txid'] = "<a href='/tx/" + json.data[i]['txid'] + "'>" + json.data[i]['txid'] + "</a>";
json.data[i]['blockindex'] = "<a href='/block/" + json.data[i]['blockhash'] + "'>" + json.data[i]['blockindex'] + "</a>";
var amount = json.data[i]['total'] / 100000000;
json.data[i]['total'] = amount.toFixed(8);
json.data[i]['recipients'] = json.data[i]['vout'].length;
}*/
return json.data;
}
},
columns: [
{ data: 'address', width: '25%' },
{ data: 'protocol', width: '25%' },
{ data: 'version', width:'25%' },
{ data: 'country', width: '25%'}
]
});
});
.panel.panel-default
table#connections-table.table.table-bordered.table-striped
thead
tr
th.text-center #{settings.locale.net_address}
th.text-center #{settings.locale.net_protocol}
th.text-center #{settings.locale.net_subversion}
th.text-center #{settings.locale.net_country}
tbody.text-center