[Chrome] Added a breadcrumbs method

This commit is contained in:
Khalah Jones-Golden 2016-03-14 15:02:26 -04:00
parent 4119554f46
commit aecd79a714
2 changed files with 8 additions and 1 deletions

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
.aws-config.json
.ackrc
.DS_Store
.node_binaries
node_modules

View file

@ -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);