Commit graph

336 commits

Author SHA1 Message Date
Josh Dover 4cd2360db4
[6.x] Remove duplicate dep, x-pack/yarn.lock (#26642) (#26645)
* Remove duplicate dep, x-pack/yarn.lock (#26642)

* [npm] prepare @kbn/datemath for publishing (#26559)

We need to share `@kbn/datemath` with `@elastic/eui`, and rather than making them rely on Kibana for their dependencies we've decided to republish `@kbn/datemath` as `@elastic/datemath`. This isn't something we want to do often, so please check with the platform team if you'd like to do this for another module.
2018-12-05 08:58:05 -06:00
Leanid Shutau 3550fe0648
[I18n] Remove JSON5 dependency from kbn-i18n (#26634) (#26681) 2018-12-05 12:01:52 +03:00
dave.snider@gmail.com 3b7cd839ae
Update to EUI 5.3.0 (#26485) (#26578)
* update to EUI 5.3.0
2018-12-04 09:12:07 -08:00
Spencer e5620daba9
[6.x] [kbn/i18n] remove npm-run-all (#26297) (#26388)
Backports the following commits to 6.x:
 - [kbn/i18n] remove npm-run-all  (#26297)
2018-11-28 17:30:25 -08:00
Tiago Costa 88d0c43e3b
Watch optimizer cache invalidation (#24172) (#26319)
* chore(NA): cherry pick work from spencer on impleting the cache invalidation system and merging it with current master.

* feat(NA): add support for dlls bundle into the cache state invalidation system.

* chore(NA): merge with master.

* feat(NA): first working version for the watch cache.

* feat(NA): added logger, correct cache delete and removed last todos.

* feat(NA): remove some useless features for the time being.

* refact(NA): just pass kibanaHapiServer.log function directly instead of an anonimous function that calls the kibanaHapiServer.log one.

* refact(NA): move everything to async.

* refact(NA): remove dll mentions.

* chore(NA): removed types/mkdirp as we dont use mkdirp into typescript.
2018-11-28 05:06:31 +00:00
Søren Louv-Jansen 75aa88e970
[APM] Migrate to Typescript and refactor backend apis (#25848) (#26269) 2018-11-27 17:42:04 +01:00
Brandon Kobel 9f03dffe22
Upgrading npm-run-all to ^4.1.5 (#26200) (#26220) 2018-11-26 15:14:57 -08:00
Spencer e618cf43da
[6.x] [@kbn/interpreter] improve build/packaging (#26096) (#26136)
* [@kbn/interpreter] improve build/packaging (#26096)

Summary of changes:

 - move all build artifacts under `target` directory
 - run babel and webpack in parallel
 - support optional watch and sourcemaps in build
 - expose /common /public /plugin /server sub-exports as index.js
 - avoid importing deeply from `@kbn/interpreter`
 - move a couple missed dependencies from x-pack to kibana
 - remove custom babel-register implementation

* fix bad conflict resolution
2018-11-24 12:26:07 -07:00
Peter Pisljar 40f0b8fdf7
Ref/canvas interpreter2 oss take5 (#26068) (#26107) 2018-11-23 10:20:23 +01:00
Spencer f998a62c1d
[bootstrap] run babel-cli with --quiet (#26097) (#26105)
This updated the `kbn:boostrap` scripts in the packages to use `--quiet` when bootstrapping. This prevents babel from logging every file it builds, but still logs errors if any occur. To make things a little simpler I also used the [`npm-run-all`](https://github.com/mysticatea/npm-run-all) package in `@kbn/i18n` to execute all the builds there in parallel and pass `--quiet`/`--watch` to all builds without duplicating the tasks or making them incompatible with windows.

Before:
```
running `kbn:bootstrap` scripts

@kbn/config-schema: $ yarn build
@kbn/datemath: $ yarn build
@kbn/i18n: $ yarn build
@kbn/config-schema: $ tsc
@kbn/datemath: $ babel src --out-dir target --copy-files
@kbn/i18n: $ yarn build:web && yarn build:node && yarn build:types
@kbn/i18n: $ cross-env BABEL_ENV=web babel src --config-file ./babel.config.js --out-dir target/web --extensions ".ts,.js,.tsx"
@kbn/datemath: src/index.js -> target/index.js
@kbn/i18n: Successfully compiled 18 files with Babel.
@kbn/i18n: $ cross-env BABEL_ENV=node babel src --config-file ./babel.config.js --out-dir target/node --extensions ".ts,.js,.tsx"
@kbn/i18n: Successfully compiled 18 files with Babel.
@kbn/i18n: $ tsc --emitDeclarationOnly
@kbn/dev-utils: $ yarn build
@kbn/es-query: $ yarn build
@kbn/dev-utils: $ babel src --out-dir target
@kbn/es-query: $ babel src --out-dir target
@kbn/dev-utils: src/index.js -> target/index.js
@kbn/dev-utils: src/proc_runner/errors.js -> target/proc_runner/errors.js
@kbn/dev-utils: src/proc_runner/index.js -> target/proc_runner/index.js
@kbn/dev-utils: src/proc_runner/observe_lines.js -> target/proc_runner/observe_lines.js
@kbn/dev-utils: src/proc_runner/observe_readable.js -> target/proc_runner/observe_readable.js
@kbn/es-query: src/es_query/__tests__/_migrate_filter.js -> target/es_query/__tests__/_migrate_filter.js
@kbn/dev-utils: src/proc_runner/observe_signals.js -> target/proc_runner/observe_signals.js
@kbn/es-query: src/es_query/__tests__/build_es_query.js -> target/es_query/__tests__/build_es_query.js
@kbn/es-query: src/es_query/__tests__/decorate_query.js -> target/es_query/__tests__/decorate_query.js
@kbn/dev-utils: src/proc_runner/proc.js -> target/proc_runner/proc.js
@kbn/es-query: src/es_query/__tests__/from_filters.js -> target/es_query/__tests__/from_filters.js
@kbn/es-query: src/es_query/__tests__/from_kuery.js -> target/es_query/__tests__/from_kuery.js
@kbn/es-query: src/es_query/__tests__/from_lucene.js -> target/es_query/__tests__/from_lucene.js
@kbn/es-query: src/es_query/__tests__/lucene_string_to_dsl.js -> target/es_query/__tests__/lucene_string_to_dsl.js
@kbn/dev-utils: src/proc_runner/proc_runner.js -> target/proc_runner/proc_runner.js
@kbn/dev-utils: src/proc_runner/with_proc_runner.js -> target/proc_runner/with_proc_runner.js
@kbn/dev-utils: src/proc_runner/with_proc_runner.test.js -> target/proc_runner/with_proc_runner.test.js
@kbn/es-query: src/es_query/build_es_query.js -> target/es_query/build_es_query.js
@kbn/dev-utils: src/serializers/absolute_path_serializer.js -> target/serializers/absolute_path_serializer.js
@kbn/es-query: src/es_query/decorate_query.js -> target/es_query/decorate_query.js
@kbn/dev-utils: src/serializers/index.js -> target/serializers/index.js
@kbn/es-query: src/es_query/from_filters.js -> target/es_query/from_filters.js
@kbn/dev-utils: src/streams/concat_stream.js -> target/streams/concat_stream.js
@kbn/dev-utils: src/streams/index.js -> target/streams/index.js
@kbn/dev-utils: src/streams/promise_from_streams.js -> target/streams/promise_from_streams.js
@kbn/es-query: src/es_query/from_kuery.js -> target/es_query/from_kuery.js
@kbn/dev-utils: src/streams/reduce_stream.js -> target/streams/reduce_stream.js
@kbn/es-query: src/es_query/from_lucene.js -> target/es_query/from_lucene.js
@kbn/dev-utils: src/tooling_log/index.js -> target/tooling_log/index.js
@kbn/es-query: src/es_query/index.js -> target/es_query/index.js
@kbn/dev-utils: src/tooling_log/log_levels.js -> target/tooling_log/log_levels.js
@kbn/es-query: src/es_query/lucene_string_to_dsl.js -> target/es_query/lucene_string_to_dsl.js
@kbn/dev-utils: src/tooling_log/log_levels.test.js -> target/tooling_log/log_levels.test.js
@kbn/es-query: src/es_query/migrate_filter.js -> target/es_query/migrate_filter.js
@kbn/dev-utils: src/tooling_log/tooling_log.js -> target/tooling_log/tooling_log.js
@kbn/es-query: src/filters/__tests__/phrase.js -> target/filters/__tests__/phrase.js
@kbn/es-query: src/filters/__tests__/query.js -> target/filters/__tests__/query.js
@kbn/dev-utils: src/tooling_log/tooling_log.test.js -> target/tooling_log/tooling_log.test.js
@kbn/dev-utils: src/tooling_log/tooling_log_text_writer.js -> target/tooling_log/tooling_log_text_writer.js
@kbn/dev-utils: src/tooling_log/tooling_log_text_writer.test.js -> target/tooling_log/tooling_log_text_writer.test.js
@kbn/es-query: src/filters/__tests__/range.js -> target/filters/__tests__/range.js
@kbn/es-query: src/filters/exists.js -> target/filters/exists.js
@kbn/es-query: src/filters/index.js -> target/filters/index.js
@kbn/es-query: src/filters/phrase.js -> target/filters/phrase.js
@kbn/es-query: src/filters/phrases.js -> target/filters/phrases.js
@kbn/es-query: src/filters/query.js -> target/filters/query.js
@kbn/es-query: src/filters/range.js -> target/filters/range.js
@kbn/es-query: src/index.js -> target/index.js
@kbn/es-query: src/kuery/ast/__tests__/ast.js -> target/kuery/ast/__tests__/ast.js
@kbn/es-query: src/kuery/ast/ast.js -> target/kuery/ast/ast.js
@kbn/es-query: src/kuery/ast/index.js -> target/kuery/ast/index.js
@kbn/es-query: src/kuery/ast/kuery.js -> target/kuery/ast/kuery.js
@kbn/es-query: src/kuery/ast/legacy_kuery.js -> target/kuery/ast/legacy_kuery.js
@kbn/es-query: src/kuery/filter_migration/__tests__/exists.js -> target/kuery/filter_migration/__tests__/exists.js
@kbn/es-query: src/kuery/filter_migration/__tests__/filter_to_kuery.js -> target/kuery/filter_migration/__tests__/filter_to_kuery.js
@kbn/es-query: src/kuery/filter_migration/__tests__/geo_bounding_box.js -> target/kuery/filter_migration/__tests__/geo_bounding_box.js
@kbn/es-query: src/kuery/filter_migration/__tests__/geo_polygon.js -> target/kuery/filter_migration/__tests__/geo_polygon.js
@kbn/es-query: src/kuery/filter_migration/__tests__/phrase.js -> target/kuery/filter_migration/__tests__/phrase.js
@kbn/es-query: src/kuery/filter_migration/__tests__/range.js -> target/kuery/filter_migration/__tests__/range.js
@kbn/es-query: src/kuery/filter_migration/exists.js -> target/kuery/filter_migration/exists.js
@kbn/es-query: src/kuery/filter_migration/filter_to_kuery.js -> target/kuery/filter_migration/filter_to_kuery.js
@kbn/es-query: src/kuery/filter_migration/geo_bounding_box.js -> target/kuery/filter_migration/geo_bounding_box.js
@kbn/es-query: src/kuery/filter_migration/geo_polygon.js -> target/kuery/filter_migration/geo_polygon.js
@kbn/es-query: src/kuery/filter_migration/index.js -> target/kuery/filter_migration/index.js
@kbn/es-query: src/kuery/filter_migration/phrase.js -> target/kuery/filter_migration/phrase.js
@kbn/es-query: src/kuery/filter_migration/range.js -> target/kuery/filter_migration/range.js
@kbn/es-query: src/kuery/functions/__tests__/and.js -> target/kuery/functions/__tests__/and.js
@kbn/es-query: src/kuery/functions/__tests__/exists.js -> target/kuery/functions/__tests__/exists.js
@kbn/es-query: src/kuery/functions/__tests__/geo_bounding_box.js -> target/kuery/functions/__tests__/geo_bounding_box.js
@kbn/es-query: src/kuery/functions/__tests__/geo_polygon.js -> target/kuery/functions/__tests__/geo_polygon.js
@kbn/es-query: src/kuery/functions/__tests__/is.js -> target/kuery/functions/__tests__/is.js
@kbn/es-query: src/kuery/functions/__tests__/not.js -> target/kuery/functions/__tests__/not.js
@kbn/es-query: src/kuery/functions/__tests__/or.js -> target/kuery/functions/__tests__/or.js
@kbn/es-query: src/kuery/functions/__tests__/range.js -> target/kuery/functions/__tests__/range.js
@kbn/es-query: src/kuery/functions/__tests__/utils/get_fields.js -> target/kuery/functions/__tests__/utils/get_fields.js
@kbn/es-query: src/kuery/functions/and.js -> target/kuery/functions/and.js
@kbn/es-query: src/kuery/functions/exists.js -> target/kuery/functions/exists.js
@kbn/es-query: src/kuery/functions/geo_bounding_box.js -> target/kuery/functions/geo_bounding_box.js
@kbn/es-query: src/kuery/functions/geo_polygon.js -> target/kuery/functions/geo_polygon.js
@kbn/es-query: src/kuery/functions/index.js -> target/kuery/functions/index.js
@kbn/es-query: src/kuery/functions/is.js -> target/kuery/functions/is.js
@kbn/es-query: src/kuery/functions/not.js -> target/kuery/functions/not.js
@kbn/es-query: src/kuery/functions/or.js -> target/kuery/functions/or.js
@kbn/es-query: src/kuery/functions/range.js -> target/kuery/functions/range.js
@kbn/es-query: src/kuery/functions/utils/get_fields.js -> target/kuery/functions/utils/get_fields.js
@kbn/es-query: src/kuery/index.js -> target/kuery/index.js
@kbn/es-query: src/kuery/node_types/__tests__/function.js -> target/kuery/node_types/__tests__/function.js
@kbn/es-query: src/kuery/node_types/__tests__/literal.js -> target/kuery/node_types/__tests__/literal.js
@kbn/es-query: src/kuery/node_types/__tests__/named_arg.js -> target/kuery/node_types/__tests__/named_arg.js
@kbn/es-query: src/kuery/node_types/__tests__/wildcard.js -> target/kuery/node_types/__tests__/wildcard.js
@kbn/es-query: src/kuery/node_types/function.js -> target/kuery/node_types/function.js
@kbn/es-query: src/kuery/node_types/index.js -> target/kuery/node_types/index.js
@kbn/es-query: src/kuery/node_types/literal.js -> target/kuery/node_types/literal.js
@kbn/es-query: src/kuery/node_types/named_arg.js -> target/kuery/node_types/named_arg.js
@kbn/es-query: src/kuery/node_types/wildcard.js -> target/kuery/node_types/wildcard.js
@kbn/test: $ yarn build
@kbn/test: $ babel src --out-dir target
@kbn/test: src/es/es_test_cluster.js -> target/es/es_test_cluster.js
@kbn/test: src/es/es_test_config.js -> target/es/es_test_config.js
@kbn/test: src/es/index.js -> target/es/index.js
@kbn/test: src/functional_tests/cli/index.js -> target/functional_tests/cli/index.js
@kbn/test: src/functional_tests/cli/run_tests/args.js -> target/functional_tests/cli/run_tests/args.js
@kbn/test: src/functional_tests/cli/run_tests/args.test.js -> target/functional_tests/cli/run_tests/args.test.js
@kbn/test: src/functional_tests/cli/run_tests/cli.js -> target/functional_tests/cli/run_tests/cli.js
@kbn/test: src/functional_tests/cli/run_tests/cli.test.js -> target/functional_tests/cli/run_tests/cli.test.js
@kbn/test: src/functional_tests/cli/start_servers/args.js -> target/functional_tests/cli/start_servers/args.js
@kbn/test: src/functional_tests/cli/start_servers/args.test.js -> target/functional_tests/cli/start_servers/args.test.js
@kbn/test: src/functional_tests/cli/start_servers/cli.js -> target/functional_tests/cli/start_servers/cli.js
@kbn/test: src/functional_tests/cli/start_servers/cli.test.js -> target/functional_tests/cli/start_servers/cli.test.js
@kbn/test: src/functional_tests/lib/auth.js -> target/functional_tests/lib/auth.js
@kbn/test: src/functional_tests/lib/index.js -> target/functional_tests/lib/index.js
@kbn/test: src/functional_tests/lib/paths.js -> target/functional_tests/lib/paths.js
@kbn/test: src/functional_tests/lib/run_cli.js -> target/functional_tests/lib/run_cli.js
@kbn/test: src/functional_tests/lib/run_cli.test.js -> target/functional_tests/lib/run_cli.test.js
@kbn/test: src/functional_tests/lib/run_elasticsearch.js -> target/functional_tests/lib/run_elasticsearch.js
@kbn/test: src/functional_tests/lib/run_ftr.js -> target/functional_tests/lib/run_ftr.js
@kbn/test: src/functional_tests/lib/run_kibana_server.js -> target/functional_tests/lib/run_kibana_server.js
@kbn/test: src/functional_tests/tasks.js -> target/functional_tests/tasks.js
@kbn/test: src/functional_tests/test_helpers.js -> target/functional_tests/test_helpers.js
@kbn/test: src/index.js -> target/index.js
@kbn/test: src/kbn/index.js -> target/kbn/index.js
@kbn/test: src/kbn/kbn_test_config.js -> target/kbn/kbn_test_config.js
@kbn/test: src/kbn/users.js -> target/kbn/users.js
x-pack: $ gulp canvas:plugins:build
x-pack: [13:22:34] /Users/spalger/kbn-dev/master/kibana/x-pack/plugins/canvas/canvas_plugin
x-pack: [13:22:34] Using gulpfile ~/kbn-dev/master/kibana/x-pack/gulpfile.js
x-pack: [13:22:34] Starting 'canvas:plugins:build'...
x-pack: [13:22:50] canvas:plugins Plugins built in 15.75 seconds
x-pack: [13:22:50] Finished 'canvas:plugins:build' after 16 s
kibana: $ yarn build:types && node scripts/register_git_hook
kibana: $ tsc --p tsconfig.types.json
kibana: Registering Kibana pre-commit git hook...
kibana: success Kibana pre-commit git hook was installed successfully.
```

(this will be even worse when we merge #26095)

After:
```
running `kbn:bootstrap` scripts

@kbn/config-schema: $ yarn build
@kbn/datemath: $ yarn build --quiet
@kbn/i18n: $ run-p 'build:babel:** --quiet' build:tsc
@kbn/datemath: $ babel src --out-dir target --copy-files --quiet
@kbn/config-schema: $ tsc
@kbn/i18n: $ cross-env BABEL_ENV=node babel src --config-file ./babel.config.js --out-dir target/node --extensions ".ts,.js,.tsx" --quiet
@kbn/i18n: $ cross-env BABEL_ENV=web babel src --config-file ./babel.config.js --out-dir target/web --extensions ".ts,.js,.tsx" --quiet
@kbn/i18n: $ tsc --emitDeclarationOnly
@kbn/i18n: Successfully compiled 18 files with Babel.
@kbn/i18n: Successfully compiled 18 files with Babel.
@kbn/dev-utils: $ yarn build --quiet
@kbn/es-query: $ yarn build --quiet
@kbn/dev-utils: $ babel src --out-dir target --quiet
@kbn/es-query: $ babel src --out-dir target --quiet
@kbn/test: $ yarn build --quiet
@kbn/test: $ babel src --out-dir target --quiet
x-pack: $ gulp canvas:plugins:build
x-pack: [13:16:56] /Users/spalger/kbn-dev/master/kibana/x-pack/plugins/canvas/canvas_plugin
x-pack: [13:16:56] Using gulpfile ~/kbn-dev/master/kibana/x-pack/gulpfile.js
x-pack: [13:16:56] Starting 'canvas:plugins:build'...
x-pack: [13:17:11] canvas:plugins Plugins built in 13.98 seconds
x-pack: [13:17:11] Finished 'canvas:plugins:build' after 14 s
kibana: $ yarn build:types && node scripts/register_git_hook
kibana: $ tsc --p tsconfig.types.json
kibana: Registering Kibana pre-commit git hook...
kibana: success Kibana pre-commit git hook was installed successfully.
```
2018-11-22 22:07:58 -08:00
Joe Fleming 1edb9a9bc8 Feat: Support url params (#25828)
Closes https://github.com/elastic/kibana/issues/23046

Switch to a hash history manager that supports pushState and replaceState. This makes the "basepath" part of the hash's concern, so anything before the hash no longer matters. This also allows undoing a bunch of hacky fixes.

This also allows the `urlparam` function to work again! ヽ(;▽;)ノ

![screenshot 2018-11-16 12 51 14 1](https://user-images.githubusercontent.com/404731/48645245-508a1300-e9a2-11e8-8959-1ede474b78dd.jpg)
2018-11-19 12:41:53 -07:00
Leanid Shutau afbc1cece4
[I18n] Inject Intl Polyfill to PhantomJS (#25465) (#25789)
* [I18n] Inject Intl Polyfill to PhantomJS

* Refactor injection code

* Move intl to "dependencies"

* Move 'intl' to the root 'package.json'

* Fix polyfills paths

* Move intl to x-pack package.json
2018-11-16 15:10:51 +03:00
Tiago Costa 4b31c9bbda
Remove husky (#24887) (#25693)
* feat(NA): remove husky dependency and implement a git hooks registering mechanism.

* fix(NA): apply executable chmod to the created kbn git hook script.

* fix(NA): run npm script on the git pre commit hook silently.

* refact(NA): apply changes according the PR review.

* refact(NA): apply changes according PR review.
2018-11-15 03:51:10 +00:00
Josh Dover fb89ffbc68
[6.x] [kbn-pm] Use yarn workspaces for dependencies (#24095) (#25549)
* [kbn-pm] Use yarn workspaces for dependencies (#24095)

* Bumped leadfoot to 1.7.5 now that it issue has been merged. (#17582)

* Copy license to build
2018-11-12 17:21:42 -06:00
Brandon Kobel f3e0f74283
Upgrading grunt-contrib-watch (#22818) (#25435) 2018-11-08 17:04:16 -08:00
nicknak 29e37f01fd
Auto open browser on server startup (#24843) (#25390)
* Adds dev dependency on opn for opening browsers and other things.

* Adds a --open option to cli to open browser window.

* Removes unused variable in index.

* Adds opn types to dev dependencies from definitely typed.

* Adds open to the cliArgs type to allow for consistency.

* Updates snapshots that require valid cliArgs types.

* Moves opn to direct dependency since its used in cli.

* [cli] move --open handling to cluster manager

* Adds support for running --open with --no-base-path
2018-11-08 16:00:02 -05:00
Chandler Prall 0f56480e11
Update EUI to v5.0.0 (#25316) (#25408)
* update EUI to v5.0.0

* update snapshots

* revert snapshot change

* revert snapshot change (2)
2018-11-08 12:54:52 -07:00
Tyler Smalley 5691b6952e
[build] Uses node-archive to zip/tar packages (#25335) (#25356)
Started digging into an issue where compressing library didn't include empty
directories, which tar/zip should. After investigating the issue I feel it's
best to use a more established project.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-11-07 18:26:26 -08:00
Brandon Kobel 6ef31d3531
Updating request to ^2.88 (#25236) (#25304) 2018-11-07 10:25:34 -08:00
Joe Fleming 0999ebf273 Fix: socket setup (#24550)
PR fixes issues with the socket connection.

- handle socket failures 
  - previously would either leave Canvas in an infinite loading state, or load the app even when it wouldn't function
- upgrade socket.io
- add headers to socket connection and modify auth connection
2018-11-02 10:39:36 -07:00
Brandon Kobel bae635f7cb
Upgrading deep-extend to 0.6.0 (#22817) (#24947)
* Upgrading deep-extend to 0.6.0

* Upgrading deep-extend again
2018-11-02 06:20:08 -07:00
Brandon Kobel 84dfa9b21f
Reverting 22816, upgrading mocha is breaking the custom reporter (#24951) (#24956) 2018-11-01 14:37:51 -07:00
Bhavya RM be0f898c58 backport of Adding jsxa11y into eslint rules #23932 2018-11-01 13:32:41 -04:00
Tyler Smalley fc213d9304
Allows build to be ran on Windows (#24374) (#24885)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-10-31 09:49:43 -07:00
Brandon Kobel c3656ce91f
[6.x] Reporting Cookies #24752 (#24792)
* Revert "Reporting cookies (#24177) (#24222)"

This reverts commit 95997528c7.

* Take 2

* Fixing session test
2018-10-30 11:38:40 -07:00
Spencer ecc24b27f8
[dev/build] scan node_modules rather than lots of deleteAll() calls (#24692) (#24774) 2018-10-29 18:18:05 -07:00
Spencer 2cffddc237
[6.x] [yarn] bump elasticsearch-js and makelogs (#24767) (#24771)
Backports the following to 6.x:

  [yarn] bump elasticsearch-js and makelogs (#24767)
2018-10-29 18:16:15 -07: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
Catherine Liu ebc404c9b5 Upgrades Tinymath (#24457)
* Bumped tinymath to v1.0.0

* Bumped tinymath version to 1.1.0
2018-10-26 10:05:07 -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 30d69b365b
[Rollups] Rollup support in Kibana, phase 1 (#21117) (#24554)
Enabled:
- View/Manage/Create rollup jobs

Disabled:
- Create a rollup index pattern
- Create rollup visualizations
- Add rollup visualizations to dashboards
- View raw rollup documents in Discover
2018-10-24 20:29:30 -07:00
liza-mae 69bfccd4f5
Upgrade husky (#24432) (#24452)
* Upgrade husky

* Add yarn.lock
2018-10-24 09:11:44 -06:00
Søren Louv-Jansen ab47cae457
[APM] Distributed Tracing (#24062) (#24487)
* Adds traces overview with mock data (#22628)
* Updates service overview snapshots
* Adds tests for ManagedTable and ImpactBar
* Refactored transaction overview to use new managed table component
* Removed jsconfig file in apm
* [APM] Distributed tracing - Trace details (waterfall) (#22763)
* [APM] Add typescript to waterfall (#23635)
* [APM] Migrate get_trace and constants to Typescript (#23634)
* [APM] Add types for setup_request (#23762)
* [APM] Adds trace overview queries and some refactoring (#23605)
* ImpactBar component to align EuiProgress usage for impact bars
* Sharing some logic between transaction and trace queries
* Typescript support
* Quick fix ‘banana’
* [APM] Ensure backwards compatibility for v1 and v2 (#23636)
* Make interfaces versioned
* Rename eventType to docType
* Fixes trace links on traces overview (#24089)
* [APM] use react-redux-request (#24117)
* Updated yarn lockfile for new yarn version
* Updated dependency issues for react-router-dom types
* [APM] Display transaction info on span flyout (#24189)
* [APM] Display transaction info on span flyout
* Brings in real location and url param data for transaction flyout
* Converts flyout to TS
* Adds query param state for flyouts with ts support
* Updates styles and uses EuiTabs for transaction flyout
* [APM] Transaction flyout
* [APM] Minor docs cleanup (#24325)
* [APM] Minor docs cleanup
* [APM] Fix issues with v1 spans (#24332)
* [APM] Add agent marks (#24361)
* [APM] Typescript migration for the transaction endpoints (#24397)
* [APM] DT transaction sample header (#24294)

Transaction sample header completed
* Fixes link target for traces overview to include trans/trace ids as query params
* Converts Transaction index file to TS
* Adds trace link to sample section
* Refactors the trace link and applies it to two usages
* Implements transaction sample action context menu
* Calculates and implements duration percentage
* Re-typed how transaction groups work
* Fixes transaction flyout links and context menu
* Removes unnecessary ms multiplication
* Removes unused commented code
* Finalizes infra links
* Fixes some type shenanigans
2018-10-24 16:45:50 +02:00
Brandon Kobel ca8788fef8
Upgrading mocha to 5.2.0 and gulp-mocha to 6.0.0 (#22816) (#24335)
* Upgrading mocha to 5.2.0 and gulp-mocha to 6.0.0

* Fixing x-pack yarn.lock

* Switching x-pack to ^5.2.0

* Fixing yarn.lock
2018-10-23 17:11:46 -07:00
dave.snider@gmail.com 5a12e9240e
update eui to 4.5.1 (#24218) (#24315)
* update eui to 4.5.1

* icons declared for logging / infra

* remove eui types that are now in EUI directly

* clean up duplicated EUI typescript definitions

* Fix EuiSelect usage in beats enrollment
2018-10-19 22:43:50 -07:00
Brandon Kobel 95997528c7
Reporting cookies (#24177) (#24222)
* Switching Reporting to use session cookies explicitly

* Fixing bug when security is explicitly disabled

* Responding to feedback

* Fixing yarn.lock
2018-10-18 16:15:52 -07:00
Matt Apperson d8f65387af
Beats Management (#23819) (#24185)
* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Rename "determine" to "find"

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Updating ES archive

* Renaming

* Use destructuring

* Moving start of script to own line to increase readability

* Using destructuring

* [Beats Management] APIs: Remove tag(s) from beat(s) (#19440)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Renaming

* Use destructuring

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Implementing `POST /api/beats/agents_tags/removals` API

* Updating ES archive

* Use destructuring

* Moving start of script to own line to increase readability

* Nothing to remove if there are no existing tags!

* Updating tests to match changes in bulk update painless script

* Use destructuring

* [Beats Management] Move to Ingest UI arch and initial TS effort (#20039)

* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Rename "determine" to "find"

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Updating ES archive

* Renaming

* Use destructuring

* Moving start of script to own line to increase readability

* Using destructuring

* [Beats Management] APIs: Remove tag(s) from beat(s) (#19440)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Renaming

* Use destructuring

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Implementing `POST /api/beats/agents_tags/removals` API

* Updating ES archive

* Use destructuring

* Moving start of script to own line to increase readability

* Nothing to remove if there are no existing tags!

* Updating tests to match changes in bulk update painless script

* Use destructuring

* Ported over base types and arch structure

* move management of installIndexTemplate into the framework adapter

* ts-lint fix

* tslint fixes

* more ts tweaks

* fix paths

* added several working endpoints

* add more routes and bug fixes

* fix linting

* fix type remove CRUFT

* remove more cruft

* remove more CRUFT

* added comments, change plurality

* add tsconfig file

* add extends path

* fixed typo

* serveral PR review fixes

* fixed lodash type version

* “fix” types by applying a lot of any

* [Beats Management] Move tokens to use JWT, add more complete test suite (#20317)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* fix broken test, this is beats CM not logstash 😊

* added readme

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* [Beats Management] add more tests, update types, break out ES into it's own adapter (#20566)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* Add initial efforts for backend framework adapter testing

* move ES code to a DatabaseAdapter from BackendAdapter and add a TON of types for ES

* re-typed

* renamed types to match pattern

* aditional renames

* adapter tests should always just use adapterSetup();

* database now uses InternalRequest

* corrected spelling of framework

* fix typings

* remove CRUFT

* RequestOrInternal

* Dont pass around request objects everywhere, just pass the user. Also, removed hapi types as they were not compatible

* fix tests, add test, removed extra comment

* fix auth

* updated lock file

* [Beats Management] add get beat endpoint (#20603)

* [Beats Management] Move tokens to use JWT, add more complete test suite (#20317)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* fix broken test, this is beats CM not logstash 😊

* added readme

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* Add initial efforts for backend framework adapter testing

* move ES code to a DatabaseAdapter from BackendAdapter and add a TON of types for ES

* re-typed

* renamed types to match pattern

* aditional renames

* adapter tests should always just use adapterSetup();

* database now uses InternalRequest

* corrected spelling of framework

* fix typings

* remove CRUFT

* RequestOrInternal

* Dont pass around request objects everywhere, just pass the user. Also, removed hapi types as they were not compatible

* fix tests, add test, removed extra comment

* Moved critical path code from route, to more easeley tested domain

* fix auth

* remove beat verification, added get beat endpoint to return configs

* fix type

* update createGetBeatConfigurationRoute URL

* rename method

* update to match PR #20566

* updated lock file

* fix bad merge

* update TSLinting

* fix bad rebase

* [Beats Management] [WIP] Create public resources for management plugin (#20864)

* Init plugin public resources.

* rename beats to beats_management

* rendering react now

* Beats/initial ui (#20994)

* initial layout and main nav

* modal UI and pattern for UI established

* fix path

* wire up in-memroy adapters

* tweak adapters

* add getAll method to tags adapter (#21287)

* Beats/real adapters (#21481)

* add initial real adapters, and nulled data where we need endpoints

* UI adapters and needed endpoints added (though not tested)

* prep for route tests and some cleanup

* move files

* [Beats Management] Add BeatsTable/Bulk Action Search Component (#21182)

* Add BeatsTable and control bar components.

* Clean yarn.lock.

* Move raw numbers/strings to constants. Remove obsolete state/props.

* Update/add tests.

* Change prop name from "items" to "beats".

* Rename some variables.

* Move search bar filter definitions to table render.

* Update table to support assignment options.

* Update action control position.

* Refactor split render function into custom components.

* Beats/basic use cases (#21660)

* tweak adapter responses / types. re-add enroll ui

* routes enabled, enroll now pings the server

* full enrollment path now working

* improved pinging for beat enrollment

* fix location of history call

* reload beats list on beat enrollment completion

* [Beats Management] Add Tags List (#21274)

* Add BeatsTable and control bar components.

* Clean yarn.lock.

* Move raw numbers/strings to constants. Remove obsolete state/props.

* Update/add tests.

* Change prop name from "items" to "beats".

* Add TagsTable component and associated search/action bar.

* Rename some variables.

* Add constant after forgetting to save file.

* Fix design mistake in table component.

* Disable delete button when no tags selected.

* Export tags table from index.ts.

* Move search bar filter definitions to table render.

* Update table to support assignment options.

* Update action control position.

* Refactor split render function into custom components.

* Add assignment options to Tags List.

* Remove obsolete code.

* Move tooltips for tag icons to top position.

* Beats/update (#21702)

* [ML] Fixing issue with historical job audit messages (#21718)

* Add proper aria-label for close inspector (#21719)

* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Rename "determine" to "find"

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Updating ES archive

* Renaming

* Use destructuring

* Moving start of script to own line to increase readability

* Using destructuring

* [Beats Management] APIs: Remove tag(s) from beat(s) (#19440)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Renaming

* Use destructuring

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Implementing `POST /api/beats/agents_tags/removals` API

* Updating ES archive

* Use destructuring

* Moving start of script to own line to increase readability

* Nothing to remove if there are no existing tags!

* Updating tests to match changes in bulk update painless script

* Use destructuring

* [Beats Management] Move to Ingest UI arch and initial TS effort (#20039)

* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Rename "determine" to "find"

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Updating ES archive

* Renaming

* Use destructuring

* Moving start of script to own line to increase readability

* Using destructuring

* [Beats Management] APIs: Remove tag(s) from beat(s) (#19440)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Renaming

* Use destructuring

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Implementing `POST /api/beats/agents_tags/removals` API

* Updating ES archive

* Use destructuring

* Moving start of script to own line to increase readability

* Nothing to remove if there are no existing tags!

* Updating tests to match changes in bulk update painless script

* Use destructuring

* Ported over base types and arch structure

* move management of installIndexTemplate into the framework adapter

* ts-lint fix

* tslint fixes

* more ts tweaks

* fix paths

* added several working endpoints

* add more routes and bug fixes

* fix linting

* fix type remove CRUFT

* remove more cruft

* remove more CRUFT

* added comments, change plurality

* add tsconfig file

* add extends path

* fixed typo

* serveral PR review fixes

* fixed lodash type version

* “fix” types by applying a lot of any

* [Beats Management] Move tokens to use JWT, add more complete test suite (#20317)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* fix broken test, this is beats CM not logstash 😊

* added readme

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* [Beats Management] add more tests, update types, break out ES into it's own adapter (#20566)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* Add initial efforts for backend framework adapter testing

* move ES code to a DatabaseAdapter from BackendAdapter and add a TON of types for ES

* re-typed

* renamed types to match pattern

* aditional renames

* adapter tests should always just use adapterSetup();

* database now uses InternalRequest

* corrected spelling of framework

* fix typings

* remove CRUFT

* RequestOrInternal

* Dont pass around request objects everywhere, just pass the user. Also, removed hapi types as they were not compatible

* fix tests, add test, removed extra comment

* fix auth

* updated lock file

* [Beats Management] add get beat endpoint (#20603)

* [Beats Management] Move tokens to use JWT, add more complete test suite (#20317)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* fix broken test, this is beats CM not logstash 😊

* added readme

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* Add initial efforts for backend framework adapter testing

* move ES code to a DatabaseAdapter from BackendAdapter and add a TON of types for ES

* re-typed

* renamed types to match pattern

* aditional renames

* adapter tests should always just use adapterSetup();

* database now uses InternalRequest

* corrected spelling of framework

* fix typings

* remove CRUFT

* RequestOrInternal

* Dont pass around request objects everywhere, just pass the user. Also, removed hapi types as they were not compatible

* fix tests, add test, removed extra comment

* Moved critical path code from route, to more easeley tested domain

* fix auth

* remove beat verification, added get beat endpoint to return configs

* fix type

* update createGetBeatConfigurationRoute URL

* rename method

* update to match PR #20566

* updated lock file

* fix bad merge

* update TSLinting

* fix bad rebase

* [Beats Management] [WIP] Create public resources for management plugin (#20864)

* Init plugin public resources.

* rename beats to beats_management

* rendering react now

* Beats/initial ui (#20994)

* initial layout and main nav

* modal UI and pattern for UI established

* fix path

* wire up in-memroy adapters

* tweak adapters

* add getAll method to tags adapter (#21287)

* Beats/real adapters (#21481)

* add initial real adapters, and nulled data where we need endpoints

* UI adapters and needed endpoints added (though not tested)

* prep for route tests and some cleanup

* move files

* [Beats Management] Add BeatsTable/Bulk Action Search Component (#21182)

* Add BeatsTable and control bar components.

* Clean yarn.lock.

* Move raw numbers/strings to constants. Remove obsolete state/props.

* Update/add tests.

* Change prop name from "items" to "beats".

* Rename some variables.

* Move search bar filter definitions to table render.

* Update table to support assignment options.

* Update action control position.

* Refactor split render function into custom components.

* Beats/basic use cases (#21660)

* tweak adapter responses / types. re-add enroll ui

* routes enabled, enroll now pings the server

* full enrollment path now working

* improved pinging for beat enrollment

* fix location of history call

* reload beats list on beat enrollment completion

* add update on client side, expand update on server to allow for partial data, and user auth

* remove double beat lookup

* fix tests

* only return active beats

* disenroll now working

* fig getAll query

* re-enrolling a beat will now work

* fix types

* fix types

* update deps

* update kibana API for version

* [Beats CM] Manage Tags (#21776)

* [ML] Fixing issue with historical job audit messages (#21718)

* Add proper aria-label for close inspector (#21719)

* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Rename "determine" to "find"

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Updating ES archive

* Renaming

* Use destructuring

* Moving start of script to own line to increase readability

* Using destructuring

* [Beats Management] APIs: Remove tag(s) from beat(s) (#19440)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Renaming

* Use destructuring

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Implementing `POST /api/beats/agents_tags/removals` API

* Updating ES archive

* Use destructuring

* Moving start of script to own line to increase readability

* Nothing to remove if there are no existing tags!

* Updating tests to match changes in bulk update painless script

* Use destructuring

* [Beats Management] Move to Ingest UI arch and initial TS effort (#20039)

* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Rename "determine" to "find"

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Updating ES archive

* Renaming

* Use destructuring

* Moving start of script to own line to increase readability

* Using destructuring

* [Beats Management] APIs: Remove tag(s) from beat(s) (#19440)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* Starting to implement POST /api/beats/beats_tags API

* Changing API

* Updating tests for changes to API

* Renaming

* Use destructuring

* Using crypto.timingSafeEqual() for comparing auth tokens

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Implementing `POST /api/beats/agents_tags/removals` API

* Updating ES archive

* Use destructuring

* Moving start of script to own line to increase readability

* Nothing to remove if there are no existing tags!

* Updating tests to match changes in bulk update painless script

* Use destructuring

* Ported over base types and arch structure

* move management of installIndexTemplate into the framework adapter

* ts-lint fix

* tslint fixes

* more ts tweaks

* fix paths

* added several working endpoints

* add more routes and bug fixes

* fix linting

* fix type remove CRUFT

* remove more cruft

* remove more CRUFT

* added comments, change plurality

* add tsconfig file

* add extends path

* fixed typo

* serveral PR review fixes

* fixed lodash type version

* “fix” types by applying a lot of any

* [Beats Management] Move tokens to use JWT, add more complete test suite (#20317)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* fix broken test, this is beats CM not logstash 😊

* added readme

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* [Beats Management] add more tests, update types, break out ES into it's own adapter (#20566)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* Add initial efforts for backend framework adapter testing

* move ES code to a DatabaseAdapter from BackendAdapter and add a TON of types for ES

* re-typed

* renamed types to match pattern

* aditional renames

* adapter tests should always just use adapterSetup();

* database now uses InternalRequest

* corrected spelling of framework

* fix typings

* remove CRUFT

* RequestOrInternal

* Dont pass around request objects everywhere, just pass the user. Also, removed hapi types as they were not compatible

* fix tests, add test, removed extra comment

* fix auth

* updated lock file

* [Beats Management] add get beat endpoint (#20603)

* [Beats Management] Move tokens to use JWT, add more complete test suite (#20317)

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* fix broken test, this is beats CM not logstash 😊

* added readme

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* inital effort to move to JWT and added jest based tests on libs

* assign beats tests all passing

* token tests now pass

* add more tests

* all tests now green

* move enrollment token back to a hash

* remove un-needed comment

* alias lodash get to avoid confusion

* isolated hash creation

* Add initial efforts for backend framework adapter testing

* move ES code to a DatabaseAdapter from BackendAdapter and add a TON of types for ES

* re-typed

* renamed types to match pattern

* aditional renames

* adapter tests should always just use adapterSetup();

* database now uses InternalRequest

* corrected spelling of framework

* fix typings

* remove CRUFT

* RequestOrInternal

* Dont pass around request objects everywhere, just pass the user. Also, removed hapi types as they were not compatible

* fix tests, add test, removed extra comment

* Moved critical path code from route, to more easeley tested domain

* fix auth

* remove beat verification, added get beat endpoint to return configs

* fix type

* update createGetBeatConfigurationRoute URL

* rename method

* update to match PR #20566

* updated lock file

* fix bad merge

* update TSLinting

* fix bad rebase

* [Beats Management] [WIP] Create public resources for management plugin (#20864)

* Init plugin public resources.

* rename beats to beats_management

* rendering react now

* Beats/initial ui (#20994)

* initial layout and main nav

* modal UI and pattern for UI established

* fix path

* wire up in-memroy adapters

* tweak adapters

* add getAll method to tags adapter (#21287)

* Beats/real adapters (#21481)

* add initial real adapters, and nulled data where we need endpoints

* UI adapters and needed endpoints added (though not tested)

* prep for route tests and some cleanup

* move files

* [Beats Management] Add BeatsTable/Bulk Action Search Component (#21182)

* Add BeatsTable and control bar components.

* Clean yarn.lock.

* Move raw numbers/strings to constants. Remove obsolete state/props.

* Update/add tests.

* Change prop name from "items" to "beats".

* Rename some variables.

* Move search bar filter definitions to table render.

* Update table to support assignment options.

* Update action control position.

* Refactor split render function into custom components.

* Beats/basic use cases (#21660)

* tweak adapter responses / types. re-add enroll ui

* routes enabled, enroll now pings the server

* full enrollment path now working

* improved pinging for beat enrollment

* fix location of history call

* reload beats list on beat enrollment completion

* add update on client side, expand update on server to allow for partial data, and user auth

* remove double beat lookup

* fix tests

* only return active beats

* disenroll now working

* fig getAll query

* re-enrolling a beat will now work

* fix types

* Add create tags view.

* fix types

* update deps

* update kibana API for version

* Added component/config interface for editing/creating tags. Added separate pages for create/edit tags.

* Fixup.

* Beats/beat tags workflow (#21923)

* [Beats Management] Move to Ingest UI arch and initial TS effort (#20039)

* [Beats Management] Initial scaffolding for plugin (#18977)

* Initial scaffolding for Beats plugin

* Removing bits not (yet) necessary in initial scaffolding

* [Beats Management] Install Beats index template on plugin init (#19072)

* Install Beats index template on plugin init

* Adding missing files

* [Beats Management] APIs: Create enrollment tokens (#19018)

* WIP checkin

* Register API routes

* Fixing typo in index name

* Adding TODOs

* Removing commented out license checking code that isn't yet implemented

* Remove unnecessary async/await

* Don't return until indices have been refreshed

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Adding TODO

* Fixing variable name

* Using a single index

* Adding expiration date field

* Adding test for expiration date field

* Ignore non-existent index

* Fixing logic in test

* Creating constant for default enrollment tokens TTL value

* Updating test

* Fixing name of test file (#19100)

* [Beats Management] APIs: Enroll beat (#19056)

* WIP checkin

* Add API integration test

* Converting to Jest test

* Create API for enrolling a beat

* Handle invalid or expired enrollment tokens

* Use create instead of index to prevent same beat from being enrolled twice

* Adding unit test for duplicate beat enrollment

* Do not persist enrollment token with beat once token has been checked and used

* Fix datatype of host_ip field

* Make Kibana API guess host IP instead of requiring it in payload

* Fixing error introduced in rebase conflict resolution

* [Beats Management] APIs: List beats (#19086)

* WIP checkin

* Add API integration test

* Converting to Jest test

* WIP checkin

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Updating mapping

* [Beats Management] APIs: Verify beats (#19103)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Fleshing out remaining tests

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Moving TODO comment to right file

* Rename determine* helper functions to find*

* Fixing assertions (#19194)

* [Beats Management] APIs: Update beat (#19148)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Add API tests

* Update template to allow version field for beat

* Implement PUT /api/beats/agent/{beat ID} API

* Make enroll beat code consistent with update beat code

* Fixing minor typo in TODO comment

* Allow version in request payload

* Make sure beat is not updated in ES in error scenarios

* Adding version as required field in Enroll Beat API payload

* Using destructuring

* Fixing rename that was accidentally reversed in conflict fixing

* [Beats Management] APIs: take auth tokens via headers (#19210)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Make "Enroll Beat" API take enrollment token via header instead of request body

* Make "Update Beat" API take access token via header instead of request body

* [Beats Management] APIs: Create configuration block (#19270)

* WIP checkin

* WIP checkin

* Add API integration test

* Converting to Jest test

* Fixing API for default case + adding test for it

* Fixing copy pasta typos

* Fixing variable name

* Using a single index

* Implementing GET /api/beats/agents API

* Creating POST /api/beats/agents/verify API

* Refactoring: extracting out helper functions

* Expanding TODO note so I won't forget :)

* Fixing file name

* Updating mapping

* Fixing minor typo in TODO comment

* Implementing POST /api/beats/configuration_blocks API

* Removing unnecessary escaping

* Fleshing out types + adding validation for them

* Making output singular (was outputs)

* Removing metricbeat.inputs

* Revert implementation of `POST /api/beats/configuration_blocks` API (#19340)

This API allowed the user to operate at a level of abstraction that is unnecessarily and dangerously too low. A better API would be at one level higher, where users can create, update, and delete tags (where a tag can contain multiple configuration blocks).

* [Beats Management] APIs: Create or update tag (#19342)

* Updating mappings

* Implementing PUT /api/beats/tag/{tag} API

* [Beats Management] Prevent timing attacks when checking auth tokens (#19363)

* Using crypto.timingSafeEqual() for comparing auth tokens

* Prevent subtler timing attack in token comparison function

* Introduce random delay after we try to find token in ES to mitigate timing attack

* Remove random delay

* [Beats Management] APIs: Assign tag(s) to beat(s) (#19431…
2018-10-18 08:51:36 -04:00
Jonathan Budzenski c7d5d292f3
Bump chromedriver to 2.42.1 (#23648) 2018-10-17 18:20:39 -05:00
Felix Stürmer db8b86538a
[Infra UI] Merge InfraOps feature branch (#24068) (#24127) 2018-10-17 17:36:45 +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
Catherine Liu 2f7797b7b1
Moved squel from devDependencies to dependencies (#23849) (#24025) 2018-10-15 12:18:17 -04:00
dave.snider@gmail.com cb4dd5569f
Eui 4.4.1 (#23790) (#23835)
Updates EUI to 4.4.1 and includes some minor homepage changes around icons.
2018-10-04 14:18:12 -07: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 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
Josh Dover 78b2159f33
[6.x] Add jenkins:report task for test failures (#22682) (#23659)
* Add jenkins:report task for test failures (#22682)

* Add jenkins:report task

* PR comments

* Handle different junit XML formats (#23617)
2018-10-01 14:52:48 -05: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
Nathan Reese 4a48cd8598
Migrate report listing management to react and EUI (#22928) (#23589)
* EUIify report management page

* wire ReportListing component together

* fetch jobs and display content in EuiPage

* display jobs in table

* add title and remove page size dropdown

* format date and display date in status column

* add poller

* add download button

* report error button

* remove old reporting table

* fix page styling

* create type for job

* remove job queue service

* remove angular-paging dependency from x-pack

* make download lib, update job notification hack to use jobQueueClient

* fix some more typescript stuff

* remove last angular service

* make report object type subdued color and small text

* update import in canvas

* stricter typing

* fix stuff lost in branch merge

* add return types to JobQueueClient

* wrap javascript code in {} in JSX
2018-09-27 17:09:04 -06:00
Walter Rafelsberger 1e0f9d005f
[ML] Fixes Anomaly Explorer IE11 issues (#23558) (#23576)
Fixes two issues in IE11 for Anomaly Explorer:
- The format of the string returned from element.attr('transform') is different in IE11 so the regex based on it would fail. This fixes the issue and adds tests for the different formats. The code was also changed to gracefully return NaN in case the regex wouldn't return results, the previous version triggered a JS error.
- The migration of the swimlanes to React caused the cell selection to malfunction in IE11. This fixes it by updating the dragSelect library to use the new method setSelectables. The previous method we used (addSelectables) didn't play well with how React rerenders the swimlanes. Note this lib update using the new method will require to run yarn kbn bootstrap.
2018-09-27 21:11:39 +02: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
Joe Fleming fd4eb61165 chore: use cheerio in i18n.html.getDirectiveMessages (#23342)
this was only using jsdom to parse html, but cheerio allows parsing html without requiring a dom. cheerio was also already in the dependency list.
2018-09-20 09:26:32 -07:00
Jonathan Budzenski 7d18efcfb6
Bump geckodriver to 1.12.2 (#21799) 2018-09-18 13:30:28 -05:00
Chris Davies c67791803f
[6.x] Add saved object index migrations (#20243) (#23262) 2018-09-18 09:46:58 -04:00
Jonathan Budzenski 8d5835d477
bump elasticsearch (#21786) 2018-09-17 11:48:58 -05:00
Joe Fleming 1346d1aeda
[6.x] Chore: canvas in xpack 6x (#22695) (#23201)
* chore: merge canavs into x-pack

squashed, since 6.x history isn't important and i want to be able to rebase...

* chore: eslint fixes in canvas

adds license headers and includes project linting overrides

* Chore: Reorg the x-pack gulp tasks (#22785)

- Removes deprecated, non-functional lint scripts
- Removes some unused (and barely used) dependencies
- Replaces deprecated `gulp-util` dependency
- Adds eslint rule to prevent future use of deprecated `gulp-util` dependency
- Moves all gulp tasks into `tasks` path
- Moves `gulp_helpers` into `tasks/helpers`
- All tasks in `gulpfile.js` were moved into `tasks` and broken up by domain

This is basically a no-op moving files around PR. All the existing tasks appear to work the same with these changes.

<img width="334" alt="screenshot 2018-09-06 15 42 45" src="https://user-images.githubusercontent.com/404731/45188971-8618c000-b1eb-11e8-9b26-b072ccc7ddb7.png">

* chore: rename files to match rules

* chore: copy canvas dependencies

* chore: reduce package.json to essentials

* chore: make canvas work in xpack

* chore: make browser tests work

* chore: fix include paths

node_modules is in a different relative path

* chore: fix ml tests with canvas code in x-pack

explicitely enable state management so the mlStateFactory tests pass

* chore: fix RBAC tests with canvas

* chore: split up the xpack prepare scripts

* chore: canvas tasks - dev, peg, and plugins

get dev, peg, and plugin building tasks working

* chore: canvas tasks - local tests

* chore: additional file cleanup

* chore: yarn lockfiles and eslint fixes

license headers and some small formatting stuff
2018-09-14 16:26:56 -07:00
dave.snider@gmail.com 9846e026b4
[6.x] Backport EUI@4.0.1 #23009 (#23203) 2018-09-14 14:10:43 -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
Nathan Reese eadf7e847b
backport (#22949) 2018-09-11 17:07:48 -06:00
Spencer 674d65bb58
Upgrade to TypeScript 3 (#22792) (#22927)
LGTM 🎉 🎉 🎉
2018-09-11 14:14:17 -07:00
Stacey Gammon 753cfad195
Typings for chromium driver (#22688) (#22839)
* Typings for chromium driver

* buffer => base64

* remove unused param. consolidate imports
2018-09-08 08:05:54 -04: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
Aleh Zasypkin b0767168af
[6.x] Implement LegacyService. Use core to start legacy Kibana. (#22769)
* Implement `LegacyService`. Use `core` to start legacy Kibana.

* Fix Worker tests

* Do not rely on kbnServer when testing mixins.
2018-09-07 07:56:43 +03:00
Chris Davies 18ca9014e4
Merge puppeteer into 6.x (#22533) 2018-08-30 11:48:10 -04:00
Felix Stürmer 3b2823d433
Update redux, react-redux and corresponding types (#22442) (#22487) 2018-08-29 18:59:39 +02: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
Larry Gregory df453a6383
Bump EUI to 3.7.0 (#22287) (#22392)
Upgrades EUI from 3.6.1 => 3.7.0
2018-08-25 11:02:13 -04:00
Leanid Shutau c6309b91e8
Add ability to skip file writing for messages extraction tool (#21588) (#22247)
* Add ability to skip 'en.json' file writing for default messages extraction tool

* Update default messages extractor

* Add namespace validation

* Update tests

* Fix i18n config file

* Add ability to choose output JSON format

* Update output json properties keys
2018-08-22 16:48:15 +03:00
dave.snider@gmail.com a3d1b83d98
EUI 3.6.1 (#22034) (#22038) 2018-08-15 18:58:16 -07:00
Nathan Reese 182cf2fd7f
Eui 3.6.0 (#21968) (#22019)
* bump EUI to 3.6.0

* replace CopyButton with EuiCopy

* remove snapshot file from deleted CopyButton component
2018-08-15 15:35:44 -06:00
Jonathan Budzenski 225ee1ff49
Bump chromedriver to 2.41.0 (#21798) 2018-08-15 13:32:13 -05:00
Jen Huang f48d6c8618
Upgrade to EUI 3.4.0 (#21870) (#21964)
* Upgrade to EUI 3.4.0
* Update snapshots
2018-08-15 10:43:53 -07:00
Jonathan Budzenski e5d110cc55
[build] more cleaning (#21746) (#21934)
* [build] remove npm

* remove angular-ui-bootstrap

* fix

* remove bodyParser, fetch mock to dev

* remove more packages

* remove check-hash;

* remove babel-eslint

* remove marked-text-renderer

* move fetch-mock to dev dependencies

* Revert "remove babel-eslint"

This reverts commit 37d3df9146cdab24661022b9edf4aa2fd3b14e30.

* fix npm path

* fix again

* remove entire node_modules dir

* CleanNodeTask -> CleanNodeBuildsTask

* move to node folder

* remove more
2018-08-13 14:18:19 -05:00
Tyler Smalley db6e384cfa
[scss] Adds autoprefixer support and improves watcher (#21656) (#21897)
This adds support for autoprefixer which we have been using in Webpack.

Additionally, we have improved the watching functionality and now update builds based directly on their dependencies an not an assumption that the files are children.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-08-12 10:30:12 -07:00
Stacey Gammon e9273cdb1e
typescript more dashboard panel code (#21810) (#21905)
* typescript more dashboard panel code

* use ? instead of | undefined
2018-08-12 08:38:07 -04:00
Spencer 70b1ed6737
[TypeScript] add type-check script (#19325) (#21868)
* [TypeScript] add type-check script

* [ci] run scripts/type_check after linting

* [ts] improve filterProjectsByFlag readability

* fix typo

* simplify type signature
2018-08-10 10:20:19 -07:00
Tyler Smalley fef8355653
Upgrade uglifyJS webpack plugin, disabling compress and enabling parallel (#21809) (#21822) 2018-08-08 18:39:47 -07: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
Brandon Kobel c88b5674e1
[6.x] Switching from jade to pug (#21047) (#21338)
* Switching from jade to pug (#21047)

* Upgrading pug

* Switching .jade to .pug and fixing templates

* Renaming the I18N usages of jade to pug

* No more jade in I18N

* Renaming root_redirect to .pug
2018-08-07 10:21:05 -04:00
Leanid Shutau 8c708f0108
Implement a build tool for default messages extraction (#19620) (#21580)
* Implement a build tool for default messages extraction

* Refactor extraction tool, resolve review comments, fix bugs

* Resolve comments, refactor extraction tool, fix bugs

* Add context to messages extraction tool

* Resolve comments

* Fix bugs

* Add messages extraction from .jade files, refactor code

* Add template literals parsing

* Return defaultMessages.json to plain structure

* Refactor utils

* Fix bugs

* Refactor code, resolve review comments, fix bugs

* Fix minor bug

* Get rid of '@babel/traverse' and add its native implementation

* Add handlebars messages extraction

* Fix mkdir on macOS

* Fix bugs, inject default formats, finalize the tool

* Fix filsystem permissions

* Refactor nodes traversal

* Update code style

* Downgrade @babel/types to fix build issues

* Resolve comments

* Fix minor bugs
2018-08-02 15:18:12 +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
Søren Louv-Jansen 37eec629a1
[APM] Fix duplicate service calls (#21271) (#21470) 2018-07-31 16:23:33 +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
Nathan Reese 72a4df5b25
backport (#21455) 2018-07-30 18:22:00 -06:00
dave.snider@gmail.com 44f5fa7d48
EUI@3.0.3 (#21363) (#21366) 2018-07-30 12:23:14 -07:00
Nathan Reese a4e0fa1bd4
add mutation observer polyfill for jest test env (#20996) (#21409)
* add mutation observer polyfill for jest test env

* use polyfill from npm

* set bluebird scheduler

* use correct version in comment about bluebird
2018-07-30 10:05:03 -06:00
Brandon Kobel 2b2e65298f
Updating minimatch (#21050) (#21340) 2018-07-27 09:38:29 -04:00
Brandon Kobel c6422d5459
Updating macaddress (#21048) (#21339) 2018-07-27 09:03:05 -04:00
dave.snider@gmail.com bb7b22f674
Upgrade xpack to eui@3.0.0 (#20930) (#21064)
* upgrade to eui@3.0.1
2018-07-23 19:08:52 -07:00
Søren Louv-Jansen 6013c7641d
Bump backport to 4.2.0 (#21083) (#21088) 2018-07-23 20:05:53 +02:00
Spencer 801e5c0b2f
[kfetch] TypeScript-ify (#20914) (#20983)
In order to make the awesome new kfetch api easier to consume in purely TypeScript projects, and since it's a pretty small module with very few dependencies, I converted it to TypeScript.

Along with kfetch I also started a type definition file for `ui/chrome` that we can extend as we go, but will likely be unnecessary after #19992
2018-07-19 15:37:25 -07:00
Stacey Gammon 2355bb10c3
Bump eui (#20774) (#20909)
* bump eui

* Fixed breaking `EuiPage` changes

Mainly adding `EuiPageBody`’s where there were none

* bump to 3.0, remove duplicate declaration of EuiFlyoutBody, update jest snapshots

* bump eui

* bump to 3.0, remove duplicate declaration of EuiFlyoutBody, update jest snapshots

* Update jest snapshots in xpack
2018-07-17 20:45:11 -04:00
Felix Stürmer 021ca43849
Upgrade typescript to 2.9.2 (#20757) (#20865)
This upgrades TypeScript to version 2.9.2. My main motivation is the support for generic type arguments in JSX elements and tagged templates (e.g. for `styled-components`).

Problems arising from breaking changes in the new TypeScript version have been mitigated by:

* setting the `keyofStringsOnly` option until impacted code has been
  future-proofed
* Restricting some joi-related generics

See the [release notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html) for details.

Some follow-up tasks should be:

* Update EUI to support the new `keyof` behaviour
* Update new platform TypeScript code to support new `keyof` behaviour
* Remove `keyofStringsOnly` setting
2018-07-17 11:23:09 +02:00
Tyler Smalley 08c1c14e60
Workaround for yarn interdependency conflicts (#20805) (#20826)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-07-16 09:10:31 -07:00
CJ Cenizal 3d2a1613ae
Add ability to abort a kfetch call. (#20700) (#20748)
* Split kfetch module into kfetch and kfetchAbortable sub-modules.
* Add abortcontroller-polyfill.
2018-07-12 16:20:59 -07:00
Søren Louv-Jansen e13d64edaa
[6.x] Ensure timefilter updates correctly (#20677)
* Ensure timefilter updates correctly (#20677)

* Fix lock file discrepancy due to removed object-hash dep (#20687)
2018-07-12 09:44:40 +02:00
Søren Louv-Jansen 64768253d4
[APM] Add kuery to apm ui (#19469) (#20669)
* Add Kuery to APM UI

* Format bool queries

* Fix test

* Add min-height

* Updated css to vars

* Added loading indicators

* Update breadcrumbs

* Update Discover links

* Add search button

* Fix readcrumb test

* Remove debounce

* Fix “undefined” kuery

* Handle missing index pattern

* Fix race condition in data fetching

* Fix legacy url encoding

* Filter out field-suggestions starting with "span*"

* Convert KuiTable to EuiTable for service overview

* Convert KuiTable to EuiTable for transaction overview

* Convert KuiTable to EuiTable for error overview

* Updated empty state messages

* Bump CI jo

* updated snapshots

* Add beta tooltip and update to EuiSearch

* Fixed issue with focus

* Submit when clicking search button

* Submit when clearing input

* Handle missing index pattern

* Remove query from spans

# Conflicts:
#	yarn.lock
2018-07-11 16:30:25 +02:00
Aleh Zasypkin f88d0b92a2
Integrate new platform (core) server side into Kibana (#20661)
Co-authored-by: Kim Joar Bekkelund <kjbekkelund@gmail.com>
Co-authored-by: archana <archanid@users.noreply.github.com>
Co-authored-by: Spencer <spalger@users.noreply.github.com>
Co-authored-by: Court Ewing <court@epixa.com>
2018-07-11 13:12:33 +03:00
Tyler Smalley b5e80c33f3
[kbn-es] Resolves interdependencies for 6.x from #20503 (#20601)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-07-09 18:53:24 -07:00
Tim Roes a2c33a5b33
Typescriptify ResizeChecker and render complete (#20531) (#20550)
* Typescriptify ResizeChecker and render complete

* Simplify getSize method
2018-07-09 13:41:21 +02:00
CJ Cenizal e87f67eb3f
Remove markdown-to-jsx from yarn.lock. (#20537) (#20540) 2018-07-06 17:34:32 -07:00
Nathan Reese a0add1bf5b
Upgrade to EUI 1.1.0 (#20411) (#20529)
* Upgrade to EUI 1.0.1

* upgraded to eui 1.1.0

* fix setInspectorTablePageSize function in functional tests

* better comment about basic table pagination buttons
2018-07-06 13:33:27 -06:00
CJ Cenizal 55228fbd81
Convert various uses of notifier to toastNotifications. (#20420) (#20520)
* Add MarkdownSimple component.
* Replace Context use of notifier with toastNotifications.
* Replace field.js use of notifier with toastNotifications.
* Replace State use of notifier with toastNotifications.
* Replace reporting use of notifier with toastNotifications.
* Convert Logstash to use toastNotifications.
* Convert Security to use toastNotifications.
2018-07-06 11:09:26 -07:00
Felix Stürmer a954f44cf1
[6.x] Upgrade styled-components to 3.3.3 (#20257) (#20368)
Backports the following commits to 6.x:
 - Upgrade styled-components to 3.3.3  (#20257)
2018-07-03 12:20:59 +02:00
Jen Huang 7bd5b3830f
Update yarn.lock with new react-test-renderer version (#19745) (#20350) 2018-06-29 14:36:36 -07:00
Felix Stürmer 7be80c9006
[6.x] Upgrade redux, redux-thunk and react-redux in x-pack (#20267) (#20300)
Backports the following commits to 6.x:
 - Upgrade redux, redux-thunk and react-redux in x-pack  (#20267)
2018-06-28 16:55:33 +02:00
CJ Cenizal 0da5bacd28
Adding firefox to test suite (#17195) (#20282)
* Created general driver to accept an argument select the driver to run.

* Added environment variable for driver, changed package.json to use custim leadfoot, and made changes to browserdriver to use any driver.

* Made changes per PR.

* Fixed all nits.
2018-06-27 19:46:35 -07:00
Tim Roes 89e001aaff
Update makelogs to 4.1.0 (#20232) (#20260) 2018-06-27 15:49:44 +02:00
Aleh Zasypkin 99f157b83f
Upgrade rxjs: 6.1.0 ---> 6.2.1. (#20214) 2018-06-25 21:30:49 +02:00
Tyler Smalley a1b5a56f94
Adds SCSS support for plugins (#19643) (#20137)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-06-22 08:03:14 -07:00
Stacey Gammon 17ebccbf28
Typescript-ify screenshot stitcher code in reporting (#20061) (#20149)
* typescript screenshot stitcher

* Throw an error if the data captured is not of the expected width and height.

* Import babel-core types

* Add babel-core types to x-pack package.json

* Dimensions => Rectangle
2018-06-22 10:53:00 -04:00
Shaunak Kashyap 17f483a432 Updating EUI to 0.0.55 (#20126) 2018-06-21 16:21:33 -07:00
Tim Roes 9ba0689dcd
[6.x] Replace spy panels by Inspector (#16387) | Fix one inspector test (#20072) (#20076)
* Replace spy panels by Inspector (#16387)

* Add Inspector feature

* So long, and thanks for all the fish, spy panel

* Fix several functional tests

* Fix unit tests

* Fix spy panel button tests

* Replace old spy panel documentation

* Disable test temporarily until we have dashboard triggers

* Enter edit mode for dark theme test

* Fix some more functional tests

* Fix more functional tests

* More test fixing

* Fix more functional tests

* Allow opening the inspector via loader handler

* Refactor InspectorViewChooser, remove unused CSS

* Remove dead code

* Fix data download button style

* Remove redundant code

* Load inspectorViews for dashboard_viewer

* Extract inspector views to custom core_plugin

* Switch API to TypeScript 🎉

* Design changes

* Remove icons from views

* Design changes

* Improve typings of API

* Add typing to all adapters

* Show loading spinner in request selector

* Rewrite InspectorView to TypeScript

* Fix help text for data view

* Remove deprecated React lifecycle methods

* Embed inspector into dashboard panel actions

* Remove temporary inspector trigger

* Remove old CSS

* Fix dashboard trigger for new panel action

* Add tests for InspectorPanel and DataAdapter

* Produce a hierarchical table if the vis is hierarchical

* Remove allowJs option again

* Add missing Apache license headers

* Close inspector on dashboard when navigating away

* Use proper title for dashboard panels

* Fix functional tests

* Skip broken test for now

* Flush view chooser button

* Add request adapter tests

* Skip more tests, broken due to typescript

* Add Request Time description

* Add description for courier request

* Fix tests

* Replace icon by new (not yet released) icon

* Finalize design of inspector

* Remove discover test, that relied on spy panels

* Change API to be properly mockable in tests

* Add aria-live region for request status

* Replace old method in functional tests

* Replace abitrary magic number

* Use object destructuring in vis

* Fix issue with crashing requests view

* Add request time tooltip

* Get request body of correct search source

* Make filter buttons properly keyboard accessible

* Follow Dave's design suggestions

* Remove redundant request from name

* Remove unneeded comments

* WIP raw-formatted values

* Fix filtering issue

* Fix tests and more license headers

* Add data view tests

* Remove search from table

* Fix typos

* Implement review suggestion

* Remove artificial delays for testing

* Fix new panel action structure

* Minor design adjustments

* Fix failing functional test

* Update failing snapshot test

* Implement final wording

* Apply new EUI styling

* Fix closing inspector in tests

* Fix sorting of table

* Align punctuation between tooltips

* Fix test that doesn't exist on master

* Fix one inspector test (#20072)

* Remove file that came accidentally back due to merging

* Fix accidental merge paste

* Fix 6.4 test failures
2018-06-21 11:45:13 +02:00
Tim Roes 508df9e67e
Update EUI to 0.0.53 (#20005) (#20042)
* Update to EUI 0.0.53

* Remove input vis specific styling

* remove double close button in dashboard add panel flyout (#2)

* Fix functional tests

* fix x-pack snapshots

* EUI 0.0.53 no longer closes combo box when clear btn is pressed (#3)
2018-06-19 18:57:42 +02:00
Stacey Gammon edb6b8d460
Typescriptify dashboard redux code (#19857) (#20038)
* Typescriptify dashboard redux code

* Address code review comments

* minor fixes

* move all type dependencies to dev
2018-06-19 11:11:01 -04:00
Spencer 8a7ed713fd
[6.x] [npm] upgrade to RxJS 6 (#18885) (#20006)
* [npm] upgrade to RxJS 6 (#18885)

This PR upgrades RxJS to version 6 and switches to a fork of `stream-to-observable` which includes an updated version of `any-observable` that supports RxJS 6 until https://github.com/jamestalmage/stream-to-observable/pull/10 is merged. The primary change in this version of RxJS is the movement of stream operators from `Obersable.prototype` to the `rxjs/operators` module. Some of the operators, like `catch` and `do`, have been renamed (`catchError`, and `tap`). The Obsevable factories have also been moved from static methods on the `Observable` class to named exports of the root `rxjs` module. Some of those factories have also changed slightly, like `fromEvent` which now emits arrays if the event handler is called with multiple arguments.

```js
// import the Rx namespace to get the Observable factories
import * as Rx from 'rxjs';
// import the operators as named imports
import { map, tap, switchMap } from 'rxjs/operators';
```

* [rxjs/dev-utils] fix old operator usage

* [rxjs/dev-utils] remove one more old operator
2018-06-18 12:47:51 -07:00
Søren Louv-Jansen 3b05d78273
Bump backport (#19910) (#19922) 2018-06-14 22:28:58 +02:00
CJ Cenizal fd591acb90
Upgrade EUI to 0.0.52 (#19772) (#19833)
* Revert "Revert "upping eui to 0.0.52 and updating snapshots (#19761)" (#19770)"
This reverts commit c853072ca5, reintroducing EUI 0.0.52.
* Rename visualize page object selectors for manipulating combo box.
2018-06-12 12:05:15 -07:00
CJ Cenizal f49dcc81ae
Revert "upping eui to 0.0.52 and updating snapshots (#19761)" (#19770) (#19771)
This reverts commit a6894c6f62.
2018-06-08 14:06:50 -07:00
Bill McConaghy bf6e4e41fc
upping eui to 0.0.52 and updating snapshots (#19761) (#19766)
* upping eui to 0.0.52 and updating snapshots

* fixing yarn.lock
2018-06-08 15:40:58 -04:00
Søren Louv-Jansen c77602dfb7
[backport] Bump to 3.0.2 (#19735) (#19756) 2018-06-08 16:38:48 +02:00
Jonathan Budzenski 253e2fac4d
[6.x] bump yarn.lock (#19624) 2018-06-07 13:31:56 -05:00
Bill McConaghy 0d9a46c1e8
upping to EUI 0.0.51 and fixing tests that broke (#19653) (#19693)
* upping to EUI 0.0.51 and fixing tests that broke

* upping x-pack eui to 51 and refreshing snapshots

* adjusting onQueryChange API to match EUI

* adding lock files

* updating snapshots
2018-06-05 20:26:43 -04:00
Stacey Gammon d131af8da8
Typescriptify ui/embeddable folder (#19648) (#19683)
* Typescriptify ui/embeddable folder

* Allow ts modules from ui/public folders to be imported

* Address review comments from Tim

* Address code review from Oleg

* remove lodash usage

* remove mappng to non public folder
2018-06-05 15:23:32 -04:00
Bill McConaghy 6e43505fa0
[console] porting console tests to Jest (#19543) (#19650)
* porting console tests to Jest

* adding missing import
2018-06-04 11:25:03 -04:00
Nathan Reese 388094e46d
Remove react-select from kibana (#18876) (#19557)
* remove react-select from AggSelect

* update field_select to use EuiComboBox

* metric_select

* moving_average

* percentile

* series_agg

* std_deviation

* removing some more react-select instances

* icon_select and group_by_select

* gauge type

* markdown

* set isClearable prop

* remove react-select from timeseries config

* remove react-select from timeseries panel options

* remove react select from terms

* remove react-select from table config

* remove react-select from data_format_picker

* fix create_select_handler mocha test

* remove react-select from kibana

* update tsvb functional tests

* set isDisabled prop on EuiComboBox where disabld prop was set for Select

* use durationOutputOptions for duration 'to' options
2018-05-30 10:48:58 -06:00
Tim Roes ee6a17e102
Update markdown-it to 8.4.1 (#19470) (#19472) 2018-05-28 18:47:35 +02:00
Justin Kambic e6e8271ee5 Update yarn.lock file to handle non-automated updated package.json (#19441) 2018-05-25 13:14:00 -04:00
Spencer 068b6652c0
[6.x] Check filename casing in CI (#19282) (#19414)
Backports the following commits to 6.x:
 - Check filename casing in CI  (#19282)
2018-05-24 23:09:30 -07:00
Spencer 30653d9d92
[6.x] [eslint-plugin-no-unsanitized] upgrade for import() support (#19315) (#19413)
Backports the following commits to 6.x:
 - [eslint-plugin-no-unsanitized] upgrade for `import()` support  (#19315)
2018-05-24 15:32:20 -07:00
Søren Louv-Jansen e73dceae5c
[APM] Upgrade to react-redux-request (#19338) (#19382) 2018-05-24 11:01:52 +02:00
Spencer 3d1441ab12
[ts] put JSX support in root tsconfig file (#19359) (#19365) 2018-05-23 13:15:36 -07:00
Chris Earle e6a88e000d Add Notification Service (#19236)
This adds a notification service to Kibana that can be used to send
asynchronous notifications, such as sending email and Slack messages,
which are intended to be configured via a combination of the
`kibana.yml` and Kibana keystore.

Once configured, the actions are automatically added to the notification
service and can be invoked via the server using the `notificationService`
singleton or HTTP to send it directly. See the included README for more
details.
2018-05-22 19:09:04 -04:00
Spencer 37487a8472
[6.x] [tslint] lint typescript code (#19105) (#19331)
Backports the following commits to 6.x:
 - [tslint] lint typescript code  (#19105)
2018-05-22 15:27:06 -07:00
Nathan Reese 4168ee4bec
upgrade kibana to eui 0.0.49 (#19284) (#19314) 2018-05-22 15:01:36 -06:00
Aleh Zasypkin dc16506da8
[6.x] Upgrade sinon (v1.17.3 --> v5.0.7). (#19293) 2018-05-22 15:41:45 +02:00
Spencer 07f4e5ad77
[6.x] [typescript] add typescript support for the server and browser (#19104) (#19223)
Backports the following commits to 6.x:
 - [typescript] add typescript support for the server and browser  (#19104)
2018-05-21 10:42:59 -07:00
Spencer 6a73c41ffd [npm] downgrade mocha even further, to before #19022 (#19238) (#19241) 2018-05-18 22:25:07 -04:00
Spencer b3364e625a
[6.x] [npm] downgrade mocha to not need https://github.com/mochajs/mocha/pull/3346 (#19233) (#19234) 2018-05-18 15:32:29 -07:00
spalger f17b311dfe [npm] upgrade mocha to include https://github.com/mochajs/mocha/pull/3346
(cherry picked from commit a5d1f1ccd6)
2018-05-18 14:47:39 -07:00
archana eae18989a3
Functional test setup with kbn-test package (#18568) (#19174)
Restructure testing with kbn-test package

 - Run with multiple configs, move cli options to config
 - Package-ify kbn-test
 - Eventually we'll have functional_test_runner live in a package
of its own, and then this kbn-test will use that as a dependency,
probably still as a devDependency.
 - Implement functional_tests_server
 - Collapse single and multiple config apis into one command

Use kbn-es

Replace es_test_cluster + es_test_config with kbn/test utils

Implement new createEsTestCluster

Improve scripts, jsdocs, cli top-level tools

Lift error handling to the top level
2018-05-17 13:42:43 -05:00
Spencer 7dbec2e1e7
[6.x] [mocha] remove grunt-simple-mocha (#19079) (#19139)
* [mocha] run tests with mocha script, remove grunt-simple-mocha

* [ci] force colored output

* [ci] disable color when reading the yarn bin

* [dev/build/exec] support tooling log having its own chalk

* [dev/mocha] avoid changing the cwd of the process

* [dev/mocha] only match files, speed up negative matches

* [cli/serve/test] strip ansi control characters from logs

* [ci] disable color in all `yarn bin` invocations

* [dev/mocha] cleanup old runInBand check

* [dev/mocha] enable gloabl leak checks
2018-05-16 16:25:59 -07:00
Nathan Reese 10ac6c5988
fix conflicks in yarn.lock (#19130) 2018-05-16 11:01:50 -06:00
Bill McConaghy 5c6d710607
upping ace version to the latest (#19067) (#19087) 2018-05-15 16:32:53 -04:00
spalger 7df7ab92d6 Revert "Functional test setup with kbn-test package (#18568)"
This reverts commit c2265e3931.
2018-05-15 13:16:36 -07:00
archana c2265e3931 Functional test setup with kbn-test package (#18568)
Restructure testing with kbn-test package

 - Run with multiple configs, move cli options to config
 - Package-ify kbn-test
 - Eventually we'll have functional_test_runner live in a package
of its own, and then this kbn-test will use that as a dependency,
probably still as a devDependency.
 - Implement functional_tests_server
 - Collapse single and multiple config apis into one command

Use kbn-es

Replace es_test_cluster + es_test_config with kbn/test utils

Implement new createEsTestCluster

Improve scripts, jsdocs, cli top-level tools

Lift error handling to the top level
2018-05-15 12:33:01 -05:00
Søren Louv-Jansen d47b685e54
Align x-pack and kibana devDeps (#19022) (#19047)
* Align Node deps

* Added grunt task

* Update name
2018-05-15 02:19:09 +02:00
Søren Louv-Jansen 14fb605370
[Kuery] Remove Angular dependencies (#17836) (#19055)
* [kuery] Remove `byName` dependency

* Remove $http from kuery

* Fix test

* Add request headers

* Replace byName with getFieldByName; add isFilterable

* Replace Angular mock with static mock

* Update index pattern for query bar

* manually attach format.convert method to field

* Use KBN_FIELD_TYPES to determine isFilterable

* Bump yarn.lock file

* Add kfetch (Kibana fetch)

* Moved `getFromLegacyIndexPattern` to static index pattern functions

* Fix tests

* Mock out kfetch

* Move value formatting from getRangeScript to buildRangeFilter

* Remove getFieldByName (over abstraction)

* Split kfetch options into two
2018-05-15 01:25:04 +02:00
Tim Roes e5ea9dd2a6
Update React to 16.3 (#18768) (#19033)
* Update React to 16.3

* Switch off specific eslint rules

* Update enzyme snapshots

* Incorporate PR feedback
2018-05-14 15:15:18 +02:00