As far as I'm aware it's not possible as a configuration option per-user, but that doesn't mean you can't do it. :-)
Need to think this through a little more, but you should be able to do something along these lines:
Create a separate app called dashboard.
Set your new dashboard app as the default app for that user, either via Manager->Access Controls->Users or via user_prefs.conf.
Make sure that all of your required dashboard views are accessible through that app context. (Either copy them, or set them to global scope)
Paste the following into application.js for that app:
$(document).ready(function() {
Splunk.Session.instance.UI_INACTIVITY_TIMEOUT = 0;
Splunk.Session.instance.timeoutDelay = 0;
function overrideStartTimeout() {
return;
}
Splunk.Session.instance.startTimeout = overrideStartTimeout;
Splunk.Session.instance.stopTimeout();
});
If you really want to do it within another app like search, you can do the same thing, but wrap it in an if statement that checks the username. Getting the username may be non-trivial - usually it shows an auth token but not a name. If you have an AccountBar module, you can get it from there; if not, it may be hiding somewhere in the DOM, but I haven't seen it.
I still think, however, that compartmentalizing into a dedicated app is less risky.
lastKnownUser = 'unknown'
function getUserName() {
// Only works for pages that have an AccountBar module
text = jQuery('.accountBarItems').text()
r = /Logged in as (\S+)/
matches = r.exec(text)
if (matches) {
lastKnownUser = matches[1];
}
return lastKnownUser;
}
$(document).ready(function() {
if ( getUserName() == "dashboard" ) {
Splunk.Session.instance.UI_INACTIVITY_TIMEOUT = 0;
Splunk.Session.instance.timeoutDelay = 0;
function overrideStartTimeout() {
return;
}
Splunk.Session.instance.startTimeout = overrideStartTimeout;
Splunk.Session.instance.stopTimeout();
}
});
answered
03 Oct '10, 15:50
southeringtonp ♦
4.5k●1●2●15
accept rate:
35%