I am trying to achieve this using XML, HTML and ** JS.**
I am trying to build something like in the attached screenshot.
First I have started with dashboard creation for 1st and 2nd pane. And converted them into HTML using inbuilt function. Everything is perfect at this time. But, When I merge html code for both dashboards into one dashboard, I am not seeing text boxes and dropdowns. I am not sure about the mistake.
How can I achieve this with above preferred languages?
Thank you so much for the help.
@sandeeprachuri, you can use
Refer to following great blogs from Jason Conger( @jconger ) and Octoinsight ( @rjthibod 😞
And one example to use HTML Date Picker: https://answers.splunk.com/answers/627432/jquery-datepicker-in-splunk.html
You can code any other HTML input on similar lines as per your need.
@niketnilay, Thank you so much for the quick response.
I have been following this answer https://answers.splunk.com/answers/581652/how-can-i-create-a-button-switcher.html from sometime.
Only thing I was looking for HTML text input and dropdown tags to fit there. But, I couldn't find them. I will go over Jason blog andtry if I can find those tags.
Following should create a html text input box:
<input type="text" disabled="disabled" value="$someTextToken$"></input>
Is there any reason why you do not want to use Splunk
<form> <label>Dashboard with multiple input panels and Submit</label> <fieldset submitButton="false"></fieldset> <row> <panel> <input type="text" token="txtTwo"> <label>Text Two</label> </input> <input type="text" token="txtOne"> <label>Text One</label> </input> <input type="dropdown" token="tokApp"> <label>App</label> </input> <input type="dropdown" token="tokStatus"> <label>Status</label> </input> <input type="text" token="tokCommment"> <label>Comment</label> </input> <html> <button class="btn-primary">Apply</button> </html> </panel> </row> <row> <panel> <input type="text" token="tokSearchOne"> <label>Search One</label> </input> <input type="text" token="tokSearchTwo"> <label>Search Two</label> </input> <input type="dropdown" token="tokAppFilter"> <label>App</label> </input> <input type="time" token="field6"> <label></label> <default> <earliest>-24h@h</earliest> <latest>now</latest> </default> </input> <html> <button class="btn-primary">Search</button> </html> </panel> </row> </form>
@niketnilay, This is wonderful. I was trying the same way as you suggested.
However, input type="text" worked for me. But, this input type="dropdown" doesn't worked for me.
I have created dropdown as below:
<label>App</label> <input type="dropdown" token="appname" id="appnameid" searchWhenChanged="true"></input>
But, Your code is perfect.
Thank you so much.
You can use
<select> for HTML Dropdown
<select name="html_dropdown"> <option value="1">One</option> <option value="2">Two</option> <option value="3">Three</option> </select>
Glad you found the answer working. Do up vote the comments that helped 🙂
@niketnilay, Definitely I will use this drop down method. I have made a note of it. Thank you for your help and learning a lot (specially coding) from your answers.
Glad you found the details helpful. This is the sole purpose of this community. I also get to learn a lot from others. So hang around and contribute 🙂