Skip to content

Commit

Permalink
Fix reloading when base path
Browse files Browse the repository at this point in the history
  • Loading branch information
sulemanof committed Mar 20, 2020
1 parent 346d3e3 commit 11cc68f
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,15 @@ function discoverController(
}
});

// this listener is waiting for such a path http://localhost:5601/app/kibana#/discover
// which could be set through pressing "New" button in top nav or go to "Discover" plugin from the sidebar
// to reload the page in a right way
const unlistenHistoryBasePath = history.listen(({ pathname, search, hash }) => {
if (!search && !hash && pathname === '/discover') {
$route.reload();
}
});

$scope.setIndexPattern = async id => {
await replaceUrlAppState({ index: id });
$route.reload();
Expand Down Expand Up @@ -310,6 +319,7 @@ function discoverController(
stopStateSync();
stopSyncingGlobalStateWithUrl();
stopSyncingQueryAppStateWithStateContainer();
unlistenHistoryBasePath();
});

const getTopNavLinks = () => {
Expand Down

0 comments on commit 11cc68f

Please sign in to comment.