Commit graph

23831 commits

Author SHA1 Message Date
Nathan Reese
01aae2331d
[Control group] Open "add control editor" with last used width and grow settings (#190749)
### test instructions
1. run kibana with `yarn start --run-examples`
2. navigate to the "Controls" developer example
3. Click "Add new data-control" button. Notice how the menu sets "width"
to medium and selects "grow".
4. Add new control, setting "width" to small and unselected "grow".
Click "Save and close".
5. Click "Add new data-control" button. Notice how the menu sets "width"
and "grow" to last used values.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
2024-08-21 18:43:38 -06:00
Alex Szabo
a25433c394
[CI] Parallelize quick checks (#190401)
## Summary
Use typescript's async processes to start quick checks in parallel 👍 
Check out these for runs:
- happy case:
https://buildkite.com/elastic/kibana-pull-request/builds/227443#01914ca3-1f0d-4178-b539-263fbc588e98
- some broken checks:
https://buildkite.com/elastic/kibana-pull-request/builds/228957#01917607-f7bd-4e08-8c70-7fdc3f9c12d1
 
Benefits:
- with this (+more CPU) we can speed up the quick-check step's runtime,
from ~15m to ~7m.
- the added benefit is that all checks run so that we won't bail on the
1st one

Disadvantage:
- uglier error output, since we collect the logs asynchronously, and
print it only upon failure
- ~no output printed for happy checks (can be changed)~

Extra:
- additionally, `yarn quick-checks` will now allow devs to run these
checks locally (adjustments made so that the checks won't fail in local
dev)
- added the option to declare a 'context' for tooling loggers, so we can
identify which script logs

Solves 2/3 of https://github.com/elastic/kibana-operations/issues/124
(+speedup)
2024-08-21 23:10:41 +02:00
Anton Dosov
64e1116b4b
Dashboard insights flyout with dashboard views (#187993)
## Summary

close https://github.com/elastic/kibana/issues/183687

## Feature

- Implement dashboard view stats UI on top of usage counter that counts
dashboard views for last 90 day and shows weekly histogram.
- (Even if there is not a lot of data, we still show it as a weekly
histogram, so it can be pretty empty intially)

![Screenshot 2024-08-15 at 13 00
11](https://github.com/user-attachments/assets/adeabf78-e3d3-4cfa-adc3-76a32ede595b)


## Implementation

### Server side
Dashboard plugin registers new routes to increase the view count and get
stats. Routes are protected for users with dashboard access only. The
implementation is located in
`@kbn/content-management-content-insights-server` and internally uses
usage counters. The retention is 90 days, so we can only show stats for
last 90 days.

 ### Client side

- Dashboard uses the client from
`@kbn/content-management-content-insights-public` to increase the view
count every time a user opens a dashboard.
- TableListView opens the flyout from
`@kbn/content-management-content-insights-public`to display the stats

## How to test

- For new views just open a dashboard and check that view stat is
increased
- For old views you can populate the usage counters with historic data.
I used the following script:
https://gist.github.com/Dosant/425042fcf75d5e40e5a46374f6234a54
2024-08-21 13:08:49 -05:00
Rachel Shen
5bd3f902f8
[Dashboard] Interactive Managed Dashboard Popover vs badge (#189404)
## Summary

Closes #https://github.com/elastic/kibana/issues/179152

This PR makes the managed badge into an interactive popover that allows
users to duplicate the managed dashboard. The user is automatically
redirected to the new dashboard where they can edit it and make changes.



### 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))
2024-08-21 10:41:36 -05:00
Marco Liberati
9c35c15d7d
[Lens] Fix no data collapse by scenario with Metric chart (#190966)
## Summary

Fixes #182628 

This PR provides a fix for the editor crash on no data when using
collapsing by.
In addition the rendering of no data in such scenario now matches the no
data rendering with a single tile.

<img width="533" alt="Screenshot 2024-08-21 at 12 57 43"
src="https://github.com/user-attachments/assets/71c40e3b-5e1a-48f1-a03f-5a4a5774e9d7">
<img width="1008" alt="Screenshot 2024-08-21 at 12 57 28"
src="https://github.com/user-attachments/assets/e35b9612-743b-412e-9565-0afcb5fd8735">
<img width="1229" alt="Screenshot 2024-08-21 at 12 56 31"
src="https://github.com/user-attachments/assets/f64f38f8-8995-4214-9954-386aac62f0c7">


### 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-08-21 16:36:27 +02:00
Kurt
bcc46b60e9
Changing load/dump in source files (#190641)
## Summary

Updates usage of `js-yaml` `load` and `dump` to `safeLoad` and
`safeDump`, in preparation for a major version update of dependency,
where the default behavior will be that of the safe function variants.


## Note to reviewers
`safeDump` will throw if it encounters invalid types (e.g. `undefined`),
whereas the `dump` function will still write the file including the
invalid types. This may have an affect within your use cases - if
throwing is not acceptable or is unhandled. To avoid this the
`skipInvalid` option can be used (see
https://github.com/nodeca/js-yaml#dump-object---options-) - this will
write the file, stripping out any invalid types from the input.

Please consider this when reviewing the changes to your code. If the
`skipInvalid` option is needed, please add it, or let us know to make
the change.

---------

Co-authored-by: Sid <siddharthmantri1@gmail.com>
Co-authored-by: “jeramysoucy” <jeramy.soucy@elastic.co>
Co-authored-by: Elena Shostak <elena.shostak@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
2024-08-21 07:29:36 -04:00
Davis McPhee
349fdac456
[Discover] [Unified Data Table] Improve absolute column width handling (#190288)
## Summary

This PR improves the handling of columns with absolute widths in
Discover, including the following enhancements:
- If there are no auto width columns in the profile default app state,
set the last column to auto width so the default columns always fill the
grid.
- If there are no auto width columns remaining when removing a column
from the grid, set the last column to auto width so the remaining
columns fill the grid.
- Add a "Reset width" button to the column header popovers to allow
resetting absolute width columns back to auto width.


https://github.com/user-attachments/assets/0c588969-5720-40e3-91e2-07a83a93b797

Resolves #189817.
Related #188550.

### 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>
Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
2024-08-20 17:27:13 -03:00
Larry Gregory
5cb655a090
Add platform security team to hardening_manifest (#190827)
## Summary

Adds platform security team to `hardening_manifest`
2024-08-20 13:34:49 -05:00
Yulia Čech
f3a6527437
[Console] Fix the end range of selected requests (#189747)
## Summary

Fixes https://github.com/elastic/kibana/issues/189366
Fixes https://github.com/elastic/kibana/issues/186773

This PR refactors how the request body is being extracted from the
editor to use for "sendRequest" and "copyAsCurl" functions. Previously
the editor actions provider would rely on the parser to get a JSON
object or several for request body. The downside of this implementation
was when the parser would not be able to fully process the json object.
That could lead to potential text loss and the editor would process the
requests in a way that was not always obvious to the user. For example,
the editor would highlight the request with the json object, but when
sending it to ES the request body would be completely ignored.
Instead this PR suggests to use the "raw" text from the editor for
actions and give the user more transparency and control over the
requests. We also don't need to keep the information about requests in
the parser, which might affect browser performance for longer texts.

### 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-08-20 14:16:00 +02:00
James Gowdy
9ff78cf08b
[ML] Adds Pattern analysis embeddable for dashboards (#186539)
Adds a new embeddable version of the pattern analysis component.


![image](https://github.com/user-attachments/assets/984921b5-cd33-4f7f-9207-c3182c97d015)

The options to configure it are the same as the menu available in the
Patterns tab in Discover.


![image](https://github.com/user-attachments/assets/33e3b537-c4e2-475b-89ad-8fdfef347fdc)

**Actions**
The user can choose to filter a pattern in or out in in the current
dashboard, or jump to Discover.

![image](https://github.com/user-attachments/assets/dfd9dc3d-932c-463b-8ea5-e93fa6caf518)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-20 12:09:20 +01:00
elastic-renovate-prod[bot]
3ff9f920cc
Update docker.elastic.co/wolfi/chainguard-base:latest Docker digest to c16d3ad (main) (#190745)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.elastic.co/wolfi/chainguard-base | digest | `e11c691` ->
`c16d3ad` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOk9wZXJhdGlvbnMiLCJyZWxlYXNlX25vdGU6c2tpcCJdfQ==-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2024-08-19 18:02:49 -05:00
Lukas Olson
22dc10c7d0
[UnifiedDataTable] Add density configuration (#188495)
## Summary

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

Adds a density configuration for the `UnifiedDataTable`. By default,
this configuration will not be shown unless an
`onUpdateDataGridDensity`handler is passed to the `UnifiedDataTable`. It
defaults to `compact`. It persists to `localStorage` when updated.


https://github.com/user-attachments/assets/8523301c-7cf5-4854-bbbc-b6767d996c32

### 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>
Co-authored-by: Bhavya RM <bhavya@elastic.co>
2024-08-19 15:54:13 -07:00
Stratoula Kalafateli
a0474aec39
[ES|QL] Adds a help menu popover (#190579)
## Summary

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

Adds a help menu button for the ES|QL mode

<img width="1548" alt="image"
src="https://github.com/user-attachments/assets/f8dde898-a1bf-4441-ae21-053e8290a5a6">


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

---------

Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
Co-authored-by: Drew Tate <andrew.tate@elastic.co>
2024-08-19 16:33:57 -05:00
elastic-renovate-prod[bot]
846ebb290f
Update docker.elastic.co/wolfi/chainguard-base:latest Docker digest to e11c691 (main) (#190665)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.elastic.co/wolfi/chainguard-base | digest | `dcbcd19` ->
`e11c691` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: Jon <jon@elastic.co>
2024-08-19 13:01:34 -05:00
Ryan Keairns
4eeb35d21b
Slim down popover panels (#190472)
## Summary

These couple of popover panels contain more padding than desired or
intended by the design system.

**Before**
_Discover alerts popover_
<img
src="https://github.com/user-attachments/assets/495d7641-eab4-4b95-845b-90d2a121ad43"
width="470" />

_Nav deployments popover_
<img
src="https://github.com/user-attachments/assets/3bc05146-d03b-4b72-be39-edf4dd2ffa24"
width="340" />

**After**
_Discover alerts popover_
<img
src="https://github.com/user-attachments/assets/5fd1b025-d74e-4318-b6de-ce5c7988ee14"
width="420" />

_Nav deployments popover_
<img
src="https://github.com/user-attachments/assets/a3ce65c5-bc12-41bb-97de-4d7d6997591f"
width="390" />

### 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-08-19 10:28:29 -05:00
Julia Rechkunova
cf58ef9e51
[OneDiscover][UnifiedDocViewer] Add dedicated column for Pinning/Unpinning rows (#190344)
- Closes https://github.com/elastic/kibana/issues/188413

## Summary

This PR adds a dedicated column for pinning/unpinning fields inside
DocViewer.

![Aug-13-2024
15-06-25](https://github.com/user-attachments/assets/93496cdd-e730-4ee6-8597-c78d7bffe07f)



### 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] 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)
2024-08-19 09:06:54 -05:00
Alejandro Fernández Haro
965b0a675d
Wait between instances, but not after the last one (#190679) 2024-08-19 14:46:15 +02:00
Marta Bondyra
f8e873f87d
[TSVB] Visualization blows up when invalid color is passed (#190658)
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6784

## Summary

Fixes https://github.com/elastic/kibana/issues/190657
Fixes https://github.com/elastic/kibana/issues/182136

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-19 14:27:06 +02:00
elastic-renovate-prod[bot]
06183248c2
Update dependency @elastic/charts to v66.1.1 (main) (#190313) 2024-08-15 23:49:14 -05:00
Nathan Reese
14200cb42e
control group state builder (#190575)
legacy control group embeddable exposes `controlGroupInputBuilder` to
provide utility methods for building controlGroupInput. This PR adds
`controlGroupStateBuilder` that provides similar functionality, to allow
users to build react control group embeddable state. The API is not the
same and this is on purpose. Now that control state no longer has
`explicitInput` and splitting of state between multiple levels, the API
can just take `ControlState` shape directly.
2024-08-15 15:23:08 -06:00
Marta Bondyra
f27a477719
[Visualize] unskip visualize flaky tests (#190249)
## Summary

Fixes https://github.com/elastic/kibana/issues/181884
Fixes https://github.com/elastic/kibana/issues/181883
Fixes https://github.com/elastic/kibana/issues/181895
Fixes https://github.com/elastic/kibana/issues/181881
2024-08-15 21:19:49 +02:00
Nathan Reese
3ad861e4b1
[control group] implement lastUsedDataViewId$ (#190269)
PR added `lastUsedDataViewId$` to `ControlGroupApi`.
`lastUsedDataViewId$` is implemented in `initializeControlsManager`.

PR also cleaned up typings by removing `DataControlEditorState`.
`DataControlEditorState` was a weird smooshing together of
DefaultDataControlState and stuff used by the editor. Instead of
`DataControlEditorState`, values used by the editor are just passed in
as top level keys.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-15 09:59:10 -06:00
Kevin Lacabane
ae6c1f6213
[eem] update builtin definitions (#188351)
## Summary

Update built in definitions on plugin start. The update overwrites index
templates and ingest pipelines with the latest versions but has to
delete the transforms since we can only update a subset of settings in
the [update
api](https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html)
which does not include the aggregations.

## Testing
### api tests
Since the upgrade logic happens in plugin startup method we cannot
directly trigger it from api tests without some tweaks. I've added a
[fixture
plugin](a87ae8b210/x-pack/test/api_integration/apis/entity_manager/fixture_plugin/server/plugin.ts)
that is launched in the entity manager test server, this plugin creates
a test route exposing the upgrade api which can then be called in api
tests.

### manual
- install builtin definitions `PUT
kbn:/internal/api/entities/managed/enablement`
- bump builtin [service
definition](https://github.com/elastic/kibana/blob/main/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/built_in/services.ts#L23)
version
- restart kibana server
- logs should output `[INFO ][plugins.entityManager] Updating built-in
entity definition [builtin_services] from v0.1.0 to v<new version>`
- `GET kbn:/internal/api/entities/definition` should output the new
definition
- verify latest version of definition components are installed

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-15 17:00:31 +02:00
Ignacio Rivas
f904104f23
[Console] Allow users to copy requests as specific languages (#189976) 2024-08-15 09:44:47 -05:00
Ahmad Bamieh
9f0108b934
[i18n tooling] throw when a variable is passed to template literal in default message (#190582)
With the new i18n tooling, we now allow template literals to be used for
the `defaultMessage` however they cannot contain variable substitutions.

This PR adds a check in the parser that throws an error when there is a
variable inside the template literal asking the developer to use
`values` instead.

Previously the parser simply skipped extracting the message which causes
confusion for developers as they expect the CI to fail on errors instead
of just silently allowing it bypassing translations.

Thankfully we dont have any cases in the codebase that are doing direct
substituion yet so this bug fix came at the right time :) thanks
@maryam-saeidi for catching it!
2024-08-15 15:02:11 +03:00
Alexey Antonov
2f558b2497
fix: [A11y] [VPAT] 3.2.2 On Input - Keyboard focus advances when acting on 'expand' button (#190403)
Closes: https://github.com/elastic/search-team/issues/7628

### Steps to Reproduce:

1. Create a Search project and go to the Search project homepage (ex:
https://my-elasticsearch-project-eca3d1.kb.eu-west-1.aws.qa.elastic.cloud/app/elasticsearch).
2. Using keyboard navigation, advance keyboard focus to 'Console' button
at the bottom of the page.
3. Hit Enter to expand 'Console' section.

### Issue:
When expanded, keyboard focus moves into the editable field instead of
remaining on the expand/collapse function.


### What was changed?: 
1. The `monaco_editor_actions_provider.ts` component was taking focus
during initialization. While the reason for this behavior isn't entirely
clear, we should try to prevent this from happening.

## Screen: 


https://github.com/user-attachments/assets/c0f55fbf-1922-4f7f-a10e-31890c302027
2024-08-15 05:58:56 +03:00
Jon
1ed50e6cb4
[build] Update node cleanup paths (#190512)
Prior to introducing node variants, we were cleaning up unused files
included with Node.js. The node paths changed, and the cleanup paths
were not. This fixes the issue.

## Testing

`$KIBANA_HOME/node/*` should be cleaned of unused files, see the
patterns in the diff for exact files.
2024-08-14 17:10:53 -05:00
Nicolas Chaulet
708fcd20df
[Fleet] Use multiple saved object type for agent and package policies with opt-in migration (#189387) 2024-08-14 17:22:01 -04:00
Nathan Reese
19e9bfb26e
[control group] do not render control group when there are no controls (#190521)
PR updates ControlGroup to not render any components when there are no
controls. PR also removes loading state from ControlGroup, as suggested
by @ThomThomson

#### Before
<img width="600" alt="Screenshot 2024-08-14 at 9 18 57 AM"
src="https://github.com/user-attachments/assets/e52aabf5-7322-4d8e-838c-d56524ece55e">


### Test instructions
1. start kibana with `yarn start --run-examples`
2. Open controls example at http://localhost:5601/app/controlsExamples
3. Remove all controls. Notice how the ControlGroup no longer takes up
any empty vertical spacing
<img width="600" alt="Screenshot 2024-08-14 at 9 15 53 AM"
src="https://github.com/user-attachments/assets/374ddec4-30c5-46fb-8ed9-c8c41a35fc1e">
2024-08-14 12:15:59 -06:00
Cee Chen
761f5e7133
Upgrade EUI to v95.7.0 (#190346)
`v95.6.0`  `v95.7.0`

_[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_

---

## [`v95.7.0`](https://github.com/elastic/eui/releases/v95.7.0)

**CSS-in-JS conversions**

- Converted `EuiSelectable` to Emotion
([#7940](https://github.com/elastic/eui/pull/7940))
  - Removed `$euiSelectableListItemBorder`
  - Removed `$euiSelectableListItemPadding`
- Converted `EuiSelectableTemplateSitewide` to Emotion
([#7944](https://github.com/elastic/eui/pull/7944))
  - Removed `$euiSelectableTemplateFocusBackgroundLight`
  - Removed `$euiSelectableTemplateFocusBackgroundDark`
  - Removed `$euiSelectableTemplateSitewideTypes`
- Converted `EuiComboBox` to Emotion
([#7950](https://github.com/elastic/eui/pull/7950))
2024-08-14 12:35:08 -05:00
Jean-Louis Leysens
211170c3f0
Run serverless jest integration with security enabled (#190414) 2024-08-14 16:50:30 +02:00
Stratoula Kalafateli
c026279547
[ES|QL] Cleanup the filters when transitioning from dataviews to ES|QL (#190477)
## Summary

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

Clean ups the filters when moving from DataViews to ES|QL mode.

### 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-08-14 13:21:39 +02:00
Sébastien Loix
8dee365bda
[Stateful sidenav] Don't fetch active space on unauthenticated routes (#190408) 2024-08-13 17:00:08 +01:00
Jen Huang
826641505c
[UII] Support integration-level outputs (#189125)
## Summary

Resolves #143905. This PR adds support for integration-level outputs.
This means that different integrations within the same agent policy can
now be configured to send data to different locations. This feature is
gated behind `enterprise` level subscription.

For each input, the agent policy will configure sending data to the
following outputs in decreasing order of priority:
1. Output set specifically on the integration policy
2. Output set specifically on the integration's parent agent policy
(including the case where an integration policy belongs to multiple
agent policies)
3. Global default data output set via Fleet Settings

Integration-level outputs will respect the same rules as agent
policy-level outputs:
- Certain integrations are disallowed from using certain output types,
attempting to add them to each other via creation, updating, or
"defaulting", will fail
- `fleet-server`, `synthetics`, and `apm` can only use same-cluster
Elasticsearch output
- When an output is deleted, any integrations that were specifically
using it will "clear" their output configuration and revert back to
either `#2` or `#3` in the above list
- When an output is edited, all agent policies across all spaces that
use it will be bumped to a new revision, this includes:
- Agent policies that have that output specifically set in their
settings (existing behavior)
- Agent policies that contain integrations which specifically has that
output set (new behavior)
- When a proxy is edited, the same new revision bump above will apply
for any outputs using that proxy

The final agent policy YAML that is generated will have:
- `outputs` block that includes:
- Data and monitoring outputs set at the agent policy level (existing
behavior)
- Any additional outputs set at the integration level, if they differ
from the above
- `outputs_permissions` block that includes permissions for each
Elasticsearch output depending on which integrations and/or agent
monitoring are assigned to it

Integration policies table now includes `Output` column. If the output
is defaulting to agent policy-level output, or global setting output, a
tooltip is shown:

<img width="1392" alt="image"
src="https://github.com/user-attachments/assets/5534716b-49b5-402a-aa4a-4ba6533e0ca8">

Configuring an integration-level output is done under Advanced options
in the policy editor. Setting to the blank value will "clear" the output
configuration. The list of available outputs is filtered by what outputs
are available for that integration (see above):

<img width="799" alt="image"
src="https://github.com/user-attachments/assets/617af6f4-e8f8-40b1-b476-848f8ac96e76">

An example of failure: ES output cannot be changed to Kafka while there
is an integration
<img width="1289" alt="image"
src="https://github.com/user-attachments/assets/11847eb5-fd5d-4271-8464-983d7ab39218">


## TODO
- [x] Adjust side effects of editing/deleting output when policies use
it across different spaces
- [x] Add API integration tests
- [x] Update OpenAPI spec
- [x] Create doc issue

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-13 08:49:57 -07:00
Nathan Reese
571fe047c1
react control group: implement reload (#190366)
PR adds reload implementation for react control group.
2024-08-13 09:38:24 -06:00
Larry Gregory
74d88580a5
Migrate codebase to use Object.hasOwn instead of Object.hasOwnProperty (#186829)
## Summary

This PR has breadth, but not depth. This adds 3 new `eslint` rules. The
first two protect against the use of code generated from strings (`eval`
and friends), which will not work client-side due to our CSP, and is not
something we wish to support server-side. The last rule aims to prevent
a subtle class of bugs, and to defend against a subset of prototype
pollution exploits:

- `no-new-func` to be compliant with our CSP, and to prevent code
execution from strings server-side:
https://eslint.org/docs/latest/rules/no-new-func
- `no-implied-eval` to be compliant with our CSP, and to prevent code
execution from strings server-side:
https://eslint.org/docs/latest/rules/no-implied-eval. Note that this
function implies that it prevents no-new-func, but I don't see [test
cases](https://github.com/eslint/eslint/blob/main/tests/lib/rules/no-implied-eval.js)
covering this behavior, so I think we should play it safe and enable
both rules.
- `no-prototype-builtins` to prevent accessing shadowed properties:
https://eslint.org/docs/latest/rules/no-prototype-builtins


In order to be compliant with `no-prototype-builtins`, I've migrated all
usages and variants of `Object.hasOwnProperty` to use the newer
[`Object.hasOwn`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn).
2024-08-13 10:30:19 -05:00
Anton Dosov
b8fc60b30e
Allow to "star" (favorite) a dashboard from the listing table (#189285)
## Summary

close https://github.com/elastic/kibana-team/issues/949

- Allows to "star" (favorite) a dashboard from the listing table 

![Screenshot 2024-07-26 at 15 17
41](https://github.com/user-attachments/assets/18f8e3d6-3c83-4d62-8a70-811b05ecd99b)
![Screenshot 2024-07-26 at 15 17
45](https://github.com/user-attachments/assets/45462395-1db1-4858-a2d8-3f681bb2072b)

- Favorites are isolated per user (user profile id) and per space




### Implementation Details

Please refer to and comment on the README.md 🙏
https://github.com/elastic/kibana/pull/189285/files#diff-307fab4354532049891c828da893b4efcf0df9391b1f3018d8d016a2288c5d4c


### TODO


- Telemetry: I will add telemetry in a separate PR
2024-08-13 08:10:18 -05:00
Jon
aae7a3b058
[build] Update chainguard-base (#190351)
Manual update, still working out some issues with renovate
2024-08-12 17:14:13 -05:00
Davis McPhee
012be928f8
[Discover] Ensure fields prefixed with 'log.' are ignored in log document profile resolution if their values are null (#190184)
## Summary

This PR fixes an issue where non-log ES|QL results were being recognized
as logs and showing the log overview doc viewer tab for mixed index
patterns like `FROM logs-synth-default,metrics-*`. This is because they
technically have `log.` prefixed fields in the returned ES|QL results,
but the values are always null.

### 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)
2024-08-12 17:36:53 -03:00
Ryan Keairns
f627c5628d
App menu bar tweaks (#189998)
## Summary

Now that we've added the 'Try ES|QL' button to the app menu and viewed
it _in the wild_ , this PR makes a few small tweaks that aim to make the
the top section of the page less busy, visually. While here, the padding
in the editor has also been tightened up a bit to trim some vertical
whitespace.

- Center aligns, vertically, the unsaved changes badge
- Changes badge color to be less vibrant
- Removes bottom padding on editor menu bar
- Removes `editorRedo` icon from button to 'Try ES|QL' / 'Switch to
classic'

**Before**
<img
src="https://github.com/user-attachments/assets/273d18b9-c67b-4603-8d28-621451b66d16"
width="420" />

**After**
_Discover unsaved_
<img
src="https://github.com/user-attachments/assets/493b79b3-4296-41b4-a849-4fb52f651980"
width="420" />

_Dashboard unsaved_
<img
src="https://github.com/user-attachments/assets/b060c64e-d9d4-44b6-889a-d585f967e859"
width="420" />

_ES|QL editor no bottom padding_
<img
src="https://github.com/user-attachments/assets/9d03ae69-7733-4ac7-a2c4-d06519fcb5b6"
width="420" />

**Contrast check**
_Light_
<img
src="https://github.com/user-attachments/assets/5fc48b3b-69e1-41ce-aed9-e8ba7341670e"
width="420" />

_Dark_
<img
src="https://github.com/user-attachments/assets/d80d24f8-efea-40cf-bff5-f63b11c1c684"
width="420" />


### 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: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2024-08-12 08:39:43 -07:00
Julia Rechkunova
7e140286f6
[Discover][UnifiedDataTable] Copy selected rows as text (#189512)
- Closes https://github.com/elastic/kibana/issues/179731
- Related to https://github.com/elastic/kibana/issues/177952 
- Related to https://github.com/elastic/eui/issues/6804

## Summary

This PR adds "Copy selection as text" action.

<img width="926" alt="Screenshot 2024-07-31 at 18 09 21"
src="https://github.com/user-attachments/assets/a4fc7456-7cd9-4493-a4dd-45151f845566">


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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Davis McPhee <davismcphee@hotmail.com>
2024-08-12 15:21:26 +02:00
Stratoula Kalafateli
eaf4bb0422
Rename variables 2 (#190264)
## Summary

Renames the variables from ?`start` to `?t_start` and `?end` to `?t_end`

Naming is hard so bare with us 😅 (I think this will be the last change)
2024-08-12 07:42:07 +02:00
Julia Rechkunova
625e89e144
[Discover][DocViewer] Limit the height of long field values by default (#183736)
- Closes https://github.com/elastic/kibana/issues/181568

## Summary

This PR adds a default height limit for values in DocViewer. If the
value is too long, we visually truncate it and add "View more" button
which allows to expand to view the entire value. This way all fields in
the flyout are easily accessible (less scrolling required) even if they
contain long values. ~The height can be configured via the existing
`truncate:maxHeight` Advanced Setting.~ If user expands a value, closes
the flyout and opens it again, the value will be shown as expanded again
for that field.

![Aug-02-2024
10-24-58](https://github.com/user-attachments/assets/d3a898ce-dc92-4f5e-bc63-f1761a100e0d)


Related: https://github.com/elastic/kibana/pull/164236

## Testing

Some cases to check while testing:
- varios value formats
- legacy table vs data grid
- doc viewer flyout vs Single Document page

Sample long value:
<details>

<pre>
POST test_this/_doc/
{
  "message": """javax.servlet.ServletException: Something bad happened
at
com.example.myproject.OpenSessionInViewFilter.doFilter(OpenSessionInViewFilter.java:60)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at
com.example.myproject.ExceptionHandlerFilter.doFilter(ExceptionHandlerFilter.java:28)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at
com.example.myproject.OutputBufferFilter.doFilter(OutputBufferFilter.java:33)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: com.example.myproject.MyProjectServletException
    at com.example.myproject.MyServlet.doPost(MyServlet.java:169)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at
com.example.myproject.OpenSessionInViewFilter.doFilter(OpenSessionInViewFilter.java:30)
    ... 27 more
Caused by: org.hibernate.exception.ConstraintViolationException: could
not insert: [com.example.myproject.MyEntity]
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at
org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:64)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2329)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2822)
at
org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:71)
    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:268)
at
org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:321)
at
org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)
at
org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:130)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
at
org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
at
org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
    at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:705)
    at org.hibernate.impl.SessionImpl.save(SessionImpl.java:693)
    at org.hibernate.impl.SessionImpl.save(SessionImpl.java:689)
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
at
org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:344)
    at $Proxy19.save(Unknown Source)
at com.example.myproject.MyEntityService.save(MyEntityService.java:59)
<-- relevant call (see notes below)
    at com.example.myproject.MyServlet.doPost(MyServlet.java:164)
    ... 32 more
Caused by: java.sql.SQLException: Violation of unique constraint
MY_ENTITY_UK_1: duplicate value(s) for column(s) MY_COLUMN in statement
[...]
    at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown Source)
at
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
at
org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:57)
    ... 54 more"""
}
</pre>
</details>

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

---------

Co-authored-by: Davis McPhee <davismcphee@hotmail.com>
2024-08-10 04:06:10 -05:00
Nathan Reese
1616c3c22f
Move react controls into controls plugin (#190166)
Move react_controls from examples plugin to controls plugin. This PR
does not effect user facing features since it does not effect the legacy
control group implementation or its usage. Future PRs will integrate the
new control group with dashboard and ControlGroupRenderer and then
remove the legacy control group implementation.

PR increases page load bundle size because of new action registration
and the control group react embeddable registration. This will be a
temporary increase as removing the legacy control group will remove the
legacy embeddable factory registration, which is larger then react
embeddable registration.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-09 12:29:40 -06:00
Isaac Karrer
60c5eca33e
Feat/renovate custom chainguard matcher pt2 (#190260)
## Summary

Drops a comment for the current chaingaurd reference incase it is
implemented in a tech that requires endings other than `.ts`, and then
creates a PR grouping for the chainguard images.
2024-08-09 13:22:35 -05:00
Julia Rechkunova
a8aa215db5
[OneDiscover][UnifiedDocViewer] Allow filtering by field type (#189981)
- Closes https://github.com/elastic/kibana/issues/188733

## Summary

This PR adds Field type filter to Doc Viewer (same as in
UnifiedFieldList as discussed with @MichaelMarcialis).

The selected field types would be persisted in Local Storage under
`unifiedDocViewer:selectedFieldTypes` key.

<img width="685" alt="Screenshot 2024-08-07 at 16 52 46"
src="https://github.com/user-attachments/assets/7591aa69-c1b4-4485-ad9f-baac809d7fe5">



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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-09 17:08:19 +02:00
Stratoula Kalafateli
520c55051f
Revert "[ES|QL] Rename the params in ?t_start ?t_end (#190115)" (#190222)
This reverts commit 04c46db429.
2024-08-09 13:52:22 +02:00
Stratoula Kalafateli
04c46db429
[ES|QL] Rename the params in ?t_start ?t_end (#190115)
## Summary

Renames the variables from `?start` to `?t_start` and `?end` to `?t_end`

Naming is hard so bare with us 😅 (I think this will be the last change)
2024-08-09 11:43:35 +02:00
Jon
4813ccfccb
[build] Update chainguard-base digest (#190176) 2024-08-08 16:07:54 -05:00
Alejandro Fernández Haro
bfb1bf52c4
Flaky #171289 (#190160) 2024-08-08 11:51:10 -07:00