From c87aec3daecfbb7f974c110cd89bc185fbacd380 Mon Sep 17 00:00:00 2001 From: spalger Date: Tue, 12 Jan 2016 16:23:32 -0700 Subject: [PATCH 01/20] [mocha] move setup work into module with https://github.com/elastic/kibana/pull/5553 we added command line flags the told mocha it was supposed to use babel. This changes the strategy here and instead uses mocha's -r option (and it's mocha.opts file to specify it). This means that using mocha directly from the command line still works, and that we have a place where we can do other setup work. --- package.json | 4 ++-- tasks/config/simplemocha.js | 8 ++++++++ test/mocha.opts | 1 + test/mocha_setup.js | 1 + 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 test/mocha.opts create mode 100644 test/mocha_setup.js diff --git a/package.json b/package.json index ff6ed171995f..937f1f2ebca1 100644 --- a/package.json +++ b/package.json @@ -55,8 +55,8 @@ "elasticsearch": "grunt esvm:dev:keepalive", "lint": "grunt eslint:source", "lintroller": "grunt eslint:fixSource", - "mocha": "mocha --compilers js:babel/register", - "mocha:debug": "mocha --debug-brk --compilers js:babel/register" + "mocha": "mocha", + "mocha:debug": "mocha --debug-brk" }, "repository": { "type": "git", diff --git a/tasks/config/simplemocha.js b/tasks/config/simplemocha.js index 3aacde1f64e2..c2b78a9c6b55 100644 --- a/tasks/config/simplemocha.js +++ b/tasks/config/simplemocha.js @@ -1,3 +1,11 @@ +var wrap = require('lodash').wrap; +var Mocha = require('mocha'); + +Mocha.prototype.run = wrap(Mocha.prototype.run, function (orig) { + require('../../test/mocha_setup'); + orig.call(this); +}); + module.exports = { options: { timeout: 10000, diff --git a/test/mocha.opts b/test/mocha.opts new file mode 100644 index 000000000000..40030a7420e8 --- /dev/null +++ b/test/mocha.opts @@ -0,0 +1 @@ +-r test/mocha_setup.js diff --git a/test/mocha_setup.js b/test/mocha_setup.js new file mode 100644 index 000000000000..03d0880b8862 --- /dev/null +++ b/test/mocha_setup.js @@ -0,0 +1 @@ +require('babel/register')(require('../src/optimize/babelOptions').node); From 680bf2102c7a46892923cc9db4da5429caff4ad0 Mon Sep 17 00:00:00 2001 From: spalger Date: Tue, 12 Jan 2016 16:28:49 -0700 Subject: [PATCH 02/20] [mocha] setup auto-release-sinon for server tests --- test/mocha_setup.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/test/mocha_setup.js b/test/mocha_setup.js index 03d0880b8862..ef355605341a 100644 --- a/test/mocha_setup.js +++ b/test/mocha_setup.js @@ -1 +1,31 @@ +var sinon = require('sinon'); +var autoRelease = require('auto-release-sinon'); + require('babel/register')(require('../src/optimize/babelOptions').node); + +var queuedAfterEachArgs = []; +Object.defineProperty(global, 'afterEach', { + configurable: true, + get() { return undefined; }, + set(afterEach) { + Object.defineProperty(global, 'afterEach', { + configurable: true, + writable: true, + value: afterEach + }); + + queuedAfterEachArgs.forEach(function (args) { + afterEach.apply(null, args); + }); + + return global.afterEach; + } +}); + +autoRelease.setupAutoRelease(sinon, function () { + if (!global.afterEach) { + queuedAfterEachArgs.push(Array.prototype.slice.call(arguments)); + } else { + global.afterEach.apply(this, arguments); + } +}); From 7b15ee05d1df291d316c22fff16f858f6eb0a28a Mon Sep 17 00:00:00 2001 From: spalger Date: Wed, 13 Jan 2016 16:50:55 -0700 Subject: [PATCH 03/20] [mochaSetup] added notes to explain the purpose for the workarounds in place --- tasks/config/simplemocha.js | 2 ++ test/mocha_setup.js | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/tasks/config/simplemocha.js b/tasks/config/simplemocha.js index c2b78a9c6b55..2016b2d93bbd 100644 --- a/tasks/config/simplemocha.js +++ b/tasks/config/simplemocha.js @@ -1,6 +1,8 @@ var wrap = require('lodash').wrap; var Mocha = require('mocha'); +// work around simplemocha's lack of a "--require" option. +// see https://github.com/yaymukund/grunt-simple-mocha/issues/50 for feature request. Mocha.prototype.run = wrap(Mocha.prototype.run, function (orig) { require('../../test/mocha_setup'); orig.call(this); diff --git a/test/mocha_setup.js b/test/mocha_setup.js index ef355605341a..8404ab88be2f 100644 --- a/test/mocha_setup.js +++ b/test/mocha_setup.js @@ -3,6 +3,16 @@ var autoRelease = require('auto-release-sinon'); require('babel/register')(require('../src/optimize/babelOptions').node); +// hook into the global afterEach variable to allow autoReleaseSinon to register +// an afterEach handler before mocha has exposed itself to the test files. +// +// This works by telling autoReleaseSinon to use a fake "afterEach" function. +// Rather than actually record an afterEach handler the function tracks all of +// the calls it received and queues them up in queuedAfterEachArgs. +// +// The global "afterEach" variable is also tracked, and once it is assigned by mocha +// the variable global is reconfigured to point directly to the new value (from mocha) +// and all of the queued invocations are executed. var queuedAfterEachArgs = []; Object.defineProperty(global, 'afterEach', { configurable: true, From d3fd053d0affacbaef6834b057eb6c596586ac14 Mon Sep 17 00:00:00 2001 From: spalger Date: Wed, 13 Jan 2016 16:51:29 -0700 Subject: [PATCH 04/20] [mochaOpts] use full option name --- test/mocha.opts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/mocha.opts b/test/mocha.opts index 40030a7420e8..72451b6e7f81 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -1 +1 @@ --r test/mocha_setup.js +--require test/mocha_setup.js From 777362569053615d851a09737d551a6bd2e8c307 Mon Sep 17 00:00:00 2001 From: spalger Date: Thu, 14 Jan 2016 10:32:28 -0700 Subject: [PATCH 05/20] [simplemocha] always perform mocha setup if grunt task is loaded --- tasks/config/simplemocha.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tasks/config/simplemocha.js b/tasks/config/simplemocha.js index 2016b2d93bbd..80bbadd43335 100644 --- a/tasks/config/simplemocha.js +++ b/tasks/config/simplemocha.js @@ -1,12 +1,4 @@ -var wrap = require('lodash').wrap; -var Mocha = require('mocha'); - -// work around simplemocha's lack of a "--require" option. -// see https://github.com/yaymukund/grunt-simple-mocha/issues/50 for feature request. -Mocha.prototype.run = wrap(Mocha.prototype.run, function (orig) { - require('../../test/mocha_setup'); - orig.call(this); -}); +require('../../test/mocha_setup'); module.exports = { options: { From 24749258dbc92f32722a1a1158bbd09d0f01d3a5 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Wed, 20 Jan 2016 12:04:15 -0600 Subject: [PATCH 06/20] [build] Create os packages on jenkins --- tasks/build/index.js | 56 +++++++++++++++++++++++--------------------- tasks/jenkins.js | 3 ++- 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/tasks/build/index.js b/tasks/build/index.js index 22341871639d..f136f89179ea 100644 --- a/tasks/build/index.js +++ b/tasks/build/index.js @@ -1,31 +1,33 @@ module.exports = function (grunt) { let { flatten } = require('lodash'); - grunt.registerTask('build', flatten([ - '_build:getProps', - 'clean:build', - 'clean:target', - '_build:downloadNodeBuilds:start', - 'copy:devSource', - 'babel:build', - '_build:babelOptions', - '_build:installedPlugins', - '_build:packageJson', - '_build:readme', - '_build:installNpmDeps', - '_build:removePkgJsonDeps', - 'clean:testsFromModules', - 'clean:deepModuleBins', - 'clean:deepModules', - 'run:optimizeBuild', - 'stop:optimizeBuild', - '_build:downloadNodeBuilds:finish', - '_build:versionedLinks', - '_build:archives', - !grunt.option('os-packages') ? [] : [ - '_build:pleaseRun', - '_build:osPackages', - ], - '_build:shasums' - ])); + grunt.registerTask('build', 'Build packages', function (arg) { + grunt.task.run(flatten([ + '_build:getProps', + 'clean:build', + 'clean:target', + '_build:downloadNodeBuilds:start', + 'copy:devSource', + 'babel:build', + '_build:babelOptions', + '_build:installedPlugins', + '_build:packageJson', + '_build:readme', + '_build:installNpmDeps', + '_build:removePkgJsonDeps', + 'clean:testsFromModules', + 'clean:deepModuleBins', + 'clean:deepModules', + 'run:optimizeBuild', + 'stop:optimizeBuild', + '_build:downloadNodeBuilds:finish', + '_build:versionedLinks', + '_build:archives', + (grunt.option('os-packages') || arg === 'ospackages') ? [ + '_build:pleaseRun', + '_build:osPackages', + ] : [], + '_build:shasums' + ])); + }); }; diff --git a/tasks/jenkins.js b/tasks/jenkins.js index f043e92d0cc7..c76028a1e41e 100644 --- a/tasks/jenkins.js +++ b/tasks/jenkins.js @@ -3,7 +3,8 @@ module.exports = function (grunt) { grunt.registerTask('jenkins', 'Jenkins build script', compact([ 'test', - process.env.JOB_NAME === 'kibana_core' ? 'build' : null + // process.env.JOB_NAME === 'kibana_core' ? 'build' : null + 'build:ospackages' ])); }; From 4f827c83fac7482ae188bf320264eeb0fa1d6a96 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Wed, 20 Jan 2016 12:21:35 -0600 Subject: [PATCH 07/20] [build] Only build on core --- tasks/jenkins.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tasks/jenkins.js b/tasks/jenkins.js index c76028a1e41e..e3d3d9c3cc06 100644 --- a/tasks/jenkins.js +++ b/tasks/jenkins.js @@ -3,8 +3,7 @@ module.exports = function (grunt) { grunt.registerTask('jenkins', 'Jenkins build script', compact([ 'test', - // process.env.JOB_NAME === 'kibana_core' ? 'build' : null - 'build:ospackages' + process.env.JOB_NAME === 'kibana_core' ? 'build:ospackages' : null ])); }; From dc36197b557b3453854caad624eb6fe0848819f4 Mon Sep 17 00:00:00 2001 From: LeeDr Date: Tue, 26 Jan 2016 15:36:54 -0600 Subject: [PATCH 08/20] New tests for expand/collapse discover tab legend and sidebar. --- .../apps/discover/_collapse_expand.js | 128 ++++++++++++++++++ .../functional/apps/discover/_shared_links.js | 4 - test/functional/apps/discover/index.js | 3 + test/support/pages/DiscoverPage.js | 36 +++++ 4 files changed, 167 insertions(+), 4 deletions(-) create mode 100644 test/functional/apps/discover/_collapse_expand.js diff --git a/test/functional/apps/discover/_collapse_expand.js b/test/functional/apps/discover/_collapse_expand.js new file mode 100644 index 000000000000..25f4260b3e35 --- /dev/null +++ b/test/functional/apps/discover/_collapse_expand.js @@ -0,0 +1,128 @@ +define(function (require) { + var Common = require('../../../support/pages/Common'); + var HeaderPage = require('../../../support/pages/HeaderPage'); + var SettingsPage = require('../../../support/pages/settings_page'); + var DiscoverPage = require('../../../support/pages/DiscoverPage'); + var expect = require('intern/dojo/node!expect.js'); + + return function (bdd, scenarioManager) { + bdd.describe('discover tab', function describeIndexTests() { + var common; + var headerPage; + var settingsPage; + var discoverPage; + var baseUrl; + + bdd.before(function () { + common = new Common(this.remote); + headerPage = new HeaderPage(this.remote); + settingsPage = new SettingsPage(this.remote); + discoverPage = new DiscoverPage(this.remote); + + baseUrl = common.getHostPort(); + + var fromTime = '2015-09-19 06:31:44.000'; + var toTime = '2015-09-23 18:31:44.000'; + + // start each test with an empty kibana index + return scenarioManager.reload('emptyKibana') + // and load a set of makelogs data + .then(function loadIfEmptyMakelogs() { + return scenarioManager.loadIfEmpty('logstashFunctional'); + }) + .then(function (navigateTo) { + common.debug('navigateTo'); + return settingsPage.navigateTo(); + }) + .then(function () { + common.debug('createIndexPattern'); + return settingsPage.createIndexPattern(); + }) + .then(function () { + common.debug('discover'); + return common.navigateToApp('discover'); + }) + .then(function () { + common.debug('setAbsoluteRange'); + return headerPage.setAbsoluteRange(fromTime, toTime); + }) + .catch(common.handleError(this)); + }); + + + bdd.describe('legend', function () { + + bdd.it('should initially be collapsed', function () { + return discoverPage.getLegendWidth() + .then(function (actualwidth) { + common.debug('collapsed legend width = ' + actualwidth); + expect(actualwidth < 20).to.be(true); + }) + .catch(common.handleError(this)); + }); + + bdd.it('should expand when clicked', function () { + return discoverPage.clickLegendExpand() + .then(function () { + return discoverPage.getLegendWidth(); + }) + .then(function (actualwidth) { + common.debug('expanded legend width = ' + actualwidth); + expect(actualwidth > 140).to.be(true); + }) + .catch(common.handleError(this)); + }); + + bdd.it('should collapse when clicked', function () { + return discoverPage.clickLegendCollapse() + .then(function () { + return discoverPage.getLegendWidth(); + }) + .then(function (actualwidth) { + expect(actualwidth < 20).to.be(true); + }) + .catch(common.handleError(this)); + }); + + }); + + bdd.describe('field data', function () { + + bdd.it('should initially be expanded', function () { + return discoverPage.getSidebarWidth() + .then(function (actualwidth) { + common.debug('expanded sidebar width = ' + actualwidth); + expect(actualwidth > 180).to.be(true); + }) + .catch(common.handleError(this)); + }); + + bdd.it('should collapse when clicked', function () { + return discoverPage.clickSidebarCollapse() + .then(function () { + return discoverPage.getSidebarWidth(); + }) + .then(function (actualwidth) { + common.debug('collapsed sidebar width = ' + actualwidth); + expect(actualwidth < 20).to.be(true); + }) + .catch(common.handleError(this)); + }); + + bdd.it('should expand when clicked', function () { + return discoverPage.clickSidebarExpand() + .then(function () { + return discoverPage.getSidebarWidth(); + }) + .then(function (actualwidth) { + common.debug('expanded sidebar width = ' + actualwidth); + expect(actualwidth > 180).to.be(true); + }) + .catch(common.handleError(this)); + }); + + }); + + }); + }; +}); diff --git a/test/functional/apps/discover/_shared_links.js b/test/functional/apps/discover/_shared_links.js index 4d04b2b67fb8..46f54e7733c7 100644 --- a/test/functional/apps/discover/_shared_links.js +++ b/test/functional/apps/discover/_shared_links.js @@ -22,7 +22,6 @@ define(function (require) { discoverPage = new DiscoverPage(this.remote); baseUrl = common.getHostPort(); - // baseUrl = 'http://localhost:5620'; var fromTime = '2015-09-19 06:31:44.000'; var toTime = '2015-09-23 18:31:44.000'; @@ -54,9 +53,6 @@ define(function (require) { bdd.describe('shared link', function () { - var queryName1 = 'Query # 1'; - var fromTimeString = 'September 19th 2015, 06:31:44.000'; - var toTimeString = 'September 23rd 2015, 18:31:44.000'; bdd.it('should show "Share a link" caption', function () { var expectedCaption = 'Share a link'; diff --git a/test/functional/apps/discover/index.js b/test/functional/apps/discover/index.js index c7885133e7e8..176d6cacbc2b 100644 --- a/test/functional/apps/discover/index.js +++ b/test/functional/apps/discover/index.js @@ -6,6 +6,7 @@ define(function (require) { var discoverTest = require('./_discover'); var fieldData = require('./_field_data'); var sharedLinks = require('./_shared_links'); + var collapseExpand = require('./_collapse_expand'); bdd.describe('discover app', function () { var scenarioManager; @@ -28,5 +29,7 @@ define(function (require) { sharedLinks(bdd, scenarioManager); + collapseExpand(bdd, scenarioManager); + }); }); diff --git a/test/support/pages/DiscoverPage.js b/test/support/pages/DiscoverPage.js index 3dcf3f55fbf1..84b887b77ea1 100644 --- a/test/support/pages/DiscoverPage.js +++ b/test/support/pages/DiscoverPage.js @@ -211,6 +211,42 @@ define(function (require) { return thisTime .findByCssSelector('.url') .getProperty('value'); + }, + + clickLegendExpand: function clickLegendExpand() { + return thisTime + .findByCssSelector('.fa-chevron-left') + .click(); + }, + + clickLegendCollapse: function clickLegendCollapse() { + return thisTime + .findByCssSelector('div.legend-toggle > i.fa-chevron-right') + .click(); + }, + + getLegendWidth: function getLegendWidth() { + return thisTime + .findByCssSelector('.legend-col-wrapper') + .getProperty('clientWidth'); + }, + + clickSidebarExpand: function clickSidebarExpand() { + return thisTime + .findByCssSelector('.chevron-cont') + .click(); + }, + + clickSidebarCollapse: function clickSidebarCollapse() { + return thisTime + .findByCssSelector('.chevron-cont') + .click(); + }, + + getSidebarWidth: function getSidebarWidth() { + return thisTime + .findByCssSelector('.sidebar-list') + .getProperty('clientWidth'); } }; From 9086f504d645403633292a5a15e2be9835683bd0 Mon Sep 17 00:00:00 2001 From: Shelby Sturgis Date: Tue, 19 Jan 2016 14:38:24 -0800 Subject: [PATCH 09/20] Closes #5860. Adding spyPerPage param to .spy.params instead of on the editableVis.params. Fixes #5942 --- src/plugins/spyModes/public/tableSpyMode.html | 2 +- src/plugins/spyModes/public/tableSpyMode.js | 4 ++-- src/ui/public/visualize/spy.js | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/spyModes/public/tableSpyMode.html b/src/plugins/spyModes/public/tableSpyMode.html index 7805396642b7..e541921c2476 100644 --- a/src/plugins/spyModes/public/tableSpyMode.html +++ b/src/plugins/spyModes/public/tableSpyMode.html @@ -1,5 +1,5 @@ + per-page="spy.params.spyPerPage"> diff --git a/src/plugins/spyModes/public/tableSpyMode.js b/src/plugins/spyModes/public/tableSpyMode.js index 97eac984b091..b18c4ae437f8 100644 --- a/src/plugins/spyModes/public/tableSpyMode.js +++ b/src/plugins/spyModes/public/tableSpyMode.js @@ -21,8 +21,8 @@ define(function (require) { if (!$scope.vis || !$scope.esResp) { $scope.table = null; } else { - if (!$scope.editableVis.params.spyPerPage) { - $scope.editableVis.params.spyPerPage = PER_PAGE_DEFAULT; + if (!$scope.spy.params.spyPerPage) { + $scope.spy.params.spyPerPage = PER_PAGE_DEFAULT; } $scope.table = tabifyAggResponse($scope.vis, $scope.esResp, { diff --git a/src/ui/public/visualize/spy.js b/src/ui/public/visualize/spy.js index d58299769b92..2629dce9b290 100644 --- a/src/ui/public/visualize/spy.js +++ b/src/ui/public/visualize/spy.js @@ -16,6 +16,7 @@ define(function (require) { var $container = $el.find('.visualize-spy-container'); var fullPageSpy = _.get($scope.spy, 'mode.fill', false); $scope.modes = spyModes; + $scope.spy.params = $scope.spy.params || {}; function getSpyObject(name) { name = _.isUndefined(name) ? $scope.spy.mode.name : name; From 580ff60b6b6900b4aa162b02cd21ec268617582a Mon Sep 17 00:00:00 2001 From: Matthew Bargar Date: Thu, 28 Jan 2016 11:13:46 -0500 Subject: [PATCH 10/20] callWithRequest should pass the context that the API method would get when called normally instead of assuming client is the context for everything --- src/plugins/elasticsearch/lib/call_with_request.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/plugins/elasticsearch/lib/call_with_request.js b/src/plugins/elasticsearch/lib/call_with_request.js index 1bd818296c73..cf440b260219 100644 --- a/src/plugins/elasticsearch/lib/call_with_request.js +++ b/src/plugins/elasticsearch/lib/call_with_request.js @@ -2,15 +2,21 @@ const _ = require('lodash'); const Promise = require('bluebird'); const Boom = require('boom'); const getBasicAuthRealm = require('./get_basic_auth_realm'); +const toPath = require('lodash/internal/toPath'); module.exports = (client) => { return (req, endpoint, params = {}) => { if (req.headers.authorization) { _.set(params, 'headers.authorization', req.headers.authorization); } - const api = _.get(client, endpoint); + const path = toPath(endpoint); + const api = _.get(client, path); + let apiContext = _.get(client, path.slice(0, -1)); + if (_.isEmpty(apiContext)) { + apiContext = client; + } if (!api) throw new Error(`callWithRequest called with an invalid endpoint: ${endpoint}`); - return api.call(client, params) + return api.call(apiContext, params) .catch((err) => { if (err.status === 401) { // TODO: The err.message is temporary until we have support for getting headers in the client. From a4088bbacc468fd81d5ae4796dbe4460e3ac22ca Mon Sep 17 00:00:00 2001 From: LeeDr Date: Thu, 28 Jan 2016 16:17:23 -0600 Subject: [PATCH 11/20] snake_case test files. --- .../__tests__/{scenarioManager.js => scenario_manager.js} | 2 +- test/fixtures/{scenarioManager.js => scenario_manager.js} | 0 test/functional/apps/discover/_discover.js | 6 +++--- test/functional/apps/discover/_field_data.js | 6 +++--- test/functional/apps/discover/_shared_links.js | 6 +++--- test/functional/apps/discover/index.js | 2 +- test/functional/apps/settings/_advanced_settings.js | 2 +- test/functional/apps/settings/_creation_form_changes.js | 2 +- .../apps/settings/_index_pattern_create_delete.js | 2 +- .../functional/apps/settings/_index_pattern_popularity.js | 2 +- .../apps/settings/_index_pattern_results_sort.js | 2 +- test/functional/apps/settings/_initial_state.js | 2 +- test/functional/apps/settings/index.js | 2 +- test/functional/apps/visualize/_area_chart.js | 8 ++++---- test/functional/apps/visualize/_chart_types.js | 4 ++-- test/functional/apps/visualize/_data_table.js | 8 ++++---- test/functional/apps/visualize/_line_chart.js | 8 ++++---- test/functional/apps/visualize/_metric_chart.js | 8 ++++---- test/functional/apps/visualize/_pie_chart.js | 8 ++++---- test/functional/apps/visualize/_tile_map.js | 8 ++++---- test/functional/apps/visualize/_vertical_bar_chart.js | 8 ++++---- test/functional/apps/visualize/index.js | 6 +++--- test/functional/status_page/index.js | 2 +- test/support/pages/{Common.js => common.js} | 2 +- test/support/pages/{DiscoverPage.js => discover_page.js} | 2 +- test/support/pages/{HeaderPage.js => header_page.js} | 0 .../support/pages/{VisualizePage.js => visualize_page.js} | 0 test/unit/api/ingest/index.js | 2 +- 28 files changed, 55 insertions(+), 55 deletions(-) rename test/fixtures/__tests__/{scenarioManager.js => scenario_manager.js} (98%) rename test/fixtures/{scenarioManager.js => scenario_manager.js} (100%) rename test/support/pages/{Common.js => common.js} (99%) rename test/support/pages/{DiscoverPage.js => discover_page.js} (99%) rename test/support/pages/{HeaderPage.js => header_page.js} (100%) rename test/support/pages/{VisualizePage.js => visualize_page.js} (100%) diff --git a/test/fixtures/__tests__/scenarioManager.js b/test/fixtures/__tests__/scenario_manager.js similarity index 98% rename from test/fixtures/__tests__/scenarioManager.js rename to test/fixtures/__tests__/scenario_manager.js index bccce64e7ade..144f6c1cfaa8 100644 --- a/test/fixtures/__tests__/scenarioManager.js +++ b/test/fixtures/__tests__/scenario_manager.js @@ -2,7 +2,7 @@ var expect = require('expect.js'); var sinon = require('sinon'); var Promise = require('bluebird'); -var ScenarioManager = require('../scenarioManager'); +var ScenarioManager = require('../scenario_manager'); describe('scenario manager', function () { var manager = new ScenarioManager('http://localhost:9200'); diff --git a/test/fixtures/scenarioManager.js b/test/fixtures/scenario_manager.js similarity index 100% rename from test/fixtures/scenarioManager.js rename to test/fixtures/scenario_manager.js diff --git a/test/functional/apps/discover/_discover.js b/test/functional/apps/discover/_discover.js index b0cf63a0748d..44525ad24d45 100644 --- a/test/functional/apps/discover/_discover.js +++ b/test/functional/apps/discover/_discover.js @@ -1,8 +1,8 @@ define(function (require) { - var Common = require('../../../support/pages/Common'); - var HeaderPage = require('../../../support/pages/HeaderPage'); + var Common = require('../../../support/pages/common'); + var HeaderPage = require('../../../support/pages/header_page'); var SettingsPage = require('../../../support/pages/settings_page'); - var DiscoverPage = require('../../../support/pages/DiscoverPage'); + var DiscoverPage = require('../../../support/pages/discover_page'); var expect = require('intern/dojo/node!expect.js'); return function (bdd, scenarioManager) { diff --git a/test/functional/apps/discover/_field_data.js b/test/functional/apps/discover/_field_data.js index e50f65678ca2..c36ae8e0fcae 100644 --- a/test/functional/apps/discover/_field_data.js +++ b/test/functional/apps/discover/_field_data.js @@ -1,8 +1,8 @@ define(function (require) { - var Common = require('../../../support/pages/Common'); - var HeaderPage = require('../../../support/pages/HeaderPage'); + var Common = require('../../../support/pages/common'); + var HeaderPage = require('../../../support/pages/header_page'); var SettingsPage = require('../../../support/pages/settings_page'); - var DiscoverPage = require('../../../support/pages/DiscoverPage'); + var DiscoverPage = require('../../../support/pages/discover_page'); var expect = require('intern/dojo/node!expect.js'); return function (bdd, scenarioManager) { diff --git a/test/functional/apps/discover/_shared_links.js b/test/functional/apps/discover/_shared_links.js index e446109c5c56..f590cc2dd44c 100644 --- a/test/functional/apps/discover/_shared_links.js +++ b/test/functional/apps/discover/_shared_links.js @@ -1,8 +1,8 @@ define(function (require) { - var Common = require('../../../support/pages/Common'); - var HeaderPage = require('../../../support/pages/HeaderPage'); + var Common = require('../../../support/pages/common'); + var HeaderPage = require('../../../support/pages/header_page'); var SettingsPage = require('../../../support/pages/settings_page'); - var DiscoverPage = require('../../../support/pages/DiscoverPage'); + var DiscoverPage = require('../../../support/pages/discover_page'); var expect = require('intern/dojo/node!expect.js'); return function (bdd, scenarioManager) { diff --git a/test/functional/apps/discover/index.js b/test/functional/apps/discover/index.js index c7885133e7e8..85fc29649f28 100644 --- a/test/functional/apps/discover/index.js +++ b/test/functional/apps/discover/index.js @@ -2,7 +2,7 @@ define(function (require) { var bdd = require('intern!bdd'); var config = require('intern').config; var url = require('intern/dojo/node!url'); - var ScenarioManager = require('intern/dojo/node!../../../fixtures/scenarioManager'); + var ScenarioManager = require('intern/dojo/node!../../../fixtures/scenario_manager'); var discoverTest = require('./_discover'); var fieldData = require('./_field_data'); var sharedLinks = require('./_shared_links'); diff --git a/test/functional/apps/settings/_advanced_settings.js b/test/functional/apps/settings/_advanced_settings.js index edf14b191442..6a39e5654b52 100644 --- a/test/functional/apps/settings/_advanced_settings.js +++ b/test/functional/apps/settings/_advanced_settings.js @@ -1,5 +1,5 @@ define(function (require) { - var Common = require('../../../support/pages/Common'); + var Common = require('../../../support/pages/common'); var SettingsPage = require('../../../support/pages/settings_page'); var expect = require('intern/dojo/node!expect.js'); diff --git a/test/functional/apps/settings/_creation_form_changes.js b/test/functional/apps/settings/_creation_form_changes.js index 932756d15336..b6451f9b0159 100644 --- a/test/functional/apps/settings/_creation_form_changes.js +++ b/test/functional/apps/settings/_creation_form_changes.js @@ -1,5 +1,5 @@ define(function (require) { - var Common = require('../../../support/pages/Common'); + var Common = require('../../../support/pages/common'); var SettingsPage = require('../../../support/pages/settings_page'); var expect = require('intern/dojo/node!expect.js'); diff --git a/test/functional/apps/settings/_index_pattern_create_delete.js b/test/functional/apps/settings/_index_pattern_create_delete.js index 9c8d27b810cb..294e187a6170 100644 --- a/test/functional/apps/settings/_index_pattern_create_delete.js +++ b/test/functional/apps/settings/_index_pattern_create_delete.js @@ -1,5 +1,5 @@ define(function (require) { - var Common = require('../../../support/pages/Common'); + var Common = require('../../../support/pages/common'); var SettingsPage = require('../../../support/pages/settings_page'); var expect = require('intern/dojo/node!expect.js'); diff --git a/test/functional/apps/settings/_index_pattern_popularity.js b/test/functional/apps/settings/_index_pattern_popularity.js index a8c36e91194a..42ec83f3e814 100644 --- a/test/functional/apps/settings/_index_pattern_popularity.js +++ b/test/functional/apps/settings/_index_pattern_popularity.js @@ -1,5 +1,5 @@ define(function (require) { - var Common = require('../../../support/pages/Common'); + var Common = require('../../../support/pages/common'); var SettingsPage = require('../../../support/pages/settings_page'); var expect = require('intern/dojo/node!expect.js'); diff --git a/test/functional/apps/settings/_index_pattern_results_sort.js b/test/functional/apps/settings/_index_pattern_results_sort.js index c9f42ae95aff..e91c0ebf6ac5 100644 --- a/test/functional/apps/settings/_index_pattern_results_sort.js +++ b/test/functional/apps/settings/_index_pattern_results_sort.js @@ -1,6 +1,6 @@ define(function (require) { var config = require('intern').config; - var Common = require('../../../support/pages/Common'); + var Common = require('../../../support/pages/common'); var SettingsPage = require('../../../support/pages/settings_page'); var expect = require('intern/dojo/node!expect.js'); diff --git a/test/functional/apps/settings/_initial_state.js b/test/functional/apps/settings/_initial_state.js index cd6a3bca7086..a7d4f2b872eb 100644 --- a/test/functional/apps/settings/_initial_state.js +++ b/test/functional/apps/settings/_initial_state.js @@ -1,6 +1,6 @@ define(function (require) { var expect = require('intern/dojo/node!expect.js'); - var Common = require('../../../support/pages/Common'); + var Common = require('../../../support/pages/common'); var SettingsPage = require('../../../support/pages/settings_page'); return function (bdd, scenarioManager) { diff --git a/test/functional/apps/settings/index.js b/test/functional/apps/settings/index.js index 83a1bb576c42..467ee268377a 100644 --- a/test/functional/apps/settings/index.js +++ b/test/functional/apps/settings/index.js @@ -2,7 +2,7 @@ define(function (require) { var bdd = require('intern!bdd'); var config = require('intern').config; var url = require('intern/dojo/node!url'); - var ScenarioManager = require('intern/dojo/node!../../../fixtures/scenarioManager'); + var ScenarioManager = require('intern/dojo/node!../../../fixtures/scenario_manager'); var initialStateTest = require('./_initial_state'); var creationChangesTest = require('./_creation_form_changes'); diff --git a/test/functional/apps/visualize/_area_chart.js b/test/functional/apps/visualize/_area_chart.js index 8251cec57d8c..a456dfec3ed7 100644 --- a/test/functional/apps/visualize/_area_chart.js +++ b/test/functional/apps/visualize/_area_chart.js @@ -1,9 +1,9 @@ define(function (require) { - var Common = require('../../../support/pages/Common'); - var HeaderPage = require('../../../support/pages/HeaderPage'); + var Common = require('../../../support/pages/common'); + var HeaderPage = require('../../../support/pages/header_page'); var SettingsPage = require('../../../support/pages/settings_page'); - var DiscoverPage = require('../../../support/pages/DiscoverPage'); - var VisualizePage = require('../../../support/pages/VisualizePage'); + var DiscoverPage = require('../../../support/pages/discover_page'); + var VisualizePage = require('../../../support/pages/visualize_page'); var expect = require('intern/dojo/node!expect.js'); return function (bdd, scenarioManager) { diff --git a/test/functional/apps/visualize/_chart_types.js b/test/functional/apps/visualize/_chart_types.js index ee0243159e74..6da1462ec25f 100644 --- a/test/functional/apps/visualize/_chart_types.js +++ b/test/functional/apps/visualize/_chart_types.js @@ -1,7 +1,7 @@ define(function (require) { - var Common = require('../../../support/pages/Common'); + var Common = require('../../../support/pages/common'); var SettingsPage = require('../../../support/pages/settings_page'); - var VisualizePage = require('../../../support/pages/VisualizePage'); + var VisualizePage = require('../../../support/pages/visualize_page'); var expect = require('intern/dojo/node!expect.js'); return function (bdd, scenarioManager) { diff --git a/test/functional/apps/visualize/_data_table.js b/test/functional/apps/visualize/_data_table.js index 72a23b032246..0f4e3a4faaa7 100644 --- a/test/functional/apps/visualize/_data_table.js +++ b/test/functional/apps/visualize/_data_table.js @@ -1,9 +1,9 @@ define(function (require) { - var Common = require('../../../support/pages/Common'); - var HeaderPage = require('../../../support/pages/HeaderPage'); + var Common = require('../../../support/pages/common'); + var HeaderPage = require('../../../support/pages/header_page'); var SettingsPage = require('../../../support/pages/settings_page'); - var DiscoverPage = require('../../../support/pages/DiscoverPage'); - var VisualizePage = require('../../../support/pages/VisualizePage'); + var DiscoverPage = require('../../../support/pages/discover_page'); + var VisualizePage = require('../../../support/pages/visualize_page'); var expect = require('intern/dojo/node!expect.js'); return function (bdd, scenarioManager) { diff --git a/test/functional/apps/visualize/_line_chart.js b/test/functional/apps/visualize/_line_chart.js index a6c817d20e8c..539758e69bb6 100644 --- a/test/functional/apps/visualize/_line_chart.js +++ b/test/functional/apps/visualize/_line_chart.js @@ -1,9 +1,9 @@ define(function (require) { - var Common = require('../../../support/pages/Common'); - var HeaderPage = require('../../../support/pages/HeaderPage'); + var Common = require('../../../support/pages/common'); + var HeaderPage = require('../../../support/pages/header_page'); var SettingsPage = require('../../../support/pages/settings_page'); - var DiscoverPage = require('../../../support/pages/DiscoverPage'); - var VisualizePage = require('../../../support/pages/VisualizePage'); + var DiscoverPage = require('../../../support/pages/discover_page'); + var VisualizePage = require('../../../support/pages/visualize_page'); var expect = require('intern/dojo/node!expect.js'); return function (bdd, scenarioManager) { diff --git a/test/functional/apps/visualize/_metric_chart.js b/test/functional/apps/visualize/_metric_chart.js index fa04e6c9c015..728784784507 100644 --- a/test/functional/apps/visualize/_metric_chart.js +++ b/test/functional/apps/visualize/_metric_chart.js @@ -1,9 +1,9 @@ define(function (require) { - var Common = require('../../../support/pages/Common'); - var HeaderPage = require('../../../support/pages/HeaderPage'); + var Common = require('../../../support/pages/common'); + var HeaderPage = require('../../../support/pages/header_page'); var SettingsPage = require('../../../support/pages/settings_page'); - var DiscoverPage = require('../../../support/pages/DiscoverPage'); - var VisualizePage = require('../../../support/pages/VisualizePage'); + var DiscoverPage = require('../../../support/pages/discover_page'); + var VisualizePage = require('../../../support/pages/visualize_page'); var expect = require('intern/dojo/node!expect.js'); return function (bdd, scenarioManager) { diff --git a/test/functional/apps/visualize/_pie_chart.js b/test/functional/apps/visualize/_pie_chart.js index 6ff909606947..5490fe6af3a1 100644 --- a/test/functional/apps/visualize/_pie_chart.js +++ b/test/functional/apps/visualize/_pie_chart.js @@ -1,9 +1,9 @@ define(function (require) { - var Common = require('../../../support/pages/Common'); - var HeaderPage = require('../../../support/pages/HeaderPage'); + var Common = require('../../../support/pages/common'); + var HeaderPage = require('../../../support/pages/header_page'); var SettingsPage = require('../../../support/pages/settings_page'); - var DiscoverPage = require('../../../support/pages/DiscoverPage'); - var VisualizePage = require('../../../support/pages/VisualizePage'); + var DiscoverPage = require('../../../support/pages/discover_page'); + var VisualizePage = require('../../../support/pages/visualize_page'); var expect = require('intern/dojo/node!expect.js'); return function (bdd, scenarioManager) { diff --git a/test/functional/apps/visualize/_tile_map.js b/test/functional/apps/visualize/_tile_map.js index 75044876c2ac..bea797df399e 100644 --- a/test/functional/apps/visualize/_tile_map.js +++ b/test/functional/apps/visualize/_tile_map.js @@ -1,9 +1,9 @@ define(function (require) { - var Common = require('../../../support/pages/Common'); - var HeaderPage = require('../../../support/pages/HeaderPage'); + var Common = require('../../../support/pages/common'); + var HeaderPage = require('../../../support/pages/header_page'); var SettingsPage = require('../../../support/pages/settings_page'); - var DiscoverPage = require('../../../support/pages/DiscoverPage'); - var VisualizePage = require('../../../support/pages/VisualizePage'); + var DiscoverPage = require('../../../support/pages/discover_page'); + var VisualizePage = require('../../../support/pages/visualize_page'); var expect = require('intern/dojo/node!expect.js'); return function (bdd, scenarioManager) { diff --git a/test/functional/apps/visualize/_vertical_bar_chart.js b/test/functional/apps/visualize/_vertical_bar_chart.js index 88ee497427da..7f9d942deb0a 100644 --- a/test/functional/apps/visualize/_vertical_bar_chart.js +++ b/test/functional/apps/visualize/_vertical_bar_chart.js @@ -1,9 +1,9 @@ define(function (require) { - var Common = require('../../../support/pages/Common'); - var HeaderPage = require('../../../support/pages/HeaderPage'); + var Common = require('../../../support/pages/common'); + var HeaderPage = require('../../../support/pages/header_page'); var SettingsPage = require('../../../support/pages/settings_page'); - var DiscoverPage = require('../../../support/pages/DiscoverPage'); - var VisualizePage = require('../../../support/pages/VisualizePage'); + var DiscoverPage = require('../../../support/pages/discover_page'); + var VisualizePage = require('../../../support/pages/visualize_page'); var expect = require('intern/dojo/node!expect.js'); return function (bdd, scenarioManager) { diff --git a/test/functional/apps/visualize/index.js b/test/functional/apps/visualize/index.js index c2c014dc6877..4492d165c3af 100644 --- a/test/functional/apps/visualize/index.js +++ b/test/functional/apps/visualize/index.js @@ -4,9 +4,9 @@ define(function (require) { var config = require('intern').config; var url = require('intern/dojo/node!url'); var _ = require('intern/dojo/node!lodash'); - var Common = require('../../../support/pages/Common'); - var ScenarioManager = require('intern/dojo/node!../../../fixtures/scenarioManager'); - var HeaderPage = require('../../../support/pages/HeaderPage'); + var Common = require('../../../support/pages/common'); + var ScenarioManager = require('intern/dojo/node!../../../fixtures/scenario_manager'); + var HeaderPage = require('../../../support/pages/header_page'); var SettingsPage = require('../../../support/pages/settings_page'); var chartTypeTest = require('./_chart_types'); diff --git a/test/functional/status_page/index.js b/test/functional/status_page/index.js index 8abad70f7a55..c5bff5ff7c9e 100644 --- a/test/functional/status_page/index.js +++ b/test/functional/status_page/index.js @@ -2,7 +2,7 @@ define(function (require) { var bdd = require('intern!bdd'); var expect = require('intern/dojo/node!expect.js'); var config = require('intern').config; - var Common = require('../../support/pages/Common'); + var Common = require('../../support/pages/common'); bdd.describe('status page', function () { var common; diff --git a/test/support/pages/Common.js b/test/support/pages/common.js similarity index 99% rename from test/support/pages/Common.js rename to test/support/pages/common.js index a48f06f3ecc5..60212a0c9982 100644 --- a/test/support/pages/Common.js +++ b/test/support/pages/common.js @@ -1,4 +1,4 @@ -// in test/support/pages/Common.js +// in test/support/pages/common.js define(function (require) { var config = require('intern').config; var Promise = require('bluebird'); diff --git a/test/support/pages/DiscoverPage.js b/test/support/pages/discover_page.js similarity index 99% rename from test/support/pages/DiscoverPage.js rename to test/support/pages/discover_page.js index 3dcf3f55fbf1..c011abd618fd 100644 --- a/test/support/pages/DiscoverPage.js +++ b/test/support/pages/discover_page.js @@ -1,4 +1,4 @@ -// in test/support/pages/DiscoverPage.js +// in test/support/pages/discover_page.js define(function (require) { var config = require('intern').config; var Common = require('./Common'); diff --git a/test/support/pages/HeaderPage.js b/test/support/pages/header_page.js similarity index 100% rename from test/support/pages/HeaderPage.js rename to test/support/pages/header_page.js diff --git a/test/support/pages/VisualizePage.js b/test/support/pages/visualize_page.js similarity index 100% rename from test/support/pages/VisualizePage.js rename to test/support/pages/visualize_page.js diff --git a/test/unit/api/ingest/index.js b/test/unit/api/ingest/index.js index 72897d9cb98b..dfecb12512c5 100644 --- a/test/unit/api/ingest/index.js +++ b/test/unit/api/ingest/index.js @@ -1,7 +1,7 @@ define(function (require) { var bdd = require('intern!bdd'); var serverConfig = require('intern/dojo/node!../../../serverConfig'); - var ScenarioManager = require('intern/dojo/node!../../../fixtures/scenarioManager'); + var ScenarioManager = require('intern/dojo/node!../../../fixtures/scenario_manager'); var request = require('intern/dojo/node!supertest-as-promised'); var url = require('intern/dojo/node!url'); var _ = require('intern/dojo/node!lodash'); From eb77030f798288a0809d5e497c5854464549bd2c Mon Sep 17 00:00:00 2001 From: LeeDr Date: Thu, 28 Jan 2016 17:11:47 -0600 Subject: [PATCH 12/20] snake_case merged master. --- test/functional/apps/discover/_collapse_expand.js | 4 ++-- test/support/pages/header_page.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/functional/apps/discover/_collapse_expand.js b/test/functional/apps/discover/_collapse_expand.js index 25f4260b3e35..79e3bcb22fcf 100644 --- a/test/functional/apps/discover/_collapse_expand.js +++ b/test/functional/apps/discover/_collapse_expand.js @@ -1,8 +1,8 @@ define(function (require) { var Common = require('../../../support/pages/Common'); - var HeaderPage = require('../../../support/pages/HeaderPage'); + var HeaderPage = require('../../../support/pages/header_page'); var SettingsPage = require('../../../support/pages/settings_page'); - var DiscoverPage = require('../../../support/pages/DiscoverPage'); + var DiscoverPage = require('../../../support/pages/discover_page'); var expect = require('intern/dojo/node!expect.js'); return function (bdd, scenarioManager) { diff --git a/test/support/pages/header_page.js b/test/support/pages/header_page.js index 5a78ebb7736e..617c79c4136f 100644 --- a/test/support/pages/header_page.js +++ b/test/support/pages/header_page.js @@ -1,4 +1,4 @@ -// in test/support/pages/HeaderPage.js +// in test/support/pages/header_page.js define(function (require) { var config = require('intern').config; var Common = require('./Common'); From 7327c250aae099ddcee619dd98051c34461719fb Mon Sep 17 00:00:00 2001 From: LeeDr Date: Thu, 28 Jan 2016 17:25:33 -0600 Subject: [PATCH 13/20] Change Common to common in _collapse_expand.js. --- test/functional/apps/discover/_collapse_expand.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/apps/discover/_collapse_expand.js b/test/functional/apps/discover/_collapse_expand.js index 79e3bcb22fcf..5e271d29724b 100644 --- a/test/functional/apps/discover/_collapse_expand.js +++ b/test/functional/apps/discover/_collapse_expand.js @@ -1,5 +1,5 @@ define(function (require) { - var Common = require('../../../support/pages/Common'); + var Common = require('../../../support/pages/common'); var HeaderPage = require('../../../support/pages/header_page'); var SettingsPage = require('../../../support/pages/settings_page'); var DiscoverPage = require('../../../support/pages/discover_page'); From c43e43153bb7d003243a5d90dd11e8d3ba229b3b Mon Sep 17 00:00:00 2001 From: LeeDr Date: Thu, 28 Jan 2016 17:34:52 -0600 Subject: [PATCH 14/20] Fix ./Common to ./common --- test/support/pages/discover_page.js | 2 +- test/support/pages/header_page.js | 2 +- test/support/pages/settings_page.js | 2 +- test/support/pages/visualize_page.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/support/pages/discover_page.js b/test/support/pages/discover_page.js index a792c1c3b050..2a180cdb4bc9 100644 --- a/test/support/pages/discover_page.js +++ b/test/support/pages/discover_page.js @@ -1,7 +1,7 @@ // in test/support/pages/discover_page.js define(function (require) { var config = require('intern').config; - var Common = require('./Common'); + var Common = require('./common'); var defaultTimeout = config.timeouts.default; var common; diff --git a/test/support/pages/header_page.js b/test/support/pages/header_page.js index 617c79c4136f..9f92f652644d 100644 --- a/test/support/pages/header_page.js +++ b/test/support/pages/header_page.js @@ -1,7 +1,7 @@ // in test/support/pages/header_page.js define(function (require) { var config = require('intern').config; - var Common = require('./Common'); + var Common = require('./common'); var common; diff --git a/test/support/pages/settings_page.js b/test/support/pages/settings_page.js index 8e1fa69aa499..871d7081a9d3 100644 --- a/test/support/pages/settings_page.js +++ b/test/support/pages/settings_page.js @@ -2,7 +2,7 @@ define(function (require) { var config = require('intern').config; var Promise = require('bluebird'); - var Common = require('./Common'); + var Common = require('./common'); var defaultTimeout = config.timeouts.default; var common; diff --git a/test/support/pages/visualize_page.js b/test/support/pages/visualize_page.js index e72248a9d449..2ac4fbb2484d 100644 --- a/test/support/pages/visualize_page.js +++ b/test/support/pages/visualize_page.js @@ -2,7 +2,7 @@ define(function (require) { var config = require('intern').config; var registerSuite = require('intern!object'); - var Common = require('./Common'); + var Common = require('./common'); var defaultTimeout = config.timeouts.default; var common; From 8e05e3cd8abd0cfeb386d2c4410656b6db5198c1 Mon Sep 17 00:00:00 2001 From: LeeDr Date: Fri, 29 Jan 2016 15:49:04 -0600 Subject: [PATCH 15/20] Tell users how to tell if they're running init or systemd. --- docs/kibana-repositories.asciidoc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/kibana-repositories.asciidoc b/docs/kibana-repositories.asciidoc index ff67335323bf..62768e04eace 100644 --- a/docs/kibana-repositories.asciidoc +++ b/docs/kibana-repositories.asciidoc @@ -1,12 +1,12 @@ [[setup-repositories]] === Kibana Repositories -Binary packages for Kibana are available for Unix distributions that support the `apt` and `yum` tools.We also have -repositories available for APT and YUM based distributions. +Binary packages for Kibana are available for Unix distributions that support the `apt` and `yum` tools.We also have +repositories available for APT and YUM based distributions. NOTE: Since the packages are created as part of the Kibana build, source packages are not available. -Packages are signed with the PGP key http://pgp.mit.edu/pks/lookup?op=vindex&search=0xD27D666CD88E42B4[D88E42B4], which +Packages are signed with the PGP key http://pgp.mit.edu/pks/lookup?op=vindex&search=0xD27D666CD88E42B4[D88E42B4], which has the following fingerprint: 4609 5ACC 8548 582C 1A26 99A9 D27D 666C D88E 42B4 @@ -31,7 +31,7 @@ echo "deb http://packages.elastic.co/kibana/{branch}/debian stable main" | sudo + [WARNING] ================================================== -Use the `echo` method described above to add the Kibana repository. Do not use `add-apt-repository`, as that command +Use the `echo` method described above to add the Kibana repository. Do not use `add-apt-repository`, as that command adds a `deb-src` entry with no corresponding source package. When the `deb-src` entry, is present, the commands in this procedure generate an error similar to the following: @@ -47,7 +47,7 @@ Delete the `deb-src` entry from the `/etc/apt/sources.list` file to clear the er sudo apt-get update && sudo apt-get install kibana -------------------------------------------------- + -. Configure Kibana to automatically start during bootup. If your distribution is using the System V version of `init`, +. Configure Kibana to automatically start during bootup. If your distribution is using the System V version of `init`, run the following command: + [source,sh] @@ -67,7 +67,7 @@ sudo /bin/systemctl enable kibana.service [[kibana-yum]] ===== Installing Kibana with yum -WARNING: The repositories set up in this procedure are not compatible with distributions using version 3 of `rpm`, such +WARNING: The repositories set up in this procedure are not compatible with distributions using version 3 of `rpm`, such as CentOS version 5. . Download and install the public signing key: @@ -96,8 +96,8 @@ enabled=1 yum install kibana -------------------------------------------------- + -Configure Kibana to automatically start during bootup. If your distribution is using the System V version of `init`, -run the following command: +Configure Kibana to automatically start during bootup. If your distribution is using the System V version of `init` +(check with `ps -p 1`), run the following command: + [source,sh] -------------------------------------------------- From 723847468b60b81f59ba5646011dc1f89dba6964 Mon Sep 17 00:00:00 2001 From: spalger Date: Fri, 29 Jan 2016 16:24:37 -0700 Subject: [PATCH 16/20] [plugins] re-enable publicDir option, but require that it is "public" --- src/server/plugins/Plugin.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/server/plugins/Plugin.js b/src/server/plugins/Plugin.js index 226f17239a70..a75cbc4dce8a 100644 --- a/src/server/plugins/Plugin.js +++ b/src/server/plugins/Plugin.js @@ -1,7 +1,7 @@ let _ = require('lodash'); let Joi = require('joi'); let { attempt, fromNode } = require('bluebird'); -let { resolve } = require('path'); +let { basename, resolve } = require('path'); let { inherits } = require('util'); const defaultConfigSchema = Joi.object({ @@ -18,11 +18,23 @@ module.exports = class Plugin { this.uiExportsSpecs = opts.uiExports || {}; this.requiredIds = opts.require || []; this.version = opts.version || pkg.version; - this.publicDir = opts.publicDir !== false ? resolve(path, 'public') : null; this.externalCondition = opts.initCondition || _.constant(true); this.externalInit = opts.init || _.noop; this.getConfigSchema = opts.config || _.noop; this.init = _.once(this.init); + + if (opts.publicDir === false) { + this.publicDir = null; + } + else if (!opts.publicDir) { + this.publicDir = resolve(this.path, 'public'); + } + else { + this.publicDir = opts.publicDir; + if (basename(this.publicDir) !== 'public') { + throw new Error(`publicDir for plugin ${this.id} must end with a "public" directory.`); + } + } } static scoped(kbnServer, path, pkg) { From 6f6e3edbdee5975ca3953eb761acb309908d69b3 Mon Sep 17 00:00:00 2001 From: spalger Date: Fri, 29 Jan 2016 16:39:09 -0700 Subject: [PATCH 17/20] [plugins] use pluginDir when finding tests --- src/plugins/testsBundle/index.js | 15 ++++++++++----- src/ui/index.js | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/plugins/testsBundle/index.js b/src/plugins/testsBundle/index.js index f0f3923804a5..13faf12ada73 100644 --- a/src/plugins/testsBundle/index.js +++ b/src/plugins/testsBundle/index.js @@ -14,7 +14,7 @@ module.exports = (kibana) => { }, uiExports: { - bundle: async (UiBundle, env, apps) => { + bundle: async (UiBundle, env, apps, plugins) => { let modules = []; let config = kibana.config; @@ -23,10 +23,15 @@ module.exports = (kibana) => { modules = union(modules, app.getModules()); } - let testFiles = await findSourceFiles([ - 'src/**/public/**/__tests__/**/*.js', - 'installedPlugins/*/public/**/__tests__/**/*.js' - ]); + const testGlobs = [ + 'src/ui/public/__tests__/**/*.js', + ]; + + for (const plugin of plugins) { + testGlobs.push(`${plugin.publicDir}/**/__tests__/**/*.js`); + } + + const testFiles = await findSourceFiles(testGlobs); for (let f of testFiles) modules.push(f); diff --git a/src/ui/index.js b/src/ui/index.js index 4bdf12b7870f..cf0945bc9ae4 100644 --- a/src/ui/index.js +++ b/src/ui/index.js @@ -35,7 +35,7 @@ module.exports = async (kbnServer, server, config) => { } for (let gen of uiExports.getBundleProviders()) { - let bundle = await gen(UiBundle, bundlerEnv, uiExports.getAllApps()); + let bundle = await gen(UiBundle, bundlerEnv, uiExports.getAllApps(), kbnServer.plugins); if (bundle) bundles.add(bundle); } From 74437ea0b05172a08b24847ce7af854655d8e523 Mon Sep 17 00:00:00 2001 From: spalger Date: Fri, 29 Jan 2016 16:48:02 -0700 Subject: [PATCH 18/20] [plugins/test] find all __tests__ dirs in ui/public --- src/plugins/testsBundle/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/testsBundle/index.js b/src/plugins/testsBundle/index.js index 13faf12ada73..903224d3657c 100644 --- a/src/plugins/testsBundle/index.js +++ b/src/plugins/testsBundle/index.js @@ -24,7 +24,7 @@ module.exports = (kibana) => { } const testGlobs = [ - 'src/ui/public/__tests__/**/*.js', + 'src/ui/public/**/__tests__/**/*.js', ]; for (const plugin of plugins) { From a39a07c9eaf10fa1771640e9f66500cf7b87b5da Mon Sep 17 00:00:00 2001 From: spalger Date: Mon, 1 Feb 2016 13:06:12 -0700 Subject: [PATCH 19/20] [npm] upgrade babel-eslint to fix https://github.com/babel/babel-eslint/issues/243 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 067eaea06baa..d23d531895e4 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,7 @@ "Nonsense": "0.1.2", "angular-mocks": "1.4.7", "auto-release-sinon": "1.0.3", - "babel-eslint": "4.1.3", + "babel-eslint": "4.1.7", "chokidar": "1.0.5", "eslint": "1.5.1", "eslint-plugin-mocha": "1.0.0", From 758c59710d3e259a63ae8bb13732a1934121000e Mon Sep 17 00:00:00 2001 From: spalger Date: Mon, 1 Feb 2016 13:16:59 -0700 Subject: [PATCH 20/20] [eslint] avoid https://github.com/babel/babel-eslint/issues/245 --- tasks/build/downloadNodeBuilds.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tasks/build/downloadNodeBuilds.js b/tasks/build/downloadNodeBuilds.js index dbb583fd1970..f3938549aa4e 100644 --- a/tasks/build/downloadNodeBuilds.js +++ b/tasks/build/downloadNodeBuilds.js @@ -37,7 +37,7 @@ module.exports = function (grunt) { // use an async iife to store promise for download // then store platform in active downloads list // which we will read from in the finish task - platform.downloadPromise = (async () => { + platform.downloadPromise = (async function () { grunt.file.mkdir(downloadDir); if (platform.name === 'windows') { @@ -82,4 +82,3 @@ module.exports = function (grunt) { .nodeify(this.async()); }); }; -