Hi, i am trying to use custom javascript file to customize some button actions in my dashboard, but it doesn't work and i don't know why. I'm using the last version of Splunk enterprise My custom s...
See more...
Hi, i am trying to use custom javascript file to customize some button actions in my dashboard, but it doesn't work and i don't know why. I'm using the last version of Splunk enterprise My custom script is in the folder $SPLUNK_HOME/etc/apps/app_name/appserver/static/. I have tried to restart Splunk web, use the bumps button but nothing works. Can anyone help me? Simple xml dashboard code <form version="1.1" theme="dark" script="button.js">
<search>
<query>
| makeresults | eval field1="test", field2="test1", field3="lll", field4="sgsgsg"
</query>
<earliest></earliest>
<latest>now</latest>
<done>
<set token="field1">$result.field1$</set>
<set token="field2">$result.field2$</set>
<set token="field3">$result.field3$</set>
<set token="field4">$result.field4$</set>
</done>
</search>
<label>stacked_inputs</label>
<fieldset submitButton="false" autoRun="true"></fieldset>
<row>
<panel>
<title>title</title>
<input id="test_input1" type="text" token="field1">
<label>field1</label>
<default>$field1$</default>
<initialValue>$field1$</initialValue>
</input>
<input id="test_input2" type="text" token="field2">
<label>field2</label>
<default>$field2$</default>
<initialValue>$field2$</initialValue>
</input>
<html>
<style>
#test_input2 {
padding-left: 30px !important;
}
</style>
</html>
</panel>
</row>
<row>
<panel>
<input id="test_input3" type="text" token="field3">
<label>field3</label>
<default>$field3$</default>
<initialValue>$field3$</initialValue>
</input>
<input id="test_input4" type="text" token="field4">
<label>field4</label>
<default>$field4$</default>
<initialValue>$field4$</initialValue>
</input>
</panel>
</row>
<row>
<panel>
<html>
<form>
<div>
<div>
<label>Password</label>
<input type="text" value="$field4$"/>
<br/>
<input type="password" id="exampleInputPassword1" placeholder="Password"/>
</div>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<button onclick="test()">Back</button>
<button onclick="test1()">Back1</button>
<button id="back" data-param="test">Back2</button>
</html>
</panel>
</row>
</form> Javascript code As you can see i have tried different methods Thanks for your help.