Commit graph

62932 commits

Author SHA1 Message Date
Melissa Alvarez
22f01bfa0e
[ML] Data Frame Analytics creation wizard: ensure preview datagrid displays expected fields (#156435)
## Summary

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

This PR ensures the column field check for the data grid preview in DFA
uses the Data view fields.

BEFORE:

<img width="1214" alt="image"
src="https://user-images.githubusercontent.com/6446462/228678497-ffe65bf9-1b4c-4f56-bb3d-fe69ac941e62.png">

AFTER: 

<img width="1178" alt="image"
src="https://user-images.githubusercontent.com/6446462/235797816-34425648-a470-4631-b6c2-ba453f62752d.png">

### 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)
2023-05-03 11:10:47 -06:00
Angela Chuang
5be0f40052
[SecuritySolution] Update timeline actions (#155692)
## Summary

issue: https://github.com/elastic/kibana/issues/155034 |
https://github.com/elastic/kibana/issues/155586

Please find expected behaviours here:
https://github.com/elastic/kibana/issues/155034#issuecomment-1523735414
2023-05-03 18:03:48 +01:00
Christiane (Tina) Heiligers
264b0f6fa5
adjusts timeout, only report 1 issue (#156287)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-05-03 10:01:50 -07:00
Jonathan Buttner
b80b4c22fa
[Cases] Renaming comment type (#156086)
This PR:

- Renames `CommentResponseRt` to `CommentRt`
- Create `CommentUI` for the UI based on the snake to camel case version
of `Comment`
- Introduces a `AttachmentTransformedAttributes` type that should be
used when returning `CommentAttributes` from the service layer
2023-05-03 12:32:27 -04:00
Dima Arnautov
a3fad62c34
[ML] AIOps: Change point detection fixes (#156481) 2023-05-03 18:31:03 +02:00
Nicolas Chaulet
4301d80d12
[Fleet] Fix displaying agent status bar with no agents (#156541) 2023-05-03 09:14:55 -07:00
Adam Demjen
8f0103cf16
[Enterprise Search] Switch to production ELSER model (#156565)
## Summary

This PR switches the ELSER model to the production one `.elser_model_1`.

This has been manually tested with the Elasticsearch [8.8.0-SNAPSHOT
Docker image from May
2](https://artifacts-snapshot.elastic.co/elasticsearch/8.8.0-6ba23699/summary-8.8.0-SNAPSHOT.html).


![ELSER_prod_model](https://user-images.githubusercontent.com/14224983/235962097-9b7c15b5-2249-4900-b358-9f2906e3d10e.gif)
2023-05-03 08:55:22 -07:00
Sander Philipse
30836a800e
[Enterprise Search] Add beta badge to sync rules (#156555)
## Summary

This adds a beta badge and callout to the sync rules page for connec
<img width="1009" alt="Screenshot 2023-05-03 at 16 08 58"
src="https://user-images.githubusercontent.com/94373878/235943197-fecf2e11-daab-4c6a-a99e-cbf8b865f461.png">
tors.
<img width="1193" alt="Screenshot 2023-05-03 at 16 15 02"
src="https://user-images.githubusercontent.com/94373878/235943190-e6d86a36-3e08-415c-8a29-bc886e1a9951.png">
2023-05-03 08:41:39 -07:00
Jiawei Wu
f7881f6658
[RAM][Maintenance Window][8.8] Remove Extra Commas and Disable Fetch If No License (#156296)
## Summary

Remove some extra commas for the maintenance window no license prompt 


![image](https://user-images.githubusercontent.com/74562234/235515841-1ea1da44-db5c-42c0-9e34-97ad017be474.png)

Also, disable fetch if the user does not have the correct license type,
this gets rid of the unnecessary error popover since the find
maintenance window API will reject these requests.

### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2023-05-03 08:35:56 -07:00
Julian Gernun
4171c9b822
[RAM] Alerts Table breaking when adding first column in fields browser (#156557)
Fixes https://github.com/elastic/kibana/issues/156001
2023-05-03 08:30:14 -07:00
Tiago Costa
7f192bb89d
skip flaky suite (#156437) 2023-05-03 16:23:46 +01:00
Angela Chuang
c278f4e894
[SecuritySolution] Fix minimize amd maximize panel actions (#156518)
## Summary

Issues: https://github.com/elastic/kibana/issues/155857 |
https://github.com/elastic/kibana/issues/156253

This PR fixed minimize amd maximize panel actions in Security Dashboard
view.


https://user-images.githubusercontent.com/6295984/235910244-1cca8dda-cd4c-40b7-977a-69fa00021f81.mov



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

---------

Co-authored-by: Pablo Machado <pablo.nevesmachado@elastic.co>
2023-05-03 08:13:42 -07:00
Jatin Kathuria
ff65ca42f2
[Security Solution] [Fix] Alert Page Controls do not recover from invalid query. (#156542)
## Summary

This PR handles #156016 .

Previously, if user supplied an invalid kql or lucene query, Alert Page
controls will go in error state and not recover until user reloaded the
page or navigated away and back to the Alert Page.

This PR prevents Alert Page Controls going in that error state.

| Before | After |
|--|--|
| <video
src="https://user-images.githubusercontent.com/7485038/235931286-6da23567-4ae8-454a-92b8-a595a20f5655.mov"
/> | <video
src="https://user-images.githubusercontent.com/7485038/235930584-485df881-d22c-44f3-9d53-f673820eb673.mov"
/> |

### 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
2023-05-03 07:57:11 -07:00
Sander Philipse
875f3f3593
[Enterprise Search] Promote Postgresql and MSSQL connectors to native (#156277)
## Summary

This adds PostgreSQL and MSSQL as native connectors.
2023-05-03 07:41:12 -07:00
Sander Philipse
e243c32fb2
[Enterprise Search] Fix incorrect gating of Enterprise Seach (#156537)
## Summary

This fixes an issue where we were incorrectly telling the user they
didn't have access to Enterprise Search, because we weren't passing the
correct product access settings to the Overview component.
2023-05-03 07:29:29 -07:00
Tiago Costa
b7bd376146
skip flaky suite (#156539, #156544) 2023-05-03 15:28:08 +01:00
Dzmitry Lemechko
1c777a2e70
[functional tests] split fleet_api_integration config into smaller ones (#156407)
## Summary

Runtime for `fleet_api_integration/config` crossed the 38 min limit.
Ideally config runtime should be <10 min so that pipeline can quickly
retry failed configs (we do 1 retry on CI)

<img width="1600" alt="image"
src="https://user-images.githubusercontent.com/10977896/235707744-3120e1e9-4882-493f-9ee0-86016a765401.png">


This PR splits the existing config into few smaller ones:

```
x-pack/test/fleet_api_integration/config.agent.ts 15m 15s
x-pack/test/fleet_api_integration/config.agent_policy.ts 4m 10s
x-pack/test/fleet_api_integration/config.epm.ts 8m 12s
x-pack/test/fleet_api_integration/config.package_policy.ts 10m 54s
// combines multiple test files
x-pack/test/fleet_api_integration/config.fleet.ts 5m 2s
```
2023-05-03 16:26:58 +02:00
Marco Liberati
91c1ff15d3
[Lens] Fix field formatters functional tests (#156190)
## Summary

Fixes #155884 , #156463, #156463

This PR make sure the field editor panel is closed after save before
proceeding with other steps.
The main problem here was that the tests were not failing if the
execution was too fast and the panel was still open on test end, so the
cleanup process will fail as would expect the panel to be closed, and
cannot find the right elements to click.


Flaky runner 50 ( ):
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2213

### Checklist

Delete any items that are not applicable to this PR.

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


### Risk Matrix

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

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

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

| Risk | Probability | Severity | Mitigation/Notes |

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


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-05-03 16:06:49 +02:00
Sergi Massaneda
93e75de88f
[Security Solution][Fix] Set doc count to 0 when empty aggregated data (#156497)
## Summary

bug: https://github.com/elastic/kibana/issues/155228

Despite the hit count may be greater than 0 in the aggregation response,
it is possible it won't contain any data, this happens when the
aggregated field is empty in all documents, such as the
`kibana.alert.rule.name` field.

In this situation, we should display `0 events` in the visualization
subtitle.


![screenshot](https://user-images.githubusercontent.com/17747913/235885604-4caf99e8-6826-45a1-967e-32168a88adab.png)
2023-05-03 07:05:58 -07:00
Efe Gürkan YALAMAN
cb0d0b970a
[Enterprise Search] Simplify doc links on configuration page. (#156530)
## Summary

Simplified the list of documents on Index configuration page

![Screenshot 2023-05-03 at 14 44
04](https://user-images.githubusercontent.com/1410658/235919505-508eeceb-d35f-49c1-a40e-3efae71324f5.png)
2023-05-03 07:01:50 -07:00
Hannah Mudge
91635994fd
[Tech Debt] Remove deprecated EuiLoadingContent (#156316)
## Summary

This PR removes the deprecated `EuiLoadingContent` in favour of the new
`EuiSkeletonText` + `EuiSkeletonRectangle` components in all
Presentation-owned files.

cc @elastic/eui-team 


### Checklist

- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)



### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-05-03 08:01:37 -06:00
Yulia Čech
d00e2a366f
[Guided onboarding] Fix the missing help link (#156399)
## Summary

This PR fixes a bug introduced in
https://github.com/elastic/kibana/pull/155065/ that I noticed when
testing guided onboarding for v8.9.0: the help link was missing from the
help menu. I added a functional test for the help link but we also need
a test that the link is hidden when the user doesn't have access to
guided onboarding (opened an issue for that
[here](https://github.com/elastic/kibana/issues/156410)).

### How to test
1. Add xpack.cloud.id: 'testID' to /config/kibana.dev.yml
2. Start ES with yarn es snapshot and Kibana with `yarn start``
3. Check that the help link "Setup guides" is displayed in the help menu

### Screenshot 
<img width="336" alt="Screenshot 2023-05-02 at 17 27 20"
src="https://user-images.githubusercontent.com/6585477/235712599-812b422d-3092-45b3-a726-37f6b90e81c1.png">
2023-05-03 16:00:09 +02:00
Peter Pisljar
b6ea07ac24
removing enableInVisualize references (#156490) 2023-05-03 15:57:07 +02:00
Efe Gürkan YALAMAN
605e9caef7
[Enterprise Search] Fix custom connector not selectable (#156523)
## Summary

Custom connector has empty string "" as service type and it is nullish
in JS/TS. Selection is fixed and Continue button is now selectable for
custom connectors by checking value to be null instead.

Before:


https://user-images.githubusercontent.com/1410658/235914298-c8230681-3520-4e08-b364-e65237661aec.mov


After:


https://user-images.githubusercontent.com/1410658/235914179-3f655131-b5bf-454e-b3ab-384863a21607.mov
2023-05-03 15:49:46 +02:00
Dominique Clarke
77cebee6f7
[Synthetics] adjust monitor status rule location logic (#156432)
## Summary

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

In previous stack versions, the label was not saved to the saved object.

This ensures that alerting works both for those early versions as well
current versions, by adjusting the logic to consider both the
location.label and location.id in alerting logic.

### Testing

1. Create a new oblt-cli cluster and connect to the synthetics service,
locally or via the dev environment
2. Checkout v8.5.3
3. Create a monitor. Make sure it's down and wait for the first down
check
4. Check out this branch
5. Navigate to Observabillity alerts. Ensure that an alert is generated
for the monitor. You may have to wait a few minutes.

---------

Co-authored-by: Shahzad <shahzad31comp@gmail.com>
2023-05-03 09:41:19 -04:00
Mike Côté
cb2e28d1e4
Fix task manager polling flow controls (#153491)
Fixes https://github.com/elastic/kibana/issues/151938

In this PR, I'm re-writing the Task Manager poller so it doesn't run
concurrently when timeouts occur while also fixing the issue where
polling requests would pile up when polling takes time. To support this,
I've also made the following changes:
- Removed the observable monitor and the
`xpack.task_manager.max_poll_inactivity_cycles` setting
- Make the task store `search` and `updateByQuery` functions have no
retries. This prevents the request from retrying 5x whenever a timeout
occurs, causing each call taking up to 2 1/2 minutes before Kibana sees
the error (now down to 30s each). We have polling to manage retries in
these situations.
- Switch the task poller tests to use `sinon` for faking timers
- Removing the `assertStillInSetup` checks on plugin setup. Felt like a
maintenance burden that wasn't necessary to fix with my code changes.

The main code changes are within these files (to review thoroughly so
the polling cycle doesn't suddenly stop):
- x-pack/plugins/task_manager/server/polling/task_poller.ts
- x-pack/plugins/task_manager/server/polling_lifecycle.ts (easier to
review if you disregard whitespace `?w=1`)

## To verify
1. Tasks run normally (create a rule or something that goes through task
manager regularly).
2. When the update by query takes a while, the request is cancelled
after 30s or the time manually configured.
4. When the search for claimed tasks query takes a while, the request is
cancelled after 30s or the time manually configured.

**Tips:**
<details><summary>how to slowdown search for claimed task
queries</summary>

```
diff --git a/x-pack/plugins/task_manager/server/queries/task_claiming.ts b/x-pack/plugins/task_manager/server/queries/task_claiming.ts
index 07042650a37..2caefd63672 100644
--- a/x-pack/plugins/task_manager/server/queries/task_claiming.ts
+++ b/x-pack/plugins/task_manager/server/queries/task_claiming.ts
@@ -247,7 +247,7 @@ export class TaskClaiming {
         taskTypes,
       });

-    const docs = tasksUpdated > 0 ? await this.sweepForClaimedTasks(taskTypes, size) : [];
+    const docs = await this.sweepForClaimedTasks(taskTypes, size);

     this.emitEvents(docs.map((doc) => asTaskClaimEvent(doc.id, asOk(doc))));

@@ -346,6 +346,13 @@ export class TaskClaiming {
       size,
       sort: SortByRunAtAndRetryAt,
       seq_no_primary_term: true,
+      aggs: {
+        delay: {
+          shard_delay: {
+            value: '40s',
+          },
+        },
+      },
     });

     return docs;
```
</details>

<details><summary>how to slow down update by queries</summary>
Not the cleanest way but you'll see occasional request timeouts from the
updateByQuery calls. I had more luck creating rules running every 1s.

```
diff --git a/x-pack/plugins/task_manager/server/task_store.ts b/x-pack/plugins/task_manager/server/task_store.ts
index a06ee7b918a..07aa81e5388 100644
--- a/x-pack/plugins/task_manager/server/task_store.ts
+++ b/x-pack/plugins/task_manager/server/task_store.ts
@@ -126,6 +126,7 @@ export class TaskStore {
       // Timeouts are retried and make requests timeout after (requestTimeout * (1 + maxRetries))
       // The poller doesn't need retry logic because it will try again at the next polling cycle
       maxRetries: 0,
+      requestTimeout: 900,
     });
   }

@@ -458,6 +459,7 @@ export class TaskStore {
           ignore_unavailable: true,
           refresh: true,
           conflicts: 'proceed',
+          requests_per_second: 1,
           body: {
             ...opts,
             max_docs,
```
</details>

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-05-03 09:33:10 -04:00
Yngrid Coello
d96c5a636f
[APM] Mark Agent explorer as beta (#156470)
Closes #156466.

<img width="1633" alt="image"
src="https://user-images.githubusercontent.com/1313018/235851516-f06ba00f-764b-436e-9e5f-138788fc323c.png">

<img width="1981" alt="image"
src="https://user-images.githubusercontent.com/1313018/235851622-96ddd60b-fede-440d-87ea-cc0dc859065d.png">
2023-05-03 15:19:27 +02:00
Tiago Costa
d0761f3739
skip flaky suite (#156117) 2023-05-03 14:12:47 +01:00
Sander Philipse
b37224d380
[Enterprise Search] Remove low memory banner (#156509)
## Summary

Removes the low memory banner that would block cloud connectors on 2GB
deployments, as memory issues have been resolved.
2023-05-03 05:46:01 -07:00
Alberto Delgado Roda
c11dc28666
[Synthetics] enable api key when devUrl is set (#156059)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-03 13:59:52 +02:00
Peter Pisljar
2c491b5b68
[CM] - lens (#155700) 2023-05-03 13:29:33 +02:00
Julia Rechkunova
93256a742f
[DataView] Style improvements for CreateDataView and CreateDataViewField flyouts (#156341)
## Summary

This PR adds eui styles to scrollbars and shows "Discard changes" button
in red.

Before:
<img width="500" alt="Screenshot 2023-05-02 at 11 16 42"
src="https://user-images.githubusercontent.com/1415710/235631712-70fe2c39-d8ab-4304-9f59-8802cac278f1.png">

After:
<img width="500" alt="Screenshot 2023-05-02 at 11 22 59"
src="https://user-images.githubusercontent.com/1415710/235631763-be30207c-f870-476e-a0e0-16050ea56750.png">
<img width="500" alt="Screenshot 2023-05-02 at 11 26 42"
src="https://user-images.githubusercontent.com/1415710/235631771-5f982918-2810-4cda-879b-7ad535299cd3.png">
2023-05-03 13:13:34 +02:00
Peter Pisljar
b3aa58033c
[visulizations] adding schema to saved object mapping (#154514)
## Summary

Removes remaining properties that are not searched on from the mapping
for the visualizations saved object and adds a schema definition to it.

part of https://github.com/elastic/kibana/pull/153070
2023-05-03 12:47:44 +02:00
Pablo Machado
7f68428e34
[Security Solution] Fix color coding of severities is different at Entity analytics (#156383)
issue: https://github.com/elastic/kibana/issues/143043

## Summary

Fix color coding of severities is different at Entity Analytics by using
the same colors of alert severity.

**Before:**

![195068297-4893ff3e-184a-4deb-b551-28d55f4994fd](https://user-images.githubusercontent.com/1490444/235682183-272d0739-7a65-42d4-b1ef-83751cf57ab0.jpg)




**After:**

![Screenshot 2023-05-02 at 14 40
23](https://user-images.githubusercontent.com/1490444/235678297-f4a05f1c-95f6-4895-a7b1-fd6645e55f7b.png)
![Screenshot 2023-05-02 at 14 40
03](https://user-images.githubusercontent.com/1490444/235678383-0eefe697-5669-496d-b0b8-44433f519754.png)
![Screenshot 2023-05-02 at 14 37
45](https://user-images.githubusercontent.com/1490444/235678609-257b8eb1-8b86-4064-8fbf-0c0b188174ae.png)

![Screenshot 2023-05-02 at 15 32
22](https://user-images.githubusercontent.com/1490444/235681736-609b484c-bd08-4379-b76b-6a47c3a016ba.png)
2023-05-03 12:46:19 +02:00
Konrad Szwarc
d8fe39c18d
[Defend Workflows][Bug] Case flyout z-index (#153219)
Fixes https://github.com/elastic/security-team/issues/6228

5000 `z-index` set in `create-case-flyout-mask-overlay` is being
overwritten by `euiOverlayMask-belowHeader` with a value of 1000. This
causes **Case flyout** to be under the already opened **Osquery flyout**

This PR includes cleanup in flyouts renders - we removed unnecessary
`maskProps` as well as z-indexes that were explicitly set even though
flyout component manages them itself.


![test](https://user-images.githubusercontent.com/29123534/225292177-a08d3fb8-aad3-487b-a054-6cde6aec94d7.gif)

---------

Co-authored-by: Tomasz Ciecierski <ciecierskitomek@gmail.com>
Co-authored-by: Tomasz Ciecierski <tomasz.ciecierski@elastic.co>
Co-authored-by: Patryk Kopyciński <contact@patrykkopycinski.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-03 12:30:13 +02:00
Walter Rafelsberger
3f52ff6fce
[ML] Transforms/DFA: Render EuiDataGrad for more than 0 rows. (#156403)
Fixes the React dev mode warning "Warning: Can't perform a React state
update on an unmounted component." by only rendering `EuiDataGrid` if
there's more than 0 rows.
2023-05-03 12:22:39 +02:00
Marco Liberati
36c31f5c3f
[Lens] Enabled tsdb counter fields for last_value (#156183)
## Summary

Fixes #156168 

Enables the `last_value` operation for TSDB `counter` field types.

### Checklist

Delete any items that are not applicable to this PR.

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


### Risk Matrix

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

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

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

| Risk | Probability | Severity | Mitigation/Notes |

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


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-05-03 11:05:06 +02:00
James Gowdy
9559bee361
[ML] Fixing space checks for recently changed trained model apis (#156238)
Fixes issues raised in
https://github.com/elastic/kibana/pull/155375#discussion_r1176594934
Kibana trained model endpoints for `_stop`, `_update` and `infer` now
require the model ID was well as the deployment ID to be passed to them.


Also fixes the stop trained model api when stopping more than one model.
It's very likely the elasticsearch `_stop` api will not support a comma
separated list of deployment IDs for this release, and so this change
calls `_stop` in a loop for each deployment. It also allows for better
reporting if any of the deployments fail to stop.
2023-05-03 09:42:12 +01:00
Walter Rafelsberger
7a4ae72bce
[ML] Anomaly Detection Settings: Fix key attribute for filter list table (#156392)
Fixes the React dev mode warning "Warning: Each child in a list should
have a unique "key" prop." by adding a key attribute to the
`DeleteFilterListModal` component.
2023-05-03 10:33:11 +02:00
Robert Oskamp
a90f4c24da
[ML] Functional tests - stabilize and re-enable export jobs tests (#152334)
This PR re-enables the export job tests and the reporting download tests
after the underlying issues has been fixed by switching to the new
headless browser mode.
2023-05-03 10:19:44 +02:00
Stratoula Kalafateli
63c1f20460
[Unified search] Fixes the bar suggestions method selection (#156329)
## Summary

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

Fixes the bug described here
https://github.com/elastic/kibana/issues/155801

The bug was introduced by
https://github.com/elastic/kibana/pull/154522/files

If the filtersForSuggestions prop is there, we want to default to
terms_agg, otherwise we want to keep it as undefined to use the advanced
settings method.
2023-05-03 11:16:55 +03:00
Cristina Amico
b6fe8e1df8
[Fleet] Fix missing await in test making test flaky (#156402)
Closes https://github.com/elastic/kibana/issues/150607

## Summary

Flaky test was re-enabled last month but was failing again. An "await"
was missing and was likely causing the flakiness.

### Checklist

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-05-03 09:12:26 +02:00
Dzmitry Lemechko
424eae3f4d
[functional tests] split security and spaces ftr configs (#156350)
## Summary

Splitting ftr configs to speed up ftr tests run on CI 

```
The following "Functional Tests" configs have durations that exceed the maximum amount of time desired for a single CI job. 
This is not an error, and if you don't own any of these configs then you can ignore this warning.If you own any of these
configs please split them up ASAP and ask Operations if you have questions about how to do that.

x-pack/test/spaces_api_integration/security_and_spaces/config_basic.ts: 38.2 minutes
x-pack/test/spaces_api_integration/security_and_spaces/config_trial.ts: 38.2 minutes
```

After split:
x-pack/test/spaces_api_integration/security_and_spaces/config_basic.ts
20m 29s

x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_basic.ts
20m 52s
x-pack/test/spaces_api_integration/security_and_spaces/config_trial.ts
19m 57s

x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_trial.ts
21m 5s

Rebalancing it with other configs should speedup CI by at least few
minutes
2023-05-03 08:57:57 +02:00
Walter Rafelsberger
385d0dc84a
[ML] Package @kbn/ml-anomaly-utils (#155697)
Creates Package `@kbn/ml-anomaly-utils`.

- This moves some of the utility functions, constants and types related
to Anomaly Detection we previously exposed from the `ml` plugin itself
to a package `@kbn/ml-anomaly-utils`, resulting in ~5.9KB reduction of
the plugin's page load bundle size.
- To reduce increases in async bundle size for consuming plugins the
utils have been refactored into individual files to allow deep imports
and get some optimization through that. Some previously duplicated code
in consuming plugins has been deleted and replaced with deep imports of
the corresponding original code in the package.
- Types have been prefixed with `Ml`.
- Constants have been prefixed with `ML_`.

Created package via `node scripts/generate package @kbn/ml-anomaly-utils
--web --dir ./x-pack/packages/ml/anomaly_utils`.
2023-05-03 08:46:27 +02:00
Kibana Machine
8a2a4bb3e1
[api-docs] 2023-05-03 Daily api_docs build (#156464)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/326
2023-05-03 01:01:25 -04:00
Brandon Morelli
72c5d5286a
Update APM links (#156460)
This PR updates three APM links. For the failing links in
https://github.com/elastic/apm-server/pull/10560.
2023-05-02 21:42:18 -04:00
Angela Chuang
12277ac0b3
[SecuritySolution] Align no indices state with Kibana dashboard (#155990)
## Summary

Steps to reproduce:
1. Make sure you have some data in Security Data View. Create a
dashboard that consumes Security Data View, save it and add a `Security
Solution` tag.
2. Delete the non-empty indices in Security Data View
3. Back to SecuritySolution > Dashboards, select the dashboard you
added.
4. This is the current indices not found UI you'd see:
<img width="2546" alt="dashboard_view_indices_notfound"
src="https://user-images.githubusercontent.com/6295984/234829440-842442e1-f09a-464e-a6c0-8761a3124791.png">


Expected:
- We should align the behaviour with Kibana dashboard when indices not
found:

<img width="2555" alt="Screenshot 2023-04-27 at 10 48 26"
src="https://user-images.githubusercontent.com/6295984/234829379-251fb621-e7cd-4788-a682-8a2bce25312a.png">

After:
<img width="2542" alt="Screenshot 2023-04-27 at 11 10 16"
src="https://user-images.githubusercontent.com/6295984/234832003-95f5c7e5-57d9-4424-b591-f512f365cda2.png">
2023-05-02 15:46:35 -07:00
Angela Chuang
db02784f98
[SecuritySolution] Restore lens table columns when Reset group by field clicked. (#156393)
## Summary

issue: https://github.com/elastic/kibana/issues/155859
Steps to reproduce: Please find the issue above.

`Reset group by field` action should:
1. Revert `Group by` and `Group by top` to default fields
`kibana.alert.rule.name` and `host.name`
2. Unhide all the columns in the table.


### 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
2023-05-02 15:02:12 -07:00
Dominique Clarke
589ea3affc
[Synthetics] Adjust content (#156029)
## Summary

Resolves https://github.com/elastic/kibana/issues/155936
Relates to https://github.com/elastic/kibana/issues/152915
Resolves https://github.com/elastic/kibana/issues/150944
Resolves https://github.com/elastic/kibana/issues/156166

Copy fixes:

- Alerting config: Address Typo
(https://github.com/elastic/kibana/issues/152915#issuecomment-1516614675)
- Alerting config: Address success toast wording
- Getting started ("Create your first monitor") locations: Repeated text
between placeholder and hint text. To address this, I changed the
helptext to give more detail
- Private locations -> "Monitors" column: replaced `Running` with
`configured`
- Overview page: Search bar placeholder: `url` is now uppercase `URL`
- Monitor status alert - Updates text for viewer user to be consistent
with other tooltips
- Run once errors - Remove extra error toast 
- Run once errors - Remove excess phrase from error
- Sync errors - Made content more user friendly
- Synthetics App - replace references to Monitor Management with
Synthetics App
- Enable/disable - clarify when actions apply to all monitors
- Project monitors - add reference to enabling/disabling alerting on
project monitor page
- Enablement - Adjust content for less privileged users

Some screenshots of the fixes are below. These are not exhaustive
<img width="1417" alt="Screen Shot 2023-04-25 at 12 12 38 PM"
src="https://user-images.githubusercontent.com/11356435/234906460-529d48d4-f682-4d45-b439-7bd7189c37ea.png">
<img width="772" alt="Screen Shot 2023-04-25 at 12 12 31 PM"
src="https://user-images.githubusercontent.com/11356435/234906462-b85d6fe0-2d32-42f0-81fb-2f528c5c0d87.png">
<img width="909" alt="Screen Shot 2023-04-25 at 12 12 10 PM"
src="https://user-images.githubusercontent.com/11356435/234906466-49286af9-29c4-4bcb-9d10-dc84bcddd66f.png">
<img width="1414" alt="Screen Shot 2023-04-25 at 11 59 57 AM"
src="https://user-images.githubusercontent.com/11356435/234906468-48b27002-5771-42df-9ee5-5852dabeaaeb.png">
<img width="623" alt="Screen Shot 2023-04-25 at 11 57 53 AM"
src="https://user-images.githubusercontent.com/11356435/234906470-4ea5acf7-bff2-41af-a679-7e4b9f43c377.png">
<img width="735" alt="Screen Shot 2023-04-27 at 4 16 17 PM"
src="https://user-images.githubusercontent.com/11356435/234982914-128af18e-204a-4df6-a791-ac3155d8b5b9.png">
<img width="1240" alt="Screen Shot 2023-04-28 at 2 09 29 PM"
src="https://user-images.githubusercontent.com/11356435/235223171-f2177983-f8cc-45a3-8ff8-76850508e63e.png">
<img width="602" alt="Screen Shot 2023-04-28 at 11 12 49 AM"
src="https://user-images.githubusercontent.com/11356435/235223288-7b01dd85-2311-4b42-bb91-92e4a4f454e3.png">
<img width="552" alt="Screen Shot 2023-04-28 at 11 12 25 AM"
src="https://user-images.githubusercontent.com/11356435/235223290-00cc6a8c-7f9c-46f1-b8ae-5c98eaeaa35d.png">
<img width="1448" alt="Screen Shot 2023-04-28 at 2 56 58 PM"
src="https://user-images.githubusercontent.com/11356435/235230906-093d720c-9ac9-4cf1-b04a-34a1409d7379.png">

---------

Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-05-02 17:23:04 -04:00
Adam Demjen
5263339108
[Enterprise Search] Show error panel on API call errors (#156273)
## Summary

This PR adds generic error handling for API calls that manage the ELSER
model: creation (download), fetching and starting the deployment. If an
error occurs, the ELSER panel is replaced with the error panel. The user
can navigate to the ML Notifications page with a link, which might
contain diagnostic information about the error.


![ELSER_error_handling](https://user-images.githubusercontent.com/14224983/235535266-93e8e822-0603-4a10-8aab-ec77cd167bf6.gif)


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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-02 16:42:13 -04:00