mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Merge pull request #2927 from spenceralger/restartApp
[navbar] when an app is active, reset the url when clicking the app link
This commit is contained in:
commit
3130f3ce1f
2 changed files with 5 additions and 4 deletions
|
@ -6,8 +6,9 @@ define(function (require) {
|
|||
return 'lastPath:' + app.id;
|
||||
}
|
||||
|
||||
function getLastPath(app) {
|
||||
app.lastPath = sessionStorage.get(appKey(app)) || '/' + app.id;
|
||||
function assignPaths(app) {
|
||||
app.rootPath = '/' + app.id;
|
||||
app.lastPath = sessionStorage.get(appKey(app)) || app.rootPath;
|
||||
return app.lastPath;
|
||||
}
|
||||
|
||||
|
@ -22,7 +23,7 @@ define(function (require) {
|
|||
|
||||
$scope.apps = Private(require('registry/apps'));
|
||||
// initialize each apps lastPath (fetch it from storage)
|
||||
$scope.apps.forEach(getLastPath);
|
||||
$scope.apps.forEach(assignPaths);
|
||||
$scope.apps.forEach(getShow);
|
||||
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<li class="logo hidden-xs"></li>
|
||||
<li class="navbar-brand hidden-xs">Kibana</li>
|
||||
<li ng-repeat="app in apps.inOrder | filter:{show: true}" ng-class="{active: activeApp === app}">
|
||||
<a ng-href="#{{app.lastPath}}" bo-text="app.name"></a>
|
||||
<a ng-href="#{{app === activeApp ? app.rootPath : app.lastPath}}" bo-text="app.name"></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue