Updates @elastic/charts to 24.5.1 with some Kibana related fixes:
- align tooltip z-index to EUI tooltip z-index
- external tooltip legend extra value sync
- legend: hierarchical legend order should follow the tree paths
fix#84307
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Moves `track_total_hits` from body messages of our queries into the params section of our queries.
Several of our `track_total_hits: false` were not taking effect and instead were being set to `track_total_hits: true` when being executed within the Kibana search strategy vs. previously when they were regular Elasticsearch queries and always took effect.
When teams port over their searches to the search strategies provided by Kibana, they are required to move any and all `track_total_hits` from their `body` sections of their code into the `params` part of their code. The reason for this is that the search strategy maintains a backwards compatibility with earlier versions of searches before Elasticsearch introduced the `track_total_hits`. However, the code does not detect if you put the `track_total_hits` in your body, it only checks the params section and forces it to `true` if it is not found in the params section.
If the search strategy does not see a `track_total_hits` within the params section of the query, it will force add one and that one will override any within the body of the query. For example, if you had a `track_total_hits` in your body and not in the params section, then search strategy would execute the query like so:
```ts
GET someindex-*/_search?track_total_hits=true
{
// some query here
"track_total_hits": false
}
```
The forced parameter of `?track_total_hits=true` overrides the `track_total_hits: false` within the body of your query regardless of what the `track_total_hits` is set to and you always get the true. This bug has existed since 7.10.0 when we ported over queries to search strategy.
You can see the code which sets this parameter if you do not here for master, 7.11, 7.10:
https://github.com/elastic/kibana/blob/master/src/plugins/data/server/search/es_search/request_utils.ts#L31https://github.com/elastic/kibana/blob/7.11/src/plugins/data/server/search/es_search/request_utils.ts#L31https://github.com/elastic/kibana/blob/7.10/src/plugins/data/server/search/es_search/get_default_search_params.ts#L42
Comments about the behavior from 7.10:
https://github.com/elastic/kibana/pull/75728#pullrequestreview-479367296
When running this code you can open dev tools and inspect the data and now notice when the total hits does not get set vs. before when it was getting set:
before fix where total shows up for queries with `track_total_hits` in the body:
<img width="1370" alt="event_view_before" src="https://user-images.githubusercontent.com/1151048/107594265-bfc92e80-6bce-11eb-8526-8a9aa24e7b3a.png">
after fix where total no longer shows up for queries with `track_total_hits` moved to the params section:
<img width="1309" alt="event_view_after" src="https://user-images.githubusercontent.com/1151048/107594274-c5bf0f80-6bce-11eb-9d8e-698ed430c953.png">
### 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
## Summary
Add's the list plugins Saved Objects (`exception-list` and `exception-list-agnostic`) to the `Security` feature privilege.
Resolves https://github.com/elastic/kibana/issues/90715
### Test Instructions
Load pre-packaged roles/users, and ensure only those with the Kibana Space privilege `Security:All` have the ability to create/edit rules and exception lists (space-aware/agnostic). Users with `Security:Read` should only be able to view rules/exception lists. Pre-packaged security roles should no longer be granted the `Saved Objects Management` feature privilege, and this feature privilege should no longer be required to use any of the Detections features.
To add test users:
t1_analyst (`"siem": ["read"]`):
``` bash
cd x-pack/plugins/security_solution/server/lib/detection_engine/scripts/
./roles_users/t1_analyst/post_detections_role.sh roles_users/t1_analyst/detections_role.json
./roles_users/t1_analyst/post_detections_user.sh roles_users/t1_analyst/detections_user.json
```
hunter (`"siem": ["all"]`):
``` bash
cd x-pack/plugins/security_solution/server/lib/detection_engine/scripts/
./roles_users/t1_analyst/post_detections_role.sh roles_users/hunter/detections_role.json
./roles_users/t1_analyst/post_detections_user.sh roles_users/hunter/detections_user.json
```
Note: Be sure to remove these users after testing if using a public cluster.
### Checklist
Delete any items that are not applicable to this PR.
- [X] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials -- `docs` label added, will work with @jmikell821 on doc changes
- [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
* Removing the code app entirely for 8.0
* Updating plugin list docs
* Using a test plugin for the code_coverage integration tests
* Fix borked test.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tre' Seymour <wayne.seymour@elastic.co>
* Use sourcer indices
* Add indices to panel requests
* Use a separate indices selector for resolver events
* Use valid timeline id in tests
* Update TimelineId type usage, make selector test clearer
* Update tests to use TimelineId type
* Initial version of adding artifacts per policy to the manifest.
* Minor renaming to convey the purpose of the variable.
* Added ability to override list item mock data.
* Changed function signature to be more reusable.
* Implementationg of support of artifacts per policy in the manifest data structure.
* Added saved objects migrations.
* Renamed the endpoint to reflect that it's artifacts endpoint.
* Fixed tests.
* Fixed the manifest data.
* Fixed linting errors (result of merge).
* Updated ES mappings for manifest in all test setups.
* Updated hash in the mappings.
* Fixed the typo that lead to failing test.
* Fixed the problem with manifest not being dispatched to policies if there are same artifact names but different content. Artifact name in the ManifestSchema is not unique id, hence added decoded_sha256 to the comparison. Added test case to cover this.
* Fixed the problem with the task flow when failure to dispatch to policies will result in commited manifest and no redispatch on next task run. Changed tests to reflect new flow (actually restored previous flow).
* Forgot to commit changes in mock.
* Made other tests more readable using same varialbe naming pattern.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* split test cases into blocks
* run tests individually
* fix up timeline creation
* fix up timeline creation
* add assertions for timeline creation
* create timeline by api
* create timeline by api
* fix lint error
* add selector to timeline screen
* fix type error
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
In SchemaErrors, we have an edge case where a user navigates to a non-existent error message state. When migrating I took a stab at passing the custom message to the `flashAPIErrors` helper. It turns out that since we don’t have to parse an error object, we can just set the error message directly
* added an info flyout to session management
* better filter serialization
* Fix jest tests
* jest
* display the originalState as a json object
* code review
* Text improvements
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* moved searchable snapshot field out of cold phase accordian
* refactor styling to padding top and bottom to get advanced settings drop down to sit flush with side of panel
* Error clearing fix and cosmetic changes
- the error state of the form would not clear correctly if the
erroring field was unmounted. The logic for clearing form errors
was also incorrectly using "keys" instead of "values".
- updated the width of wait for snapshot policy field to be the
same as other fields
* fix hook dependency causing clearError to be called
* slight improvement to component integration test
* re-add singleSelection to snapshot policiy field config
* refactored Phase component API and fixed typo in comment
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Instead of cloning, reindex legacy index
* Reindex for every v2 migration
* Use _reindex?require_alias=true and a write block toggle to prevent lost deletes
* Use a ..._reindex_in_progress alias so that waiting for and preventing other reindex operations is idempotent
The first version of the reindex block had only the instance which was able to mark the migration as complete
set and remove the write block. This means other instances couldn't know if any reindex operaitons were in
progress if the migration was already marked as complete. It also meant that a failure in this critical step
could result in a permanent write block.
* Revert "Use a ..._reindex_in_progress alias so that waiting for and preventing other reindex operations is idempotent"
This reverts commit 8baf9b13db.
* Revert "Use _reindex?require_alias=true and a write block toggle to prevent lost deletes"
This reverts commit d7237ca42c.
* Use reindex + clone as a way to prevent lost deletes
* Fix numbering and ignore index_not_found_exceptionfor temporary index
* Apply suggestions from code review
Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
The staging registry is used in Kibana builds which are not built of the master branch or release version. This means, any build ending with `-SNAPSHOT` not the master branch will use the staging registry.
Closes https://github.com/elastic/kibana/issues/90131
Co-authored-by: Jen Huang <its.jenetic@gmail.com>