* add helptext to of expressions
* Make helptext optional as a prop for of expressions
* Add help text to metric threshold alert form
* Add test for helptext in of expression
* Accept JSX elements as helptext in of expressions
* Remove usage of useEuiI18n and use FormattedMessage component for translations
* Follow writing guidelines and fix typo
* Update translation keys
* Update documentation link
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [ML] Migrate ML plugin to TS project ref
* [ML] Adding mocks folder to list of includes
* [ML] Remove duplicates from x-pack tsconfig.refs.json
* [ML] Add file_upload plugin to project references
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* added policy top-level callout for error state
* added form errors context. errors are sorted by their field path into phases
* added data test subject attributes and prevent setErrors from getting called if component is not mounted
* update copy
* refactored errors context and optimised setting of context value. Also added test for various form error notifications across the collapsed phases
* add test for non-phase specific policy validation error
* Remove unused import
* refactor how errors are listened to, use the new "onError" callback
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* fix favorites for templates
* fix integration test
* fix integration test
* fix event details request
* handle data when searchstrategy is still running
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Remove navigation from Discover to Visualize
* Remove unused translation
* Remove oss check from functional test
* Fix functional test
* Skip test for OSS
* Fix
* Should not remove the uiSettings getter and setter
* Move the isOss flag inside the test
* Cleanup
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Updated test to use no hard coded waits which could be contributing to CI failures. Expect functions should be in the test file itself so I changed the page objects for page actions and extracted out the expect calls to the test files.
* Added retry within the test file to retry the assertion if it doesn't pass on the first attempt. Simplified the toggle function to just click the toggle.
* Fixed type check issue.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Stub kpi component
* search strategy scheleton timeline KPI
* search strategy scheleton timeline KPI
* Add timeline kpis component and search strategy container
* Use getEmptyValue in timeline kpis
* Prevent request from being made for blank timeline properly
* Add kpi search strategy api integration test
* Add jest tests for timeline kpis
* Clear mocks in afterAll
* Decouple some tests from EUI structure
* Combine some selector calls, change types to be more appropriate
* Simplify hook logic
* Set loading and response on blank timeline
* Only render kpi component when query is active tab
* Use TimelineTabs enum for query tab string
Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Maps] migrate mvt routes to use data.search service instead of directly calling elasticsearch
* pass search session id to mvt requests
* move grid tile tests to integration tests
* replace getTile unit test with integration test
* add comment about request param
* revert total meta change
* tslint fixes
* update jest tests
## Summary
Adds e2e and unit tests for PR:
https://github.com/elastic/kibana/pull/89947
* Adds e2e tests for create_index
* Adds e2e tests for get_privileges
* Adds unit test for use_privilege_user
* Adds exhaustive switch for the roles in the e2e tests
* Adds some typescript barrel rolls for the .json scripts to make TypeScript a bit more readable when doing imports
* Fixes some of the types that were not matched up with the recent privilege endpoint
### Checklist
- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
* Toast should only show once
* Handle any errors here gracefully
* Set this early to avoid failing test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* remove allow_no_indices param, adds a check if response has empty indices property then write error status with index patterns provided to rule
* fix tests
* fix tests and update with comments
* update integration tests
* adds integration test for when an index pattern doesn't exist the rule should fail and when one index pattern does exist but another does not, the rule should succeed
* Add API integration tests for data streams list, including one that is expected to fail due to reliance on number of backing indices
* Use ES data streams API as source of truth for list of data streams, and only query against backing indices afterwards
* Get package name from data stream meta info
* Increate retry timeout
* Move initial info requests inside Promise.all
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add encodePathParam helper + update components that need it
- Primarily document URLs & analytics queries (which uses generateEnginePath)
* Add useDecodedParams helper + update components that need it
- Documents titles & Analytics queries
* [Misc] Change popout icon to eye
- Feedback from Davey - the pages don't open in a new window, so shouldn't use the popout icon
- Not strictly related but since we're touching these links anyway, I'm shoving it in (sorry)
* Remove document detail decode test
- now handled/tested by useDecodedParams helper
* Add new generateEncodedPath helper
- Should be used in place of generatePath
* Update all instances of generatePath to generateEncodedPath
for consistency across the App Search codebase
* Fix failing tests due to extra encodeURI() done by generatePath
* Add missing branch test for analytics query titles
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* migrate file_upload plugin to maps_file_upload
* update plugins list
* migrate ml import endpoint
* migrate ml telemetry to file_upload plugin
* add fileUpload plugin to ml
* add TS project
* update ML to use file_upload endpoint
* move types to file_upload plugin
* ignore error
* clean up
* i18n clean-up
* remove schemas from ml
* remove usageCollection from ml
* node scripts/build_plugin_list_docs
* update telemety collector
* revert changes to ingestPipeline schema
* change name of TELEMETRY_DOC_ID to unique value
* remove ImportFile from ml/server/routes/apidoc.json
* fix typo in x=pack/tsconfig.json
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
When getting the start and end times, use the d3 time scale `ticks` function to round the start and end times.
Example from a query:
Before:
```json
{
"range": {
"@timestamp": {
"gte": 1611262874814,
"lte": 1611263774814,
"format": "epoch_millis"
}
}
},
```
After:
```json
{
"range": {
"@timestamp": {
"gte": 1611263040000,
"lte": 1611263880000,
"format": "epoch_millis"
}
}
},
```
The `ticks` function makes it so the amount of rounding is proportional to the size of the time range, so shorter time ranges will be rounded less.
Also fix a bug where invalid ranges in the query string were not handled correctly.
Fixes#84530.