@richielynch89 can you try the following updated JS and confirm? require([
'underscore',
'jquery',
'splunkjs/mvc',
'splunkjs/mvc/tableview',
'splunkjs/mvc/simplexml/ready!'
], function (_, $, mvc, TableView) {
mvc.Components.get('highlight').getVisualization(function (tableView) {
tableView.on('rendered', function () {
setTimeout(function () {
$('div#highlight table td[data-cell-index="1"] div.multivalue-subcell,td[data-cell-index="1"]').each(function () {
var strMultiValueTest = $(this).text();
if(strMultiValueTest.length>8){
// DO NOTHING - td for multivalue need not be handled.
}
else if (strMultiValueTest < "05:00:00") {
$(this).css("background-color", "green");
}
else if (strMultiValueTest >= "05:00:00" && strMultiValueTest <= "16:00:00") {
$(this).css("background-color", "orange");
} else {
$(this).css("background-color", "red");
}
});
}, 100);
});
});
}); While selecting the Table Cell I have added condition for td being highlighted if it is not a multi-value field. (Assuming multivalue cell will have length >8 because of multiple HH:MM:SS format.) Also replace Existing Simple XML CSS override with the following: <html>
<style>
#highlight td[data-cell-index="1"]{
padding: 0px;
text-align: center;
}
</style>
</html>
... View more