d01ebdd115
-Added new public api setting for enabling disabling public use of /ext/getnetworkpeers api -Added new entry to the /info api page for the /ext/getnetworkpeers api -Integrated /ext/getnetworkpeers api into the network page + network includes and removed the deleted /ext/connections api references
60 lines
2.0 KiB
Plaintext
60 lines
2.0 KiB
Plaintext
script.
|
|
$(document).ready(function() {
|
|
$('#connections-table').dataTable({
|
|
autoWidth: true,
|
|
searching: false,
|
|
ordering: false,
|
|
responsive: true,
|
|
lengthChange: true,
|
|
processing: true,
|
|
scrollX: true,
|
|
language: {
|
|
paginate: {
|
|
previous: '<',
|
|
next: '>'
|
|
}
|
|
},
|
|
ajax: {
|
|
url: '/ext/getnetworkpeers/internal',
|
|
dataSrc: function (json) {
|
|
return json.data;
|
|
}
|
|
},
|
|
rowCallback: function (row, data, index) {
|
|
var flagBlock = '';
|
|
if (data['country_code'].length > 1) {
|
|
flagBlock = '<div class="margin-left-5 flag-icon flag-icon-'+data['country_code'].toLowerCase()+'"></div>';
|
|
}
|
|
$("td:eq(0)", row).html(data['address']).addClass('breakWord');
|
|
$("td:eq(1)", row).html(data['protocol']);
|
|
$("td:eq(2)", row).html(data['version']);
|
|
$("td:eq(3)", row).html(data['country']+flagBlock);
|
|
},
|
|
fnDrawCallback: function(settings) {
|
|
fixDataTableColumns();
|
|
fixFooterHeightAndPosition();
|
|
},
|
|
columns: [
|
|
{ data: 'address', width: '25%' },
|
|
{ data: 'protocol', width: '25%' },
|
|
{ data: 'version', width:'25%' },
|
|
{ data: 'country', width: '25%'}
|
|
]
|
|
});
|
|
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
|
fixDataTableColumns();
|
|
fixFooterHeightAndPosition();
|
|
});
|
|
});
|
|
.card.card-default.border-0
|
|
table#connections-table.table.table-bordered.table-striped.table-paging.mobile-border-right
|
|
- var theadClasses = [];
|
|
if settings.display.table_header_bgcolor != null && settings.display.table_header_bgcolor != ''
|
|
- theadClasses.push('thead-' + settings.display.table_header_bgcolor);
|
|
thead(class=theadClasses)
|
|
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 |