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!

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