Commit graph

27354 commits

Author SHA1 Message Date
Bena Kansara
74a2b37631
Adds list of containers in context variable of Inventory rule (#144526)
## Summary

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

When Inventory rule is created for `Kubernetes Pods` as node type, the
`context.container` will contain an array of containers. For other node
types, the `context.container` will contain single container
information. This is to cover the use case where Kubernetes pod has more
than one container.

## Manual testing

### 1. Create rule for `Kubernetes Pods`
- Create Inventory rule for `Kubernetes Pods`
- Select a connector to schedule action
- Add `{{context}}` in the action template
- Wait for alerts to be generated
- Observe `context.container` lists all containers

<img width="803" alt="Screenshot 2022-11-04 at 10 55 19"
src="https://user-images.githubusercontent.com/69037875/199945124-08590d1e-50ed-4b41-a256-8b16548dbdbd.png">

### 2. Create rule for `Hosts`
- Create Inventory rule for `Hosts`
- Select a connector to schedule action
- Add `{{context}}` in the action template
- Wait for alerts to be generated
- Observe `context.container` contains single container

<img width="520" alt="Screenshot 2022-11-04 at 10 59 31"
src="https://user-images.githubusercontent.com/69037875/199945890-a38a695a-61bc-49cb-9eb4-6fa806f4bdc9.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>
2022-11-10 19:24:03 +01:00
Nicolas Chaulet
6963f577b3
[Fleet] Change log level when fleet server host is not found in the policy (#145005) 2022-11-10 11:02:58 -07:00
Kevin Delemme
38251947e3
feat(slo): Introduce burn rate calculation service (#144823) 2022-11-10 10:14:57 -07:00
James Gowdy
f82bb68072
[ML] Sharing datafeed start and stop functions (#144968)
Sharing the functions `forceStartDatafeeds` and `stopDatafeeds` for use
by the security solutions plugin.
2022-11-10 16:38:08 +00:00
Kyle Pollich
db3572ab72
[Fleet] Fix fleet_server_hosts value in fleet/settings API (#144898)
## Summary

Resolve `fleet_server_hosts` from the new Fleet Server Host SO type
instead of the settings SO.

Would like to add an integration test for this, but requires setting up
a new "get settings" suite. Will push a follow-up commit.

Fixes https://github.com/elastic/fleet-server/issues/2068

### Checklist

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


![image](https://user-images.githubusercontent.com/6766512/200846767-81111fd7-5609-47b1-932d-9274c257f0be.png)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-10 11:29:19 -05:00
Lisa Cawley
6804cffc5f
[DOCS] Automate docs for get case APIs (#144950) 2022-11-10 08:27:33 -08:00
Henry Harding
d5ed159eb5
Synthetics design cleanup (#144954)
## Summary

Made a few small changes to cleanup the UI.
- Fixed some gutter spacing for EuiFlexGroup and added
`responsive={false}` where appropriate
- Updated Monitor Detail Flyout due to an EUI bug. Now uses a fixed
600px width, and transitions between a `push` and `overlay` flyout
depending on breakpoint.
- Updated visual style of location selector in monitor detail flyout to
match other instances of this. Text is now wrapped in `EuiLink`
- Added "Create Monitor" button to monitors overview page.
- Changed monitors overview page title from "Overview" to "Monitors"
- Fixed size of Sort by context menu items
- Cleaned up some code here and there 😅

## Before:
Overview page. Wrong page title. Missing "Create Monitor" button

![image](https://user-images.githubusercontent.com/847805/200962551-f4e760fd-46cd-4cd0-ae31-cb2cc278d579.png)

EUI related bug: flyout is too big

![image](https://user-images.githubusercontent.com/847805/200962641-bcb22c75-ddb9-4b24-b530-2e24cb67dd60.png)

Sort by context menu items wrong size

![image](https://user-images.githubusercontent.com/847805/200962819-b88cb5f2-affd-493b-9c53-895a8347f42f.png)


## After:
Overview page. Updated page title / added button

![image](https://user-images.githubusercontent.com/847805/200962153-4ca94b13-0146-45b0-8143-187e225ac3b3.png)

Flyout header. Rearranged order and changed style of location selector

![image](https://user-images.githubusercontent.com/847805/200962281-27de5410-6983-4b25-b53d-538cc610004c.png)

Push flyout at larger breakpoints

![image](https://user-images.githubusercontent.com/847805/200962011-4ac822b5-b9bf-4f7d-9338-0c05dc0b61a3.png)

Overlay flyout at smaller breakpoints

![image](https://user-images.githubusercontent.com/847805/200962062-000c35c4-202e-4b6d-8c1f-3c8f6ea2f03a.png)

Sort by context menu items fixed

![image](https://user-images.githubusercontent.com/847805/200963090-c73ad0e5-403b-4175-a439-6a1acbe3b0ff.png)


****


### 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)
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>
Co-authored-by: shahzad31 <shahzad.muhammad@elastic.co>
2022-11-10 11:03:03 -05:00
Ievgen Sorokopud
d673726541
Improve ML Job management UX for prebuilt ML rules/jobs (#1912) (#144080)
## Summary

This PR adds improvements to ML Job management UX within rules:
* ML job will be automatically enabled on rule creation, enabling rule
in Rules Table or Rule's details page
* ML rule details page has switch button to enable/disable the ML job
* Rules page shows the warning icon for the ML rules with non-running
jobs. Pressing the icon will show the list of the non-running jobs and
suggestion to go to the rule’s details page for further investigations

Main ticket:
[#1912](https://github.com/elastic/security-team/issues/1912)



https://user-images.githubusercontent.com/2700761/200577590-0fe03b25-b486-4ae7-8ca9-625047daddbc.mov

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-10 16:20:42 +01:00
Dominique Clarke
b308e9e69c
[Fleet] [Synthetics] force auto upgrade of managed policies (#144949)
## Summary

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

Passes `{ force: true }` option when upgrading packages via the
`managed_package_policy` flow.

This ensures that Synthetics packages are able to be auto-upgraded via
the Fleet setup flow when a new package version is available, while
still restricting users from editing managed Synthetics packages from
the UI.

### 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>
2022-11-10 10:19:12 -05:00
Dominique Clarke
ccd670eab4
[Synthetics] Monitor saved objects - add migratedType to synthetics monitor 8.6.0 migration (#144928)
## Summary

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

Adds the `migratedType` to the synthetics monitor saved object migration
for 8.6.0. This value represents the schema for the encrypted saved
object. Although it hasn't changed from 8.5.0 -> 8.6.0, it is
recommended to always include this value explicitly.
2022-11-10 10:13:26 -05:00
Jonathan Budzenski
37c23b4092 skip flaky suite. #135309 2022-11-10 09:09:06 -06:00
Jonathan Budzenski
ee68545a49 skip flaky suite. #143436 2022-11-10 09:02:07 -06:00
Paul Tavares
0e86637015
[Security Solution][Endpoint] Add message to get-file Download link to remind user of file cleanup/deletion (#144924)
## Summary

- Adds a message, to the Download link displayed after successfully
retrieving a file from the host via `get-file`, that files are
periodically cleaned up.
2022-11-10 09:38:13 -05:00
Daniel Mitterdorfer
614daf0b15
[Profiling] Fix decoding of long sequences (#144979)
We store stack frame types with a run-length encoding in Elasticsearch
and decode the raw data in Kibana. The current implementation was
working fine when the frame type did not change often but failed for
long sequences of unique frame types. With this commit we make sure that
these longer sequences can also properly decoded.

Co-authored-by: Tim Rühsen <tim.ruhsen@elastic.co>
2022-11-10 06:50:22 -07:00
Mike Côté
773d696bec
Remove task types that don't need concurrency limits (#144910)
In this PR, I'm removing the `maxConcurrency` from a few task types
given they only have a single task created for each type. The
concurrency setting limits how many tasks of such type a single Kibana
process should handle at most, and internally requires a separate task
claiming query to run every poll interval to claim those tasks.

With this PR, task manager goes from running 4 update_by_query requests
to 2 every 3 seconds, removing stress put onto Elasticsearch.

For more details, see `maxConcurrency` here
https://github.com/elastic/kibana/tree/main/x-pack/plugins/task_manager#task-definitions.
2022-11-10 08:33:49 -05:00
Luke Gmys
ae64c2cf3e
[TIP] Cleanup flyout indicators table testid (#144893)
## Summary

Minor cleanup that closes
https://github.com/elastic/security-team/issues/5019
2022-11-10 14:15:00 +01:00
Alejandro Fernández Gómez
a1128cf3cc
[Synthetics UI] Monitor history tab (#143516)
## Summary

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

Contents for the monitor history tab, minus the status widget.

Co-authored-by: shahzad31 <shahzad.muhammad@elastic.co>
2022-11-10 14:01:49 +01:00
Pablo Machado
cbc7fe10f6
[Security Solution] Add host/user name hover action to Entity analytics page (#144819)
issue: https://github.com/elastic/kibana/issues/144501

## Summary
Add host/user name hover action to Entity Analytics page.


https://user-images.githubusercontent.com/1490444/200599973-415049c3-f2bb-4ae4-9052-c58db87d32ea.mov


Why? To Improve triage by allowing users to investigate a Host.

*** The UX is aligned with the event view UI. When the user hovers a
table row it displays all hover actions.

### Extras
* Extract duplicated topN logic to a hook for reusability.
* Improve Entity analytics page header and risk table for small screens

**Before**
<img width="400px"
src="https://user-images.githubusercontent.com/1490444/200850153-c81a0d73-1f59-4384-b721-37cbebbbd35d.png">

**After**
<img width="250px"
src="https://user-images.githubusercontent.com/1490444/200850149-d8a3aaa4-db04-4b13-a266-71eedb1ffa97.png">
2022-11-10 06:01:18 -07:00
Dominique Clarke
b1d2211f9f
[Synthetics] Monitor add/edit - do not focus error via react hook form (#144756)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Shahzad <shahzad31comp@gmail.com>
Resolves https://github.com/elastic/kibana/issues/144363
2022-11-10 13:41:11 +01:00
Ashokaditya
8a34465b29
[Security Solution][Endpoint][RBAC V1] Show Host Isolation Page only to superusers for RBAC v1 (#144711)
## Summary

- [x] Updates the logic for showing host isolation pages for RBAC v1.
- [x] should allow `superusers` to delete an artifact if exists even
when the license is below `platinum`


### 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
2022-11-10 04:24:45 -07:00
Dominique Clarke
42fdcb6981
[Synthetics] adjust synthetics preview toggle to indicate technical preview status (#144934)
Resolves https://github.com/elastic/kibana/issues/144914
2022-11-10 11:23:49 +01:00
Dominique Clarke
0cae7ed66e
[Synthetics] filter by location for monitor details visualizations (#144873)
Resolves https://github.com/elastic/kibana/issues/144857
2022-11-10 11:13:54 +01:00
Antonio
f1d5f4488d
[Cases] Wrap the all cases list tags column (#144787)
## Summary

This PR aims to stop the truncating behavior from the Tags column in the
all-cases list.

* An ellipsis shows up if there are too many tags
* The height is limited to three rows
* The tooltip behavior remains
* Fixed the tags column width

### Screenshots

<details><summary>Before:</summary>
<img width="1408" alt="Screenshot 2022-11-08 at 10 48 34"
src="https://user-images.githubusercontent.com/1533137/200531920-03442218-7151-471b-9ff7-66f31acf1f56.png">
</details>

<details><summary>After</summary>
<img width="1425" alt="Screenshot 2022-11-08 at 10 47 51"
src="https://user-images.githubusercontent.com/1533137/200531952-f2c9be6e-0a7d-41e2-bd8c-03c6f36635d0.png">
</details>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-10 10:45:43 +01:00
Robert Oskamp
cf281d61ca
[ML] Functional tests - stabilize and re-enable test suites (#144784)
This PR stabilizes and re-enables a few ML functional test suites.
2022-11-10 10:35:40 +01:00
Or Ouziel
878f3f1b3f
[Cloud Posture] update benchmark menu item description (#144813) 2022-11-10 11:09:35 +02:00
Joe Reuter
2dce056bd8
[Lens] Change semantic elements (#144828)
Fixes https://github.com/elastic/kibana/issues/143547

To make sure the correct semantic elements are used, you can pass the
`component` prop to the page template components. As the eui components
`EuiPageTemplate`, `EuiPageTemplate.Section` and so bring styling with
them there's not much value in trying to put them into the places of
manual `section`s used in Lens today because we would end up overruling
all of these default styles anyway as Lens is pretty special in terms of
page layout to make best use of the existing screen real estate.

Because of this this PR is simply turning the `EuiPageTemplate` into a
div and putting the main role to the top level of the Lens app.

The way how to do this is a bit funky right now, but that's an EUI bug
that will be fixed upstream: https://github.com/elastic/eui/issues/6351

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2022-11-10 09:51:05 +01:00
Julia Bardi
c7cdd00036
[Fleet] Request diagnostics (#142369)
## Summary

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

### Request diagnostics action
Added new action for single agent (Agent details page and Agent list row
actions) to request diagnostics.
When clicking on the action, an API request is made that creates a
`REQUEST_DIAGNOSTICS` type action in `.fleet-actions` index.

### Diagnostics uploads display
When the action is submitted, the user is navigated to the new `Agent
Details / Diagnostics` tab, which shows the list of pending and
completed diagnostics file uploads. The information is coming from the
`/action_status` (for action status) as well as the `/uploads` endpoint
(for file name and path)
By clicking on a diagnostics link, the file should be downloaded in zip.

<img width="1060" alt="image"
src="https://user-images.githubusercontent.com/90178898/193816708-803c2a22-d421-4af2-9a78-785cdee81136.png">

Failed uploads display:
<img width="638" alt="image"
src="https://user-images.githubusercontent.com/90178898/194058366-d4874339-9fd1-419e-99e5-f592a6b3bf6d.png">
Expired status was not specified in the design separately, it will be
shown like the failed status (with warning icon).

### Mock data (blocker)
Currently returning mock data in the `/uploads` API, because of a
blocker in Kibana File Service, see
[here](https://github.com/elastic/kibana/issues/141074#issuecomment-1267078759).

### Bulk action
Added bulk action too:
<img width="1759" alt="image"
src="https://user-images.githubusercontent.com/90178898/194026861-bf0d5956-de2d-4d2b-895a-c35cf5252a5a.png">

Shows up in agent activity:
<img width="594" alt="image"
src="https://user-images.githubusercontent.com/90178898/194026960-356a5b40-1203-4182-ad7b-89b1432bf0f6.png">

The Fleet Server / Agent changes are not there yet, though FS delivers
the action, and Agents ack it (looks like default behavior for unkown
actions as well)

### Confirmation modal

Added a confirmation modal when clicking on action button everywhere,
except for the `Request diagnostics` button on the Diagnostics page.
Open question:
- Do we want to display the confirmation window on the Diagnostics page
button too?

<img width="673" alt="image"
src="https://user-images.githubusercontent.com/90178898/194065175-715b158e-0628-4bd9-86db-920c1ec9825e.png">

### Download

Generated file path to download in this format:
`/api/fleet/agents/files/{fileId}/{fileName}`

Decided not to try to use `files` plugin's API because it doesn't have
the Fleet authorization around it.

Screen recording demonstrating the download of an agent diagnostics zip
file, that I uploaded using the Fleet Server upload API (using [Dan's
pr](https://github.com/elastic/fleet-server/pull/1902) locally)



https://user-images.githubusercontent.com/90178898/194287842-c7f09c9e-5310-460f-9cae-6fc7fa7750de.mov

### Notification

Added toast message to show up when a diagnostics becomes ready, when we
are on the Diagnostics tab.



https://user-images.githubusercontent.com/90178898/194318170-e7ec66db-8bf8-4535-b07e-682397c2920c.mov



### 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)
- [ ] [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>
2022-11-10 09:24:22 +01:00
Uladzislau Lasitsa
545ebb012d
[Lens] Expose helpers to capture meta information from Lens state (#144546)
## Summary

Closes: #131710

In order to add complimentary features to Lens embeddables via actions,
it's important to be able to capture the relevant information from the
state which is currently loaded.

E.g. https://github.com/elastic/kibana/pull/129762 is pulling out the
used field names from the Lens state. While the state interface is
considered a public interface (as it's also used to configure Lens
embeddables), it would be beneficial to provide use case specific
helpers to extract this information to make this logic easier to
maintain.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-10 10:05:41 +02:00
Walter Rafelsberger
1d511a439d
[ML] Explain Log Rate Spikes: Allow to continue failed stream. (#143301)
The analysis can be long running and in cases can time out depending on
server/proxy settings. This update allows a user to try to continue the
analysis if it failed half way through.
2022-11-10 09:03:44 +01:00
Gergő Ábrahám
3a24c1f8a6
[Security Solution] Show correct Privileges Required page for unauthorized paths (#144821)
## Summary

The goal is to show a _Privileges required_ or _Superuser required_
message to users if they want to access a page in Security Management
they don't have access for, based on feature flags.

`<PrivilegedRouter>` decides which message to show:
- current version (no feature flags): _superuser required_ for all pages
- v1 (`endpointRbacV1Enabled`):
   - _privileges required_ only for _Response actions history_
   - _superuser required_ for other pages
- v2 (`endpointRbacEnabled`): _privileges required_ for all pages

To test it:
- change the feature flags,
- create a non-superuser user, with different Kibana privileges
- and check the urls for Security Management pages, e.g.
http://localhost:5601/app/security/administration/response_actions_history

Without feature flags:
<img width="998" alt="image"
src="https://user-images.githubusercontent.com/39014407/200780212-e16246a0-76d4-4c8a-a9b9-6b2b4466e7b8.png">

v1/v2 for Response actions history:
<img width="1006" alt="image"
src="https://user-images.githubusercontent.com/39014407/200780408-c80ca58b-9d06-47cd-beb9-c764ef5f1380.png">


### Dev note
A refactor PR for reusing the new `<NoPrivilegesPage>` component in 3
other places inside security solution plugin is ~coming soon.~ here:
https://github.com/elastic/kibana/pull/144886

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2022-11-10 08:53:55 +01:00
Steph Milovic
b721fdcf42
[Security solution] Guided onboarding, alerts & cases design updates (#144249) 2022-11-09 14:13:10 -07:00
Wafaa Nasr
47f38bc3df
[Security Solution] [Exceptions] Add ListExceptionItem Component and its components with implementing the logic + restructuring exceptions under security (#144622)
## Summary

**Shared List Collapsed**
<img width="1226" alt="image"
src="https://user-images.githubusercontent.com/12671903/200085472-ba638911-af4e-4e6d-85a3-7692b174fad5.png">

**One Shared list expanded**
<img width="1442" alt="image"
src="https://user-images.githubusercontent.com/12671903/200085548-2b6ef100-8587-47c5-b08d-9727bd2c25c0.png">

**Shared List with no Exceptions**

<img width="1180" alt="image"
src="https://user-images.githubusercontent.com/12671903/200531307-4b3d0d02-a7c7-4232-98cc-7d0f1b4e48c5.png">

**Add Exceptions from Shared List Card**
<img width="1461" alt="image"
src="https://user-images.githubusercontent.com/12671903/200531393-833173ea-c5a8-4ab3-b947-257154f6aa90.png">

**Exit Exception from Shared List Card**
<img width="1463" alt="image"
src="https://user-images.githubusercontent.com/12671903/200531750-e888a0fa-d95c-4994-8ead-f119611fc561.png">



**Delete Endpoint is disabled**
<img width="1186" alt="image"
src="https://user-images.githubusercontent.com/12671903/200531542-773348c2-c2e2-4062-94e1-12340756ebc3.png">




1. **New components**
a. `list_details_link_anchor` => This component should be removed and
moved to @kbn/securitysolution-exception-list-components once all the
building components get moved
b. `exceptions_utility` => This component should be removed and moved to
@kbn/securitysolution-exception-list-components once all the building
components get moved
c. `list_exception_items ` a wrapper over the ExceptionItem from the
`@kbn/securitysolution-exception-list-components` added to pass the
missing above components, should be removed soon once everything gets
moved to the kbn package

2.  **New Hooks** 
a. `use_list_exception_items` => holds all the Exceptions' items' logic
  b. `use_exceptions_list.card` => hold all the exception card logic

4. Apply Designs to the Shared Lists

5. **Restructure folders under the
`x-pack=>security_solution=>exceptions`**
    a.  components
    b. hooks
    c. pages
    d. translations
    e. utils

6. Added excluded files in `jest.config`

7. Renamed the `shared_list` components in `routes`


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

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-11-09 20:59:50 +01:00
Tim Rühsen
f7758e0ada
[Profiling] Improve the differential flamegraph tooltip (#144895)
Improve the root tooltip for the differential flamegraph:
- remove the superfluous CPU usages (it's always 100% inclusive and 0%
exclusive)
 - add the change rate of the samples as colored text

**Before**

![Screenshot_20221109_130516](https://user-images.githubusercontent.com/2087964/200828112-045196e2-88cb-4f5c-906a-4e61d73be9c7.png)
**After**

![Screenshot_20221109_125746](https://user-images.githubusercontent.com/2087964/200828152-cb2f0cc7-28cc-4e54-800f-d5c9df0448c4.png)

Improve the non-root tooltips for the differential flamegraph:
 - remove the 'no change' label if there is no change
 - add the change rate of the samples as colored text

**Before**

![Screenshot_20221109_130600](https://user-images.githubusercontent.com/2087964/200828108-c6c78866-4aff-4617-ac0f-e78aeba78a54.png)
**After**

![Screenshot_20221109_125916](https://user-images.githubusercontent.com/2087964/200828149-8caac941-3c58-4389-ac7f-bda2e687faaa.png)

Fixes https://github.com/elastic/prodfiler/issues/2714

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joseph Crail <joseph.crail@elastic.co>
2022-11-09 11:58:35 -08:00
Thomas Dullien
0a5050bd37
[Profiling] Small improvements to the differential function view (#144824)
Improved the visualization of data in profiling by showing more details
and using more nicely formatted numbers.

Fixes https://github.com/elastic/prodfiler/issues/2772

Co-authored-by: Tim Rühsen <tim.ruhsen@elastic.co>
2022-11-09 11:27:36 -07:00
Kaarina Tungseth
64c3c63e21
[Lens] Updates the UI copy for Random sampling (#144265)
## Summary

Updates the Random sampling copy. 

Original PR: #143929

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-09 12:00:25 -06:00
Felix Stürmer
c88a680c60
[Logs UI] Use the Unified Search Bar for date range selection (#144351)
This enables the date-picker of the unified search bar introduced into the Logs UI in #143222 and simultaneously removes the custom date picker.

closes https://github.com/elastic/kibana/issues/142767
2022-11-09 18:49:32 +01:00
Dominique Clarke
17625d5780
[Synthetics] Overview - fix disabled status count (#144903)
## Summary

Fixes a typo with disabled status count.
2022-11-09 12:20:49 -05:00
Kaarina Tungseth
1a660f027f
[Lens] Updates Series color tooltip (#144846)
## Summary

Updates the Series color tooltip to:

`You are unable to apply custom colors to individual series when the
layer includes a "Break down by" field.`
2022-11-09 10:59:41 -06:00
Miriam
df43ad4e1e
[APM] Skip test after change in fleet url params (#144905)
Skipped failing test after change in fleep url params
https://github.com/elastic/kibana/pull/144343

Test will be fixed during test plan
https://github.com/elastic/kibana/issues/144907
2022-11-09 09:57:20 -07:00
Tim Sullivan
192068d9bd
[Reporting] Unskip screenshotting timeouts test (#144580)
## Summary

Closes #135309

See:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1528
2022-11-09 09:53:59 -07:00
Mark Hopkin
d20bdb56d7
[Fleet] Bugfix: always use posix paths for zip files (#144899)
## Summary

Always use posix style paths when generating paths for the package
archives.
2022-11-09 16:53:08 +00:00
Nathan Reese
49f3c24428
[Maps] enable allowJs (#144742)
Fixes https://github.com/elastic/kibana/issues/144287

PR resolves TS errors when setting allowJs to true in Maps plugin

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-09 09:50:46 -07:00
James Gowdy
bfa1a7f20b
[ML] Adding cloud trial end date to ml info (#144793)
Adds a `isCloudTrial` flag to ML's `/api/ml/info` endpoint.
If `xpack.cloud.trial_end_date` is set in the kibana config and it is
greater than the current time, we can assume that we're currently in a
could trial.
If `xpack.cloud.trial_end_date` is not set, `isCloudTrial` is not added
to the endpoint response. This is the same behaviour as the `cloudId`
property.

Adds a `isCloudTrial()` function to our server info util functions which
can be used in conjunction with our `isCloud()` function.

To test, these cloud settings can be added to the kibana config:
```
xpack.cloud.id: 'cloud_message_test:ZXUtd2VzdC0yLmF3cy5jbG91ZC5lcy5pbyQ4NWQ2NjZmMzM1MGM0NjllOGMzMjQyZDc2YTdmNDU5YyQxNmI1ZDM2ZGE1Mzk0YjlkYjIyZWJlNDk1OWY1OGQzMg=='
xpack.cloud.trial_end_date: '2022-11-20T09:39:52.554Z'
```
2022-11-09 16:40:23 +00:00
Dmitry Tomashevich
a9162f7481
[Discover] Enable esQuery alert for adhoc data views (#140885)
## Summary

Closes #142514 #142389

This PR does the following: 
- Enables to create `esQuery` (in KQL or Lucene mode) using adhoc data
views from discover and management pages
- Adds `explore matching indices` button to data view picker in alert
flyout
- Adding adhoc data views from alert flyout should propage them to a
main discover picker


### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] 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)
- [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: Davis McPhee <davis.mcphee@elastic.co>
2022-11-09 18:55:34 +03:00
Yaroslav Kuznietsov
3d7b01e28b
[Lens][TSVB] Ad-hoc dataViews for index pattern string mode in TSVB. (#143500)
## Summary
Completes part of https://github.com/elastic/kibana/issues/138236.
Added support of ad-hoc dataViews while converting TSVB visualizations,
when index pattern string mode is turned on.

Co-authored-by: Uladzislau Lasitsa <vlad.lasitsa@gmail.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-09 17:41:36 +02:00
Joe Reuter
452b81f0e7
[Lens] Rearrange options (#144891)
Fixes https://github.com/elastic/kibana/issues/138075

## Group by this field

This PR moves the "Group by this field" below the field selector. I
renamed it to "Aggregate by this dimension first" (instead of field)
because it's more accurate - this isn't really about the field and also
a thing for the "Filters" function which doesn't have a field:
<img width="355" alt="Screenshot 2022-11-09 at 12 29 29"
src="https://user-images.githubusercontent.com/1508364/200818974-f5dc304f-2457-4604-8a0a-c94ed1d50b83.png">
<img width="355" alt="Screenshot 2022-11-09 at 12 29 33"
src="https://user-images.githubusercontent.com/1508364/200818978-f48e42e8-f2df-43c8-8479-d6cac205fafa.png">
<img width="353" alt="Screenshot 2022-11-09 at 12 29 38"
src="https://user-images.githubusercontent.com/1508364/200818983-2c00f8de-06ee-4d9a-82d6-14c161e0b91f.png">
<img width="353" alt="Screenshot 2022-11-09 at 12 29 44"
src="https://user-images.githubusercontent.com/1508364/200818986-e76a6d88-a6a1-4897-8fad-f0d56027c1d1.png">

Drive-by change: Move the "Include empty rows" up above the granularity
slider for intervals to match the date histogram order

## Collapse by

It also moves "Collapse by" into the data section (relevant for xy
breakdown, table rows and partition slices)
<img width="357" alt="Screenshot 2022-11-09 at 12 36 53"
src="https://user-images.githubusercontent.com/1508364/200820679-afb8e08b-a91b-46ef-8111-c09cfdb51865.png">
<img width="353" alt="Screenshot 2022-11-09 at 12 36 59"
src="https://user-images.githubusercontent.com/1508364/200820682-4f416404-4693-46cd-80df-7c868deadc44.png">
<img width="355" alt="Screenshot 2022-11-09 at 12 36 40"
src="https://user-images.githubusercontent.com/1508364/200820669-0fab52da-7fa1-4fff-b183-8d5c7e4695b9.png">
<img width="360" alt="Screenshot 2022-11-09 at 12 36 46"
src="https://user-images.githubusercontent.com/1508364/200820675-837e3736-9519-42a6-98ca-9a9bae9840f1.png">

Also works for text based:
<img width="360" alt="Screenshot 2022-11-09 at 12 47 08"
src="https://user-images.githubusercontent.com/1508364/200822518-e76dd9b5-df9f-4289-a468-0b63bfa1988c.png">


## Technical details

For the collapse by part I had to add another form render hook to the
visualization `renderDimensionEditorDataExtra` which is passed to the
datasource dimension editor so it can be rendered in the right place. On
the datasource side the integration for text based is very straight
forward, for form based there are two flavors - just render below the
operation edit options or pass to the operation editor (used for terms)
2022-11-09 16:22:52 +01:00
Maryam Saeidi
ef7c1a689b
[Actionable Observability] Integrate alert search bar on rule details page (#144718)
Resolves #143962

## 📝 Summary
In this PR, an alerts search bar was added to the rule details page by
syncing its state to the URL. This will enable navigating to the alerts
table for a specific rule with a filtered state based on active or
recovered.
### Notes
- Renamed alert page container to alert search bar container and used it
both in alerts and rule details page (it will be responsible to sync
search bar params to the URL) --> moved to a shared component
- Moved AlertsStatusFilter to be a sub-component of the shared
observability search bar
- Allowed ObservabilityAlertSearchBar to be used both as a stand-alone
component and as a wired component with syncing params to the URL
(ObservabilityAlertSearchBar, ObservabilityAlertSearchbarWithUrlSync)
- Set a minHeight for the Alerts and Execution tab, otherwise, the page
will have extra scroll on the tab change while content is loading (very
annoying!)

## 🎨 Preview

![image](https://user-images.githubusercontent.com/12370520/200547324-d9c4ef3c-8a82-4c16-88bd-f1d4b2bc8006.png)

## 🧪 How to test
- Create a rule and go to the rule details page
- Click on the alerts tab and change the search criteria, you should be
able to see the criteria in the query parameter
- Refresh the page, alerts tab should be selected and you should be able
to see the filters that you applied in the previous step
- As a side test, check alert search bar on alerts page as well, it
should work as before

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-11-09 16:18:16 +01:00
Devin W. Hurley
b1179e72ff
[Security Solution] [Exceptions] Adds options to create a shared exception list and to create a single item from the manage exceptions view (#144575)
Adds options to create a shared exception list and creating a single
item to be attached to multiple rules default lists or to add it to
shared lists.

Co-authored-by: Gloria Hornero <gloria.hornero@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-11-09 09:54:45 -05:00
Coen Warmer
9298023c1b
[Actionable Observability] Add context.alertDetailsUrl to connector template for Uptime > Monitor status & Uptime TLS rules (#144740)
Closes https://github.com/elastic/kibana/issues/144441
2022-11-09 07:50:45 -07:00
Jatin Kathuria
92d907cd93
[Security Solution] [Feat] Add Bulk Events to Timeline. (#142737)
This PR implements functionality to add multiple events to the timeline.
It is implements :

1.  Selected events ( max 4000 ) can be added to the timeline.


## Implementation.

1. At present, it only support adding multiple records in the timeline
as `kql Filters`. https://github.com/elastic/kibana/pull/142436 is in
progress to implement `is-one-of` operator in the data provider. Once
that is moved to `main`, we can change value of `prefer` parameter to
send the IDs in `dataProvider` rather than filter.

If you would like to test it with
https://github.com/elastic/kibana/pull/142436, please clone :
https://github.com/logeekal/kibana/tree/bulk_actions_add_timeline_with_is_one_of


2. Below is the demonstration how it works. 

https://user-images.githubusercontent.com/7485038/199056731-4287fc61-9d0b-4cf3-ba1f-741f6b66ae97.mov
2022-11-09 07:48:12 -07:00