Commit graph

318 commits

Author SHA1 Message Date
Leanid Shutau
f0bbb66bd6
[Tools] Rename i18n context field to description field (#25105) (#25204)
* [Tools] Rename React i18n context field to description field

* Rename context to description in all i18n use cases
2018-11-06 18:11:32 +03:00
Spencer
6898032816
[ftr] allow filtering suites by tag (#25021) (#25075)
Closes #22840

In the functional tests we want a better way to include/exclude certain tests, especially as we move forward with #22359. This PR allows us to decorate suite objects with "tags", which won't clutter up the test names and can be used to filter out specific tests within a single test config. The functional test runner supports defining `--include-tag` and `--exclude-tag` CLI arguments, and multiple can be defined.

The method of filtering out tests for running against cloud has been updated to use this approach and I plan to do the same to #22359 once this is merged.
2018-11-02 18:28:51 -07:00
Aleh Zasypkin
7fcf32e26c
[6.x] Simplify pseudo localization for React components. (#25042) 2018-11-02 11:34:37 +01:00
Bhavya RM
be0f898c58 backport of Adding jsxa11y into eslint rules #23932 2018-11-01 13:32:41 -04:00
Leanid Shutau
b24ab5226d
[I18n] Sanitize angular directive message before inserting it to DOM (#24830) (#24967)
* [I18n] Sanitize message before inserting it to DOM

* Add tests
2018-11-01 13:54:01 +03:00
Spencer
9a5a053ca4
[dev/build] avoid building packages twice (#24696) (#24954) 2018-10-31 17:07:44 -07:00
Spencer
627a422de2
[6.x] [@kbn/datemath] improve types (#24671) (#24801)
Backports the following commits to 6.x:
 - [@kbn/datemath] improve types  (#24671)
2018-10-29 20:41:39 -07:00
Spencer
7eccf8b4ad
[kbn/es] add context to error message (#24664) (#24699)
This just tweaks the kbn-es error message to provide more context than just `Not Found`
2018-10-29 09:15:14 -07:00
Leanid Shutau
b3086f294b
[I18n] Update locale objects format (#23917) (#24639)
* Update output file format for i18n_check tool

* Update i18n engine to work with new format

* Update tests

* Fix UI bootstrap test

* Update loader tests and fix getTranslationsByLocale function

* Fix messages passing to IntlProvider

* Update messages interface

* Resolve comments

* Resolve comment
2018-10-29 17:24:28 +03:00
Leanid Shutau
46b83db605
[I18n] Add pseudo-localization to i18n engine (#24130) (#24635)
* [I18n] Add pseudo-localization to i18n engine

* Add pseudo-localization to React

* Remove lookbehind from regex

* Resolve comments

* Add comment
2018-10-29 13:54:26 +03:00
Josh Dover
306d06c0e9
[6.x] Upgrade Hapi in legacy platform to v17 (#21707) (#24608)
* Upgrade Hapi in legacy platform to v17 (#21707)

* Disable even-better monitoring

* Upgrade to Hapi v15

* Upgrade to Hapi v16

* Handle optional req params correctly

* Update http and kbnServer

* Get mocha tests passing

* Convert `reply` usages [wip]

* Fix Joi and Plugin incompatibilities

* Get server up and running

* Get basic logging working

* Fix optimizer

* Fix recent route handlers

* Various fixes

* Fix recent routes

* Upgrade wreck for async/await

* Fix mocha tests

* Fix joi issues

* Fix xpack jest tests

* Fix recent routes

* Fix tests

* Fix index setup

* Decouple monitoring stats collection from good plugin

* Update reload logging test to work

* Reimplement logging with updated good plugin

* Fix unit tests

* Fix getConnections back

* Make LegacyLoggingServer compatible with Hapi v17

* Update joi types

* Fix x-pack unit tests

* Remove stray debugger

* Remove hapi-compat

* Fix API integrations

* Upgrade boom

* Fix security plugin

* Misc fixes

* bump

* Fix licensePreRoutingFactory

* Fix failing integration tests

* Remove unnecessary test change

* Remove hapi-latest package

* fx

* Various cleanup

* Fix race condition in oppsy events

* Use elastic/good fork

* Fix boom.wrap and hapi-latest changes

* Simplify LegacyLoggingServer updates

* package.json cleanup + test fix

* yarn.lock cleanup

* Change good tag

* Fixes

* Change return err -> throw err in routes

* Fix await returns

* Fix new load_data test

* Make cookie security flags consistent

* tmp doc

* Fix types

* Fix tests

* Upgrade canvas plugin

* Move good package to published @elastic/good one

* Fix SO test

* Fix logging reloading

* Update APM apis

* Fix error logging

* Fix logging test

* Convert spaces plugin

* Add validation error shim

* Remove 7.0 release notes

* Await renderApp

* Fix ccr routes

* Prevent header popovers from scrolling with page content (#23850)

* Fix spaces test

* new yarn.lock-s

* Fix spaces tests

* Remove h2o2-latest

* Fix @types/hapi

* Upgrade InfraOps plugin

* Fix package.json

* Add back isSameSite: false

* Upgrade beats_management plugin

* Update snapshot

* Fix InfraOps

* Upgrade kql_telemetry

* Merge upstream/master

* Upgrade apm and ml

* Put snapshot test back

* Fx beats

* Upgrade rollups

* Update boom usages in new plugins

* Update url shortener

* Don't throw errors in optimizer (#24660)
2018-10-26 16:37:05 -05:00
spalger
8cdd294593 [kbn-pm] update kbn-pm build 2018-10-26 07:57:57 -07:00
Leanid Shutau
204af32833
[Tools] Add "values" property validation (#22538) (#24573)
* [Tools] Add "values" property validation

* Fix values validation

* Fix typo in values regex

* Fix whitespaces handling

* Fix curly braces in regex

* Fix missing/unused values differentiation

* Use intl-messageformat-parser for parsing values from defaultMessage
2018-10-25 16:36:33 +03:00
CJ Cenizal
c4534b6f2b
Introduce date histogram time base configuration to EditorConfig (#22344) (#24555)
* Add `default` and `baseInterval` configuration ability to date histogram EditorConfig
* Change EditorConfig `warning` to `help`, show `help` below date histogram and histogram interval inputs
2018-10-24 18:06:10 -07:00
Matt Bargar
5db29f5b10
Introduce query bar update button with dirty checking (#24529) (#24545)
Reintroduced submit button removed in the react migration of the query bar. Added dirty state indications.
2018-10-24 18:08:49 -04:00
Tiago Costa
3d1e00a27c
Remove red color from the kbn-pm logs (#24362) (#24441)
* feat(NA): remove red color from the kbn-pm logs.

* refact(NA): removed gray color from the generateColors function.

* chore(NA): update missing km pm dist file.
2018-10-23 21:53:34 +01:00
liza-mae
1e8ed18065
Handle exit code of 1 when terminating Kibana process on windows (#24151) (#24357)
* Handle exit code of 1 on windows

* Remove space to fix intake failure

* Update using solution from Spencer

* Update debug log message

Co-Authored-By: liza-mae <ldayoub@gmail.com>
2018-10-23 09:24:05 -06:00
liza-mae
79032f2deb
[6.x] Initial handling of windows process termination (#23441) (#24359)
* Initial handling of windows process termination (#23441)

* Initial handling of windows process termination

* Update exiting ES cluster process on windows

* Use tree-kill

* Add dependency

* Update with solution from Spencer

* Remove catch statement

* [kbn-es] remove class property from untranspiled js
2018-10-23 09:23:40 -06:00
liza-mae
1feba0f951
Update rmrfSync method (#23854) (#24351)
* Update rmrfSync method

* Add catch statement

* Fix lint issues

* switch to del package

* remove old rmrf_sync module

* Fix CI failure del is not a function error

* Fix spaces
2018-10-22 16:57:58 -06:00
Leanid Shutau
4a4c91c7fb
[I18n] Add one-time binding to angularjs i18n (#23499) (#23965)
* Add one-time binding to angularjs i18n

* Add watcher for values property

* Watch values field only if it is provided

* Fix ci
2018-10-17 15:44:43 +03:00
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