Commit graph

65814 commits

Author SHA1 Message Date
Vadim Kibana
8e94530cc0
Update EUI layout components in dev examples (#163494)
## Summary

Partially addresses https://github.com/elastic/kibana/issues/161422

New look of developer examples:

<img width="1231" alt="image"
src="15a3b31d-4f0c-4508-afa7-cb02e00f6b53">
2023-08-10 11:19:06 +02:00
Vadim Kibana
2113878837
Rm canvas deprecations (#163467)
## Summary

Substitutes deprecated components from `kibana_react` plugin in Canvas
app by latest ones from packages.

Partially addresses https://github.com/elastic/kibana/issues/161422

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-10 02:16:34 -07:00
Dima Arnautov
92d4a6df7d
[ML] Add a throughput description in the Deployment stats table (#163481)
## Summary

Resolves #161828

Adds a tooltip for the Throughput column explaining units.

<img width="854" alt="image"
src="0de0a0ea-d3d0-4da4-8d35-faa530de8405">

### 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] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
2023-08-10 02:11:58 -07:00
Antonio
dba141320b
[Cases] Fix Host Isolation user action flaky test (#163508)
Fixes #156742

## Summary

Most of this test's logic was about how this specific comment type is
rendered.

There was already some logic from the flaky test duplicated in
`x-pack/plugins/cases/public/components/user_actions/comment/comment.test.tsx`.

I moved the rest of the flaky test logic there.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-10 11:05:10 +02:00
Ievgen Sorokopud
c8b1d983fb
[Security Solution] Flaky ML rule execution tests (#163095)
## Summary

Original ticket: https://github.com/elastic/kibana/issues/145776

Un-skip ML rule execution flaky tests.

Currently these tests are failing due to these ML APIs changes (API
versioning) https://github.com/elastic/kibana/pull/156949
2023-08-10 10:50:42 +02:00
Maxim Kholod
5c57df27ed
[Cloud Security] Do not filter vulnerabilities by CVE (#163402)
## Summary

`{ match_phrase: { 'vulnerability.enumeration': 'CVE' } }` has been
removed from the vulnerabilities filter so that documents from other
sources are presented in CNVM features

fixes:
- https://github.com/elastic/security-team/issues/7287

## Screenshots
This is how CNVM features look like with GHSA data
<img width="1728" alt="Screenshot 2023-08-08 at 15 47 10"
src="d945afb1-8469-4810-ab27-40b243b34e76">
<img width="1721" alt="Screenshot 2023-08-08 at 15 46 59"
src="0f8a3ce0-ffb6-4cc5-99cc-5d6d31a75640">
2023-08-10 10:18:43 +02:00
Sébastien Loix
5e0e4487b8
[Serverless Chrome] Fix fullscreen (#163317) 2023-08-10 09:08:22 +01:00
Dzmitry Lemechko
072ad967fc
[FTR] unskip tsvb time series tests for Chrome (#163510)
## Summary

Related to #162995

This PR unskip TSVB tests for Chrome browser since it is proved to be
stable

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

https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2835
100x passed
On Firefox the flakiness is related to Terms 2nd aggregation field
sometimes is not selected. I tested it manually in Firefox 116 and was
able to set fields, though I have a feeling that values are not always
selected on click in the drop-down. But I didn't see any errors in
console.

I also returned back retry for dropdown selection I removed in #161202
though flaky-test-runner proves there is no need. Let's have just to
keep logic as before my PR.
2023-08-10 09:17:12 +02:00
Kibana Machine
d5d34c661d
[api-docs] 2023-08-10 Daily api_docs build (#163551)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/425
2023-08-10 00:52:53 -04:00
Paulo Henrique
b1b80fe582
[Cloud Security] [Fleet] Get CloudFormation template accordingly with the current integration version to support auto-upgrade (#162206) 2023-08-09 16:58:39 -07:00
Patryk Kopyciński
09aaecb59d
[security_solution] Cypress flaky tests catcher (#162376)
## Summary

Inspired by https://glebbahmutov.com/blog/burning-tests/

Implements the idea presented here
https://glebbahmutov.com/blog/burning-tests/#bonus-3-burning-new-or-changed-specs

In short, on PR that is changing/adding new Cypress spec files we will
try to "burn" them, it means we will try to run each `it` `2` times to
make sure tests are written in a way that gives Cypress a chance to
recover from the failed test.
Also adding a command that allows to "burn" tests locally
```
yarn cypress:burn --spec "<>"
```

Right now the job is set to `soft_fail`, so it is not going to block the
PR from merging, but hopefully will help the Team to recognize potential
flakiness before it is merged to `main`
2023-08-09 14:58:04 -07:00
Kevin Delemme
5d813006a3
feat(slo): add group by field selector in forms (#163202) 2023-08-09 15:38:02 -06:00
Nathan Reese
a038fb09ca
add x-elastic-internal-origin header to vector tile, glyphs, and fonts APIs (#163331)
Closes https://github.com/elastic/kibana/issues/163311

To test
* create map with documents layer (that uses vector tile scaling,
default).
* verify header is provided in request

<img width="500" alt="Screen Shot 2023-08-07 at 10 25 11 AM"
src="0a057039-b8b5-4fba-8db2-aec91a2d519f">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-09 15:26:18 -06:00
Steph Milovic
0cfea61424
Add getExistingIndices method to data views client api (#163448) 2023-08-09 15:05:28 -06:00
Jeramy Soucy
53965c97a1
Bump elastic-apm-node 3.49.0 -> 3.49.1 (#163522)
## Summary

Upgrades `elastic-apm-node` from 3.49.0 to 3.49.1
2023-08-09 16:39:34 -04:00
Rodney Norris
13a74337bd
[Enterprise Search] chore: break-up public tests (#163358)
## Summary

Our public folder tests are taking 35-40+m to run in CI. To try and
mitigate this we are splitting the jest tests configs to each of the
application folders to allow workers to run them separately.

I also added a `jest.config.dev.js` file to the `enterprise_search`
plugin root which allows you to run `./jest.sh` to run all of the
projects with a single command locally.

On my laptop I am seeing this take a similar amount of time to run all
the projects, but it can vary.

before (3 projects)
```
Test Suites: 880 passed, 880 total
Tests:       5513 passed, 5513 total
Snapshots:   29 passed, 29 total
Time:        286.798 s
Ran all test suites in 3 projects.
  Done in 289.12s.
```

after (14 projects)
```
Test Suites: 884 passed, 884 total
Tests:       5513 passed, 5513 total
Snapshots:   29 passed, 29 total
Time:        301.281 s
Ran all test suites in 14 projects.
  Done in 303.59s.
```

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-09 15:05:00 -05:00
Tiago Costa
924b8e9074
chore(NA): upgrade chromedriver to v115 (#163520)
This PR upgrades chromedriver into the latest version available.
2023-08-09 20:28:41 +01:00
Gloria Hornero
5b51022303
[Security Solution] Removing discontinued Cypress tests and code (#163496) 2023-08-09 20:18:57 +02:00
Patryk Kopyciński
4637b744d8
Add SentinelOne connector (#159157)
## Summary

Adds new connector type to support https://www.sentinelone.com/

The scope of this PR was limited to the Connector logic, schemas, and
types to make PR more digestible.
In the current PR, the connector is NOT registered, so it's not going to
be available to the users.
In the follow-up PR I'm going to improve the UX of Param's form and then
enable the connector

<img width="1685" alt="Zrzut ekranu 2023-08-3 o 11 18 54"
src="965ef8ef-497f-42a8-983e-38fd0370cba8">
 visual changes include a screenshot or gif.

<img width="1685" alt="image"
src="119d2255-ed9f-4923-886d-eb139223a47d">

<img width="1690" alt="image"
src="e2c569d2-b497-4641-a6a6-454494223ffc">
2023-08-09 11:02:11 -07:00
James Gowdy
6673e9dc59
[ML] Fixing capabilites polling in manage page (#163399)
On ML's management page a new capabilities poll is created every time
the user changes tabs.
`getMlGlobalServices` gets called every time the jobs list renders,
which creates a new `MlCapabilitiesService` which creates a new timer to
poll for ml's capabilities.

This change moves the `mlServices` so it isn't called on each render.
It also bumps up the interval from 1 min to 5 mins as think 1 min is a
bit too frequent.
2023-08-09 10:32:46 -07:00
Alison Goryachev
9fb83fed86
[Watcher] Re-enable jest tests (#162592) 2023-08-09 13:17:07 -04:00
Achyut Jhunjhunwala
fb6c9f0898
[APM] FIX trace waterfall loading logic to handle empty scenarios (#163397)
## Summary

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

## List of Issues

- Trace Waterfall not clearing and persisting old data

![Trace Explorer Not
clearing](5302c5ed-0c92-44ab-81a5-115e32dc8ace)

- Infinite Loading of Trace Waterfall where no traces are present and
page is reloaded

![Infinite
Loading](c5ae1cda-099e-4968-96e5-ad85db38d83a)

- After Fixing these 2 issues, found issue with Container Height

![Container Height
Issue](7fc7ef1b-68dc-4f52-bc2f-c346cfd5f67e)

## All issues fixed

![All issues
resolved](227fe648-d6b9-4788-8961-7369f6ed621a)
2023-08-09 09:53:12 -07:00
Carlos Crespo
949c2fb9db
[Infra UI] Fix flyout-related tests (#163469)
closes [#162672](https://github.com/elastic/kibana/issues/162672)
## Summary

This PR fixes the `should render alerts count for a host inside a
flyout`. It also moves all flyout-related tests to the `#Single Host
Flyout` test.


### How to test

```bash
yarn test:ftr:server --config x-pack/test/functional/apps/infra/config.ts
```

```bash
yarn test:ftr:runner --config x-pack/test/functional/apps/infra/config.ts --include x-pack/test/functional/apps/infra/hosts_view.ts
```


https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2830
2023-08-09 18:42:50 +02:00
Marco Liberati
a371022b8f
[EsAggs] Fix other request merge behaviour when empty string key is retrieved (#163187)
## Summary

Fixes #163040 

This PR generialize the fix in #150321 to handle also the empty string
at parent level when the `Other` response is merged.
Added few unit tests to cover some more scenarios.
Added some functional tests for top and nested `empty` + `Other`
scenarios at higher level (XY + table)

The fix affects both Visualize and Lens:

<img width="1230" alt="Screenshot 2023-08-04 at 18 21 32"
src="8e0d2d38-d361-4441-ac64-dbb4351c4081">
<img width="1224" alt="Screenshot 2023-08-04 at 18 21 18"
src="c689b7c7-c19c-49be-a845-c32f7e33f6ca">
<img width="1223" alt="Screenshot 2023-08-04 at 18 21 04"
src="28db1471-578e-4b77-ba45-3e0b9ee1bfaa">
<img width="1222" alt="Screenshot 2023-08-04 at 18 20 57"
src="3a6f5512-496a-4713-b21a-efd4c68ad85b">
<img width="1217" alt="Screenshot 2023-08-04 at 18 20 48"
src="c3b93c52-ca6b-4ec8-bb5f-ad411e8b955b">
<img width="1219" alt="Screenshot 2023-08-04 at 18 20 36"
src="34b7b340-6dfa-42e9-91aa-f3b2e15972a9">
<img width="1506" alt="Screenshot 2023-08-04 at 18 20 15"
src="eb2d29ed-1817-4027-86ee-48454e2c8904">
<img width="1505" alt="Screenshot 2023-08-04 at 18 20 01"
src="4eae15e4-64e4-437b-897b-6a0a02dd7561">
<img width="1508" alt="Screenshot 2023-08-04 at 18 19 49"
src="01863142-1042-40b4-9843-ab46fefb4666">
<img width="1497" alt="Screenshot 2023-08-04 at 18 19 36"
src="d5bbdd4a-d8a4-43fc-a0e2-6626a2b0cf62">
<img width="1511" alt="Screenshot 2023-08-04 at 18 19 22"
src="10491869-34ce-402d-a530-02734e90cd87">
<img width="1222" alt="Screenshot 2023-08-04 at 18 26 35"
src="d671f9ff-e883-4af5-b03a-3c348f2b643f">



### Checklist

Delete any items that are not applicable to this PR.

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


### Risk Matrix

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

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

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

| Risk | Probability | Severity | Mitigation/Notes |

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


### For maintainers

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2023-08-09 18:36:24 +02:00
Marco Liberati
b9fd22bd11
[Lens] Top values hints for time series dimensions when counter/gauges fields are used (#162916)
## Summary

Fixes #154832 

This PR is a first attempt to provide a visual feedback to users while
configuring a visualization that use a time series metric, showing a new
category in the field picker that highlights time series dimensions by
which the gauge/counter are mapped against.

Current idea:
* Works with XY and Heatmap visualizations only
* Works only for Breakdown (XY) and Y axis (Heatmap) only
* Top values on the horizontal axis for both visualizations won't show
the new field category
* The feature is enabled only when a metric using a time series metric
field (like gauge or counter) is detected in the configuration,
otherwise the category is hidden.
* The feature is disabled for multi terms - it means that just the group
is hidden, no impact on the actual field
* Fields for this group are taken from both `Available` and `Empty`
fields but the rendering styles for the empty case is retained.

<img width="353" alt="Screenshot 2023-08-01 at 17 52 38"
src="51d5af78-60b1-4106-a27a-82f5e7deb416">

Empty field but within the Time series dimension:
<img width="366" alt="Screenshot 2023-08-08 at 16 29 17"
src="1ef75234-8622-45e3-9deb-d1842d26783a">


While the actual implementation of the ES aggs is not leveraging yet
this information, this is still useful to indicate to the user which
dimension the index/dataView mapping author thought it makes sense that
metric.
With #152537 also the aggregation request will benefit from this.

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2023-08-09 18:36:07 +02:00
Shahzad
9d6ebdda4e
[Synthetics] Fix 404 not found monitor view (#163501) 2023-08-09 18:21:37 +02:00
Sébastien Loix
764fa8aaef
[UserProfiles] Move React hook to package (#162888) 2023-08-09 09:02:02 -07:00
Konrad Szwarc
e2b10cb831
[Fleet][Kafka Output] Tweaks for Kafka UI/API (#162875)
1. Removed Kerberos option from auth type selection
2. Used EuiFieldPassword component for password input
State:
![Screenshot 2023-08-01 at 11 16
30](3ef0b3f8-c98b-42d0-9645-fdb6437859f5)
3. Added `None` authentication option. This will save `auth_type` as
`none` and won't pass `usernamer`, `password` nor `ssl` to the SO.
![Screenshot 2023-08-02 at 15 59
08](9bbe9ce7-2749-484f-833d-72d1c9e5ee46)
4. Renamed `broker_ack_reliability` to `required_acks` in UI and API.
Changed value type to `1 || 0 || -1`
5. Renamed `broker_buffer_size` to `channel_buffer_size` in UI and API.
6. Temporarily disabled `password` field encryption.
7. `partition` key stored in yaml follows proper requirements
8. `topics` key stored in yaml follows proper requirements

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-09 08:59:28 -07:00
Janki Salvi
dc949ee373
[Cases] Hide cases in stack management UI (#163037)
## Summary

fixes https://github.com/elastic/kibana/issues/160337

This PR 
- hides cases in the serverless Elasticsearch project, cases APIs throw
error
- throws 403 from API when `owner=cases` for security or observability
serverless mode
- verifies the behaviour in serverless functional as well as
api_integration tests

**How to test**

- Boot up `es` serverless solution and make sure that `cases` from the
navbar is hidden and cannot not be accessible through url as well
- Boot up `observability` or `security` serverless solutions and make
sure that `cases` is available in the navbar and works fine
- Boot up classic kibana and make sure that the left navbar has the same
menu entries it always had.

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



20c1974e-44f0-45b0-80aa-e644fec148ff

### For maintainers

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-09 17:52:36 +02:00
Tiago Costa
f4856f7478
fix(NA): apply ipv4 first dns result order for worker threads (#163484)
This PR is a follow up of https://github.com/elastic/kibana/pull/163025
as we discover the initial fix doesn't apply correctly to working
threads during development.
2023-08-09 16:49:57 +01:00
Antonio
49849cf42c
[Cases] Fix flaky test in user actions pagination (#163474)
Fixes #156750
Fixes #156747
Fixes #156744
Fixes #156743
Fixes #156748
Fixes #156746
Fixes #156745
Fixes #156749

## Summary

Basically what you suggested offline @js-jankisalvi.

| Scenario | Old Test | Functional test where it is covered |
| -------------   |  -------------   | ------------- |
| Only shows one list of user actions when `total_user_actions < 10` |
`'renders only one action list when user actions are less than or equal
to 10'` | `'initially renders user actions list correctly'`|
| `Show More` button does not show up when `total_user_actions <=
page_size` | `'shows more button visible 21st user action added'` |
`'initially renders user actions list correctly'` |
| Shows 2 user action lists when `total_user_actions > page_size` |
`'renders two user actions list when user actions are more than 10'` |
`'shows more actions on button click'` |
| loading spinner | `'Loading spinner when user actions loading'` |
`'shows more actions on button click'` |

## Flaky Test Runner

Let's make sure that the functional tests don't become flaky too.

https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2826
2023-08-09 17:22:05 +02:00
Paulo Henrique
c0fe4ac2eb
[Cloud Security] [Findings] [Misconfigurations] [Alerts] - Create detection rule (#162750)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-09 08:19:02 -07:00
Carlos Crespo
c04f5661d3
[Infra UI] Centralize chart components (#163283)
closes [#161957](https://github.com/elastic/kibana/issues/161957)

## Summary

This PR encapsulates the styling and logic to render the Lens charts
components. Doing so simplifies the usage in places that render these
charts, eliminating the previously necessary code duplication


### How to test
- Start a local Kibana instance
- Navigate to `Infrastructure` > `Hosts`
- Confirm that all charts still work
  - Play with the filters
  - Verify whether only charts above the fold are rendered
  - Open the flyout
    - Switch hosts with the flyout open

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-09 17:06:37 +02:00
Marta Bondyra
143355a7f4
[Lens] Add tooltip for partition and heatmap filtering (#162716)
## Summary

The breaking tests have nothing to do with this PR. I ran the [test PR
and it broke too.](https://github.com/elastic/kibana/pull/163229/files)

### Functionality changes

#### XY Chart
Adds tooltip action for x series if it exists. The copy is different for
time and categorical series.



2a043e04-c5b1-480d-be10-ae618145fb65


<img width="246" alt="Screenshot 2023-08-04 at 17 37 39"
src="d3e4b7ae-cace-444e-8c86-c210ca1be2ee">
<img width="222" alt="Screenshot 2023-08-04 at 17 37 57"
src="dd44cc10-d4bd-4b5d-a6bb-856e48a77f34">

When filtering by one time interval we create a time picker filter and
not regular filter now.

#### Partition Chart
Adds tooltip actions filters.
Doesn't add them if we only have metric dimensions.


c4d427c3-fb81-4f9d-b4be-dcb5ba872fdb

#### Heat map Chart
Adds tooltip actions filters


68795a02-8d40-47af-8366-d7c4f88c6ce3

### Code changes

#### Changes to `MultiValueClickContext`

1. I changed the interface to:
```
export interface MultiValueClickContext {
{...}
  data: {
    data: Array<{
      cells: Array<{
        column: number;
        row: number;
      }>;
      table: Pick<Datatable, 'rows' | 'columns' | 'meta'>;
      relation?: BooleanRelation;
    }>;
{...}
  };
}
```
The important changes are accepting the array of data (this way we can
pass multiple tables for different dataviews, for example for different
layers for xy chart and we don't have run separate handlers for separate
layers). Also we don't pass a single column and array of values (that
then we have to convert to multiple rows inside of the functions) but a
`cells` array. This way we can pass values that belong to different rows
and columns. I also added a `relation` param so user can control if they
prefer to use `AND` or `OR` relation for combined filter. If none is
used, the filters are separate.

Fixes https://github.com/elastic/kibana/issues/150304

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2023-08-09 08:05:58 -07:00
Ying Mao
0c51ce6f05
[Response Ops][Alerting] Adding ignore_malformed to .alerts-* index template settings (#163414)
Resolves https://github.com/elastic/kibana/issues/161465

## Summary

Adds `ignore_malformed: true` to alerts index template settings. This
ignores malformed content globally across all allowed mapping types. For
existing alerts as data indices, the new setting is not applied directly
to the existing concrete indices but will be applied whenever the alias
rolls over and a new concrete index is created.

## Verify

- Verify that after upgrading alerts indices created in an older version
to this branch, alerts continue to be written and read as expected.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Vitalii Dmyterko <vitalii.dmyterko@elastic.co>
2023-08-09 10:54:41 -04:00
Kevin Delemme
efbb04607a
fix(slo): Handle error during SLO resources installation (#163440) 2023-08-09 07:45:52 -07:00
Wafaa Nasr
f48d422a2e
[Security Solution] [Flaky test] Fix double ftr test flakiness (#162990)
## Summary

- Addresses https://github.com/elastic/kibana/issues/155122 


## Investigations


 *First attempt*

> While investigating the three failing pipelines and examining the
Artifacts, specifically target/test_failures/*.log, I discovered the
root cause to be
> Did not get an expected 200 "ok" when waiting for a list item
(waitForListItem) yet. Retrying until we get a 200 "ok". body:
{"message":"list_id: \"list_items.txt\" item of 1.0 does not
exist","status_code":404}, status: 404
> 
>
![image](ad3c4db9-e340-42c0-8a61-63e5387b9b83)
> 

*Second attempt*


> Upon incorporating additional logs to pinpoint the underlying issue,
it was realized that the test will persist in its attempts until the
preceding error is rectified, and it was determined that the
list_items.txt file contains the correct item once located.
> 
> The problem seemed to be associated with incomplete indexing of all
indices signalsOpen.hits.hits when the test verifies against the
anticipated value.
> 
> To investigate the matter, two iterations were conducted, totaling 490
attempts. During these iterations, logs, and warnings were deliberately
inserted to facilitate the tracing of the issue.
> 
>
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2770#0189bb29-c258-4586-986a-2ac5e128eb52
>
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2768#0189baeb-8f09-488e-936f-69e72d089787
> 
> In this
[Atifact](0189bb29-c258-4586-986a-2ac5e128eb52_d98d35afa0abd1ad03e28a68882291c4.log?response-content-type=text%2Fplain&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAQPCP3C7LXS7MSJGH%2F20230808%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230808T102039Z&X-Amz-Expires=600&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEOH%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJHMEUCIQDYG9De6RYDlVNcO0JGqO6Qc4dpzCQG1s%2BgaXTSimWc9QIgfkZgXlnVcScJCO56vz2VQx1buVTNEDEaVYhYmDgupEgq%2BgMIiv%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARAAGgwwMzIzNzk3MDUzMDMiDOz2Gl2kfcuTHVaWyirOA4iHfkFBI7KBoy%2F97CuLMAxGLNIR8h4FtLCsY664lMhgDGd%2FBVi82zu%2B2Y5DAGEboOmb7C1q%2FX6CyesjDKP7sknXdfT7q8B4jBRK4QcVw2AAvC9%2BqMeN37eCfRXWT%2FrQAEdaWzxkJxk4BtFcATds3LJmmAlbYOT2L7vItmGzGs%2FnkRYevX%2Fq6hwxWqmOKNNot9hZ9sMJ3TZvGsA3045459BfyfObwIlzb13Pj6V7%2FMyTb87RjQazFiK%2Bb7qOXB%2B7ItaVAcpG7diXzPAif%2F%2FEiJedTHtBVh4LsMIKQtiASbcTh4X90kYtVMUcH%2BSG0B41WjWYPok0C3tHfQnGhGBIbSnqvMGmWgwGlhHNF1G7nIDYyWs32PQ3M3WmTGQuLIwp2hPzk4wFtgH%2FDQPWevRFRT%2FhzYJf05hyBT9BMcST9eeKTqEqs52PhCHDlCgo7K5bGjT86OO16MzEKdA77HRro8GqIh6mgTMyQ5gKpH38ueUWvQZnLix4T5HYw0EyJgRLRfiVIpKcH0jRobaFwKSfSYc%2FZ2FPHsAK31weedhy6tafwU7elNYiAaMRv4AQhB%2FlrGWYd6IjOrdgSFowlkd1m5%2FrYTY3k7%2F8D0vsxgjUETDX9semBjqlAWkLq%2FLaRV5KokMNXfT3lCVNJzpYeN1%2FdnInE%2BQn3Ub86kRgMOfTN2OgDHkuYSKsQ95tFHH49NfRn6rTw8tI2Tjs3pToqp65gCYh9MzUKTd2EWsgqdNn6y%2BbHRGFJxd7cacrX9Ghr4XyNme5aAeWAVYNXSqJ1KIbtWmRcwwhThAJHxWk5%2FoBwScZRUSYGWmkhaxnZXDjXg6LBuH7uZOJjf%2FLuFVdtQ%3D%3D&X-Amz-SignedHeaders=host&X-Amz-Signature=8a44c3a5e3b88b632097dc344ecec1ba6d6cb8e80e10d9058e96883e43d925b5)
> 
>
![image](bc58d389-3586-4343-a9f9-9577331d4876)
> 
> 

## Solution 

By modifying the third parameter of the `await
waitForSignalsToBePresent(supertest, log, 1, [id]);` function to a value
of 3 instead of the initial 1, we signify the number of alerts we need
to await before conducting assertions. This change is made to
accommodate the assertion of three alerts being generated, accounting
for the exclusion of a single 1.0 value.
2023-08-09 16:40:55 +02:00
Marshall Main
db0996f4a3
[Security Solution] Move remaining timeline route schemas to /common/api (#162857)
Closes https://github.com/elastic/security-team/issues/7099
Follow up to https://github.com/elastic/kibana/pull/162314

I mislabeled 3 timeline-related internal APIs as detection engine APIs
on [this
spreadsheet](https://docs.google.com/spreadsheets/d/1VCoJ74EkyGuj59VwWj_3v2ecB84pNCpzGqkYnS0SUKw/edit?pli=1#gid=1102015677)
(create_tags, get_tags_by_name, get_dashboards_by_tags). The APIs are
now correctly categorized on the spreadsheet and this PR establishes
schemas for them in `/common/api`.

I also converted these 3 small schemas to io-ts to make it easier to
avoid pulling in `@kbn/config-schema` to `public`, as that increased the
async chunk size by a full 840KB.
2023-08-09 07:26:08 -07:00
Hannah Mudge
fd28152348
[Dashboard] Unskip failing embed_mode screenshot test (#163424)
Closes https://github.com/elastic/kibana/issues/163207

## Summary

Since Chrome was updated in the CI environment, our old CI-generated
screenshots were outdated - this PR updates the `embed_mode` screenshot
tests so that we are once again in sync with the CI environment.

For more context, please refer to
https://github.com/elastic/kibana/pull/160085

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-08-09 08:24:03 -06:00
Tiago Costa
21b33e4342
skip failing es promotion suites (#163486) 2023-08-09 13:45:11 +01:00
Kevin Delemme
b59af8b637
fix(slo): Active alert query (#163404) 2023-08-09 08:04:34 -04:00
Stratoula Kalafateli
4fc9906c17
[TSVB] Unskip tsdb tests (#163471)
## Summary

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

Now ES doesnt error out for average aggregation in counter fields. So we
can remove the test for this scenario
2023-08-09 13:16:02 +02:00
Aleh Zasypkin
729acf76fd
Refresh .security-tokens index in tests before simulating "missing refresh token" scenario. (#163466)
## Summary

Elasticsearch no longer refreshes `.security-tokens` index after token
is created, and we need to respect that in the tests that simulate
"expired refresh token" scenario.

Checked locally with:
```bash
ES_SNAPSHOT_MANIFEST="20230808-202136_29386737/manifest.json"
```

__Caused by: https://github.com/elastic/elasticsearch/pull/98102__

__Fixes: https://github.com/elastic/kibana/issues/163455__
__Fixes: https://github.com/elastic/kibana/issues/163456__
2023-08-09 13:05:54 +02:00
Carlos Crespo
253954c15f
[Infra UI] Fix throughput and disk availability formulas in the Asset Details Flyout (#163149)
closes https://github.com/elastic/kibana/issues/163144

## Summary

This PR fixes the Disk Throughput Read and Write formulas, and Disk
Usage Availability formula in the Asset Details flyout.

The flyout had another problem. the Disk IOPS was using Disk Throughput
formulas and vice-versa.

<img width="570" alt="image"
src="c1e987a1-43cf-459a-8491-51de0e3b4f3d">


<img width="570" alt="image"
src="bf2976bb-0409-46c4-ba02-002528947cff">

<img width="570" alt="image"
src="7f542b21-9992-4088-adac-05a344f066ac">




### How to test

- Start a local Kibana instance
- Navigate to `Infrastructure` > `Hosts`
- Open the flyout for a host

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-09 11:32:37 +02:00
jennypavlova
c0c827009b
[Infra UI] Add feedback button to Infra Metrics Explorer (#163188)
## Summary

This PR adds a feedback button to Metrics Explorer

## Testing
- Go to Infrastructure > Metrics Explorer
   - The feedback button (Tell us what you think!) should be visible
   
<img width="1702" alt="image"
src="0d94371c-6269-4595-9b10-c85d1bcc66d9">

- When you click on the link the Kibana version should be prefilled (no
need to submit just go to step 4)
 
<img width="1193" alt="image"
src="f03d641b-83f8-4a08-ad12-e279303e4a61">
2023-08-09 09:28:37 +02:00
Stratoula Kalafateli
e3e0558aa4
[Lens] Unification of filtering labels (#163389)
## Summary

Changes the texts as proposed
[here](https://github.com/elastic/kibana/issues/160872) (for both lens
and aggbased visualizations)

<img width="996" alt="image"
src="f7e29a36-a6d3-4ad2-832c-4d58505a8a51">

<img width="1073" alt="image"
src="74b74773-f1f4-4ba5-b727-e144eef955f2">
2023-08-09 09:40:36 +03:00
Walter Rafelsberger
da0fb1d987
[ML] AIOps: Auto-detect if spike or dip selected in log rate analysis. (#163100)
This updates log rate analysis to be able to auto-detect whether the
selected deviation is a spike or dip compared to the baseline time
range. To achieve this, we compare the median bucket size of the two
selections. If a dip gets detected, the analysis will then switch the
window parameters sent to the API endpoint to run the analysis.

An info callout points out the auto-selected analysis type and explains
to which time range the analysis results refer to. We need to do this to
make it clear that for dip analysis the significant terms and their doc
counts refer to the baseline time range and vice versa for spike
analysis.
2023-08-09 08:05:07 +02:00
Tiago Costa
0b95987782
skip failing es promotion suite (#163456) 2023-08-09 03:29:47 +01:00
Tiago Costa
990b50f936
skip failing es promotion suite (#163455) 2023-08-09 02:38:09 +01:00
Tiago Costa
31823608f0
skip failing es promotion suite (#163454) 2023-08-09 02:34:08 +01:00