Commit graph

1188 commits

Author SHA1 Message Date
Fuyao Zhao 725189df56 [Code]: Upgrade dependencies 2019-03-26 23:44:48 -07:00
Fuyao Zhao aa8ab4544c Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-03-26 23:30:36 -07:00
CJ Cenizal 33fa8c0c6b
Add eslint rule for checking React Hooks best practices. (#33901)
* Rename Console's useResizeChecker to applyResizeCheckerToEditors, to bypass greedy react-hooks lint rule.
2019-03-26 20:18:14 -07:00
Tiago Costa 20bdf7d4a9
Migration to Babel7 and @babel/preset-typescript (#33093)
* chore(NA): first changes on every package.json order to support new babel 7. chore(NA): build for kbn-pm with babel 7.

* chore(NA): patch babel register to load typescrit

* chore(NA): first working version with babel 7 replacing typescript compiler.

* fix(NA): common preset declaration in order to make it work with babel-loader.

* chore(na): organizing babel preset env package json.

* chore(NA): mocha tests enabled.

* fix(NA): typo on importing

* test(NA): majority of x-pack tests ported to use babel-jest

* fix(NA): report info button test with babel-jest.

* fix(NA): polling service tests.

* test(na): fix server plugins plugin tests.

* test(NA): batch of test fixs for jest tests under babel-jest hoisting.

* chore(NA): add babel plugin to hoist mock prefixed vars on jest tests.

* chore(NA): update yarn.lock file.

* chore(NA): tests passing.

* chore(NA): remove wrong dep

* chore(NA): fix tsconfig

* chore(NA): skip babel for ts-jest.

* chore(NA): selectively apply the plugin to strip off namespace from ts files.

* chore(NA): remove not needed changes from ts tests

* chore(NA): removed ts-jest dependency. chore(NA): migrate ts tests on x-pack to use babel-jest with the new pattern.

* chore(NA): migrate kibana default distribution typescript tests to run with babel-jest and the new test mock pattern.

* chore(NA): merge and solve conflicts with master.

* chore(NA): fix problems reported by eslint

* chore(NA): fix license ovveride for babel-plugin-mock-imports

* chore(NA): update jest integration tests for kbn pm

* chore(NA): update babel jest integration tests for kbn pm.

* test(NA): update jest integration snapshot for kbn pm.

* chore(NA): apply changes according to the pull request reviews.

* chore(NA): apply changes according to the pull request reviews.

* refact(NA): migrate jest tests to the new pattern.

* fix(NA): babel 7 polyfill in the tests bundle.

* chore(NA): restore needed step in order to compile x-pack with typescript.

* chore(NA): change build to compile typescript with babel for the oss code. chore(NA): change transpile typescript task to only transpile types for x-pack. refact(NA): common preset for babel 7

* Revert "chore(NA): change build to compile typescript with babel for the oss code. chore(NA): change transpile typescript task to only transpile types for x-pack. refact(NA): common preset for babel 7"

This reverts commit 2707d538f5.

* fix(NA): import paths for tabConfigConst

* chore(NA): fix transpiling error on browser tests

* chore(NA): simplify kbn babel preset package.

* chore(NA): migrate build to use babel transpiler for typescript excluding xpack.

* fix(NA): introduced error on test quick task.

* fix(NA): fix preset for client side code on build.

* fix(NA): build with babel

* fix(NA): negated patterns in the end.

* fix(NA): kbn_tp_sample_panel_action creation.

* fix(NA): babel typescript transform plugin workaround when exporting interface name.

* refact(NA): remove not needed type cast to any on jest test.

* docs(NA): add developement documentation about jest mocks test pattern.

* chore(NA): missing unmerged path.

* chore(NA): fix jest tests for template.

* [CCR] Client integration tests (table lists) (#33525)

* Force user to re-authenticate if token refresh fails with `400` status code. (#33774)

* Improve performance of the Logstash Pipeline Viewer (#33793)

Resolves #27513.

_This PR is a combination of #31293 (the code changes) + #33570 (test updates). These two PRs were individually reviewed and merged into a feature branch. This combo PR here simply sets up the merge from the feature branch to `master`._

Summary of changes, taken from #31293:

## Before this PR
The Logstash Pipeline Viewer UI would make a single Kibana API call to fetch all the information necessary to render the Logstash pipeline. This included information necessary to render the detail drawer that opens up when a user clicks on an individual vertex in the pipeline.

Naturally, this single API call fetched _a lot_ of data, not just from the Kibana server but also, in turn, from Elasticsearch as well. The "pro" of this approach was that the user would see instantaneous results if they clicked on a vertex in a pipeline and opened the detail drawer for that vertex. The "cons" were the amount of computation Elasticsearch had to perform and the amount of data being transferred over the wire between Elasticsearch and the Kibana server as well as between the Kibana server and the browser.

## With this PR
This PR makes the Kibana API call to fetch data necessary for **initially** rendering the pipeline — that is, with the detail drawer closed — much lighter. When the user clicks on a vertex in a pipeline, a second API call is then made to fetch data necessary for the detail drawer.

## Gains, by the numbers

Based on a simple, 1-input, 1-filter, and 1-output pipeline.

* Before this PR, the Elasticsearch `logstash_stats` API responses (multiple calls were made using the `composite` aggregation over the `date_histogram` aggregation) generated a total of 1228 aggregation buckets (before any `filter_path`s were applied but across all `composite` "pages"). With this PR, the single `logstash_stats` API response (note that this is just for the initial rendering of the pipeline, with the detail drawer closed) generated 12 buckets (also before any `filter_path`s were applied). That's a **99.02% reduction** in number of buckets.

* Before this PR, the Elasticsearch `logstash_stats` API responses added up to 70319 bytes. With this PR, the single `logstash_stats` API response for the same pipeline is 746 bytes. That's a **98.93% reduction** in size.

* Before this PR, the Elasticsearch `logstash_state` API response was 7718 bytes. With this PR, the API response for the same pipeline is 2328 bytes. That's a **69.83% reduction** in size.

* Before this PR the Kibana API response was 51777 bytes. With this PR, the API response for the same pipeline is 2567 bytes (again, note that this is just for the initial rendering of the pipeline, with the detail drawer closed). That's a **95.04% reduction** in size.

* [Maps] split settings into layer and source panels (#33788)

* [Maps] split settings into layer and source panels

* fix SCSS import

* [env] exit if starting as root (#21563)

* [env] exit if starting as root

* fix windows

* s/--allow-root

* Typescript sample panel action (#33602)

* Typescript sample panel action

* Update EUI version to match main cabana version

* update yarn.lock

* add back typings include

* use correct relative path

* Home page "recent links" should communicate saved object type #21896 (#33694)

* adds object type for screen order
* adds object type for pointer hovering
* Update src/legacy/ui/public/chrome/directives/header_global_nav/components/header.tsx

Co-Authored-By: rockfield <philipp.b@ya.ru>
2019-03-26 20:44:03 +00:00
Stacey Gammon f5010cc8e6
Typescript sample panel action (#33602)
* Typescript sample panel action

* Update EUI version to match main cabana version

* update yarn.lock

* add back typings include

* use correct relative path
2019-03-26 12:31:10 -04:00
Spencer 2e232c2e31
[@kbn/expect] "fork" expect.js into repo (#33761)
* [@kbn/expect] "fork" expect.js into repo

* [eslint] autofix references to expect.js

* [tslint] autofix all expect.js imports

* now that expect.js is in strict mode, avoid reassigning fn.length
2019-03-25 09:56:48 -07:00
Fuyao Zhao 096293a180 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-03-25 08:01:00 -07:00
Spencer 96206bd092
[eslint] merge custom rules into a single plugin (#33733)
I'd like to add another custom eslint rule, but there isn't a very good place to do that right now. We have the `eslint-plugin-kibana-custom` package, which is super simple but isn't in the `@kbn` namespace and isn't included in the root eslint config, and `@kbn/eslint-plugin-license-header` is too specific, so I've merged those two packages into `@kbn/eslint-plugin-eslint`, which is a little redundant but allows is to refer to the rules within it as `@kbn/eslint/{rule}`, which feels nice.

Thoughts?

_**NOTE:**_ merging the eslint rules from the two packages means enabling prettier for the code from `@kbn/eslint-plugin-license-header`, all those changes are made in 42c7da6fe2. [View the changes without the prettier updates](b647f2b...74e07a0)
2019-03-22 17:12:14 -07:00
Fuyao Zhao a2e7045a85 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-03-22 13:41:24 -07:00
Matthew Kime ab8a2b1777
Dashboard typescript (#32703)
Typescript Dashboard bits - grid, panel, viewport
ui/exit_full_screeen
2019-03-22 14:53:24 -05:00
Fuyao Zhao 3c1028a749 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-03-22 11:57:15 -07:00
Jason Rhodes 721161f3d1
Upgrades EUI to 9.5 (#33672)
* Updates EUI to 9.5.0

* Remove duplicate type

* Updates snapshots and fixes a few type errors

* Updates x-pack snapshots
2019-03-22 10:28:37 -04:00
Fuyao Zhao 046c922d2c Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-03-21 12:08:17 -07:00
Peter Pisljar fec0f6c40a
adding runPipeline tests (#27015) 2019-03-21 07:12:25 +01:00
Chandler Prall 0e23ac1134
Upgrade EUI to 9.4.2 (#33511)
* Upgrade EUI to 9.4.1

* Upgrade EUI to 9.4.2
2019-03-19 12:31:04 -06:00
Rudolf Meijering 1ffb261788
Expose core api types in /public and /server (#32746)
* Expose core api types in /public and /server

* Export CoreStart from core/public

* Export Server and Public from 'kibana'

* Cast frozen object type back to original

The exported type `InjectedMetadataStart` derives it's type from the returned values.
Since it's internal state is frozen the type changes to `ReadOnly<`. However, consumers
of the API shouldn't have to know or care about this type.

* Be more selective with what gets exported

* Fix type imports in tests

* Fix type errors

* Remove src/type_exports.ts

* More remove src/type_exports.ts

* Remove build:types

* Fix bootstrap import

* Expose internal API's at the top level

Exposing the internal API's at the top level of core/public and core/server
makes it obvious that these API's are consumed outside these modules. Marking
these @internal ensures they don't get exported as part of the documentation.

* Fix tests

* Put core/{public/server} in their own namespaces
2019-03-19 08:35:19 +01:00
Fuyao Zhao 3a1a49f354 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-03-18 17:52:37 -07:00
Robert Monfera 45d6453fa7
Test: TypeScript type specification strength tests (#32905)
* Test: TypeScript type specification strength tests

* Chore: post-merge lint

* Post-merge conflict fix
2019-03-15 23:58:25 +01:00
Fuyao Zhao 2bba2bbd38 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-03-14 11:29:22 -07:00
Ryan Keairns e9885e200a Updates to K7 nav drawer and EUI to 9.4.0 (#32864)
* update for new eui nav drawer

* remove extraAction on flyout

* fix mobile menu toggle

* add i18n for recently reviewed nav link

* progress on updating tests

* replace EuiListGroup with EuiNavDrawerGroup

* Quick label fixes

- Removing aria-label if the same as label since the `EuiNavDrawerGroup` takes care of that
- Truncating any recent items to just 64 characters and applying the `title` attribute to display the whole label.

* Adding a truncation buffer

* fix navDrawerRef

* Update to EUI 9.3.0

Also comments out some logos that don’t exist that were throwing console errors

* remove unused import

* typo fix

* One DTS too many in test

* …all the small things…

* Upgrade plugin dependencies and fix nav drawer test

* update for new eui nav drawer

* remove extraAction on flyout

* fix mobile menu toggle

* add i18n for recently reviewed nav link

* progress on updating tests

* replace EuiListGroup with EuiNavDrawerGroup

* Quick label fixes

- Removing aria-label if the same as label since the `EuiNavDrawerGroup` takes care of that
- Truncating any recent items to just 64 characters and applying the `title` attribute to display the whole label.

* Adding a truncation buffer

* fix navDrawerRef

* Update to EUI 9.3.0

Also comments out some logos that don’t exist that were throwing console errors

* remove unused import

* typo fix

* One DTS too many in test

* …all the small things…

* Upgrade plugin dependencies and fix nav drawer test

* Add support for normal image paths

Updated to EUI 9.4.0

* update testing appMenu.clickLink selector

* leave appsMenu closed while reading and clicking links

* use saveVisualizationExpectSuccess to ensure modal is closed before continuing
2019-03-14 13:35:21 -04:00
Fuyao Zhao 87d3373f66 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-03-14 09:34:58 -07:00
Clint Andrew Hall a807511d59
[canvas] Color Widgets - TS + Examples (#31391)
* [canvas] Color Widgets - TS + Examples

* Addressing feedback
2019-03-13 23:09:05 -05:00
Fuyao Zhao 4245a7b693 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-03-12 09:33:55 -07:00
Varun Sharma d301433ca9 Removes Unused react-toggle dependency. (#29086)
* Removes Unused react-toggle dependency.

* PR #29086 Updates yarn.lock
2019-03-11 15:44:23 -07:00
Nathan Reese b5c958ea53
[Input controls vis] replace react-input-range with EuiDualRange (#31119)
* [Input controls vis] replace react-input-range with EuiDualRange

* remove unneeded styles

* correctly format I18n with variables

* fix problems with long decimals

* fix one test case

* clean-up error message text, remove extra commas in jest test

* fix bug where values were returned as strings

* use i18n.translate instead of passing formatMessage into isRangeValid

* assert error message in isRangeValid unit test

* changes from node scripts/i18n_check --fix

* remove localization from RangeControl component since it no longer has any text, update snapshots

* another snapshot update

* ensure min and max are not null

* check for value before checking if min/max is null
2019-03-11 16:25:29 -06:00
Fuyao Zhao 7c3fe2c8eb Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-03-11 13:15:04 -07:00
dave.snider@gmail.com 3ada0259cc
Eui/9.2.1 + better dark mode (#32728)
Updates EUI and makes some dark mode adjustments.
2019-03-11 12:36:06 -07:00
Fuyao Zhao 6a1fc64c39 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-03-08 00:40:10 -08:00
Brandon Kobel f96c39e492
Upgrading handlebars (#32699) 2019-03-07 14:10:43 -08:00
Jason Rhodes ae754ac607
Upgrades EUI to 9.x (#32009)
* Fixed a simple argument bug and removed infra date picker EUI types

* Fixes for EUI date picker types

* eui_8.0.0

* fix type errors in query_bar

* Small changes for EUI types

* Updates EUI to 9.0.0 and removes @types/react-datepicker as it now ships with EUI

* Updates to EUI 9.0.1 and removes duplicate types in infra eui.d.ts

* ts-ignore applied to ongoing type error with styled components and EUI

* Changes EuiProgress props to avoid TS errors

* Updates EUI 9.0 snapshots

* Updates kibana root snapshots for EUI 9.0 upgrade

* Update detail_panel.test.js for EUI changes

* Updated functioanl and unit tests to properly inspect EuiTableRowCell rendered values

* Fix docs_level_security_roles.js func tests

* Update EUI to 9.0.2

* Fixed failing snapshot for EUI icon default prop
2019-03-07 07:03:11 -05:00
Fuyao Zhao cfbc0faed9 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-03-06 14:09:38 -08:00
Spencer a7e1061bad
Typescript-ify FTR Remote (#32447)
* [ftr] flatten GenericProviderTypes to fix "log" types

* [ftr/remote] typscript-ify

* remove webdriver types, since they're version 3 and we're using version 4

* simplify initWebDriver() function

* keep jest tests in the functional tests as js, mixing jest and mocha types doesn't work
2019-03-06 07:25:59 -08:00
Mike Côté 399067a491
Basic server side export API for saved objects (#30326)
* Initial work for new server side export API

* Revert UI changes, API only in this PR

* Remove whitespace at top of export.asciidoc

* Add tests around limitations

* Add comment

* Convert some files to typescript

* Move Boom.boomify to where the errors are created

* Use Boom.badRequest for now

* Fix lint issue

* Move files

* Update tests

* Add functional test

* Export all documents by default

* Update test assertions

* Use ~10000 saved objects in export api integration test

* Convert route to typescript, add content-type response header

* Move some tests to api_integration

* Use new sort and rename functions/variables

* Move tests to API integration

* Cleanup and finalize api integration tests

* Make type or objects required but not both in the same call

* Add spaces / security tests

* Add noTypeOrObjects to security / spaces tests

* Use json-stable-stringify and add tests for export ordering

* Address self feedback, add without kibana index test

* Only allow export API to export index-pattern, dashboard, visualization and search type objects

* Make import export size configurable and fix broken tests

* Fix broken tests

* Move test config to mock server

* Add more typescript types instead of using any

* Convert request from GET to POST

* Fix saved objects mixin test

* Update src/legacy/server/saved_objects/lib/export.ts

Co-Authored-By: mikecote <mikecote@users.noreply.github.com>

* Apply PR feedback

* Fix lint error

* Update test snapshots due to jest upgrade

* Add error handling for bulkGet

* Split export API into two endpoints

* Update src/legacy/server/saved_objects/routes/export_by_type.test.ts

Co-Authored-By: mikecote <mikecote@users.noreply.github.com>

* Update docs/api/saved-objects/export_by_type.asciidoc

Co-Authored-By: mikecote <mikecote@users.noreply.github.com>

* Update docs/api/saved-objects/export_by_type.asciidoc

Co-Authored-By: mikecote <mikecote@users.noreply.github.com>

* Update src/legacy/server/saved_objects/routes/export_objects.test.ts

Co-Authored-By: mikecote <mikecote@users.noreply.github.com>

* Apply PR feedback

* MockServer -> createMockServer

* Revert back to single API

* Re-apply PR feedback
2019-03-05 15:42:02 -05:00
Fuyao Zhao c57b16ce95 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-03-04 17:23:36 -08:00
Fuyao Zhao b35553f733
Enforce all packages uses same typescript version (#32440) 2019-03-04 16:35:47 -08:00
Fuyao Zhao 6c6e79ec4a Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-03-04 13:59:30 -08:00
Chandler Prall 8b0e3a7de1
Fix IE11 by pinning top-level core-js node module to 2.5.3 (#32159)
* Fix IE11 by pinning top-level core-js node module to 2.5.3

* Re-force core-js in yarn.lock
2019-03-04 12:38:50 -07:00
Spencer a6afcc5b66
Restore webdriver-based functional test runner driver (#31446)
* Restore webdriver-based functional test runner driver

* run all function test suites 6 times per build, to help spot flakiness

* [tests/reporting] fix flaky click on report generation

* [#31446] stabilize x-pack-ciGroup6 (#31447)

* rerun x-pack-ciGroup6 40 times

* improve reporting tests stability (#31454)

* Revert "rerun x-pack-ciGroup6 40 times"

This reverts commit 63026b1a53.

* Fix Dashboard Save tests (#32112)

* [page_objects/dashboard_page] add waitDialogIsClosed to manage dashboard popup behaviour

* [page_objects/dashboard_page] add waitDialogIsClosed flag

* services: leadfoot -> webdriver

* [services/lib/web_element_wrapper] extend type with charByChar input (#32305)

* Revert "run all function test suites 6 times per build, to help spot flakiness"

This reverts commit 477099337a.
2019-03-01 17:53:05 -08:00
Mikhail Shustov d89a97fb14
update @types/node to latest v10 (#32306) 2019-03-01 17:44:10 +01:00
Fuyao Zhao c4f4f2e982 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-02-28 22:50:11 -08:00
Spencer 4749c6aab6
[ts][ftr] improve types for ftr and expect.js, cleanup changes to tsconfig files (#31948)
In https://github.com/elastic/kibana/pull/31234 there were some extra changes that I've reverted, like use of the `tsconfig-paths` package to magically rewrite import statements to defy the standard node module resolution algorithm, the inclusion of several unnecessary options in the `test/tsconfig.json` file, and changes of the line-endings in the config files. This also brings a few enhancements from https://github.com/elastic/kibana/pull/30190 including a modularized version of the expect.js types, and options for explicit mappings for the PageObjects and services used in ftr tests.
2019-02-28 12:06:00 -08:00
Jonathan Budzenski 95a3284637
Bump node to 10.15.2 (#32200) 2019-02-28 10:48:42 -06:00
Mikhail Shustov 8c6b1e5908
Update Typescript to the latest version (#32063)
* bump typescript version to 3.3.3333

* fix tests after updating TS version

* suppress type errors until they fixed appropriately

* address comments

* add type def for UnconnectedKibanaLink

* remove fix @ts-ignore

* fix snapshot test. provide displayName
2019-02-28 17:21:47 +01:00
Mikhail Shustov 5fc7addac5
Update jest to v24 (#31825)
* udpate jest, jest-cli, @types/jest to v24

* fix type error in kibana-i18n package

* return serivce explicitly to fix typings

* add explicit never

* suppress typings errors

* update jest versions in x-pack

* make tests in x-pack more robust and fix incompatibility

* suppress CallCluster mock typings

Mock interface doesn't match CallCluster. Requires
additional work

* x-pack. resolve other typing conflicts

* remove unused types/jest

* fix snapshots

* restore mocks after jest.spyOn

* remove outdated definitions for jest

* cleanup x-pack package.json and update @types/jest

* fix tests merged from master

* updated yarn.lock and log errors for scripts/type_check

* This commit fixes error in TS, which failed on parsing the file.

* suppress type errors from master

* jest-cli is devDep
2019-02-28 13:26:16 +01:00
Aleh Zasypkin 2f62e6f1a5
Upgrade @babel/* dependencies. (#32031)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2019-02-27 19:27:40 +02:00
Fuyao Zhao 6de9fa00d9 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-02-22 12:30:12 -08:00
Vitali Haradkou 75e49e667c tests typescript migration (#31234)
* add typescript support for functional tests
2019-02-21 19:38:54 -06:00
Fuyao Zhao 240eac612c Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-02-21 14:28:32 -08:00
Felix Stürmer 6e31c1d127
Upgrade react to 16.8.3 (#31268) 2019-02-21 11:27:35 +01:00
Fuyao Zhao be376d1d70 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-02-19 16:10:27 -08:00
Marco Vettorello 00fbc2572e
Removed old package, fix import (#31428) 2019-02-19 12:23:03 +01:00
Spencer a48a03cd3e
Revert "Replace Leadfoot with WebDriver API (#26477)" (#31382)
* Revert "Replace Leadfoot with WebDriver API (#26477)"

This reverts commit 0bd3b4fdfb.

* leadfoot expectes execute args to be an array

* disable flaky graphql tests
2019-02-17 18:59:03 -08:00
Dmitry Lemeshko 0bd3b4fdfb
Replace Leadfoot with WebDriver API (#26477)
* [services/browser] switch to webdriver API

* [services/find] switch to webdriver API

* [services/remote] update to use webdriver service

* rename WebDriver service

* [services/remote] remove browser_driver_api

* [services/find] update to use WebDriver element wrapper

* [services/web_element_wrapper] use wrapped elements

* [services/find] use element wrapped moveMouseTo function

* [services/find] fix webdriver service init, add missing functions

* add missing functions for Leadfoot Element API

* [services/web_element_wrapper] add search by tag name

* tune WebDriver API calls to match Leadfoot

* Fixed implementation of moveMouseTo that is causing el.getClientRect error.

* fix references to WebElementWrapper

* [services/find] fix findElement call on webElementWrapper object

* fix issues in find and test_subject services

* [web_element_wrapper] add search by partial link text

* [services/find] adjust wrapper functions with Leadfoot API to support tests

* fix dragAnDrop & filer on elements displayed

* [visualise_page] improve searching of bucket element

* [discover_page] wait for visualisation loaded + dragAndDrop

* [service/find] fix exists, add pressKey for element

* fixes for visualize tests

* [services/browser] update dragAnddrop

* Made change to test to use move() code path in drag and drop.

* tune page objects for chart tests

* fix discover & xpack tests

* [page_objects/upgrade_assistant] fix locator

* [page_objects/discover_page] retry on brushHistogram to fix staleElementException

* update dragAndDrop, retry on getHeaders

* retry on getTextTag

* [services/screenshots] fix webdriver image take

* skip histogram brushed test & remove --bail

* use legacyAction for dragAndDrop with offset

* add missing await

* page objects update

* increase mocha timeout to 5 min

* use data-rendering-count to track visualization loading completion

* adjust waitForVisualizationRenderingCompleted

* [page_objects/visualize_page] add waiting for visualization

* fixes for xpack functional tests

* improve logging in find & testSubjects

* [services/find] fix wrapped element usage

* [page_objects/visual_builder_page] use BACK_SPACE key, supported by WebDriver

* page objects fix

* [services/test_subjects] add async/await

* [visualize/_tile_map] add missing await in tests

* fix tile_map tests for webdriver

* replace bluebird.prop with async/await

* try to wait for rendering in openLegendOptionColors

* additional logs in find.allByCssSelector

* [services/find] fix implicit wait  handling

* fix mapping in getRowsFromTable

* add timeouts and waitForVisualisation in failed tests

* [services/test_subjects] set default timeout to FIND_TIME

* [services/test_subjects] replace bluebird.filter with for loop

* replace retry.try with waitForVisualisation

* add 'visualize' PO import

* [services/web_element_wrapper] add scrollIntoView support

* fixing kibana-intake

* fixes after merging master

* Switching browser temporarily to firefox to get a CI run on FF.

* set chrome back to default browser

* print logs for some WebElementWrapper functions

* fix _wrap function

* update NOTICE.txt

* Fixed some firefox config to get the browser working. Consolidated some of the calls to build out the driver.

* Cleaning driver instance creation

* Added network throttling option for chrome.

* fix implicit wait setting

* uncomment bail

* adjust waiting for timepicker popup

* [services/inspector] process table in sequence

* Added conditional for TEST_THROTTLE_NETWORK option along with updating the speed and comments.

* add cheerio checks

* [services/apps_menu] get links quicker via innerHtml

* install webdriver dependency via yarn

* [services/combo_box] wrap getComboBoxSelectedOptions with retry

* remove leadfoot

* [testSubjects] remove unnecessary method

* [ftr/browser] explicitly export specific keys, keep `BACKSPACE` name

* Revert "[ftr/browser] explicitly export specific keys, keep `BACKSPACE` name"

This reverts commit 779335f2d4.

* [ftr/filterBar] allow finding filters even if they're off the page

* [webdriver] write verbose logs

* [webdriver] shim executor to run all commands in series

Best we can tell WebDriver locks up sometimes when we send too many
commands at once, sometimes... It causes random lockups where we never
receive another response from WedDriver and we don't want to live with
that risk, so for now I've shimmed the Executor class in WebDiver to
queue all calls to Executor#send() if there is already a call in
progress.

* [webdriver] add comment about why we're shimming

* [webdriver] fix queue, actually put things there and take things off

* run all functional four times per build

* [webdriver] extract preventParallelCalls to test it

* Revert "run all functional four times per build"

This reverts commit f91996d977.
2019-02-16 08:29:29 +01:00
Chandler Prall bf0efec8b3
Upgrade EUI to 7.1.0 (#31282) 2019-02-15 11:03:52 -07:00
Joe Reuter 562edd6578
Downgrade vega to 4.3 (#31274) 2019-02-15 17:50:09 +01:00
Joe Reuter 2ede2e330e
Update vega to version 4 (#30628) 2019-02-14 11:35:05 +01:00
Fuyao Zhao 572a2b56c4 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-02-13 22:54:21 -08:00
Nathan Reese 892ccc241a
bump EUI to 7.0.0 (#30980) 2019-02-13 11:55:28 -07:00
Mike Côté e60d6d119d
Clone saved object document before migrating to prevent accidental mutations (#30475)
* Clone saved object document before migrating to prevent accidental mutations

* Add tests

* Add example comment

* Use latest version of lodash cloneDeep

* Revise spaces functional tests to use same sample data.

* Fix broken test
2019-02-11 16:01:12 -05:00
Spencer 133ba2360f
[esArchiver] stable archives (#30477)
* [esArchiver/save] serialize with stable json stringify

* [esArchives] rebuild all archives
2019-02-11 11:16:25 -08:00
Aleh Zasypkin 088d5f6919
Add zh-CN.json translations and respective compatibility checks via i18n tools (#30378) 2019-02-11 14:39:59 +01:00
Fuyao Zhao d3ceee5cf1 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-02-08 17:43:45 -08:00
Larry Gregory 3fba1f3fd5
Upgrade grunt to 1.0.3 (#30504) 2019-02-08 16:15:27 -05:00
Court Ewing 0b4f41dc7f
Bump to 8.0.0 2019-02-08 09:04:02 -05:00
Spencer 120606d037
[yarn] upgrade to @elastic/makelogs 4.4.0 (#30447) 2019-02-07 17:36:26 -08:00
Chandler Prall b47a92cfa9
Upgrade EUI to 6.10.1 (#30404) 2019-02-07 15:00:56 -07:00
Court Ewing 6f2a1c1933
Revert "bump to 8.0.0 (#30246)" (#30337)
This reverts commit 661ac59116.
2019-02-06 21:16:01 -05:00
Spencer 9ce8a7d131
[yarn] upgrade elasticsearch-js (#30294) 2019-02-06 13:58:02 -06:00
Court Ewing 661ac59116
bump to 8.0.0 (#30246) 2019-02-06 10:04:54 -05:00
Caroline Horn f8c7320277
EUI 6.10.0 & Background color fixes (#30136)
* First foray into turning .application background off

* Hopefully fixing the last few plugins

* Update EUI to 6.9.0

* removing hacks

* last fixes

* Remove a few more `100vh`

* Can I remember to copy & REPLACE

* EUI at 6.10.0
2019-02-05 21:29:30 -05:00
Tiago Costa 4cec19d9ea
Upgrade thread loader (#27518)
* chore(NA): update thread-loader version.

* chore(NA): upgrade to thread-loader 2.1.0.

* chore(NA): update thread-loader to 2.1.1

* chore(NA): bump thread loader version to 2.1.2
2019-02-06 00:45:15 +00:00
Jonathan Budzenski cfe374cb25
Bump node to 10.15.1 (#27918)
* Bump node to 10.15.0

* newline

* -1 newline

* bump max header size to 64kb

* fix quotes

* s

* space

* Bump node to 10.15.1

* fix flag arg
2019-02-05 16:06:59 -06:00
Tyler Smalley 36ee9d91fa
Adds traces to Node warnings (#27848)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2019-02-05 10:29:16 -08:00
Chris Davies ebd3a82643
Remove WebSockets from Canvas expressions interpreter (#29792)
This modifies the interpreter to use REST instead of WebSockets.
2019-02-05 11:51:45 -05:00
dave.snider@gmail.com fafa9fa9ae
EUI 6.8.0 (#29860)
Upgrades Kibana's EUI dep.
2019-02-01 14:38:46 -08:00
Caroline Horn b1b941dd8f
Finally remove leftover LESS files (#29486)
* Use mixin for full screen graphics

- Moved svg assets to one folder under `ui/public/assets/images`
- Deleted .less files

* Fix Kibana logos as well

* forgot to remove

* adds dark mode images

* Removed search_select

In favor of pattern to be created in EUI : https://github.com/elastic/eui/issues/1498

* No LESS in plugin generator

* remove comment

* Remove .less from testbed

* snaps

* Update dark mode graphics to be a bit lighter

* [karma] load css via url, rather than webpack

* [karma] css isn't built at config time, concat at request time
2019-02-01 01:35:25 -05:00
Chris Cowan fada5d9e15
[Infra UI] Table View for Home Page (#29192)
* Addding initial table implimentation

* Moving waffle map to seperate component; adding contextual menu to nodes; adding filter to groups; adding pagination; adding sorting

* Fixing EUI types for EuiInMemoryTable to work for EVERYONE

* Adding server plugin for tslint for VIM; Fixing tests

* Adding the view switcher

* removing dependency

* updating yarn.lock

* Change padding to use EUI rules

* Rename waffle/index to nodes_overview; move table to nodes_overview

* Adding missed files in last commit

* Adding textOnly to the columns that need special truncation because they are buttons

* Fixed an error in the merge

* Fixing merge issues
2019-01-31 09:53:09 -07:00
Fuyao Zhao 39f1ac00c4 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-30 11:51:13 -08:00
Nathan Reese 6e6be37f2b
update to eui 6.7.4 (#29560)
* update to eui 6.7.4

* remove use of euiHeaderChildSizeMobile for xs header check
2019-01-30 10:20:56 -07:00
Fuyao Zhao 7172f61f7e Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-28 18:53:12 -08:00
Spencer 2cb94be6fd
[sass] copy and rename url()s from sass files (#29306)
* [sass] copy and rename url()s from sass files

* [yarn] upload yarn.lock

* [optimize/bundlesRoute] fix tests

* Fix error message

Co-Authored-By: spalger <email@spalger.com>

* [sass/build] copy assets async

* [sass/build] prevent url() errors from breaking watchers, make more obvious

* [sass/build] check resolve first, print sourcePath for error

* [sass/build/tests] avoid quotes in snapshots

* [sass/build] add support for using ui/public/assets

* [sass/build/tests] fix assertion, assert image is copied

* update jest snapshots

* [sass/build] test ui/assets handling

* [sass] use more generic publicPath for sass
2019-01-28 14:00:22 -08:00
Nathan Reese 2f70a23372
upgrade to eui 6.7.2 (#29387) 2019-01-25 15:42:13 -07:00
Nathan Reese e320d511c1
Upgrade to EUI 6.7.0 (#29330)
* Upgrade to EUI 6.7.0

* comment out tests that are broken by brittle selector
2019-01-25 08:47:16 -07:00
Søren Louv-Jansen dc3a354b3e
[APM] Use idx everywhere for picking deeply nested properties (#29297) 2019-01-25 10:43:07 +01:00
Fuyao Zhao 602d39678f Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-24 15:03:13 -08:00
Jason Rhodes a11e471420
Updates React et al to 16.6 (#24707)
* Updates react to 16.6 (latest)

* Updated fragment-based snapshots for Kibana root unit tests

* Updated fragment-based snapshots for x-pack unit tests

* Removed xpack yarn.lock file bc it is no longer needed, it was reintroduced by accident during a rebase in this branch

* React 16.6 snapshot updates, round 2 (mostly Fragment snapshot diffs)

* Updated last round of React 16.6 snapshots

* Fixes query bar issue with 16.4 gDSFP lifecycle

* Updated yarn lock (arraybuffer.slice updated)

* Updates snapshots where executeQueryOptions prop appears
2019-01-23 13:46:09 -05:00
Fuyao Zhao 840a8a8672 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-20 17:36:08 -08:00
dave.snider@gmail.com fc6dece4c6
eui 6.5.1 (#28970) 2019-01-17 17:46:20 -08:00
Fuyao Zhao f11e08068f Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-15 13:31:06 -08:00
Nathan Reese f26bf4ac56
Upgrade to EUI 6.3.1 (#28707)
* Upgrade to EUI 6.3.0

* use ToolTipPositions instead of EuiToolTipPosition to avoid typescript problems

* update @types/react and @types/prop-types to match EUI versions

* upgraded to EUI 6.3.1 to avoid typescript version issues
2019-01-15 11:35:41 -07:00
Fuyao Zhao d13c15b862 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-14 15:38:37 -08:00
Larry Gregory d5e6e012d9
Upgrade Karma to 3.1.4 (#28581)
## Summary

Upgrades Karma to latest version (3.1.4)
2019-01-11 11:32:59 -05:00
Fuyao Zhao 2f292bd5c5 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-10 13:07:09 -08:00
nicknak 7cc7147cd5
Testing x pack jest integration (#26825)
* progress

* progress

* cleanup and elastic configs

* make upgrades to support adding aditional users, with

* use defaultDeep to ensure settings pass correctly

* move needed configs to start servers into kbn_server (except x-pack plugin paths and users)

* move xpack config to an export

* add more time

* diff rollbacks

* roll back prettier diff

* revert setupUsers signature

* remove more bluebird

* update bluebird for fixes with jest compatability

* fix ts errors

* dont allow jest to keep going making errors confising

* Separates configs for jest integration core/x-pack.

* Pass nested kbn config parameters.

* Adds example x-pack integration test using live es.

* Cloud detectors should be configurable for tests.

* Cloud detectors should use native promises only.

* No erroneous comments...

* Util is only for promisify, duh!

* New tests should have docuementation to help those looking to utilize them.

* Doc section headings should be consistent with each other.

* With git there is no need to commit commented code.
2019-01-10 14:31:12 -05:00
Fuyao Zhao e7f9090060 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-10 08:38:03 -08:00
Spencer e8ba176f87
Implement built_assets directory (#27468)
* [sass] build sass into built_assets directory

* [optimize/dlls] move dll optimization into built_assets directory

* [dlls] update path to dll manifest

* [built_assets] ignore when searching for notice files

* [sass] build into variable directory

* revert changes to ui_export_types/style_sheet_paths.js

* revert changes to ui_export_types/style_sheet_paths.test.js

* [uiExports/styleSheetPaths] switch .scss extension for stylesheets that are already compiled

* update comment for clarity

* [testBundle] include css from built_assets

* [dlls] move url to built_assets/dlls

* fix merge conflict issues

* [server/sass] pass log in test
2019-01-09 17:30:29 -07:00
Fuyao Zhao 78af65ebad Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-09 13:14:50 -08:00
Joel Griffith 8a6264c34e
Quick smoke test of chromium on startup for diagnosing (#28001)
* Quick smoke test of chromium on startup for diagnosing
2019-01-09 08:07:57 -08:00
Fuyao Zhao f48000022c Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-07 21:59:21 -08:00
Matthew Kime 9311f19732
undeprecate calling scripts from npm / yarn run (#27850)
* undeprecate calling scripts from npm / yarn run

* add sasslint

* use npm-run-all and remove elasticsearch task

* remove sterilize, bad merge
2019-01-06 21:18:07 -06:00
Matthew Kime ab0d678845
remove grunt sterilize (#27825) 2019-01-04 21:48:33 -06:00
Chandler Prall dd47972cec
Sasslint precommit hook (#28095)
* Remove SCSS linting from dev server

* Add sasslint to precommit hook
2019-01-04 12:14:03 -07:00
Fuyao Zhao c68c2d74c2 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-03 11:21:41 -05:00
Chandler Prall 23037a3760
Add SCSS linting (#27328)
* scss linting POC

* update yarn.lock

* Include sass linting alongside es/ts lint tasks

* fix linting errors

* replace unceccessary selector on rollup creation
2019-01-03 09:01:43 -07:00
Matthew Kime 5f8d53c29f
Make test runners available from yarn run test:* (#26671)
* yarn test:mocha yarn test:jest, x-pack too

* remove inline comments, deprecate test:server and replace with test:mocha
2019-01-03 06:32:04 -06:00
Søren Louv-Jansen 277634507f
Remove isomorphic-fetch (#27878)
* Remove isomorphic-fetch

* Fix tests

* Fix ui_settings tests

* Bump deps
2019-01-02 23:08:52 +01:00
Nathan Reese 20ff1f64ca
EUI 6.0.1 (#27787)
* EUI 6.0.1

* update snapshots
2018-12-26 14:30:27 -07:00
Fuyao Zhao dec6b4bc4a [Code] Fix additional type errors after merge 2018-12-20 23:26:49 -08:00
Fuyao Zhao 57239b0656 [Code] remove uneccesrary dependencies 2018-12-20 15:29:29 -08:00
Fuyao Zhao 57ab68cda6 Merge remote-tracking branch 'origin/master' into feature/merge-code 2018-12-19 22:31:19 -08:00
Fuyao Zhao dfe54f7643 [code] fix additional type errors 2018-12-19 22:24:26 -08:00
Yulong cb5ab56bd5 [Code] using a static linked nodegit (#27189)
* patch native modules for nodegit during kibana build

* bump sinon version

* try not using network during git tests.

* add clone option

* move nodegit related tests from jest to mocha (#27366)

* move nodegit related tests from jest to mocha
2018-12-18 16:24:28 -08:00
Tiago Costa efdf63dfc2
Optimize with thread loader and terser (#27014)
* multi thread expensive loaders

* revert styles

* feat(NA): added thread-loader and cache-loader to base optimizer and dll compiler.

* feat(NA): added cache-loader and thread-loader to the optimizer and dll compiler.

* feat(NA): use new terser plugin instead of old unmaintained uglifyjs webpack plugin.

* refact(NA): remove unused configs from base optimizer and dll compiler.

* fix(NA): available cpu calculated number.

* docs(NA): fix comment about what we are doing in prod on base_optimizer config.

* docs(NA): explain why we are setting memory into each thread loader worker.

* fix(NA): add dev only loaders to the thread-loader warmup config.

* refact(NA): change name from babelCacheDir to babelLoaderCacheDir.

* fix(NA): logic for calculating available cpus.

* feat(NA): pass NODE_OPTIONS along for the optimizer forked process and also for the optimizer workers.

* feat(NA): remove terser webpack plugin compression from base_optimizer and only run it on dll compiler.

* chore(NA): update function to calculate available cpus for works.

* fix(NA): apply upperbound to the number of workers we can have on thread-loader.

* fix(NA): decrease the max number of thread pool workers. refact(NA): use the same calculated number of cpus to use on parallel tasks on thread loader pool config for terser parallel. refact(NA): lower down the poolTimeout on non dev mode. refact(NA): change devOnlyModules to nonDistributableOnlyModules on warmupThreadLoader config.

* chore(NA): update yarn lock deps after merging with master.
2018-12-18 19:29:50 +00:00
dave.snider@gmail.com a94fd11a3e
EUI 5.8.1 comes with a brand color refresh. Also removes lots of KUI (#27009)
EUI 5.7.0 had a color refresh which switched around our palette to better match branding guidelines. Hex colors are still hard coded in large parts of Kibana so most of the changes not in kbn/ui-framework are simple shifts to match that styling.
2018-12-18 10:59:31 -08:00
Bhavya RM 7b2b47c46e
Adding a11y rules from tslint-microsoft-contrib to tslint (#26888) 2018-12-18 06:25:31 -05:00
CJ Cenizal fa1fb5441b
Upgrade EUI to 5.6.2. (#27327) 2018-12-17 11:52:13 -08:00
Josh Dover 08fd427125
Establish pattern for typing legacy plugins (#26045)
* Add legacy types and export them for plugins
* Add support for core_plugins to import from 'kibana'
2018-12-17 12:52:21 -06:00
Nathan Reese 459099199e move moment to peerDependency in elastic-datemath (#27264) 2018-12-14 15:42:32 -08:00
Larry Gregory 6d96983745
Angular module updates (#27211) 2018-12-14 11:45:05 -05:00
Chandler Prall cb48cd6432
update eui to 5.6.1 (#27145) 2018-12-13 14:38:53 -07:00
Leanid Shutau 46a8ad4a53
[I18n] Register translations before plugins init (#26078)
* Register translations before plugins init

* Fix i18n engine initialization

* Fix translationPath$ RxJS pipeline

* Move translations registration to mixin

* Fix arrays concatenation

* Use prettier

* Fix translations relative paths

* Use globby instead of glob

* Update docs

* Move globby to dependencies

* Get rid of translation directories config

* Update globby patterns

* Search only for current locale translation files
2018-12-12 15:03:58 +03:00
Mengwei Ding 459cbe43a5
upgrade resize-observer-polyfill version (#26990) 2018-12-11 14:00:18 -08:00
Joe Fleming f88a884440
Fix: Support columns with dots (#26659)
Closes https://github.com/elastic/kibana/issues/26405

Upgrades tinymath so that columns with dots now work correctly.

---

To test, follow the details in #26405.

1. Get some data that has fields with dots in them. Beats data would work, or you can create a test index with just 2 documents as follows: 

```
POST test/test
{
  "string":"abc",
  "with.dot":"abc"
}
POST test/test
{
  "string":"abcd",
  "with.dot":"abcd"
}
```

2. Create a pie chart, splitting labels on one of the available fields.

Previously, given the POST info above, only `string` would work correctly. Now both (and both of their `.keyword` variants) work correctly.

![dec-04-2018 13-35-47](https://user-images.githubusercontent.com/404731/49473970-b2cf7a00-f7d0-11e8-995b-e1a5e2a2acba.gif)
2018-12-11 14:54:34 -07:00
dave.snider@gmail.com 3d6329fe1d
EUI 5.6.0 (#26839)
* eui 5.6.0

* Import IconType in infra/types/eui.d.ts
2018-12-10 19:00:25 -08:00
Tiago Costa 45a67701f2
Upgrade to NodeJS 10 (#25157)
* feat(NA): upgrade node js version on file configs.

* chore(NA): migrate configs and 3rd party dependencies to work on node js 10.x

* fix(NA): add missing async function declaration.

* chore(NA): updated elastic/good package to work with node10

* chore(NA): update lockfiles.

* fix(NA): add missing dep.

* fix(NA): types for node 10.

* test(NA): fix error return type for node10.

* fix(NA): kbn-pm webpack config to unlazy a require using lazy-cache. fix(NA): build to work with node 10.

* test(NA): jest integration test for kbn-pluin-helpers.

* test(NA): fix jest tests for kbn-es.

* fix(NA): use ostmpdir instead of a tmp folder inside the fixtures.

* fix(NA): change afterEach on kbn es decompress test.

* fix(NA): change afterEach on kbn es decompress test.

* fix(NA): readd mock-fs for the tests that still use it on kbn-es and that works on node10.

* fix(NA): readd mock-fs for the tests that still use it on kbn-es and that works on node10.

* refact(NA): rewrite tests using mock-fs and completely remove this dependency.

* fix(NA): failing test implementation using jest mock in order to replace mock-fs.

* fix(NA): update jest snapshots to match new ones generated one node 10.

* fix(NA): cli/cluster mock to spyOn off method instead off spyOn removeListener as this was changed on Node 10.

* fix(NA): tests for cluster_manager to also spyOn off and on instead of addListener and removeListener

* test(NA): fix management advance settings image field test flow.

* fix(NA): apply missing types for src/core/server/plugins/discovery/plugins_discovery.ts.

* test(NA): updated 2 missing snapshots for KuiCodeEditor on kbn-ui-framework.

* refact(NA): fix eslint errors.

* refact(NA): fix ts code with tslint fix. chore(NA): update jest snapshots.

* chore(NA): migrate kbn config schema peer dependency to last used joi version to avoid warning on bootstrap.

* fix(NA): tslint errors.

* chore(NA): upgrade types node to the last version.

* fix(NA): missing utf8 input format encoding when reading a file.

* chore(NA): upgrade to node 10.14.1

* fix(NA): Buffer api usage to avoid deprecation warnings.
2018-12-10 17:41:51 +00:00
Tiago Costa d5b2c8eaf2
Create vendor dll for the client modules (#22618)
* feat(NA): first dll bundler code.

* chore(NA): upgrade to webpack 4.

* chore(NA): updated package.json

* chore(NA): removed old code.

* chore(NA): add parallel option.

* chore(NA): removed console log and old var about  node modules.

* chore(NA): turn off unsafe cache.

* chore(NA): update lock files.

* chore(NA): new config for dll generation.

* chore(NA): update stats emit.

* chore(NA): update dependencies.

* chore(NA): right cache loaders.

* chore(NA): remove ui_bundles alias.

* feat(20749): init implementation on bridge plugin for dll bundler.

* feat(20749): init implementation for dll compiler.

* feat(20749): dll bundler init from other process and webpack wrapper..

* feat(20749): optimizer changes to integrate with  dll bundler.

* chore(20749): split into different processes.

* refact(20749): change to single running process.

* refact(NA): improvements on dll bundler plugin.

* refact(NA): removing including loop on plugins.

* refact(20749): only run dllReference once.

* chore(20749): todo on result.request path building.

* chore(NA): lock files updated.

* chore(NA): avoiding dll paths being removed.

* chore(NA): tests on sync generation.

* chore(NA): changes on entry paths compiler.

* chore(NA): different hooks tests.

* chore(20749): first working version, single process, for dynamic building dll.

* feat(20749): last gross features for the dynamicdllplugin.

* refact(20749): string interpolation when creating the path to delete in every optimizer cycle. feat(20749): creating the DynamicDllPlugin foundations.

* chore(NA): updated base optimizer run function args.

* chore(20749): first working solution with vendor dll both for prod and dev.

* chore(20749): useful todos on client dlls.

* feat(NA): auto built blacklist for server node_modules.

* refact(NA): removed unused code.

* chore(NA): update all webpack and loaders stuff to last versions.

* refact(NA): first refacts on clean taks related with dll. feat(NA): added clean empty folders task.

* refact(NA): removed support for console logs during the build.

* refact(NA): removed extra space.

* refact(NA): removed extra space.

* refact(NA): getDllModules function.

* chore(NA): removed unsafeCache option.

* feat(NA): removed unsafeCache option.

* refact(NA): apply general inheritance principles to the optimizer: hooks, and init. refact(NA): merge dynamic dll plugin into the common config. refact(NA): restore old template structure - vendors.dll style is always emitted.

* fix(NA): fs_optimizer run function by not returning inside async func.

* fix(NA): change template anchor name from vendor to vendors.

* docs(NA): added info about files were keeping when cleaning the bundles.

* fix(NA): filtering elible dll modules to delete.

* refact(NA): removed old dll bundler in favor on new dynamic dll plugin.

* refact(NA): initial split for clean modules on dll task.

* refact(NA): update new dll config model. refact(NA): update config on dynamicdllplugin.

* refact(NA): major work refactor for dynamic dll plugin.

* refact(NA): extract clean node modules on dll task to its own folder.

* refact(NA): organize imports.

* docs(NA): add docs to registerCompilerHooks function for the optimizer.

* refact(NA): finished refactor for dynamic dll plugin with correct error handling for runWebpack function.

* refact(NA): basic structure for clean client modules on dll task.

* fix(NA): resolve path for dll manifest during cclean build tasks.

* refact(NA): split webpack dll related functions to their own file for clean client modules on dll task.

* refact(NA): added error handling for the clean client modules on dll task - webpack dll related functions.

* docs(NA): added license header.

* refact(NA): complete split out the functions from the clean modules on dll task to the code_parser file.

* refact(NA): main task entries compose.

* docs(NA): extend docs for the getDependenciesFromFile function.

* refact(NA): final structure split for clean client node modules dll task.

* fix(NA): added missing param to calculate top level dependencies.

* docs(NA): completed todo description about dll location.

* fix(NA): add production option to webpack config on kbn-pm.

* docs(NA): extended documentation about style extraction.

* refact(NA): removed extra comments.

* feat(NA): env variable to force dll creation.

* feat(NA): include option to define folders to keep on delete empty folders task.

* refact(NA): remove unused method from dll compiler.

* feat(NA): move dlls outside bundles folder and support request for /dlls from a browser perspective.

* chore(NA): gitignore updated to include new dlls folder.

* chore(NA): eslintignore updated.

* chore(NA): removed strange file from repo.

* test(NA): fix failing tests for bundles_route.

* fix(NA): change paths array to path string in a server route config.

* fix(NA): remove infinite loop calls on register hooks functions.

* fix(NA): readFile should only override the file in case it not exists.

* refact(NA): removed dll compiler finish log on success with stats.

* fix(NA): dll compiler alias.

* fix(NA): dynamic dll plugin flow on needs compile.

* fix(NA): raw alias config.

* Revert "fix(NA): raw alias config."

This reverts commit ebb245a786.

* feat(NA): raw alias for moment on dll config model.

* fix(NA): removed uiBundles from base_optimizer call on dynamicdllplugin.

* chore(NA): decrease moment versions.

* chore(NA): temporary changes on dll compiler.

* fix(NA): majority of problems between dll approach, webpackshims and browser tests.

* fix(NA): webpackShims integration with client vendors dll. fix(NA): enable esm modules mutability for development. fix(NA): only clean dll contents from build when they belong to node_modules.

* fix(NA): fix for endless dll compilation loop.

* fix(NA): removed esm plugin and skipped test using wrong stub strategy.

* docs(NA): added some comments for the skipped test.

* feat(NA): considering requires inside webpackShims valid entry paths to add to the dll entry file.

* fix(NA): small fix for the max compilation logic.

* docs(NA): add small explanatory note.

* fix(NA): building requires results with relative requires found onn webpackShims.

* docs(NA): add small note for error handling on dll compiler.

* fix(NA): move precinct to prod dependencies.

* test(NA): testing running functional tests on production.

* fix(NA): restore tests run config for development flag. feat(NA): force dll creation with uiBundles is Dev flag.

* chore(NA): update dependencies.

* feat(NA): test update dll to completely match base optimizer one.

* fix(NA): removed ts.

* refact(NA): removed unused consts.

* fix(NA): set back transpile sacss task in place.

* fix(NA): fix resolve remoing ts and tsx.

* fix(NA): set back transpile sacss task in place.

* fix(NA): removing isDevmode from mustCompileDll.

* fix(NA): add search for import statements into the dependencies visitor.

* fix(NA): add dll suffix to vendors resource on ui bootstrap template.

* fix(NA): some configs for unrelated dll work projects.

* chore(NA): upgrade canvas plugins webpack build to webpack4.

* chore(NA): add shim for moment-duration-format.

* chore(NA): stup moment-duration-format into the moment webpackShim.

* chore(NA): setup moment-duration-format into the moment-timezone webpackShim.

* fix(NA): moment and moment-timezone webpackShims

* chore(NA): added moment and moment-timezone webpackShims to x-pack. fix(NA): revert changes on webpackShims for oss kibana.

* fix(NA): xpack webpackshims for moment.

* fix(NA): remove xpack webpakcshims for moment.

* fix(NA): webpakcshims for moment.

* fix(NA): remove every changes from webpackShims and xpack webpackShims.

* fix(NA): fix visitors to gather server dependencies resulting from export * from and export x, 'x' from.

* chore(NA): update some webpack related dependencies.

* fix(NA): in the dll the plugins need to have their own dependencies. It is the same for the ones into the tests relying on test against distributable.

* feat(NA): including test/plugin_functional plugins into the kbn-pm bootstrap tasks.

* fix(NA): wrong built yarn lock files.

* chore(NA): updated webpack related dependencies.

* feat(NA): add missing color for dynamic_dll_plugin logging tag.

* chore(NA): removed forgotten console.log.

* chore(NA): removed forgotten dead code.

* chore(NA): removed missing old comment.

* docs(NA): added missing notice for 2 tools we have relied on.

* refact(NA): added is to a boolean variable to keep the consistency inside the code parser strategies.

* fix(NA): update notice cli to exclude search inside dlls bundles. chore(NA): update notice file.

* feat(NA): use lodash matches in the code parser visitors logic.

* docs(NA): updated notice file related with the code parser visitors logic..

* docs(NA): added explanation for the process that decides if we should build a new dll or not.

* test(NA): added missing tests for some usefull parts of the code.

* refact(NA): split registerCompileHook function into small ones.

* chore(NA): uncomment scripts from tests.

* feat(NA): isolate code-parser in a kbn package

* fix(NA): missing relative dot into the cwd function.

* chore(NA): update all inter deps to match.

* fix(NA): rebuild the yarn locks and the package jsons based on master ones.

* fix(NA): move babel-code-parser to the prod deps.

* chore(NA): include build path instead of the base root path.

* refact(NA): integrate plugin_functional test plugins with workspaces.

* fix(NA): include missing license for plugin functional test plugins.

* fix(NA): always write posix paths into the dll entry file in order to make the dlls compilation working on windows too. chore(NA): improve error handling into dll compiler.

* fix(NA): revert wrong moved line from canvas.

* fix(NA): match ts-loader version between kibana and x-pack.

* fix(NA): sync dll compiler with base_optimizer.

* fix(NA): exclude kbn-interpreter from the dll.

* refact(NA): remove exclusion of kbn-interpretor from base_optimizer.

* chore(NA): add dlls folder to the yarn kbn clean script.

* fix(NA): missing utf8 input format encoding when reading a file to create the hash into the watch optimizer cahce.

* refact(NA): re-engineering to the dynamic_dll_plugin logs and lifecycle.

* fix(NA): update clean node modules task to search under legacy/core_plugins.

* fix(NA): fix build on windows with globby on cleaning dlls for the watch optimizer cache.

* docs(NA): update documentation for the clean client node modules build task.

* docs(NA): added extra comment to clarify the purpose for the built entrypoints.

* chore(NA): update clean client node_modules code to use posix path.

* feat(NA): add support for discovering server entries over the legacy plugins and the new plugins.
2018-12-05 15:45:19 +00:00
Spencer a64afc0559
[@elastic/datemath] add .npmignore file (#26664)
* [@elastic/datemath] add .npmignore file

* bump @elastic/datemath versions
2018-12-04 15:28:32 -08:00
Spencer 0b4ae5020b
[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-03 16:01:16 -08:00
dave.snider@gmail.com ee3b22dc85
Update to EUI 5.3.0 (#26485)
* update to EUI 5.3.0
2018-12-03 14:14:12 -08:00
Joel Griffith 837a054466
Removes event-stream package (#26205)
* Removes event-stream package (and sub-deps) + implements a similar API to what we were using

* Removing array_streams in favor of existing utils

* Fixing lockfile

* Allow report-errors to propogate through (don't catch)

* [cli/reloacConfig/test] update test to use promises

* avoid mixing async and Promise.then more than necessary
2018-11-28 13:47:12 -08:00
spalger eed9f86a26 [yarn] fix alphabetical order in deps 2018-11-28 06:37:16 -08:00
Tiago Costa afb581fa14
Watch optimizer cache invalidation (#24172)
* 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 04:15:54 +00:00
Tyler Smalley 3909d8bed6
Bump node to 8.14.0 (#26313)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-11-27 19:03:52 -08:00
Spencer c6ce1a6ca0
[kbn/pm] allow packages to define extra paths to clean (#26132)
I noticed some discussion about how kbn clean should probably clear out the `.eslintcache` file, since it doesn't handle changes in related modules (for things like the import plugin) and it would be nice if `yarn kbn clean` took care of the issue. I figured it's not a bad idea, but adding `.eslintcache` directly to `@kbn/pm` felt wrong, so instead I've added another config options that can go in the package.json file, `clean.extraPatterns`. This array of patterns is passed into `del()` so that it can include things like negation.

As the name suggests this doesn't override the initial paths, just adds some extras that will be checked and cleared when `yarn kbn clean` is run.
2018-11-27 10:04:57 -08:00
Spencer 54f1a739cd
[@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
2018-11-23 14:16:38 -07:00
Peter Pisljar f82d73285a
Ref/canvas interpreter2 oss take5 (#26068) 2018-11-23 06:37:25 +01:00
Lukas Olson e36767a4b3 Move buildEsQuery to a package (#23345)
* fix: move buildEsQuery to utils

* fix: tests that I broke

* fix: add back link to the docs

* fix: don't export from ui/ and link to utils

* fix: move to a package

* fix: move error to errors.js

* fix: paths for peg task

* fix: update reference to kuery

* fix: build step for transpilation

* fix: add typescript declaration file

* fix: test

* tmp: debug individual tests

* debug: add debug stuff for reporting tests

* try to debug test

* Testing splitting reporting jobs in two

* Testing splitting each job

* Fix ci yaml

* Skipping job to check failing test

* debug - adding a catch to jobResponseHandler on report

* Testing a different job and enabling verbose mode

* Testing verbose on phantom_api skipping other CI tests

* Fix script mode

* fix: try running tests in chromium

* fix: move out of devDependencies

* fix: remove commented test

* Revert "fix: try running tests in chromium"

This reverts commit 991d46f051.

* Revert testing changes

* Fixing build for phantomjs

* Revert CI configuration to master. Remove verbose logging for tests
2018-11-22 15:24:19 +01:00
Søren Louv-Jansen acff23e810
[APM] Migrate to Typescript and refactor backend apis (#25848) 2018-11-22 10:30:25 +01:00
Joe Fleming 4f1ca7e07f
Fix: revert and enable canvas tests (#26054)
## Summary

CI was broken when enabling functional smoke tests via #25262. The problem is that the Kibana build is broken in master...

I think #25711 broke it, which was merged in between #25262 passing and it being merged (and then CI breaking). So this PR reverts that PR and enabled canvas smoke tests again to see if CI will pass.

- Revert #25711
- Revert 7ae0d28d87
2018-11-21 16:25:12 -07:00
Peter Pisljar 43b1d00128
move canvas interpreter to OSS (#25711) 2018-11-20 09:56:50 +01:00
Jonathan Budzenski a3ecbde2de
Swap jstimezonedetect with moment.tz.guess (#21800)
* Swap stimezonedetect with moment.tz.guess

* fix yarn.lock

* fix merge
2018-11-19 16:24:25 -06:00
Tiago Costa 1155b81b4f
Remove husky (#24887)
* 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 01:34:45 +00:00
Josh Dover 77522a7bd2
[kbn-pm] Use yarn workspaces for dependencies (#24095) 2018-11-12 12:38:11 -06:00
Brandon Kobel 0fcd992232
Upgrading grunt-contrib-watch (#22818) 2018-11-08 14:09:00 -08:00
Chandler Prall a62252ce40
Update EUI to v5.0.0 (#25316)
* update EUI to v5.0.0

* update snapshots

* revert snapshot change

* revert snapshot change (2)
2018-11-08 10:16:44 -07:00
nicknak c2425c1cdd
Auto open browser on server startup (#24843)
* 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 09:12:01 -05:00
Tyler Smalley 3fc47bad79
[build] Uses node-archive to zip/tar packages (#25335)
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 16:11:08 -08:00
Tyler Smalley fba9cc40ea
Revert "[build] Uses node-archive to zip/tar packages (#25031)" (#25326)
This reverts commit d89cc0ee15.
2018-11-07 13:12:18 -08:00
Tyler Smalley d89cc0ee15
[build] Uses node-archive to zip/tar packages (#25031)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-11-07 10:43:10 -08:00
Brandon Kobel 8431348bc0
Updating request to ^2.88 (#25236) 2018-11-07 08:12:26 -08:00
Jonathan Budzenski fa8237d197
[build] Support version-qualifier flag (#21663)
* [build] Support version-qualifier flag

* add help description

* fix test

* is-release

* temp: re-add alpha1 to package.json

* use version qualifier in build

* fix merge

* Revert "temp: re-add alpha1 to package.json"

This reverts commit a70688542c.

* x-pack

* remove ci build flag

* remove ci build flag

* remove qualifier from canvas

* remove qualifier from infra

* fix x-pack argv

* update comment
2018-11-02 09:39:12 -05:00
Bhavya RM 4c0a5e5a67
Adding jsxa11y into eslint rules (#23932) 2018-11-01 12:47:16 -04:00
Brandon Kobel 6c95237e89
Reverting 22816, upgrading mocha is breaking the custom reporter (#24951) 2018-10-31 17:41:07 -07:00
Tyler Smalley 23ed411bab
Allows build to be ran on Windows (#24374)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-10-30 19:58:50 -07:00
Spencer ce0cae64bd
[yarn] bump elasticsearch-js and makelogs (#24767)
In order to support esjs apiVersion 6.5 we need to upgrade to the newly released version of elasticsearch-js. Bumping makelogs allowed us to keep only one version of the elasticsearch module installed.
2018-10-29 18:16:10 -07:00
Spencer dc89a9dc61
[dev/build] scan node_modules rather than lots of deleteAll() calls (#24692) 2018-10-29 13:02:04 -07:00
Catherine Liu 3b0cc4e886
Upgrades Tinymath (#24457)
* Bumped tinymath to v1.0.0

* Bumped tinymath version to 1.1.0
2018-10-25 14:18:15 -07:00
Josh Dover 27e5406d7a
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
2018-10-25 16:01:12 -05:00
Leanid Shutau 71d284469b
[Tools] Add "values" property validation (#22538)
* [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 14:09:23 +03:00
liza-mae 7fbcd6e1d3
Upgrade husky (#24432)
* Upgrade husky

* Add yarn.lock
2018-10-23 16:19:01 -06:00
Søren Louv-Jansen 3151da280b [APM] Distributed Tracing (#24062)
* 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-23 16:34:23 -04:00
Spencer 1bcdeab4dd
[build] add --all-platforms flag (#24363)
The build script currently builds artifacts for all platforms, which is a slight waste of time on CI and when testing locally. Instead, the default behavior of the build script in this PR is to only build the artifact for the current platform. If the `--all-platforms` flag is supplied (the default when run via `yarn build`, and therefore when building a release) artifacts for all platforms will be created along with deb/rpm packages.
2018-10-23 13:29:15 -07:00
Brandon Kobel 1b2e7f4194
Upgrading mocha to 5.2.0 and gulp-mocha to 6.0.0 (#22816)
* 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-22 07:37:10 -07:00
Josh Dover 3fc8b35da8
Add server OS information to telemetry stats (#23793)
* Add server OS data to monitoring collector and telemetry

* Fixup naming

* Fix functional tests
2018-10-20 10:45:14 -05:00
dave.snider@gmail.com ab29946740
update eui to 4.5.1 (#24218)
* 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 18:30:06 -07:00
Felix Stürmer 5441d74eca
Move mustache typings to devDependencies (#24165)
This moves the `@types/mustache` package from `dependencies` to `devDependencies` to avoid unnecessary inclusion in the build artifacts.
2018-10-18 17:00:08 +02:00
Matt Apperson e405993c73
Beats Management (#23819)
* [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)

* 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

* add details page, re-configure routes

* move tag crud to new route stuff

* update tag create/edit component api

* tags creation now working

* bunch of stuff I should have split up better…

* fixed perf bug, selected items that are removed are no longer phantom selected

* fix rendering of assignments

* remove assign to beats, the UX was too poor

* Beats/config view (#22177)

* [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

* add details page, re-configure routes

* move tag crud to new route stuff

* update tag create/edit component api

* tags creation now working

* bunch of stuff I should have split up better…

* fixed perf bug, selected items that are removed are no longer phantom selected

* fix rendering of assignments

* remove assign to beats, the UX was too poor

* [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/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

* progress on config forms

* config view inital input types working

* ts fixes

* fix more ts

* code now errors on invalid yaml

* remove un-needed include

* fix bad rebase

* saving config blocks as yaml to db is now working

* propperly formatted YAML

* loading tags back on edit screen in-progress

* fix types

* vis name validation for tag

* update EUI style

* tweak design

* fixed tag assignments (still has a ui glitch)

* fix form validation on select

* fix deps

* update deps

* attached beats now works in the edit tag screen, edit now disables changing the tag id

* better un-parsing of yaml, some elements now rendering to edit config blocks

* delete config block now works

* fix ability to edit config

* fix deps

* fix another rebase issue

* tweaks and fixes

* fix several bugs

* Beats/security (#22500)

* client side security working

* check license on route

* forgot a file

* [Beats CM] Add beats details pages (#22455)

* Move edits from previous details branch.

* Add tag view to beat details.

* Added notifications for add/remove tag from beat.

* Fix dependencies upgrade/downgrade add/removes.

* Create new page files for each sub-section of details view.

* Move page functionality from dedicated components to pages.

* [Beats CM] move to json for configs (#22693)

* move to json for configs, fix some tests

* tweaks

* add fixes (#22711)

* add fixes

* return only one config

* much improved validation for hosts, no longer require not required fields, no longer have JS in the config form config

* fix condition argument

* [Beats CM] Improve UX for assignment of tag to list of beats (#22687)

* Improve UX for assignment of tag to list of beats.

* Revert a change.

* [Beats CM] Sort beat list tags (#22729)

* Add logic to sort tags by ID when rendering in Beats List.

* Prefer lodash sortBy over inline sort implementation.

* [Beats CM] Remove key warnings from beat list components (#22772)

* Add logic to sort tags by ID when rendering in Beats List.

* Remove key warnings from beats list and associated components.

* Prefer lodash sortBy over inline sort implementation.

* [Beats CM] Add check for BeatsPage component to avoid setState when unmounted (#22836)

* Add check if component is unmounted when loading Beats List page.

* Move call to loadBeats() to componentDidMount lifecycle function.

* Update field name in table type config. (#23228)

* Utilize TagBadge functional component to standardize display of tag names. (#23253)

* [Beats CM] Add beat name to update endpoint (#23291)

* Update beat index template and update endpoints to expect name type. Add test file for update.

* Update enroll script and endpoint to create a 'name' field for beats.

* Add name field to CMBeat domain type.

* Update functional tests to include name field.

* Fix broken tag assignment functional test.

* Edit beats list table config to display most recently-updated tag time. (#23337)

* Update beat detail view info. (#23369)

* Update beat detail view info.

* Add period to end of update field.

* [Beat CM] Show only tags associated with selected beat (#23398)

* Reenable output config.

* Make beat detail tag page only show tags associated with that tag.

* Display beat name instead of ID on details screen. (#23410)

* [Beat CM] Display config name instead of beat type in beat detail view (#23411)

* Update config table in beat detail view to show config type instead of beat type.

* Modify Beat Detail view to display human-friendly names for config block types.

* [Beats CM] Add password input and re-enable output config schema (#23417)

* wip defining controls

* Complete adding formsy password field.

* Re-enable output config schema definition.

* Simplify import/export for formsy components.

* Add full list of current Filebeat & Metricbeat module (#23258)

This change also renames `Metricbeat input` to `Metricbeat module`

* Beats/ui tweaks (#23655)

* add initial breadcrumbs

* prevent errors

* New routing in place for supporting URLState needed for Kuery bar

* beats table kuery bar “working” (but not submitting)

* pulling activity view from current phase’s spec

* setup link now at correct URL

* kuery bar

* autocomplete bar now working

* Add walkthrough (#23785)

* add test system, framework, and example tests

* adding walkthrough

* clicking walkthrough step should take you to that step

* try/catch beats loading to prevent unhandeled error when there are no beats

* fix walkthrough not redirecting to main beats page

* update yarn lock files

* fix prettier

* fix x-pack package.json formatting

* update kbn server creation

* remove types from old table implementation

* move to Boom.boomify

* fix TS errors

* fix type

* rollback dep version

* fix more conflicting dep issues

* deps

* force correct node type resolution

* cleanup and skip tests (kbn test util is broken)

* added formsy and basePath

* update yarn lock file

* add beats management icon

* rename beats management main section

* Tags now called Configuration Tags in the tabs

* tokens must expire at most after 2 weeks

* fix bad auto-import

* beat details now shows the extra data needed

* tweak package.json deps for continuity

* update yarn lock for new yarn version

* [Beats CM] Re-arch table assignment control definitions (#23663)

* Patch changes to latest feature branch.

* Update table controls to offer standard search bar if kuery bar props not provided.

* Tweaked enrollment UI to inlcude beat type selection

* Reduce badge list gutter size, change logic for tag assignment to unassign all if some selected. (#24091)

* dont use genaric search bar

* removed unused import

* fix es-lint error

* fix outputs

* fix types from infra merge

* remove dupe dep

* update lock file

* push another lock file

* Add unfilteredBeats field to beat list state to prevent inappropriate redirect. (#24146)

* fix yarn lock because yarn is dumb

* Fix broken tests
2018-10-17 22:06:43 -04:00
Jonathan Budzenski 6458e488fe
Bump chromedriver to 2.42.1 (#23648) 2018-10-17 18:19:19 -05:00
Felix Stürmer 36caa6badd
[Infra UI] Merge InfraOps feature branch (#24068) 2018-10-17 12:07:50 +02:00
Spencer d22bdfec46
[yarn] Upgrade to 1.10.1 (#23971)
* [yarn] upgrade required version

* [yarn] update lock files to include integrity

* [yarn] coalesce locked readable-stream versions to avoid yarn bug
2018-10-15 14:34:30 -07:00
Brandon Kobel 5d19ace725 Switching to using a fork (#23422) 2018-10-15 18:04:27 +01:00
Aleh Zasypkin 70c4e718a0
Add Kibana bootstrap step to generate types exposed by the core and its plugins. (#23686) 2018-10-05 21:00:26 +02:00
dave.snider@gmail.com 37bed9b51b
Eui 4.4.1 (#23790)
Updates EUI to 4.4.1 and includes some minor homepage changes around icons.
2018-10-04 09:35:29 -07:00
Aleh Zasypkin b2baf32fba
Expose core config schema validation system as @kbn/config-schema package. (#23609) 2018-10-04 09:18:40 +02:00
Aliaksandr Yankouski a002ee4369 i18n engine typescript migration (#22441)
* 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 11:55:15 +03:00
Aleh Zasypkin 73f955db19
Upgrade eslint/tslint/prettier plugin versions. (#23470) 2018-09-27 11:54:09 +02:00
Maryia Lapata 110c987c89 Update versions of @babel/parser and @babel/types (#23268)
Update versions of @babel/parser, @babel/types, eslint, babel-eslint
2018-09-25 14:35:31 +03:00
Josh Dover eb1cfaf0f8
Add jenkins:report task for test failures (#22682)
* Add jenkins:report task

* PR comments
2018-09-21 09:31:51 -05:00
Joe Fleming 6e3cf4cf05
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:25:51 -07:00
Jonathan Budzenski a1777b789e
Bump geckodriver to 1.12.2 (#21799) 2018-09-18 13:21:30 -05:00
Chris Davies c64624ada3
Add saved object index migrations (#20243)
Migrations are the mechanism by which saved object indices are kept up to date with the Kibana codebase. Plugin authors can write their plugins to work with a certain set of mappings. Migrations ensure that the index actually conforms to those expectations.
2018-09-17 14:24:32 -04:00
Jonathan Budzenski 1f98acb53c
bump elasticsearch (#21786) 2018-09-17 11:48:30 -05:00
Jonathan Budzenski d112a6a1ee
Update package.json (#20353)
* Update package.json

* skip root before resolving
2018-09-17 11:46:03 -05:00
dave.snider@gmail.com f1eb1f2e93
EUI 4.0.1 (#23009) 2018-09-13 16:14:17 -07:00
Spencer b55705e9b4
[ts] enable support for iterators in browsers (#22986)
I was surprised when I tried to spread a `Set` in TypeScript and the browser complained about `Set.slice()` not being defined. This is because TypeScript does not automatically enable support for iterators when targeting earlier ES versions, like we do in the browser, unless you use the `"downlevelIteration": true` compiler option. This injects some helpers into the necessary files for reading/spreading iterators, which can be stuffed behind an import statement with using the `"importHelpers": true` compiler option and include `tslib` in our dependencies. This is already a dependency of several of our packages, so it shouldn't cause any additional modules.
2018-09-13 14:18:13 -07:00
Nathan Reese 5f6a9a628e
bump EUI to 3.11.0 (#22745)
* bump EUI to 3.9.0

* add @types/react-virtualized

* remove react-virtualized from x-pack package.json

* bump to 3.11.0
2018-09-13 06:20:01 -06:00
Spencer 6ded193260 Upgrade to TypeScript 3 (#22792)
LGTM 🎉 🎉 🎉
2018-09-11 08:38:41 +03:00
Spencer 7e94eccc2e
Upgrade to Jest 23.5.0 (#22791)
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 18:36:13 -07:00
Stacey Gammon c9b1d7ad7f
Typings for chromium driver (#22688)
* Typings for chromium driver

* buffer => base64

* remove unused param. consolidate imports
2018-09-07 16:01:39 -04:00
Aleh Zasypkin 3d6de7cbc4
Implement LegacyService. Use core to start legacy Kibana. (#22190)
* Implement `LegacyService`. Use `core` to start legacy Kibana.

* Fix Worker tests

* Do not rely on kbnServer when testing mixins.
2018-09-06 18:39:04 +03:00
Felix Stürmer 3c8d8c622f
Update redux, ,react-redux and corresponding types (#22442) 2018-08-29 13:18:46 +02:00
Søren Louv-Jansen 36a922e0f6
Bump backport to 4.4.1 (#22456)
* Bump backport to 4.4.1

* Update lock file
2018-08-29 00:29:42 +02:00
Spencer c7d451c9a2
[ftr] capture test output and only log on failure (#21903)
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 17:26:30 -07:00
Larry Gregory 1cf1fb7ca0
Bump EUI to 3.7.0 (#22287)
Upgrades EUI from 3.6.1 => 3.7.0
2018-08-24 07:43:01 -04:00
Leanid Shutau ceafa483be
Add ability to skip file writing for messages extraction tool (#21588)
* 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 14:57:32 +03:00
Jonathan Budzenski 5df22e531f
Bump node to 8.11.4 (#22048) 2018-08-16 13:05:17 -05:00
dave.snider@gmail.com f089427f84
EUI 3.6.1 (#22034) 2018-08-15 16:33:27 -07:00
Jonathan Budzenski 351cf92d36
Bump chromedriver to 2.41.0 (#21798) 2018-08-15 13:31:39 -05:00
Nathan Reese 67401cea92
Eui 3.6.0 (#21968)
* bump EUI to 3.6.0

* replace CopyButton with EuiCopy

* remove snapshot file from deleted CopyButton component
2018-08-15 06:46:35 -06:00
Jen Huang 1e6fb80be2
Upgrade to EUI 3.4.0 (#21870)
* Upgrade to EUI 3.4.0
* Update snapshots
2018-08-14 08:42:24 -07:00