Dashboards & Visualizations

How do I set a token from the HTML section of XML dashboard?

matstap
Communicator

I have a simple XML dashboard with an HTML section inside the fieldset section. I want to set a token based on the value of the input field in the HTML section when I press the submit button. How do I do this? Does anyone have an example I could follow?

0 Karma
1 Solution

niketn
Legend

@matstap you would need Simple XML JS Extension to invoke your own Event Handler for <html> input. Then you would need to use SplunkJS Stack to set the token based on value caught in your Event Handler. You should check out one of my previous answers to use html Date Picker input in Splunk Simple XML Dashboard which is based on @jconger 's blog post Using HTML5 Input Type

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

mstjohn_splunk
Splunk Employee
Splunk Employee

Hi @matstap,

Did the answer below solve your problem? If so, please resolve this post by approving it!
If your problem is still not solved, keep us updated so that someone else can help ya. Thanks for posting!

0 Karma

niketn
Legend

@matstap you would need Simple XML JS Extension to invoke your own Event Handler for <html> input. Then you would need to use SplunkJS Stack to set the token based on value caught in your Event Handler. You should check out one of my previous answers to use html Date Picker input in Splunk Simple XML Dashboard which is based on @jconger 's blog post Using HTML5 Input Type

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...