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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...