All Apps and Add-ons

How to create a button on a dashboard ?

theouhuios
Motivator

Hello

I am trying to create a Button which when clicked will open up an external link which would be the help document of that dashboard. Any help or ideas on how to do this?

Update:

I tried using HTML module in this and it works. But the modules below aren't getting any data and the dashboards are not being populated because of this.

<module name="HTML"  layoutPanel="appHeader">
                      <param name="html"><![CDATA[

                        <div>Ch.

                        <a class="rawLink" href="xxx
" target="_blank">Help Document</a>
                        </div>]]></param>
                    </module>

theou

1 Solution

theouhuios
Motivator

This is what I did to make it work.

<module name="StaticContentSample" layoutPanel="appHeader">
        <param name="text">&lt;p&gt;&lt;font color="0X9AAB1F"&gt;&lt;h2&gt;Want to know more about this dashboard? Check out the online &lt;a target="_blank" href=xxx</param>
        <module name="Gimp"/>
      </module>

View solution in original post

theouhuios
Motivator

This is what I did to make it work.

<module name="StaticContentSample" layoutPanel="appHeader">
        <param name="text">&lt;p&gt;&lt;font color="0X9AAB1F"&gt;&lt;h2&gt;Want to know more about this dashboard? Check out the online &lt;a target="_blank" href=xxx</param>
        <module name="Gimp"/>
      </module>

sideview
SplunkTrust
SplunkTrust

Well if you want it to look like a button, the easiest thing is to use a Button and a Redirector probably

<module name="Button">
  <param name="label">help</param>
  <module name="Redirector">
    <param name="url">http://google.com?q=something</param>
  </module>
</module>

As to why the HTML module you used disrupted the other modules below.... something else must be going on because that's not really possible. That HTML module looks fine. But I'm happy to help track down whatever it is if I can.

sideview
SplunkTrust
SplunkTrust

Well, you can add an HTML module to a view without including the SideviewUtils module at the top, and it will work, in that the HTML will render. However the javascript to run the module will be missing and this will derail a lot of the javascript in the page. I think that's what you were seeing. Indeed StaticContentSample can be used to embed simple static HTML. Glad you found what you needed.

0 Karma

theouhuios
Motivator

Not really 🙂 I was just playing around with it and it actually worked. So I thought may be it will really work even with a sideview module. But I was wrong.

0 Karma

sideview
SplunkTrust
SplunkTrust

Oh. Well HTML is a Sideview module not a Splunk module, so maybe that's why your view was't working when you added an HTML module to it? It's a common pitfall for people to come to think of Search and HTML and all that as core Splunk modules when in fact they're all part of Sideview Utils.

0 Karma

theouhuios
Motivator

Thanks Nick. But wouldn't the dashboard need to be created using sideview modules for this to work? It's completely written in advance xml only. Splunk gives this error when I try it "Splunk cannot find the "Breakdown_by_Service" view."

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...