* [Lens] Support histogram mapping type
* Fix field stats and allow max/min
* Fix types
* Revert to regular sample data
* Simplify server code
* Add test for edge case
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Use js-yaml.safeDump() to escape string values.
* Add unit test.
* Explicitly check for YAML special characters.
* Remove unnecessary imports.
* Use RegExp.prototype.test() for speed.
* [ML] Adding index pattern runtime fields to anomaly detection wizards
* hook refactor
* small refactor of search json
* fixing mml estimation error
* changes based on review
* sorting fields in metric selection
* using useMemo rather than useState
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Fix calls to `/api/saved_objects_tagging/tags`
Seen on all pages.
* Fix calls to `/api/ui_counters/_report`
Seen on all pages.
* Fix calls to `/api/index_management/indices/reload`
Seen on page: /app/management/data/index_management
* Fix calls to `/api/watcher/watches`
Seen on page: /app/management/insightsAndAlerting/watcher/watches
* Fix calls to `/api/rollup/jobs`
Seen on page: /app/management/data/rollup_jobs/job_list
* Fix calls to `/api/cross_cluster_replication/follower_indices`
Seen on page: /app/management/data/cross_cluster_replication/follower_indices
* Fix calls to `/api/cross_cluster_replication/auto_follow_patterns`
Seen on page: /app/management/data/cross_cluster_replication/auto_follow_patterns
* Fix calls to `/api/transform/transforms` and `/api/transform/transforms/_stats`
Seen on page: /app/management/data/transform
* Fix calls to `/api/console/proxy`
Seen on page: /app/dev_tools#/console
* Fix calls to `/api/monitoring/v1/clusters` and `/api/monitoring/v1/elasticsearch_settings/check/cluster`
Seen on page: /app/monitoring
* [TSVB] Fixes the legend for empty values and renders the metric, gauge charts
* Change i18n id
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
- Make sure any agents requesting to be upgraded, are not enrolled in a managed policy.
- `force: true` will only bypass agent / kibana version checks. It will not bypass managed policy check. To workaround, the enrolled policy should be changed to unmanaged (`is_managed: false`) as we do with enroll, reassign, etc.
- Took more efficient approach to bulk actions. One `bulkGet` for N agents/policies vs N `get`s approach used for bulk reassignment of agents. See discussion in https://github.com/elastic/kibana/pull/88688/files#r568941761
- [x] API
- [ ] UI
- [x] tests
### 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
### Manual tests
#### upgrade one
```
curl --location --request POST 'http://localhost:5601/api/fleet/agents/8d9748e0-6d52-11eb-8cbd-47e38cd1c8de/upgrade' --header 'kbn-xsrf: <string>' --header 'Content-Type: application/json' --header 'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==' --data-raw '{
"version": "8.0.0"
}'
{"statusCode":400,"error":"Bad Request","message":"Cannot upgrade agent 8d9748e0-6d52-11eb-8cbd-47e38cd1c8de in managed policy bf319100-6d50-11eb-8859-15a87f509a99"}
```
```
curl --location --request POST 'http://localhost:5601/api/fleet/agents/8d9748e0-6d52-11eb-8cbd-47e38cd1c8de/upgrade' --header 'kbn-xsrf: <string>' --header 'Content-Type: application/json' --header 'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==' --data-raw '{
"version": "8.0.0", "force": true
}'
{"statusCode":400,"error":"Bad Request","message":"Cannot upgrade agent 8d9748e0-6d52-11eb-8cbd-47e38cd1c8de in managed policy bf319100-6d50-11eb-8859-15a87f509a99"}
```
#### bulk upgrade
```
curl --location --request POST 'http://localhost:5601/api/fleet/agents/bulk_upgrade' --header 'kbn-xsrf: <string>' --header 'Content-Type: application/json' --header 'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==' --data-raw '{
"version": "8.0.0",
"agents": [
"8d9748e0-6d52-11eb-8cbd-47e38cd1c8de"
]
}'
{}
```
```
curl --location --request POST 'http://localhost:5601/api/fleet/agents/bulk_upgrade' --header 'kbn-xsrf: <string>' --header 'Content-Type: application/json' --header 'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==' --data-raw '{
"version": "8.0.0",
"agents": [
"8d9748e0-6d52-11eb-8cbd-47e38cd1c8de"
], "force": true
}'
{"statusCode":400,"error":"Bad Request","message":"Cannot update agent in managed policy bf319100-6d50-11eb-8859-15a87f509a99"}```
```
* Added copy adjustments, fixed wrong capitalization of titles and swap primary buttons back to correct order
* Apply suggestions from code review
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: debadair <debadair@elastic.co>
* Fixed eslint issues and added labels for buttons
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: debadair <debadair@elastic.co>
* [Discover] Fix icon for conflicting fields
* Fix tooltip text a bit
* Fix failing snapshot
* Minor code fix
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [data.search.session] Server telemetry on search sessions
* Update telemetry mappings
* Added tests and logger
Co-authored-by: Liza K <liza.katz@elastic.co>
* [Search Source] Remove includes when retrieving fields from source
* Removing unusded imports
* Use exclusion filters to retrieve a list of fields
* Exclude _source from fields list
* Fix small check in getting the field list
* Fixing faulty import
* Filter logic
* Adding a unit test for maps use case
* Updating maps unit & functional test
* Add unit test
* Move logic for requesting a field list inside search_source
* Remove unnecessary mock
* Code cleanup as per PR comments
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>