Commit graph

62326 commits

Author SHA1 Message Date
Marco Antonio Ghiani
42000ba733
[Infrastructure UI] Update host filter management to sync with AlertSummary (#154373)
## 📓 Summary

Closes #153360 

To correctly sync the brush selection with the time service there was
the need for a refactor on how we handle the host filters, simplifying a
bit the code implementation and re-using existing abstractions.

## 🧪 Testing

- Navigate to Hosts View
- Create an Inventory Alert that can easily trigger
- Reload the search until the alerts are triggered
- Click on the alerts tab to preview them
- Select a time range on the chart and see the changes reflected on the
chart and the time range globally applied.


https://user-images.githubusercontent.com/34506779/230015011-1b48deba-7c05-47df-80b1-37e8ee046b05.mov

---------

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-04-11 00:22:47 -07:00
Stratoula Kalafateli
c23eceaa2b
[Unified search] Improve the saved query terminology (#154517)
## Summary

Introduces the changes that are mentioned here
https://github.com/elastic/kibana/issues/153809#issuecomment-1498015527

<img width="481" alt="image"
src="https://user-images.githubusercontent.com/17003240/230306087-6e82bca8-a5c0-4a13-b7d1-b04fca8ac374.png">
<img width="460" alt="image"
src="https://user-images.githubusercontent.com/17003240/230306169-ece13204-da76-495e-b258-4bfea0877118.png">
<img width="315" alt="image"
src="https://user-images.githubusercontent.com/17003240/230306267-955161c4-a5cf-4427-beef-b768dea38c00.png">

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-04-11 09:15:50 +03:00
Kibana Machine
a04b90017a
[api-docs] 2023-04-11 Daily api_docs build (#154702)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/304
2023-04-11 00:57:17 -04:00
Lisa Cawley
f446b3cda5
[DOCS] Remove obsolete X-Pack settings page (#154683) 2023-04-10 19:34:34 -07:00
Philippe Oberti
54203f34d2
[Security Solution] footer take action button (#153903) 2023-04-10 21:04:15 -05:00
Nathan Reese
4d31e302be
[Visualize] fix tile_map visualization (#154392)
Fixes https://github.com/elastic/kibana/issues/154375
### background
https://github.com/elastic/kibana/pull/105326 replaced tile_map
visualization implementation with a new implementation that is a wrapper
around MapEmbeddable.

https://github.com/elastic/kibana/pull/152952 removed geohash_grid
aggregation. This causes a regression where existing tile_map
visualizations no longer work. Even though geohash_grid aggregation is
no longer used, the AggType is still needed so that new tile_map
visualization wrapper can access aggregation configuration state.

This PR adds back geohash_grid AggType in `legacyAggs` for this purpose.
PR also adds a functional test to better prevent regressions with
tile_map

### Test
* install web logs sample data
* install legacy tile_map saved objects from 
    ```

{"attributes":{"fieldFormatMap":"{\"hour_of_day\":{}}","runtimeFieldMap":"{\"hour_of_day\":{\"type\":\"long\",\"script\":{\"source\":\"emit(doc['timestamp'].value.getHour());\"}}}","timeFieldName":"timestamp","title":"kibana_sample_data_logs"},"coreMigrationVersion":"7.17.5","id":"90943e30-9a47-11e8-b64d-95841ca0b247","migrationVersion":{"index-pattern":"7.11.0"},"references":[],"type":"index-pattern","updated_at":"2022-08-17T20:25:52.585Z","version":"WzEzMDQsMV0="}

{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"region_map","uiStateJSON":"{}","version":1,"visState":"{\"aggs\":[{\"enabled\":true,\"id\":\"1\",\"params\":{},\"schema\":\"metric\",\"type\":\"count\"},{\"enabled\":true,\"id\":\"2\",\"params\":{\"field\":\"geo.dest\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"order\":\"desc\",\"orderBy\":\"1\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"size\":5},\"schema\":\"segment\",\"type\":\"terms\"}],\"params\":{\"addTooltip\":true,\"colorSchema\":\"Yellow
to
Red\",\"emsHotLink\":\"https://maps.elastic.co/v7.16?locale=en#file/world_countries\",\"isDisplayWarning\":true,\"legendPosition\":\"bottomright\",\"mapCenter\":[0,0],\"mapZoom\":2,\"outlineWeight\":1,\"selectedJoinField\":{\"description\":\"ISO
3166-1 alpha-2
code\",\"name\":\"iso2\",\"type\":\"id\"},\"selectedLayer\":{\"attribution\":\"<a
rel=\\\"noreferrer noopener\\\"
href=\\\"http://www.naturalearthdata.com/about/terms-of-use\\\">Made
with NaturalEarth</a> | <a rel=\\\"noreferrer noopener\\\"
href=\\\"https://www.openstreetmap.org/copyright\\\">OpenStreetMap
contributors</a> | <a rel=\\\"noreferrer noopener\\\"
href=\\\"https://www.elastic.co/elastic-maps-service\\\">Elastic Maps
Service</a>\",\"created_at\":\"2020-10-28T16:16:08.720286\",\"fields\":[{\"description\":\"ISO
3166-1 alpha-2
code\",\"name\":\"iso2\",\"type\":\"id\"},{\"description\":\"ISO 3166-1
alpha-3 code\",\"name\":\"iso3\",\"type\":\"id\"},{\"description\":\"ISO
3166-1 numeric
code\",\"name\":\"iso_numeric\",\"type\":\"id\"},{\"description\":\"name\",\"name\":\"name\",\"type\":\"property\"}],\"format\":\"topojson\",\"id\":\"world_countries\",\"isEMS\":true,\"layerId\":\"elastic_maps_service.World
Countries\",\"meta\":{\"feature_collection_path\":\"data\"},\"name\":\"World
Countries\",\"origin\":\"elastic_maps_service\"},\"showAllShapes\":true,\"wms\":{\"enabled\":false,\"options\":{\"attribution\":\"\",\"format\":\"image/png\",\"layers\":\"\",\"styles\":\"\",\"transparent\":true,\"version\":\"\"},\"selectedTmsLayer\":{\"attribution\":\"<a
rel=\\\"noreferrer noopener\\\"
href=\\\"https://www.openstreetmap.org/copyright\\\">OpenStreetMap
contributors</a> | <a rel=\\\"noreferrer noopener\\\"
href=\\\"https://openmaptiles.org\\\">OpenMapTiles</a> | <a
rel=\\\"noreferrer noopener\\\"
href=\\\"https://www.elastic.co/elastic-maps-service\\\">Elastic Maps
Service</a>\",\"id\":\"road_map\",\"maxZoom\":20,\"minZoom\":0,\"origin\":\"elastic_maps_service\"},\"url\":\"\"}},\"title\":\"region_map\",\"type\":\"region_map\"}"},"coreMigrationVersion":"7.17.5","id":"64a5b9f0-1e6b-11ed-833b-a105e9534fa9","migrationVersion":{"visualization":"7.17.0"},"references":[{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2022-08-17T20:30:50.288Z","version":"WzE0MDIsMV0="}

{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"tile_map","uiStateJSON":"{\"mapZoom\":2,\"mapCenter\":[13.64385981167601,-135.97675761558068]}","version":1,"visState":"{\"title\":\"tile_map\",\"type\":\"tile_map\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"geohash_grid\",\"params\":{\"field\":\"geo.coordinates\",\"autoPrecision\":true,\"precision\":2,\"useGeocentroid\":true,\"isFilteredByCollar\":true},\"schema\":\"segment\"}],\"params\":{\"colorSchema\":\"Yellow
to Red\",\"mapType\":\"Scaled Circle
Markers\",\"isDesaturated\":true,\"addTooltip\":true,\"heatClusterSize\":1.5,\"legendPosition\":\"bottomright\",\"mapZoom\":2,\"mapCenter\":[0,0],\"wms\":{\"enabled\":false,\"url\":\"\",\"options\":{\"version\":\"\",\"layers\":\"\",\"format\":\"image/png\",\"transparent\":true,\"attribution\":\"\",\"styles\":\"\"},\"selectedTmsLayer\":{\"origin\":\"elastic_maps_service\",\"id\":\"road_map\",\"minZoom\":0,\"maxZoom\":20,\"attribution\":\"<a
rel=\\\"noreferrer noopener\\\"
href=\\\"https://www.openstreetmap.org/copyright\\\">OpenStreetMap
contributors</a> | <a rel=\\\"noreferrer noopener\\\"
href=\\\"https://openmaptiles.org\\\">OpenMapTiles</a> | <a
rel=\\\"noreferrer noopener\\\"
href=\\\"https://www.elastic.co/elastic-maps-service\\\">Elastic Maps
Service</a>\"}}}}"},"coreMigrationVersion":"7.17.5","id":"4b073190-1e6b-11ed-833b-a105e9534fa9","migrationVersion":{"visualization":"7.17.0"},"references":[{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2022-08-17T20:29:28.769Z","version":"WzEzNDksMV0="}

{"attributes":{"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}"},"optionsJSON":"{\"useMargins\":true,\"syncColors\":false,\"hidePanelTitles\":false}","panelsJSON":"[{\"version\":\"7.17.5\",\"type\":\"visualization\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"ad02c99b-8bae-42e0-8a43-d27762f1e607\"},\"panelIndex\":\"ad02c99b-8bae-42e0-8a43-d27762f1e607\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_ad02c99b-8bae-42e0-8a43-d27762f1e607\"},{\"version\":\"7.17.5\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"8412ffc8-b94c-4bbd-aa55-fa670f3fb4ee\"},\"panelIndex\":\"8412ffc8-b94c-4bbd-aa55-fa670f3fb4ee\",\"embeddableConfig\":{\"enhancements\":{}},\"panelRefName\":\"panel_8412ffc8-b94c-4bbd-aa55-fa670f3fb4ee\"}]","timeRestore":false,"title":"dash
with legacy map
visualizations","version":1},"coreMigrationVersion":"7.17.5","id":"97437d70-1e6b-11ed-833b-a105e9534fa9","migrationVersion":{"dashboard":"7.17.3"},"references":[{"id":"64a5b9f0-1e6b-11ed-833b-a105e9534fa9","name":"ad02c99b-8bae-42e0-8a43-d27762f1e607:panel_ad02c99b-8bae-42e0-8a43-d27762f1e607","type":"visualization"},{"id":"4b073190-1e6b-11ed-833b-a105e9534fa9","name":"8412ffc8-b94c-4bbd-aa55-fa670f3fb4ee:panel_8412ffc8-b94c-4bbd-aa55-fa670f3fb4ee","type":"visualization"}],"type":"dashboard","updated_at":"2022-08-17T20:31:36.656Z","version":"WzE0MzEsMV0="}

{"excludedObjects":[],"excludedObjectsCount":0,"exportedCount":4,"missingRefCount":0,"missingReferences":[]}

    ```
* Open dashboard and verify tile_map renders

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-10 19:06:48 -06:00
Joey F. Poon
979cb7350e
[Security Solution] fix endpoint metadata API list sorting (#154638) 2023-04-10 17:35:22 -07:00
Karl Godard
2e75a02032
[D4C] Dataview creation code added. also added a test for plugin (#154688)
## Summary

Adds handling for dataview creation in all spaces when integration is
added.

Related: https://github.com/elastic/integrations/pull/5836/files

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-10 16:50:52 -07:00
Nick Peihl
575397b48b
[Canvas] Disable Edit in Lens action for legacy savedVisualization Canvas function (#154656) 2023-04-10 19:11:47 -04:00
Catherine Liu
acb12665d2
[Canvas] Update filters description/docs with deprecation warning (#154557)
## Summary

Related to #113530.
Related to #141526.

This updates the help text for the `filters` indicating that it is
deprecated with a suggestion to use `kibana | selectFilters` instead.

<img width="526" alt="Screenshot 2023-04-10 at 8 18 41 AM"
src="https://user-images.githubusercontent.com/1697105/230931182-ba17068f-82ba-4e3e-b687-14b0e9211d5b.png">


### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2023-04-10 15:12:28 -07:00
Catherine Liu
6c9ea67487
[Canvas] Fix home page redirect loop (#154568)
## Summary

Closes #154566.

We have a redirect in place for BWC support for legacy URLs like
`http://localhost:5601/mkz/app/canvas#/workpad/workpad-e08b9bdb-ec14-4339-94c4-063bddfd610e/page/1?__fullScreen=true`
which uses the previous hash routing.

I noticed this home page redirect loop occurred when you navigate to
`app/canvas`. After doing some digging, I found that this loop would
occur when `route.location.pathname: "/"` and `route.location.hash:
"#/"`. It seems like having both properties defined would trigger the
infinite redirects. This change makes it so that the redirect occurs
only when `route.location.pathname` is undefined or contains an empty
string.



### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-10 15:10:19 -07:00
Cee Chen
31b50a3906
Upgrade EUI to v77.0.0 (#154379)
> ⚠️ Synthetic failures are not related to any EUI changes and are
likely already failing on main. Please ignore the failing CI status when
reviewing.

## [`77.0.0`](https://github.com/elastic/eui/tree/v77.0.0)

**Bug fixes**

- Fixed named `EuiBadge` colors to reflect custom theme overrides
([#6659](https://github.com/elastic/eui/pull/6659))
- Fixed user-defined SCSS variables failing to override variables
defined in Amsterdam typography overrides.
([#6665](https://github.com/elastic/eui/pull/6665))
- Fixed bold `EuiCode` tokens to actually be bold
([#6666](https://github.com/elastic/eui/pull/6666))

**Breaking changes**

- Success- and accent-colored `EuiBadge`s and `EuiButton`s have had
their fill colors tinted slightly on light mode to be more readable
([#6659](https://github.com/elastic/eui/pull/6659))

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jon <jon@elastic.co>
2023-04-10 17:06:26 -05:00
Lukas Olson
8770a1ceed
Update search session saved object mappings (#154401)
## Summary

Part of https://github.com/elastic/kibana/pull/153070.

Cleans up the saved object mappings for search session saved objects.
Removes the non-searchable/sortable properties from the `mappings`
property and introduces a `schema` property for validation.
2023-04-10 14:52:43 -07:00
Sean Story
ee424cb3ad
Update field mappings for ELSER pipelines (#154291)
## Summary

When creating an ML inference pipeline that uses the new ELSER model, we
need to be able to specify which fields to apply it to, and where the
resulting values should go. These fields can then determine what mapping
changes need to be made to the underlying index (setting `rank_features`
fields).

This PR adds `field_mappings` as a param to our kibana endpoint for
creating these ML Inference pipelines, and based on that parameter,
attempts to update mappings.

A sample request might be:
```
curl -XPOST -u elastic:changeme "http://localhost:5601/mob/internal/enterprise_search/indices/search-test/ml_inference/pipeline_processors" \
-H 'kbn-xsrf: kibana' \
-H 'Content-Type: application/json' \
-d '{
  "field_mappings": {
    "input": "output"
  },
  "pipeline_definition": {
    "description" : "text",
    "processors": []
  },
  "pipeline_name": "test"
}' | jq
```

And sample output might be:
```
{
  "created": "ml-inference-test",
  "mapping_updated": true
}
```
OR
```
{
  "statusCode": 409,
  "error": "Conflict",
  "message": "One or more target fields for this pipeline already exist with a type that is incompatible with the specified model. Ensure that each target field is unique and not already in use.",
  "attributes": {
    "error_code": "mapping_update_failed"
  }
}
```

### Checklist


- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [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


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-04-10 16:12:40 -05:00
Philippe Oberti
813c2a3c64
[Security Solution] skip failing related_integrations e2e test (#154662) 2023-04-10 14:18:38 -05:00
Kyle Pollich
b7017b27ab
[Fleet] Loosen validation for experimental data stream features (#154661)
## Summary

Closes https://github.com/elastic/kibana/issues/154585

Allow `PUT`ing partial request bodies for experimental features, which
ensures we don't break package policies from prior versions of Kibana
where not all experimental features were available.

Added an FTR test to catch the error, which is an API schema validation
one. Verified the test fails before the schema changes are made.

### Checklist

Delete any items that are not applicable to this PR.

- [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
2023-04-10 12:11:12 -07:00
Rickyanto Ang
da47a1b7a5
[Cloud Security] Added new Benchmark Error message component (#154636)
## Summary

This ticket is part of Quick Wins ticket.
This PR updates the Error message that user receive when the app can't
retrieve Benchmark data due to issue with the API


<img width="1423" alt="Screen Shot 2023-04-09 at 12 39 31 AM"
src="https://user-images.githubusercontent.com/8703149/230760566-3e172d5d-d795-4d80-982c-ba6677153c52.png">
2023-04-10 12:02:01 -07:00
Jon
a6642d0efe
Upgrade chromedriver to 112.0.0 (#154652) 2023-04-10 12:49:34 -05:00
Rickyanto Ang
9b84061d3b
[Cloud Posture] Center Framework Sources icons centered (#154604)
## Summary

This ticket is part of Quick Wins ticket
This PR fixes the issue with Center Framework Sources icons not being
centered on findings and rule flyout
<img width="828" alt="Screen Shot 2023-04-06 at 1 42 13 PM"
src="https://user-images.githubusercontent.com/8703149/230490511-fe0233e7-8207-4a78-90e3-67392058fd31.png">
2023-04-10 13:40:12 -04:00
Cauê Marcondes
a0f8d910b7
[Profling] Adding symbols callout on frame information window (#154478)
This PR adds a callout on the Frame information window for each symbol
status and Storybook support.

`Symbolized`:
<img width="897" alt="Screenshot 2023-04-05 at 2 46 36 PM"
src="https://user-images.githubusercontent.com/55978943/230176122-ad495e1d-76aa-431c-a6a7-4f2f319625c9.png">

`Native language`:
<img width="901" alt="Screenshot 2023-04-05 at 2 46 24 PM"
src="https://user-images.githubusercontent.com/55978943/230176224-e247d57c-538b-4c35-8a74-dd0176ac0f0c.png">

`Interpreted language`:
<img width="893" alt="Screenshot 2023-04-05 at 2 46 16 PM"
src="https://user-images.githubusercontent.com/55978943/230176264-d2d9b72a-6048-4ba3-93af-b60f9ea04001.png">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-10 10:11:04 -07:00
Karl Godard
77498a9b69
Fix for k8s dashboard getting letterboxed when there is no data. (#154094)
## Summary

Fixes an display issue with the k8s dashboard. Currently this page
doesn't render an empty state like other pages do, and so I've removed
it from the list of pages with "empty state" in order to avoid the whole
page having a restricted width of ~960px.

Before:

![image](https://user-images.githubusercontent.com/16198204/228934077-add3ecdf-2845-4714-98f2-e791133505e8.png)

After:

![image](https://user-images.githubusercontent.com/16198204/228934155-f785c0b9-2fbc-4a04-9522-4eecdd5d2a6c.png)
2023-04-10 10:10:23 -07:00
Nicolas Chaulet
394174eedf
[Fleet] Disable ILM policy in serverless (#154460) 2023-04-10 09:38:45 -07:00
Zacqary Adam Xeper
a0d754c595
[RAM] Fix Delete Schedule button padding issue (#154503)
## Summary

Closes #152398 

Fixes the bug with the `Delete schedule` button losing its padding when
a date value goes invalid
2023-04-10 11:29:49 -05:00
Zacqary Adam Xeper
04f1be1edd
[RAM] Fix error message flash and throttle value reset (#154497)
## Summary

Fixes #152943

- Error message will no longer flash when switching notify when to `On
custom action intervals`
- Switching away and back to `On custom action intervals` will preserve
the throttle value as well as the throttle unit
2023-04-10 11:29:37 -05:00
Jonathan Buttner
b6a113ccfa
Cases delete files case deletion (#153979)
This PR extends the case deletion functionality to delete any files that
are attached to the case when a case is deleted.

To avoid attempting to delete too many files at once I chunk case ids
into 50 at a time such that we're at most only deleting 5000 (50 case *
100 files per case) at once. That way we don't exceed the 10k find api
limit.

## Testing
Run the python script from here:
https://github.com/elastic/cases-files-generator to generate some files
for a case

Deleting the case should remove all files
2023-04-10 12:20:58 -04:00
Rodney Norris
c98fa8214e
Enterprise Search: remove search applications feature flag (#154609)
## Summary

Remove the feature flagging of the search applications (engines) section
for nav and routes.


![image](https://user-images.githubusercontent.com/1972968/230502703-694c480d-b997-4d9d-bea6-1f5ba763d6be.png)

*Note we should do some more work on the side nav separate from this PR.
2023-04-10 11:00:27 -05:00
Cauê Marcondes
5c759a1290
[Profiling] renaming CPU incl and CPU excl (#154560)
<img width="410" alt="Screenshot 2023-04-06 at 9 28 13 AM"
src="https://user-images.githubusercontent.com/55978943/230401728-fcdcb1ec-164e-4375-acae-12d3a4e2caaf.png">
<img width="610" alt="Screenshot 2023-04-06 at 9 28 23 AM"
src="https://user-images.githubusercontent.com/55978943/230401731-84a45fd2-bce2-4de8-8a3a-7f7fffa7f404.png">
<img width="295" alt="Screenshot 2023-04-06 at 9 38 57 AM"
src="https://user-images.githubusercontent.com/55978943/230401732-edb11b8d-c8fb-4401-a021-4a80a17830a4.png">
2023-04-10 11:50:11 -04:00
Saarika Bhasi
1f8dc16a0e
[Enterprise Search] [Search application] Adding filter by field type to Schema Page (#154466)
## Summary
Adding Filter by field type component to Schema page and display callout when showing field conflicts

[thread](https://elastic.slack.com/archives/C02U50QNEAG/p1680627458702419?thread_ts=1680288487.778129&cid=C02U50QNEAG)

### Screen Recording


https://user-images.githubusercontent.com/55930906/230146041-4978335d-ad6e-4594-8e01-4e688a580b5a.mov

#### [Edit] Updated Popover clear all button with eraser


<img width="1712" alt="Popover with clear all button with eraser"
src="https://user-images.githubusercontent.com/55930906/230461760-5161b26a-6d76-4a65-8eab-48b45381683f.png">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-10 10:45:01 -04:00
Paulo Henrique
17ed210a42
[Cloud Posture] Add Coming soon options for KSPM (#154513) 2023-04-10 10:28:39 -03:00
Ashokaditya
f63fffcf1a
[Security Solution][Endpoint][Response Actions] Show shell info above execute action output (#154318)
## Summary

Shows shell name, shell execution return code, and current working
directory info along with the command execution output for `execute`
action response.
2023-04-10 09:17:22 -04:00
Jonathan Budzenski
2cac3b2856 Revert "[Fleet] Fail build on unable to retrieve agent versions list (#154110)"
This reverts commit 99f366a595.
2023-04-10 08:11:57 -05:00
Sébastien Loix
f6a7b6cfa1
[CM] Add content onboarding docs (#154453) 2023-04-10 10:56:40 +01:00
Stratoula Kalafateli
b3b4441111
[TSVB] Fix flaky test (#154519)
## Summary

Closes https://github.com/elastic/kibana/issues/154372

Runner 100 times
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2094

I dont think that this test is super flaky. I just added the waiting
after clicking the seriesOption as I guess it might make it even more
stable
2023-04-10 08:57:18 +03:00
Kibana Machine
2750b0e843
[api-docs] 2023-04-10 Daily api_docs build (#154639)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/303
2023-04-10 00:57:42 -04:00
Lola
0253ce8abd
[Cloud Posture] add hover to posture score cells (#154506)
## Summary

This is part of a Quick Wins
[ticket](https://github.com/elastic/security-team/issues/6291)

This PR allows for the posture column cell to be hoverable by width and
height to a wrapper element and moving `EuiTooltip` to be the wrapper
element around the EuiFlexGroup.

<img width="248" alt="image"
src="https://user-images.githubusercontent.com/17135495/230241723-418d5b0b-4df9-49a6-90a4-33cff3441b68.png">
2023-04-09 22:05:52 -04:00
Lola
bf20a061cf
[Cloud Posture] reduce column width to see rule name (#154507)
## Summary
This is part of a Quick Wins
[ticket](https://github.com/elastic/security-team/issues/6291)

This PR should reduces column width for CIS Section, Rule Number, and
Resource Type
<img width="1442" alt="image"
src="https://user-images.githubusercontent.com/17135495/230248597-7a2cd0a0-b557-4aee-9e4f-0af815864eea.png">
2023-04-09 21:52:39 -04:00
Rickyanto Ang
43dc991b67
[Cloud Security] Update Failed dot and Distribution bar color to match failed badge color (#154518)
## Summary

This ticket is part of Quick Wins ticket.
This PR updates the color of Failed dot and Distribution bar color to
match failed badge color


![BEFOREAFTER](https://user-images.githubusercontent.com/8703149/230306348-f340b8fe-a5bf-4a14-bccd-ccb5bdb38ba2.png)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-09 21:43:45 -04:00
Kibana Machine
5a2aafe9f1
[api-docs] 2023-04-09 Daily api_docs build (#154635)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/302
2023-04-09 00:58:33 -04:00
Kibana Machine
a2d2aaf9ed
[api-docs] 2023-04-08 Daily api_docs build (#154633)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/301
2023-04-08 00:56:38 -04:00
Ari Aviran
2d5cc35612
[Cloud Security] Fix dash location in cloud security posture dashboard (#154333) 2023-04-07 17:52:35 +03:00
Kibana Machine
2f45b6c321
[api-docs] 2023-04-07 Daily api_docs build (#154620)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/300
2023-04-07 00:55:43 -04:00
Hannah Mudge
deeb783f8b
[Dashboard] [Controls] Fix inherited input race condition (#154293)
Closes https://github.com/elastic/kibana/issues/154071

## Summary

**Before:**

Before this PR, the dashboard's children would start being
loaded/initialized **before** the control group was necessarily ready -
this caused a race condition where, when the children tried to get their
inherited input, if the control group wasn't quite ready yet, then they
would not receive the control group's filters for their initialization.

So, on first load of a dashboard with one or more controls with
selections, it was possible for the contents of a dashboard to **not
reflect** the control selections, like so:

![Screenshot 2023-04-06 at 1 54 16
PM](https://user-images.githubusercontent.com/8698078/230481821-624221ff-cbee-4288-af24-c7cede312f14.png)

This obviously caused flakiness for the drilldown test, because if the
children in the source dashboard did not receive the inherited input
from the control group, then the drilldown **also** wouldn't pass down
the control group filters.

**After:**

To avoid this race condition, the dashboard now waits until the control
group is ready **before** the children can be loaded - so, when the
children try to get their inherited input, it should **always** contain
the control group's output filters:

![Screenshot 2023-04-06 at 1 59 15
PM](https://user-images.githubusercontent.com/8698078/230484589-a43c3292-3a6b-4f07-8a89-8ec181141024.png)




### Flaky Test Runner

<a
href="https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2099"><img
src="https://user-images.githubusercontent.com/8698078/230492496-d9f6e3c0-5a20-4c1e-bbab-fe90a275229e.png"/></a>

### 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



### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-04-06 19:42:56 -04:00
Adam Demjen
8e9a8ef019
[ML Inference] Change fieldMappings type to array (#154577)
## Summary

This PR changes the type of `fieldMappings` in
`generateMlInferencePipelineBody()` to be an array of `FieldMapping`
elements (instead of `Record<string, string | undefined>`). There are no
functional changes.
2023-04-06 19:32:04 -04:00
Catherine Liu
b222c0a105
[Canvas] Restore enabled config in dev (#154391)
## Summary

Related to https://github.com/elastic/kibana/issues/152395.
Closes #154394.

This restores the `enabled` config setting for the Canvas plugin (in
development only for now until
https://github.com/elastic/kibana/issues/152395 is addressed).

Restoring the `xpack.canvas.enabled` setting will allow Canvas to be
disabled in future offerings.

### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-04-06 15:55:52 -07:00
Jen Huang
99f366a595
[Fleet] Fail build on unable to retrieve agent versions list (#154110)
## Summary

Resolves https://github.com/elastic/kibana/issues/153923

This PR:

1. [Fails **non-PR**
builds](https://buildkite.com/elastic/kibana-pull-request/builds/116952#01873497-c5a2-4031-9f5b-84df00e8368b)
if we are unable to retrieve the list of Elastic Agent versions from the
website API. If a build ships without this list being retrieved, users
will not have the correct version choices to upgrade their agents to
(see above issue)
2. Updates the API endpoint used from
`https://www.elastic.co/api/product_versions` to
`https://www.elastic.co/content/product_versions`, which appears to be a
more stable version. The `/api` one is currently down:
https://github.com/elastic/website-development/issues/10820
2023-04-06 14:59:22 -07:00
Elastic Machine
4c8c13d2fc
[main] Sync bundled packages with Package Storage (#154576)
Automated by
https://internal-ci.elastic.co/job/package_storage/job/sync-bundled-packages-job/job/main/3098/

Co-authored-by: apmmachine <infra-root+apmmachine@elastic.co>
2023-04-06 17:17:27 -04:00
Thomas Neirynck
fdc3c0f86b
Add March 2023 Newsletter link (#154248)
Adds link to the March 2023 newsletter.

Blocked by https://github.com/elastic/kibana-team/pull/594. Don't merge
this until that is merged.
2023-04-06 16:04:06 -04:00
Michael Olorunnisola
56566ffc89
[Security Solution][Timeline] - Store flyout information in the url (#148800)
## Summary
The purpose of this PR is to give users the ability to share a given
alert on the alert's page. This is possible via two changes. First, the
simple state of the details flyout is now stored in a url query param
`eventFlyout=(...flyoutState)`, when opened. Secondly, the addition of a
`Share Alert` button which allows users to share a link directly to the
alert page filtered for the given alert and the flyout opened.

### Caveats

1. **The share button is much more reliable than copying the url from
the browser url bar.**

Ideally storing the url state in the url should have been enough, but
because of the potential for relative time ranges in the global kql
query bar (which are also stored in the url), it it is possible to share
a url by copying the browser url that doesn't actually open the given
alert.

As an example: A user with a relative time range of `last 24 hours`
opens an alert that was created this morning with a colleague. The
colleague doesn't actually visit the link till the following afternoon.
When the user visits the link, they _may_ see the flyout open, but may
not actually see the associated alert in the alert table. This is
because the relative time range of `last 24 hours` doesn't contain the
alert that was opened the previous morning. The flyout _may_ open
because it is not constrained by the relative time range, but the
primary alert table may easily be out of sync. Given this, the `Share
Alert` button creates a custom url
`alerts/alertId?index='blah'&timestamp='...'` which redirects the user
to the specific alert and time range of their given alert.

2. **Storing of the alert flyout url state only works on the alerts
page. The url state is not stored on the cases or rules pages.**

Although this flyout is used in multiple locations, we only want to
preserve it on this singular page to keep the user flow simple, and also
allow us to more smoothly transition to the future flyout experience.

## Demo

### Sharing via the browser url


https://user-images.githubusercontent.com/17211684/227567405-37589def-b1be-406e-802e-764b49bee5f6.mov


### Sharing via the `Share alert` button


https://user-images.githubusercontent.com/17211684/230382767-0e6bf3d0-6ed1-442f-921a-db5eeec7592f.mov


## Follow up work

Revert/Delete the changes of the old Alerts Page POC:
https://github.com/elastic/kibana/issues/154477
2023-04-06 15:06:16 -04:00
Rickyanto Ang
c4908c09fc
[Cloud Posture]Added counter on Rules table (#154502)
## Summary
This ticket is part of Quick Wins ticket.
This PR adds a counter at the top of Rules table that shows how many
Rules out of Total number of rules we are currently showing ([Figma
here](https://www.figma.com/file/QITLtzCQWAJCOW2xNsnO81/CSPM-%2F-KSPM?node-id=3432-332457&t=NK7db3HSfsDBrjWB-0))


![screen_shot_2023-04-05_at_2 09
40_pm](https://user-images.githubusercontent.com/8703149/230214542-a3e29e4f-41e4-446e-bcc1-67decdebf590.png)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-06 11:33:34 -07:00
Larry Gregory
0e5cab6bc2
Bump nth-check to 2.0.1 (#154565) 2023-04-06 14:23:03 -04:00