Closes https://github.com/elastic/kibana/issues/200090
## Summary
This PR migrates the `GridLayout` component a more traditional React
design using **props** rather than providing an API. This change serves
two purposes:
1. It makes the eventual Dashboard migration easier, since it is more
similar to `react-grid-layout`'s implementation
3. It makes the `GridLayout` component less opinionated by moving the
logic for panel management (i.e. panel placement, etc) to the parent
component.
I tried to keep efficiency in mind for this comparison, and ensured that
we are still keeping the number of rerenders **o a minimum**. This PR
should not introduce **any** extra renders in comparison to the API
version.
### Checklist
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
### Identify risks
There are no risks to this PR, since all work is contained in the
`examples` plugin.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes#201189
## Summary
After this fix was added in
https://github.com/elastic/kibana/pull/200984 the test started failing
as it was verifying the previous kuery value - it was missing the `" "`
so after this bug was fixed the test should be updated as well
(basically changing `container.id:foo` with `container.id:"foo"`) and
this PR updates the test.
I checked locally and the test is passing now.
Closes: #200305
## Description
Elements which are behind dialogs shouldn't be announced as not to
confuse users, especially the ones using assistive technology.
## Preconditions
Stateful Behavioral Analytics -> Integration page is opened.
Collection is added.
## What was changed:
This PR apply the similar with
[#197212](https://github.com/elastic/kibana/pull/197212) changes
1. Modal dialog was slightly updated to be more accessibility (a11y)
friendly:
- To differentiate the two UI states, we now use two colors for the
panel: primary for the initial state and success when the API key is
generated.
- An `EuiCallOut` with `role="alert"` was added to announce status
updates for screen reader users.
2. After creating an API key, the focus now moves to the Download API
key button.
## Screen
https://github.com/user-attachments/assets/3e72aeb5-34a2-43a6-b477-52a2f71b750a
Closes: #200141Closes: #199815
### Description
Fields which are in error should have error text that for user it should
be instantly clear what is the error and how to fix it.
### What was changed:
1. Error handling was added for`
applications/components/indices_select_combobox.tsx` component
### Screen
<img width="806" alt="image"
src="https://github.com/user-attachments/assets/54a51822-d66a-4f50-be3f-2d8b203b0cd1">
Closes#199843
### Summary
This PR documents the reason for skipped Indices diagnostics API tests
to avoid confusion in the future. APM diagnostics is an experimental
internal tool. Indices diagnostics determine whether ingest pipelines
were installed correctly by verifying the presence of the
`observer.version` field in grok processor, this approach isn't reliable
anymore. We should consider implementing improvement or sunsetting the
feature if there is no maintainer.
This PR migrates test suites that use `renderHook` from the library
`@testing-library/react-hooks` to adopt the equivalent and replacement
of `renderHook` from the export that is now available from
`@testing-library/react`. This work is required for the planned
migration to react18.
## Context
In this PR, usages of `waitForNextUpdate` that previously could have
been destructured from `renderHook` are now been replaced with `waitFor`
exported from `@testing-library/react`, furthermore `waitFor`
that would also have been destructured from the same renderHook result
is now been replaced with `waitFor` from the export of
`@testing-library/react`.
***Why is `waitFor` a sufficient enough replacement for
`waitForNextUpdate`, and better for testing values subject to async
computations?***
WaitFor will retry the provided callback if an error is returned, till
the configured timeout elapses. By default the retry interval is `50ms`
with a timeout value of `1000ms` that
effectively translates to at least 20 retries for assertions placed
within waitFor. See
https://testing-library.com/docs/dom-testing-library/api-async/#waitfor
for more information.
This however means that for person's writing tests, said person has to
be explicit about expectations that describe the internal state of the
hook being tested.
This implies checking for instance when a react query hook is being
rendered, there's an assertion that said hook isn't loading anymore.
In this PR you'd notice that this pattern has been adopted, with most
existing assertions following an invocation of `waitForNextUpdate` being
placed within a `waitFor`
invocation. In some cases the replacement is simply a `waitFor(() => new
Promise((resolve) => resolve(null)))` (many thanks to @kapral18, for
point out exactly why this works),
where this suffices the assertions that follow aren't placed within a
waitFor so this PR doesn't get larger than it needs to be.
It's also worth pointing out this PR might also contain changes to test
and application code to improve said existing test.
### What to do next?
1. Review the changes in this PR.
2. If you think the changes are correct, approve the PR.
## Any questions?
If you have any questions or need help with this PR, please leave
comments in this PR.
## Release Note
Fixes a bug in Automatic Import where icons were not shown after the
integration was installed.
## Summary
Closes#201008.
When implementing safe manifest output #192316 a bug crept in:
the icons array was incorrectly output as a dictionary
icons:
src: /img/logoElastic.svg
title: syslog_test3 Logo
size: 32x32
type: image/svg+xml
and the test was not smart enough to pick it up:
expect(manifest.icons).toBeTruthy();
We fix the field and add better tests for it.
Closes https://github.com/elastic/kibana/issues/200756
## Summary
Enhance existing functional tests for API Keys querying to test filters
and toggles while querying API keys.
### Notes
The following tests were added:
- Toggling the following filters displays the correct keys
- Personal, Managed, Cross cluster types
- Active or expired keys
- Filtering by username by clicking the dropdown list
- Added test for querying using the search bar **but it is skipped** for
now as we'd like to fix the behavior. Tracked by
https://github.com/elastic/kibana/issues/195795
### Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
- [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=
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_node:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Closes https://github.com/elastic/kibana/issues/200008
## Summary
This PR updates the session cleanup task to allow partial results in the
point in time query used to delete any invalid sessions.
### Notes
Using a [recently introduced option by
ES](https://github.com/elastic/elasticsearch/pull/111516), the session
cleanup now allows the PIT to run over partial results. This should
reduce the noise we see around session_cleanup errors in our logs.
### Release notes
Fixes error with opening point in time query for session deletion by now
accounting for partial results.
### Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
- [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] The PR description includes the appropriate Release Notes section,
and the correct `release_node:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Closes: #200542
## Description
Visible total number of options should the same as announced for the
user as not to confuse them. Especially for the users using assistive
technologies.
## What was changed:
1. `EuiSelect`.`hasNoInitialSelection` attribute should be set to true
only in case of no default value.
Closes#189739Closes#188488Closes#193482Closes#192944Closes#195672
## Summary
Same solution for all of them, I removed `createAppMockRenderer`. In
some cases, I also added missing occurrences of `screen` and updated
`getBy`s to `await screen.findBy*`s.
- Closes https://github.com/elastic/kibana/issues/199608
## Summary
This PR changes the logic around when suggestions from lens API are
used. Previously for non-transformational query and non-time-based data
it would try to render one of lens suggestions supplying chart data via
`table` prop. Now, it would not render any chart.
Before:
- Data view mode => Static histogram configuration
- ES|QL mode and non-transformational query => _**Gets lens
suggestions.**_ If histogram chart is not possible, **_takes the first
lens suggestion for rendering the chart_**
- ES|QL mode and transformational query => Gets lens suggestions. Takes
the first lens suggestion for rendering the chart.
After:
- Data view mode => Static histogram configuration (same)
- ES|QL mode and non-transformational query => ~~_**Gets lens
suggestions.**_~~ If histogram chart is not possible, **_renders
nothing_** (updated)
- ES|QL mode and transformational query => Gets lens suggestions. Takes
the first lens suggestion for rendering the chart. (same)
### Testing
As per originally reported case:
1. `node scripts/es_archiver
--kibana-url=http://elastic:changeme@localhost:5601
--es-url=http://elastic:changeme@localhost:9200 load
test/functional/fixtures/es_archiver/many_fields`
2. Navigate to Discover, switch to ES|QL mode and enter `FROM
indices-stats | LIMIT 10`
3. No chart is expected.
Also there should be no regression for
https://github.com/elastic/kibana/pull/195863
### 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: Davis McPhee <davis.mcphee@elastic.co>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>