Given a dashboard with a Simple XML extension in myApp, what is the XML reference for the file myJS.js located in myOtherApp in the location shown below?
$SPLUNK_HOME/etc/apps/myOtherApp/appserver/static/javascript/
Given a dashboard with a Simple XML extension in myApp, what is the XML reference for the file myJS.js located in myOtherApp in the location shown below?
$SPLUNK_HOME/etc/apps/myOtherApp/appserver/static/javascript/
In Splunk, when referencing a file from a different app's appserver static directory in a Simple XML dashboard, you need to specify the app's name and the subdirectory structure. The correct format is to use 'appname:subdirectory/filename'. Given the file is located under $SPLUNK_HOME/etc/apps/myOtherApp/appserver/static/javascript/, the appropriate reference would be myOtherApp:javascript/myJS.js.
Answer is B. You should specify other app's name if script is located there
Sorry, answer is C. Script must be located in the "appserver/static" folder of the app. Since "javascript" is a subfolder, we must specify it's name : script="otherApp:javascript/myScript.js" Look example here, under "Attributes" header: https://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML
Agree. Answer is C.
C. <dashboard script="myOtherApp:javascript/myJS.js"> Same app "/etc/apps/my_app/appserver/static/my_code.js" <dashboard script="my_code.js"> Other app "/etc/apps/myOtherApp/appserver/static/my_code.js" <dashboard script="myOtherApp:javascript/myJS.js">