UNPKG

kibana-123

Version:

Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic

24 lines (21 loc) 653 B
import _ from 'lodash'; import chrome from 'ui/chrome/chrome'; import breadCrumbsTemplate from 'ui/partials/bread_crumbs.html'; import uiModules from 'ui/modules'; let module = uiModules.get('kibana'); module.directive('breadCrumbs', function () { return { restrict: 'E', scope: { omitCurrentPage: '=' }, template: breadCrumbsTemplate, controller: function ($scope) { // Capitalize the first letter of each bread crumb. $scope.breadcrumbs = chrome.getBreadcrumbs().map(breadcrumb => _.startCase(breadcrumb)); if ($scope.omitCurrentPage === true) { $scope.breadcrumbs.pop(); } } }; });