I have added the following to my dashboard and I am still getting this error (A custom JavaScript error caused an issue loading your dashboard). What should be my next steps?
<dashboard version="1.1" script="myCustomJS.js">
or
<form version="1.1" script="myCustomJS.js">
Manage dashboards that need jQuery updates - Splunk Documentation
<dashboard version="1.1" script="myCustomJS.js">
<label>Overview</label>
<row>
<panel>
<title>Controls Available</title>
<table>
<search>
<query>| inputlookup cc_controls_lookup where splunk_use_case=true | fields control_number control_label view | sort view | rename control_number as "Control Number" control_label AS "Brief Description"</query>
<earliest>-24h@h</earliest>
@kamlesh_vaghela
<latest>now</latest>
</search>
<option name="count">40</option>
<option name="drilldown">row</option>
<option name="refresh.display">progressbar</option>
<drilldown>
<link target="_blank">$row.view$</link>
</drilldown>
</table>
</panel>
</row>
</dashboard>
Your XML looks good to me. I tried it and working fine.
<dashboard version="1.1" script="myCustomJS.js">
<label>Overview</label>
<row>
<panel>
<title>Controls Available</title>
<table>
<search>
<query>| makeresults | eval control_number="control_number",control_label="control_label" | rename control_number as "Control Number" control_label AS "Brief Description"</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="count">40</option>
<option name="drilldown">row</option>
<option name="refresh.display">progressbar</option>
<drilldown>
<link target="_blank">$row.view$</link>
</drilldown>
</table>
</panel>
</row>
</dashboard>
No errors in the console.
Is it possible to share JS file?
KV
This is an application with multiple dashboards to it. How do I share the JS file?
QQ.
Does this dashboard open from another dashboard OR any dynamic query string values? Loading error happens when any dynamic tokens which are used in any search are not properly set which makes the search invalid for execution during the initial loading of the dashboard.
If you have the same scenario then try to debug those values with the actual practical use case.
I faced a similar issue and resolved it by fixing such dynamic values. In my case, I'm opening dashboards from multiple dashboards by passing flags and IP addresses.
I hope this will help you.
KV