Commit graph

6599 commits

Author SHA1 Message Date
Milton Hultgren
a697da262f
[Obs AI Assistant] Add tests for if chat telemetry is sent and correctly shaped (#181086)
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-05-02 12:00:56 +02:00
Elena Stoeva
8e258282f9
[Mappings Editor] Disable _source field in serverless (#181712)
Closes https://github.com/elastic/kibana/issues/181555

## Summary

This PR disables the `_source` field in the Mappings editor's advanced
options when in serverless.

**How to test:**
1. Start a serverless project.
2. Go to Index Management and start creating an index template or a
component template.
3. In the Mappings step, go to the "Advanced options" tab.
4. Verify that the `_source` field is not displayed and that creating a
template doesn't add this property to the Es request.
5. Verify that, in stateful Kibana, the `_source` field still exists and
works as expected.

<!--
### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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>
2024-05-01 21:03:25 +03:00
Stratoula Kalafateli
f3d18faab2
[ES|QL] Rename the setting to a more generic one and move to the general section (#182074)
## Summary

Renames the setting from discover:enableESQL to enableESQL and moves it
to the General Section

<img width="985" alt="image"
src="ebafe7cd-4695-413c-a0e3-90e3574139e5">

We checked the telemetry and a very small percentage of users have
switched off this setting. It was also on tech preview so we decided in
favor of this change as more and more applications are using this
setting to hide ESQL from their applications.

<img width="850" alt="image"
src="404f2494-8a17-4a9d-943a-d9d72b324bc0">

### Release note
We renamed the advanced setting which hides the ES|QL from the UI from
`discover:enableESQL` to `enableESQL`. You have to switch it off again
if you want to disable ES|QL features from your kibana applications.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-05-01 16:13:53 +02:00
Tiago Costa
f16c40e083
skip flaky suite (#181955) 2024-05-01 14:42:37 +01:00
Tiago Costa
639938c098
skip flaky suite (#182136) 2024-05-01 14:39:03 +01:00
Anton Dosov
f5d7eb6e35
Dashboard filter by creator (#180147)
Part of https://github.com/elastic/kibana-team/issues/769

## Summary

This PR adds a "created by" filter to the dashboard listing page. We've
added the created_by field recently
[here](https://github.com/elastic/kibana/pull/179344) so only newly
created by interactive users dashboards will be populated with
`created_by`

### Demo 

<img width="1510" alt="Screenshot 2024-04-25 at 16 32 03"
src="ac70ffea-05be-4d70-bbfa-c1cc9d5dd747">

<img width="1510" alt="Screenshot 2024-04-25 at 16 32 11"
src="9889ccae-08d0-4fb6-977e-c42e85337e0e">


### Implementation notes

#### Suggesting users

We suggest only the users that have at least one dashboard. We do this
by aggregating dashboard saved objects by `created_by`. Because we don't
have server-side pagination or sorting yet, in this initial version, I
decided to do this client-side to keep it as simple as possible for now.

Initially, I did this server-side inside a dashboard plugin as an
internal API route. In the long term, this should probably be moved to
content management in some form, but it is not clear how it should look
yet. This is the commit where I reverted and moved it to client-side
06316ee8f2

#### Clint side filtering 

The user filter is simply a client-side filter because we anyway
currently have an in-memory table with client-side sorting and
pagination. There is no much practical value in server-side filter atm
The filter allows to filter-in by multiple users. It also allows to
filter items without creators

#### `created_by` filter isn't part of the query string

I introduced a separate state for this filter, similar to `tableSort`
and `pagination`. The reason why the `created_by` filter isn't a part of
the `searchQuery` is because we use `profile_id` which looks ugly for
the user, e.g. `u_mGBROF_q5bmFCATLXAcCwKa0k8JvONAwSruelyKA5E_0` so we
can't just add it to a user-facing search query like we do with tags.
`profile_id` is the correct identified we should use, `username` might
not be enough in some cases + `username` in cloud is unreadble account
number. The best alternative could be email, but it isn't always
available. This is why I decided to keep the `created_by` filter hidden
from the user behind the user picker popover and not expose it to the
search bar. The `created_by` filter is synced into the URL just like the
rest of the table state.

#### No distinguishing the current user

There is no logic in place that somehow highlights or renames the
current user in the filter. This can be added, but to limit the scope of
the MVP I didn't do it.


#### User filter component 

We use the `UsersProfilePopover` provided by the security team. We use
it without any overrides, so the component decides how to show users in
a popover. I noticed a small visual issue with an email truncation in a
smaller popover. Might be worth a separate issue.



### Testing 

1. Create multiple new users 
2. Login for each of them 
3. Created a dashboard for each of them 
4. Play with the filter 


#### Next Steps 


The next step would be to add a column with the user: 


![image
(5)](9a3fe30e-6a41-4718-a7aa-53fbe0affd22)
2024-04-30 16:28:31 +02:00
Ignacio Rivas
4ffe8c8b26
[Index Management] Disable toggling data retention in serverless (#181556) 2024-04-29 19:57:25 +02:00
Lukas Olson
c4df36e41f
[KQL] Fix performance issue with nested subqueries (#181208)
## Summary

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

Some history: A similar issue was reported a few years back
(https://github.com/elastic/kibana/issues/76811). The solution
(https://github.com/elastic/kibana/pull/93319) was to use the `--cache`
PEG.js [parameter](https://pegjs.org/documentation#generating-a-parser)
when generating the parser. Back when this was added, we were still
manually building the parser on demand when it was changed. Eventually
we added support for dynamically building the parser during the build
process (https://github.com/elastic/kibana/pull/145615). I'm not sure
where along the process the `cache` parameter got lost but it didn't
appear to be used when we switched.

This PR re-adds this parameter which increases performance considerably
(metrics shown in ops/sec):

```
Before using cache:

  ● kuery AST API › fromKueryExpression › performance › with simple expression
    Received:   7110.68990544415

  ● kuery AST API › fromKueryExpression › performance › with complex expression
    Received:   40.51361746242248

  ● kuery AST API › fromKueryExpression › performance › with many subqueries
    Received:   17.071767133068473

After using cache:

  ● kuery AST API › fromKueryExpression › performance › with simple expression
    Received:   8275.49109867502

  ● kuery AST API › fromKueryExpression › performance › with complex expression
    Received:   447.0459218892934

  ● kuery AST API › fromKueryExpression › performance › with many subqueries
    Received:   115852.43643466769
```

### 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
2024-04-26 20:32:39 -07:00
Brad White
306bcf6e85
[ci] Add FIPS Vagrant box and nightly testing pipeline (#176980)
## Summary

- Closes elastic/kibana-operations#26
- Adds a Vagrant box and corresponding Ansible playbook to create a test
environment for FIPS
- Adds a daily pipeline to run a subset of FTR tests in FIPS mode

### Known Issues
1. The compilation of OpenSSL in FIPS mode is breaking some of the OS
libraries and functionality (`sudo` / `dnf` likely more). Possibly due
to custom OpenSSL installation using different locations than the OS
version.
2. ES is having trouble starting, likely due to issue 1 ([Log
link](https://buildkite.com/elastic/kibana-pull-request/builds/205420#018f0c58-3dc3-41c5-a1a5-9d9a9e14aacc/265-552)).
Disabling ML is a temp workaround added in
803945c759, but we likely need it enabled
in the future anyways, so best to find a proper fix. Tracking at
https://github.com/elastic/kibana-operations/issues/96

### Reviewers
You can view a run of the new pipeline during testing
[here](https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/84).

---------

Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
2024-04-26 16:41:56 -07:00
Tiago Costa
3c3ae49856
skip flaky suite (#166291) 2024-04-26 23:29:16 +01:00
Samiul Monir
41fd6432be
[Serverless] Playground in Serverless (#181474)
## Summary

This PR:

- Integrate Playground into Serverless
- Redesign of Navigation Menu
- Refactor Playground docs

## UI changes:
### Playground in Serverless

![img-1](772d5812-e8ea-41ee-a875-4204fff3e948)

### Playground with docs and indices

![img-2](5545dc3e-bf7d-45c0-9f4a-250dd9c63f75)

### Playground in action


![img-3](a7088863-6dd9-4c4a-9760-e168d37f16c2)


### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-04-26 14:12:51 -04:00
Lukas Olson
920334298c
Use push flyout for Discover document flyout (#166406)
## Summary

Closes https://github.com/elastic/kibana/issues/163798. 
Closes #160306

Uses `"push"` style for the document viewer flyout in Discover.

Before:

<img width="1552" alt="image"
src="7e3e7c35-7317-44ae-b614-55eb337f742b">

After:

<img width="1552" alt="image"
src="542b78e6-3c82-47a5-b35f-1c8635e21580">

### 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)
- [ ] [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: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
2024-04-26 10:41:26 -07:00
Tiago Costa
4e43afd0ff
skip flaky suite (#181884) 2024-04-26 18:05:49 +01:00
Tiago Costa
c8398aa084
skip flaky suite (#181883) 2024-04-26 17:58:26 +01:00
Nick Peihl
d0f26c6928
[Dashboard] Register React embeddables with Add from Library button (#179289)
Fixes #178545

## Summary

Adds React embeddables to the Add from Library button in Dashboard.

Creates a new registry for storing saved object types for embeddables.
This registry supercedes the `savedObjectMetaData` property used by
class-based legacy embeddable factories.

Canvas uses a custom Add from Library button and Canvas does not yet
support React embeddables which is out of scope of this PR.


### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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>
2024-04-24 16:54:15 -04:00
Nathan Reese
60ab2cfe95
PresentationPanel props hidePanelChrome (#181473)
### Changes
1. adds `hidePanelChrome` parameter to `ReactEmbeddableRenderer`. When
true, embeddable is rendered without `PresentationPanel` wrapper
2. Removes `embeddable-explorer` plugin
3. Moves Embeddable developer example into embeddable_examples plugin
4. Creates new examples that demonstrate how to use
`ReactEmbeddableRenderer`
<img width="600" alt="Screenshot 2024-04-23 at 5 19 18 PM"
src="5167a2a4-1968-42e6-92f7-4577c9cda3c6">

Follow-up work to narrow scope of this PR
1. add key concepts to embeddable overview
2. add "Register new embeddable type" tab that details how to create a
new embeddable and shows how you can add embeddable examples to
dashboard
3. group embeddable examples into a single item in "Add panel" menu - to
show best practices of how to keep menu clean
4. remove class based example embeddables

### Test instructions
1. start kibana with `yarn start --run-examples`
5. Open kibana menu and click "Developer examples"
6. Click "Embeddables" card and run examples

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-04-24 14:05:19 -06:00
Julia Rechkunova
ed2f63bf7e
[Discover] Split functional tests in more groups (#180046)
## Summary

This PR splits existing functional tests into more groups so each of
them finishes running quicker.

- `group1` into `group1` and `group5`
- `group2` into `group2_data_grid1`, `group2_data_grid2`,
`group2_data_grid3`
- `group3` into `group3` and `group6`
- `group4` into `group4`, `group7` and `group8` (almost empty)

---------

Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
2024-04-24 11:18:42 -05:00
Pierre Gayvallet
060d99bd1b
Use permanent cache for translation files on production (#181377)
## Summary

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

Use a permanent cache (`public, max-age=365d, immutable`) for
translation files when in production (`dist`), similar to what we're
doing for static assets.

Translation files cache busting is a little tricky, because it doesn't
only depend on the version (enabling or disabling a custom plugin can
change the translations while not changing the build hash), so we're
using a custom hash generated from the content of the current
translation file (which was already used to generate the `etag` header
previously).

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-04-24 13:31:06 +02:00
Efe Gürkan YALAMAN
d4a9132ef5
[Search] Update connectors license (#181153)
## Summary

Updates various connector configurations.

- Box, Notion, Slack, Teams, and Zoom are set to run native.
- Oracle, Outlook and Gmail are GA now. 
- GraphQL and OpenText Documentum added as Tech Preview connector
clients.
- Fixed a few tooltip issues.
- Fixed a Teams `service_type` in integrations page.

Note, waiting for icons for GraphQL and OpenText Documentum before
merging. Screenshots below will have broken images until they are added.

"Select Connector" with basic license:
<img width="1008" alt="Screenshot 2024-04-18 at 15 33 30"
src="113237fb-94e0-465f-8134-f09fc871bc96">
<img width="1028" alt="Screenshot 2024-04-18 at 15 33 35"
src="c59d63bb-fd27-45d3-9e05-093fdf5af6d6">

Integrations tiles:
<img width="1244" alt="Screenshot 2024-04-18 at 14 51 28"
src="314c2c0e-722e-400d-a933-3b99190181b2">
<img width="577" alt="Screenshot 2024-04-18 at 14 51 34"
src="56ef87b9-4ffc-4762-a37e-fa38a2a98c0c">

Native Upgrades:
<img width="342" alt="Screenshot 2024-04-18 at 14 50 12"
src="324d006d-9f01-4761-be72-1346f88e47c0">
<img width="346" alt="Screenshot 2024-04-18 at 14 50 21"
src="d5d67838-1459-4a2a-9480-4c6e2fd6035b">
<img width="352" alt="Screenshot 2024-04-18 at 14 50 32"
src="4622d3bd-67b4-442b-9264-0d7ae889b8e7">
<img width="347" alt="Screenshot 2024-04-18 at 14 50 36"
src="929ea8fa-fadf-46ea-b23b-eaaa193e169e">
<img width="378" alt="Screenshot 2024-04-18 at 14 50 40"
src="44ae8fd6-5791-49c3-b4ef-7b7cb49f5038">


### 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
- [ ] [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: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-04-24 13:29:13 +02:00
Kibana Machine
37c5759943 skip failing test suite (#181493) 2024-04-23 16:59:18 -04:00
Davis McPhee
22dd9f86f4
[Discover] Remove Discover customization profiles (#181259)
## Summary

This PR removes the current Discover customization profile system from
the codebase while leaving the remainder of the customization framework
unaffected.

Testing notes:
- Discover should be unaffected by these changes.
- Logs Explorer should be unaffected by these changes.
- The Timeline ES|QL tab should be unaffected by these changes.
- The `discover_customization_examples` plugin has been migrated from
using a customization profile to using the `DiscoverContainer` component
to embed Discover within its own page, as is done for Logs Explorer and
Timeline.

Resolves #181355.

### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-04-23 12:39:32 -03:00
Matthew Kime
67bc795f8d
[data views] Fix create runtime field functional test on MKI (#181101)
## Summary

Addresses flaky test that fails to set the runtime field type to
composite. Passed a 50x run on the flaky test runner -
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5724

Attempts to avoid this happening - 
![image
(4)](57f38aed-1e70-4fa7-82e6-b9f84e8cb509)
2024-04-23 05:19:01 -05:00
Lukas Olson
585ec64e6d
Display results instead of errors after search timeout (#179679)
## Summary

Replaces https://github.com/elastic/kibana/pull/176026.
Resolves https://github.com/elastic/kibana/issues/172263.

An advanced setting, `search:timeout` determines how long we let search
requests continue before actively cancelling them. The default is 10
minutes. Prior to this PR, after waiting on screen for that 10 minutes,
if the user didn't send to background, the request would cancel and an
error would be shown. This PR changes the behavior to not just show an
error, but to actually retrieve the latest results from the search
request and display them (along with a warning).

Before this PR:


![before](d1752287-e6c5-4a6e-b79d-e8e61b6a156a)

After this PR:


![after](5c8f284f-666f-4365-9021-b93d995a2576)

### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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)

### Release notes

When a long-running search times out, instead of showing an error, any
results that are available will be shown (along with a warning that the
results are incomplete).

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Matthew Kime <matt@mattki.me>
Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
2024-04-22 14:09:30 -07:00
Hannah Mudge
a41177f32c
[Dashboard] Default to saved object description when panel description is not provided (#181177)
Closes https://github.com/elastic/kibana/issues/181172

## Summary

This PR fixes a bug where panels were not showing descriptions from
library items - this is because (1) we weren't providing the
`defaultPanelDescription` as part of the default embeddable API and (2)
the panel header was not defaulting to the `defaultPanelDescription`
when a panel description was not provided.

Because of (1), the panel settings flyout showed a blank description
**despite** having the correct logic for defaulting to the default panel
description - that is why the tests in `customize_panel_editor.test.tsx`
passed but it didn't work in production.

### 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)
2024-04-22 07:52:46 -07:00
Julia Rechkunova
b288ab4880
[ES|QL] Unskip search tests and add version (#181114)
- Closes https://github.com/elastic/kibana/issues/181090
- Closes https://github.com/elastic/kibana/issues/181091

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-04-21 09:46:05 -07:00
Cee Chen
cbc68cd40c
Upgrade EUI to v94.1.0 (major EuiTable refactors) (#180514)
`v93.6.0`  `v94.1.0`

> [!important]
> 👋 Hello everyone - this is a special release containing `EuiTable`'s
conversion to Emotion, several long-overdue cleanups and breaking
changes, and one or two fun new features. First, let's address the big
questions:

### Q: I'm listed as a codeowner, how much should I manually QA/review?

Answer: It depends on what exactly in your code changed, but _in
general_ I would strongly suggest at least pulling this branch down and
doing a quick visual smoke test of all tables (_note: **not**
datagrids_) in your apps/plugins. You should not expect to see any major
visual regressions.

If your table contained any kind of custom styling or behavior (e.g.
custom CSS, etc.) I **strongly** recommend taking more time to QA
thoroughly to ensure your table still looks and behaves as expected.
Teams with very manual or specific updates will be flagged below in
comment threads.

### Q: When do I need to review by?

This PR will be merged **after** 8.14FF. Because this upgrade touches so
many files and teams, we're aiming for asking for an admin merge by EOD
4/18 regardless of full approval status.

As always, you're welcome to ping us after merge if you find any issues
later ([see our
FAQ](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)),
as you will have until 8.15FF to catch any bugs.

### Q: What breaking changes were made, and why?

Here's a quick shortlist of all the changes made that affected the
majority of the commits in this PR:

#### <u>Removed several top-level table props</u>
- The `responsive` prop has been removed in favor of the new
`responsiveBreakpoint` prop (same `false` behavior as before)
- The following props were removed from basic and in-memory tables:
  - `hasActions`, `isSelectable`, and `isExpandable`
- These props were not used for functionality and were only used for
styling tables in mobile/responsive views, which is not a best practice
pattern we wanted for our APIs. Mobile tables are now styled correctly
without needing consumers to pass these extra props.
  - `textOnly`
- This prop was unused and had no meaningful impact on tables or table
content.

#### Removed hidden mobile vs. desktop DOM

Previously, EUI would set classes that applied `display: none` CSS for
content that was hidden for mobile vs. desktop. This is no longer the
case, and content that only displays for mobile or only displays for
desktop will no longer render to the DOM at all if the table is not in
that responsive state.

This is both more performant when rendering large quantities of
cells/content, and simpler to write test assertions for when comparing
what the user actually sees vs. what the DOM ‘sees’.
(c3eeb08441e4b6efe6505e7cddaa87b540ddb259,
78cefcd954a7b46eaccd05e431b5e24dc86071a3)

#### Removed direct usages of table `className`s

EuiTable `classNames` no longer have any styles attached to them, so
some instances where Kibana usages were applying the `className` for
styles have been replaced with direct component usage or removed
entirely (86ce80b61f).

#### Custom table cell styles

Any custom CSS for table cells was previously being applied to the inner
`div.euiTableCellContent` wrapper. As of this latest release, the
`className` and `css` props will now be applied directly to the outer
`td.euiTableRowCell` element. If you were targeting custom styles table
cells, please re-QA your styles to ensure everything still looks as
expected.

---

<details open><summary>Full changelog (click to collapse)</summary>

##
[`v94.1.0-backport.0`](https://github.com/elastic/eui/releases/v94.1.0-backport.0)

**This is a backport release only intended for use by Kibana.**

**Bug fixes**

- Fixed a visual text alignment regression in `EuiTableRowCell`s with
the `row` header scope
([#7681](https://github.com/elastic/eui/pull/7681))

**Accessibility**

- Improved `EuiBasicTable` and `EuiInMemoryTable`'s selection checkboxes
to have unique aria-labels per row
([#7672](https://github.com/elastic/eui/pull/7672))

## [`v94.1.0`](https://github.com/elastic/eui/releases/v94.1.0)

- Updated `EuiTableHeaderCell` to show a subdued `sortable` icon for
columns that are not currently sorted but can be
([#7656](https://github.com/elastic/eui/pull/7656))
- Updated `EuiBasicTable` and `EuiInMemoryTable`'s
`columns[].actions[]`'s to pass back click events to `onClick` callbacks
as the second callback
([#7667](https://github.com/elastic/eui/pull/7667))

## [`v94.0.0`](https://github.com/elastic/eui/releases/v94.0.0)

- Updated `EuiTable`, `EuiBasicTable`, and `EuiInMemoryTable` with a new
`responsiveBreakpoint` prop, which allows customizing the point at which
the table collapses into a mobile-friendly view with cards
([#7625](https://github.com/elastic/eui/pull/7625))
- Updated `EuiProvider`'s `componentDefaults` prop to allow configuring
`EuiTable.responsiveBreakpoint`
([#7625](https://github.com/elastic/eui/pull/7625))

**Bug fixes**

- `EuiBasicTable` & `EuiInMemoryTable` `isPrimary` actions are now
correctly shown on mobile views
([#7640](https://github.com/elastic/eui/pull/7640))
- Table `mobileOptions`:
([#7642](https://github.com/elastic/eui/pull/7642))
- `mobileOptions.align` is now respected instead of all cells being
forced to left alignment
- `textTruncate` and `textOnly` are now respected even if a `render`
function is not passed

**Breaking changes**

- Removed unused `EuiTableHeaderButton` component
([#7621](https://github.com/elastic/eui/pull/7621))
- Removed the `responsive` prop from `EuiTable`, `EuiBasicTable`, and
`EuiInMemoryTable`. Use the new `responsiveBreakpoint` prop instead
([#7625](https://github.com/elastic/eui/pull/7625))
- The following props are no longer needed by `EuiBasicTable` or
`EuiInMemoryTable` for responsive table behavior to work correctly, and
can be removed: ([#7632](https://github.com/elastic/eui/pull/7632))
  - `isSelectable`
  - `isExpandable`
  - `hasActions`
- Removed the `showOnHover` prop from `EuiTableRowCell` /
`EuiBasicTable`/`EuiInMemoryTable`'s `columns` API. Use the new actions
`columns[].actions[].showOnHover` API instead.
([#7640](https://github.com/elastic/eui/pull/7640))
- Removed top-level `textOnly` prop from `EuiBasicTable` and
`EuiInMemoryTable`. Use `columns[].textOnly` instead.
([#7642](https://github.com/elastic/eui/pull/7642))

**DOM changes**

- `EuiTable` mobile headers no longer render in the DOM when not visible
(previously rendered with `display: none`). This may affect DOM testing
assertions. ([#7625](https://github.com/elastic/eui/pull/7625))
- `EuiTableRowCell` now applies passed `className`s to the parent `<td>`
element, instead of to the inner cell content `<div>`.
([#7631](https://github.com/elastic/eui/pull/7631))
- `EuiTableRow`s rendered by basic and memory tables now only render a
`.euiTableRow-isSelectable` className if the selection checkbox is not
disabled ([#7632](https://github.com/elastic/eui/pull/7632))
- `EuiTableRowCell`s with `textOnly` set to `false` will no longer
attempt to apply the `.euiTableCellContent__text` className to child
elements. ([#7641](https://github.com/elastic/eui/pull/7641))
- `EuiTableRowCell` no longer renders mobile headers to the DOM unless
the current table is displaying its responsive view.
([#7642](https://github.com/elastic/eui/pull/7642))
- `EuiTableHeaderCell` and `EuiTableRowCell` will no longer render in
the DOM at all on mobile if their columns' `mobileOptions.show` is set
to `false`. ([#7642](https://github.com/elastic/eui/pull/7642))
- `EuiTableHeaderCell` and `EuiTableRowCell` will no longer render in
the DOM at all on desktop if their columns' `mobileOptions.only` is set
to `true`. ([#7642](https://github.com/elastic/eui/pull/7642))

**CSS-in-JS conversions**

- Converted `EuiTable`, `EuiTableRow`, `EuiTableRowCell`, and all other
table subcomponents to Emotion
([#7654](https://github.com/elastic/eui/pull/7654))
- Removed the following `EuiTable` Sass variables:
([#7654](https://github.com/elastic/eui/pull/7654))
  - `$euiTableCellContentPadding`
  - `$euiTableCellContentPaddingCompressed`
  - `$euiTableCellCheckboxWidth`
  - `$euiTableHoverColor`
  - `$euiTableSelectedColor`
  - `$euiTableHoverSelectedColor`
  - `$euiTableActionsBorderColor`
  - `$euiTableHoverClickableColor`
  - `$euiTableFocusClickableColor`
- Removed the following `EuiTable` Sass mixins:
([#7654](https://github.com/elastic/eui/pull/7654))
  - `euiTableActionsBackgroundMobile`
  - `euiTableCellCheckbox`
  - `euiTableCell`
</details>
2024-04-19 00:05:48 +01:00
Eyo O. Eyo
4127163bd9
revert change to shared UX markdown component for dashboard vis (#180906)
## Summary

This PR reverts the change to the shared UX markdown component that
happened here https://github.com/elastic/kibana/pull/176478. The
aforementioned PR introduced couple of visual issues that were uncaught
during the migration.

The known issues that have been brought up that informed the decision to
revert this change, are itemised below;

- https://github.com/elastic/kibana/issues/180576
- https://github.com/elastic/kibana/issues/180452
- https://github.com/elastic/sdh-kibana/issues/4608


### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-04-18 13:01:18 +01:00
Abdul Wahab Zahid
584f1f77b9
[Dataset quality] Fix flaky test (#181047)
Fixes https://github.com/elastic/kibana/issues/180994

## Summary

Fixes the flaky test by using better timeouts.
2024-04-18 10:08:41 +02:00
Tiago Costa
7aee932fb0
skip flaky suite (#181090) 2024-04-18 04:18:50 +01:00
Tiago Costa
6beb7ec2ce
skip flaky suite (#181090) 2024-04-17 23:16:40 +01:00
Tim Sullivan
e4a32f8f3c
[SharedUX] Remove usage of deprecated React rendering utilities (#180516)
## Summary

Partially addresses https://github.com/elastic/kibana-team/issues/805

Follows https://github.com/elastic/kibana/pull/180003

These changes come up from searching in the code and finding where
certain kinds of deprecated AppEx-SharedUX modules are imported.
**Reviewers: Please interact with critical paths through the UI
components touched in this PR, ESPECIALLY in terms of testing dark mode
and i18n.**

This focuses on code within AppEx-SharedUX. [Reporting changes are
separate](https://github.com/elastic/kibana/pull/).

<img width="1107" alt="image"
src="c0d2ce08-ac35-45a7-8192-0b2256fceb0e">

### 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
- [ ] 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)
2024-04-17 07:52:41 -07:00
Julia Rechkunova
d769242c37
[Discover] Fix customization flaky test (#180940)
- Closes https://github.com/elastic/kibana/issues/177401

25x
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5695
2024-04-16 15:09:08 -05:00
Julia Rechkunova
61841294b6
[Discover] Update sidebar flaky tests (#180724)
- Closes https://github.com/elastic/kibana/issues/180564
- Closes https://github.com/elastic/kibana/issues/180693

25x
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5671
2024-04-16 15:05:03 -05:00
Abdul Wahab Zahid
09155fa299
[Dataset quality] Add Breakdown field on Degraded Docs visualization (#180652)
Adds the Breakdown field to Degraded Docs Visualization. 

The PR exposes the `BreakdownFieldSelector` from
**@kbn/unified-histogram-plugin** as a similar visualization behaviors
and actions are needed on the Dataset Quality flyout as with Logs
Explorer.

<img width="1242" alt="Screenshot 2024-04-12 at 04 00 06"
src="0e34397a-ac56-4a2b-8483-94c96dcbf3c2">
2024-04-16 21:40:49 +02:00
christineweng
51cc9cade2
[Security Solution] Add guided tour to document details flyout (#180318)
## Summary

This PR adds a guided tour for the new expandable flyout in alerts
table.

Where it will show up:
 Alerts page
 Alerts tab in Cases

Tour will not show up in:
 rule creation
 flyout in timeline
 event table.


e9d0ce92-0eb4-4898-ad05-91d701aec01d



**How to test**
- Generate some alerts and go to Alerts page
- Expand a row in alerts table
- Guided tour should appear
- Note that rule preview is only available to alerts. Guided tour for an
event or alert preview does not have that step.

To test guided tour in event and timeline, enable
`expandableEventFlyoutEnabled`, `expandableTimelineFlyoutEnabled`
respectively.

### 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
2024-04-15 12:42:50 -07:00
Julia Rechkunova
35930c0599
[Discover][ES|QL] Update inspect details for the main ES|QL fetch (#180204)
- Closes https://github.com/elastic/kibana/issues/175419

## Summary

This PR enables customization for title/description we show in Inspector
flyout for ES|QL requests.

<img width="500" alt="Screenshot 2024-04-09 at 15 25 11"
src="9636458b-496f-4a87-bd1c-8d125f867752">
<img width="500" alt="Screenshot 2024-04-09 at 15 25 20"
src="3efe83c1-49ef-47e5-867f-eae3f00ca488">



### 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
2024-04-15 14:04:58 +02:00
Julia Rechkunova
9cf478b4a3
[Discover] Unskip field token flaky tests (#180721)
- Closes https://github.com/elastic/kibana/issues/180622

75x
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5668
2024-04-15 01:56:02 -07:00
Drew Tate
bec1755030
[ES|QL] Add more functions to the validator (#180640)
## Summary

- [x]
[`SIGNUM`](https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-functions-operators.html#esql-signum)
- [x] spatial functions
- [x]
[`ST_CENTROID_AGG`](https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-functions-operators.html#esql-agg-st-centroid)
- [x]
[`ST_CONTAINS`](https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-functions-operators.html#esql-st_contains)
- [x]
[`ST_DISJOINT`](https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-functions-operators.html#esql-st_disjoint)
- [x]
[`ST_INTERSECTS`](https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-functions-operators.html#esql-st_intersects)
- [x]
[`ST_WITHIN`](https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-functions-operators.html#esql-st_within)
- [x]
[`ST_X`](https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-functions-operators.html#esql-st_x)
- [x]
[`ST_Y`](https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-functions-operators.html#esql-st_y)
- [x]
[`MV_SLICE`](https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-functions-operators.html#esql-mv_slice)
- [x]
[`MV_ZIP`](https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-functions-operators.html#esql-mv_zip)

### Checklist

- [x]
[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
2024-04-13 08:54:45 +02:00
Stratoula Kalafateli
fd9722cab0
[ES|QL] Fixes the problem with Discover and queries without the from command (#180692)
## Summary

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

When there was no from command in the query we were using the current
dataview. This might have the @timestamp field which is not returned by
the `ROW ...` or `Show meta` commands. So the histogram was failing.

I am solving this issue by creating a dataview based on the current
dataview but without the timeFieldName

<img width="1677" alt="image"
src="81b79634-8c2e-4346-bd34-48ae7580ab89">

I still think we should find another way to deal with these commands but
for now this is a nice way forward

**Before:**

<img width="1679" alt="image"
src="68ec6f76-6721-472b-8b49-7c719ad04208">



### Checklist

- [ ] [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
2024-04-13 08:52:09 +02:00
Tiago Costa
3f8dbe8791
skip flaky suite (#180622) 2024-04-12 18:45:05 +01:00
James Gowdy
ce14d99f3b
[ML] Hides filebeat configuration card for Serverless Search file upload (#178987)
Updates the text on the landing page

**Before**

![image](003a582f-4fe0-4d2a-a0dd-d40bd4ed57f5)

**After**

![image](75afae43-1855-4012-a728-488b6a3d3823)

Adds a new feature flag to allow the `Create filebeat configuration`
card to be hidden. This has been
[requested](https://github.com/elastic/enterprise-search-team/issues/7075)
for the serverless search project and so the `serverless.es.yml` has
been updated to include this flag.

**Before**

![image](add1aa39-186d-4816-9f92-27fa2f6f0378)

**After**


![image](a9ab7243-2fae-48fc-a3a0-0b2b347630be)
2024-04-12 16:52:07 +01:00
Rodney Norris
bb5f6a6b20
[Console] update default code snippet (#179115)
## Summary

As a part of the Dev Tools Improvements work we wanted to update the
console default value to be a bit more opinionated and include some real
commands as examples.


![image](ad8e29bc-659c-4b65-883f-7e203cb55c28)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-04-12 10:26:00 -05:00
Julia Rechkunova
510395d414
[Discover] Enable the suggestion selector from lens configuration flyout (#180323)
- Closes https://github.com/elastic/kibana/issues/180249
- Closes https://github.com/elastic/kibana/issues/179515

## Summary

This PR removes suggestions from above the UnifiedHistogram vis. Now
users can change suggestions via the lens flyout.

ES|QL query which supports suggestions:
<img width="600" alt="Screenshot 2024-04-10 at 16 57 09"
src="a0e7aed9-c223-4e29-8919-3e65eef52443">

ES|QL query which does not support suggestions for the histogram vis:
<img width="600" alt="Screenshot 2024-04-10 at 16 58 08"
src="6ba3c283-5bd3-46eb-839f-6d6fda41db5b">

25x
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5656

### 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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2024-04-12 17:24:44 +02:00
Catherine Liu
7ef7602116
[Dashboard] Fix flaky embed mode test (#179774)
## Summary

Closes #168648.

After updating the snapshots, it appears this test is no longer flaky. I
run this test 200 on the flaky test runner with all passes.

Flaky test runner x200:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5648


### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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)
2024-04-11 15:10:07 -07:00
Julia Rechkunova
357b6f8651
[Discover][ES|QL] Persist columns sorting inside SO (#180193)
- Closes https://github.com/elastic/kibana/issues/169345

## Summary

This PR allows to persist the configured columns sorting for ES|QL mode
too.

---------

Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>
2024-04-11 13:22:36 +02:00
Davis McPhee
339379e9e8
[Discover] [Unified Data Table] Add document comparison mode (#166577)
## Summary

This PR adds a new document comparison mode to Discover and Unified Data
Table:

![diff](40edf401-9514-4388-87a2-c528dbdd6f90)

Flaky test runner x50:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5590.

Resolves #93567.

### 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)
- [ ]
[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)
- [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>
2024-04-10 16:49:49 -03:00
Julia Rechkunova
19c697dcab
[Discover] Unskip lens vis tests (#180438)
- Closes https://github.com/elastic/kibana/issues/180404

50x
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5640
2024-04-10 20:53:55 +02:00
Nick Partridge
2b344d2797
[FTR] Update getAttribute method return (#179715) 2024-04-10 10:28:03 -07:00
Julia Rechkunova
099c073c8c
[Discover][ES|QL] No legacy table for ES|QL mode (#180370)
- Closes https://github.com/elastic/kibana/issues/180286

## Summary

Even if `doc_table:legacy` is enabled this PR makes sure that we render
the new grid for ES|QL mode.


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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-04-10 16:51:15 +02:00
Dzmitry Lemechko
48aed6e623
[FTR] add dataViews service (#180066)
## Summary

This PR makes few changes:
- extend
[kbn-test-subj-selector](https://github.com/elastic/kibana/compare/main...dmlemeshko:kibana:ftr/add-dataViews-service?expand=1#diff-43f2401dd3f9c11b6cbd75c8801a6ccbbe1d4db5a19e907f263c4932f810c73c)
with wildcard (*) support:

```
testSubjSelector('*dataView-switch-link') => [data-test-subj*="dataView-switch-link"]
```

It allows us to search for DOM elements with the common text part in
`data-test-subj` attribute, e.g. `lns-dataView-switch-link` &
`discover-dataView-switch-link`

- add new FTR service
[dataViews](test/functional/apps/discover/group4/_adhoc_data_views.ts)
to unify mostly identical code related to data views across multiple
page objects (lens, discover, unified_search, dashboard)
It is not a big win in terms of code cleanup, but should save some time
whenever we will need to make logic updates.
2024-04-10 16:33:00 +02:00