Last active
December 16, 2015 02:09
-
-
Save LukeMurphey/5360789 to your computer and use it in GitHub Desktop.
This segment of application JS causes Simple Results Table in Splunk to include the field value as an attribute in the table cells. This allows you to style the cells based on the contents.
Tags: #splunk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if( Splunk.Module.SimpleResultsTable ){ | |
Splunk.Module.SimpleResultsTable = $.klass(Splunk.Module.SimpleResultsTable, { | |
renderResults: function($super, htmlFragment) { | |
$super(htmlFragment); | |
if (this.getInferredEntityName()=="events") { | |
this.renderedCount = $("tr", this.container).length - 1; | |
} | |
$.each( $('.simpleResultsTable td'), function(index, value) { | |
$(this).attr('data-value', $(this).text() ); | |
}); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment