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.

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...