All Apps and Add-ons

Using a google map on a form

jstockamp
Communicator

I've got a custom form with a time selector and I'd like to use a google map to display some results. My form basically looks like this:

<form>
<label>Product Dashboard</label>
<fieldset>
<input type = "time" />
</fieldset>
....
<row>
<table>
<title>Google Map</title>
<searchTemplate?>sourcetype = "access_combined" | geoip clientip</searchTemplate>
</table>
</row>
</form>

I do see results in the table when I run the form, but they're obviously not displaying on a google map. I see instructions for the google map app on how to use it on a dashboard, but what about on a form? Is this possible?

Thanks!

0 Karma
1 Solution

ziegfried
Influencer

Sure, it's possible. But you have to use the advanced XML version of your view. You can convert your form to advanced XML by appending ?showsource=1 to the URL when you're viewing it in the browser. You'll see the advanced XML sourcecode in the textbox on the very bottom of the resulting page.

Copy this code over to your view file and simply replace the SimpleResultsTable module with a GoogleMaps module.

View solution in original post

0 Karma

ziegfried
Influencer

Sure, it's possible. But you have to use the advanced XML version of your view. You can convert your form to advanced XML by appending ?showsource=1 to the URL when you're viewing it in the browser. You'll see the advanced XML sourcecode in the textbox on the very bottom of the resulting page.

Copy this code over to your view file and simply replace the SimpleResultsTable module with a GoogleMaps module.

0 Karma

ziegfried
Influencer

Sounds like a good idea for an enhancement request.

jstockamp
Communicator

That worked, thanks.

Why in the world doesn't splunk have a "show advanced XML" on the edit page for the view?

Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...