Dashboards & Visualizations

How to make sure hidden dashboard panels do not appear on exported PDF in simple xml?

cmerriman
Super Champion

Currently, I have this html piece in my dashboard to hide panels that people may or may not need to see:

    <div id="slider1" class="splunk-view" data-require="app/custom_simplexml_extensions/components/slidepanel/slidepanelgroup" data-options="{&quot;items&quot;: [&quot;panel11&quot;]}"/>
    </html>

this code works well to hide my panel in the dashboard, and if i hit the 'print' button, however, when we use the 'export pdf' button, the hidden panel is still there.

is there any way, using this method or another, to hide panels not based on search results and keep the hidden panels out of the pdf?

1 Solution

cmerriman
Super Champion

I did find a solution.

I created inputs:

  <input type="checkbox" token="overview" searchWhenChanged="true">
    <label>Overview</label>
    <choice value="true">Show</choice>
    <change>
      <condition label="Show">
        <set token="overview">true</set>
      </condition>
    </change>
    <default>true</default>
  </input>

and then created a depends statement in my panel I wanted the ability to hide:

<panel depends="$overview$">
  <single>
    <search>

.
.
.

I don't think I need the portion, but I put it there for good measure. I had to do this multiple times to hide different panels (in the end I created maybe 5 inputs to hide 5 panels) because I can't figure out a way to create just one input that you can pick and choose the panels to hide.

View solution in original post

cmerriman
Super Champion

I did find a solution.

I created inputs:

  <input type="checkbox" token="overview" searchWhenChanged="true">
    <label>Overview</label>
    <choice value="true">Show</choice>
    <change>
      <condition label="Show">
        <set token="overview">true</set>
      </condition>
    </change>
    <default>true</default>
  </input>

and then created a depends statement in my panel I wanted the ability to hide:

<panel depends="$overview$">
  <single>
    <search>

.
.
.

I don't think I need the portion, but I put it there for good measure. I had to do this multiple times to hide different panels (in the end I created maybe 5 inputs to hide 5 panels) because I can't figure out a way to create just one input that you can pick and choose the panels to hide.

SwatiApte
Path Finder

Hi,

Have you been able to fix this issue? I am facing a similar issue.

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...