Dashboards & Visualizations

How do I link an HTML doc into an XML View?

michellecivil_l
Explorer

I'm trying to link an html page into a view.
Any suggestions??

Tags (2)
1 Solution

rroberts
Splunk Employee
Splunk Employee

Yes,

Check the http://docs.splunk.com/Documentation/Splunk/4.3.3/Developer/UseHTML

You can use the ServerSideInclude Module if HTML is uploaded to $SPLUNK_HOME/etc/apps/yourapp/appserver/static folder or Iframe module if 3rd party website.

View solution in original post

0 Karma

rroberts
Splunk Employee
Splunk Employee

Yes,

Check the http://docs.splunk.com/Documentation/Splunk/4.3.3/Developer/UseHTML

You can use the ServerSideInclude Module if HTML is uploaded to $SPLUNK_HOME/etc/apps/yourapp/appserver/static folder or Iframe module if 3rd party website.

0 Karma

rroberts
Splunk Employee
Splunk Employee

You're Welcome!

0 Karma

michellecivil_l
Explorer

Yup!! It works. Thank you very much!!

0 Karma

rroberts
Splunk Employee
Splunk Employee

OOPs my bad should have layoutPanel ...upper case "P".

michellecivil_l
Explorer

Nope. I'm getting this error message: Splunk cannot find the "test1" view.

0 Karma

rroberts
Splunk Employee
Splunk Employee

See if this much works:





1234.html


Make sure you note attribute names are case sensitive and all modules must have a layoutPanel location.

0 Karma

michellecivil_l
Explorer

Currently I'm just looking to make this view work with the html, because later i will be adding image maps and charts and things, and i need to use html to make hotspots work.

0 Karma

michellecivil_l
Explorer

I actually did see that, I currently have an application.css for my app, but for this view i wanted to refrence a seperate css page to the html because the page says " If you've added a web resource, import the CSS file into your HTML."
Thank you again for your help!

0 Karma

rroberts
Splunk Employee
Splunk Employee

Ah, you're including your own style sheet. Did you restart Splunk web?
Have you checked out:

http://docs.splunk.com/Documentation/Splunk/4.3.3/Developer/UseCSS

Testing your code now.

0 Karma

michellecivil_l
Explorer

test1.xml (located under SPLUNK_HOME/etc/apps//default/data/ui/views/.xml)


1234.html

& XML located in under manager in splunk views

<?xml version="1.0"?>



0 Karma

michellecivil_l
Explorer

1234.html
<!DOCTYPE html>

1234



<h1> NOTE*
I need for it to work!
</h1>


1234.css
nav{
color:000000;
font-size:18px;
text-decoration:blink;
}

h1 {
font-size: 12px;
color:#EE3B3B;
}

0 Karma

rroberts
Splunk Employee
Splunk Employee

Can you post your XML here? As well as your HTML file?

0 Karma

michellecivil_l
Explorer

Still Nothing.
And its strange because written here ( http://docs.splunk.com/Documentation/Splunk/4.3.3/Developer/ModuleReference#ServerSideInclude ) it says that "if the resource can't be found, a simple message inline is displayed."
only... I am not getting any error message at all. simply nothing is showing up

0 Karma

rroberts
Splunk Employee
Splunk Employee

Try this...

Clear your browser cache.

Then to to http://yoursplunk: 8000/_bump
Bump up static version.

0 Karma

michellecivil_l
Explorer

I found the doc you were referring to (your link didnt work): http://docs.splunk.com/Documentation/Splunk/4.3.3/Developer/UseHTML

I followed all the steps, but ServerSideinclude doesn't seem to be working...
I added a separate html page to my $SPLUNK_HOME/etc/apps/yourapp/appserver/static folder...
then added a xml page in SPLUNK_HOME/etc/apps//default/data/ui/views/.xml with:


foo.html

and still im getting nothing.

I've tried and re tried, really not sure of whats going on.

0 Karma

rroberts
Splunk Employee
Splunk Employee

In the advanced XML view use:



foo.html


It looks in the appserver/static folder by default.

0 Karma

michellecivil_l
Explorer

Using the Server side include module, how do i actually link to the html doc? I placed it into the $SPLUNK_HOME/etc/apps/yourapp/appserver/static folder. Just not sure what line of code to actually write to reference this folder.

Thank you in advance.

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...