Commit graph

775 commits

Author SHA1 Message Date
Spencer
cd07cc4a23 [junitReports] Rename reports so they are auto-discovered by CI (#21502)
In order for the runbld project we use in CI to auto-discover the junit reports we generate they need to match `TEST-*.xml`, which will allow us to include more details in the failure emails, and push failure info to the build-stats cluster.

(cherry picked from commit 8d0b7e7f7e)
2018-07-31 12:53:56 -07:00
Tyler Smalley
033a587cfa
Adds additional CC licenses (#16969)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-03-05 16:27:32 -08:00
Spencer
c93160484e
[5.6] [dev/mocha/junit] report real skipped test count and errors from hooks (#15465) (#15478)
* [dev/mocha/junit] report real skipped test count and errors from hooks (#15465)

* [dev/mocha/junit] report real skipped test count and errors from hooks

* typo

* [grunt/simplemocha] update simplemocha patterns to exclude fixtures
2017-12-27 12:48:08 -07:00
Tyler Smalley
35f1dd155f
Adds task to export a CSV of all dependencies (#15068) (#15560)
* Adds task to export a CSV of all dependencies

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Fixes tests and changes argument name to `out`

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Uses csv as argument for output file

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Removes unused columns

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* [license csv] Fetch all licenses by default, add release flag to only generate release dependencies
2017-12-12 12:00:52 -08:00
Spencer
5c5e03a968
[5.6] [CI] Produce junit test reports (#15281) (#15442)
* [CI] Produce junit test reports (#15281)

* [mocha] use custom reporter for legible results in jenkins

* [jest] use custom result processor for legible results in jenkins

* [karma] enable junit output on CI

* [mocha/junitReporter] accept rootDirectory as configuration

* [jest/reporter] use reporters option added in jest 20

* [toolingLog] remove black/white specific colors

* [dev/mocha/junit] no reason for junit to be a "reporter"

* typos

* [dev/mocha/junit] use else if

* [karma/junit] use string#replace for explicitness

* [junit] use test file path as "classname"

* [ftr/mocha] no longer a "console" specific reporter

* [dev/jest] fix relative path to babel options
2017-12-05 19:41:07 -07:00
Jonathan Budzenski
836a4213f8
[5.6] [ci] Build docs (#15219) 2017-11-29 09:17:30 -06:00
Spencer
896ee28839
[5.6] [eslint] add eslint dev script (#14889) (#14943) 2017-11-14 10:24:14 -07:00
Tim Roes
bab251fe6a Add (GPL-2.0 OR MIT) license as allowed (#14439)
* Add GPL-2.0 OR MIT license as allowed
* Remove ua-parser-js from overwrites
2017-10-12 13:37:48 +02:00
Brandon Kobel
1078d19210 Adding "BSD 3-Clause" as a valid license (#13934)
We already have "BSD-3-Clause" as a valid license, but there's a variant
with a space instead of a '-' being used by js-base64 that we need to
accomodate for.
2017-09-11 09:20:43 -04:00
Court Ewing
6f17475ebc Run tests against an actual Kibana build (#11237) (#13490)
* build before running selenium

* change directory into built snapshot

* WIP: what is in the build dir

* WIP: skip unit tests

* run selenium on build

* [functional tests on build] Derive version

* [functional tests on build] Missing folder name prefix

* WIP: debug on ubuntu VM

* WIP: double kibana stabilize timeout

* WIP: remove ubuntu VM debug change

* WIP: add logs for docParams

* WIP: add logs for es

* build release version without -SNAPSHOT-

* [functional test release] Cleanup
2017-08-23 08:55:23 -04:00
Nathan Reese
3506356c6d [5.6] ignore forked code for babel transpile build phase (#13485)
* ignore forked from babel

* ignore src/forked
2017-08-11 19:17:41 -04:00
Spencer
4cc37a38d7 [5.6] Implement esTestCluster test util (#13099) (#13408)
* [partial backport] extract kbnServer test utils from #12554

* Implement esTestCluster test util (#13099)

* [es/tests] remove unused module

* [testUtil/es] add utility for starting es nodes in tests

* [ftr/tests] use esTestCluster util to start es

* [es/tests/routes] use esTestCluster to start own es

* [testUtils/kbnServer] disable uiSettings unless plugins are enabled

* [testUtils/esTestCluster] use standard test es port by default

* [server/http/tests] add esTestCluster to setup

* [test/config] unify es test config into a single module

* [testUtils/esTestCluster] directory is no longer configurable

* [testUtils/esTestCluster] throw when es.start() is called again without es.stop()

* [testUtils/esTestCluster] is* checks should not mutate state

(cherry picked from commit 6748b22d03)

* [testUtils/esTestCluster] use more standard api style (#13197)

(cherry picked from commit d36080bca8)

* [scanner] use new esTestConfig service
2017-08-09 00:36:59 -07:00
Thomas Neirynck
17086c83bb [5.x] Backport. save center and zoom in region map. (#13171) 2017-07-28 11:56:05 -04:00
Tyler Smalley
aa1a52a8b5 Bumps ua-parser-js license override (#12972)
└─┬ prop-types@15.5.8
  └─┬ fbjs@0.8.12
    └── ua-parser-js@0.7.14

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2017-07-19 07:50:48 -07:00
CJ Cenizal
0462cea6db Fix jsonify license check (#12615)
- Alphabetize order of licenses and overrides.
- Fix jsonify override so that the license passes.
2017-06-30 11:56:20 -07:00
Jonathan Budzenski
3916956e20
[licenses] Bump ua-parser-js override (#12474) 2017-06-22 12:20:38 -05:00
Matt Bargar
db6e2a666d Include missing branch variable in built package.json (#12288) (#12295) 2017-06-13 10:55:11 -04:00
Spencer
60db93758b [5.x] [IndexPatterns] Support cross cluster search (#11114) (#12155)
* [indexPatterns] support cross cluster patterns

* [vis] remove unused `hasTimeField` param

* [indexPatterns/create] fix method name in view

* [indexPatterns/create] disallow expanding with ccs

* [indexPatterns/create] field fetching is cheaper, react faster

* [indexPatterns/resolveTimePattern/tests] increase readability

* [tests/apiIntegration/indexPatterns] test conflict field output

* [indexPatterns/fieldCaps/readFieldCapsResponse] add unit tests

* [test/apiIntegration] ensure random word will not be valid

* [indexPatterns/ui/client] remove unused import

* remove use of auto-release-sinon

* [indexPatterns/create] don't allow expand when cross cluster

* [indexPatternsApiClient/stub] use angular promises

* [indexPatterns/create] add tests for base create ui behaviors

(cherry picked from commit e5deca679c)
2017-06-02 15:44:40 -07:00
Colm O'Shea
a8f9a18c8e
Add force-local flag to tar archiving on windows (#11914)
This commit adds the ability to archive tars on windows builds.
As windows filepaths have colons in them (i.e. c:/kibana)
tar thinks it is accessing a remote datasource.

Adding the --force-local flag tells tar to archive a local file.
2017-06-02 10:05:34 -05:00
Spencer
41087efb6a [jenkins/ftr] bail on first functional test failure (#12111)
(cherry picked from commit b7f519704a)
2017-05-31 14:19:13 -07:00
Court Ewing
7f81f944db Revert "Switch to Yarn (#11637)"
This reverts commit d304f29b79.

Until we get all the relevant infra configured with yarn as well.
2017-05-27 08:52:20 -04:00
Spencer
d304f29b79 Switch to Yarn (#11637)
(cherry picked from commit 71a9b8b6bc)
2017-05-26 19:47:14 -07:00
Spencer
5d046c7431 [grunt/jest] fail task when jest fails (#12049)
* [grunt/jest] fail task when jest fails

* 😶

(cherry picked from commit f1d862f053)
2017-05-26 17:22:36 -07:00
Spencer
098242d687 Remove use of npm ls in grunt tasks (#11965)
* [grunt/build] refactor _build:notice task to not depend on npm

The _build:notice task used to rely on the output of `npm ls` to determine where modules were defined, but the task now just asks `license-checker` to include the `realPath` of the modules it describes in it's output, which is ultimately the same thing but works with `yarn` too.

* [grunt/licenses] convert to use lib/packages/getInstalledPackages()

* [grunt/notice/generate] test generateNoticeText()

* [grunt/licenses] tested assertLicensesValid()

* [npm] remove npm dev dep

* [tasks/lib/packages] do not include kibana in "installed packages"

* [tasks/lib/notice] join all notices with the same separator

(cherry picked from commit 5c04ff65fb)
2017-05-24 08:41:38 -07:00
Spencer
8e7b7ebce7 [ftr] make room for more projects (#11848)
Squashed commit of the following:

commit 659ea986fdeb9a5ff2ca1fa5360cccb01c671ede
Author: spalger <spalger@users.noreply.github.com>
Date:   Wed May 17 09:19:22 2017 -0700

    [test/*/fixtures] rename es_archives to es_archiver

commit d3667457c78e88e2d6974f3c38dd0fe61b846b91
Author: spalger <spalger@users.noreply.github.com>
Date:   Wed May 17 08:22:03 2017 -0700

    [ftr/config] fix default directory value functions

commit 9a6a2cc0b295e2281e83da04fcea40e9d6f00781
Author: spalger <spalger@users.noreply.github.com>
Date:   Wed May 17 07:30:52 2017 -0700

    fix import paths

commit fcb65a877d54b5b1d36b8c81f1264b36845e826e
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 21:39:57 2017 -0700

    [grunt/ftr] use named exports for configs

commit 7d7f38c7615cdbf8eb0119efc0f2a5188bca8792
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:50:04 2017 -0700

    [test] remove unnecessary directory definitions

commit 0c28984669768482f0a2ee7fc2800d5bcaf49025
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:46:29 2017 -0700

    [ftr/config] make default directories relative to config path

commit cd2f33612624cacffec138797f3fc0f4ecb46cca
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:32:12 2017 -0700

    [test/common] put server config into common

commit 7851ed811a236576c63bd20850b3ef2099be2a4e
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:18:20 2017 -0700

    [grunt] "deprecate" test:api:runner task

commit b2ac4c26593a1947c94f0168191fe8123ff74122
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:15:41 2017 -0700

    [ftr] accept the project name as an unnamed arg

commit 47e292894fc70c0a04883403c50c5d2ae0738d76
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 17:56:34 2017 -0700

    [ftr/grunt] convert ftr task to multi-task with config

commit 83375855f88e5e7b3fa8b6a1c5d24a9f54766ce5
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 17:54:54 2017 -0700

    [test/functional] move fixtures into test/functional project

commit 05994e9c92cf134c58f831c285b3b522a801acbc
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 17:02:51 2017 -0700

    [src/test_utils] merge with test/utils directory

commit c77ee5ed36b8b7eadf876cb6d9482a49dfc92b66
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 16:53:00 2017 -0700

    [test/api_integration] migrate api tests to functional test runner

commit ca328c34648dd7e07f70e1844e07cfc392e41103
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 16:50:12 2017 -0700

    [esArchiver] refresh modified indices after load

commit cde74a540850fd97578f441d6dccaefd1444e656
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 16:46:48 2017 -0700

    [test/functional] move shared services into test/common

commit 0ea2646aea5817f6d1595e6ae0d356c426f138f0
Author: spalger <spalger@users.noreply.github.com>
Date:   Mon May 15 22:51:23 2017 -0700

    [scripts/mocha] run _mocha script when debugging

commit 1cc80600d90e318d4738920aa557d124075a4570
Author: spalger <spalger@users.noreply.github.com>
Date:   Mon May 15 22:48:12 2017 -0700

    [ftr/config] allow child config files to have no testFiles config

commit 2bb6c957443b18cebc419baa6f9db301c8f4dc4f
Author: spalger <spalger@users.noreply.github.com>
Date:   Mon May 15 21:52:26 2017 -0700

    [ftr] move screenshots into test/functional
(cherry picked from commit d3ba428796)
2017-05-17 20:30:28 -07:00
CJ Cenizal
4fb18dac71 Update UI Framework build task to not compile source maps. (#11868) 2017-05-17 11:24:04 -07:00
Spencer
549e62411e Implement/timestamps in log (#11781)
* [utils/streams] add createMapStream()

* [utils/toolingLog] make tooling log operate in object mode

* [ci/ftr] log the time before each log message

(cherry picked from commit 31fed421ff)
2017-05-15 14:28:42 -07:00
Chris Roberson
94a2e13c39 Remove legacy npm script that is no longer used or supported (#11796) 2017-05-15 14:59:03 -04:00
Brandon Kobel
3cecad7b00 Adding WTFPL OR ISC to the list of valid licenses (#11768) 2017-05-12 16:24:43 -04:00
Spencer
fa6429ec44 [ftr] take screenshots on failure (#11709) (#11742)
* [tests/functional] move screenshots to their own service

* [ftr] add testFailure and testHookFailure lifecycle hooks

* [tests/functional/screenshots] cleanup old screenshots at startup

* [test/functional/screenshots] take screenshots when tests fail

* [cli_plugin/install] fix test

* [ui/scanner] fix test

(cherry picked from commit 2e7fed87fd)
2017-05-11 13:27:04 -07:00
Jonathan Budzenski
2e4aabd65b Rebuild modulePath correctly if on Windows (#11439) (#11690)
The module paths are split by ':' and with a Windows filepath (and the 'C:/' prefix),
the split returns the drive letter and directory path separately.
This causes the modulePath to be set incorrectly into the packagePaths object
and the subsequent call for the licenses by key returns undefined on Windows only.

This commit recombines the drive and directory paths and sets the correct key into packagePaths.
2017-05-10 09:04:14 -05:00
Spencer
9eb0af74d8 [babel] tweak babel options for performance and debugging (#11535) (#11661)
* [babel] tweak babel options for performance and debugging

* [babel] remove babel-plugin-transform-export-extensions

* [npm] lock new deps to the patch version

* [npm] remove unused deps

(cherry picked from commit 36ecf130ad)
2017-05-09 14:08:36 -07:00
spalger
d783967142 [tasks/ftr] downgrade log level to debug
(cherry picked from commit f15477a82c)
2017-05-05 15:48:55 -07:00
Spencer
54ce13412c [ftr] still trying to debug random remote start failures (#11611)
(cherry picked from commit e6d3beaee3)
2017-05-04 23:39:25 -07:00
Spencer
0ee55f790a [ftr] remove digdug, use chromedriver directly (#11558)
* [ftr] remove digdug, use chromedriver directly

why?
 - digdug is meant to be used by intern, and expects a certain lifecycle that the FTR has tried and continuously fails to mimic
 - rather than continue trying to force digdug into the stack, just spawn chromedriver ourselves. We know how to handle it
 - cleans up verbose remote logging while we're in there, since selenium-standalone-server went with digdug, which was previously doing the verbose logging
 - deprecate config.servers.webdriver
 - add config.chromedriver.url
 - if url at config.chromedriver.url points to a server that responds to http requests use it as the chromedriver instance, enables running chrome in a VM or container
 - if pings to config.chromedriver.url fail a local chromedriver is started

* address review requests

(cherry picked from commit f76bef46c0)
2017-05-04 15:22:30 -07:00
CJ Cenizal
c800f025cf [UI Framework] Add uiFramework:build task. (#11402) (#11479)
* Add uiFramework:build task.
2017-04-27 11:48:46 -07:00
Jonathan Budzenski
4619594bb4
Revert update pleaserun (#11304)
* Revert "Update pleaserun.js to use `--log-directory` with 0.0.28 (#11286)"

This reverts commit e96a8d8273.

* Revert "[jenkins] update call to pleaserun with --log-path (#11275)"

This reverts commit be609d9505.
2017-04-18 10:22:53 -05:00
archana
f0521d4e20 Update pleaserun to use --log-directory flag with 0.0.28 (#11279)
* Update CONTRIBUTING.md

* Update pleaserun.js

* Update pleaserun.js

Was not using a supported flag, still! Now using `--log-file-stdout`, but we may not get stderr logs.

* Update pleaserun.js
2017-04-17 15:19:46 -05:00
Stacey Gammon
0e46a7d155 Refactor table sort properties (#11073) (#11196)
* Refactor sorting capabilities

* clean up and comments

* Move to ui_framework/services

- add tests
- address code review feedback
- Include new folders in build output.

* Rename to sortableProperties

Require initial sorted property name.

* fix a refactor miss
2017-04-12 21:09:50 -04:00
Spencer
d5c5f1af67 [functional_test_runner] fix grunt failure logging (#11172) (#11185) 2017-04-12 14:04:07 -07:00
Spencer
72f716b5e6 [5.x] [functionalTestRunner] replace intern (#10910) (#11171)
* [esArchiver] combine elasticDump and ScenarioManager (#10359)

* As a part of bringing functional testing to plugins, esArchiver gives these plugins a way to capture and reload es indexes without needing to write a bunch of custom code. It works similarly to the elasticDump and ScenarioManager tools that it replaces.

Differences:
  - Streaming implementation allows for much larger archives
  - CLI for creating and using archives
  - Configurable archive location
  - Stores the data in gzipped files (better for source control, searching, large archives)
  - Automatically identifies and upgrades Kibana config documents

Methods:
  - `#load(name)`: import an archive
  - `#loadIfNeeded(name)`: import an archive, but skip the documents what belong to any existing index
  - `#unload(name)`: delete the indexes stored in an archive

CLI operations:
  - `./bin/es_archiver save <name> [index patterns...]`: save the mapping and documents in one or more indexes that match the wild-card patterns into an the `<name>` archive
  - `./bin/es_archiver load <name>`: load the mapping and documents from the `<name>` archive

* [functional_tests/common/nagivate] check for statusPage

* [es_archiver] move bins into new scripts dir

* [functional_tests/apps/context] use esArchiver

* [esArchiver] general improvements after showing to a few folks

 - remove auto-upgrading config doc logic (until we have better access to kibana version info)
 - export unload command
 - remove preemptive checks in favor of reacting to errors
 - use type "doc" vs "hit" for doc records (consistency)
 - wrote a bunch of pending tests to think though and plan

* [esArchiver] make log a stream that writes to itself

* [esArchiver] fill in stats and archive format tests

* [esArchiver] splitup action logic

* [esArchiver/cli] fix cli --help output and comment

* [esArchiver] remove type-based param coercion

* [esArchiver/log] use strings for log levels

* [esArchvier] remove unused var

* [esArchiver/indexDocRecordsStream] add tests

* [esArchive] fill in remaining tests

* [esArchiver] fix dem tests

* [eslint] remove unused vars

* [esArchiver/loadIfNeeded] fix call to load()

* [esArchiver] remove loadDumpData helpers

* [esArchiver] update archives for 5.x

* [functionalTestRunner] replace intern (#10910)

* [functional_test_runner] replace functional testing tools with custom/pluggable solution

* [functional_test_runner] Convert unit tests to commonjs format

* [functional_test_runner] Fix dashboard test in wrong mode

* [functional_test_runner] Add dashboardLandingPage test subject

* [functional_test_runner] Get Visualize page object

* [functional_test_runner] Fix outdated references

* [functional_test_runner] Fix more outdated refs

* [functional_test_runner] Remove duplicate tests

* [functional_test_runner] Improve test readability

* [functional_test_runner] 😞 So many duplicate methods

* [functional_test_runner] Move mgmt `before` outside toplevel describe

* [functional_test_runner] Settings page obj missing methods

* [functional_test_runner] Add improvements from @gammon

* [functional_test_runner] Fix return statements in async funcs

* [functional_test_runner] Move before() to correct scope

* [functional_test_runner] Add after() hooks to remove index patterns

* [functional_test_runner] Attempt to fix vertical bar chart tests

* [functional_test_runner] Clean up

* [functional_test_runner] Reinstate unit tests

* [functional_test_runner] Set default loglevel back to info

* [functional_test_runner] Replace `context`s with `describe`s

* [functional_test_runner] Better error handling

* [functional_test_runner] Add in new Tile Map tests

* Incorporate changes from master

* [functional_test_runner] validate that every test file has a single top-level suite

* Update contributing doc with link to full doc

* [docs] Spelling and grammar fixes

* docs: writing and running functional tests

* [docs] Move plugin doc to plugin area

* [docs] Housekeeping. Doc in wrong place

* [docs] Remove dup doc file

* [grunt] Only run mocha_setup when running tests, not every grunt task

* [eslint] remove use of context()
2017-04-12 08:44:53 -04:00
Kim Joar Bekkelund
9d5b193697 Move Jest test setup to root (#10963) (#11066) 2017-04-05 22:59:02 -04:00
CJ Cenizal
2cef69f49c [UI Framework] Create Button React components in UI Framework. (#10646) (#10941)
* Create KuiButton, KuiLinkButton, KuiSubmitButton, and KuiButtonIcon React components in UI Framework.
* Add Jest test coverage for UI Framework, generate report in ui_framework/jest/report.
* Add UI Framework to linting task.
* Update UI Framework README with instructions on creating and testing React components.
* Add both React and HTML examples.
* Add UI Framework Jest tests to npm test script. Create separate scripts for watching and generating coverage reports.
* Fix appearance of kuiButtons with icons throughout Kibana, by adding a flexbox wrapper.
* Improve accessibility of kuiButtonIcon.
* Remove disabled attribute from KuiLinkButton.
* Remove kuiButton-isDisabled class from KuiButton and KuiSubmitButton.
2017-03-29 13:58:45 -07:00
Spencer
e0c66b98d2 [backport/5.x] [eslint] enable no-undef rule - #10825 (#10846)
* [codeshift] add proper ignore comments

* use more descriptive file ignore pattern

* [codeshift] apply require-to-import transform

* [codeshift/fixup] remove duplicate imports

* [eslint] upgrade config for react "unused" support

(cherry picked from commit aa2bb174a3)

* [eslint] remove no-unused-vars override

* [eslint] remove no-unused-vars override

* add eslint-plugin-react peerDependency

* [codeshift] apply remove-unused-basic-requires transform

* [codeshift] apply remove-unused-function-arguments transform

* [lintroller] fix argument list spacing

* [codeshift] apply remove-unused-basic-vars transform

* [codeshift/fixup] fixup unused basic var removals

* manually apply remove-unused-assignments transform

* [codeshift] reapply remove-unused-imports transform

* [codeshift] reapply remove-unused-function-arguments transform

* [resizeChecker] remove assignment to unused var

* [eslint] autofix param spacing

* manually fix remaining no-undef errors

* replace values that looked unused in tests

* remove // kibana-jscodeshift-no-babel comment

* remove import statements from code required by api tests

* Remove '// kibana-jscodeshift-ignore' comments

* address review feedback

* remove remnant of removed if condition

* [console] use * import for settings
2017-03-22 11:13:19 -07:00
jasper
a5871e89a2 Kibana Globalization - Phase 2 (#8766) (#10819)
* Integrate angular-translate globalization framework with i18n engine
* Provide template for enabling translations in an AngularJS view by translating a view
* Verification tool for translation keys used in angular-translate
* Documentation
2017-03-20 17:15:52 -04:00
jasper
1cdf106a0e Moving front-end code out of devDependencies (#10690)
Backports PR #10670

**Commit 1:**
Moving front-end code out of devDependencies

* Original sha: 6d4e7288cd
* Authored by Chris Cowan <chris@chriscowan.us> on 2017-03-02T23:41:51Z

**Commit 2:**
removing range specifier

* Original sha: fe7cbe57d7
* Authored by Chris Cowan <chris@chriscowan.us> on 2017-03-03T13:20:14Z

**Commit 3:**
overriding ua-parser-js@0.7.12 to MIT

* Original sha: 21cf790e7e
* Authored by Chris Cowan <chris@chriscowan.us> on 2017-03-03T13:21:51Z

**Commit 4:**
upgrading react-color; upgrading react; upgrading pui-tooltip;

* Original sha: 183b71c458
* Authored by Chris Cowan <chris@chriscowan.us> on 2017-03-03T15:39:17Z
2017-03-03 11:51:07 -05:00
jasper
1f9f5732a7 [5.x] Kibana Globalization - Phase 1 (#10664)
* Kibana Globalization - Phase 1

Backports PR #7545

**Commit 1:**
Add low level i18n plugin

Manages languages that are available and is responsible for loading translated
content at the granularity of a plugin.

To be done:
 - APIs for store and retrieval

* Original sha: aca671f10b
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-06-20T17:12:25Z

**Commit 2:**
Use Kibana install as root for the translation store directory

Setting the path for storing the bundled language translation files to
<KIBANA_INSTALL>/data/store_translations/<PLUGIN_NAME>

* Original sha: c3ba5785cb
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-06-21T13:36:59Z

**Commit 3:**
Updated i18n core plugin APIs to be asynchronous

To be done:
 - Better error handling in APIs
 - Fix threading issue with storePluginLanguageTranslations API

* Original sha: 80d8a2ce72
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-06-22T17:25:30Z

**Commit 4:**
Fix thread synchroization issue in storePluginLanguageTranslations

* Original sha: 856fb0200f
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-06-24T10:43:06Z

**Commit 5:**
Update error handling in i18n core plugin

* Original sha: c5d22bede1
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-06-24T14:30:27Z

**Commit 6:**
Change to use NodeJS mkdirp function for creating directories recursively

Updates with review comments from @srl295. Changed export syntax to show the
exported functions at end of file.

* Original sha: b37e4f8b7b
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-06-27T11:04:01Z

**Commit 7:**
Add REST API for getting translations of a language for a plugin

To be done:
 - Add algorithm to decide on the language for a plugin by comparing the accept languages
from the REST call and the plugin supported languages
 - Add REST API tests

* Original sha: ec6d2b1ca2
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-06-27T22:42:15Z

**Commit 8:**
Add algorithm for determining plugin language when retrieving translations

Client would pass languages used in the 'accept-language' header. These
languages would then be compared against the plugin supported languages
and best compared language would be selected.

To be done:
 - Add REST API tests

* Original sha: a75faaea1c
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-06-28T21:10:39Z

**Commit 9:**
Add API to return all registered plugin language translations

* Original sha: 66d051bed3
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-06-29T17:02:34Z

**Commit 10:**
Add HAPI API to get all plugins translation files

* Original sha: c3403e7530
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-06-30T16:08:28Z

**Commit 11:**
Update register translations API to be independent of plugin name and language

The register API is updated to be independent of plugin name and language. The API will now
traverse the path given and create language bundles as per language files it traverses.
The translations files structure has also been simplified to be just key/value objects.

To be done:
 - Add hapi API to get translations
 - Extend the API tests to test responses

* Original sha: 0f4902d98d
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-07-01T16:09:33Z

**Commit 12:**
Update API test

* Original sha: 9785df221f
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-07-05T17:52:25Z

**Commit 13:**
Add eslint fix for API test

* Original sha: d41fcecc49
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-07-06T10:00:22Z

**Commit 14:**
Update with review comments

From review https://github.com/elastic/kibana/pull/7545#issuecomment-231147435
following comments updated:
- README, .gitignore, and .eslintrc are not needed in a core plugin
- package.json only needs name and version
- unit tests need to go in a tests directory otherwise they won't get picked up
by the grunt tasks. Also our convention is to name the test file with the same
name as the module it's testing (so i18n_tests.js should just be i18n.js)
- For consistency with the rest of the code base, rename the data directory to fixtures.
- Prefer const (or let if necessary). Don't use var.
- Use ES6 imports/exports rather than commonjs style
- Only export the i18n module's public API. For instance, I don't think getPluginTranslationDetails is used outside of the i18n module, so it shouldn't be exposed publicly. If you want to expose it for testing purposes, I would recommend creating an i18n directory with an index.js file that exports the module's public API, and a separate i18n.js file with the "private" API. index.js will be for public use, i18n.js will be for private internal use.

* Original sha: c8b2197ad5
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-07-11T11:23:37Z

**Commit 15:**
Update after review comments

From review (https://github.com/elastic/kibana/pull/7545#issuecomment-231884490):
- i18n module API should return promises for async operations instead of using
callbacks
- All filesystem access should be async
- Unit tests need to be updated based on new proposed plugin structure
(single language file, not split by view)

From design (https://github.com/elastic/kibana/issues/6515#issuecomment-231400097):
- Removed API as will consider in later phase

TODO:
- Make write function async

* Original sha: e17653dd04
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-07-15T18:24:21Z

**Commit 16:**
Update after review comments

Updated write function to be asynchronous

* Original sha: eaf35ab392
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-07-19T11:03:45Z

**Commit 17:**
Update registerTranslations API to take absolute translation file as argument

The API originally took the directory as the argument but following reviews it
was decided to change to absolute file because it will be less brittle
since it is more explicit.

* Original sha: f1974ca2ab
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-07-21T17:43:27Z

**Commit 18:**
Translate the Kibana welcome message

Translates the start-up message (“Kibana is loading ...”)in the Jade template.

To be done:
 - Means to register the core plugin translations. They are currently added
in the fixtures directory as static files. Need to be generated on the fly.

* Original sha: 10db4585bd
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-07-25T13:58:54Z

**Commit 19:**
Add build task to generate core plugin translations

Task which calls registerTranslations API and then a task which copies the
regsitered translations to <kibana_root>/build/kibana

* Original sha: 4957173794
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-07-27T10:00:35Z

**Commit 20:**
Add hook to optimize module to add registration during dev startup

Registration of the core plugin translations during development start of
Kibana server. The translations include the welcome message and server error
startup message.

* Original sha: 5f61475ad5
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-07-28T14:18:19Z

**Commit 21:**
Handle scenario when the user preferred language header is not passed

The UI when loading asks i18n plugin which language translation to use
depending on the user preferred language header 'accept-language'.
This commit is to handle scenario where header is not passed. The algorithm
then chooses the default language.

* Original sha: 9fbe6d5fcd
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-07-29T10:51:33Z

**Commit 22:**
Replace registering of translations at plugin install time to the plugin init phase

This change follows review comments in:
https://github.com/elastic/kibana/issues/6515#issuecomment-236237218

* Original sha: 32d5034d9c
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-08-08T14:39:34Z

**Commit 23:**
Update after review comments

Comments:
- https://github.com/elastic/kibana/pull/7545#discussion-diff-72890673
- https://github.com/elastic/kibana/pull/7545#discussion-diff-72894762

* Original sha: 8c7f51ca5d
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-08-09T09:36:04Z

**Commit 24:**
Update after plugin folder layout changes in Kibana

This require to use <kibana_root>/data for registered translations
and i18n plugin moved to core_plugins from plugins.

Refer to PR for more details:
https://github.com/elastic/kibana/pull/7562

* Original sha: b84f40a40b
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-08-09T11:09:18Z

**Commit 25:**
Update translation registration to file path rather than bundling

After review discussions it was agreed to just register the absolute paths
to translation files rather than bundling each file into one central file
at registration.

* Original sha: 2dd3065856
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-08-16T09:28:38Z

**Commit 26:**
Update review comments

This commit contains the following review comments:
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74661282
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74661392
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74662271
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74663235
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669201
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669269
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669419
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669628
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74799382

* Original sha: db11a2db24
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-08-18T14:09:22Z

**Commit 27:**
Update review comments

The following review comments are included in the commit:
- https://github.com/elastic/kibana/pull/7545#discussion_r74663515
- https://github.com/elastic/kibana/pull/7545#discussion_r74666995
- https://github.com/elastic/kibana/pull/7545#discussion_r74805552

* Original sha: 8c39a8d5e9
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-08-19T12:44:39Z

**Commit 28:**
Expose the i18n APIs in the server object for plugin access

Plugins should call the i18n plugin APIs through the server object
and not directly from the module.

This closes he following comments:
- https://github.com/elastic/kibana/pull/7545#discussion_r74662598
- https://github.com/elastic/kibana/pull/7545#discussion_r74669327
- https://github.com/elastic/kibana/pull/7545#discussion_r74669765

* Original sha: a9e30d3931
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-08-19T17:31:10Z

**Commit 29:**
Update accept-language-parser module to 1.2.0

Module version 1.2.0 fixes issue:
https://github.com/opentable/accept-language-parser/issues/8

This commit updates review comments:
https://github.com/elastic/kibana/pull/7545#discussion-diff-75525214
https://github.com/elastic/kibana/pull/7545#issuecomment-240290461

* Original sha: da669da2e5
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-08-30T17:49:23Z

**Commit 30:**
Add i18n default locale as a configurable item

Adds 'defaultLocale' configurable item to the i18n plugin configuration.
The default locale is used for translations if the locale specified by user
is not supported.

This commit satisfies the review comment:
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669970

* Original sha: 9064e8a7e6
* Authored by Martin Hickey <martin.hickey@ie.ibm.com> on 2016-08-31T10:42:52Z

* [eslint] autofix lint errors
2017-03-02 16:40:19 -07:00
Jonathan Budzenski
db9e04185b [build] Add notice file (#10344)
* [build] Add notice file

* [build] Include license text if available

* [build] Look for both license and notice files

* [build] Add node license to notice

* [build] Add a base notice file including info on committed dependencies

* Bump license copyright year

* [build] Kibana at top of notice
2017-02-16 11:42:07 -05:00
Spencer
1e30ab89f2 babel 6 upgrade (#9702) (#10278)
* [npm] upgrade babel

The upgrade to babel 6 requires an upgrade to all of the associated modules, which meant that a few other things changed at the same time. The most notable is the way that we handle our babel-options, which is now done with an npm module and includes using the babel-loader's "presets" query string param.

This meant changes to the babel_options.js module and extending it to help setting up the "babel-register" module, which was previously copy-pasted in several places.

* [mtodules] upgrade to support babel6 module semantics

* [eslint] fix lint errors

* [babel] ignoer massive fixture files

* [cli/errors] use Object.setPrototypeOf since subclassing Error is broken

* [babel] Upgrading core babel libraries

[babel] Use WIP babel-6-fix branch of babel-preset-kibana

* Fix broken test

* [babel] Reverse unnecessary module.exports changes

* Fix notifier

* Use babel presets and plugins directly

* [babel/options] resolve preset/plugins paths for better plugin compatibility

* [babel/options] use babel-preset-env for correct node settings

* [babel] cache babel compilation in webpack like we thought we were
2017-02-10 02:14:06 -07:00
Spencer
9ed7e81b62 Backport eslint updates to 5.x (#10139)
* [eslint] update eslint config to 0.3.0

* [eslint] autofix

* [fixtures/hits] reformat to comply with max-len lint rule

* [eslint] enable no-var and autofix

* [eslint] enable prefer-const and autofix

* [eslint] fix autofix-incompatible no-var and prefer-const violations

* [eslint] enable quotes+no-extra-semi and autofix
2017-02-06 21:27:07 -07:00