* Ensure that data is not lost when parsing EQL responses
The shared search utilities expect that response data exists in the
response's body field. However, in an EQL response this information also
exists as a sibling to the body field, and so we must normalize this data
into the body before we can leverage these utilities with EQL queries.
* Remove unused EQL parameters
These were previously needed to work around an index resolution but, but
this has since been resolved upstream in elasticsearch via
elastic/elasticsearch#63573.
* Allow custom test subj for Preview Histogram to propagate to DOM
Previously, custom preview histograms were passing a data-test-subj prop
to our general histogram, but the general histogram did not know/care
about this prop and it did not become a data property on the underlying
DOM element. While most of our tests leveraged enzyme, they could still
query by this react prop and everything worked as expected.
However, now that we want to exercise this behavior in cypress, we need
something to propagate to the DOM so that we can determine which
histogram has rendered, so the prop has been updated to be
`dataTestSubj`, which then becomes a data-test-subj on the histogram's
panel. Tests have been updated accordingly.
* Exercise Query Preview during EQL rule creation
* Asserts that the preview displays a histogram
* Asserts that no error toast is displayed
* Add integration tests around EQL sequence signal generation
* Clearer assertion
* Simplify test assertion
* Fix typings
These were updated on an upstream refactor.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add a session service and use it in discover and dashboard
* check unefined
* Start session in visualize
* Fix tests
* docs
* OSS error alignemnt
* Adjust error messages in xpack
* Add getErrorMessage
* Use showError in vizualize
Add original error to expression exception
* Cleanup
* ts, doc and i18n fixes
* Fix jest tests
* Fix functional test
* functional test
* ts
* Update functional tests
* Add unit tests to interceptor and timeout error
* expose toasts test function
* doc
* typos
* lint
* Cleanup
* review 1
* Code review
* doc
* doc fix
* visualization type fix
* fix jest
* Fix xpack functional test
* fix xpack test
* code review
* Add tracking methods to session service
* remove chromium
* Fix ts and jest tests
* jest + docs
* ts fix
* siem test
* Use session service to show a timeout notification per session + more unit tests
* ts and docs
* Remove session service from search source (not needed)
* Code review
* ts
* Single active session in FE session service
* Cleanup
* Don't integrate with dashboard \ visualize
Add functional tests for session toast plugin
* Typescript
* ts
* Improve functional tests
* es
* simplify filter test
* wait until loadedw
* filter test
* delete crypto for now
* Select the correct index 🤦
* timerange
* Adjust functional test logic
* improved test format @dosant
* Handle exceptions
* Don't close sessions automatically, warn instead
* jest
* Adjust functional test
* Remove unused code
* delete export
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Rename types from the top-level plugin
These are the same types with a different name. However, the benefit is
that they exist in a non-restricted path (the top level of the plugin).
* Convert our validation function to use the EQL search strategy
Rather than calling our custom EQL validation endpoint, we can instead
leverage the EQL search strategy. The downside is that we have to move
our response parsing logic to the frontend, but the benefit is that
there's no backend to maintain.
* Remove server code related to our EQL validation endpoint
We're keeping our io-ts schemas for now since they're still being used
to type the I/O of our client function.
* Add the data contract to our KibanaServices
I'm not aware of a way to pass react context to the form lib validator
functions, so for now we have to pass this the ugly way :(
* Remove io-ts types corresponding to our defunct validation endpoint
We were keeping these around for the types, but they're so simple that
it's really not worth the overhead. The tests are similarly for
functionality that is no longer used, so no hard feelings there.
* Ensure that our validation does not bother generating hits
We only care about the query's validity, so we can tell the response
handler to do less work here.
* Pass transport options when retrieving an existing search
Without passing transport options to .get, a query with an `ignore`
would succeed if it completed in the `waitForCompletionTimeout` window,
but fail (with the ignored error) on the subsequent request if it became
async.
* Use constant for our strategy key
* Export search strategy constants for client consumption
Common values cannot be consumed directly by client code (compilation
error), so we need to re-export them from data_enhanced's public module.
* Add EQL search strategy
Since EQL is an x-pack feature, this strategy will live in the
x-pack plugin data_enhanced.
* Refactor our test setup to minimize shared state
* Ensures that the same variable is not used for both test setup and
test assertions
* Ensures that mocks are reinstantiated on every test
* Use explicit top-level exports
* Move async search options to a helper function
* Move our workaround to a helper function
This was repeated in five places, time to consolidate.
* Commit documentation changes
We export a few new helper functions.
* Mark our internal methods as such
Updates documentation accordingly.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Use Search API for TSVB
* Fixed ci
* Fixed ci
* Use constants
* Fixed tests
* Fixed ci
* Fixed ci
* Back old rollup search
* Fixed test
* Fixed tests
* Fixed issue with series data
* Fixed comments
* Fixed comments
* Fixed unit test
* Deleted unused import
* Fixed comments
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Search] Re-add support for aborting when a connection is closed
* Fix types
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Search] Remove long-running query pop-up
* Don't timeout if requestTimeout isn't configured
* Remove unused kibanaUtils
* Remove unused kibanaReact
* Re-add reference to kibanaUtils
* Remove unused translations and update documentation
* Add new x-pack advanced setting searchTimeout and use it in the EnhancedSearchInterceptor
* docs
* Re-add toast when queries time out
* Fix types
* Update error message with capabilities
* Update docs
* Update docs
* Move search server routes into a directory.
* Add internal/_msearch route.
* Remove legacy search API, rewrite default search strategy to use internal route.
* Remove legacy es_client code.
* Handle msearch options on server.
* Remove elasticsearch-browser dependency.
* Update generated docs.
* Rely on server timeout in OSS (?)
Use UI setting in xpack.
* Rename function
* Add features to dependencies
* Undefined check
* doc
* Code review fixes
* code review
* doc
* loading count
* simplify code review and fix jest tets
* type check
* Remove esShard from client
* cleanup request parameters from FE
* doc
* doc
* Align request parameters on server,
Remove leftover parameters from client
Shim responses for search and msearch routes
* docs
Stop using toSnakeCase
Updates jest tests
* add management docs
* docs
* Remove import
* Break circular dep + fix msearch test
* Remove deleted type
* Fix jest
* Bring toSnakeCase back
* docs
* fix jest
* Add new x-pack advanced setting searchTimeout and use it in the EnhancedSearchInterceptor
* docs
* Rely on server timeout in OSS (?)
Use UI setting in xpack.
* Rename function
* doc
* Remove esShard from client
* cleanup request parameters from FE
* doc
* doc
* Align request parameters on server,
Remove leftover parameters from client
Shim responses for search and msearch routes
* docs
Stop using toSnakeCase
Updates jest tests
* add management docs
* docs
* Remove import
* Break circular dep + fix msearch test
* Remove deleted type
* Fix jest
* Bring toSnakeCase back
* docs
* fix jest
* Fix merge
* Fix types
* Allow timeout to be undefined
* Fix jest test
* Upldate docs
* Fix msearch jest
* Merge correction
* docs
* Fix rollup search merge
* Fix merge
* Use i18n
Co-authored-by: Liza K <liza.katz@elastic.co>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Add new x-pack advanced setting searchTimeout and use it in the EnhancedSearchInterceptor
* docs
* Rely on server timeout in OSS (?)
Use UI setting in xpack.
* Rename function
* doc
* Remove esShard from client
* cleanup request parameters from FE
* doc
* doc
* Align request parameters on server,
Remove leftover parameters from client
Shim responses for search and msearch routes
* docs
Stop using toSnakeCase
Updates jest tests
* add management docs
* docs
* Remove import
* Break circular dep + fix msearch test
* Remove deleted type
* Fix jest
* Bring toSnakeCase back
* docs
* fix jest
* Fix merge
* Fix types
* Allow timeout to be undefined
* Fix jest test
* Upldate docs
* Fix msearch jest
* docs
* Fix rollup search merge
* docs
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* add security solution search strategy on server side
* get security solution search strategy in the public app for all host
* fix types
* fix Check core API changes
* thank you cypress test
* Remove any by the right type IESearchRequest
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
* add translation and filter error when we abort the query
* pr review
* fix translation
* review II
* fix merge issue
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
* improve test stability
* Use new client
* docs
* Use asyncSearch endpoints
* Clean up types
* Use transport request for now
* fixes
* Fix functional test
* encode
* remove eslint
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Search] Fix telemetry collection to not send extra requests
* Update tracker to collect duration from ES response
* Fix type check
* Update docs and types
* Fix typescript
Co-authored-by: Liza K <liza.katz@elastic.co>
* [search] Refactor the way search strategies are registered/retrieved on the server
* Fix types and tests and update docs
* Fix failing test
* Fix build of example plugin
* Fix functional test
* Make server strategies sync
* Move strategy name into options
* docs
* Remove FE strategies
* TypeScript of hell
delete search explorer
* Fix search interceptor OSS tests
* typos
* test cleanup
* Update search interceptor tests and abort utils
* [Search] Add telemetry for data plugin search service
* Add tracking of average query time
* Add tests and rename to collectors
* Fix TS
* Fixed interceptor jest tests
* Add to kibana json
* docs
* Properly use observables rather than only during setup
* Update or create
* Swallow version conflict errors
Co-authored-by: Liza K <liza.katz@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [search] Refactor the way search strategies are registered/retrieved on the server
* Fix types and tests and update docs
* Fix failing test
* Move strategy name into options
* Remove FE strategies
* TypeScript of hell
delete search explorer
* Fix search interceptor OSS tests
* test cleanup
* fix
* return search wrapper
* initial api
* Shiny happy cleanup
* docs
* fix jest test
* simplify strategy registration
* fix rebase
* fix rebase
* fix backport
* types
* TS for strategy
* docs
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [search] Refactor the way search strategies are registered/retrieved on the server
* Fix types and tests and update docs
* Fix failing test
* Fix build of example plugin
* Fix functional test
* Make server strategies sync
* Move strategy name into options
* docs
* Remove FE strategies
* TypeScript of hell
delete search explorer
* Fix search interceptor OSS tests
* typos
* test cleanup
* Delete search example
fix interceptor async tests to use fake timers
* docs
* fix
* return search wrapper
* Update search interceptor tests and abort utils
* ts
* jest test fix
* code review
* change how logs consume search API
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* chore(NA): upgrade oss to lodash4
chore(NA): migrate cli, cli_plugin, cli_keystore, dev, test_utils and apm src script to lodash4
chore(NA): missing file for cli plugin
chore(NA): add src core
chore(NA): es archiver and fixtures
chore(NA): try to fix functional test failure
chore(NA): migrate src/legacy entirely to lodash4 except src/legacy/core_plugins
chore(NA): move legacy core plugins to lodash4
chore(NA): upgrade optimize to lodash4
chore(NA): upgrade to lodash4 on advanced_settings, charts, console and dashboard
chore(NA): migrate to lodash4 on dev_tools, discover, embeddable, es_ui)shared, expressions, home plugins
chore(NA): upgrade data plugin to lodash4
chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4
chore(NA): missing data upgrades to lodash4
Revert "chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4"
This reverts commit 137055c5fed2fc52bb26547e0bc1ad2e3d4fe309.
Revert "Revert "chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4""
This reverts commit f7e73688782998513d9fb6d7e8f0765e9beb28d1.
Revert "chore(NA): missing data upgrades to lodash4"
This reverts commit 92b85bf947a89bfc70cc4052738a6b2128ffb076.
Revert "chore(NA): upgrade data plugin to lodash4"
This reverts commit 88fdb075ee1e26c4ac979b6681d8a2b002df74c6.
chore(NA): upgrade idx_pattern_mgt, input_control_vis, inspector, kbn_legacy, kbn_react, kbn_usage_collections, kbn_utils, management and maps_legacy to lodash4
chore(NA): map src plugin data to lodash3
chore(NA): missing lodash.clonedeep dep
chore(NA): change packages kbn-config-schema deps
chore(NA): update renovate config
chore(NA): upgrade vis_type plugins to lodash4
chore(NA): move vis_type_vislib to lodash3
chore(NA): update visualizations and visualize to lodash4
chore(NA): remove lodash 3 types from src and move test to lodash4
chore(NA): move home, usage_collection and management to lodash 3
Revert "chore(NA): move home, usage_collection and management to lodash 3"
This reverts commit f86e8585f02d21550746569af54215b076a79a3d.
chore(NA): move kibana_legacy, saved_objects saved_objects_management into lodash3
chore(NA): update x-pack test to mock lodash4
Revert "chore(NA): move kibana_legacy, saved_objects saved_objects_management into lodash3"
This reverts commit 2d10fe450533e1b36db21d99cfae3ce996a244e0.
* chore(NA): move x-pack and packages to lodash 4
* chore(NA): remove mention to lodash from main package.json
* chore(NA): remove helper alias for lodash4 and make it the default lodash
* chore(NA): fix last failing types in the repo
* chore(NA): fix public api
* chore(NA): fix types for agg_row.tsx
* chore(NA): fix increment of optimizer modules in the rollup plugin
* chore(NA): migrate `src/core/public/http/fetch.ts` (#5)
* omit undefined query props
* just remove merge usage
* fix types
* chore(NA): fixes for feedback from apm team
* chore(NA): recover old behaviour on apm LoadingIndeicatorContext.tsx
* chore(NA): fixes for feedback from watson
* Platform lodash4 tweaks (#6)
* chore(NA): fix types and behaviour on src/core/server/elasticsearch/errors.ts
* Canvas fixes for lodash upgrade
* [APM] Adds unit test for APM service maps transform (#7)
* Adds a snapshot unit test for getConnections and rearranges some code to make testing easier
* reverts `ArrayList` back to `String[]` in the painless script within `fetch_service_paths_from_trace_ids.ts`
* chore(NA): update yarn.lock
* chore(NA): remove any and use a real type for alerts task runner
Co-authored-by: Gidi Meir Morris <github@gidi.io>
* chore(NA): used named import for triggers_actions_ui file
* chore(NA): fix eslint
* chore(NA): fix types
* Delete most uptime lodash references.
* Simplify. Clean up types.
* [Uptime] Delete most uptime lodash references (#8)
* Delete most uptime lodash references.
* Simplify. Clean up types.
* chore(NA): add eslint rule to avoid using lodash3
* chore(NA): apply changes on feedback from es-ui team
* fix some types (#9)
* Clean up some expressions types.
* chore(NA): missing ts-expect-error statements
* Upgrade lodash 4 vislib (#11)
* replace lodash 3 with lodash 4 on vislib plugin
* Further changes
* further replacement of lodash3 to 4
* further work on upgrading to lodash 4
* final changes to update lodash
* chore(NA): upgrade data plugin to lodash4
chore(NA): upgrade data plugin public to lodash4
chore(NA): fix typecheck task
chore(NA): fix agg_config with hasIn
chore(NA): assign to assignIn and has to hasIn
chore(NA): upgrade data plugin server to lodash4
chore(NA): new signature for core api
fix(NA): match behaviour between lodash3 and lodash4 for set in search_source
* chore(NA): remove lodash3 completely from the repo
* chore(NA): fix x-pack/test/api_integration/apis/metrics_ui/snapshot.ts missing content
* chore(NA): fix lodash usage on apm
* chore(NA): fix typecheck for maps
* Patch lodash template (#12)
* Applying changes from https://github.com/elastic/kibana/pull/64985
* Using isIterateeCall, because it seems less brittle
* Also patching `lodash/template` and `lodash/fp/template`
* Reorganizing some files...
* Revising comment
* Ends up `_` is a function also... I hate JavaScript
Co-authored-by: Pierre Gayvallet <pierre.gayvallet@gmail.com>
Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Oliver Gupte <ogupte@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Justin Kambic <justin.kambic@elastic.co>
Co-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
Co-authored-by: kobelb <brandon.kobel@elastic.co>