Fixed sorting by "client id" and "last status"
This commit is contained in:
parent
b866da9698
commit
6cd6b1b630
1 changed files with 36 additions and 28 deletions
10
index.html
10
index.html
|
@ -16,7 +16,7 @@
|
|||
.offline { color: red}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.12.4.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="https://code.jquery.com/jquery-1.12.4.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.6.1/jquery.timeago.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||
|
@ -221,12 +221,17 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
function laststatus( data, type, row ) {
|
||||
if (type !== 'sort') {
|
||||
var date = new Date(data*1000);
|
||||
|
||||
return '<span data-toggle="tooltip" title="' + date + '">' + jQuery.timeago(date) + '</span>';
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function clientInfo( data, type, row ) {
|
||||
if (type !== 'sort') {
|
||||
var tooltip = "CPU: " + row.client_status.cpu_brand + " [" + row.client_status.cpu_cores + " cores]";
|
||||
tooltip += '\n';
|
||||
tooltip += "CPU Flags: " + (row.client_status.cpu_has_aes ? "AES-NI " : "");
|
||||
|
@ -256,6 +261,9 @@ function clientInfo( data, type, row ) {
|
|||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function round( data, type, row ) {
|
||||
return Math.round(data * 100) / 100;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue