Commit graph

768 commits

Author SHA1 Message Date
patrykkopycinski 4feb783413
Fix misuse of react-router and react-router-dom (#50120) 2019-11-12 15:33:54 +01:00
Jonathan Budzenski 1cc2a34745
Removes references to Elasticsearch mapping types (#47610)
* rm types

* fix infra/reindex test

* rm max_adjacency_matrix_filters

* lint

* more fixes

* comment return

* override documentation links

* typo

* return unfedined

* skip highlight test

* lint
2019-11-11 16:41:08 -06:00
Alexey Antonov c3951e9374 Move @kbn/es-query into data plugin - filters folder (#49843)
Dismissing reviews from ml and canvas as this is only an import change. 


* Move @kbn/es-query into data plugin - filters folder

* fix PR comments
2019-11-07 22:02:49 -05:00
Tiago Costa a014241a3c
fix(NA): correctly reference babel plugin into the node babel preset (#50090) 2019-11-07 17:25:00 -05:00
Gidi Meir Morris c485893ab2
Improves performance of task execution in Task manager
This PR include three key changes:

1. Run tasks as soon as they have been marked as running, rather than wait for the whole batch to me marked
2. Use a custom refresh setting of refresh: false where possible, in place of wait_for, in order to speed up Task Manager's internal workflow
3. Instrumentation of Task Manager exposing Activity / Inactivity metrics in Performance test runs
2019-11-06 08:44:13 -05:00
renovate[bot] 73ebd567ad Update dependency rxjs to ^6.5.3 (#49837)
* Update dependency rxjs to ^6.5.3

* move argument type def up for better coverage

* adapt to possibly undefined helpExtension

* complete definition of deprecation$ type

* define types that bindNodeCallback can no longer infer

* define more types that bindNodeCallback can't infer

* be more explicit and accurate about the types for a subject/observable pair

* fix interface error, TS now identifies it

* ignore a return type flaw because types are not being managed properly

* avoid overspecifying types

* allow types to be inferred where possible

* remove unnecessary withLatestFrom()

* reduce number of rxjs versions installed

* update kbn/pm dist
2019-11-01 14:44:21 -07:00
sainthkh faa48d591d eslint no-restricted-path false positive: bug caused by dir names that start with "index". (#46544)
* index* to index.{ts,tsx}

* Added test.

* Added invalid test.

* Added js.
2019-10-31 12:40:53 +02:00
Matt Bargar 1dcec9d210
Add nested field support to KQL (#47070)
This PR adds a new syntax to KQL for querying nested fields.

Nested fields can be queried in two different ways:

Parts of the query may only match a single nested doc (bool inside nested). This is what most people want when querying on a nested field.
Parts of the query may match different nested docs (nested inside bool). This is how a regular object field works but nested fields can be queried in the same way. Although generally less useful, there are occasions where one might want to query a nested field in this way.
The new KQL syntax supports both.
2019-10-30 13:07:43 -04:00
Spencer 19ea92abb7
move react/jsx-a11y rules into shared react preset (#49244)
* move react/jsx-a11y rules into shared react preset

* autofix react/jsx-closing-tag-location

* autofix react/no-unknown-property

* manually fix react/no-unescaped-entities

* maually fix react/jsx-pascal-case

* manually fix react/prefer-stateless-function

* disable known violations in specific plugins/areas

* remove code override
2019-10-29 06:15:33 -07:00
renovate[bot] 5b375df8e9 Update moment related packages (#46849)
* Update moment related packages

* unify moment version in yarn.lock

* adapt ro pluralization fixes

* update some bad pluralization in fixtures/snapshots
2019-10-28 12:07:35 -07:00
Josh Dover 2d1c239fdd
Migrate necessary ui/autoload functionality to NP (#48689) 2019-10-28 12:58:29 -05:00
Aleh Zasypkin 57efead954
Correctly process paths in map_of and record_of. Do not swallow and use indent for nested one_of error messages. (#49457) 2019-10-28 19:39:48 +02:00
Dmitry Lemeshko f9b0a46dfd
[kbn-expect] add optional error message (#48895)
* [kbn-expect] add optional error message

* review feedback: replace error message with provided one

* add optional message for contain/string
2019-10-26 15:51:45 +02:00
Spencer a859577b40
Remove rimraf (#48985)
* Update dependency del to v5

* unify del/rimraf usage with del v5

* update yarn.lock

* update kbn-pm distributable

* remove poorly transformed code

* force some deletes from tmp

* mock less of the fs module

* force tmp deletion in a few more suites

* please make this the last force
2019-10-24 06:29:43 -07:00
renovate[bot] f0e9132535 Update dependency execa to v3 (#48975)
* Update dependency execa to v3

* update kbn/pm dist

* remove old @types/execa package

* remove use of removed methods/properties, specify preferLocal when needed

* [@kbn/pm] specify preferLocal when running install scripts

* update kbn/pm dist

* Joi now converts input to matching option from .valid()

* fix failed tests

* Revert "Joi now converts input to matching option from .valid()"

This reverts commit 75531b1d09.
2019-10-23 19:23:37 -07:00
Brandon Kobel a8c645926c
Update set-value to 2.0.1 (#49005)
* Updating set-value to 2.0.1

* update kbn/pm dist
2019-10-23 13:41:46 -07:00
Brian Seeders d68eba6d96
Ensure es/kibana cleanup always happens when using scripts/functional_tests (#48986) 2019-10-23 16:13:15 -04:00
Matt Bargar b5b8b4d87c
Stop generating filters with old invalid match phrase query syntax (#48033)
We've migrated the old syntax at query time for a long time, but when creating a phrase filter we still used the old (now invalid) syntax. This could be confusing to users since the raw query DSL is viewable in the filter editor. Also, since map_phrase.ts only expected the old syntax, it wouldn't detect a match_phrase filter if the user entered the new syntax into the raw DSL editor.

This PR updates all of the filter generation code that I know of to use the new syntax, and it updates the map_phrase.ts file to accept both syntaxes.
2019-10-22 13:46:44 -04:00
Joe Reuter 6c5c6ef5b3
Timelion: Move datemath parsing to the client (#47813) 2019-10-22 11:47:33 +02:00
renovate[bot] feceb0f98e Update eslint related packages (#48513)
* Update eslint related packages

* add errorMessage to no-restricted-paths validation

* add license to eslintrc file

* ignore broken plugin fixture

* upgrade tangled peer deps

* give name to unnamed func to avoid typescript-eslint/typescript-eslint#1078

* migrate away from removed prefer-interface

* migrate away from removed no-angle-bracket-type-assertions rule

* migrate away from removed no-triple-slash-reference rule

* old config was invalid and made this rule a noop

* fix array-type rule config

* fix readonly paramProperties that weren't being checked

* fix propType ordering

* remove references to non-existent rules

* remove unnecessary disable that is improperly formatted

* fix comment-related spacing

* fix typo/invalid namespace overrides

* rename fn to avoid hook-alike behavior

* remove reference to old removed rule

* use caret version for prettier

* reference babel-eslint with absolute path
2019-10-21 16:32:31 -07:00
Nathan L Smith fa951abfdc
Do not use env key in Babel common preset (#48661)
The merging behavior of having both `plugins` and `env.test.plugins` in the Babel configuration is confusing and does not work how we would like (that is, disabling the idx Babel plugin in test environments.)

There had been some [discussion about deprecating the `env` key in Babel](https://github.com/babel/babel/issues/5276) because of this behavior and recommending using conditional logic. The behavior has been modified in later versions of Babel, but still does not work as intended in our case.

Change this to only add the idx plugin if we're in a non-test environment.
2019-10-21 16:23:59 -05:00
Spencer 158d86f842
standardize notice-comment usage (#48677)
* standardize notice-comment usage

* regenerate notice.txt
2019-10-21 11:54:45 -07:00
Lukas Olson 3c7b1603f5
Refactor, deangularize courier/search source (#45235)
* Initial refactor of search source

* Add abort signal to search source fetch and remove cancel queued

* Remove usages of Angular Promises

* Remove usages of angular "sessionId" service

* Remove config as dependency

* Update deps on config and esShardTimeout

* Remove remaining angular dependencies from SearchSource

* Fix Karma tests

* Separate callClient and handleResponse and add tests for each

* Add tests for fetchSoon

* Add back search source test and convert to jest

* Create search strategy registry test

* Revert empty test

* Remove filter predicates from search source

* Update typings and throw response errors

* Fix proxy to properly return response from ES

* Update jest snapshots

* Remove unused translations

* Don't pass search request to onRequestStart, create it afterwards

* Fix search source & get search params tests

* Fix issue with angular scope not firing after setting state on vis

* Fix tag cloud vis

* Fix setting of visConfig to not happen async

* Remove unused snapshots

* Remove unused reference to IPrivate
2019-10-18 11:38:09 -07:00
Jean-Louis Leysens 214aee0fef
[Console] Mappings 7.5 part 2 (#48492)
* Update OSS console mappings and update script to handle new time unit entries

* Add console_extensions (ccr follower pause+resume)
2019-10-17 14:27:58 +02:00
Rudolf Meijering 3d28467d00
Server saved objects client through request context (#44143)
* Expose Saved Objects client in request context

* API Integration test for savedobjects in req context

* SavedObjectsClient docs

* SavedObjectsClient#find remove dependency on indexPatterns

And use the saved objects mappings instead

* Review comments

* Review comments, fixes and tests

* Use correct type for KQL syntax check
2019-10-16 10:36:40 +02:00
Alexey Antonov 8837faebde
Convert ui/agg_types/buckets to TypeScript / Jest (#47730)
* Convert `ui/agg_types/buckets` to TypeScript / Jest

* fix eslint issues

* fix CI

* fix JEST test

* fix mocha tests

* Fix PR comments
2019-10-15 21:18:34 +03:00
Liza Katz 338851f5d3
Remove indexPatterns dependency from filter service (#47471)
* Get rid of addFiltersAndChangeTimeFilter

* ts fix

* remove timefilter dependency from filter manager

* code review change

* Fixed bug in tests

* changeTimeFilter

* Refactored mappers and filter service to have no dependency on indexPatterns by generating the filter disaplyName in the relevant components.

* Fix map and flatten test

* Fixed filter state manager test

* Remove async from addFIlters and setFilters

* Fixed saved objects test - removed (display)value from url

* Make removeAll sync

* defer setFilters and removeAll in dashboard controller - temp hack

* fixed translation in filter view

* update strings

* Fixed range rendering

* map range converter
2019-10-15 15:23:24 +03:00
Nathan L Smith 209fef0e0b
Do not use the idx babel plugin in the test environment (#47994)
When running Jest with `--coverage`, modules using idx fail with the error shown in facebookincubator/idx#19.

Change the babel configuration so that is `NODE_ENV=test`, the idx plugin is not loaded.
2019-10-14 10:36:10 -05:00
renovate[bot] 0568464815 Update dependency tree-kill to ^1.2.1 (#48025)
* Update dependency tree-kill to ^1.2.1

* refactor promisify so types are assigned correctly
2019-10-12 20:06:00 -07:00
Spencer 0a85478d41
[failedTestsReporter] load github issues on demand (#47914) 2019-10-11 09:56:47 -07:00
Varun Sharma 525f708f24 Update README.md with changes in I18n engine APIs (#47290) 2019-10-11 16:53:36 +01:00
Spencer 26fc5c5046
[kbn/es] use an ES_TMPDIR that is within the install path (#47901)
* [kbn/es] use an ES_TMPDIR that is within the install path

* support tests which don't pass installPath
2019-10-11 07:13:22 -07:00
Spencer 2bd9699a64
cleanup es even if test fails (#47868)
* cleanup es even if test fails

* use correct beforeAll/afterAll hooks for jest
2019-10-10 14:10:45 -07:00
Spencer 23dada5722
fix indentation of failure issue bodies (#47864) 2019-10-10 12:52:35 -07:00
Spencer 36b55ab67e
[ci/failed_tests_reporter] when Github 500s, retry up to 5 tim… (#47740)
* [ci/failed_tests_reporter] when Github 500s, retry up to 5 times

* remove unused import

* properly handle non-string headers
2019-10-10 08:52:34 -07:00
Dmitry Lemeshko 3495f86c45
Collecting code coverage from functional tests (#40512)
* get coverage for console functional test

* instrument kibana

* collect coverage stats after each test, on url navigation, refresh and back

* switch to babel-plugin-istanbul

* switch to babel-plugin-istanbul

* [coverage service] basic version

* trigger final coverage flush when ftr finishes, wait for all logs before exiting

* add coverage report generation

* increase optimizer timeout, re-run idx/babel plugin before istanbul

* increase memory usage for node

* put istanbul preset in the beginning to run as the last one

* bump babel-plugin-istanbul up to 5.2.0

* cleanup

* save unique json files with coverage

* [functional test coverage] update coverage.json path

* run code coverage on CI

* increase max-old-space-size with env variable

* fix coverage folder creation

* use env variable to configure code coverage

* revert ci config changes

* remove duplicate plugin

* remove comments

* fixes
2019-10-10 07:56:49 +02:00
Spencer 9b34d6b76f
refactor failed_tests_reporter to use TS, no octokit (#46993)
* refactor failed_tests_reporter to use TS, no octokit

* update renovate config

* ensure that all kbn-test files are in ts project

* fix some type errors

* add some more tests

* [kbn-test/githubapi] cleanup and document

* collect log messages as strings instead of message objects

* ensure issue is open when updating body

* improve readability of getKibanaIssues

* expose axios helpers from dev-utils

* fix request params for fetching github issues and validate locally

* include a README for failed_tests_reporter

* improve axios error helpers
2019-10-08 13:56:07 -07:00
Tre 1947608378
[FTR] Support for new and old es clients (#47377)
* Add dep for new es client,
refactor all mentions of the old client
to the new.
2019-10-08 09:53:24 -06:00
Nathan L Smith 726a84f28c
[APM] Experimental Service Map front end (#46497)
Add service map tabs on the main APM screen and for individual services.

This is not yet hooked up to work with back-end data, so it always shows the same hard-coded graph.

This is experimental, so you must have x-pack.apm.serviceMapEnabled: true in your Kibana config for it to show up.

Also add "PSF" to the list of allowed licenses since a new dependency added uses this license (it's on the [green list](https://github.com/elastic/open-source/blob/master/elastic-product-policy.md#green-list).)

Fixes #44890
Fixes #44853
2019-10-08 09:54:11 -05:00
renovate[bot] 35751f9828 Update gulp related packages (#47421) 2019-10-05 23:38:41 -07:00
renovate[bot] 1da0469521 Update webpack related packages (#47402) 2019-10-05 14:36:02 -07:00
renovate[bot] 445fa434d5 Update gulp related packages (major) (#46665)
* Update gulp related packages

* ts-ify and gulp4-ify x-pack tasks, remove unused canvas tasks

* remove unnecessary gulp.TaskFunction usage

* fix old references

* update renovate config

* move constants into helpers directory

* typo

* compact tasks a bit, remove unnecessary paths

* fix build directories

* deprecate testonly task

* rather than justifying an unjustifiable ts-ignore, ts-ify the imported module

* update renovate config

* update browser download tests to mock axios

* add root index.d.ts to tsconfig

* export BrowserType

* remove unnecessary `@ts-ignore`

* use consistent casing
2019-10-05 07:53:47 -07:00
renovate[bot] 8fcae77856 Update dependency prettier to ^1.18.2 (#47340) 2019-10-05 05:32:24 -07:00
renovate[bot] 23650a0c1f Update dependency @elastic/elasticsearch to ^7.4.0 (#47338) 2019-10-05 05:30:50 -07:00
renovate[bot] fc53d4efb3 Update dependency tar-fs to ^1.16.3 (#47341) 2019-10-05 05:29:50 -07:00
Lee Drengenberg 700a7ef576
Add option for Internet Explorer IE11 to FTR (#42967)
* Add option for Internet Explorer IE11

* WIP trying to figure out IE options/capabilities

* more attempts to get IE tests working

* more work, but still can't set font size in Dev Tools Console

* two changes for IE

* revert skip in console test

* this change *appears* to set absolute times but they don't stick

* Shakespeare passing on all 3 browsers

* add config.ie.js, change 'internet explorer' to 'ie'

* increase notifications:lifetime so ew have a chance to see the message

* fix lint error remove unused Options

* updates from PR review, remove console.log

* cleanup + reuse existing code

* make iedriver path work for x-pack tests

* try to avoid changing notification timeout

* resolve path and add correct delimiter

* remove unused code, make timepicker work on IE11

* work-around 45333 for IE11

* [WIP] removing some work-arounds

* revert work-arounds

* cleanup

* remove debugging code

* remove debugging code

* removed unused code

* reverting 2 files that didn't have any material changes
2019-10-04 11:13:58 -05:00
Spencer 3bc803e371
[mkdirp] remove in favor of recursive fs.mkdir (#47251)
* [mkdirp] remove in favor of recursive fs.mkdir

* add eslint rule to educate future contributors

* reword the eslint error message to prevent copy-pasting callback code

* Commit updated kbn-pm dist

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

* Fix typo

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2019-10-04 08:15:06 -07:00
Wylie Conlon ab05bbd94e
[lens] Use top nav in Lens app (#46190)
* [lens] Use top nav in Lens app

* Add tests for saved query, pass filters around more places

* Fix filter passing

* Add unit test for field popover making correct queries

* Respond to review feedback

* Fix type errors

* Respond to all review comments

* Remove commented code

* Top nav should be compatible as angular directive

* Fix rendering issue with filter updates

* Respond to review comments and add onChange test

* Add specific test for the index pattern bug from Tina
2019-10-03 11:24:45 -04:00
Tiago Costa f61601cc2d
chore(NA): fix logic behind cleaning x-pack node modules on build (#47091) 2019-10-03 03:13:36 +01:00
Xavier Mouligneau d95c47f776
Add KQL functionality in the find function of the saved objects (#41136)
* Add KQL functionality in the find function of the saved objects

wip

rename variable from KQL to filter, fix unit test + add new ones

miss security pluggins

review I

fix api changes

refactor after reviewing with Rudolf

fix type

review III

review IV

for security put back allowed logic back to return empty results

remove StaticIndexPattern

review V

fix core_api_changes

fix type

* validate filter to match requirement type.attributes.key or type.savedObjectKey

* Fix types

* fix a bug + add more api integration test

* fix types in test until we create package @kbn/types

* fix type issue

* fix api integration test

* export nodeTypes from packages @kbn/es-query instead of the function buildNodeKuery

* throw 400- bad request when validation error in find

* fix type issue

* accept api change

* renove _ to represent private

* fix unit test + add doc

* add comment to explain why we removed the private
2019-10-02 18:23:44 -04:00