1
0
Fork 0

Colorizing LOSS and BER if no good and reworking TXing-colorization

main
Kim Huebel 4 years ago
parent 26c2e0231e
commit 56efaec5a8

@ -288,17 +288,40 @@
} );
var t_lh = $('#lastHeard').DataTable( {
"createdRow": function( row, data, dataIndex ) {
"order": [[ 0, "desc" ]],
"columnDefs": [
{ className: "dt-nowrap", "targets": [ 0, 1, 2, 3, 7 ] }
],
'rowCallback': function(row, data, index){
// Calculating LOSS
if(parseInt(data[6].substring(0, data[6].indexOf("%"))) <= 5){
$(row).find('td:eq(6)').css('color', 'black');
}
if(parseInt(data[6].substring(0, data[6].indexOf("%"))) > 5){
$(row).find('td:eq(6)').css('color', 'orange');
}
if(parseInt(data[6].substring(0, data[6].indexOf("%"))) > 15){
$(row).find('td:eq(6)').css('color', 'red');
}
// Calculating BER
if(parseFloat(data[7].substring(0, data[7].indexOf("%"))) <= 0.5){
$(row).find('td:eq(7)').css('color', 'black');
}
if(parseFloat(data[7].substring(0, data[7].indexOf("%"))) > 0.5){
$(row).find('td:eq(7)').css('color', 'orange');
}
if(parseFloat(data[7].substring(0, data[7].indexOf("%"))) > 2){
$(row).find('td:eq(7)').css('color', 'red');
}
// Detecting TXing
if ( data[5] == "TXing" ) {
$(row).addClass('red');
} else {
$(row).removeClass('red');
}
},
"order": [[ 0, "desc" ]],
"columnDefs": [
{ className: "dt-nowrap", "targets": [ 0, 1, 2, 3, 7 ] }
],
"autoWidth": false
} );

@ -590,11 +590,13 @@ function getLastHeard(document, event) {
}
if (rowIndexes[0]) {
var row = t_lh.row(rowIndexes[0]).node();
/*
if (txing) {
$(row).addClass('red');
} else {
$(row).removeClass('red');
}
*/
var temp = t_lh.row(rowIndexes[0]).data();
logIt("Temp: "+ temp);
logIt("Duration: " + duration);

@ -1 +1 @@
var dashboard_version = "2021-02-06 10:37:55";
var dashboard_version = "2021-02-06 13:21:13";

Loading…
Cancel
Save