Commit e8be9507 by Christian Winther

Make sure kibana and grafana on same hostname do not interfere with each other

This happens if you have kibana on /kibana and grafana on /grafana, resulting in some bad redirects
parent aea4b377
......@@ -102,8 +102,8 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
$location.path(config.default_route);
alertSrv.set('Saving to browser storage has been replaced',' with saving to Elasticsearch.'+
' Click <a href="#/dashboard/local/deprecated">here</a> to load your old dashboard anyway.');
} else if(!(_.isUndefined(window.localStorage.kibanaDashboardDefault))) {
$location.path(window.localStorage.kibanaDashboardDefault);
} else if(!(_.isUndefined(window.localStorage.grafanaDashboardDefault))) {
$location.path(window.localStorage.grafanaDashboardDefault);
} else {
$location.path(config.default_route);
}
......@@ -197,7 +197,7 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
if(!_.isUndefined(window.localStorage['dashboard'])) {
delete window.localStorage['dashboard'];
}
window.localStorage.kibanaDashboardDefault = route;
window.localStorage.grafanaDashboardDefault = route;
return true;
} else {
return false;
......@@ -211,7 +211,7 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
delete window.localStorage['dashboard'];
}
delete window.localStorage.kibanaDashboardDefault;
delete window.localStorage.grafanaDashboardDefault;
return true;
} else {
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment