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

27 lines (23 loc) 773 B
import 'ui/field_format_editor/samples/samples'; import uiModules from 'ui/modules'; import patternTemplate from 'ui/field_format_editor/pattern/pattern.html'; uiModules .get('kibana') .directive('fieldFormatEditorPattern', function () { return { restrict: 'E', template: patternTemplate, require: ['ngModel', '^fieldEditor'], scope: true, link: function ($scope, $el, attrs, cntrls) { let ngModelCntrl = cntrls[0]; $scope.$bind('inputs', attrs.inputs); $scope.$bind('placeholder', attrs.placeholder); // bind our local model with the outside ngModel $scope.$watch('model', ngModelCntrl.$setViewValue); ngModelCntrl.$render = function () { $scope.model = ngModelCntrl.$viewValue; }; } }; });