Dashboards & Visualizations

how to actually embed a view in an IFRAME?

wsw70
Communicator

Summary:

I use splunk in SSO-enabled mode. I am trying to embed a chart in an IFRAME. By "chart" I mean the content of the white rectangle with rounded corners :). What I get so far is the whole splunk application when using the URL of the view.

Detailed description:

Splunk docs explain how to embed a view but I fail to understand:

  • how to build a view which is similar to the one in the docs (I have dashboards which are listed in Views in manager and their XML is not at all the same as the one in the docs. In particular there are no view, module and param tags)
  • what "strip splunk chome" means in the docs, i.e. which elements should be removed to keep only the chart?

Thank you!

Tags (4)
0 Karma
1 Solution

wsw70
Communicator

I managed to find out by myself. The key word is "Advanced XML". I got the source by adding ?showsource=true to the URL of the view.

I am not sure yet what I can remove from the XML but stripping up to the module "HiddenSavedSearch" left me with only the chart.

It would be useful to have a better description of what should be removed from the XML.

View solution in original post

0 Karma

vgenovese
Splunk Employee
Splunk Employee

I updated the example in the Embed Splunk dashboard elements... documentation to better describe what Splunk chrome is (modules for displaying default header information on dashboards). Also, the sample code now shows what to strip out.

if you download and install the latest Dashboard Examples app, you can find many working examples of simple XML and advanced XML, including an example illustrating IFrames.

0 Karma

wsw70
Communicator

I managed to find out by myself. The key word is "Advanced XML". I got the source by adding ?showsource=true to the URL of the view.

I am not sure yet what I can remove from the XML but stripping up to the module "HiddenSavedSearch" left me with only the chart.

It would be useful to have a better description of what should be removed from the XML.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...