Commit graph

62326 commits

Author SHA1 Message Date
Coen Warmer
13f9d7ac7d
Add additional NODE_ENV check for RQ Dev Tools Close Button (#154987) 2023-04-17 15:14:39 +02:00
Coen Warmer
bbf8b70db2
Add URL parsing for SLO Creation Form (#154933) 2023-04-17 09:00:00 -04:00
Nicolas Chaulet
70eb1939ae
[Fleet] Fix output ca_trusted_fingerprint validation message (#154651) 2023-04-17 08:52:33 -04:00
Mike Côté
046d97c357
Require config, secrets and params validation for connector types (#153969)
Resolves https://github.com/elastic/kibana/issues/153769

In this PR, I'm making `config`, `secrets` and `params` require a
validation in their connector type definition. Even in scenarios no
values are used, an empty object validation is required. This prevents
arbitrary data from being passed through.

Only `ES Index`, `Server Log` and `Teams` had some empty validators.
Adding them won't be a breaking change because the HTTP API defaults
missing `config` and `secrets` to `{}` ([see
here](https://github.com/elastic/kibana/blob/main/x-pack/plugins/actions/server/routes/create.ts#L19-L24)).

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-04-17 05:22:13 -07:00
Jatin Kathuria
99db75512a
[Security Solution] Feedback for Alert Page Filters (#154342)
Below features should be added to Alert Page Filters.(Fixes #154044)

- Design Feedback
   - Remove `Save Controls` from Context Menu ( Overflow Menu )
      |Before|After|
      |:---:|:---:|

|![image](230332279-1c6c6137-4767-4bb5-a472-e5fa527cd004.png)|
   - Move `Discard Changes -> Context Menu`.
     |Before|After|
     |:---:|:---:|

|![image](230332196-6dd45337-eb91-411c-bcf8-20b272db1d27.png)|
- When Redirected, do not enter in the Edit Mode and give option of
Saving/Discarding changes to the user in the Callout itself.
     |Before|After|
     |:---:|:---:|

|![image](230331787-72995324-ad62-4def-a834-de7564389288.png)|
- Functionality Feedback
- Status should always be part of page filters. User should not be able
to remove it.
- Currently users have ability to delete all controls, to persist some
pre-defined controls, but whenever users delete those, we add them back
when users save the controls.
         |Before|After|
         |:---:|:---:|
| <video
src="https://user-images.githubusercontent.com/7485038/230329833-1dd698d8-6bae-42f9-9133-168b2789f5ff.mov"/>
|<video
src="https://user-images.githubusercontent.com/7485038/230331343-e372da0a-dcd6-4d9d-a5f7-491b78c72998.mov"
/>|
- Raised the issue with `kibana-presentation` team to disabled `delete`
action for a particular controls.
https://github.com/elastic/kibana/issues/154068
2023-04-17 05:20:58 -07:00
Coen Warmer
54646146d7
Use Observability Page Template from Observability Shared in Infra (#154778)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-17 05:10:59 -07:00
Dominique Clarke
dcfff4fd56
[Synthetics] report error when synthetics agent sends an invalid location (#154876)
Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: shahzad31 <shahzad31comp@gmail.com>
2023-04-17 14:02:11 +02:00
Navarone Feekery
0e0d5cfdef
[Enterprise Search] Add Select and RadioGroup input types (#155017)
Adds inputs for `EuiSelect` and `EuiRadioGroup` for connector
configurations.

- Use if connector type is `dropdown`
  - `EuiRadioGroup` if 3 or less options 
  - `EuiSelect` if 4 or more options
2023-04-17 04:58:34 -07:00
Marco Liberati
e3d7bf335e
[Lens] Partition legend order synced with filters order (#154820)
## Summary

Fix #149034

This PR adds the legend order sync with Lens filters when there's a
single category grouping dimension.


![legend_filters](https://user-images.githubusercontent.com/924948/231465750-c26532c0-e63e-4472-ae69-a853c4f250b4.gif)


![treemap_legend_filters](https://user-images.githubusercontent.com/924948/231466081-d78ab1b0-170b-40c3-8316-5b575c788218.gif)

While working on the feature I've noticed also that the `Nested` switch
in the Legend popover was always enabled when visible, also when there's
a single grouping dimension and the nesting won't apply. So I've created
a new `disabled` state for this specific case with a tooltip explanation
of the disabled state.

<img width="862" alt="Screenshot 2023-04-12 at 14 42 10"
src="https://user-images.githubusercontent.com/924948/231466601-eef3d9af-1c98-4e97-b497-529f3aee412f.png">
<img width="861" alt="Screenshot 2023-04-12 at 14 42 26"
src="https://user-images.githubusercontent.com/924948/231466605-8228b922-f92c-4928-a03c-4ba540c38427.png">
<img width="850" alt="Screenshot 2023-04-12 at 14 43 03"
src="https://user-images.githubusercontent.com/924948/231466608-9a196284-1dff-4ef0-8495-d6721dbce2ae.png">
<img width="851" alt="Screenshot 2023-04-12 at 14 43 22"
src="https://user-images.githubusercontent.com/924948/231466611-0a7facbc-7f05-4206-b035-c481c6e4400f.png">


### Checklist

Delete any items that are not applicable to this PR.

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


### Risk Matrix

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

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

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

| Risk | Probability | Severity | Mitigation/Notes |

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


### For maintainers

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

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2023-04-17 13:06:54 +02:00
Dominique Clarke
79ba9e979a
[Synthetics] prevent api key errors when no monitors are configured (#154791) 2023-04-17 13:05:58 +02:00
Navarone Feekery
0985ef0fb6
[Enterprise Search] Add new connector configurable field input types (#154904)
- Extracts field type creation to new react component
`ConnectorConfigurationField`.
- Adds the following configurable field input types:
  - textbox
  - numeric
  - switch (boolean)
- Updates the `ConfigEntry` type to have more field properties
- Replaces `isPasswordValue` with configurable field property
`sensitive`
- Updates field properties for native connectors (MySQL and MongoDB)
2023-04-17 12:52:08 +02:00
James Gowdy
9031377799
[ML] Sharing start, stop, update and delete and infer trained model functions (#154974)
Adding `startTrainedModelDeployment`, `stopTrainedModelDeployment`,
`inferTrainedModel`, `updateTrainedModelDeployment` and
`deleteTrainedModel` functions to our shared services so other plugins
can use them.
2023-04-17 11:43:28 +01:00
Jean-Louis Leysens
caa9231aef
[HTTP] Update versioned router to follow spec (#154823)
## Summary

Update the versioned router based on current Elastic API spec.

Laundry list of changes:

1. Public versions must be specified as `^[0-9]{4}-[0-9]{2}-[0-9]{2}$`
e.g. 2023-12-12
2. For unsupported versions we respond with `400`
3. For incorrectly formatted versions we must respond with `400` and an
appropriate error message
4. Server must add the `Elastic-Api-Version` header to responses that
hit a versioned API
5. On serverless, a request WITHOUT a version header must default to
LATEST (TODO in follow up)
  a. For Kibana, on prem must default to OLDEST

## Future work

Some way to toggle the handler resolution strategy from `oldest` to
`newest`. This could be Kibana config.


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2023-04-17 02:27:59 -07:00
Michael Dokolin
a9ea301a8a
[Migrations] Remove migrationVersion mappings (#154711) 2023-04-17 09:53:22 +02:00
Walter Rafelsberger
87760ee8fc
[ML] AIOps: Fix comment/prop type for lazy component for change point detection (#154893)
Fix comment and prop type for lazy component for change point detection.
2023-04-17 09:22:51 +02:00
Kibana Machine
e2f36889ab
[api-docs] 2023-04-17 Daily api_docs build (#155003)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/310
2023-04-17 00:56:07 -04:00
Kibana Machine
f150d0149c
[api-docs] 2023-04-16 Daily api_docs build (#154995)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/309
2023-04-16 00:56:55 -04:00
Kibana Machine
a2ad8f03af
[api-docs] 2023-04-15 Daily api_docs build (#154986)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/308
2023-04-15 00:46:55 -04:00
Jen Huang
73be560e29
[Fleet] Re-enable skipped tests on main (#154960)
## Summary

Closes #154739. Re-enables skipped suites now that #154741 is resolved.
2023-04-14 17:05:09 +02:00
Chris Cowan
a07bcaef45
Change all SLO assets to managed and indices to hidden (#154953)
## Summary

This PR adds the Managed label to the transform definitions, ingest
pipelines, and index components. It also sets the changes the
destination indices to hidden with a dot prefix for the name so they
show up as system indices.

#### Transformer with Managed label

<img width="1750" alt="image"
src="https://user-images.githubusercontent.com/41702/231869095-56a4049a-f323-4b57-bda7-f16b2110addd.png">

#### Ingest Pipeline with Managed label

<img width="1019" alt="image"
src="https://user-images.githubusercontent.com/41702/231869372-4985c421-61b4-46d3-96a3-95869750ec6c.png">

#### Index Components

<img width="1770" alt="image"
src="https://user-images.githubusercontent.com/41702/231869650-bf2dd153-2319-4049-bc30-c692c29629f2.png">


#### Hidden data indices

<img width="1776" alt="image"
src="https://user-images.githubusercontent.com/41702/231869800-62c6b290-bddd-425f-a20a-7566bcafb0c8.png">
2023-04-14 07:22:00 -06:00
Kibana Machine
bd27cb6c37
[api-docs] 2023-04-14 Daily api_docs build (#154972)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/307
2023-04-14 01:01:22 -04:00
Kfir Peled
6ced0d6ee6
[Cloud Security] Added UI support for waiting for results (#154969) 2023-04-13 17:25:26 -07:00
Kevin Logan
206b331696
[Security Solution] Advanced policy option for Endpoint 8.8 (#154684)
## Summary

Addresses: https://github.com/elastic/kibana/issues/154476

Adds advanced policy option for Endpoint in 8.8.

Default:
<img width="1728" alt="image"
src="https://user-images.githubusercontent.com/56395104/231883364-22d736b6-5555-4212-a05a-ceb52769ceba.png">

Set it to true and save:

![image](https://user-images.githubusercontent.com/56395104/230984178-e543e3af-2f49-48ad-af15-605b3a00336d.png)

<img width="1724" alt="image"
src="https://user-images.githubusercontent.com/56395104/231883316-de19ff50-563f-4a11-ad22-d8ffd9c92312.png">

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

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-04-13 15:28:58 -07:00
Cauê Marcondes
2225de0b4b
[Profiling] Adding upload symbols instructions to add data page (#154670)
<img width="1113" alt="Screenshot 2023-04-10 at 1 44 13 PM"
src="https://user-images.githubusercontent.com/55978943/230960393-9f2290d6-40d4-4ad6-a166-663b065e3c77.png">
2023-04-13 14:25:40 -07:00
Cauê Marcondes
a061f1d7b3
[Profiling] adding invalid license page (#154866) 2023-04-13 17:16:12 -04:00
Davis McPhee
b1a4e8c735
[Dashboard] Add support to Dashboard for searching saved objects by tags (#154946)
## Summary

This PR adds support to Dashboard for searching saved objects by tags.
The related issue was relabelled from `Team:Presentation` to
`Team:DataDiscovery` when it probably didn't need to be, but the changes
to support it are super simple, so I figured I might as well open a PR
for it.

"Add from library" toolbar button:
<img width="1365" alt="add_from_library"
src="https://user-images.githubusercontent.com/25592674/231848323-af160e84-6064-4586-956d-b58c66f04824.png">

"Replace panel" action:
<img width="1365" alt="replace_panel"
src="https://user-images.githubusercontent.com/25592674/231848373-82d3859e-2358-422d-b717-4360939c1271.png">

"Add panel" action (I'm not really sure how to actually get this action
to show or when it's used so I just hardcoded `isCompatible` to return
`true` for testing):
<img width="1365" alt="add_panel"
src="https://user-images.githubusercontent.com/25592674/231848785-343ac90b-b8c0-43ed-9c03-9aa04b9fdd92.png">

Note: I don't really understand the Dashboard services abstractions, so
I just tacked on the `SavedObjectsTaggingApi` as `api`. If the
Presentation team doesn't like this, I'm open to suggestions here, but
ultimately we need a way to access the entire `SavedObjectsTaggingApi`
from within `add_panel_from_library.ts` (ideally without too much
refactoring in this PR unless someone from the Presentation team wants
to take over from here).

Resolves #113696.

### Checklist

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

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-04-13 18:13:26 -03:00
Alexi Doak
752147e67e
[ResponseOps][Window Maintenance] Add window maintenance to alerting plugin public folder and add create form (#153445)
Resolves https://github.com/elastic/kibana/issues/152272

## Summary

- This PR adds maintenance windows to the alerting plugin and also adds
the create form.
- The Maintenance Windows feature is hidden by a feature flag by
default.
- The create form calls the create api, but it's expected to fail
because the api hasn't been merged.

<img width="1709" alt="Screen Shot 2023-04-03 at 2 56 45 PM"
src="https://user-images.githubusercontent.com/109488926/229601948-13a46847-bebc-4674-9446-55163a6a6589.png">

<img width="1706" alt="Screen Shot 2023-04-03 at 2 56 56 PM"
src="https://user-images.githubusercontent.com/109488926/229601997-03b232cf-0d50-4047-a92b-79ef0c1e9568.png">

<img width="1706" alt="Screen Shot 2023-04-03 at 2 57 12 PM"
src="https://user-images.githubusercontent.com/109488926/229602015-7e0110e6-dd3d-41c4-8601-64943fe01323.png">


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


### To verify
- Enable maintenance windows by adding `ENABLE_MAINTENANCE_WINDOWS =
true` to `x-pack/plugins/alerting/common/index.ts`
- Go to
http://localhost:5601/app/management/insightsAndAlerting/maintenanceWindows
or select the Maintenance Windows link on the side nav
- Click the `Create a maintenance window` button and verify it takes you
to the create from
- Verify the bread crumbs and the return link work correctly
- Once on the create form, try to submit without entering any values and
verify that the form doesn't submit and errors are shown on the `name`
and `duration` fields
- Submit a maintenance window that is not recurring. You'll see an error
popup but verify that the request body is correct and matches what
you've selected in the form.
- Create a maintenance window that is recurring and try choosing the
different options on the recurring form. Verify that the summary at the
bottom of the form accurately reflects what you have selected.
- Submit a maintenance window that is recurring. Again, you'll see an
error popup but verify that the request body is correct and matches what
you've selected in the form.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-13 16:04:16 -04:00
Jiawei Wu
3b07f96b44
[RAM] Window Maintenance Client/Saved Object and Mapping/REST APIs (#153411)
## Summary
Resolves: https://github.com/elastic/kibana/issues/152270
Specs:
https://docs.google.com/document/u/1/d/1-QblF6P19W9o5-10Us3bfgN80GRfjSIhybHrvJS_ObA/edit

This PR implements the following:
- New maintenance window SO
- New maintenance window client in the alerting plugin (generates and
queries maintenance window events, and other CRUD functionality around
the SO)
- New maintenance window REST APIs 
- Kibana privileges for reading/writing maintenance window

This PR does not include integration with task runner, a new PR will be
created to do that work.
 
## APIs:

```
Find all maintenance windows in current space
GET `${INTERNAL_BASE_ALERTING_API_PATH}/rules/maintenance_window/_find`
body: {}
```

```
Create maintenance window:
POST `${INTERNAL_BASE_ALERTING_API_PATH}/rules/maintenance_window`
body: {
  title: string,
  duration: number,
  r_rule: RRule
}
```

```
Update maintenance window by ID:
POST `${INTERNAL_BASE_ALERTING_API_PATH}/rules/maintenance_window/{id}`,
body: {
  title?: string,
  duration?: number,
  enabled?: boolean,
  r_rule?: RRule,
}
```

```
Get maintenance window by ID:
GET `${INTERNAL_BASE_ALERTING_API_PATH}/rules/maintenance_window/{id}`,
```

```
Delete maintenance window by ID:
DELETE `${INTERNAL_BASE_ALERTING_API_PATH}/rules/maintenance_window/{id}`,
```

```
Archive maintenance window by ID:
POST `${INTERNAL_BASE_ALERTING_API_PATH}/rules/maintenance_window/{id}/_archive`,
body: {
  archive: boolean
}
```

```
Finish maintenance window by ID:
POST `${INTERNAL_BASE_ALERTING_API_PATH}/rules/maintenance_window/{id}/_finish`,
```


## Maintenance window response schema:
```
{
  id: string;
  title: string;
  enabled: boolean;
  duration: number;
  expirationDate: string;
  events: DateRange[];
  rRule: RRuleParams;
  status: 'running' | 'upcoming' | 'finished' | 'archived';
  startDate: string | null;
  endDate: string | null;
  createdBy: string | null;
  updatedBy: string | null;
  createdAt: string;
  updatedAt: string;
}
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-13 13:02:28 -07:00
Cauê Marcondes
83f1fb4f26
[Fleet] Support for Profiling symbolization (#154921)
This PR adds fleet index pattern `profiling-*` to fleet server and in
the logstash key generator.
2023-04-13 12:12:25 -07:00
Lukas Olson
dc1baa9758
Throttle toast storms related to saving/restoring URL state (#154792)
## Summary

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

Throttles toast errors related to restoring/saving URL state.

Before:

<img width="330" alt="image"
src="https://user-images.githubusercontent.com/1178348/231315783-98b966a8-b665-4465-91ae-b88933a56c3b.png">

After:

<img width="333" alt="image"
src="https://user-images.githubusercontent.com/1178348/231315724-7b3109eb-bdc7-405f-865f-36c909b907f4.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-04-13 12:05:47 -07:00
Nick Peihl
61f212f75c
[Dashboard] Unskip functional test related to webdriver (#154767)
## Summary

Fix flaky functional test where clicking a Url formatted link opens a
new tab, but the tab isn't available before verifying the url of the new
tab.
2023-04-13 14:59:05 -04:00
Dominique Clarke
d3f0ca07f8
[Synthetics] adjusts the monitor id used in the UI (#154861)
## Summary

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


![image](https://user-images.githubusercontent.com/11356435/231546806-29dd92b9-e970-4fe1-9184-6fbb1547d819.png)

![image](https://user-images.githubusercontent.com/11356435/231546843-e45b6cc7-6082-468d-bb23-5f6c51edbad8.png)

![image](https://user-images.githubusercontent.com/11356435/231546868-18c03aa8-718d-4b76-8e0b-5367985d95a2.png)

### Testing
1. Create a UI monitor.
2. Click on the card for the UI monitor to launch the flyout. Confirm
that the monitor id shown is the monitor saved object uuid.
3. Create a project monitor
4. Click on the card for the project monitor to launch the flyout.
Confirm that the monitor id shown is the `id-project-space` format that
we use for project monitors
2023-04-13 14:09:28 -04:00
James Gowdy
c34dae2a0e
[ML] Creating number utils package for roundToDecimalPlace function (#154910)
`roundToDecimalPlace` is used in ML and data visualiser packages and
soon aiops, so this PR moves it to a shared package.
2023-04-13 10:53:37 -07:00
Dominique Clarke
27d7aa226b
[Synthetics] notify when no default connectors are present (#154599)
## Summary

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

Adds a notice when no default connectors is configured in two places.
1. On the overview page
2. On the monitor edit page (when alerting is enabled for that monitor)

<img width="1408" alt="Screen Shot 2023-04-06 at 3 38 00 PM"
src="https://user-images.githubusercontent.com/11356435/231041883-a250ccd2-58d6-4882-a425-4b8c09cc194f.png">
<img width="1270" alt="Screen Shot 2023-04-06 at 3 37 49 PM"
src="https://user-images.githubusercontent.com/11356435/231041884-3fa70b3c-8aad-4b94-9700-d0d58885ad08.png">

### Testing

1. Ensure you have no default connectors set
2. Create a monitor
3. Navigate to the overview page. Observe the notice
4. Navigate to the edit monitor page for that montior. Observe the
notice.
5. Create a second monitor. This time, disable alerting for that monitor
6. Navigate to the edit page for the second monitor. Ensure that the
notice does not appear.

---------

Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
2023-04-13 13:36:55 -04:00
Rachel Shen
e35e924d92
[Reporting] Generate CSV Package (#151801)
## Summary

Partially resolves https://github.com/elastic/kibana/issues/150392 

This PR creates reporting related packages geared towards `Generate CSV`
functionality
- @kbn/generate-csv
- @kbn/generate-csv-types
- @kbn/reporting-common
- updated Readme.md for the @kbn/reporting plugin

### 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]
[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>
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
2023-04-13 10:27:35 -07:00
Dominique Clarke
92c8699cc2
[Synthetics] fetch license info in service api client (#154770)
## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.

Resolves https://github.com/elastic/kibana/issues/152723
Resolves https://github.com/elastic/synthetics-dev/issues/196

Fetches the license information and sends it as `license_level` to the
synthetics service.

Also stops syncing with the service if the license is expired.
2023-04-13 13:20:10 -04:00
Coen Warmer
7199327bca
[Cases] Remove no-data gate for Cases page (#154909) 2023-04-13 18:48:28 +02:00
Dominique Clarke
d089e58eb4
[Synthetics] add alerting config migration (#154758)
## Summary

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

Adds a migration for including alert configurations for documents <
8.6.0 where the alert config was not included.

### Testing

1. Check out 8.5.0
2. Create a new oblt-cli cluster, or run `yarn es snapshot` to connect
to ES
3. Log into Kibana on 8.5.0. Create a monitor
4. Check out this branch. 
5. Start Kibana and log into Kibana. Click on the monitor edit page for
the monitor you created. Inspect the network request for the monitor to
confirm `alert.status.enable: true` has been added to the monitor
attributes
2023-04-13 12:34:32 -04:00
Pierre Gayvallet
b75d89a2d8
Config loader: remove unecessary properties (#154902)
- Updates the logic of `ensureDeepObject` to remove unnecessary
properties when expanding the object
- We had three versions of this helper, centralized it within `@kbn/std`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-13 11:16:51 -05:00
Peter Pisljar
79d0143252
[lens] fixing lens error handling when auto apply is off (#154327) 2023-04-13 18:06:02 +02:00
Sébastien Loix
8550a69a54
[Content management] Update storage context (#154895) 2023-04-13 17:02:31 +01:00
Walter Rafelsberger
eb7db09da8
[ML] Explain Log Rate Spikes: Adds table action to copy filter to clipboard (#154311)
- Adds an action to the analysis results filter to copy a KUERY filter
for each row to the clipboard.
- Consolidates duplicate code for the Discover action into a custom
hook.
2023-04-13 17:27:21 +02:00
Kibana Machine
b1882495f0 skip failing test suite (#154916) 2023-04-13 10:52:29 -04:00
Kibana Machine
b07203d937 skip failing test suite (#154917) 2023-04-13 10:50:10 -04:00
Melissa Alvarez
c7c5a21680
[ML] Data Frame Analytics: support custom urls in jobs (#154287)
## Summary

Related meta issue: https://github.com/elastic/kibana/issues/150375

This PR:
- adds the ability to create custom urls for data frame analytics job -
accessible in the 'Edit' flyout in the jobs list
- adds access to the created custom urls in the data frame analytics
results table (in the 'Actions' column)
- moves the custom url component to a shared directory and is used in
both anomaly detection and data frame analytics



https://user-images.githubusercontent.com/6446462/229624946-b860c13d-19bb-4951-aeac-e7409864b56c.mp4

<img width="1023" alt="image"
src="https://user-images.githubusercontent.com/6446462/229625754-6a9277be-0da3-4f69-8a9a-f4a6fd1b632c.png">



### Checklist

Delete any items that are not applicable to this PR.

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

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-04-13 08:47:44 -06:00
Christos Nasikas
9cc51bf65b
[Cases] Do not add already attached alerts to the case (#154322)
## Summary

This PR filters out all alerts that are already attached to the selected
case. To avoid breaking changes and not confuse the users (trying to
find which alert is attached to which case) the UI will not produce any
error.

### Checklist

Delete any items that are not applicable to this PR.

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

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-04-13 07:29:20 -07:00
Pete Hampton
70500d7cd9
Don't exclude powershell.file.script_block_text from ES query (#154890)
## Summary

Threat Detection engineers require this field going forward. We have
updated the filterlists and artifacts, we just need this query to stop
excluding the field. The field was originally excluded because
researchers didn't require it and we were mindful of customer resources.
As this is a simple query change it's not a big PR.

### Checklist

Delete any items that are not applicable to this PR.

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


### Risk Matrix

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

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

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

| Risk | Probability | Severity | Mitigation/Notes |

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


### For maintainers

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-13 10:02:45 -04:00
Anton Dosov
f35659ff79
[Content Management] Cross Type Search - add msearch section to CM onboarding docs (#154896)
## Summary

Follow up to https://github.com/elastic/kibana/pull/154464
Partially resolve https://github.com/elastic/kibana/issues/152224 - Add
a `msearch` section to CM onboarding docs
2023-04-13 15:44:30 +02:00
Paul Tavares
2d7fb432db
[Security Solution][Endpoint] Un-skip and fix tests for Response Actions History Log (#154865)
## Summary

- Un-skips and fixes tests for the Response Actions History Log

Fixes: #153556
Fixes: #145635
2023-04-13 09:25:58 -04:00
Paul Tavares
d6a8a886bc
[Security Solution][Endpoint] Add additional tests for Policy Response (#154505)
## Summary

- Adds Cypress tests to validate that recent Policy response errors are
bubbled up and shown in Fleet Agent Details.
- Updated Fleet Agent Details display of Integrations with
`data-test-subj`'s for testing

In support of the above, the following was also introduced:

- New standalone `EndpointPolicyResponseGenerator` which also includes
one specific method to retrieve a "connect kernel failure"
- New data loaders for Endpoint Policy Responses
- Endpoint Emulator CLI was enhanced with a new panel that allows
sending policy responses to specific endpoints
- Added `EndpointMetadataGenerator.custom()` static method
- Creates a custom `EndpointMetadataGenerator` subclass based on input
arguments. allows for easier customization of generated endpoint hosts
    - currently supports setting Host OS and Agent version
- Like the above, added `EndpointDocGenerator.custom()` which currently
allow for setting a custom endpoint generator for use internally
- Added `version` and `os` to  `indexEndpointHosts` cypress task
- new cypress tasks:
   - `indexEndpointPolicyResponse` - load a policy response
- `deleteIndexedEndpointPolicyResponse` - delete previously loaded
policy response
-
2023-04-13 09:24:51 -04:00