Commit graph

298 commits

Author SHA1 Message Date
Aleh Zasypkin f382758096
[6.x] Add Kibana bootstrap step to generate types exposed by the core and its plugins. (#23888) 2018-10-16 12:14:56 +02:00
Spencer f5ca67dc41
[6.x] [yarn] Upgrade to 1.10.1 (#23971) (#24054)
Backports the following commits to 6.x:
 - [yarn] Upgrade to 1.10.1  (#23971)
2018-10-15 18:20:26 -07:00
pavel06081991 3c7646e131
i18n remove extra span tags (#23529) (#23864)
remove extra span tags generated by FormattedMessage component

translate missed labels
2018-10-05 11:53:56 +03:00
Leanid Shutau 5bf648f039
[I18n] Add HOC injecting i18n provider (#23683) (#23804)
* add injectI18nProvider HOC

* Fix propTypes typo

* Typescriptify wrapper

* Add tests

* Fix tests

* Resolve comments
2018-10-04 13:43:00 +03:00
Leanid Shutau 6e6dd48409
[I18n] Update TS types in i18n engine (#23754) (#23805)
* [I18n] Export i18n service type

* Add InjectedIntl export and context type
2018-10-04 13:35:17 +03:00
Leanid Shutau 8b24893334
[I18n] Fix types paths for kbn-i18n package (#23744) (#23803)
* [I18n] Fix types paths for kbn-i18n package

* Remove module field from package.json
2018-10-04 12:07:21 +03:00
Aleh Zasypkin d758441fab
[6.x] Expose core config schema validation system as @kbn/config-schema package. (#23802) 2018-10-04 11:06:01 +02:00
Josh Dover cf18cc6bcc
Add K7 header navigation (#23300) (#23713)
* Add basic support for new K7 navigation

* Make visibility and app title work

* Allow nav controls on right side of navbar

* Use render callback w/ el

* Add support for multiple sides

* Remove fake spaces nav control

* Breadcrumb support

* Hide breadcrumbs in plugins when k7design is enabled:

* Fix units

* Rename k7 -> header

* Add tests

* Fix tests

* Fix loading indicator

* PR comments

* Move ts-ignore

* Use canvasApp icon type
2018-10-02 16:09:23 -05:00
Josh Dover 36f3169a37
Remove elasticsearch package from kbn-es (#23662) (#23693) 2018-10-02 12:09:36 -05:00
Leanid Shutau 2144a58923
i18n engine typescript migration (#22441) (#23682)
* configure typescript build, add necessary dependencies, change extensions, react migration

* migrate lib files in root

* update tests snapshots, resolve core loader, helper

* fix types for core components

* fix angular components

* fix angular staff

* use Messages type

* first-upper-case letter while using classs

* use stable latest babel, fix ts issues

* optimize .babelrc

* update lock file

* Fix x-pack/yarn.lock

* fix issue with unknown babel plugin

* add babel-config.js file with babel configuration for i18n engine build process instead of .babelrc file to fix jest issue

* Resolve comments

* Fix babel config

* Fix packages incompatibility issue

* Fix tslint errors

* Fix tests

* Resolve comments

* Fix types
2018-10-02 15:45:22 +03:00
Larry Gregory 632c63ab21
[6.x] Spaces Phase 1 (#21408) (#23639)
Backports the following commits to 6.x:
 - Spaces Phase 1  (#21408)
2018-10-01 09:53:43 -04:00
Josh Dover 5794396834
Fix plugin generator when using hacks and SCSS [ci skip] (#23579) (#23580) 2018-09-27 12:10:06 -05:00
CJ Cenizal 3a1c702aa4
Add Vanilla JS example to kbn-i18n README (#23556) (#23570)
Rename Node.js to Vanilla JS and give example of internationalizing a string constant.
2018-09-27 08:59:53 -07:00
Aleh Zasypkin fd70b4faf3
Upgrade eslint/tslint/prettier plugin versions. (#23562) 2018-09-27 14:17:45 +02:00
pavel06081991 4c331b1348
Update versions of @babel/parser and @babel/types (#23268) (#23469)
Update versions of @babel/parser, @babel/types, eslint, babel-eslint
2018-09-25 16:18:05 +03:00
liza-mae 0fe8b14735
Cleanup from PR 22608, remove esInstallDir (#23450) (#23456) 2018-09-24 18:30:57 -06:00
liza-mae 0d66bcd894
Add option to functional test server to run elasticsearch from instal… (#22608) (#23447)
* Add option to functional test server to run elasticsearch from install dir

* Fix variable

* Fix server CLI test

* Updates to include install path in esFrom command line option

* Fix snapshot

* Update args/cli tests

* Keep default snapshot in args/help
2018-09-24 13:52:37 -06:00
Tyler Smalley b93b868b0f
Moves styleSheetPath to uiExports (#23007) (#23385)
This was previously defined in uiExports.app, which limited plugins which are not an app of providing a stylesheet. This allows any plugin to define a stylesheet which will be available on page load.
2018-09-20 20:42:04 -07:00
Spencer cd91188963
[6.x] [build] default to --debug output (#23011) (#23207)
Backports the following commits to 6.x:
 - [build] default to --debug output  (#23011)
2018-09-14 23:21:46 -07:00
Spencer bd9e2148a5
[kbn-plugin-helpers] move jest tests to integration suite (#23005) (#23012)
The plugin helper tests have failed due to timeouts every once and a while, which makes sense because they run a bunch of CLI tasks, so this just moved them to the jest integration tests where tests can take a little longer to run.
2018-09-14 13:24:10 -07:00
Spencer 489779a906
[6.x] [ts] enable support for iterators in browsers (#22986) (#23014)
Backports the following commits to 6.x:
 - [ts] enable support for iterators in browsers  (#22986)
2018-09-13 16:52:20 -07:00
Spencer 674d65bb58
Upgrade to TypeScript 3 (#22792) (#22927)
LGTM 🎉 🎉 🎉
2018-09-11 14:14:17 -07:00
Spencer 9a7fa9a938
Upgrade to Jest 23.5.0 (#22791) (#22846)
I'd really like to upgrade to Typescript 3 for its `unknown` type, but we need to upgrade to `jest@23` to support a recent version of `ts-jest@23`.

The [jest changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) breaks down the breaking changes in 23.x, but I found it to be slightly incomplete so I've broken down the changes that actually caused breaks for us here, and addressed each in individual commits to make review a little easier:

- the `testURL` config default was changed from `about:blank` to `http://localhost`
    - this cause some XHR requests powered by JSdom to start failing. It seems these requests just do nothing in master but start to fail when JSdom is initialized with an actual URL... I think we would ideally stop sending meaningless XHR requests in the tests, but it was a lot easier to just set the config to `about:blank` for now, and we can worry about cleanup later if necessary
- `expect(...).toThrow()` only passes if an actual error was thrown.
     - In two places in the index pattern code we were throwing strings, which broke the assertions. Fortunately/Unfortunately the errors are not being consumed by anything, so I was able to wrap them in `new Error()` without causing any issues.
- snapshots of mock functions now include a `results` array, detailing the return values of the function
- React fragments are now serialized as `<React.Fragment>` instead of `<UNDEFINED>`
- undefined props in React components are now stripped from snapshots
- minor changes to the ordering of mocks, imports resolution, and before hooks caused the uiSettings API tests to start breaking, but I'm replacing them with totally new tests in #22694 so I just deleted them here
- mocks created with `jest.spyOn()` that are restored now have their `mock.calls` reset, so some of the kbn-pm tests stated failing. This was fixed by restoring them with `jest.restoreAllMocks()` rather than trying to do it before the assertions
2018-09-07 20:30:49 -07:00
Lee Drengenberg b2441c02fb
x-pack tests should use servers from other config files already loaded (#22739) (#22762)
* x-pack tests should use servers from other config files already loaded

* Fix es_test_config that was using TEST_KIBANA_USERNAME/PASSWORD
2018-09-06 11:32:12 -05:00
Maryia Lapata c9f753155e
Update Guideline (#22450) (#22645)
* Update Guideline

* Update Unit tests section

* Updated Guideline
2018-09-04 15:07:36 +03:00
Tim Sullivan c80a34f84e
[ESLint] Turn off no-multi-str rule in eslint config (#22525) (#22602)
* remove inline rule disabling comments

* turn off no-multi-str
2018-08-31 13:56:12 -07:00
Leanid Shutau b705fed963
Integrate main i18n tool into build pipeline (#22254) (#22482)
* Integrate main i18n tool to build process

* Resolve comments

* Remove old task

* Replace default Error with FailError
2018-08-29 13:42:47 +03:00
Spencer 260059ea3d
[dev-utils/withProcRunner] fix test that swallows promise rejection (#22342) (#22437)
* [dev-utils/withProcRunner] fix tests that can silently fail

* test async/sync withProcRunner functions
2018-08-28 03:17:29 -07:00
Spencer 0d00b4088f
[ftr] capture test output and only log on failure (#21903) (#22436)
This is an attempt to write a log capture integration for the functional test runner that will collect all log output written during a test, prevent it from being written to stdout to lower the amount of work Jenkins master has to do and include the entire log output for each test in the junit report. I'm slightly concerned about the amount of memory we'll be using to store a copy of the logs for each test, but streaming the XML report isn’t easy and there doesn’t seem to be a library out there to help. If we decide it’s torally necessary we might be able to figure it out.
2018-08-27 21:21:08 -07:00
Lee Drengenberg 9cc037cac7
Fix es unzip (#21817) (#21839)
* Rebuild modulePath correctly if on Windows

* fix it so we create empty dirs like /logs/
2018-08-27 09:37:21 -05:00
Spencer 8faacedc17
[6.x] [devUtils/toolingLog] give tooling log configurable writers (#22110) (#22241)
Backports the following commits to 6.x:
 - [devUtils/toolingLog] give tooling log configurable writers  (#22110)
2018-08-21 21:29:44 -07:00
Caroline Horn 377644bd4b
Home less to sass (2) (#22160) (#22236) 2018-08-21 22:58:20 -04:00
Spencer 1878913e3f
Enable prettier for kbn-dev-utils (Part of #17763) (#22239)
Partial backport of https://github.com/elastic/kibana/pull/17763, originally attempted in https://github.com/elastic/kibana/pull/17849 but was abandoned, and I'd like it to be easier to backport  https://github.com/elastic/kibana/pull/22110 and future PRs.
2018-08-21 19:38:37 -07:00
Tim Roes a5f8740656
Make panel action tests more generic (#22174) (#22196)
* Make panel action tests more generic

* Remove test file

* Add simple app tests

* Shorten/fix import

* Remove unneeded task

* Add debug output

* Allow duplicate --plugin-path params

* Remove debugging options

* Add README
2018-08-20 23:50:07 +02:00
pavel06081991 d7b1802cde Guideline for i18n engine (#20620) (#22117)
* Add Guideline for i18n engine

* Update Guideline according to changes in i18n engine.

* Update examples in Guideline

* typo

* improve i18n guideline: add table for better view, use single quotes for js strings, fix description for testing, use uniq "message id" name

* fix readme description for guideline

Co-authored-by: maryia-lapata "mary.lopato@gmail.com"
2018-08-17 14:25:58 +03:00
Aleh Zasypkin 8e696b7369
[6.x] [Tests] Add http integration test setup (#22114)
* [Tests] Add http integration test setup

* Base path tests

* SSL tests

* Eslint fixes

* Remove env from config schema

* Rename folders so no_rewrite and rewrite match configs/tests

* wip

* Use self-signed cert for SSL test

* Improve basepath tests

* Run base path proxy server in dev mode for now

* Remove env from x-pack reporting config

* Remove redundant base-path tests

* Test SSL with redirectHttpFromPort set

* Test SSL with redirectHttpFromPort set

* Flesh out comments

* Remove some cruft

* Add SSL tests to CI run
2018-08-17 10:42:38 +02:00
Spencer b9f59b3c47
[6.x] [kbn-test] use slightly more debug-friendly error output (#21985) (#22012)
Backports the following commits to 6.x:
 - [kbn-test] use slightly more debug-friendly error output  (#21985)
2018-08-15 17:12:19 -07:00
Court Ewing 2a2041e850
[kbn-pm] remove lodash from test fixtures (#21848) (#21858) 2018-08-09 20:21:59 -04:00
Jonathan Budzenski 57e3f0c890 [kbn-pm] Add optimize dir to kbn clean (#20945)
* [kbn-pm] Add optimize dir to kbn clean

* update snapshot
2018-08-08 07:40:00 -05:00
Leanid Shutau 31b5c1fac2
Set kibana locale in kibana.yml config (#21201) (#21777)
* set kibana locale in kibana.yml config

* remove accept-language-parser

* remove unnecessary tests

* fix readme description, fix description for locale in kibana.yml

* add point, that i18n.locale option should have exact match

* update kbn/i18n README

* Update README.md

* use getUiTranslations in render_mixin, remove i18n_mixin

* move registering translation files to mixin function
2018-08-08 13:51:31 +03:00
Leanid Shutau 1f7c1bce43
I18n tests (#20306) (#21638)
* Add unit-tests for i18n engine

* tests for angular wrappers under i18n engine

* split to packages in accordance to specific library

* split to packages depending on tech and environment

* make env modules names consistent

* remove intl polyfilling

* move laoder to root, i18n folder to core

* Add unit-tests for i18n engine

* tests for angular wrappers under i18n engine

* rebase on split package, injectIntl component

* eslint fixes

* use method names for checking, test i18n-values in directive

* use real html content while testing directive

* add test for angular directive without values
2018-08-03 16:39:07 +03:00
Spencer 0f12ecf0dd
[kbn-test] convert kibana-install-dir flag to installDir option (#21317) (#21626)
* [kbn-test] convert kibana-install-dir flag to installDir option

* [kbn-test] replicate kibana-install-dir handling to startServers

* [ftr] try running functional tests in production in CI

* Revert "[ftr] try running functional tests in production in CI"

This reverts commit e5b94aa024.

* [core/public/legacyPlatform] exclude ui/test_harness from the distributable

* [optimizer] fix `process.env.IS_KIBANA_DISTRIBUTABLE` definition

* [optimizer] only define `process.env.IS_KIBANA_DISTRIBUTABLE` when needed

Adding a `webpack.DefinePlugin` slows down the optimizer a small amount,
so only apply it when it is necessary, and skip it if it is going to
be defined as "false".

* [kbn-test/startServer] don't run in --dev mode if running from dist

* [ftr/kibanaServer/version] attach `-SNAPSHOT` suffix to version if running build_snapshot
2018-08-02 18:52:07 -07:00
Leanid Shutau 78ef349139
Use only core in browser environment, loader in node env (#20905) (#21587)
* use only core in browser environment and loader only in node env

* do not reexport node stuff from browser
2018-08-02 18:03:05 +03:00
Leanid Shutau 70261488de
Split i18n engine to specific parts by tech and by env (#20513) (#21543)
* split to packages in accordance to specific library

* split to packages depending on tech and environment

* make env modules names consistent

* remove intl polyfilling

* move laoder to root, i18n folder to core
2018-08-02 11:41:36 +03:00
Leanid Shutau 8f7142fe64
Use injectI18n Higher-Order Component instead of I18nContext (#20542) (#21529)
* add implementation of I18nContext, docs for injectI18n hoc

* remove i18nContext wrapper, add docs for react components as classes
2018-08-01 17:20:48 +03:00
Leanid Shutau 1d0e4381dd
Add draft implementation of I18n engine (#19555) (#21473)
* Add draft implementation of I18n engine

* Add i18n loader

* kbn-i18n refactoring

* Fix react i18n context and update doc

* i18n engine refactoring

* Fix locales data loading and add more jsdoc comments

* Fix verify_translations task

* I18n tests refactoring

* Add build scripts to kbn-i18n package

* Fix some bugs

* Move uiI18nMixin into ui_i18n folder

* Add 'browser' field to kbn-i18n package.json

* Get rid of "showError" method

* Make i18n and i18nLoader a singleton object

* Add default locale as fallback if translation files were not registered

* Update yarn.lock

* kbn-i18n fix

* Add default formats

* Try to fix build

* Add more examples into kbn-i18n/README.md

* kbn-i18n fix

* Fix app_bootstrap tests

* Add links to issues in TODO comments
2018-08-01 14:17:07 +03:00
Felix Stürmer 3c68efd2d1
[6.x] Upgrade prettier to version 1.14.0 (#21466) (#21482)
Backports the following commits to 6.x:
 - Upgrade prettier to version 1.14.0  (#21466)
2018-07-31 18:27:22 +02:00
Spencer 519a9300ba
Migrate ui/notify/fatal_error to new platform (#20752) (#21452)
Fixes #20695

Extracts the "fatal error" handling logic from the `ui/notify` module and reimplements it in the new platform, using EUI for the fatal error page and continuing to support the `fatalError()` and `addFatalErrorCallback()` methods exported by the `ui/notify` module.

![image](https://user-images.githubusercontent.com/1329312/43032175-d37fbafc-8c65-11e8-8f1f-da71f0dac014.png)
2018-07-30 18:04:09 -07:00
Tyler Smalley 2ffae02bc2 [kbn-es] Only enable security for trial (#20803)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-07-26 14:41:42 -07:00
Spencer 1bce3b4642
[devUtils/procRunner] wait for proc to exit so we fallback to SIGKILL (#20918) (#20951) 2018-07-19 15:36:52 -07:00