mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Chrome] Added a breadcrumbs method
This commit is contained in:
parent
4119554f46
commit
aecd79a714
2 changed files with 8 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
|||
.aws-config.json
|
||||
.ackrc
|
||||
.DS_Store
|
||||
.node_binaries
|
||||
node_modules
|
||||
|
|
8
src/ui/public/chrome/api/angular.js
vendored
8
src/ui/public/chrome/api/angular.js
vendored
|
@ -4,6 +4,7 @@ import modules from 'ui/modules';
|
|||
module.exports = function (chrome, internals) {
|
||||
|
||||
chrome.getFirstPathSegment = _.noop;
|
||||
chrome.getBreadcrumbs = _.noop;
|
||||
|
||||
chrome.setupAngular = function () {
|
||||
var kibana = modules.get('kibana');
|
||||
|
@ -25,9 +26,14 @@ module.exports = function (chrome, internals) {
|
|||
}()))
|
||||
.config(chrome.$setupXsrfRequestInterceptor)
|
||||
.run(($location) => {
|
||||
debugger;
|
||||
chrome.getFirstPathSegment = () => {
|
||||
return $location.path().split('/')[1];
|
||||
}
|
||||
};
|
||||
|
||||
chrome.getBreadcrumbs = () => {
|
||||
return $location.path().split('/').slice(1);
|
||||
};
|
||||
});
|
||||
|
||||
require('../directives')(chrome, internals);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue