dynamically find the Level col index

pull/3054/head
Andrew Bauer 2020-09-25 21:26:22 -05:00
parent f4e7e264f0
commit b7efdebf9a
1 changed files with 5 additions and 1 deletions

View File

@ -64,9 +64,13 @@ function initPage() {
// Assign inf, err, fat, dbg color classes to the rows in the table
table.on('post-body.bs.table', function(data) {
var lvl_ndx = $j('#logTable tr th').filter(function() {
return $j(this).text().trim() == 'Level';
}).index();
$j('#logTable tr').each(function(ndx, row) {
var row = $j(row);
var level = row.find('td:eq(4)').text();
var level = row.find('td').eq(lvl_ndx).text().trim();
if (( level == 'FAT' ) || ( level == 'PNC' )) {
row.addClass('log-fat');