Dashboards & Visualizations
Highlighted

HTML compatibility issues between Splunk 6.1 and 6.2. Why does my panel title disappear when the page loads in 6.2?

Explorer

I've the following code which is working perfectly fine with Splunk 6.1:

<div class="dashboard-cell" style="width: 30%;">
            <div class="dashboard-panel">
                <div class="panel-head">
                    <div align="center" class="abc">Panel Title</div>
                </div>
                <div class="panel-body">
                    <!-- Place panel contents here -->
                </div>
           </div>
  </div>

But when I moved this to Splunk 6.2, I'm not able to see the "Panel Title". It just flashes for a moment when the page loads and then goes away. If I use <h> tags instead of <div> under class="panel-head", then I'm able to see that.

<div class="dashboard-cell" style="width: 30%;">
            <div class="dashboard-panel">
                <div class="panel-head">
                    <h3>Panel Title</h3>
                </div>
                <div class="panel-body">
                    <!-- Place panel contents here -->
                </div>
            </div>
        </div>

So can anybody explain me this behavior?
Thanks in advance!!

0 Karma
Highlighted

Re: HTML compatibility issues between Splunk 6.1 and 6.2. Why does my panel title disappear when the page loads in 6.2?

Contributor

Those tags and div classes are available in 6.2, so that's a bit strange. Try checking your browser's web console to see if any errors are being logged. If you are using Firefox:

  • either select "Web Console" from the Web Developer submenu in the Firefox Menu (or Tools menu if you display the menu bar or are on Mac OS X)
  • or press the --K (--K on OS X) keyboard shortcut.

Further info here: Opening the Web Console

0 Karma
Highlighted

Re: HTML compatibility issues between Splunk 6.1 and 6.2. Why does my panel title disappear when the page loads in 6.2?

Explorer

There are no errors on the console. I checked that in different browsers but the result is same.
Even I'm not sure why Splunk 6.2+ is expecting only an h tag under div class="panel-head" tag. Is it a bug?
This caused a great trouble for me as the whole CSS needs to be changed to get the same styling as Splunk 6.1 dashboard.

0 Karma
Highlighted

Re: HTML compatibility issues between Splunk 6.1 and 6.2. Why does my panel title disappear when the page loads in 6.2?

Contributor

I wouldn't classify it as a bug since putting an h tag there is well-formed HTML. I'd guess that the parser in 6.1 assumed an h tag, whereas the 6.2 parser requires an h tag, reducing the potential for errors due to errors when guessing the HTML structure.

You could write a script to update these dashboard panels using command line tools like awk and sed, or a scripting language like python or ruby.

View solution in original post

Highlighted

Re: HTML compatibility issues between Splunk 6.1 and 6.2. Why does my panel title disappear when the page loads in 6.2?

Explorer

Yeah did that only. Thanks for your help !!!
If you want you can submit this as answer. I'll accept it. 🙂

0 Karma
Highlighted

Re: HTML compatibility issues between Splunk 6.1 and 6.2. Why does my panel title disappear when the page loads in 6.2?

Contributor

Glad I was able to help. Changed to an answer.

0 Karma