UNPKG

@spalger/kibana

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) 789 B
define(function (require) { require('ui/field_format_editor/samples/samples'); require('ui/modules') .get('kibana') .directive('fieldFormatEditorPattern', function () { return { restrict: 'E', template: require('ui/field_format_editor/pattern/pattern.html'), require: ['ngModel', '^fieldEditor'], scope: true, link: function ($scope, $el, attrs, cntrls) { var 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; }; } }; }); });