Commit graph

284 commits

Author SHA1 Message Date
Julia Rechkunova
ecd2b914f4
Migrate drag and drop logic from Lens plugin to its own package (#151836)
Closes https://github.com/elastic/kibana/issues/151702

## Summary

This PR migrates drag and drop logic from Lens plugin to a new package
so we can reuse it on Discover page later. At this point there should be
no visual changes. If you notice something, please comment on the PR.

- [x] Migrate drag&drop code to its own package `@kbn/dom-drag-drop`
- [x] Clean up i18n strings
- [x] Clean up styles
- [x] Adjust tests 
- [x] Make telemetry optional  
- [x] Configurable `data-test-subj`

Please test by using your mouse and also by using keyword shortcuts.

# Next steps

- Redesign for field list item (smaller button, a separate handle icon,
pill styles)
- Redesign for draggable buttons in the Lens layer panels (smaller
buttons)
-
[Figma](https://www.figma.com/file/SvpfCqaZPb2iAYnPtd0Gnr/KUI-Library?node-id=674%3A198901&t=OnQH2EQ4fdBjsRLp-0)
- https://github.com/elastic/kibana/issues/151703

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2023-03-23 11:09:17 +01:00
Sergi Massaneda
2fa877b172
[Security Solution] Side navigation package (#152924)
## Summary

Security navigation moved to its own package.
This migration is needed in order to reuse the same component for the
navigation in the Serverless Security plugin
[PoC](https://github.com/elastic/kibana/pull/152172)

previous location:
`x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav`
new location: `packages/kbn-security-solution-side-nav`

Implementation changes:

- Custom icons removed in favor of new EUI `iconType`.
- Custom `SideNavItem` (for "Get Started" item) removed in favor of more
configuration properties.
- Generic nomenclature.
- Header banner offset special case logic extracted from the navigation
component, new `panelTopOffset` prop added to customize the top position
of the floating panel.

### Screenshot


![Solution_side_nav](https://user-images.githubusercontent.com/17747913/224022078-2c6b6d20-8f9d-4917-bd6e-800a596ed718.png)

## Test

`yarn storybook security_solution_side_nav`

### 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]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [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>
Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
2023-03-10 18:14:56 +01:00
Steph Milovic
2a1740d035
[Security solution] Grouping UI package (#152385) 2023-03-02 12:03:25 -07:00
Philippe Oberti
4aa0961613
[Security Solution] expanded flyout (#150240) 2023-02-27 21:02:03 -06:00
Xavier Mouligneau
01f07bccf1
[RAM] Bring flapping status and settings in o11y (#150483)
## Summary

Bring shareable components to set the flapping configuration on rule
management in o11y and update the status alert around flapping.

<img width="1697" alt="image"
src="https://user-images.githubusercontent.com/189600/217358288-57eb93ef-94e2-4576-9e99-baee8c2ef2b2.png">

<img width="1696" alt="Screenshot 2023-02-07 at 3 15 01 PM"
src="https://user-images.githubusercontent.com/189600/217356846-441eaf51-f6c9-4afd-9f6b-9c8f5a3531bd.png">


### Checklist

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-02-07 20:52:26 -07:00
Andrew Macri
1d0b90bd12
[Security Solution] Data Quality dashboard (#150063)
# [Security Solution] Data Quality dashboard

## Check ECS compatibility with just one click

With just one click, the _Data Quality dashboard_ checks all the indices used by the Security Solution, (or anything else), for compatibility with the [Elastic Common Schema (ECS)](https://www.elastic.co/guide/en/ecs/current/ecs-reference.html)

![checking_data_quality](https://user-images.githubusercontent.com/4459398/215989195-2f5e2126-9ece-4df6-9742-284c73442962.gif)

## Create cases from results

Create a single case containing all the results, or create cases for specific indices

![create_case_from_take_action](https://user-images.githubusercontent.com/4459398/215989342-4489cf68-69d1-4ac4-859c-d849c4778d68.gif)

## Interactive tabs put results in context

Expand any index to reveal interactive tabs

- Summary
- Incompatible fields
- Custom fields
- ECS complaint fields
- All fields

![tabs](https://user-images.githubusercontent.com/4459398/215989435-a363a9e5-8635-42d1-a0f7-5e0ddc6f9515.gif)

## Share comprehensive markdown reports

Share markdown reports containing the same content as the dashboard

![markdown_report](https://user-images.githubusercontent.com/4459398/215989555-72c53ed8-99f9-4be7-9181-6b9f365a8f6e.gif)

### On page load

When the Data Quality dashboard page loads, the alerts index, and any indices matching the selected `Data view` are displayed

![page_load](https://user-images.githubusercontent.com/4459398/215989957-3b4d52f1-eaa4-4d42-9e40-d556602b006b.png)

Only `hot`, `warm`, or `unmanaged` indices are displayed by default

Indices are not checked automatically when the dashboard loads

Click either :

- `Check all` to check all the indices on the page
- The expand button to automatically check (just) one index, and instantly view results

### Check all

When the `Check all` button is clicked

- The `Check all` button changes to a `Cancel` button
- The `Last checked: n <time unit> ago` text is replaced with a progress bar indicating how many Indices are left to check
- The `Checking <index name>` text will update as each index is checked. Text will wrap if necessary
- The results tables begin updating with results
- Pattern stats update to summarize each table
- Rolled up results for the entire page update after every index is checked

![running_before_errors](https://user-images.githubusercontent.com/4459398/215990059-43efd573-217f-47e8-8ed2-1b1de4766834.png)

<https://user-images.githubusercontent.com/4459398/216007795-2ebbc0c6-8c7a-49c7-a22c-b97d2a58dddd.mov>

When Check all, is running, the Data Quality dashboard adds a three second delay after every check completes, before beginning the next check.

Check all will keep checking indexes until the user cancels, or all indexes have (attempted to be) checked.

While Check all is running, users may simultaneously click on any index to check it on demand. The results are instantly rolled up when this happens.

When all checks complete, the page looks like this:

![all_results_no_errors](https://user-images.githubusercontent.com/4459398/215990208-b28e1ad4-d8fd-453b-a037-1123c4352469.png)

### Take action

Click the `Take action` popover to share the entire page of results via one of the following actions:

- Add to new case
- Copy to clipboard

![take_action_popover](https://user-images.githubusercontent.com/4459398/215990971-fff06bf3-cac5-418f-83fc-556caa4b9413.png)

![create_case_from_take_action](https://user-images.githubusercontent.com/4459398/216012412-812f7b84-94a7-462a-8574-2e05afa35efd.gif)

![copy_toast](https://user-images.githubusercontent.com/4459398/215992498-c83b9191-8226-4ab1-8170-1bc953083f5c.png)

### Expanding results

The `Incompatible fields` tab is always displayed by default when a result is expanded

The `Incompatible fields` tab shows a success message when a successful result is expanded

![incompatible_fields_zero](https://user-images.githubusercontent.com/4459398/215991201-2ff7158e-1787-4221-b2de-d7e5ee49c412.png)

The `Incompatible fields` tab shows, side by side, expected ECS mapping types vs the actual mapping types when they are different

![mapping_differences](https://user-images.githubusercontent.com/4459398/215990436-82bb969e-fab7-4f2b-97f1-f21fd5bc3641.png)

The `Incompatible fields` tab also compares field values expected by ECS vs the actual values in an index, when they are different

![expect_vs_actual_value](https://user-images.githubusercontent.com/4459398/215990341-2c5ce75b-03cc-4b72-9431-282dfd032844.png)

The `Incompatible fields` tab displays a callout that explains the consequences of having incompatible fields. The content is based on the following illustration, created by @MikePaquette

<img width="1264" alt="ecs_meter" src="https://user-images.githubusercontent.com/4459398/216016124-6fe89ab4-c364-40ec-8a6f-99349e6d583c.png">

The calllout has a call to action to create a case or copy a markdown report for just the expanded result

- Add to new case
- Copy to clipboard

![create_case_from_incompatable_fields_tab](https://user-images.githubusercontent.com/4459398/215990827-57506e26-06e3-4704-afb4-4bd8308b217a.png)

### Tabs

The Summary tab displays a call to action when incompatible fields are found

Click on any part of the Summary tab chart or legend to navigate to the corresponding tab

![summary_tab](https://user-images.githubusercontent.com/4459398/215990517-41e96cab-558a-4461-a34a-e149873841a4.png)

Clicking on the `Copy to clipboard` call to action in the Custom fields tab copies a markdown version of the table to the clipboard

![custom_fields_tab](https://user-images.githubusercontent.com/4459398/215990623-8c787d11-cf93-4321-a803-2133c81fcd1b.png)

The search feature of the ECS complaint fields tab may, for example, be used to verify a specific ECS complaint mapping exists

![ecs_complaint_fields_tab](https://user-images.githubusercontent.com/4459398/215990703-dc0b93b3-a3ed-447b-96c5-714d71f4177d.png)

The All fields tab displays the union of all other tabs

![all_fields_tab](https://user-images.githubusercontent.com/4459398/215990746-88eb8812-7a00-47f4-94fc-5105aad024c1.png)

### Data view selection

The `Data view` dropdown defaults to the `Security Default Data View`

![data_view_selection](https://user-images.githubusercontent.com/4459398/216020987-d710aa85-5ddc-4fa1-9a3f-c131e656da56.png)

The alerts index is always checked and included in the results, even when another Data View is selected

![alerts_index_always_included](https://user-images.githubusercontent.com/4459398/216022004-4a6adb46-5bc1-4619-ad46-7364d7565e3a.png)

### ILM phase options

![ilm_selection](https://user-images.githubusercontent.com/4459398/216023010-c3bb9e3e-9aec-487b-8757-e4736c06de7e.png)

Only `hot`, `warm`, or `unmanaged` indices may be selected for checking.

The `cold` and `frozen` options are disabled.

When all options in the `ILM phase` box are cleared, an informative empty prompt is displayed

![ilm_empty_prompt](https://user-images.githubusercontent.com/4459398/216029584-659fafda-92fb-4607-b61e-87aa3f0b45e8.png)

### Errors

Errors may occur for some (or all) indices. The `View errors` button appears when the first error occurs

![running_with_errors](https://user-images.githubusercontent.com/4459398/216024230-609ec815-e2e4-408f-b9a5-d12aad9f83c5.png)

Users may click the `View errors` button to view them, even while a check is in progress

![error_popover](https://user-images.githubusercontent.com/4459398/216755446-210996d8-605b-4d6b-8c90-cf94dc83a76b.png)

The Copy to clipboard button  in the errors popover copies a markdown version of the errors table to the clipboard

When errors occur, the same content shown in the Errors popover is automatically included in the markdown report created by the `Take action` menu

### Markdown reports

The content of markdown reports (created by the Take action menu) includes most of the content from the Data Quality dashboard that created it

In the screenshot below, the Data Quality dashboard is on the left, and a markdown report (pasted into Github) is on the right

![side_by_side_compare_1](https://user-images.githubusercontent.com/4459398/216026602-7cf7aaaa-b461-44e0-a03e-6690e3d87d3c.png)

Stats rollups and tables are included in markdown reports

![side_by_side_2](https://user-images.githubusercontent.com/4459398/216026872-d5319279-e4b2-4ac0-b291-06dc61ba108c.png)

Markdown reports use the same "expected vs actual" format to display the details of incompatible field mappings

### Navigation

The Data Quality dashboard is grouped with the existing Security Solution dashboards

![dashboards_page](https://user-images.githubusercontent.com/4459398/216057432-0ae99d57-4857-4270-bd7d-07bc96e27cb0.png)

It may also be launched via the side navigation

![side_nav](https://user-images.githubusercontent.com/4459398/216057528-2370b82a-dc92-4ea6-8519-7e8abc61acd0.png)

## Privileges

The privileges in the table below are required to check any pattern of indices, or any specific index:

| Privilege                                         | Required to                                                                                                                       | Required for API |
|-------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|------------------|
| `monitor` or `manage`  (`manage` builds on `monitor`) | List indices that match a pattern, and get document counts for an index  example: `GET logs-*/_stats`                             | `_stats`         |
| `view_index_metadata` or `manage_ilm`                 | List index ILM configs (e.g. hot) that match a pattern  example: `GET logs-*/_ilm/explain`                                        | `_ilm/explain`   |
| `view_index_metadata` or `manage`                     | Get index mappings for a specific index  example:  `GET .ds-logs-endpoint.events.process-default-2023.01.17-000001/_mapping`      | `_mapping`       |
| `read` or `read_cross_cluster`                        | Run aggregations to test for unallowed values  example:  `GET .ds-logs-endpoint.events.process-default-2023.01.17-000001/_search` | `_search`        |

Users may have some of the privileges required to check an index, but not all of them.

The built-in `viewer` role does not have the `monitor` (or `manage`) role. The following screenshot illustrates what a user will see if they login as a user with the `viewer` role:

![login_with_viewer_role](https://user-images.githubusercontent.com/4459398/216755590-b6c01a7b-73b1-4680-8db1-b9d1c0035f06.png)

# An actual markdown report (all content below)

The rest of the content below is pasted from an actual report, created via the `Take action` menu:

# Data quality

| Incompatible fields | Indices checked | Indices | Docs |
|---------------------|-----------------|---------|------|
| 17 | 15 | 17 | 1,404,514 |

## .alerts-security.alerts-default

`hot(1)`

| Incompatible fields | Indices checked | Indices | Docs |
|---------------------|-----------------|---------|------|
| 1 | 1 | 1 | 1,837 |

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .internal.alerts-security.alerts-default-000001 | 1,837 (100.0%) | 1 | `hot` |

### .internal.alerts-security.alerts-default-000001

The `.internal.alerts-security.alerts-default-000001` index has [mappings](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html) or field values that are different than the [Elastic Common Schema](https://www.elastic.co/guide/en/ecs/current/ecs-reference.html) (ECS), version `8.6.0` [definitions](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html).

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .internal.alerts-security.alerts-default-000001 | 1,837 (100.0%) | 1 | `hot` |

### **Incompatible fields** `1` **Custom fields** `188` **ECS compliant fields** `1219` **All fields** `1408`

#### 1 incompatible field

Fields are incompatible with ECS when index mappings, or the values of the fields in the index, don't conform to the Elastic Common Schema (ECS), version 8.6.0.

 Detection engine rules referencing these fields may not match them correctly
 Pages may not display some events or fields due to unexpected field mappings or values
 Mappings or field values that don't comply with ECS are not supported

#### Incompatible field values - .internal.alerts-security.alerts-default-000001

| Field | ECS values (expected) | Document values (actual) |
|-------|-----------------------|--------------------------|
| event.category | `authentication`, `configuration`, `database`, `driver`, `email`, `file`, `host`, `iam`, `intrusion_detection`, `malware`, `network`, `package`, `process`, `registry`, `session`, `threat`, `vulnerability`, `web` | `behavior` (62) |

## auditbeat-*

`hot(11)`  `unmanaged(1)`

| Incompatible fields | Indices checked | Indices | Docs |
|---------------------|-----------------|---------|------|
| 13 | 10 | 12 | 29,182 |

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-auditbeat-8.6.0-2023.01.17-000001 | 14,409 (49.4%) | 0 | `hot` |
| -- | .ds-auditbeat-8.5.3-2023.01.24-000001 | 2,857 (9.8%) | -- | `hot` |
|  | .ds-auditbeat-8.2.3-2023.01.24-000001 | 2,246 (7.7%) | 0 | `hot` |
|  | .ds-auditbeat-8.4.1-2023.01.24-000001 | 2,179 (7.5%) | 0 | `hot` |
| -- | .ds-auditbeat-8.3.3-2023.01.24-000001 | 1,921 (6.6%) | -- | `hot` |
|  | auditbeat-7.16.0-2023.01.17-000001 | 1,880 (6.4%) | 0 | `hot` |
|  | .ds-auditbeat-8.1.1-2023.01.24-000001 | 1,676 (5.7%) | 0 | `hot` |
|  | .ds-auditbeat-8.2.2-2023.01.24-000001 | 1,578 (5.4%) | 0 | `hot` |
|  | .ds-auditbeat-8.0.0-2023.01.24-000001 | 251 (0.9%) | 0 | `hot` |
|  | auditbeat-7.10.2-2023.01.24-000001 | 111 (0.4%) | 12 | `hot` |
|  | .ds-auditbeat-8.5.0-2023.01.24-000001 | 74 (0.3%) | 0 | `hot` |
|  | auditbeat-custom-empty-index-1 | 0 (0.0%) | 1 | `unmanaged` |

### .ds-auditbeat-8.6.0-2023.01.17-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-auditbeat-8.6.0-2023.01.17-000001 | 14,409 (49.4%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `549` **ECS compliant fields** `1210` **All fields** `1759`

### .ds-auditbeat-8.2.3-2023.01.24-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-auditbeat-8.2.3-2023.01.24-000001 | 2,246 (7.7%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `510` **ECS compliant fields** `1210` **All fields** `1720`

### .ds-auditbeat-8.4.1-2023.01.24-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-auditbeat-8.4.1-2023.01.24-000001 | 2,179 (7.5%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `509` **ECS compliant fields** `1210` **All fields** `1719`

### auditbeat-7.16.0-2023.01.17-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | auditbeat-7.16.0-2023.01.17-000001 | 1,880 (6.4%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `523` **ECS compliant fields** `1111` **All fields** `1634`

### .ds-auditbeat-8.1.1-2023.01.24-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-auditbeat-8.1.1-2023.01.24-000001 | 1,676 (5.7%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `510` **ECS compliant fields** `1204` **All fields** `1714`

### .ds-auditbeat-8.2.2-2023.01.24-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-auditbeat-8.2.2-2023.01.24-000001 | 1,578 (5.4%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `510` **ECS compliant fields** `1210` **All fields** `1720`

### .ds-auditbeat-8.0.0-2023.01.24-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-auditbeat-8.0.0-2023.01.24-000001 | 251 (0.9%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `510` **ECS compliant fields** `1204` **All fields** `1714`

### auditbeat-7.10.2-2023.01.24-000001

The `auditbeat-7.10.2-2023.01.24-000001` index has [mappings](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html) or field values that are different than the [Elastic Common Schema](https://www.elastic.co/guide/en/ecs/current/ecs-reference.html) (ECS), version `8.6.0` [definitions](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html).

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | auditbeat-7.10.2-2023.01.24-000001 | 111 (0.4%) | 12 | `hot` |

### **Incompatible fields** `12` **Custom fields** `467` **ECS compliant fields** `602` **All fields** `1081`

#### 12 incompatible fields

Fields are incompatible with ECS when index mappings, or the values of the fields in the index, don't conform to the Elastic Common Schema (ECS), version 8.6.0.

 Detection engine rules referencing these fields may not match them correctly
 Pages may not display some events or fields due to unexpected field mappings or values
 Mappings or field values that don't comply with ECS are not supported

#### Incompatible field mappings - auditbeat-7.10.2-2023.01.24-000001

| Field | ECS mapping type (expected) | Index mapping type (actual) |
|-------|-----------------------------|-----------------------------|
| error.message | `match_only_text` | `text` |
| error.stack_trace | `wildcard` | `keyword` |
| http.request.body.content | `wildcard` | `keyword` |
| http.response.body.content | `wildcard` | `keyword` |
| message | `match_only_text` | `text` |
| process.command_line | `wildcard` | `keyword` |
| process.parent.command_line | `wildcard` | `keyword` |
| registry.data.strings | `wildcard` | `keyword` |
| url.full | `wildcard` | `keyword` |
| url.original | `wildcard` | `keyword` |
| url.path | `wildcard` | `keyword` |

#### Incompatible field values - auditbeat-7.10.2-2023.01.24-000001

| Field | ECS values (expected) | Document values (actual) |
|-------|-----------------------|--------------------------|
| event.kind | `alert`, `enrichment`, `event`, `metric`, `state`, `pipeline_error`, `signal` | `error` (1) |

### .ds-auditbeat-8.5.0-2023.01.24-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-auditbeat-8.5.0-2023.01.24-000001 | 74 (0.3%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `509` **ECS compliant fields** `1210` **All fields** `1719`

### auditbeat-custom-empty-index-1

The `auditbeat-custom-empty-index-1` index has [mappings](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html) or field values that are different than the [Elastic Common Schema](https://www.elastic.co/guide/en/ecs/current/ecs-reference.html) (ECS), version `8.6.0` [definitions](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html).

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | auditbeat-custom-empty-index-1 | 0 (0.0%) | 1 | `unmanaged` |

### **Incompatible fields** `1` **Custom fields** `0` **ECS compliant fields** `0` **All fields** `0`

#### 1 incompatible field

Fields are incompatible with ECS when index mappings, or the values of the fields in the index, don't conform to the Elastic Common Schema (ECS), version 8.6.0.

 Detection engine rules referencing these fields may not match them correctly
 Pages may not display some events or fields due to unexpected field mappings or values
 Mappings or field values that don't comply with ECS are not supported

#### Incompatible field mappings - auditbeat-custom-empty-index-1

| Field | ECS mapping type (expected) | Index mapping type (actual) |
|-------|-----------------------------|-----------------------------|
| @timestamp | `date` | `-` |

## logs-*

`hot(2)`

| Incompatible fields | Indices checked | Indices | Docs |
|---------------------|-----------------|---------|------|
| 3 | 2 | 2 | 602 |

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-logs-endpoint.alerts-default-2023.01.17-000001 | 342 (56.8%) | 2 | `hot` |
|  | .ds-logs-endpoint.events.process-default-2023.01.17-000001 | 260 (43.2%) | 1 | `hot` |

### .ds-logs-endpoint.alerts-default-2023.01.17-000001

The `.ds-logs-endpoint.alerts-default-2023.01.17-000001` index has [mappings](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html) or field values that are different than the [Elastic Common Schema](https://www.elastic.co/guide/en/ecs/current/ecs-reference.html) (ECS), version `8.6.0` [definitions](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html).

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-logs-endpoint.alerts-default-2023.01.17-000001 | 342 (56.8%) | 2 | `hot` |

### **Incompatible fields** `2` **Custom fields** `857` **ECS compliant fields** `675` **All fields** `1534`

#### 2 incompatible fields

Fields are incompatible with ECS when index mappings, or the values of the fields in the index, don't conform to the Elastic Common Schema (ECS), version 8.6.0.

 Detection engine rules referencing these fields may not match them correctly
 Pages may not display some events or fields due to unexpected field mappings or values
 Mappings or field values that don't comply with ECS are not supported

#### Incompatible field mappings - .ds-logs-endpoint.alerts-default-2023.01.17-000001

| Field | ECS mapping type (expected) | Index mapping type (actual) |
|-------|-----------------------------|-----------------------------|
| process.env_vars | `keyword` | `object` |

#### Incompatible field values - .ds-logs-endpoint.alerts-default-2023.01.17-000001

| Field | ECS values (expected) | Document values (actual) |
|-------|-----------------------|--------------------------|
| event.category | `authentication`, `configuration`, `database`, `driver`, `email`, `file`, `host`, `iam`, `intrusion_detection`, `malware`, `network`, `package`, `process`, `registry`, `session`, `threat`, `vulnerability`, `web` | `behavior` (45) |

### .ds-logs-endpoint.events.process-default-2023.01.17-000001

The `.ds-logs-endpoint.events.process-default-2023.01.17-000001` index has [mappings](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html) or field values that are different than the [Elastic Common Schema](https://www.elastic.co/guide/en/ecs/current/ecs-reference.html) (ECS), version `8.6.0` [definitions](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html).

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-logs-endpoint.events.process-default-2023.01.17-000001 | 260 (43.2%) | 1 | `hot` |

### **Incompatible fields** `1` **Custom fields** `130` **ECS compliant fields** `304` **All fields** `435`

#### 1 incompatible field

Fields are incompatible with ECS when index mappings, or the values of the fields in the index, don't conform to the Elastic Common Schema (ECS), version 8.6.0.

 Detection engine rules referencing these fields may not match them correctly
 Pages may not display some events or fields due to unexpected field mappings or values
 Mappings or field values that don't comply with ECS are not supported

#### Incompatible field mappings - .ds-logs-endpoint.events.process-default-2023.01.17-000001

| Field | ECS mapping type (expected) | Index mapping type (actual) |
|-------|-----------------------------|-----------------------------|
| process.env_vars | `keyword` | `object` |

## packetbeat-*

`hot(2)`

| Incompatible fields | Indices checked | Indices | Docs |
|---------------------|-----------------|---------|------|
| 0 | 2 | 2 | 1,372,893 |

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-packetbeat-8.6.0-2023.01.17-000001 | 704,062 (51.3%) | 0 | `hot` |
|  | .ds-packetbeat-8.4.1-2023.01.24-000001 | 668,831 (48.7%) | 0 | `hot` |

### .ds-packetbeat-8.6.0-2023.01.17-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-packetbeat-8.6.0-2023.01.17-000001 | 704,062 (51.3%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `604` **ECS compliant fields** `1209` **All fields** `1813`

### .ds-packetbeat-8.4.1-2023.01.24-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-packetbeat-8.4.1-2023.01.24-000001 | 668,831 (48.7%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `604` **ECS compliant fields** `1209` **All fields** `1813`

## Errors

Some indices were not checked for Data Quality

Errors may occur when pattern or index metadata is temporarily unavailable, or because you don't have the privileges required for access

The following privileges are required to check an index:
- `monitor` or `manage`
- `view_index_metadata`
- `read` or `read_cross_cluster`


| Pattern | Index | Error | 
|---------|-------|-------|
| .alerts-security.alerts-default | -- | `Error loading stats: Error: Forbidden` |
| auditbeat-* | -- | `Error loading stats: Error: Forbidden` |
| logs-* | -- | `Error loading stats: Error: Forbidden` |
| packetbeat-* | -- | `Error loading stats: Error: Forbidden` |

See also: https://github.com/elastic/security-team/issues/4559
2023-02-06 21:10:43 -07:00
Sergi Massaneda
bca73b72ed
[Security Solution] [CellActions] Move to a package (#149057)
Epic: https://github.com/elastic/kibana/issues/144943

## Summary

Moving the existing CellActions implementation to a new home. The
`kbn-cell-actions` package contains components and hooks that are going
to be used by solutions to show data cell actions with a consistent UI
across them.

Security Solution is going to start using it by migrating all
"hover-actions" to the unified implementation, but the usage is not
restricted to it. Any plugin can register and attach its own actions to
a trigger via uiActions, and use this package to render the CellActions
components in a consistent way.

The initial implementation was placed in the uiActions plugin itself due
to a types constraints
(https://github.com/elastic/kibana/tree/main/src/plugins/ui_actions/public/cell_actions),
the constraint has been solved so we are creating the package for it as
planned.

This PR only moves that implementation to the new package, with small
directory changes. The exported components are not being used anywhere
currently, so the implementation may change during the migration phase.

### 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]
[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>
2023-01-19 11:52:10 +01:00
Anton Dosov
74ab0759f1
Image Embeddable (#146421)
close https://github.com/elastic/kibana/issues/81345

Adds an image embeddable - a new embeddable type that allows to
insert images into dashboard using the new file service
2022-12-19 14:50:29 +01:00
Jean-Louis Leysens
a166fba83d
[Files] Files management (#144425)
## Summary

Files management UI that rounds out the files MVP. This is UI is
intended to be progressively enhanced and provides a way for system
administrators get some insight and manage the files created and stored
in Kibana.

## To reviewers

* This is UI for retrieval and deletion of files (the R+D of CRUD)
* Creating and deleting tags to be supported in a future version
* This UI is intended to form part of the broader content management
experience
* We use the `TableListView` component as far as possible

## How to test

1. Start Kibana with `yarn start --run-examples`
2. Go to the "Developer Examples" from the left nav menu
3. Go to the "Files example" plugin
4. Click the "Upload file" button, upload a few different image types
(PNG, JPG and WEBP)
5. Go to "Stack management" > "Files"
6. Behold your files in the management UI
7. (Bonus) check that the UI and API `GET /api/files/find`, `GET
/api/files/metrics` and `DELETE /api/files/blobs` are not accessible to
non-admin or appropriately privileged users (i.e., those with "Files
management" access).

## List of functionality

 - [x] List all saved objects (scoped to admin)
 - [x] Is able to bulk-delete files
 - [x] Shows basic storage diagnostics
 - [x] Is able to search and filter files

## Screenshots

<details>
<summary>screenshots</summary>

<img width="1545" alt="Screenshot 2022-11-08 at 13 56 54"
src="https://user-images.githubusercontent.com/8155004/200570783-cfefdbf3-c5ff-4ece-ba24-48a455fcca75.png">

<img width="910" alt="Screenshot 2022-11-10 at 12 52 35"
src="https://user-images.githubusercontent.com/8155004/201083812-bc9f25f5-b423-43a6-9229-5e2a4cdd943a.png">

<img width="451" alt="Screenshot 2022-11-10 at 12 37 07"
src="https://user-images.githubusercontent.com/8155004/201081039-832a1980-684c-4abb-bb05-0c7c6a849d4d.png">

<img width="959" alt="Screenshot 2022-11-08 at 13 57 15"
src="https://user-images.githubusercontent.com/8155004/200570797-f122cff5-7043-4e01-9b51-d5663c1b26d6.png">

<img width="500" alt="Screenshot 2022-11-08 at 13 57 38"
src="https://user-images.githubusercontent.com/8155004/200570801-35cdbd99-0256-4dee-9f78-2f6ad853305f.png">

</details>

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-11-17 05:53:31 -07:00
Jean-Louis Leysens
1ed2ec8e57
[Files] move to src (#144044) 2022-10-31 06:46:52 -07:00
Yulia Čech
9c0dd18577
[Guided onboarding] Landing page updates (#143194)
* [Guided onboarding] Updated landing page

* [Guided onboarding] Finished landing page changes

* [Guided onboarding] Fixed card for completed guides

* [Guided onboarding] Fixed types errors

* [Guided onboarding] Fixed i18n issues

* Update src/plugins/home/public/application/components/guided_onboarding/use_case_card.tsx

Co-authored-by: Cindy Chang  <cindyisachang@gmail.com>

* Update src/plugins/home/public/application/components/guided_onboarding/use_case_card.tsx

Co-authored-by: Cindy Chang  <cindyisachang@gmail.com>

* Update src/plugins/home/public/application/components/guided_onboarding/use_case_card.tsx

Co-authored-by: Cindy Chang  <cindyisachang@gmail.com>

* [Guided onboarding] Added CR comments

* [Guided onboarding] Added view guide button to the completed guide

* [Guided onboarding] Fixed the typo in kibana services

* [Guided onboarding] Started moving the components out of home plugin into the guided onboarding package

* [Guided onboarding] Fix the imports in the plugin

* [Guided onboarding] Fix the tests in the new package

* [CI] Auto-commit changed files from 'node scripts/generate codeowners'

* [Guided onboarding] Fix the package file and the yarn.lock file

* [Guided onboarding] Fix the build

* [Guided onboarding] More refactoring

* [Guided onboarding] More refactoring

* [Guided onboarding] More refactoring

* [Guided onboarding] More refactoring of types

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* [Guided onboarding] More refactoring of types

* [Guided onboarding] Fix the types issues

* [Guided onboarding] Update the tests for the api

* [Guided onboarding] Fixed the i18n errors

* [Guided onboarding] Fixed the i18n errors

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* [Guided onboarding] Fixed the jest tests

* [Guided onboarding] Home changes

* Update packages/kbn-guided-onboarding/src/components/landing_page/observability_link_card.tsx

Co-authored-by: Kelly Murphy <kelly.murphy@elastic.co>

* [Guided onboarding] Address copy feedback

* [Guided onboarding] Address CR feedback

Co-authored-by: Cindy Chang  <cindyisachang@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Kelly Murphy <kelly.murphy@elastic.co>
2022-10-20 11:36:04 +02:00
Stratoula Kalafateli
9656163820
Language documentation popover package (#143429)
* Language documentation popover package

* Add readme

* [CI] Auto-commit changed files from 'node scripts/generate packages_build_manifest'

* [CI] Auto-commit changed files from 'node scripts/generate codeowners'

* Move the entire popover into the package, add stories

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-10-19 08:53:50 +03:00
Davis McPhee
39d193444f
[Discover] Create unified histogram plugin (#141872)
* [Discover] Create unifiedHistogram plugin

* [Discover] Move discover resizable panels to unifiedHistogram

* [Discover] Replace DiscoverPanels with unifiedHistogram Panels

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* [Discover] Fix types and limtis.yml for unifiedHistogram

* [Discover] Begin migrating layout and chart to unified_histogram

* [Discover] Update i18n keys from discover to unifiedHistogram

* [Discover] Update data-test-subj tags from discover to unifiedHistogram

* [Discover] Update classNames, ids, and scss to change discover to unifiedHistogram

* [Discover] Remove more references to discover from unifiedHistogram

* [Discover] Replace DiscoverServices with UnifiedHistogramServices

* [Discover] Replacing CHART_HIDDEN_KEY with chartHiddenKey prop

* [Discover] Add missing tsconfig references

* [Discover] Remove remaining references to discover from unifiedHistogram

* [Discover] Migrate HitsCounter to unifiedHistogram

* [Discover] Continue removing discover dependencies from unifiedHistogram

* [Discover] Replace SCSS with emotion

* [Discover] Changing PANELS_MODE to be internal

* [Discover] Clean up types

* [Discover] Clean up props and types

* [Discover] Update layout to use Chart component

* [Discover] Update discover_main_content

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* [Discover] Update discover_main_content to use UnifiedHistogramLayout, clean up unifiedHistogram implementation and props, add missing bundles

* [Discover] Fix missing styles in unifiedHistogram

* [Discover] Fix issue where mouse can get out of sync with the resize handle with the Discover resizable layout

* [Discover] Fix some Jest tests

* [Discover] Update discoverQueryHits to unifiedHistogramQueryHits in tests

* [Discover] Finish decoupling discover_main_content from unified histogram layout

* [Discover] Create useDiscoverHistogram hook and remove old histogram dependencies from Discover

* [Discover] Move functions to create chart data from discover to unifiedHistogram

* [Discover] Continue fixing broken Jest tests

* Revert unifiedHistogram.reloadSavedSearchButton removal

* [Discover] Add missing type export and a better suspense fallback

* [Discover] Make callback names consistent

* [Discover] Continue cleanup and add documentation to unifiedHistogram

* [Discover] Update genChartAggConfigs to take object

* [Discover] Update UnifiedHistogramHitsContext.number to total

* [Discover] Cleanup imports

* [Discover] Add support for hiding the entire top panel in the unified histogram by leaving all context props undefined

* [Discover] Fix broken discover_layout unit tests

* [Discover] Clean up naming in discover_main_content

* [Discover] Continue fixing Jest tests and adding new tests

* [Discover] Finish writing Jest tests

* [Discover] Fix conflicts with getVisualizeInformation and triggerVisualizeActions after merge

* [Discover] Fix hiding reset chart height button when default chart height

* [Discover] Update CODEOWNER file

* [Discover] Removed types for @link comments

* [Discover] Fix broken discover_layout.test.tsx file

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-10-17 18:12:50 -03:00
Christos Nasikas
358979deca
[Cases] Cases component package (#143011)
* Export status component from package

* Rename component

* Fix e2e tests

* Fix e2e tests

* Improve translations

* Improve README

* [CI] Auto-commit changed files from 'node scripts/generate codeowners'

* Fix i18n

Fix i18n

* Improvements

* Fix test

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-10-12 20:48:24 +03:00
Wafaa Nasr
77867e162f
Exceptions List component (#140985)
* add components with a draft exception-list-details to test

* fix jest config in xPack=> security=> Public

* fix tests

* fix header test and use RTL

* covert meta test to use RTL and header

* fix utlity messageid

* fix messageid in utilty

* create osCondition, entryContent and entryContent.helper from Conditions.tsx

* comment test until fixing all

* create package with first components + test + jest config

* add constants for url

* [CI] Auto-commit changed files from 'node scripts/generate codeowners'

* disable tests until finishing moving rest of components or fix it+ add securityLinkAnchorComponent temp;

* add exceptionList-components +fixning build issues

* add exceptionList-components +fixning build issues

* fix translations id + pass comments as props

* move utiitly out of package until moving all + fixing css

* copy non-js/ts files through babel

* remove list-details-components

* apply comments

* apply comments in references

* fix meta tests

* update tests + add some descriptions

* fix camelcase file name in  Readme

* fix camelcase file name in  Readme

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: spalger <spencer@elastic.co>
2022-09-28 20:36:05 +02:00
Sébastien Loix
189196181c
[Table list view] Improve UX (phase 1) (#135892) 2022-09-19 12:29:23 +02:00
Yulia Čech
95086f4365
[Onboarding] Create guided_onboarding plugin (#138611)
* [Guided onboarding] Smashed commit of all POC work for guided onboarding and guided onboarding example plugins

* [Guided onboarding] Fixed type errors

* [Guided onboarding] Removed guidedOnboardingExample limit

* [Guided onboarding] Fixed a functonal test for exposed configs

* [Guided onboarding] Fixed plugin limit

* [Guided onboarding] Added more information to the example plugin

* [Guided onboarding] Fixed no-console error

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* [Guided onboarding] Fixed snake case errors

* move guided_onboarding out of x-pack

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alison.goryachev@elastic.co>
2022-09-15 11:35:35 +02:00
Davis McPhee
cb0a8057c8
[Discover] Enable tags for saved searches (#136162)
* [Discover] Add initial support for tags to saved search modal

* [Discover] Add tags to savedSearch types

* [Discover] Finish initial support for adding tags to saved searches

* [Discover] Start to convert saved object finder to a table in order to support tags

* [Discover] Add support for displaying saved search tags in open search flyout

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* [Discover] Continue support for tags in saved object finder

* [Discover] Clean up saved object finder

* [Discover] Finish initial support for tags in saved object finder

* [Discover] Update SimpleSavedObject constructor to SimpleSavedObjectImpl

* [Discover] Remove orig files

* [Discover] Saved search tag type registration and telemetry

* [Discover] Create new saved_objects_finder plugin

* [Discover] Continue work creating saved_objects_finder plugin

* [Discover] Revert some changes in saved_objects

* [Discover] Revert some changes in saved_objects again

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* [Discover] Update saved_objects_finder i18n keys

* [Discover] Update docs

* [Discover] Add plugins to saved_object_finder and fix broken types

* [Discover] Finish creating saved_objects_finder plugin and use it in Discover

* [Discover] Update SavedObjectFinderProps type export, and update x-pack telemetry

* [Discover] Fix broken jest tests

* [Discover] Update saved_objects_finder API

* [Discover] Remove unused translations

* [Discover] Fix issue with initial saved object finder fetch

* [Discover] Fix some of the saved object finder jest tests

* [Discover] Clean up finder after merge

* [Discover] Fixing saved_object_finder.tsx

* [Discover] Add savedObjectsTaggingOss reference to saved_search plugin

* [Discover] Fix broken open_search_panel test

* [Discover] Removed allowed types from saved object finder

* [Discover] Removing type column when there's only one saved object type, and adjusting column widths

* [Discover] Fix issue where visible types were entirely removed, fixed pageSizeOptions

* [Discover] Add showFilter to open_search_panel's saved_objects_finder, fallback to all available types when no type filter is applied to saved_objects_finder, hide type column and filter button when there is only one type in metadata list

* [Discover] Fix remaining saved_object_finder Jest tests

* [Discover] Update snapshot

* [Discover] Fix failing functional tests

* [Discover] Add tagging Jest tests for saved_objects_finder

* [Discover] Fix small bugs in saved_object_finder, update Jest tests, add functional tests for Discover saved search tagging

* [Discover] Removed unused variable in functional test

* [Discover] Update Discover Jest tests with tagging tests

* [Discover] Remove translations

* [Discover] Updating saved_objects_finder to use static export vs preconfigured component, adding lazy load support

* [Discover] Move saved_object_finder service deps to a 'services' prop, fix broken open_search_panel Jest test

* [Discover] Fix broken Jest test

* [Discover] Fix broken Jest test from merge

* [Discover] Fix discover tags integration test description

* - Updated tags prop to be `string | undefined`
- Type imports cleanup
- Added loading indicator for saved object finder
- Changed `savedObjectsPlugin.settings.getListingLimit()` to `uiSettings.get(LISTING_LIMIT_SETTING)`
- Removed old saved object finder comment
- Removed tag changes from transform plugin
- Change code owners of saved_objects_finder to Data Discovery

* [Discover] Fixed LISTING_LIMIT_SETTING import

* [Discover] Revert tags saving change that introduced a bug

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* [Discover] Try again to fix LISTING_LIMIT_SETTINGS import

* [Discover] Fix failing snapshot

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-09-01 13:14:13 -03:00
Julia Rechkunova
47b69298a5
[UnifiedFieldList] Move Field Stats from Lens to UnifiedFieldList plugin (#136328)
* [UnifiedFieldList] Bootstrap a new unifiedFieldList plugin

* [UnifiedFieldList] Move backend API for field stats from Lens to UnifiedFieldList plugin

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* [Discover] Address CI checks

* [UnifiedFieldList] Move field stats UI from Lens to UnifiedFieldList plugin

* [Discover] Integrate FieldStats into Discover field popover

* [Discover] Show both views side to side

* [Discover] Allow for some customization

* [Discover] Allow for more customization

* [UnifiedFieldList] Remove temporary code

* [UnifiedFieldList] Extract styles

* [UnifiedFieldList] Fix after merge

* [UnifiedFieldList] Extend i18n

* [UnifiedFieldList] Migrate stats API from server to public

* [UnifiedFieldList] Update types

* [UnifiedFieldList] Update Lens tests

* [UnifiedFieldList] Update Lens tests

* [UnifiedFieldList] Before merging

* [UnifiedFieldList] After merging

* [UnifiedFieldList] Refactor localization keys

* [UnifiedFieldList] Update types

* [UnifiedFieldList] Reintroduce server API for field stats and refactor integration tests

* [UnifiedFieldList] Update limits

* [UnifiedFieldList] Rename the component

* [UnifiedFieldList] Improve types

* [UnifiedFieldList] Add AbortController

* [UnifiedFieldList] Render counts in PopoverFooter in Lens

* [UnifiedFieldList] Hide new stats from Discover for now

* [UnifiedFieldList] Fix tests

* [UnifiedFieldList] Rename to loadFieldStats

* [UnifiedFieldList] Rearrange utils

* [UnifiedFieldList] Fix types

* [UnifiedFieldList] Fix references

* [UnifiedFieldList] Use emotion css

* [UnifiedFieldList] Increase limits

* [UnifiedFieldList] Add first tests

* [UnifiedFieldList] Add more tests

* [UnifiedFieldList] Refactor interface to accept services object

* [UnifiedFieldList] Update types

* [UnifiedFieldList] Add docs

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* [UnifiedFieldList] Add missing references

* [UnifiedFieldList] Tmp

* [UnifiedFieldList] Revert changes from Discover for now

* [Discover] Add again new translation keys

* [UnifiedFieldList] Remove old translation keys

* [UnifiedFieldList] Update tests

* [UnifiedFieldList] Update data test subj prop

* Update src/plugins/unified_field_list/public/services/field_stats.ts

Co-authored-by: Davis McPhee <davismcphee@hotmail.com>

* [UnifiedFieldList] Lazy load FieldStats component

* [UnifiedFieldList] Lazy load loadFieldStats function

* [UnifiedFieldList] Fix tests

* [UnifiedFieldList] Remove newly added translations

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Davis McPhee <davismcphee@hotmail.com>
2022-08-23 10:08:37 +02:00
Clint Andrew Hall
0fbd0afdb1
[Shared UX] Complete package migration; delete plugin (#138962)
* [Shared UX] Complete package migration; delete plugin

* [CI] Auto-commit changed files from 'node scripts/generate packages_build_manifest'

* Fix types, fix tests

* Create Storybook config package; organize Storybook

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* Revise Storybook config package; make mock packages compatible with web

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-08-18 13:00:03 -05:00
Joe Reuter
fcf3b8bb21
[Discover] Split saved searches out of discover plugin (#138388) 2022-08-12 11:19:40 +02:00
Thom Heymann
a0731f139e
Add user profile selectable (#137424)
* Add reusable user profile selector component

* Move to package and add examples

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Add server side example

* CI Fixes

* fix tests

* Addd tests

* Addressed suggestions from code review

* Fix types

* Updated user avatar component

* Tweak styling and copy

* Add missing jsdoc comments

* .

* .

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-08-04 22:09:01 +01:00
Christiane (Tina) Heiligers
318530ef54
Migrates core's client-side deprecations service to packages (#136164)
* Creates packages for shared types: core-deprecations-common and core-deprecations-common-internal, moves types accordingly, updates src/core/public|server imports

* Moves more internal types to package

* Changes widely used internal deprecations-related types to public types, moves these to publically accessible packages

* Updates import, updates bazel build file

* Creates package core-deprecations-browser-internal and moves implementation and tests into package

* Updates imports of public deprecations implementations

* Creates package core-deprecations-browser-mocks, moves mock and deletes core-deprecations-common-internal

* Updates types in src/core

* Updates README's and build bazel files for core's client-side deprecations service

* Updates imports

* exports shared DeprecationsDetails from core/server

* Adds deprecations to i18n rc

* replace targetted core packages with top level packages for core in i18nrc file, cleans up tsconfig and bazel build files, addresses prefered style in core
2022-07-13 15:58:41 -07:00
Andrew Tate
3891aeb95f
[Chart expressions] new metric vis expression (#135461) 2022-07-08 12:07:43 -05:00
Clint Andrew Hall
e564f1f5bc
[home] Create Sample Data Card package (#135472)
* [home] Create Sample Data Card package

* Fix issues found in CI

* Update packages/home/sample_data_cards/src/sample_data_card.component.tsx

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Update packages/home/sample_data_cards/src/footer/remove_footer.tsx

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Addressing review feedback

* Fix i18n, reduce dependencies

* Update docs and snaps; add tests

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
2022-06-30 15:53:08 -05:00
Christiane (Tina) Heiligers
f68999d631
Create packages for browser-side fatalErrors service (#134962) 2022-06-23 12:29:44 -07:00
Ahmad Bamieh
97fb9bbfae
core i18n browser (#134828)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-06-22 15:35:26 +03:00
Vadim Kibana
1b2c58f58e
ui_actions_enchanced to /src (#133512)
* move ui_actions_enhanced to /src

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* move translations to /src

* fix typescript errors

* update config files

* update ts configs

* fix config path

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-06-07 18:33:21 +02:00
Clint Andrew Hall
e47bf4b205
[Shared UX] Adopt multi-package strategy - ExitFullScreenButton (#130355)
* [Shared UX] Adopt multi-package strategy - ExitFullScreenButton

* Fixing checks errors

* Fix i18n

* Remove SharedUX deps from Maps

Co-authored-by: Spencer <spencer@elastic.co>
2022-04-15 19:12:46 -05:00
Alexey Antonov
ac50a30eb6
[Step 1] Move CustomizablePalette from Lens into @kbn/coloring package (#129291)
* [Step 1] Move Coloring into Shared-ux-Components

* Fix Joe's comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-04-07 14:49:36 +05:00
Nodir Latipov
3e2761d981
[Unified search] Create unified search plugin (#127651)
* [Unified search] Create unified search plugin

* add unified_search into USES_STYLED_COMPONENTS

* fix JEST group 4

* update limits for data plugin

* fix: remove unifiedSearch plugin from x-pack/plugins/file_upload

* feat: updated .github/CODEOWNERS and set @elastic/kibana-app-services as a code owner

* apply PR comments

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* feat: moved filter bar, apply filters folders and apply filter action from Data plugin to unified search plugin

* fix Checks

* fix Checks

* fix Linting and Default CI Group #16

* fix Checks

* fix Checks

* fix Linting (with types)

* fix show FILTER_BAR

* fix Jest Tests

* feat replece indexPatternsContranct in setIndexPatterns to DataViewsContract

* feat: removed unnecessary interface in unified search

* fix Checks

* fix Checks

* fix Jest Tests, Checks

* fix Checks

* resolve comments

Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-04-05 12:23:31 +05:00
Yaroslav Kuznietsov
072fe63c0b
[XY] Expression chart. (#127150)
* added xy plugin.

* Added expressionXY limits.

* Added xy expression functions to the expression_xy plugin.

* Moved xy to a separate plugin.

* Fixed bugs, caused by the refactoring process.

* Fixed lens snapshots.

* Removed new line.

* Fixed xy_chart tests.

* Added lazy loading for xy chart.

* Fixed xy chart test.

* Fixed broken chart selectors.

* Fixed dashboard tests.

* dashboard test fixed.

* Fixed heatmap vis.

* Smokescreen test fixed.

* more fixes.

* async dashboard tests fixed.

* Fixed xy smokescreen tests selectors.

* fixed show_underlying_data tests.

* Updated snapshots.

* updated limits.

* Fixed more selectors

* Fixed persistent context test.

* Fixed some more test at ml.

* Fixed types and imports

* Fixed handlers.inspectorAdapters.tables.logDatatable

* Fixed logDatatable

* Translations fixed.

* Fixed "Visualize App ... cleans filters and query" test.

* Fixed "lens disable auto-apply tests" test.

* Updated dashboard tests.

* Fixed translations.

* Expression tests fixed.

* Cleaned up expression_xy.

* cleaned up lens xy_visualization.

* Moved XY state types to lens.

* Update src/plugins/chart_expressions/expression_xy/README.md

Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* Removed yConfig from *Layers types

* Removed not used utils and styles.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>
2022-03-28 18:17:36 +03:00
Marta Bondyra
2f9e6eeacf
[Lens] Manual Annotations (#126456)
* Add event annotation service structure

* adding annotation layer to lens. passing event annotation service

* simplify initial Dimensions

* add annotations to lens

* no datasource layer

* group the annotations into numerical icons

* color icons in tooltip, add the annotation icon, fix date interval bug

* display old time axis for annotations

* error in annotation dimension when date histogram is removed

* refactor: use the same methods for annotations and reference lines

* wip

* only check activeData for dataLayers

* added new icons for annotations

* refactor icons

* uniqueLabels

* unique Labels

* diff config from args

* change timestamp format

* added expression event_annotation_group

* names refactor

* ea service adding help descriptions

* rotate icon

* added tests

* fix button problem

* dnd problem

* dnd fix

* tests for dimension trigger

* tests for unique labels

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* type

* add new button test

* remove noDatasource from config (only needed when initializing a layer or dimension in getSupportedLayers)

* addressing Joe's and Michael comments

* remove hexagon and square, address Stratoula's feedback

* stroke for icons & icon fill

* fix tests

* fix small things

* align the set with tsvb

* align IconSelect

* fix i18nrc

* Update src/plugins/event_annotation/public/event_annotation_service/index.tsx

Co-authored-by: Alexey Antonov <alexwizp@gmail.com>

* refactor empty button

* CR

* date cr

* remove DimensionEditorSection

* change to emptyShade for traingle fill

* Update x-pack/plugins/lens/public/app_plugin/app.scss

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
2022-03-23 22:16:50 +01:00
Clint Andrew Hall
71af73c18b
[sharedUX] Move to Package-based Architecture (#127546)
* [shared-ux][packages] 1. Create Services Package

* Address review feedback

* [shared-ux][packages] 2. Create Storybook Package (#127548)

* [shared-ux][packages] 2. Create Storybook Package

* [shared-ux][packages] 3. Create Utility Package (#127549)

* [shared-ux][packages] 3. Create Utility Package

* [shared-ux][packages] 4. Create Components Package (#127551)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* Merging

* Adding docs

* A few fixes

* Fix TS types

* Fix TS types

* Fix i18n

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-03-16 17:13:58 -04:00
Yaroslav Kuznietsov
2b6885a74c
[Gauge] Vis Type (#126048)
* Added transparent background

* Added gauge/goal visType.

* Fixed palette, scale, and types.

* Set legacy chart as default.

* Removed deprecation message.

* Added percent format params, coming from visdimensions.

* Added support of labels/sublabels.

* Updated i18n label.

* Added support of showElasticChartsOptions

* Added autoextend ranges elastic charts tooltip.

* The outline elastic-charts message added.

* outline renaming and metric/buckets limitations

* reverted mistaken change of sample_vis.test.mocks.

* Warning message added to gauge split chart.

* Added warning message to the splitChart button at goal/gauge.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-03-04 11:06:06 +02:00
Ashokaditya
9d53810791
[Security Solution][Endpoint] Adds matches wildcard operator for file.path.text field for Event Filters (#125202)
* labels for wildcard path entries

fixes elastic/security-team/issues/2525

* consistent naming and add missing tests

refs elastic/kibana/pull/120679

* add autocompletion for wildcard

fixes elastic/security-team/issues/2525

* ensure event filter artifacts have correct wildcard type for process.name entry

fixes elastic/security-team/issues/2525
fixes elastic/security-team/issues/2723

* set warning for input values

fixes elastic/security-team/issues/2525

* lift path validations to packages

fixes elastic/security-team/issues/2525

* Add more tests

fixes elastic/security-team/issues/2525

* Add wildcards to event filter generator

* fix merge i18n check

* Remove not match/excluded operator for now

review changes

* add mixed entries for wildcard

review changes

* comparison typo

refs 06c868b6d1

* fix vulnerable regex

review changes

* ignore empty space on input

review changes

* update component

review changes

* use const enum

review changes

* update type imports to use ConditionEntryField, OperatingSystem, TrustedAppEntryTypes
2022-03-02 11:55:58 -07:00
Yaroslav Kuznietsov
d9aa72c7f8
[PieVis] Lens adaptation. (#122420)
* Added config for mosaic/pie/donut/treemap/waffle.

* Added sortPredicate functionality for waffle/mosaic/treemap/pie/donut

* Added Donut handling.

* Refactored get_color.

* Merged color computation for lens and vis_types.

* Added isFlatLegend support.

* Added showValuesInLegend for waffle and fixed tests.

* Removed not used position, which is equivalent to labels.show = false.

* legendDisplay added.

* Added migrations for pieVis addLegend argument.

* Added startFromSecondLargestSlice and support of correct formatters.

* Updated docs.

* Added functionality for truncate.

* Added unit tests for pie and partial for donut/waffle.

* Addressed issue with label truncation by default.

* Addressed issue with formatters.

* Added tests for accessor.test.ts

* Added support of formatter by meta data from columns at splitChartAccessors.

* Added tests for filterOutConfig.

* Added tests for getFormatters.

* Added tests for getAvailableFormatter.

* Added tests for getFormatter.

* Added tests for get_split_dimension_accessor.

* Add is legend scenario.

* Added tests for legend.

* Replaced sortPredicate, relying on the internal terms params, with the mosaic one.

* Fixed pie snapshot and added new snapshot for treemap.

* Added snapshots for mosaicVis.

* Added snapshot to waffleVis.

* Updated unit tests for *_vis_function's.

* Added storybook.

* Added snapshots for partition vis component.

* Added expression error on providing both, splitColumn && splitRow.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-04 20:14:34 +02:00
Tiago Costa
356861d23b
chore(NA): splits types from code on @kbn/ui-shared-deps-src (#123313)
* chore(NA): splits types from code on @kbn/ui-shared-deps-src

* chore(NA): break flot-charts into another package

* chore(NA): skip failing tests

* chore(NA): remove skip and add correct value

* chore(NA): fix new ui-theme import

* chore(NA): adding fleet cloned test

* chore(NA): remove cloned test

* chore(NA): remove added typo
2022-01-20 22:04:19 +00:00
Diana Derevyankina
a9ec1be357
Combine visualizations and visualize plugins (#121550)
* [WIP] Combine visualizations and visualize plugins

* Revert some changes and do some refactoring

* Refactor some code

* Fix some tests

* Fix functional tests and some jest test cases

* Update telemetry

* Fix get_visualization_instance.test and plugin-list.asciidoc

* Refactor some code

* fix CI

* Add visualizations to vis_default_editor tsconfig

* Revert changes related to telemetry and permissions

* Add dashboard to timeseries tsconfig.json

* Update limits file

* Update translation keys

* Add capabilitiesProvider back to server and replace visEditorsRegistry getter and setter with service

* Update mocks.ts

* Revert changes related to visEditorsRegistry

* Get rid of visEditorsRegistry getter and setter

* Remove dashboard from timeseries/tsconfig.json

* Return back dashboard dependency to timeseries/tsconfig.json, rename applicaion folder to visualize_app and APP_NAME to VISUALIZE_APP_NAME, revert types.ts

* Remove comma in .i18nrc.json

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
2022-01-12 16:49:22 +03:00
Clint Andrew Hall
83621d6100
[shared-ux] Create Shared UX Plugin (#122373)
* [shared-ux] Create Shared UX Plugin

* Rename nav-shared-ux.docnav.json to nav_shared_ux.docnav.json

* Fix a few issues

* fix limits.yml
2022-01-06 14:28:20 -07:00
Devon Thomson
825ea5b919
[Controls] Move Controls To Their Own Plugin (#121668)
* Moved controls out of Presentation Util and into their own plugin
2022-01-06 13:33:52 -05:00
Yaroslav Kuznietsov
6046f4633b
[PieVis] Chart expressions pie. (#121612)
* Moved pie_vis to the other.

* Removed not used types.

* Changed docs.

* Fixed labels.

* Fixed more translation labels.

* Changed types of buildExpressionFunction.

* Added limits and extraPublicDir.

* Fixed i18n checks.

* Fixed translations checks.

* Added codeowners to expression_pie.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-04 18:01:04 +02:00
Marta Bondyra
4dc3643ee3
[Lens] move gauge to chart expression plugin (#120623)
* gauge_expression

* fix

* CI fix

* make plugin required to use its methods

* move non-types from types

* share icon

* bundle, plugin

* load gaugeComponent async

* fix types

* async heatmap

* don't use d3

* optimizations

* feedback

* types

* adjusting the tests to the new max

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-12-15 09:15:41 +01:00
Stratoula Kalafateli
fea4d2acfb
[Visualize] New heatmap implementation with elastic-charts (#118338)
* [WIP][Heatmap] Creates implementation with elastic-charts

* Fix types and connection with vislib

* Add coloring options

* Brush, click events, coloring etc

* Cleaning up the expression function

* Add legend picker, fix sorting and other fixes

* Further fixes

* Use the shared expression to Lens and cleanup

* PrepareLogTables for new expression function

* Use common renderer and expression function with lens

* Fix i18n

* Small tweaks

* Add unit tests

* Adds a unit test to the heatmap component

* update plugin list

* Fix types

* Fix types

* update limits

* Change to the expression function

* Cleanup translations

* Refactor to use vis

* Fix types

* further cleanup of the translations

* register new setting

* Fix sorting for histogram

* Adds functional tests for the new nisualize heatmap

* Cleanup

* Fix

* Apply PR comments

* Address PR comments

* Fix i18n

* Fix i18n

* Makes the <Heatmap /> id dynamic

* reverse

* fix translation file

* Apply design PR comments

* Fix package

* More fixes

* Fix brush problem

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-30 19:40:02 +02:00
Stratoula Kalafateli
cccc54fd6d
Removes the kibana_legacy plugin (#118672)
* Removes kibana_legacy plugin

* Update translations

* Move functions to canvas and monitpring plugins

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-24 10:33:04 +02:00
Matthew Kime
67ebc5df26
rename index pattern editor to data view editor (#119264)
* rename index pattern editor to data view editor
2021-11-23 07:10:23 -06:00
Matthew Kime
25ddd37cba
rename index pattern management to data view management (#119260)
* rename index pattern management to data view management
2021-11-22 10:56:32 -06:00
Matthew Kime
124a3d9db7
IndexPatternFieldEditor => DataViewFieldEditor (#119261)
* rename indexPatternFieldEditor
2021-11-22 09:12:33 -06:00
Yaroslav Kuznietsov
2498b6212c
[MetricVis] Move the expression function and renderer to a separate plugin. (#113427)
* Added expressionMetricVis plugin.

* splitted metric vis_type and expression.

* Fixed check errors.

* Fixed plugin docs.

* updated snapshots.

* Added code owner to expressionMetricVis.

* updated chart docs.

* Changed the `Metric` type export.

* Added storybook.

* Added bucket story.

* Added without label story.

* Added "with custom font size" story.

* Added other stories.

* Added DatatableColumn accessors.

* Replaced Metric with MetricOptions.

* Fixed MetricOptions.any

* updated the check of min/max existence.

* Updated function/renderer names.

metricRenderer -> metricVisRenderer
metricFunction -> metricVisFunction

* updated snapshot.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-08 08:42:44 +03:00
Joe Portner
64f37e7414
Remove securityOss plugin (#113946) 2021-10-07 17:57:37 +02:00