diff --git a/src/legacy/ui/public/angular-bootstrap/index.js b/src/legacy/ui/public/angular-bootstrap/index.js index c86da04f5bc41..f574345af48ab 100644 --- a/src/legacy/ui/public/angular-bootstrap/index.js +++ b/src/legacy/ui/public/angular-bootstrap/index.js @@ -22,35 +22,17 @@ uiModules.get('kibana', [ */ angular.module('ui.bootstrap', [ 'ui.bootstrap.tpls', - 'ui.bootstrap.transition', 'ui.bootstrap.bindHtml', - 'ui.bootstrap.modal', 'ui.bootstrap.tooltip', ]); angular.module('ui.bootstrap.tpls', [ - 'template/modal/backdrop.html', - 'template/modal/window.html', 'template/tooltip/tooltip-html-unsafe-popup.html', 'template/tooltip/tooltip-popup.html', ]); import './bindHtml/bindHtml'; -import './modal/modal'; import './tooltip/tooltip'; -import './transition/transition'; - -import backdrop from './modal/backdrop.html'; - -angular.module('template/modal/backdrop.html', []).run(['$templateCache', function($templateCache) { - $templateCache.put('template/modal/backdrop.html', backdrop); -}]); - -import modal from './modal/window.html'; - -angular.module('template/modal/window.html', []).run(['$templateCache', function($templateCache) { - $templateCache.put('template/modal/window.html', modal); -}]); import tooltipUnsafePopup from './tooltip/tooltip-html-unsafe-popup.html'; diff --git a/src/legacy/ui/public/angular-bootstrap/transition/transition.js b/src/legacy/ui/public/angular-bootstrap/transition/transition.js deleted file mode 100755 index 8e08838bdb084..0000000000000 --- a/src/legacy/ui/public/angular-bootstrap/transition/transition.js +++ /dev/null @@ -1,82 +0,0 @@ -angular.module('ui.bootstrap.transition', []) - -/** - * $transition service provides a consistent interface to trigger CSS 3 transitions and to be informed when they complete. - * @param {DOMElement} element The DOMElement that will be animated. - * @param {string|object|function} trigger The thing that will cause the transition to start: - * - As a string, it represents the css class to be added to the element. - * - As an object, it represents a hash of style attributes to be applied to the element. - * - As a function, it represents a function to be called that will cause the transition to occur. - * @return {Promise} A promise that is resolved when the transition finishes. - */ -.factory('$transition', ['$q', '$timeout', '$rootScope', function($q, $timeout, $rootScope) { - - var $transition = function(element, trigger, options) { - options = options || {}; - var deferred = $q.defer(); - var endEventName = $transition[options.animation ? 'animationEndEventName' : 'transitionEndEventName']; - - var transitionEndHandler = function(event) { - $rootScope.$apply(function() { - element.unbind(endEventName, transitionEndHandler); - deferred.resolve(element); - }); - }; - - if (endEventName) { - element.bind(endEventName, transitionEndHandler); - } - - // Wrap in a timeout to allow the browser time to update the DOM before the transition is to occur - $timeout(function() { - if ( angular.isString(trigger) ) { - element.addClass(trigger); - } else if ( angular.isFunction(trigger) ) { - trigger(element); - } else if ( angular.isObject(trigger) ) { - element.css(trigger); - } - //If browser does not support transitions, instantly resolve - if ( !endEventName ) { - deferred.resolve(element); - } - }); - - // Add our custom cancel function to the promise that is returned - // We can call this if we are about to run a new transition, which we know will prevent this transition from ending, - // i.e. it will therefore never raise a transitionEnd event for that transition - deferred.promise.cancel = function() { - if ( endEventName ) { - element.unbind(endEventName, transitionEndHandler); - } - deferred.reject('Transition cancelled'); - }; - - return deferred.promise; - }; - - // Work out the name of the transitionEnd event - var transElement = document.createElement('trans'); - var transitionEndEventNames = { - 'WebkitTransition': 'webkitTransitionEnd', - 'MozTransition': 'transitionend', - 'OTransition': 'oTransitionEnd', - 'transition': 'transitionend' - }; - var animationEndEventNames = { - 'WebkitTransition': 'webkitAnimationEnd', - 'MozTransition': 'animationend', - 'OTransition': 'oAnimationEnd', - 'transition': 'animationend' - }; - function findEndEventName(endEventNames) { - for (var name in endEventNames){ - if (transElement.style[name] !== undefined) { - return endEventNames[name]; - } - } - } - $transition.transitionEndEventName = findEndEventName(transitionEndEventNames); - $transition.animationEndEventName = findEndEventName(animationEndEventNames); - return $transition; -}]); diff --git a/x-pack/legacy/plugins/ml/public/app.js b/x-pack/legacy/plugins/ml/public/app.js index f5f36bffbba3c..e95aaa98479c0 100644 --- a/x-pack/legacy/plugins/ml/public/app.js +++ b/x-pack/legacy/plugins/ml/public/app.js @@ -15,6 +15,8 @@ import 'ui/persisted_log'; import 'ui/autoload/all'; import 'ui/kbn_top_nav'; +import 'plugins/ml/components/transition/transition'; +import 'plugins/ml/components/modal/modal'; import 'plugins/ml/access_denied'; import 'plugins/ml/jobs'; import 'plugins/ml/services/calendar_service'; diff --git a/src/legacy/ui/public/angular-bootstrap/modal/backdrop.html b/x-pack/legacy/plugins/ml/public/components/modal/backdrop.html similarity index 100% rename from src/legacy/ui/public/angular-bootstrap/modal/backdrop.html rename to x-pack/legacy/plugins/ml/public/components/modal/backdrop.html diff --git a/src/legacy/ui/public/angular-bootstrap/modal/modal.js b/x-pack/legacy/plugins/ml/public/components/modal/modal.js similarity index 75% rename from src/legacy/ui/public/angular-bootstrap/modal/modal.js rename to x-pack/legacy/plugins/ml/public/components/modal/modal.js index 662765d35749f..a0a7ec37d4e77 100755 --- a/src/legacy/ui/public/angular-bootstrap/modal/modal.js +++ b/x-pack/legacy/plugins/ml/public/components/modal/modal.js @@ -1,5 +1,17 @@ -angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import angular from 'angular'; +import backdropTemplate from './backdrop.html'; +import modalTemplate from './window.html'; + +import { uiModules } from 'ui/modules'; +const module = uiModules.get('apps/ml'); +module /** * A helper, internal data structure that acts as a map but also allows getting / removing * elements in the LIFO order @@ -7,7 +19,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) .factory('$$stackedMap', function () { return { createNew: function () { - var stack = []; + const stack = []; return { add: function (key, value) { @@ -17,15 +29,15 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) }); }, get: function (key) { - for (var i = 0; i < stack.length; i++) { - if (key == stack[i].key) { + for (let i = 0; i < stack.length; i++) { + if (key === stack[i].key) { return stack[i]; } } }, - keys: function() { - var keys = []; - for (var i = 0; i < stack.length; i++) { + keys: function () { + const keys = []; + for (let i = 0; i < stack.length; i++) { keys.push(stack[i].key); } return keys; @@ -34,9 +46,9 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) return stack[stack.length - 1]; }, remove: function (key) { - var idx = -1; - for (var i = 0; i < stack.length; i++) { - if (key == stack[i].key) { + let idx = -1; + for (let i = 0; i < stack.length; i++) { + if (key === stack[i].key) { idx = i; break; } @@ -61,7 +73,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) return { restrict: 'EA', replace: true, - templateUrl: 'template/modal/backdrop.html', + template: backdropTemplate, link: function (scope, element, attrs) { scope.backdropClass = attrs.backdropClass || ''; @@ -84,9 +96,10 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) }, replace: true, transclude: true, - templateUrl: function(tElement, tAttrs) { - return tAttrs.templateUrl || 'template/modal/window.html'; - }, + template: modalTemplate, + // templateUrl: function (tElement, tAttrs) { + // return tAttrs.templateUrl || 'template/modal/window.html'; + // }, link: function (scope, element, attrs) { element.addClass(attrs.windowClass || ''); scope.size = attrs.size; @@ -109,8 +122,8 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) }); scope.close = function (evt) { - var modal = $modalStack.getTop(); - if (modal && modal.value.backdrop && modal.value.backdrop != 'static' && (evt.target === evt.currentTarget)) { + const modal = $modalStack.getTop(); + if (modal && modal.value.backdrop && modal.value.backdrop !== 'static' && (evt.target === evt.currentTarget)) { evt.preventDefault(); evt.stopPropagation(); $modalStack.dismiss(modal.key, 'backdrop click'); @@ -122,8 +135,8 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) .directive('modalTransclude', function () { return { - link: function($scope, $element, $attrs, controller, $transclude) { - $transclude($scope.$parent, function(clone) { + link: function ($scope, $element, $attrs, controller, $transclude) { + $transclude($scope.$parent, function (clone) { $element.empty(); $element.append(clone); }); @@ -134,16 +147,17 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) .factory('$modalStack', ['$transition', '$timeout', '$document', '$compile', '$rootScope', '$$stackedMap', function ($transition, $timeout, $document, $compile, $rootScope, $$stackedMap) { - var OPENED_MODAL_CLASS = 'modal-open'; + const OPENED_MODAL_CLASS = 'modal-open'; - var backdropDomEl, backdropScope; - var openedWindows = $$stackedMap.createNew(); - var $modalStack = {}; + let backdropDomEl; + let backdropScope; + const openedWindows = $$stackedMap.createNew(); + const $modalStack = {}; function backdropIndex() { - var topBackdropIndex = -1; - var opened = openedWindows.keys(); - for (var i = 0; i < opened.length; i++) { + let topBackdropIndex = -1; + const opened = openedWindows.keys(); + for (let i = 0; i < opened.length; i++) { if (openedWindows.get(opened[i]).value.backdrop) { topBackdropIndex = i; } @@ -151,7 +165,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) return topBackdropIndex; } - $rootScope.$watch(backdropIndex, function(newBackdropIndex){ + $rootScope.$watch(backdropIndex, function (newBackdropIndex) { if (backdropScope) { backdropScope.index = newBackdropIndex; } @@ -159,14 +173,14 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) function removeModalWindow(modalInstance) { - var body = $document.find('body').eq(0); - var modalWindow = openedWindows.get(modalInstance).value; + const body = $document.find('body').eq(0); + const modalWindow = openedWindows.get(modalInstance).value; //clean up the stack openedWindows.remove(modalInstance); //remove window DOM element - removeAfterAnimate(modalWindow.modalDomEl, modalWindow.modalScope, 300, function() { + removeAfterAnimate(modalWindow.modalDomEl, modalWindow.modalScope, 300, function () { modalWindow.modalScope.$destroy(); body.toggleClass(OPENED_MODAL_CLASS, openedWindows.length() > 0); checkRemoveBackdrop(); @@ -174,26 +188,26 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) } function checkRemoveBackdrop() { - //remove backdrop if no longer needed - if (backdropDomEl && backdropIndex() == -1) { - var backdropScopeRef = backdropScope; - removeAfterAnimate(backdropDomEl, backdropScope, 150, function () { - backdropScopeRef.$destroy(); - backdropScopeRef = null; - }); - backdropDomEl = undefined; - backdropScope = undefined; - } + //remove backdrop if no longer needed + if (backdropDomEl && backdropIndex() === -1) { + let backdropScopeRef = backdropScope; + removeAfterAnimate(backdropDomEl, backdropScope, 150, function () { + backdropScopeRef.$destroy(); + backdropScopeRef = null; + }); + backdropDomEl = undefined; + backdropScope = undefined; + } } function removeAfterAnimate(domEl, scope, emulateTime, done) { // Closing animation scope.animate = false; - var transitionEndEventName = $transition.transitionEndEventName; + const transitionEndEventName = $transition.transitionEndEventName; if (transitionEndEventName) { // transition out - var timeout = $timeout(afterAnimating, emulateTime); + const timeout = $timeout(afterAnimating, emulateTime); domEl.bind(transitionEndEventName, function () { $timeout.cancel(timeout); @@ -219,7 +233,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) } $document.bind('keydown', function (evt) { - var modal; + let modal; if (evt.which === 27) { modal = openedWindows.top(); @@ -241,19 +255,19 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) keyboard: modal.keyboard }); - var body = $document.find('body').eq(0), - currBackdropIndex = backdropIndex(); + const body = $document.find('body').eq(0); + const currBackdropIndex = backdropIndex(); if (currBackdropIndex >= 0 && !backdropDomEl) { backdropScope = $rootScope.$new(true); backdropScope.index = currBackdropIndex; - var angularBackgroundDomEl = angular.element('
'); + const angularBackgroundDomEl = angular.element(''); angularBackgroundDomEl.attr('backdrop-class', modal.backdropClass); backdropDomEl = $compile(angularBackgroundDomEl)(backdropScope); body.append(backdropDomEl); } - var angularDomEl = angular.element(''); + const angularDomEl = angular.element(''); angularDomEl.attr({ 'template-url': modal.windowTemplateUrl, 'window-class': modal.windowClass, @@ -262,14 +276,14 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) 'animate': 'animate' }).html(modal.content); - var modalDomEl = $compile(angularDomEl)(modal.scope); + const modalDomEl = $compile(angularDomEl)(modal.scope); openedWindows.top().value.modalDomEl = modalDomEl; body.append(modalDomEl); body.addClass(OPENED_MODAL_CLASS); }; $modalStack.close = function (modalInstance, result) { - var modalWindow = openedWindows.get(modalInstance); + const modalWindow = openedWindows.get(modalInstance); if (modalWindow) { modalWindow.value.deferred.resolve(result); removeModalWindow(modalInstance); @@ -277,7 +291,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) }; $modalStack.dismiss = function (modalInstance, reason) { - var modalWindow = openedWindows.get(modalInstance); + const modalWindow = openedWindows.get(modalInstance); if (modalWindow) { modalWindow.value.deferred.reject(reason); removeModalWindow(modalInstance); @@ -285,7 +299,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) }; $modalStack.dismissAll = function (reason) { - var topModal = this.getTop(); + let topModal = this.getTop(); while (topModal) { this.dismiss(topModal.key, reason); topModal = this.getTop(); @@ -300,8 +314,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) }]) .provider('$modal', function () { - - var $modalProvider = { + const $modalProvider = { options: { backdrop: true, //can be also false or 'static' keyboard: true @@ -309,18 +322,18 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) $get: ['$injector', '$rootScope', '$q', '$http', '$templateCache', '$controller', '$modalStack', function ($injector, $rootScope, $q, $http, $templateCache, $controller, $modalStack) { - var $modal = {}; + const $modal = {}; function getTemplatePromise(options) { return options.template ? $q.when(options.template) : $http.get(angular.isFunction(options.templateUrl) ? (options.templateUrl)() : options.templateUrl, - {cache: $templateCache}).then(function (result) { - return result.data; + { cache: $templateCache }).then(function (result) { + return result.data; }); } function getResolvePromises(resolves) { - var promisesArr = []; + const promisesArr = []; angular.forEach(resolves, function (value) { if (angular.isFunction(value) || angular.isArray(value)) { promisesArr.push($q.when($injector.invoke(value))); @@ -331,11 +344,11 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) $modal.open = function (modalOptions) { - var modalResultDeferred = $q.defer(); - var modalOpenedDeferred = $q.defer(); + const modalResultDeferred = $q.defer(); + const modalOpenedDeferred = $q.defer(); //prepare an instance of a modal to be injected into controllers and returned to a caller - var modalInstance = { + const modalInstance = { result: modalResultDeferred.promise, opened: modalOpenedDeferred.promise, close: function (result) { @@ -355,18 +368,19 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition']) throw new Error('One of template or templateUrl options is required.'); } - var templateAndResolvePromise = + const templateAndResolvePromise = $q.all([getTemplatePromise(modalOptions)].concat(getResolvePromises(modalOptions.resolve))); templateAndResolvePromise.then(function resolveSuccess(tplAndVars) { - var modalScope = (modalOptions.scope || $rootScope).$new(); + const modalScope = (modalOptions.scope || $rootScope).$new(); modalScope.$close = modalInstance.close; modalScope.$dismiss = modalInstance.dismiss; - var ctrlInstance, ctrlLocals = {}; - var resolveIter = 1; + let ctrlInstance; + const ctrlLocals = {}; + let resolveIter = 1; //controllers if (modalOptions.controller) { diff --git a/src/legacy/ui/public/angular-bootstrap/modal/window.html b/x-pack/legacy/plugins/ml/public/components/modal/window.html similarity index 100% rename from src/legacy/ui/public/angular-bootstrap/modal/window.html rename to x-pack/legacy/plugins/ml/public/components/modal/window.html diff --git a/x-pack/legacy/plugins/ml/public/components/transition/transition.js b/x-pack/legacy/plugins/ml/public/components/transition/transition.js new file mode 100755 index 0000000000000..6af802cec0d2b --- /dev/null +++ b/x-pack/legacy/plugins/ml/public/components/transition/transition.js @@ -0,0 +1,90 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import angular from 'angular'; +import { uiModules } from 'ui/modules'; +const module = uiModules.get('apps/ml'); + +module +/** + * $transition service provides a consistent interface to trigger CSS 3 transitions and to be informed when they complete. + * @param {DOMElement} element The DOMElement that will be animated. + * @param {string|object|function} trigger The thing that will cause the transition to start: + * - As a string, it represents the css class to be added to the element. + * - As an object, it represents a hash of style attributes to be applied to the element. + * - As a function, it represents a function to be called that will cause the transition to occur. + * @return {Promise} A promise that is resolved when the transition finishes. + */ + .factory('$transition', ['$q', '$timeout', '$rootScope', function ($q, $timeout, $rootScope) { + const $transition = function (element, trigger, options) { + options = options || {}; + const deferred = $q.defer(); + const endEventName = $transition[options.animation ? 'animationEndEventName' : 'transitionEndEventName']; + + const transitionEndHandler = function () { + $rootScope.$apply(function () { + element.unbind(endEventName, transitionEndHandler); + deferred.resolve(element); + }); + }; + + if (endEventName) { + element.bind(endEventName, transitionEndHandler); + } + + // Wrap in a timeout to allow the browser time to update the DOM before the transition is to occur + $timeout(function () { + if (angular.isString(trigger)) { + element.addClass(trigger); + } else if (angular.isFunction(trigger)) { + trigger(element); + } else if (angular.isObject(trigger)) { + element.css(trigger); + } + //If browser does not support transitions, instantly resolve + if (!endEventName) { + deferred.resolve(element); + } + }); + + // Add our custom cancel function to the promise that is returned + // We can call this if we are about to run a new transition, which we know will prevent this transition from ending, + // i.e. it will therefore never raise a transitionEnd event for that transition + deferred.promise.cancel = function () { + if (endEventName) { + element.unbind(endEventName, transitionEndHandler); + } + deferred.reject('Transition cancelled'); + }; + + return deferred.promise; + }; + + // Work out the name of the transitionEnd event + const transElement = document.createElement('trans'); + const transitionEndEventNames = { + 'WebkitTransition': 'webkitTransitionEnd', + 'MozTransition': 'transitionend', + 'OTransition': 'oTransitionEnd', + 'transition': 'transitionend' + }; + const animationEndEventNames = { + 'WebkitTransition': 'webkitAnimationEnd', + 'MozTransition': 'animationend', + 'OTransition': 'oAnimationEnd', + 'transition': 'animationend' + }; + function findEndEventName(endEventNames) { + for (const name in endEventNames) { + if (transElement.style[name] !== undefined) { + return endEventNames[name]; + } + } + } + $transition.transitionEndEventName = findEndEventName(transitionEndEventNames); + $transition.animationEndEventName = findEndEventName(animationEndEventNames); + return $transition; + }]); diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job/wizard/steps/index_or_search/index_or_search_controller.js b/x-pack/legacy/plugins/ml/public/jobs/new_job/wizard/steps/index_or_search/index_or_search_controller.js index bc688c07cab2d..6273fb0187b26 100644 --- a/x-pack/legacy/plugins/ml/public/jobs/new_job/wizard/steps/index_or_search/index_or_search_controller.js +++ b/x-pack/legacy/plugins/ml/public/jobs/new_job/wizard/steps/index_or_search/index_or_search_controller.js @@ -25,7 +25,7 @@ import { loadIndexPatterns, getIndexPatterns } from 'plugins/ml/util/index_utils import { checkMlNodesAvailable } from 'plugins/ml/ml_nodes_check/check_ml_nodes'; import template from './index_or_search.html'; import { timefilter } from 'ui/timefilter'; -import 'ui/directives/paginated_selectable_list'; +import './paginated_selectable_list'; import 'ui/directives/saved_object_finder'; uiRoutes diff --git a/src/legacy/ui/public/directives/__tests__/paginated_selectable_list.js b/x-pack/legacy/plugins/ml/public/jobs/new_job/wizard/steps/index_or_search/paginated_selectable_list/__tests__/paginated_selectable_list.js similarity index 87% rename from src/legacy/ui/public/directives/__tests__/paginated_selectable_list.js rename to x-pack/legacy/plugins/ml/public/jobs/new_job/wizard/steps/index_or_search/paginated_selectable_list/__tests__/paginated_selectable_list.js index 319b16c6a3233..387bf97083561 100644 --- a/src/legacy/ui/public/directives/__tests__/paginated_selectable_list.js +++ b/x-pack/legacy/plugins/ml/public/jobs/new_job/wizard/steps/index_or_search/paginated_selectable_list/__tests__/paginated_selectable_list.js @@ -1,20 +1,7 @@ /* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. */ import angular from 'angular'; diff --git a/x-pack/legacy/plugins/ml/public/jobs/new_job/wizard/steps/index_or_search/paginated_selectable_list/index.js b/x-pack/legacy/plugins/ml/public/jobs/new_job/wizard/steps/index_or_search/paginated_selectable_list/index.js new file mode 100644 index 0000000000000..ee6039fdb1621 --- /dev/null +++ b/x-pack/legacy/plugins/ml/public/jobs/new_job/wizard/steps/index_or_search/paginated_selectable_list/index.js @@ -0,0 +1,7 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import './paginated_selectable_list'; diff --git a/src/legacy/ui/public/directives/partials/paginated_selectable_list.html b/x-pack/legacy/plugins/ml/public/jobs/new_job/wizard/steps/index_or_search/paginated_selectable_list/paginated_selectable_list.html similarity index 77% rename from src/legacy/ui/public/directives/partials/paginated_selectable_list.html rename to x-pack/legacy/plugins/ml/public/jobs/new_job/wizard/steps/index_or_search/paginated_selectable_list/paginated_selectable_list.html index e526b501708fc..5e71df462dfd2 100644 --- a/src/legacy/ui/public/directives/partials/paginated_selectable_list.html +++ b/x-pack/legacy/plugins/ml/public/jobs/new_job/wizard/steps/index_or_search/paginated_selectable_list/paginated_selectable_list.html @@ -11,7 +11,7 @@ input-focus disable-input-focus="disableAutoFocus" ng-model="query" - placeholder="{{ ::'common.ui.paginateSelectableList.searchPlaceholder' | i18n: {defaultMessage: 'Filter…'} }}" + placeholder="{{ ::'xpack.ml.paginateSelectableList.searchPlaceholder' | i18n: {defaultMessage: 'Filter…'} }}" class="form-control" name="query" type="text" @@ -23,7 +23,7 @@