hi,
I had used the status indicator on my dashboard and what I want is when I click the icon, another dashboard will pop-up.
I had read and followed the article from this link https://answers.splunk.com/answers/471329/is-it-possible-to-drilldown-from-an-status-indicat.html#co... but it seems like it doesn't work. It is something wrong with my javascript/XML
here my XML code:
And this is my java script where I locate it at C:\Program Files\Splunk\etc\apps\status_indicator_app\appserver\static\drilldown.js:
var components = [splunkjs/ready!,splunkjs/mvc/simplexml/ready!,jquery];
require(components, function(mvc,ignored,$)
{ $(#something).click(function() {window.open(SolarwindsGroupCircuit,'_blank' )})});
ok.. I think I got your issue...
go to Settings>>User interface »Views
here check your SolarwindsGroupCircuit dashboard view name it might be different...?
For different panels you can set panel id like you have set for one panel as <panel id="something">
similarly you can set for different panels different id like <panel id="panel1">
<panel id="panel2">
and in js use these panel id like
$('#panel1').click(function() {
window.open(
'YOUR_DASHBOARD_HERE',
'_blank' // <- This is what makes it open in a new window.
);
});
okay I understand this.
if I had a different panel, then one of panel will show the dashboard on other app. as i know the js file need to locate on app file. let say the panel on search app and it will drilldown/pop-up to dashboard on PRTG app, so i need to locate js file on PRTG if im right. it is possible to do that?
So if you want to drilldown to dashboard on another app then you need to give full url under window.open stanza in js. for ex.
$('#panel1').click(function() {
window.open(
'http://localhost:8000/en-GB/app/PRTG/Dashboard_view_name',
'_blank' // <- This is what makes it open in a new window.
);
});
and no need to include that js in PRTG app only include it in app from where you want this on click functionality.
ok.. I think I got your issue...
go to Settings>>User interface »Views
here check your SolarwindsGroupCircuit dashboard view name it might be different...?
yeah i notice it the view name is different where it name it solarwinds. so I nee change the SolarwindsGroupCircuit to solarwinds at my js file?
if yes, I already make change to js a couple of minutes ago but it seem not work
after making changes in js have you bump i.e. splunk_server/en-GB/_bump
like for localhost it will be http://localhost:8000/en-GB/_bump
and then click on bump_version
how many bump need I click...I already click it 5 times means version 5 and refresh back my browser and try click the icon back but nothing happen...no popup anymore
only one bump is fine....Go to your solarwinds view (Settings>>User interface »Views) and check permissions, set to All apps and give Read permission to everyone
wow amazing...it working after I bump and change permission...thank you so much...
one question:
if I had many status indicator in one dashboard and every status indicator need to popup to different dashboard.how I make it?can we set the script for each status indicator?
I notice our activity today just for whole dashboard where we call the script. i'm right?
are you talking in same panel you need to have to drilldown to different dashboard ? if so then you need to set token and as per token selection you can go to new dashboard
and if you have different panels then give that panel id and use that id in js...
if you have resolved your question then please accept the answer and do upvote the comments which helped you...
Thanks
add this view name in your js and bump once
Hi @hafizuddin,
It seems you have placed js in status indicator app but your dashboard xml is in different app so you need to move your js in specific app where your dashboard xml is created : C:\Program Files\Splunk\etc\apps\<app_name>\appserver\static\
i already place the js file same as dashboard xml created..it working popup but appear page not found
Potentially silly question, but did you restart splunk (or at least /debug/refresh
) after you placed the js and xml?
I already restart splunk via cmd 2 to 3 times but page not found still not resolve
from where you got this status indicator I am not finding this globe indicator.
the dashboard which you have created is under status indicator app or different app?
the dashboard on search app folder and the java script on status indicator app folder...