Commit graph

22292 commits

Author SHA1 Message Date
Alejandro Fernández Haro
0b91e6db9b
[Snapshot Telemetry] Use Serveless-specific channels (#159677)
## Summary

Resolves #159234.

It changes the Snapshot Telemetry channels to be different when running
on Serverless. They have the suffix `{channel}-serverless` as agreed
with the Platform Analytics team.

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

- [x] 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: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-06-21 00:31:36 -07:00
Marta Bondyra
7ea54fa678
[Lens] fix inconsistent annotation icon styles (#159542)
## Summary
Fixes https://github.com/elastic/kibana/issues/159540

Fixed by:
1. To fix the fill, I made the triangle and circle svgs consistent with
the ones from EUI. Now they work with fill and not with stroke. Thanks
to that we could remove `canFill` property.
2. To fix rotation for triangle, I added `!important` to transform when
adding `xyAnnotationIcon_rotate90`. Btw this class was added to path and
to svg, that's why before rotation was 45deg (because added to two
elements). I fixed it too.

<img width="804" alt="Screenshot 2023-06-13 at 10 13 27"
src="c52e2692-cbbf-4e22-9241-eab6a3aa7c6f">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-21 09:18:48 +02:00
Davis Plumlee
0f572605a6
[Security Solution][Detection Alerts] Alert tagging (#157786) 2023-06-20 22:04:52 -04:00
Tiago Costa
bed4609afe
skip flaky suite (#158537) 2023-06-21 02:34:58 +01:00
Hannah Mudge
f1dc1e1869
[Controls] Move "clear selections" to hover action (#159526)
Closes https://github.com/elastic/kibana/issues/159395
Closes https://github.com/elastic/kibana/issues/153383

## Summary

This PR moves the "clear selections" button for all controls (options
list, range slider, and time slider) from inside their respective
popovers to a general hover action - this not only saves users a click
for this common interaction (which has actually been brought in user
feedback up as a downside of the current controls compared to the legacy
controls), it also allows us to fully move forward with migrating the
range slider control to the `EuiDualRange` component. This will be done
in a follow up PR, which should both (1) clean up our range slider code
significantly and (2) fix the [bug discussed
here](https://github.com/elastic/kibana/pull/159271#pullrequestreview-1477930356).
The related issue can be tracked
[here](https://github.com/elastic/kibana/issues/159724), since we might
not be able to get to it right away.

This "clear selections" action is available in both view and edit mode,
like so:

|  | Edit mode | View mode |
|--------|--------|--------|
| **Range slider** |
![image](83cb1e1a-0b20-43aa-a37b-14484b5f4945)
|
![image](0d28ce03-5242-4f3a-8a05-d447bca50ddb)
|
| **Options list** |
![image](066257f6-c0ce-4e33-a193-5bbc62e341a6)
|
![image](d1ec124c-f5ee-4137-9eb9-33e06d522435)
|
| **Time slider** |
![image](33b8bb80-fa0c-4281-ae81-f1e1b44086f3)
|
![image](bd7c41ae-706c-45f3-8b49-9bd4d259e5cf)
|

You may notice in the above screenshots that the "delete" action is now
represented with a red trash icon rather than a red cross, and the
tooltip text was also changed to use the word "Delete" rather than the
word "Remove" - these changes were both made to be more consistent with
the "Delete panel" action available on dashboards:

| Delete control - Before | Delete control - After | Delete panel |
|--------|--------|--------|
| ![Screenshot 2023-06-13 at 5 32 22
PM](2600b197-653b-43ea-a043-a50be7e6a796)
|
![image](5ef80380-2575-45fc-ba11-c59f3f252ac3)
| <img
src="a7f65777-45cf-44f2-96a7-f1042cb25e02"/>
|

Beyond these changes, I also made a few quick changes to the time slider
control, including:
1. Fixing the appearance so that the background is once again white, as
described
[here](https://github.com/elastic/kibana/pull/159526#discussion_r1229792071)
2. Adding comparison logic so that clearing selections no longer causes
unsaved changes unnecessarily, as described
[here](https://github.com/elastic/kibana/pull/159526#discussion_r1229789753)

### Videos

**Before**


96365c85-748e-4fd7-ae5d-589aa11a23ef


**After**


68352559-e71b-4b5e-8709-587016f0b35a



### 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
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] 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))
- [x] 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))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### 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-06-20 16:53:10 -06:00
Lukas Olson
69849ee03b
[data.search] Send ccs_minimize_roundtrips=true for async search requests (#159848)
## Summary

Resolves https://github.com/elastic/kibana/issues/159706. Sends
`ccs_minimize_roundtrips=true` for async search requests to decrease
network delays when cross-cluster search is at play.

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

- [x] 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-06-20 15:42:54 -07:00
Hannah Mudge
a4d5209a9f
[Dashboard] Fix styling of top nav bar (#159754)
Closes https://github.com/elastic/kibana/issues/159353
Closes https://github.com/elastic/kibana/issues/159756

## Summary

This PR adds styling so that, when the dashboard's chrome is hidden or
when there is a header banner present, the dashboard's top navigation
bar's `top` position is adjusted as necessary - this prevents it from
either (a) getting hidden behind the Kibana chrome or (b) floating in
the wrong position and overlapping the dashboard content, regardless of
if the dashboard is in embed mode (i.e. `embed=true` is present in the
URL) or not (i.e. `embed=false` is present in the URL **or**, more
commonly, there is no `embed` parameter in the URL).

### Embed Mode

- #### Before:


76d3c70c-936c-4bcc-985c-4fb433f0cff3

- #### After:


137bc103-666b-4fdd-ab4e-8994345e21b4

It also resolves a bug where the `isEmbeddedExternally` component state
was never actually being set, which meant that the
`ExitFullScreenButton` was always receiving `toggleChrome=true`. This
made it so that entering and exiting fullscreen mode in an embedded
dashboard would force the chrome to be visible (which should never
happen in embed mode).

#### How to Test
The easiest way to test this PR is to simply add `embed=true` to your
dashboard URL - because this PR also fixes
https://github.com/elastic/kibana/issues/159756, this will essentially
mimic the embedded experience.

Alternatively, if you want to test this in an actual iframe...

1. Start and login to Kibana with the default `kibana.yml` settings
2. Create and embed a dashboard using an iframe in an HTML file and open
that file in your browser - the iframe will show a prompt to login, but
you won't be able to. Instead...
3. Add the following settings to your `kibana.yml` file:<br><Br>
   ```
    xpack.security.secureCookies: true
    xpack.security.sameSiteCookies: 'None'
   ```
4. Wait for Kibana to re-load
5. Refresh the HTML page from step 2
6. The embedded dashboard should now be available for you to test 👍 

#### Scenarios Tested

-  **Non-fullscreen mode**

    <details>
<summary> Without filter pill, without header banner <i>(click to see
screenshot)</i></summary>
<img
src="f68bbcfb-74d8-497c-a2ae-33e8e0c02660"/>
    </details>

    <details>
<summary> Without filter pill, with header banner <i>(click to see
screenshot)</i></summary>
<img
src="7c19711c-61dc-499a-b1d0-01fab639a27e"/>
    </details>

    <details>
<summary> With filter pill, without header banner <i>(click to see
screenshot)</i></summary>
<img
src="36e848bd-f0d9-41e3-8a8a-a48571ad5cd2"/>
    </details>

    <details>
<summary> With filter pill, with header banner <i>(click to see
screenshot)</i></summary>
<img
src="cd7489f6-3f34-439a-a30e-3ef39f3970b5"/>
    </details>
    
    <details>
<summary> With filter pill, with header banner <b>and</b> notification
banner <i>(click to see GIF)</i></summary>
<img
src="bd67b4eb-4f68-4d9b-9e22-4d1b2d2e4d90"/>
    </details>

-  **Fullscreen mode**

    <details>
<summary> Without filter pill, without banner <i>(click to see
screenshot)</i></summary>
<img
src="d7d15560-7698-424f-b761-59b5557abe37"/>
    </details>

    <details>
<summary> Without filter pill, with header banner <i>(click to see
screenshot)</i></summary>
<img
src="311b6f3d-5152-4d16-ba39-160978c60c96"/>
    </details>

    <details>
<summary> With filter pill, without header banner <i>(click to see
screenshot)</i></summary>
<img
src="bff9e040-8169-40c7-a086-13a19e870383"/>
    </details>

    <details>
<summary> With filter pill, with header banner <i>(click to see
screenshot)</i></summary>
<img
src="3f453811-e65d-4ac4-9524-c396f9efdbdd"/>
    </details>

    <details>
<summary> With filter pill, with header banner <b>and</b> notification
banner <i>(click to see GIF)</i></summary>
<img
src="f79673e7-03f2-49fa-be56-b67bf7a12976"/>
    </details>

### Non-Embed Mode

- #### Before:


71ffc964-2844-41a6-98d6-353e84d674be

- #### After:


894aa292-b611-4e5e-a0d7-fe3d256fc3ba


### 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
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### 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-06-20 16:23:06 -06:00
Dario Gieselaar
85ba9e92fc
[APM] Ensure Saved Objects are versionable (#159881) 2023-06-20 18:37:58 +02:00
Stratoula Kalafateli
c0e43dbf28
[Lens][Visualize] Removes wrong padding on the dashboard (#159992)
## Summary

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

If the height of a partition chart exceeds 1000px paddings are added,
reducing the chart size.
This is caused due to this piece of code
https://github.com/elastic/kibana/pull/122420

This was added for the aggbased editor to reduce a bit the pie size
(otherwise it was taking the full container size and the pie was huge)

Although we want this, we don't want this to be applied in dashboards or
lens editor. This PR is fixing this by adding the paddings only on the
agg based editor level

In agg based editor
<img width="651" alt="image"
src="48ac6fdd-43e3-46f5-8818-d40334678fce">

Dashboard with very tall treemap, no paddings
<img width="933" alt="image"
src="8787d6ab-887c-4c8d-8419-2c2d5659f2c1">



### 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
2023-06-20 16:02:48 +03:00
Gergő Ábrahám
66e87e63e9
[Fleet][Agent Tampering] Remove unused created_at field from uninstall token SO mapping (#159985)
## Summary

`created_at` field was added to the mapping for the uninstall token
Saved Object, but it's not used and causes trouble.
~There is a discussion whether to remove it from the mapping or not,
before the recently added mapping itself is released with v8.9.0, so I
prepared this PR to merge in case we want to remove it.~ The discussion
ended with the decision to remove the field, so the aim is to merge this
PR.
2023-06-20 14:54:26 +02:00
Shahzad
8d83f64383
[Synthetics] Add TLS Certificate expiry alert (#159697)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Abdul Wahab Zahid <awahab07@yahoo.com>
2023-06-20 03:24:06 -07:00
Pierre Gayvallet
9e0c9a7ad5
/api/status - always return a consistent status code (#159768)
## Summary

Fix https://github.com/elastic/kibana/issues/158910

Changes the behavior of the `/api/status` endpoint to always returns a
consistent http status code, and in particular:
- during the preboot stage 
- when accessed by unauthenticated users and `status.allowAnonymous` is
`false`.

That way, `/api/status` can properly be used for readiness checks. 

Please refer to https://github.com/elastic/kibana/issues/158910 for more
details.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-06-20 02:06:40 -07:00
Marta Bondyra
2fd8f04abe
[Lens] fix FieldPicker passes the prop to the DOM when it shouldn't (#159930)
## Summary

When opening the field picker, the error in the console appears:
<img width="837" alt="Screenshot 2023-06-19 at 15 45 39"
src="10fbc0e6-ae59-4c3b-ab94-80dd86805ca6">

That's because we pass `exists` props to the `styledOptions` which are
passed to the dom.
The thing is we don't need to pass this prop. We assign the classname
based on `exists` value at the same level and then do the styling but
then don't use it in any level deeper, so no need to pass it. So I
removed it to fix this error.

fixes errors that show in tests too:
<img width="605" alt="Screenshot 2023-06-19 at 20 54 58"
src="1583070f-8e18-4494-9892-585bef584588">
<img width="761" alt="Screenshot 2023-06-19 at 20 55 39"
src="23aab03b-0204-478b-aa01-fab801d02e78">
<img width="730" alt="Screenshot 2023-06-19 at 20 56 49"
src="cae606f5-54a8-4da9-99cf-e5151302acae">
2023-06-20 09:36:09 +02:00
Matthew Kime
9e74fcf896
[data / saved query] BWCA all the routes (#158790)
## Summary

All routes
- Use versioned router
- Moved to internal path
- Validate responses
- All responses are typed with response types, separate from internal
api types. This is to help prevent unacknowledged changes to the api.
- Version is included in all requests

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-06-19 07:34:57 -07:00
Anton Dosov
cfa46e473a
[Drift] Revert adding Chat to Management (#159896)
## Summary

Partially revert https://github.com/elastic/kibana/pull/159121
Reverts adding Drift chat to management. Part of
https://github.com/elastic/kibana/issues/158835

We decided to revert to adding to management for now because we realized
that there are a lot of cases in the Management app when Drift Chat can
overlap buttons on the page 😢

Here are some examples: 

<img width="600" alt="Screenshot 2023-06-15 at 16 20 43"
src="980916dc-b463-45f4-b5c1-bdce9f3f8336">
<img width="600" alt="Screenshot 2023-06-15 at 16 20 43"
src="ec74332b-5c91-4175-bde6-8e736d8bb4fa">
<img width="600" alt="Screenshot 2023-06-15 at 16 20 50"
src="5753b05d-7abc-409f-9a06-9f19a910461a">
2023-06-19 06:39:16 -07:00
Alejandro Fernández Haro
14c5fffb24
[Telemetry] Permanently hide the telemetry notice on dismissal (#159893) 2023-06-19 14:43:41 +02:00
Vadim Kibana
9fc99470a7
[Files] Do not doubly escape search queries (#159793)
## Summary

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


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


### For maintainers

- [x] 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-06-19 14:19:26 +02:00
Marco Liberati
c8e8439554
[Lens] Provide dimension title fallback in case of empty content (#154368)
## Summary

Fixes #151271 

This PR is a proposal to provide a fallback title in case the user
decides to provide an empty value for dimensions title.

<img width="1230" alt="Screenshot 2023-06-14 at 12 05 46"
src="521d00db-4c1e-4aff-a142-086fa3456884">
<img width="1238" alt="Screenshot 2023-06-14 at 12 05 35"
src="9a272fac-02e6-4585-81d1-5e0b2686eaf1">


Note that this applies only to the presentation of the dimension button,
but the title remains as empty space in the configuration itself.
Tests added with testing-library.

### 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-06-19 10:04:35 +02:00
Matthew Kime
5c5add2d7c
[data / search session] BWCA all the routes (#158981)
### Summary

All routes
- Use versioned router
- Validate responses
- All responses are typed with response types, separate from internal
api types. This is to help prevent unacknowledged changes to the api.

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

---------

Co-authored-by: Lukas Olson <lukas@elastic.co>
2023-06-16 00:28:29 -05:00
Matthew Kime
4a8bbd970a
[data views] fields_for_wildcard - disable schema response validation (#159758)
## Summary

Response validation is failing when there are field conflicts. Disable
response validation until a complete schema can be created.

Problem was introduced in https://github.com/elastic/kibana/pull/158608
2023-06-15 21:22:32 -05:00
Devon Thomson
f60d43e27b
[Dashboard] Fix Time Range Regression (#159337)
Fixed Dashboard loading with a saved time range when the URL also contains a time range.
2023-06-15 16:10:55 -04:00
Kylie Meli
5c7a5b0956
Add Confluent Cloud to integrations UI (#159735)
## Summary

Add a new tile into the Integrations UI for Confluent Cloud's Elastic
Sink Connector.

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

<img width="1675" alt="Screenshot 2023-06-14 at 1 38 33 PM"
src="964d30be-4d96-47fc-a36e-148aa71e864e">

### 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)
- [ ]
~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~
- [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
- [ ] ~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)~
- [X] 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)~

### 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-06-15 13:56:15 -04:00
Hannah Mudge
9b0f10629b
[Controls] Range slider a11y and performance improvements (#159271)
Closes https://github.com/elastic/kibana/issues/135466

## Summary

The main goal of this PR is to fix the serious "Buttons must have
discernible text" a11y failure - this is accomplished by switching from
building our own range slider button using `EuiFlexGroup` to instead
using `EuiFormControlLayoutDelimited`, which both resolves these a11y
issues and also fixes a rendering regression:

| Before | After |
|--------|-------|
|
![image](49ea1516-db74-46af-baa5-4ad0a31d5b5a)
|
![image](71bc61f2-f10d-4f8c-8ad2-2681f7faf921)
|

As part of this, I also took some time to clean up some of the range
slider code, which hasn't really been touched in awhile - this
includes...
- moving the debounce on range selections from the embeddable's `input$`
subscription to the component itself, as described
[here](https://github.com/elastic/kibana/pull/159271#discussion_r1226886857).
- fixing a bug where resetting the range slider would unnecessarily
cause unsaved changes, as described
[here](https://github.com/elastic/kibana/pull/159271#discussion_r1226885018).
- improving the `onClick` behaviour (with some notable limitations), as
described
[here](https://github.com/elastic/kibana/pull/159271#discussion_r1226934124).

As a follow up, we need to move the "clear selections" button [to a
hover action](https://github.com/elastic/kibana/issues/159395), which
will enable us to then fully move forward with our transition to the
`EuiDualRange` component.

### 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
- [ ] ~Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard
accessibility](https://webaim.org/techniques/keyboard/))~
   > **Note**
> Details provided
[here](https://github.com/elastic/kibana/pull/159271#discussion_r1226934124)
on why only partial keyboard support is currently supported
- [x] 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))
- [x] 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))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### 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-06-15 10:58:11 -06:00
Devon Thomson
e7528a2372
[Dashboard] Fix alias redirect & update error handling (#159742)
Makes dashboard load errors recoverable. Fixes a regression where Alias redirects resulted in infinite loading.
2023-06-15 11:57:43 -04:00
Jean-Louis Leysens
2b81164ff9
[http] Only allow 2023-10-31 when registering public versions (#159553)
## Summary

Adds logic (and tests) to ensure that all registered public routes are
set to `2023-10-31` for now. This check is only performed in dev mode
which allows us to test our existing route default logic.

### Notes

This works best as a runtime check given the versioned router API, but
perhaps I missed a way to do this with just type checking?
2023-06-15 11:50:54 -04:00
Alejandro Fernández Haro
d240154af1
[Serverless Snapshot Telemetry] Fallback ES version (#159600) 2023-06-15 07:28:54 -07:00
Adam Demjen
4573874fab
[8.9] Add ESRE landing page placeholder and navigation (#159589)
## Summary

This PR adds the ESRE landing page to the left hand nav and the
hamburger menu. The page is just a placeholder for now, but it will be
filled with a complete step-by-step guide in follow-up PRs.

cc @julianrosado on ordering of menu items.

![Screenshot 2023-06-13 at 10 33
07](07cbcb84-6494-44e2-a09b-fcaf4d816b5b)
![Screenshot 2023-06-13 at 10 32
56](978ad272-3735-42ac-a3f8-20649485d687)

### 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
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-15 09:49:05 -04:00
Peter Pisljar
b18d8d4c43
content management - event annotations (#159692) 2023-06-15 15:31:34 +02:00
Elena Stoeva
e4349cd52a
[Console] Update autocomplete definitions (#159556)
Closes https://github.com/elastic/kibana/issues/157753

## Summary

This PR updates the script-generated autocomplete definitions for
Console.

Tested all new autocompletions manually in Console - everything worked
as expected except that the documentation links for all Synonyms
requests (`synonyms.delete.json`, `synonyms.get.json`,
`synonyms.put.json`, `synonyms_sets.get.json`) lead to 404 error pages,
but it seems that's how these links were introduced in the [Es Rest API
specs](https://github.com/elastic/elasticsearch/tree/main/rest-api-spec/src/main/resources/rest-api-spec/api).
@carlosdelest I see that you added the specs for the Synonyms requests -
do you know if their documentation pages will be active once 8.9 is
released?
2023-06-15 16:20:44 +03:00
Vadim Kibana
232c3a247a
[Files] Mime-type and extension filtering on client side (#159588)
## Summary

This PR makes sure that, both, `.list()` and `.find()` client side
methods support filtering by mime type as well as by file extension.

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


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

### For maintainers

- [x] 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-06-15 13:18:56 +02:00
Marco Liberati
536a8d4194
[Lens] Add new Metric formatter migrations (#159539)
## Summary

Part of [54306](https://github.com/elastic/kibana/issues/154306) 
Required #158468 to be merged first.

This PR integrates only the migration part of the new Metric new
formatter task.

This migration implementation defines takes the simplest route for the
migration route of metric visualization formatter:
* if any custom formatter is set in Lens, then apply a `compact` flag on
it to keep it consistent
* if `Default` formatter is set in Lens, then assume nothing and let the
regular formatter hierarchy do its own work

### Example

Original dashboard


![image](e5cff808-456d-406e-a221-706c207f7629)

After migration


![image](d3f2052f-13d8-4228-b446-0eaf5a339e13)


### 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: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2023-06-15 13:06:14 +02:00
Peter Pisljar
afc9613a68
moving tsvb routes to /internal prefix (#159296) 2023-06-15 12:22:54 +02:00
Vadim Kibana
8e5440ef03
[Files] Use React theme provider in the files management section (#159504)
## Summary

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-06-15 11:58:54 +02:00
Matthew Kime
65205ab0b7
[data views] Move fields_for_wildcard to internal route (#159637)
## Summary

`/api/index_patterns/_fields_for_wildcard` =>
`/internal/data_views/_fields_for_wildcard`

Part of https://github.com/elastic/kibana/issues/159158
2023-06-14 17:00:26 -05:00
Bree Hall
e82fa7ff79
Upgrade EUI to v82.1.0 (#159744)
eui@81.3.0  eui@82.1.0

## [`82.1.0`](https://github.com/elastic/eui/tree/v82.1.0)

- Added ability for `EuiMarkdownEditor` plugins to disable toolbar
buttons ([#6840](https://github.com/elastic/eui/pull/6840))

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

**Bug fixes**

- Fixed `EuiPopover`'s types to omit `panelProps.hasBorder` and
`panelProps.hasShadow` - these props are not customizable on popovers
for visual consistency
([#6836](https://github.com/elastic/eui/pull/6836))

**Breaking changes**

- `EuiRange` & `EuiDualRange` no longer have a hard limit of 20
displayed ticks. The component now instead detects the width available,
and throws an error if each tick has less than 5 pixels of width. We
recommend testing your tick usage at smaller screens to ensure they
always display legibly to users.
([#6829](https://github.com/elastic/eui/pull/6829))
2023-06-14 17:53:50 -04:00
Davis McPhee
b78c798971
[Discover] Implement Discover customization framework (#158603)
## Summary

This PR includes the initial implementation of the Discover
customization framework based on the `2023-04 Discover Customizations`
RFC.


![customizations](db8202d1-666d-44da-84b0-dce4fd1118e5)

Notes:
- I've included two initial extension points in this PR: `top_nav` and
`search_bar`. To my knowledge, these are the ones o11y want to start
with, but we don't yet have product alignment on these decisions. ~~I've
left them in for now for testing purposes, but I'll need to update this
PR before merging to either add tests for these extensions points if we
decide to include them, or remove them if we decide not to include
them.~~ Tests have now been added for these customizations.
- I'm planning to open a separate PR with documentation about the
framework once this is merged, but merging this first will unblock o11y.
- In order to enable customization profiles, Discover has been updated
to user locators for all of its navigation, which will allow the current
profile to be maintained when navigating between routes. This is because
the current customization profile is stored in the URL path as
`/p/{profile_name}/{discover_route}`.

Resolves #158625.

### Checklist

- [ ] ~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~
- [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
- [x] 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))~
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### 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-06-14 15:09:13 -03:00
Alejandro Fernández Haro
195216f0ec
[Serverless Telemetry] Add serverless label to inform of the project type (#159549)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-14 18:05:04 +02:00
Nathan Reese
e581d57b5e
[lens] Fix Tag cloud warning about container being too small never disappears (#159611)
Closes https://github.com/elastic/kibana/issues/159494

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-14 08:49:04 -06:00
Oliver Gupte
2bab34a8df
[Logs onboarding] Removes dependency on apikey id in saved objects (#159535)
Closes #159381

Makes use of the auto-generated saved object ID to identify
observability onboarding state saved objects, so the API key id is never
persisted. In this change, the generated API key never has an explicit
association with the saved object for the onboarding flow.
2023-06-14 10:20:47 -04:00
Nathan Reese
57a17751c3
[lens] significant terms convert to lens (#159580)
Part of https://github.com/elastic/kibana/issues/154307

Update convert to lens functionality to support significant terms
aggregation

<img width="500" alt="Screen Shot 2023-06-13 at 8 58 09 AM"
src="949199ee-24e2-45d0-84b1-512698abecb4">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2023-06-14 07:29:47 -06:00
Nicolas Chaulet
92eb219ef0
[Fleet] Allow to overrides agent policy (#159414) 2023-06-14 08:39:50 -04:00
Patryk Kopyciński
09577fa0af
Add react-router-dom-v5-compat (#159173)
## Summary

Prep work for bumping react-router to v6
Following https://github.com/remix-run/react-router/discussions/8753

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-14 05:13:15 -07:00
Drew Tate
6553ebbdd5
[Lens][Visualizations] library annotation groups listing page (#157988) 2023-06-13 20:09:01 -05:00
Davis McPhee
44bfd0c343
[Discover] Refactor Unified Histogram refetching logic for text based languages (#159438)
## Summary

This PR refactors and simplifies the Unified Histogram refetching logic
for text based languages in Discover to minimize unnecessary refetches
while ensuring the total hits and Lens visualization stay in sync with
the results. It also introduces a new set of functional tests to track
the number of search requests sent from Discover under various scenarios
to help reduce the chance of regressions in data fetching logic.

Flaky test runner x 100:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2375.

Note: the flaky test runner has a couple of failures, but they all have
the error `expected testSubject(globalLoadingIndicator-hidden) to
exist`, which is also the same error as these three recently skipped
tests related to text based language mode:
- #159083
- #159167
- #159194

This suggests the failures aren't related to this PR, and I don't think
they should prevent us from merging this. But it also means we have a
critical issue related to text based languages that needs to be
addressed asap, possibly this one: #158893.

Fixes #158819.

### Checklist

- [ ] ~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~
- [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
- [ ] ~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)~

### 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: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2023-06-13 20:29:04 -03:00
Kevin Delemme
65b776280f
feat(composite-slo): add feature flag (#159427) 2023-06-13 13:13:51 -04:00
Sébastien Loix
fb41ca56f9
[SharedUxChromeNavigation] Use deeplink id instead of href (#159125) 2023-06-13 10:10:10 -07:00
claracruz
6f94e42a32
Update icons on landing page tweaks (#159557)
Rel: https://github.com/elastic/kibana/issues/154117

This PR applies tweaks/updates requested @
https://github.com/elastic/kibana/pull/159114#issuecomment-1585080155

<img width="1221" alt="Screenshot 2023-06-13 at 11 44 36"
src="5d27424d-19d9-4c0c-bc7c-d394e745af55">
2023-06-13 16:50:36 +01:00
Chris Cowan
edd7fddea0
[SLO] Update DataView hook to search saved objects (#159360)
## Summary

This PR changes the useFetchDataViews hook to send the search query to
the `DataViews.find` method to support users who might have more than 10
DataViews.

@elastic/kibana-data-discovery I added `name` to the list of search
fields for the `find` method in order to match on the DataView `name`
and `title`.

<img width="410" alt="image"
src="97b42863-f302-4f0c-97fc-204a28d1ccc2">


### 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
2023-06-13 09:25:25 -06:00
Alejandro Fernández Haro
1d22dcce75
[Snapshot telemetry] Report to v3 (#159406)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-06-13 15:17:57 +02:00
Jon
736252e5ef
[cli] Re-add --serverless support on distributions (#159516)
Prior to https://github.com/elastic/kibana/pull/158750, `bin/kibana
--serverless=<project>` was able to load project specific configurations
on Kibana distributions.

This was used in functional tests
[here](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/functional/config.base.ts#L31),
but admittedly may not be the correct way to start the Kibana server.

Opening this up for discussion

1) Do we want to support `bin/kibana --serverless`?
2) What's the recommended way to run a distribution in serverless mode?

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-13 08:05:53 -05:00