Commit graph

60248 commits

Author SHA1 Message Date
spalger
3d0756fc35
fix triggerActionsUi overage 2023-01-24 19:25:56 -06:00
Nicolas Chaulet
c9617dc9e0
[Fleet] Update openAPI to include agent metrics (#149455) 2023-01-24 18:23:47 -07:00
Jonathan Budzenski
612d05d469 skip flaky suite (#103043) 2023-01-24 17:43:35 -06:00
Zacqary Adam Xeper
cb2f07b570
[RAM] Fix case conversion of frequency.notify_when in API (#148838)
## Summary

Closes #148572

Fixes an issue where rules APIs required `frequency.notifyWhen` to be
sent/received instead of `frequency.notify_when`


### 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: Julia <iuliia.guskova@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-01-24 16:53:59 -06:00
Brandon Morelli
2228086ae6
[APM] docs: SDH documentation updates (#149359)
## Summary

Two small documentation updates based on feedback in recent SDHs.
2023-01-24 14:30:18 -08:00
Jon
4fa3cdcac6
[artifacts/container-image] Fix image tag when triggering update (#149449)
Instead of passing the entire qualified tag when triggering an update,
this sets the image tag to the abbreviated commit.
2023-01-24 16:25:46 -06:00
Andrew Tate
ed51f0f1ef
[Lens] only reload embeddable when a new message was actually added (#149424) 2023-01-24 15:26:39 -06:00
Lisa Cawley
4c9a76cabd
[DOCS] Fix incorrect alt text for images (#149371) 2023-01-24 12:49:33 -08:00
Dominique Clarke
0592abdab5
[Synthetics] Omit or include ssl keys when appropriate for project monitors and private locations (#149298)
## Summary

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

1. [Prevents tls fields from being
saved](https://github.com/elastic/kibana/pull/149298/files#diff-56296f634bf379eb71629f426c670cd030d2a15263a59964847c0d10af09a767R14)
on the Synthetics Integration policy when `is_tls_enabled` is false
2. Ensures `is_tls_enabled` is set properly for project monitors
([http](https://github.com/elastic/kibana/pull/149298/files#diff-0f42bb3b11a6ab864dee3488d5e9f7282adc009a261b3caee743a880b825c766R73)
and
[tcp](https://github.com/elastic/kibana/pull/149298/files#diff-3ad87e629abc6f17c395e8435c94f0f1a6274c9efea7d24ab81b7635ef0e43dfR69)).
This ensures that when a monitor is sent to a public location or a
private location, the `ssl` fields are sent or stripped appropriately.

### Testing

1. Create a private location
2. Create 2 lightweight project monitors using the following
configuration
```
- type: tcp
  id: 'tls-enabled'
  name: 'TLS-Enabled'
  hosts: ["8.8.8.8:80"]
  ssl:
     verification_mode: 'strict'
```
```
- type: tcp
  id: 'tls-disabled'
  name: 'TLS-Disabled'
  hosts: ["8.8.8.8:80"]
```
3. Set these monitors to execute from both a private and public location
via the `monitor` key in your `synthetics.config.ts` file.
```
    monitor: {
      schedule: 3,
      privateLocations: ["YOUR PRIVATE LOCATION"],
      locations: ["us_central"], // to test against dev environment
    },
```
4. Navigate to the agent policy for the private location and inspect the
full policy. Ensure the Synthetics policy on the agent package policy
does not have `ssl` fields set for ssl disabled monitor. Ensure the
`ssl` fields are set for the ssl enabled monitor.
2023-01-24 14:56:38 -05:00
Steph Milovic
bd940e8d3a
[Security solution] Fix IP/geo location in Top N Flow Table (#149369) 2023-01-24 12:41:55 -07:00
Shahzad
02d99a97ee
[Synthetics] Test run steps list metrics- content size (#149339) 2023-01-24 20:39:17 +01:00
Paul Tavares
2370b62b99
[Security Solution][Endpoint] Adjust the Response Actions file download API so that it is driven by a file_id (#149267)
## Summary

- Adjust the file download APIs (info and download) to use a file ID as
a route param instead of having the API calculate the File ID
- Adjusts the UI code to ensure the new APIs are called correctly
2023-01-24 14:36:23 -05:00
Walter Rafelsberger
caec0ed8d8
[ML] Transforms: Use concise fragment syntax. (#149434)
Refactor to use concise fragment syntax (`<>...</>` instead of `<Fragment>...</Fragment>`) where applicable.
2023-01-24 19:52:18 +01:00
Pablo Machado
d313c950d1
[145663] Refactor explore pages to migrate HoverActions to CellActions (#148056)
Epic: https://github.com/elastic/kibana/issues/144943


## Summary
Update explore pages to use the new `CellActions` component instead of
`HoverActions `.

### What is included?
* Update the user, host, and network page tables.

<img width="1512" alt="Screenshot 2023-01-17 at 13 12 16"
src="https://user-images.githubusercontent.com/1490444/212896520-f41e9026-cef0-4a37-8bd1-35784a87ca09.png">
<img width="1482" alt="Screenshot 2023-01-17 at 13 19 34"
src="https://user-images.githubusercontent.com/1490444/212897411-cd3c3ef8-bca0-461b-a1ff-c7dd67159d1b.png">

* Fields rendered when clicking on "+{N} more" 
<img width="248" alt="Screenshot 2023-01-17 at 12 51 38"
src="https://user-images.githubusercontent.com/1490444/212892255-2ecd7050-75f6-4883-b331-1fed527de53f.png">


### What is NOT included?
* Visualizations
* Fields on details pages. They are also used by the Timeline and need
to be draggable.
* Timeline
* Datagrid tables - Events and Alerts
* Plugins



### 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
- [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>
2023-01-24 11:44:43 -07:00
Shahzad
ded5f9a2ca
[Synthetics] Failed tests by step panel (#149322)
## Summary

Failed tests by step panel

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

<img width="1523" alt="image"
src="https://user-images.githubusercontent.com/3505601/214053308-458c023e-aaab-4db6-8aa4-a18ce150ce19.png">
2023-01-24 19:22:46 +01:00
Jorge Sanz
cdc373719a
[Maps] Update EMS resources (#149331)
* Updates to the latest released version of `@elastic/ems-client`
(8.4.0)
* Updates link to EMS landing page to 8.6
* Passes Kibana version to EMS Client instance to request explicitly to
point to the correct API endpoints. This change is introduced to avoid
needing to keep releasing EMS Client with the rest of the stack.
2023-01-24 10:59:28 -07:00
Quynh Nguyen (Quinn)
b255217c32
[ML] Fix ML page crash due to css string (#149428)
## Summary

Fix a regression introduced by merge of
https://github.com/elastic/kibana/pull/147322 due to css string not
being wrapped in emotion `css` tag.


![image](https://user-images.githubusercontent.com/43350163/214348591-9f931d0d-8e15-42e4-9a30-65c159e4d149.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)
2023-01-24 10:55:55 -07:00
Jon
cfd9cd8ff9
[artifacts/container-image] Trigger image tag update (#149437)
Reopens #149143 with updates to the target file and service

After a commit is merged, tested, and images are built and pushed to the
container registry we need to send a notification that a new tag is
available.

This triggers a promotion pipeline with the latest container tag when:
1) the branch is tracked (i.e. main, and not a personal branch) 1)
~triggered from our on-merge test pipeline.~
https://github.com/elastic/kibana/pull/149350 had to remove support for
this - we're triggering via REST now which removes the from trigger
environment variable.
2023-01-24 11:49:32 -06:00
Tiago Costa
64af7ab286
skip flaky suite (#88639) 2023-01-24 17:47:14 +00:00
Kyle Pollich
f0a1f88e99
[Fleet] Flesh out Fleet architecture diagram a bit more (#149420)
## Summary

Adding some more detail to Fleet's dev docs architecture diagram 🙂
2023-01-24 12:35:40 -05:00
Kurt
de4e53d712
Upgrade jsonwebtoken from 8 to 9 (#148128)
## Summary

Upgrading the `jsonwebtoken` library used in
`cloud_integration/cloud_chat` plugin from v8.5 to v9.0

## Migration
After reviewing the affected code it looks like this upgrade shouldn't
cause any breaking changes. Please see the v8 --> v9 migration guide
[here](https://github.com/auth0/node-jsonwebtoken/wiki/Migration-Notes:-v8-to-v9)

## Questions for reviewers
- What is the size and type of `secret` that we are passing into
`generateSignedJwt`?

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
2023-01-24 12:32:44 -05:00
Angela Chuang
7c4789d640
[SecuritySolution] Replace risk score over time with Lens Embeddable (#149035)
## Summary
Implements: https://github.com/elastic/kibana/issues/149015

Please Enable feature flags. Please add this to kibana.dev.yml
xpack.securitySolution.enableExperimental: ['chartEmbeddablesEnabled']

---
### Replace risk score over time with Lens Embeddable

Before:
<img width="2543" alt="Screenshot 2023-01-17 at 10 28 23"
src="https://user-images.githubusercontent.com/6295984/212875145-f39fef08-c152-4c7e-8d0f-cf8e259c0b05.png">

After:
<img width="926" alt="Screenshot 2023-01-24 at 15 03 40"
src="https://user-images.githubusercontent.com/6295984/214329885-71e8166b-07ec-4f09-bece-919189d655ea.png">


### Alerts By severity on host / network / user details should apply
global filters
<img width="1673" alt="Screenshot 2023-01-19 at 11 06 21"
src="https://user-images.githubusercontent.com/6295984/213426977-4b803513-69f4-4074-b45d-2002c3f8fecf.png">

### Styling for donuts on Entity Analytics dashboard
(Moving the legend to left side of the chart so its actions button
wouldn't overlap with chart action)
<img width="1654" alt="Screenshot 2023-01-19 at 11 08 47"
src="https://user-images.githubusercontent.com/6295984/213427320-0fa3a9aa-f0d4-435a-87d3-5108b5c7f991.png">


Preview:
[Host risk score over
time](https://kibana-pr-148624.kb.us-west2.gcp.elastic-cloud.com:9243/s/data/app/security/hosts/name/Angelas-MacBook-Pro.local/hostRisk?sourcerer=(default:(id:security-solution-data,selectedPatterns:!(%27filebeat-*%27,%27logs-*%27,%27packetbeat-*%27,%27-*elastic-cloud-logs-*%27)))&timerange=(global:(linkTo:!(timeline),timerange:(from:%272023-01-18T00:00:00.000Z%27,fromStr:now%2Fd,kind:relative,to:%272023-01-18T23:59:59.999Z%27,toStr:now%2Fd)),timeline:(linkTo:!(global),timerange:(from:%272023-01-18T00:00:00.000Z%27,fromStr:now%2Fd,kind:relative,to:%272023-01-18T23:59:59.999Z%27,toStr:now%2Fd)))&timeline=(activeTab:query,graphEventId:%27%27,id:%2736333270-9731-11ed-a0f5-f16ed1963ee6%27,isOpen:!f))
[User risk score over
time](https://kibana-pr-148624.kb.us-west2.gcp.elastic-cloud.com:9243/s/data/app/security/users/name/angelachuang/userRisk?sourcerer=(default:(id:security-solution-data,selectedPatterns:!(%27filebeat-*%27,%27logs-*%27,%27packetbeat-*%27,%27-*elastic-cloud-logs-*%27)))&timerange=(global:(linkTo:!(timeline),timerange:(from:%272023-01-18T00:00:00.000Z%27,fromStr:now%2Fd,kind:relative,to:%272023-01-18T23:59:59.999Z%27,toStr:now%2Fd)),timeline:(linkTo:!(global),timerange:(from:%272023-01-18T00:00:00.000Z%27,fromStr:now%2Fd,kind:relative,to:%272023-01-18T23:59:59.999Z%27,toStr:now%2Fd)))&timeline=(activeTab:query,graphEventId:%27%27,id:%2736333270-9731-11ed-a0f5-f16ed1963ee6%27,isOpen:!f))

https://p.elstc.co/paste/2MIN+pHd#TETZwPh15r64HQ2z0Cn26Z321XCxe+2DqliqF5-CHmr
Designers' review:
https://github.com/elastic/kibana/issues/149123

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2023-01-24 17:13:32 +00:00
Jatin Kathuria
18aff792bf
[feat][Kibana Presentation] Options List new feature (#149121)
## Background
Security solution recently started using controls plugin to provide
users some extra filtering capability with help of options list control.

During this implementation, there was some feedback was given from
design team + we were facing some minor issues because of the caches.
Below section gives the list of changes and the reasoning behind each
change. All of these changes were discussed with @ThomThomson

## Summary

This PR introduces 3 new functionalities for optionsList embeddables.

1. Cache invalidation option when reloading an optionsList
- In security solution we have transactional alerting system, where user
frequently update alerts data
- We need the latest data and 1 minute cache of optionsList was
preventing us from doing so.
- This change adds the capability to clear the cache from an embeddable.
3. option to hideSearch Panel
- As a client of control plugin, we look some control over what panels
are visible and what are not.
5. Option to add custom placeholder for optionsList
- Out product team felt that default placeholder for optionsList `Any`
may be confusing for the user and hence I have added the option for
clients to provide a placeholder.

### Checklist

Delete any items that are not applicable to this PR.

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials

### 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-01-24 18:11:34 +01:00
Zacqary Adam Xeper
d60d537eec
[RAM] Add error for action interval shorter than check interval (#148919)
## Summary

Closes #148569

Adds form error and API error for action intervals shorter than rule
check intervals

<img width="585" alt="Screen Shot 2023-01-13 at 1 46 55 PM"
src="https://user-images.githubusercontent.com/1445834/212406181-059b53e4-a52d-44db-ba03-1a7285c676ce.png">
<img width="592" alt="Screen Shot 2023-01-13 at 1 46 42 PM"
src="https://user-images.githubusercontent.com/1445834/212406188-9b59fc05-45c0-4f93-b68c-c1540d46cd2b.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)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-01-24 11:06:41 -06:00
Konrad Szwarc
f3e96bf1e3
[Defend Workflows] [Fix] Test for --help validation (#149393) 2023-01-24 09:20:35 -07:00
Aleh Zasypkin
6bf81356c8
Remove uglify-js package.json resolutions. (#149395) 2023-01-24 16:56:36 +01:00
Kyle Pollich
61ce24d716
[Fleet] Fix parsing logic for data_stream.hidden manifest field (#149357)
## Summary

Fixes package archive parsing logic for the
`index_template_data_stream.hidden` property, implemented in line with
other `index_template.*` "dotted property name" values from package
manifests.

## To test

Create a test package that includes
`elasticsearch.index_template.data_stream.hidden: true` in a
`data_stream/**/manifest.yml` file, install the package, then verify
(via dev tools - NOT stack management!!!) that the generated index
template contains `data_stream.hidden: true`


![image](https://user-images.githubusercontent.com/6766512/214155715-1a78a7f6-cde0-4cb1-a6e3-fd1ac3749f1e.png)

It'd be great to have automated tests around this, but testing our
archive parsing logic is very challenging due to the nature of reading
directories/files and how much mocking is required. See
https://github.com/elastic/kibana/issues/147050. I'll see about adding
an integration test for this.
2023-01-24 10:14:53 -05:00
Ignacio Rivas
c9159c76d3
[Index Management] fix flaky test (#149384) 2023-01-24 16:13:28 +01:00
Søren Louv-Jansen
048a65dc09
[APM] Allow calling createInternalESClient without context (#149320) 2023-01-24 15:30:23 +01:00
Shahzad
1dc5748d5d
[Synthetics] Errors list active state (#149387)
Fixes https://github.com/elastic/kibana/issues/145373
2023-01-24 15:20:53 +01:00
Alejandro Fernández Haro
09c1113127
[FTRs] Execution Context: fix no data flakiness (#149406)
Resolves https://github.com/elastic/kibana/issues/112102
2023-01-24 15:03:37 +01:00
ofiriro3
cb599840e3
[Cloud Posture] - Deprecate csp rule remove migration object (#148530) 2023-01-24 05:50:54 -07:00
Rudolf Meijering
cfee703139
Bump elasticsearch-js to 8.6.0-canary.3 (#148521)
## Summary

Bump elasticsearch-js to 8.6.0-canary.3 to unblock
https://github.com/elastic/kibana/issues/145653

The updated version of elasticsearch-js comes with some type changes
that causes typescript type checking to fail. I've fixed the type errors
that were obvious/easy but left todo's for some types which were harder
for me to figure out. If any of these todo's are in your team's code,
please contribute directly to the branch to fix them.


### Checklist

Delete any items that are not applicable to this PR.

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


### Risk Matrix

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

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

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

| Risk | Probability | Severity | Mitigation/Notes |

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


### For maintainers

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

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Thom Heymann <thom.heymann@elastic.co>
Co-authored-by: weltenwort <stuermer@weltenwort.de>
2023-01-24 05:49:30 -07:00
Mark Hopkin
f7a1ce95a9
[Fleet] Use optimistic locking when updating installed_es on input package policy creation (#148883)
## Summary

Part of #145529 

When creating an input package policy, we now create index templates and
ingest pipelines. As part of this operation we have to update
installed_es on the installation saved object, there is a risk of lost
updates if multiple package policies are created at the same time, to
combat this i have used the in built saved object optimistic
concurrency.

I have tested this locally, we do start see conflicts occur if I create
500 package policies in concurrent batches of 25, but I think we should
have a dedicated bulk endpoint if we want to handle more than that.

I haven't pushed the automated tests as they take a few minutes to run
and I don't think there is a big enough benefit to running them as part
of CI every time.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-01-24 05:38:25 -07:00
David Roberts
b87dca93c3
[ML] Remove job_type from job definitions in modules (#149247)
All the job definitions in ML modules contain the field `job_type`. For
anomaly detection jobs this is always `anomaly_detector`. Officially it
is not a valid input to the create job API. Elasticsearch accepts it
(which is technically a bug as it's out-of-spec) which is why it has
never been noticed before. However, the language clients do not accept
it, which causes problems if somebody wants to create module jobs using
a language client. It's best that the jobs in our modules conform
accurately to the specification of a valid job creation request.
2023-01-24 12:08:54 +00:00
Walter Rafelsberger
05d04ce1e0
[ML] Consolidate query_utils into package @kbn/ml-query-utils (#149224)
Consolidates more `query_utils` into package `@kbn/ml-query-utils`.
2023-01-24 13:07:43 +01:00
Abdul Wahab Zahid
83d799a9c7
[Synthetics] Better formatting for waterfall timeline tooltips (#149142)
Co-authored-by: Shahzad <shahzad31comp@gmail.com>
2023-01-24 11:59:45 +01:00
Jordan
48eb4d51d1
[Cloud Posture] CIS AWS support - changes to findings tables (#148945) 2023-01-24 03:54:15 -07:00
Marco Liberati
06cec01479
[Lens] Enable previous time shift when using a date histogram (#149126)
## Summary

Fixes #104259 

This PR expands the support of the `previous` time shift for
visualisations with a date histogram defined.
On the implementation side, an absolute time shift in the shape of
`endAt( startRange )` is leveraged to make it work the `previous` shift:
anchoring the shift to the beginning of the current range will make sure
to compute the right shift in terms of buckets in order to avoid
misaligned shifts and the main reason why this feature has been disabled
initially.

I've tried to condense an explanation here with this diagram of the
misalignment problem:


![previous_before](https://user-images.githubusercontent.com/924948/213234848-40e3382a-843d-43fa-83d1-769a5f2e7953.png)

With the current approach, there's a small time range overlap between
the two requested interval, but that's the result of the rounding logic
to get both shifts aligned.


![previous_2](https://user-images.githubusercontent.com/924948/213235429-1c99aefb-e18b-450a-b2d7-45b7d74c9e71.png)

The only alternative to avoid the overlap is to get a gap between the
two, but the former seems a better result to me.

### 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-01-24 11:32:17 +01:00
Shahzad
d692d40957
[Synthetics] Object types panel and thresholds (#149099)
Fixes https://github.com/elastic/kibana/issues/145395
Fixes https://github.com/elastic/kibana/issues/145892
2023-01-24 11:12:37 +01:00
Julia Bardi
ccecb2581e
[Fleet] added back batch exec for update tags (#148618)
## Summary

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

Fixing issue of bulk update tags not working with the new agent status
runtime field.
Refactored update tags to use batching again, resolving 10k agent ids at
a time and `updateByQuery` on batches.
Works locally with dummy agents, has to be tested on cloud with horde to
simulate conflicts.


### Checklist

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-01-24 11:08:09 +01:00
claracruz
ca815a7f5b
148790 - Fix scroll style for setup guide flyout (#149242)
Fixes #148790
2023-01-24 09:30:19 +00:00
Elena Stoeva
d68e9c7e07
Fix a11y issue with dev tool tabs (#149349)
Fixes https://github.com/elastic/kibana/issues/148538

## Summary

This PR fixes the a11y issue with the Beta badge used in the Dev Tools
tabs.

The proposed solution in the GH issue (moving `EuiBetaBadge` outside of
the `EuiTab` component) didn't work well as it introduced another a11y
issue - `EuiTabs` would contain an `EuiBetaBadge` component which is not
its direct child (it needs to wrap `EuiTab` components only). Also, this
solution caused some styling issues.

Removing the `tooltipContent` prop from `EuiBetaBadge` resolves the a11y
issue without introducing other a11y issues. Also, the `Beta` text is
still announced by screen readers as part of the `Painless Lab` tab
(tested on Mac's VoiceOver and the Screen Reader Chrome extension) and
the design is not changed.

<img width="1828" alt="Screenshot 2023-01-23 at 16 17 55"
src="https://user-images.githubusercontent.com/59341489/214102739-bf0783e3-755a-474d-8978-17fb4b7d0fbd.png">



### Checklist

- [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] 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))
2023-01-24 09:21:34 +00:00
Katerina Patticha
199f115916
[APM] Fix mobile indices (#149230)
## Summary

Refactor mobile endpoints and fix indices
- rename `getSessionsChart` to `getMobileSessions`
- rename `getHttpRequestsChart` to `getMobileHttpRequests` 
- split queries for `mobile_stats` instead of queries all indices.
Extend `getMobileSessions` and `getMobileHttpRequests` so they can be
used in `mobile_stats`
- remove the metrics 'crashCount` and `maxLoadTime` since they are not
captured yet

related: https://github.com/elastic/kibana/issues/146615

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-01-24 01:30:43 -07:00
LEE SEUNGHYO
95c2493e77
[Dashboard] Fix Phrase_filter query for scripted fields (#148942) (#148943)
- ISSUE [Dashboard] Visualize Library doesn't work filter on scripted
fields of Array Type. #148942

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Lukas Olson <lukas@elastic.co>
2023-01-24 03:29:11 -05:00
Julian Gernun
611e5af179
renderCustomActionsRow with named params instead of args (#149304)
## Summary

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

## QA

Run the alerts table and check that the actions cell is working. 


https://user-images.githubusercontent.com/17549662/214009339-afc1fe7f-fb2a-4461-aec9-70a2335a875b.mov
2023-01-24 09:04:00 +01:00
James Gowdy
afb84dcbcd
[ML] Adding ML execution context to es requests (#148746)
Adds the page path as the ID to our existing execution context and adds
an additional context entry to every ml kibana endpoint.
In the search slow log, the id for each slow search from ML will look
like this:


`"a90d5297-fd77-4ea0-ac0d-c302963d7e75;kibana:application:ml:%2Fjobs%2Fnew_job%2Fsingle_metric;application:ml:%2Fapi%2Fml%2Fjobs%2Fnew_job_line_chart`

Separating by semicolon:
`a90d5297-fd77-4ea0-ac0d-c302963d7e75` -> kibana ID

`kibana:application:ml:%2Fjobs%2Fnew_job%2Fsingle_metric` -> default
context items added on the client side to show the source page.

`application:ml:%2Fapi%2Fml%2Fjobs%2Fnew_job_line_chart` -> new items
added by the server to show the source endpoint path.

Note, the paths have been encoded to replace the forward slashes.

Part of https://github.com/elastic/kibana/issues/147378
2023-01-24 07:58:42 +00:00
Maja Grubic
badf9a808e
[Custom Branding] Replace EuiLoadingElastic with EuiLoadingSpinner (#149261)
## Summary

As part of the Custom Branding project, we need to replace
`EuiLoadingElastic` in places where it appears and replace it with a
plain `EuiLoadingSpinner`. This PR does so in saved objects table and
related modals and `share` plugin.


### 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] 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))~
- [ X This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### For maintainers

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

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-24 08:19:57 +01:00
Alexander Wert
45256085db
Added LDAP icon to span icons (#149330)
## Summary

With https://github.com/elastic/apm-agent-java/pull/2977 the Java agent
adds instrumentation for LDAP spans.
Added span icon for LDAP spans:

<img width="590" alt="image"
src="https://user-images.githubusercontent.com/866830/214064572-66be6de5-d3de-4ea0-9e1f-e59b7f611ed5.png">
2023-01-24 07:21:13 +01:00
Kibana Machine
0bef28b31c
[api-docs] 2023-01-24 Daily api_docs build (#149377)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/227
2023-01-24 00:54:21 -05:00