Hi everyone ! I am trying to create a menu with link switcher. I have tested the example of custom_link_switcher in Splunk 6.x. Dashboards Examples in my own dashboard. And it didn't work.
<dashboard script="link_switcher.js, autodiscover.js">
<row grouping="4">
<html>
<!-- Placeholder/container for the link switcher to appear -->
<div class="link-switcher" data-items="link1,link2,link3">Select a view: <!--Links go here--></div>
</html>
<table id="link1">
<title>Table</title>
<searchString>index=_internal | stats count by sourcetype</searchString>
<earliestTime>-24h</earliestTime>
</table>
<chart id="link2">
<title>Chart</title>
<searchString>index=_internal | stats count by sourcetype</searchString>
<earliestTime>-24h</earliestTime>
</chart>
<map id="link3">
<title>Map</title>
<searchString>| inputlookup geomaps_data.csv | iplocation device_ip | geostats latfield=lat longfield=lon count by method</searchString>
<earliestTime>0</earliestTime>
<option name="mapping.map.center">(30.810646,-10.556976)</option>
<option name="mapping.map.zoom">2</option>
</map>
</row>
</dashboard>
I implemented this code and I had this dashboard :
As you can see the 3 panels are in the dashboard and there is no link switcher.
Could you please help me with that ?
Thanks in advance.
The autodiscover.js
and link_switcher.js
files need to be placed in $APP_HOME/appserver/static
, where $APP_HOME
is the name of the App your dashboard is located. Once they are in that folder, restart Splunk.
If you want to break all caches, click the button at: https://your_splunk/en-US/_bump.
The autodiscover.js
and link_switcher.js
files need to be placed in $APP_HOME/appserver/static
, where $APP_HOME
is the name of the App your dashboard is located. Once they are in that folder, restart Splunk.
If you want to break all caches, click the button at: https://your_splunk/en-US/_bump.
My dashboards are in the app "Search & Reporting" (folder name: search). I tried search/appserver/static but it didn't work : "Page not found"
"Page Not Found" --- what page? the dashboard? Can you paste the entire 404 error? from the developer console?
that's good now thanks
Just to make sure, you did put the .js files in the right places, restarted your splunk and reloaded your browser page without cache (STRG-F5)?
Thanks for your answer
The problem is that I don't know where I have to put the .js files with Splunk (I am a very beginner ! )