diff --git a/src/ui/public/pattern_checker/__tests__/pattern_checker.js b/src/ui/public/pattern_checker/__tests__/pattern_checker.js
deleted file mode 100644
index 0e0e80ffc3977..0000000000000
--- a/src/ui/public/pattern_checker/__tests__/pattern_checker.js
+++ /dev/null
@@ -1,95 +0,0 @@
-import ngMock from 'ng_mock';
-import expect from 'expect.js';
-import _ from 'lodash';
-import sinon from 'sinon';
-
-describe('pattern checker', function () {
- let $httpBackend;
- let $compile;
- let $rootScope;
- let apiResponse;
- let $timeout;
- const notifyFatalStub = sinon.stub();
-
- beforeEach(ngMock.module('kibana'));
-
- beforeEach(ngMock.module(function ($provide) {
- notifyFatalStub.reset();
-
- $provide.value('Notifier', function () {
- this.fatal = notifyFatalStub;
- });
- }));
-
- beforeEach(ngMock.inject(function ($injector) {
- $httpBackend = $injector.get('$httpBackend');
- $compile = $injector.get('$compile');
- $rootScope = $injector.get('$rootScope');
- $timeout = $injector.get('$timeout');
-
- apiResponse = $httpBackend.when('POST', /\/api\/kibana\/.*\/_count/);
- }));
-
- it('should display the number of documents in a given index pattern', function () {
- apiResponse.respond(200, { count: 1 });
-
- const element = $compile('
Querying {{checker.pattern}}... {{checker.resultCount}} resultsdiff --git a/src/ui/public/pattern_checker/pattern_checker.js b/src/ui/public/pattern_checker/pattern_checker.js deleted file mode 100644 index 52e0ebe221965..0000000000000 --- a/src/ui/public/pattern_checker/pattern_checker.js +++ /dev/null @@ -1,52 +0,0 @@ -import { uiModules } from 'ui/modules'; -import { callAfterBindingsWorkaround } from 'ui/compat'; -import template from './pattern_checker.html'; -import './pattern_checker.less'; -import chrome from 'ui/chrome'; - -const module = uiModules.get('kibana'); - -module.directive('patternChecker', function () { - return { - restrict: 'E', - template: template, - controllerAs: 'checker', - bindToController: true, - scope: { - pattern: '=' - }, - controller: callAfterBindingsWorkaround(function (Notifier, $scope, $timeout, $http) { - let validationTimeout; - - const notify = new Notifier({ - location: 'Add Data' - }); - - this.validateInstall = () => { - $http.post(chrome.addBasePath(`/api/kibana/${this.pattern}/_count`)) - .then( - (response) => { - this.resultCount = response.data.count; - }, - (error) => { - if (error.status === 404) { - this.resultCount = 0; - } - else { - notify.fatal(error); - } - } - ) - .then(() => { - validationTimeout = $timeout(this.validateInstall, 5000); - }); - }; - - $scope.$on('$destroy', () => { - $timeout.cancel(validationTimeout); - }); - - this.validateInstall(); - }) - }; -}); diff --git a/src/ui/public/pattern_checker/pattern_checker.less b/src/ui/public/pattern_checker/pattern_checker.less deleted file mode 100644 index a7037ee5cf17b..0000000000000 --- a/src/ui/public/pattern_checker/pattern_checker.less +++ /dev/null @@ -1,3 +0,0 @@ -pattern-checker .spinner { - padding: 0 1em; -}