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
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...