diff --git a/html/index.html b/html/index.html
index cf68d76..b49020a 100644
--- a/html/index.html
+++ b/html/index.html
@@ -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
} );
diff --git a/html/js/functions.js b/html/js/functions.js
index 184f71c..300bd26 100644
--- a/html/js/functions.js
+++ b/html/js/functions.js
@@ -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);
diff --git a/html/js/version.js b/html/js/version.js
index 38bede9..3de6a82 100644
--- a/html/js/version.js
+++ b/html/js/version.js
@@ -1 +1 @@
-var dashboard_version = "2021-02-06 10:37:55";
+var dashboard_version = "2021-02-06 13:21:13";