From d79b0ad9905c9ccc3273bfc8be24f69352d60e45 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Sat, 20 Feb 2016 08:36:58 -0800 Subject: [PATCH 01/18] If value is undefined, set it to empty string so "undefined" is not shown in UI --- src/ui/public/index_patterns/_field_format/contentTypes.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ui/public/index_patterns/_field_format/contentTypes.js b/src/ui/public/index_patterns/_field_format/contentTypes.js index 8defa4b03d1334..e206070447cf79 100644 --- a/src/ui/public/index_patterns/_field_format/contentTypes.js +++ b/src/ui/public/index_patterns/_field_format/contentTypes.js @@ -7,6 +7,7 @@ export default function contentTypesProvider(highlightFilter) { html: function (format, convert) { return function recurse(value, field, hit) { if (!value || typeof value.map !== 'function') { + value = (typeof value === 'undefined') ? '' : value; return convert.call(format, value, field, hit); } From d42a46ed539f94675aebe5130598154dbda0fb8a Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Sat, 27 Feb 2016 19:36:31 -0500 Subject: [PATCH 02/18] Do not use field formatter at all if value is undefined --- src/ui/public/index_patterns/_field_format/contentTypes.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/public/index_patterns/_field_format/contentTypes.js b/src/ui/public/index_patterns/_field_format/contentTypes.js index e206070447cf79..8b51355d3bb834 100644 --- a/src/ui/public/index_patterns/_field_format/contentTypes.js +++ b/src/ui/public/index_patterns/_field_format/contentTypes.js @@ -6,8 +6,11 @@ export default function contentTypesProvider(highlightFilter) { var types = { html: function (format, convert) { return function recurse(value, field, hit) { + if (typeof value === 'undefined') { + return value; + } + if (!value || typeof value.map !== 'function') { - value = (typeof value === 'undefined') ? '' : value; return convert.call(format, value, field, hit); } From 3c70890ce577431f7b99edc569b2f3c00c1049ea Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Wed, 9 Mar 2016 18:25:58 -0800 Subject: [PATCH 03/18] Looser check for undefined/null string + using default text renderer --- src/ui/public/index_patterns/_field_format/contentTypes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/public/index_patterns/_field_format/contentTypes.js b/src/ui/public/index_patterns/_field_format/contentTypes.js index 8b51355d3bb834..a49f1d3ad6742d 100644 --- a/src/ui/public/index_patterns/_field_format/contentTypes.js +++ b/src/ui/public/index_patterns/_field_format/contentTypes.js @@ -6,8 +6,8 @@ export default function contentTypesProvider(highlightFilter) { var types = { html: function (format, convert) { return function recurse(value, field, hit) { - if (typeof value === 'undefined') { - return value; + if (value == null) { + return _.asPrettyString(value); } if (!value || typeof value.map !== 'function') { From 802863a273e2b17075ab28029f75023fd5348abf Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Wed, 9 Mar 2016 18:26:46 -0800 Subject: [PATCH 04/18] Use (empty) instead of - for undefined/null string values --- src/ui/public/utils/lodash-mixins/string.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/public/utils/lodash-mixins/string.js b/src/ui/public/utils/lodash-mixins/string.js index 4c9208c2322ba8..c512389065ac81 100644 --- a/src/ui/public/utils/lodash-mixins/string.js +++ b/src/ui/public/utils/lodash-mixins/string.js @@ -10,7 +10,7 @@ export default function (_) { * @return {string} */ asPrettyString: function (val) { - if (val === null || val === undefined) return ' - '; + if (val === null || val === undefined) return '(empty)'; switch (typeof val) { case 'string': return val; case 'object': return JSON.stringify(val, null, ' '); From e92a07724da35b5c28c03ea6eb6f1fd07c26fc7a Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Thu, 10 Mar 2016 15:41:14 -0800 Subject: [PATCH 05/18] Fixing expected strings in text to match changes in actual output --- test/functional/apps/discover/_field_data.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/apps/discover/_field_data.js b/test/functional/apps/discover/_field_data.js index c36ae8e0fcae60..47fdbe36f29b40 100644 --- a/test/functional/apps/discover/_field_data.js +++ b/test/functional/apps/discover/_field_data.js @@ -142,7 +142,7 @@ define(function (require) { + ' Here’s...", "twitter:card": "summary", "twitter:image": "' + 'http://IMAGES1.laweekly.com/imager/the-rapture-at-the-mayan-7-25/u/original/2463272/rapturetn05.jpg",' + ' "twitter:site": "@laweekly" } machine.os:win 7 machine.ram:7,516,192,768 _id:AU_x3_g4GFA8no6QjkYX' - + ' _type:apache _index:logstash-2015.09.22 _score: relatedContent.article:modified_time:November 27th' + + ' _type:apache _index:logstash-2015.09.22 _score:(empty) relatedContent.article:modified_time:November 27th' + ' 2014, 16:00:51.000, November 27th 2014, 16:28:42.000 relatedContent.article:published_time:July 26th' + ' 2007, 19:42:30.000, December 13th 2007, 20:19:35.000'; return discoverPage.getDocTableIndex(1) @@ -220,7 +220,7 @@ define(function (require) { + ' "Arts", "og:site_name": "LA Weekly", "twitter:title": "Shopping Daze", "twitter:description": "LA' + ' Weekly is the definitive source of information for news, music, movies, restaurants, reviews, and' + ' events in Los Angeles.", "twitter:card": "summary", "twitter:site": "@laweekly" } machine.os:osx' - + ' machine.ram:15,032,385,536 _id:AU_x3_g3GFA8no6QjkFm _type:apache _index:logstash-2015.09.20 _score:' + + ' machine.ram:15,032,385,536 _id:AU_x3_g3GFA8no6QjkFm _type:apache _index:logstash-2015.09.20 _score:(empty)' + ' relatedContent.article:modified_time:October 28th 2014, 22:00:08.000, November 26th 2014,' + ' 01:05:47.000, November 26th 2014, 03:52:35.000, November 26th 2014, 04:15:21.000, November 27th 2014,' + ' 16:01:03.000 relatedContent.article:published_time:October 21st 2005, 01:10:25.000, March 5th 2006,' From 8119d71a63fac5fa8b8094d92f4c2d065911d6c6 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Thu, 10 Mar 2016 15:45:51 -0800 Subject: [PATCH 06/18] Revert "Use (empty) instead of - for undefined/null string values" This reverts commit 802863a273e2b17075ab28029f75023fd5348abf. I don't think this change is necessarily in the scope of this issue. It can be tackled in a separate PR. --- src/ui/public/utils/lodash-mixins/string.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/public/utils/lodash-mixins/string.js b/src/ui/public/utils/lodash-mixins/string.js index c512389065ac81..4c9208c2322ba8 100644 --- a/src/ui/public/utils/lodash-mixins/string.js +++ b/src/ui/public/utils/lodash-mixins/string.js @@ -10,7 +10,7 @@ export default function (_) { * @return {string} */ asPrettyString: function (val) { - if (val === null || val === undefined) return '(empty)'; + if (val === null || val === undefined) return ' - '; switch (typeof val) { case 'string': return val; case 'object': return JSON.stringify(val, null, ' '); From 7f10aeeba0643ef27969d1c5b56307ec2cd1d53c Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Thu, 10 Mar 2016 16:40:46 -0800 Subject: [PATCH 07/18] Updating more tests to match new reality --- src/ui/public/index_patterns/__tests__/_FieldFormat.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/public/index_patterns/__tests__/_FieldFormat.js b/src/ui/public/index_patterns/__tests__/_FieldFormat.js index 26d5c9669f50c6..4cfe6a3f727b50 100644 --- a/src/ui/public/index_patterns/__tests__/_FieldFormat.js +++ b/src/ui/public/index_patterns/__tests__/_FieldFormat.js @@ -85,8 +85,8 @@ describe('FieldFormat class', function () { var text = f.getConverterFor('text'); var html = f.getConverterFor('html'); expect(text).to.not.be(html); - expect(text()).to.be('formatted'); - expect(html()).to.be('formatted'); + expect(text('formatted')).to.be('formatted'); + expect(html('formatted')).to.be('formatted'); }); it('can be an object, with seperate text and html converter', function () { @@ -99,8 +99,8 @@ describe('FieldFormat class', function () { var text = f.getConverterFor('text'); var html = f.getConverterFor('html'); expect(text).to.not.be(html); - expect(text()).to.be('formatted text'); - expect(html()).to.be('formatted html'); + expect(text('formatted text')).to.be('formatted text'); + expect(html('formatted html')).to.be('formatted html'); }); it('does not escape the output of the text converter', function () { From 6523bc21c148dd564039ed00938ac9172a562d25 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Thu, 10 Mar 2016 16:41:32 -0800 Subject: [PATCH 08/18] Adding test for null/undefined value to be converted to '(empty)' --- src/ui/public/index_patterns/__tests__/_FieldFormat.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ui/public/index_patterns/__tests__/_FieldFormat.js b/src/ui/public/index_patterns/__tests__/_FieldFormat.js index 4cfe6a3f727b50..a64f0532bcd5fb 100644 --- a/src/ui/public/index_patterns/__tests__/_FieldFormat.js +++ b/src/ui/public/index_patterns/__tests__/_FieldFormat.js @@ -147,6 +147,11 @@ describe('FieldFormat class', function () { var f = new TestFormat(); expect(f.convert('val', 'html')).to.be('html'); }); + + it('formats a value as "(empty)"" when no value is specified', function () { + var f = new TestFormat(); + expect(f.convert()).to.be('(empty)'); + }); }); }); From acf9670ed79ca3abb49bd2e948adc4798f11d3c1 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Thu, 10 Mar 2016 16:51:14 -0800 Subject: [PATCH 09/18] s/(empty)/ - / in tests after reverting commit introducing (empty) --- src/ui/public/index_patterns/__tests__/_FieldFormat.js | 4 ++-- test/functional/apps/discover/_field_data.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/public/index_patterns/__tests__/_FieldFormat.js b/src/ui/public/index_patterns/__tests__/_FieldFormat.js index a64f0532bcd5fb..e10e1956891ff8 100644 --- a/src/ui/public/index_patterns/__tests__/_FieldFormat.js +++ b/src/ui/public/index_patterns/__tests__/_FieldFormat.js @@ -148,9 +148,9 @@ describe('FieldFormat class', function () { expect(f.convert('val', 'html')).to.be('html'); }); - it('formats a value as "(empty)"" when no value is specified', function () { + it('formats a value as " - " when no value is specified', function () { var f = new TestFormat(); - expect(f.convert()).to.be('(empty)'); + expect(f.convert()).to.be(' - '); }); }); diff --git a/test/functional/apps/discover/_field_data.js b/test/functional/apps/discover/_field_data.js index 47fdbe36f29b40..a784dd6be6c192 100644 --- a/test/functional/apps/discover/_field_data.js +++ b/test/functional/apps/discover/_field_data.js @@ -142,7 +142,7 @@ define(function (require) { + ' Here’s...", "twitter:card": "summary", "twitter:image": "' + 'http://IMAGES1.laweekly.com/imager/the-rapture-at-the-mayan-7-25/u/original/2463272/rapturetn05.jpg",' + ' "twitter:site": "@laweekly" } machine.os:win 7 machine.ram:7,516,192,768 _id:AU_x3_g4GFA8no6QjkYX' - + ' _type:apache _index:logstash-2015.09.22 _score:(empty) relatedContent.article:modified_time:November 27th' + + ' _type:apache _index:logstash-2015.09.22 _score: - relatedContent.article:modified_time:November 27th' + ' 2014, 16:00:51.000, November 27th 2014, 16:28:42.000 relatedContent.article:published_time:July 26th' + ' 2007, 19:42:30.000, December 13th 2007, 20:19:35.000'; return discoverPage.getDocTableIndex(1) @@ -220,7 +220,7 @@ define(function (require) { + ' "Arts", "og:site_name": "LA Weekly", "twitter:title": "Shopping Daze", "twitter:description": "LA' + ' Weekly is the definitive source of information for news, music, movies, restaurants, reviews, and' + ' events in Los Angeles.", "twitter:card": "summary", "twitter:site": "@laweekly" } machine.os:osx' - + ' machine.ram:15,032,385,536 _id:AU_x3_g3GFA8no6QjkFm _type:apache _index:logstash-2015.09.20 _score:(empty)' + + ' machine.ram:15,032,385,536 _id:AU_x3_g3GFA8no6QjkFm _type:apache _index:logstash-2015.09.20 _score: - ' + ' relatedContent.article:modified_time:October 28th 2014, 22:00:08.000, November 26th 2014,' + ' 01:05:47.000, November 26th 2014, 03:52:35.000, November 26th 2014, 04:15:21.000, November 27th 2014,' + ' 16:01:03.000 relatedContent.article:published_time:October 21st 2005, 01:10:25.000, March 5th 2006,' From bc76ba4f8d94e46369251d68cf42cf02d6a1d8da Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Thu, 10 Mar 2016 17:00:08 -0800 Subject: [PATCH 10/18] Missed a space :/ --- test/functional/apps/discover/_field_data.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/apps/discover/_field_data.js b/test/functional/apps/discover/_field_data.js index a784dd6be6c192..532d8877bbc4a7 100644 --- a/test/functional/apps/discover/_field_data.js +++ b/test/functional/apps/discover/_field_data.js @@ -142,7 +142,7 @@ define(function (require) { + ' Here’s...", "twitter:card": "summary", "twitter:image": "' + 'http://IMAGES1.laweekly.com/imager/the-rapture-at-the-mayan-7-25/u/original/2463272/rapturetn05.jpg",' + ' "twitter:site": "@laweekly" } machine.os:win 7 machine.ram:7,516,192,768 _id:AU_x3_g4GFA8no6QjkYX' - + ' _type:apache _index:logstash-2015.09.22 _score: - relatedContent.article:modified_time:November 27th' + + ' _type:apache _index:logstash-2015.09.22 _score: - relatedContent.article:modified_time:November 27th' + ' 2014, 16:00:51.000, November 27th 2014, 16:28:42.000 relatedContent.article:published_time:July 26th' + ' 2007, 19:42:30.000, December 13th 2007, 20:19:35.000'; return discoverPage.getDocTableIndex(1) @@ -220,7 +220,7 @@ define(function (require) { + ' "Arts", "og:site_name": "LA Weekly", "twitter:title": "Shopping Daze", "twitter:description": "LA' + ' Weekly is the definitive source of information for news, music, movies, restaurants, reviews, and' + ' events in Los Angeles.", "twitter:card": "summary", "twitter:site": "@laweekly" } machine.os:osx' - + ' machine.ram:15,032,385,536 _id:AU_x3_g3GFA8no6QjkFm _type:apache _index:logstash-2015.09.20 _score: - ' + + ' machine.ram:15,032,385,536 _id:AU_x3_g3GFA8no6QjkFm _type:apache _index:logstash-2015.09.20 _score: - ' + ' relatedContent.article:modified_time:October 28th 2014, 22:00:08.000, November 26th 2014,' + ' 01:05:47.000, November 26th 2014, 03:52:35.000, November 26th 2014, 04:15:21.000, November 27th 2014,' + ' 16:01:03.000 relatedContent.article:published_time:October 21st 2005, 01:10:25.000, March 5th 2006,' From 55cffbd706d8e9e0677d1eec3e3007242a72b024 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Thu, 10 Mar 2016 17:09:08 -0800 Subject: [PATCH 11/18] Now too many spaces :| --- test/functional/apps/discover/_field_data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/apps/discover/_field_data.js b/test/functional/apps/discover/_field_data.js index 532d8877bbc4a7..148e32618c3107 100644 --- a/test/functional/apps/discover/_field_data.js +++ b/test/functional/apps/discover/_field_data.js @@ -220,7 +220,7 @@ define(function (require) { + ' "Arts", "og:site_name": "LA Weekly", "twitter:title": "Shopping Daze", "twitter:description": "LA' + ' Weekly is the definitive source of information for news, music, movies, restaurants, reviews, and' + ' events in Los Angeles.", "twitter:card": "summary", "twitter:site": "@laweekly" } machine.os:osx' - + ' machine.ram:15,032,385,536 _id:AU_x3_g3GFA8no6QjkFm _type:apache _index:logstash-2015.09.20 _score: - ' + + ' machine.ram:15,032,385,536 _id:AU_x3_g3GFA8no6QjkFm _type:apache _index:logstash-2015.09.20 _score: - ' + ' relatedContent.article:modified_time:October 28th 2014, 22:00:08.000, November 26th 2014,' + ' 01:05:47.000, November 26th 2014, 03:52:35.000, November 26th 2014, 04:15:21.000, November 27th 2014,' + ' 16:01:03.000 relatedContent.article:published_time:October 21st 2005, 01:10:25.000, March 5th 2006,' From f35c7122d216c925ecbd3f1bdf404422035a7e94 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Fri, 11 Mar 2016 02:13:35 -0800 Subject: [PATCH 12/18] More fun with spaces :| --- test/functional/apps/discover/_field_data.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/apps/discover/_field_data.js b/test/functional/apps/discover/_field_data.js index 148e32618c3107..e3ee8b851967df 100644 --- a/test/functional/apps/discover/_field_data.js +++ b/test/functional/apps/discover/_field_data.js @@ -142,7 +142,7 @@ define(function (require) { + ' Here’s...", "twitter:card": "summary", "twitter:image": "' + 'http://IMAGES1.laweekly.com/imager/the-rapture-at-the-mayan-7-25/u/original/2463272/rapturetn05.jpg",' + ' "twitter:site": "@laweekly" } machine.os:win 7 machine.ram:7,516,192,768 _id:AU_x3_g4GFA8no6QjkYX' - + ' _type:apache _index:logstash-2015.09.22 _score: - relatedContent.article:modified_time:November 27th' + + ' _type:apache _index:logstash-2015.09.22 _score: - relatedContent.article:modified_time:November 27th' + ' 2014, 16:00:51.000, November 27th 2014, 16:28:42.000 relatedContent.article:published_time:July 26th' + ' 2007, 19:42:30.000, December 13th 2007, 20:19:35.000'; return discoverPage.getDocTableIndex(1) @@ -220,7 +220,7 @@ define(function (require) { + ' "Arts", "og:site_name": "LA Weekly", "twitter:title": "Shopping Daze", "twitter:description": "LA' + ' Weekly is the definitive source of information for news, music, movies, restaurants, reviews, and' + ' events in Los Angeles.", "twitter:card": "summary", "twitter:site": "@laweekly" } machine.os:osx' - + ' machine.ram:15,032,385,536 _id:AU_x3_g3GFA8no6QjkFm _type:apache _index:logstash-2015.09.20 _score: - ' + + ' machine.ram:15,032,385,536 _id:AU_x3_g3GFA8no6QjkFm _type:apache _index:logstash-2015.09.20 _score: -' + ' relatedContent.article:modified_time:October 28th 2014, 22:00:08.000, November 26th 2014,' + ' 01:05:47.000, November 26th 2014, 03:52:35.000, November 26th 2014, 04:15:21.000, November 27th 2014,' + ' 16:01:03.000 relatedContent.article:published_time:October 21st 2005, 01:10:25.000, March 5th 2006,' From f383827890fe53deba58a0e7d9c1c401f3b17792 Mon Sep 17 00:00:00 2001 From: spalger Date: Mon, 21 Mar 2016 14:36:57 -0700 Subject: [PATCH 13/18] [selenium] propertly share download info --- tasks/config/downloadSelenium.js | 10 +++++++--- tasks/config/run.js | 4 ++-- tasks/download_selenium.js | 19 ++++++++++--------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/tasks/config/downloadSelenium.js b/tasks/config/downloadSelenium.js index d69fa8d406276c..132f44fafb3943 100644 --- a/tasks/config/downloadSelenium.js +++ b/tasks/config/downloadSelenium.js @@ -1,14 +1,18 @@ var path = require('path'); +import { resolve as resolveUrl } from 'url'; +const URL = 'https://selenium-release.storage.googleapis.com/2.48/selenium-server-standalone-2.48.2.jar'; +const DIR = resolveUrl(URL, './'); +const FILE = URL.replace(DIR, ''); module.exports = function (grunt) { return { options: { selenium: { - filename: 'selenium-server-standalone-2.48.2.jar', - server: 'https://selenium-release.storage.googleapis.com/2.48/', + filename: FILE, + server: DIR, md5: 'b2784fc67c149d3c13c83d2108104689', - directory: path.join(grunt.config.get('root'), 'selenium') + path: path.join(grunt.config.get('root'), 'selenium', FILE) } } }; diff --git a/tasks/config/run.js b/tasks/config/run.js index 36f166b5477b5e..e98bfe894e7257 100644 --- a/tasks/config/run.js +++ b/tasks/config/run.js @@ -122,7 +122,7 @@ module.exports = function (grunt) { cmd: 'java', args: [ '-jar', - 'selenium/selenium-server-standalone-2.48.2.jar', + '<%= downloadSelenium.options.selenium.path %>', '-port', uiConfig.servers.webdriver.port, ] @@ -138,7 +138,7 @@ module.exports = function (grunt) { cmd: 'java', args: [ '-jar', - 'selenium/selenium-server-standalone-2.48.2.jar', + '<%= downloadSelenium.options.selenium.path %>', '-port', uiConfig.servers.webdriver.port, ] diff --git a/tasks/download_selenium.js b/tasks/download_selenium.js index 62840493ee2a8e..cdce3e0ade2116 100644 --- a/tasks/download_selenium.js +++ b/tasks/download_selenium.js @@ -11,8 +11,9 @@ module.exports = function (grunt) { const done = this.async(); const config = this.options(); - const SELENIUM_FILE_PATH = path.join(config.selenium.directory, config.selenium.filename); - const SELENIUM_DOWNLOAD_URL = config.selenium.server + config.selenium.filename; + const FILE = config.selenium.path; + const DIR = path.dirname(config.selenium.path); + const URL = config.selenium.server + config.selenium.filename; function validateDownload(path, expectedHash, success) { grunt.log.write('Validating hash...'); @@ -28,27 +29,27 @@ module.exports = function (grunt) { } function downloadSelenium(success) { - grunt.log.write(`Downloading ${SELENIUM_DOWNLOAD_URL}...`); - request.get(SELENIUM_DOWNLOAD_URL) - .pipe(fs.createWriteStream(SELENIUM_FILE_PATH)) + grunt.log.write(`Downloading ${URL}...`); + request.get(URL) + .pipe(fs.createWriteStream(FILE)) .on('error', function downloadError(err) { grunt.fail.warn(err); }) .on('finish', function downloadFinish() { grunt.log.writeln('done'); - validateDownload(SELENIUM_FILE_PATH, config.selenium.md5, success); + validateDownload(FILE, config.selenium.md5, success); }); } function start() { try { - fs.mkdirSync(config.selenium.directory); + fs.mkdirSync(DIR); } catch (err) { if (err && err.code !== 'EEXIST') grunt.fail.warn(err); } - if (fs.existsSync(SELENIUM_FILE_PATH)) { - validateDownload(SELENIUM_FILE_PATH, config.selenium.md5, done); + if (fs.existsSync(FILE)) { + validateDownload(FILE, config.selenium.md5, done); } else { downloadSelenium(done); } From f53b8c1a273302a59ecd742573085768df1e8278 Mon Sep 17 00:00:00 2001 From: spalger Date: Mon, 21 Mar 2016 14:37:20 -0700 Subject: [PATCH 14/18] [java][jenkins] ensure that JDK8 is in PATH --- tasks/jenkins.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tasks/jenkins.js b/tasks/jenkins.js index b1601ff0fbb3d5..77a2673cffb7e7 100644 --- a/tasks/jenkins.js +++ b/tasks/jenkins.js @@ -1,7 +1,18 @@ +import { compact } from 'lodash'; +import { delimiter } from 'path'; + module.exports = function (grunt) { - let { compact } = require('lodash'); grunt.registerTask('jenkins', 'Jenkins build script', function () { - process.env.JAVA_HOME = '/usr/lib/jvm/jdk8'; + // make sure JAVA_HOME points to JDK8 + const HOME = '/usr/lib/jvm/jdk8'; + process.env.JAVA_HOME = HOME; + + // extend PATH to point to JDK8 + const path = process.env.PATH.split(delimiter); + path.unshift(`${HOME}/bin`); + process.env.PATH = path.join(delimiter); + + // always build os packages on jenkins grunt.option('os-packages', true); grunt.task.run(compact([ From dc88c2e8f8ae3ddea1c2c2ba702e78365700922f Mon Sep 17 00:00:00 2001 From: Paul Echeverri Date: Mon, 7 Mar 2016 16:34:48 -0800 Subject: [PATCH 15/18] Adds doc for savedObjects setting --- docs/advanced-settings.asciidoc | 41 ++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/docs/advanced-settings.asciidoc b/docs/advanced-settings.asciidoc index e649d7dc5d8a88..eb599be309ad0d 100644 --- a/docs/advanced-settings.asciidoc +++ b/docs/advanced-settings.asciidoc @@ -1,6 +1,8 @@ [[kibana-settings-reference]] -WARNING: Modifying the following settings can signficantly affect Kibana's performance and cause problems that are difficult to diagnose. Setting a property's value to a blank field will revert to the default behavior, which may not be compatible with other configuration settings. Deleting a custom setting removes it from Kibana permanently. +WARNING: Modifying the following settings can signficantly affect Kibana's performance and cause problems that are +difficult to diagnose. Setting a property's value to a blank field will revert to the default behavior, which may not be +compatible with other configuration settings. Deleting a custom setting removes it from Kibana permanently. .Kibana Settings Reference [horizontal] @@ -8,30 +10,43 @@ WARNING: Modifying the following settings can signficantly affect Kibana's perfo `sort:options`:: Options for the Elasticsearch https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html[sort] parameter. `dateFormat`:: The format to use for displaying pretty-formatted dates. `dateFormat:tz`:: The timezone that Kibana uses. The default value of `Browser` uses the timezone detected by the browser. -`dateFormat:scaled`:: These values define the format used to render ordered time-based data. Formatted timestamps must adapt to the interval between measurements. Keys are http://en.wikipedia.org/wiki/ISO_8601#Time_intervals[ISO8601 intervals]. +`dateFormat:scaled`:: These values define the format used to render ordered time-based data. Formatted timestamps must +adapt to the interval between measurements. Keys are http://en.wikipedia.org/wiki/ISO_8601#Time_intervals[ISO8601 intervals]. `defaultIndex`:: Default is `null`. This property specifies the default index. -`metaFields`:: An array of fields outside of `_source`. Kibana merges these fields into the document when displaying the document. +`metaFields`:: An array of fields outside of `_source`. Kibana merges these fields into the document when displaying the +document. `discover:sampleSize`:: The number of rows to show in the Discover table. -`doc_table:highlight`:: Highlight results in Discover and Saved Searches Dashboard. Highlighing makes request slow when working on big documents. Set this property to `false` to disable highlighting. -`courier:maxSegmentCount`:: Kibana splits requests in the Discover app into segments to limit the size of requests sent to the Elasticsearch cluster. This setting constrains the length of the segment list. Long segment lists can significantly increase request processing time. +`doc_table:highlight`:: Highlight results in Discover and Saved Searches Dashboard. Highlighing makes request slow when +working on big documents. Set this property to `false` to disable highlighting. +`courier:maxSegmentCount`:: Kibana splits requests in the Discover app into segments to limit the size of requests sent to +the Elasticsearch cluster. This setting constrains the length of the segment list. Long segment lists can significantly +increase request processing time. `fields:popularLimit`:: This setting governs how many of the top most popular fields are shown. `histogram:barTarget`:: When date histograms use the `auto` interval, Kibana attempts to generate this number of bars. -`histogram:maxBars`:: Date histograms are not generated with more bars than the value of this property, scaling values when necessary. -`visualization:tileMap:maxPrecision`:: The maximum geoHash precision displayed on tile maps: 7 is high, 10 is very high, 12 is the maximum. http://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-geohashgrid-aggregation.html#_cell_dimensions_at_the_equator[Explanation of cell dimensions]. +`histogram:maxBars`:: Date histograms are not generated with more bars than the value of this property, scaling values +when necessary. +`visualization:tileMap:maxPrecision`:: The maximum geoHash precision displayed on tile maps: 7 is high, 10 is very high, +12 is the maximum. http://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-geohashgrid-aggregation.html#_cell_dimensions_at_the_equator[Explanation of cell dimensions]. `visualization:tileMap:WMSdefaults`:: Default properties for the WMS map server support in the tile map. `visualization:colorMapping`:: Maps values to specified colors within visualizations. `visualization:loadingDelay`:: Time to wait before dimming visualizations during query. `csv:separator`:: A string that serves as the separator for exported values. `csv:quoteValues`:: Set this property to `true` to quote exported values. -`history:limit`:: In fields that have history, such as query inputs, the value of this property limits how many recent values are shown. -`shortDots:enable`:: Set this property to `true` to shorten long field names in visualizations. For example, instead of `foo.bar.baz`, show `f.b.baz`. -`truncate:maxHeight`:: This property specifies the maximum height that a cell occupies in a table. A value of 0 disables truncation. -`indexPattern:fieldMapping:lookBack`:: The value of this property sets the number of recent matching patterns to query the field mapping for index patterns with names that contain timestamps. -`format:defaultTypeMap`:: A map of the default format name for each field type. Field types that are not explicitly mentioned use "_default_". +`history:limit`:: In fields that have history, such as query inputs, the value of this property limits how many recent +values are shown. +`shortDots:enable`:: Set this property to `true` to shorten long field names in visualizations. For example, instead of +`foo.bar.baz`, show `f.b.baz`. +`truncate:maxHeight`:: This property specifies the maximum height that a cell occupies in a table. A value of 0 disables +truncation. +`indexPattern:fieldMapping:lookBack`:: The value of this property sets the number of recent matching patterns to query the +field mapping for index patterns with names that contain timestamps. +`format:defaultTypeMap`:: A map of the default format name for each field type. Field types that are not explicitly +mentioned use "_default_". `format:number:defaultPattern`:: Default numeral format for the "number" format. `format:bytes:defaultPattern`:: Default numeral format for the "bytes" format. `format:percent:defaultPattern`:: Default numeral format for the "percent" format. `format:currency:defaultPattern`:: Default numeral format for the "currency" format. +`savedObjects:perPage`:: The number of objects shown on each page of the list of saved objects. The default value is 5. `timepicker:timeDefaults`:: The default time filter selection. `timepicker:refreshIntervalDefaults`:: The time filter's default refresh interval. -`dashboard:defaultDarkTheme`:: Set this property to `true` to make new dashboards use the dark theme by default. \ No newline at end of file +`dashboard:defaultDarkTheme`:: Set this property to `true` to make new dashboards use the dark theme by default. From d5a7956b41c5bcd7f753a7db2fdbe7f1730bbcd2 Mon Sep 17 00:00:00 2001 From: Paul Echeverri Date: Mon, 7 Mar 2016 17:37:29 -0800 Subject: [PATCH 16/18] Adds documentation for plugin --list flag --- docs/plugins.asciidoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/plugins.asciidoc b/docs/plugins.asciidoc index b4ff08e6d1d5ae..d505ef84e4dbf8 100644 --- a/docs/plugins.asciidoc +++ b/docs/plugins.asciidoc @@ -65,6 +65,11 @@ bin/kibana plugin --remove marvel You can also remove a plugin manually by deleting the plugin's subdirectory under the `installedPlugins` directory. +[float] +=== Listing Installed Plugins + +Use `--list` or `-l` option to list the currently installed plugins. + [float] === Updating Plugins From 1f2d9663e0f0f5c991c2478ddc5851371c6d2667 Mon Sep 17 00:00:00 2001 From: Paul Echeverri Date: Wed, 16 Mar 2016 17:22:19 -0700 Subject: [PATCH 17/18] Changes to add custom labeling to docs --- docs/datatable.asciidoc | 2 ++ docs/metric.asciidoc | 3 ++- docs/pie.asciidoc | 4 ++++ docs/tilemap.asciidoc | 4 ++++ docs/vertbar.asciidoc | 4 ++++ docs/x-axis-aggs.asciidoc | 6 ++++-- docs/y-axis-aggs.asciidoc | 2 ++ 7 files changed, 22 insertions(+), 3 deletions(-) diff --git a/docs/datatable.asciidoc b/docs/datatable.asciidoc index b80cb8ccd812d9..6246b19f0f1d64 100644 --- a/docs/datatable.asciidoc +++ b/docs/datatable.asciidoc @@ -45,6 +45,8 @@ sub-aggregation from the list of types. You can use the up or down arrows to the right of the aggregation's type to change the aggregation's priority. +Enter a string in the *Custom Label* field to change the display label. + You can click the *Advanced* link to display more customization options for your metrics or bucket aggregation: *Exclude Pattern*:: Specify a pattern in this field to exclude from the results. diff --git a/docs/metric.asciidoc b/docs/metric.asciidoc index 8a813f7dba8662..e4ce743a8210b5 100644 --- a/docs/metric.asciidoc +++ b/docs/metric.asciidoc @@ -4,6 +4,7 @@ A metric visualization displays a single number for each aggregation you select: include::y-axis-aggs.asciidoc[] + You can click the *Advanced* link to display more customization options: *JSON Input*:: A text field where you can add specific JSON-formatted properties to merge with the aggregation @@ -17,7 +18,7 @@ NOTE: In Elasticsearch releases 1.4.3 and later, this functionality requires you The availability of these options varies depending on the aggregation you choose. -Click the *Options* tab to change the font used to display the metrics. +Click the *Options* tab to display the font size slider. [float] [[metric-viewing-detailed-information]] diff --git a/docs/pie.asciidoc b/docs/pie.asciidoc index 6c2b5a32be9798..233b263b1e84d2 100644 --- a/docs/pie.asciidoc +++ b/docs/pie.asciidoc @@ -11,6 +11,8 @@ field. Select a field from the drop-down. *Unique Count*:: The {ref}search-aggregations-metrics-cardinality-aggregation.html[_cardinality_] aggregation returns the number of unique values in a field. Select a field from the drop-down. +Enter a string in the *Custom Label* field to change the display label. + The _buckets_ aggregations determine what information is being retrieved from your data set. Before you choose a buckets aggregation, specify if you are splitting slices within a single chart or splitting into @@ -57,6 +59,8 @@ aggregation's type to change the aggregation's priority. include::color-picker.asciidoc[] +Enter a string in the *Custom Label* field to change the display label. + You can click the *Advanced* link to display more customization options for your metrics or bucket aggregation: *Exclude Pattern*:: Specify a pattern in this field to exclude from the results. diff --git a/docs/tilemap.asciidoc b/docs/tilemap.asciidoc index 804abea1219b63..4d959de0ed2587 100644 --- a/docs/tilemap.asciidoc +++ b/docs/tilemap.asciidoc @@ -19,6 +19,8 @@ numeric field. Select a field from the drop-down. *Unique Count*:: The {ref}search-aggregations-metrics-cardinality-aggregation.html[_cardinality_] aggregation returns the number of unique values in a field. Select a field from the drop-down. +Enter a string in the *Custom Label* field to change the display label. + The _buckets_ aggregations determine what information is being retrieved from your data set. Before you choose a buckets aggregation, specify if you are splitting the chart or displaying the buckets as *Geo @@ -71,6 +73,8 @@ based on the geohash coordinates. NOTE: By default, the *Change precision on map zoom* box is checked. Uncheck the box to disable this behavior. +Enter a string in the *Custom Label* field to change the display label. + You can click the *Advanced* link to display more customization options for your metrics or bucket aggregation: *Exclude Pattern*:: Specify a pattern in this field to exclude from the results. diff --git a/docs/vertbar.asciidoc b/docs/vertbar.asciidoc index 201b87843452d0..b329897a3ad8b9 100644 --- a/docs/vertbar.asciidoc +++ b/docs/vertbar.asciidoc @@ -26,6 +26,8 @@ values field. Click *+Add* to add a values field. You can add an aggregation by clicking the *+ Add Aggregation* button. +Enter a string in the *Custom Label* field to change the display label. + The _buckets_ aggregations determine what information is being retrieved from your data set. Before you choose a buckets aggregation, specify if you are splitting slices within a single chart or splitting into @@ -36,6 +38,8 @@ include::x-axis-aggs.asciidoc[] include::color-picker.asciidoc[] +Enter a string in the *Custom Label* field to change the display label. + You can click the *Advanced* link to display more customization options for your metrics or bucket aggregation: *Exclude Pattern*:: Specify a pattern in this field to exclude from the results. diff --git a/docs/x-axis-aggs.asciidoc b/docs/x-axis-aggs.asciidoc index 802625b0afac71..3b9fd3e9486235 100644 --- a/docs/x-axis-aggs.asciidoc +++ b/docs/x-axis-aggs.asciidoc @@ -28,8 +28,8 @@ remove a range. or bottom _n_ elements of a given field to display, ordered by count or a custom metric. *Filters*:: You can specify a set of {ref}/search-aggregations-bucket-filters-aggregation.html[_filters_] for the data. You can specify a filter as a query string or in JSON format, just as in the Discover search bar. Click *Add Filter* to -add another filter. Click the image:images/labelbutton.png[] *label* button to open the label field, where you can type in a -name to display on the visualization. +add another filter. Click the image:images/labelbutton.png[Label button icon] *label* button to open the label field, where +you can type in a name to display on the visualization. *Significant Terms*:: Displays the results of the experimental {ref}/search-aggregations-bucket-significantterms-aggregation.html[_significant terms_] aggregation. @@ -39,3 +39,5 @@ from the list of types. When multiple aggregations are defined on a chart's axis, you can use the up or down arrows to the right of the aggregation's type to change the aggregation's priority. + +Enter a string in the *Custom Label* field to change the display label. diff --git a/docs/y-axis-aggs.asciidoc b/docs/y-axis-aggs.asciidoc index 18029bb0904f51..1153a1cb478fe2 100644 --- a/docs/y-axis-aggs.asciidoc +++ b/docs/y-axis-aggs.asciidoc @@ -22,3 +22,5 @@ from the drop-down, then specify one or more percentile rank values in the *Valu values field. Click *+Add* to add a values field. You can add an aggregation by clicking the *+ Add Aggregation* button. + +Enter a string in the *Custom Label* field to change the display label. From fb361de791f02193a2826a24af50f0caa441a455 Mon Sep 17 00:00:00 2001 From: spalger Date: Mon, 21 Mar 2016 15:59:29 -0700 Subject: [PATCH 18/18] [aggTypes/percentile] specify that we want array-based responses --- src/ui/public/agg_types/metrics/percentile_ranks.js | 5 +++++ src/ui/public/agg_types/metrics/percentiles.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/ui/public/agg_types/metrics/percentile_ranks.js b/src/ui/public/agg_types/metrics/percentile_ranks.js index f782f2a13f296c..f0e6147a6c7051 100644 --- a/src/ui/public/agg_types/metrics/percentile_ranks.js +++ b/src/ui/public/agg_types/metrics/percentile_ranks.js @@ -37,6 +37,11 @@ export default function AggTypeMetricPercentileRanksProvider(Private) { name: 'values', editor: valuesEditor, default: [] + }, + { + write(agg, output) { + output.params.keyed = false; + } } ], getResponseAggs: function (agg) { diff --git a/src/ui/public/agg_types/metrics/percentiles.js b/src/ui/public/agg_types/metrics/percentiles.js index 95fd76dfbf2953..08edbfc193a8bf 100644 --- a/src/ui/public/agg_types/metrics/percentiles.js +++ b/src/ui/public/agg_types/metrics/percentiles.js @@ -35,6 +35,11 @@ export default function AggTypeMetricPercentilesProvider(Private) { name: 'percents', editor: percentsEditor, default: [1, 5, 25, 50, 75, 95, 99] + }, + { + write(agg, output) { + output.params.keyed = false; + } } ], getResponseAggs: function (agg) {