Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Table cell renderer does not work on Firefox

$
0
0
I've very similar javascript as below in my dashboard which adds up the color in the table. As I've updated dashboard.css I cannot utilize XML color palette, so I had to use table cell renderer. require([ 'underscore', 'jquery', 'splunkjs/mvc', 'splunkjs/mvc/tableview', 'splunkjs/mvc/simplexml/ready!' ], function(_, $, mvc, TableView) { var CustomRangeRenderer = TableView.BaseCellRenderer.extend({ canRender: function(cell) { // Point-C return _(['My Column Name', 'Name']).contains(cell.field); }, render: function($td, cell) { // Point-D if(cell.value=="red" || cell.value=="green" || cell.value=="yellow") { $td.html("
") } else if(cell.value=="NoData" || cell.value=="null") { $td.html("
") } else { $td.html("
"+cell.value+"
") } } }); //List of table IDs to add icon var tableIDs = ["Mytable1", "Mytable2"]; for (i=0;i

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>