All Apps and Add-ons

Unable display table in IE 10 if I rename the fields to empty

cycheng
Path Finder

I tried on Sideview Utils 2.4.9 and 2.6.5, both can't display table in IE 10 if I rename the fields to empty.

I have a search as below:

..| transpose

and my xml file:

<module name="Search">
  <param name="search">mysearch</param>
    <module name="Table">
      <param name="customBehavior">changeTextToLink</param>
    module>
module>

I can see the table display nicely in FireFox and Internet Explorer 10.

After that I change my search as below:
..| transpose | rename column AS " " | rename "row 1" AS " "

It works well in Firefox but I only can see a table with empty cell in IE 10. It is anything I can do to make it work in IE 10?

sideview
SplunkTrust
SplunkTrust

Internet Explorer has some idiosyncracies in how it treats whitespace in xml documents, or at least some inconsistencies compared to how other modern browsers do it. To fix this problem would require some very substantial changes to the Table module, and it would introduce a lot of instability for not very much gain.

Fortunately, there is a much better way to get your end result. Rather than renaming one field to " " (space character), and the other to " " (two space characters),

a) just leave the field names as they are. As a nice side effect your drilldown logic wont also get really bizarre space-character-itis.

b) Add a little customBehavior to your app. Change your Table to this:

<module name="Table">
  <param name="customBehavior">no column row</param>
</module>

and add this to application.js in your app:

if (typeof(Sideview)!="undefined") {
    Sideview.utils.declareCustomBehavior("no column row", function(module) {
        module.renderColumnRow = function(response, tr) {
            tr.append($('<th colspan="20">'));
        }
    });
}

The end result will be that there is no visible column row at all, not just column headers whose labels are space characters.

Note: If your app doesn't already have an application.js file then you'll have to create one, AND you'll have to restart splunkWeb for it to get picked up.

And on the other hand if your app does have an application.js file you'll want to navigate to the "bump" endpoint and click the button you see there. (ie http://YOURHOST:8000/en-US/_bump ) to deal with browser-cache issues after you add the code to application.js.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...