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
23 lines (19 loc) • 533 B
JavaScript
import UiModules from 'ui/modules';
import { words, camelCase, kebabCase } from 'lodash';
export function kbnUrlDirective(name) {
const srcAttr = kebabCase(name);
const attr = kebabCase(words(name).slice(1));
UiModules
.get('kibana')
.directive(name, function (Private, chrome) {
return {
restrict: 'A',
link: function ($scope, $el, $attr) {
$attr.$observe(name, function (val) {
$attr.$set(attr, chrome.addBasePath(val));
});
}
};
});
}
kbnUrlDirective('kbnHref');