Dashboards & Visualizations

External HTML links

Ant1D
Motivator

Hey,

I would like to add some buttons or links to the viewHeader section of a view so that when clicked, a new window is opened that displays an external web page (e.g. google.com)

Can this be done?

Thanks in advance for your help.

Tags (3)
0 Karma
1 Solution

Ant1D
Motivator

Here's an example solution to add some buttons to a view that can be used to display external web pages in a new window when clicked:

Create a .html file (e.g. mybuttons.html) in the following directory:
$SPLUNK_HOME$/etc/apps/$your_app$/appserver/static

Add the following code to your html file:
<div class="YourButtons">
<button type="button" onclick="window.open('http://www.google.com')">Google</button>
<button type="button" onclick="window.open('http://www.yahoo.com')">Yahoo</button>
</div>

To get these buttons displayed in your choosen view (e.g. yourview.xml), go into yourview.xml and add the following module:

<module name="ServerSideInclude" layoutPanel="viewHeader">
<param name="src">mybuttons.html</param>
</module>

This example assumes that you are using Advanced XML.

View solution in original post

Ant1D
Motivator

Here's an example solution to add some buttons to a view that can be used to display external web pages in a new window when clicked:

Create a .html file (e.g. mybuttons.html) in the following directory:
$SPLUNK_HOME$/etc/apps/$your_app$/appserver/static

Add the following code to your html file:
<div class="YourButtons">
<button type="button" onclick="window.open('http://www.google.com')">Google</button>
<button type="button" onclick="window.open('http://www.yahoo.com')">Yahoo</button>
</div>

To get these buttons displayed in your choosen view (e.g. yourview.xml), go into yourview.xml and add the following module:

<module name="ServerSideInclude" layoutPanel="viewHeader">
<param name="src">mybuttons.html</param>
</module>

This example assumes that you are using Advanced XML.

Get Updates on the Splunk Community!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...