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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

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 Certification at ...

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