Dashboards & Visualizations

Add a help panel to a dashboard?

Motivator

Hi,

I have a dashboard that I would like to add a "help" panel/text to. I'd like it to be hidden by default but when a user presses a button/radio button/something, the panel with the help instructions show up and then when the user is done the user would click inside the panel and it hides.

Is something like this possible?

0 Karma
1 Solution

SplunkTrust
SplunkTrust

You could add an HTML panel that depends on a token, this token gets set by your button/radio button/something which in turn makes the depending panel appear.

<form>
  <fieldset submitButton="false">
    <input type="radio" token="dummy" searchWhenChanged="true">
      <label>Show Help:</label>
      <default>No</default>
      <choice value="No">No</choice>
      <choice value="Yes">Yes</choice>
      <change>
        <condition value="No">
          <unset token="showhelp" />
        </condition>
        <condition value="Yes">
          <set token="showhelp">awwwyeah</set>
        </condition>
      </change>
    </input>
  </fieldset>

  <row>
    <panel depends="$showhelp$">
      <html>
        <h1>
          HTML Panels
        </h1>
        <p>Easily add content to clarify use of a dashboard.</p>
      </html>
    </panel>
  </row>
</form>

View solution in original post

0 Karma

SplunkTrust
SplunkTrust

You could add an HTML panel that depends on a token, this token gets set by your button/radio button/something which in turn makes the depending panel appear.

<form>
  <fieldset submitButton="false">
    <input type="radio" token="dummy" searchWhenChanged="true">
      <label>Show Help:</label>
      <default>No</default>
      <choice value="No">No</choice>
      <choice value="Yes">Yes</choice>
      <change>
        <condition value="No">
          <unset token="showhelp" />
        </condition>
        <condition value="Yes">
          <set token="showhelp">awwwyeah</set>
        </condition>
      </change>
    </input>
  </fieldset>

  <row>
    <panel depends="$showhelp$">
      <html>
        <h1>
          HTML Panels
        </h1>
        <p>Easily add content to clarify use of a dashboard.</p>
      </html>
    </panel>
  </row>
</form>

View solution in original post

0 Karma

SplunkTrust
SplunkTrust

There are several issues with your attempt:

  • Your token $showhelp$ would be set at any given time, so the depends will always show the panel
  • A panel doesn't have a label child element
  • Your row element is inside the panel, it should be the other way 'round

I've added a working example to the answer.

Path Finder

This great. Very simple to use. A lot eaiser than all the js versions out there!

0 Karma

Motivator

Hi Martin!

Many thanks!!! That did the trick!

0 Karma

SplunkTrust
SplunkTrust

Grab the Splunk 6.x Dashboard Examples app: https://splunkbase.splunk.com/app/1603/

You'll find an example for basic HTML panels and examples showing and hiding panels (e.g. Null Search Swapper, Link Switcher).

0 Karma

Motivator

OK I've taken a few stabs at this and so far no luck.

Here is what I have. When the radio button gets changed to Yes, the panel doesn't appear.

 <input type="radio" token="showhelp" searchWhenChanged="true">
      <label>Show Help:</label>
      <default>No</default>
      <choice value="No">No</choice>
      <choice value="Yes">Yes</choice>
    </input>

  </fieldset>


  <panel depends="$showhelp$">
    <label>Dashboard Help</label>
    <row>
        <html>
            <h1>
                HTML Panels
            </h1>
            <p>Easily add content to clarify use of a dashboard.</p>
        </html>
    </row>
  </panel>
0 Karma

Motivator

Thats what I was thinking but unsure how to go about it. Could you provide an example?

0 Karma