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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...