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)
* Remove duplicate dep, x-pack/yarn.lock (#26642)
* [npm] prepare @kbn/datemath for publishing (#26559)
We need to share `@kbn/datemath` with `@elastic/eui`, and rather than making them rely on Kibana for their dependencies we've decided to republish `@kbn/datemath` as `@elastic/datemath`. This isn't something we want to do often, so please check with the platform team if you'd like to do this for another module.
* 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.
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.
* [@kbn/interpreter] improve build/packaging (#26096)
Summary of changes:
- move all build artifacts under `target` directory
- run babel and webpack in parallel
- support optional watch and sourcemaps in build
- expose /common /public /plugin /server sub-exports as index.js
- avoid importing deeply from `@kbn/interpreter`
- move a couple missed dependencies from x-pack to kibana
- remove custom babel-register implementation
* fix bad conflict resolution
* 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.
* [kbn-pm] Use yarn workspaces for dependencies (#24095)
* Bumped leadfoot to 1.7.5 now that it issue has been merged. (#17582)
* Copy license to build
* 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
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>
* Increment version number from 6.5.0 to 6.6.0
* Add branch 6.5 to backportrc, sync versions with master
* Undo removal of older version from backportrc
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.
* 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
* 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
* [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…
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
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.
This adds support for autoprefixer which we have been using in Webpack.
Additionally, we have improved the watching functionality and now update builds based directly on their dependencies an not an assumption that the files are children.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Switching from jade to pug (#21047)
* Upgrading pug
* Switching .jade to .pug and fixing templates
* Renaming the I18N usages of jade to pug
* No more jade in I18N
* Renaming root_redirect to .pug
In order to make the awesome new kfetch api easier to consume in purely TypeScript projects, and since it's a pretty small module with very few dependencies, I converted it to TypeScript.
Along with kfetch I also started a type definition file for `ui/chrome` that we can extend as we go, but will likely be unnecessary after #19992
* bump eui
* Fixed breaking `EuiPage` changes
Mainly adding `EuiPageBody`’s where there were none
* bump to 3.0, remove duplicate declaration of EuiFlyoutBody, update jest snapshots
* bump eui
* bump to 3.0, remove duplicate declaration of EuiFlyoutBody, update jest snapshots
* Update jest snapshots in xpack
This upgrades TypeScript to version 2.9.2. My main motivation is the support for generic type arguments in JSX elements and tagged templates (e.g. for `styled-components`).
Problems arising from breaking changes in the new TypeScript version have been mitigated by:
* setting the `keyofStringsOnly` option until impacted code has been
future-proofed
* Restricting some joi-related generics
See the [release notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html) for details.
Some follow-up tasks should be:
* Update EUI to support the new `keyof` behaviour
* Update new platform TypeScript code to support new `keyof` behaviour
* Remove `keyofStringsOnly` setting
* Upgrade to EUI 1.0.1
* upgraded to eui 1.1.0
* fix setInspectorTablePageSize function in functional tests
* better comment about basic table pagination buttons
* Created general driver to accept an argument select the driver to run.
* Added environment variable for driver, changed package.json to use custim leadfoot, and made changes to browserdriver to use any driver.
* Made changes per PR.
* Fixed all nits.