Commit graph

41434 commits

Author SHA1 Message Date
Maxim Kholod
d2aa051887 show unpriviliged page for benchmark and dashboard pages 2024-08-22 16:52:06 +02:00
Patrick Mueller
07717a43ab
[ResponseOps][alerting] add rule info to logging in alertsClient (#190857)
## Summary

While investigating some issues with the alertsClient, I realized that
we weren't writing out any rule information for the logged messages.
This made debugging quite difficult, as I wanted to see the rule, so had
to search through the alerts indices for the specified alert to get it's
rule id, rule type, etc.

As an example, see https://github.com/elastic/kibana/issues/190376

This PR adds that kind of rule info to the logged messages in
alertsClient, as well as the typical sort of tags we write out (rule id,
rule type, module).
2024-08-22 10:29:22 -04:00
Alexey Antonov
e782811877
fix: [Obs Inventory][KEYBOARD]: The map view tooltips must be available on keyboard focus (#187861)
Closes: https://github.com/elastic/observability-accessibility/issues/43
Closes: https://github.com/elastic/observability-accessibility/issues/18

## Description
- https://github.com/elastic/observability-accessibility/issues/43: The
Observability Inventory map view has a grid of map tiles that each
accept a mouse event to show a tooltip. This tooltip must also be
available when the tile receives keyboard focus.

- https://github.com/elastic/observability-accessibility/issues/18: The
Inventory > Kubernetes Pods popover stays open when I click "Create
Inventory Rule" and the modal dialog opens. This creates an odd stacking
order and obscures content for users at smaller viewport width.

## Steps to recreate
1. Open [Inventory Hosts map
view](https://keep-serverless-fyzdg-f07c50.kb.eu-west-1.aws.qa.elastic.cloud/app/metrics/inventory?inventoryViewId=%270%27&waffleFilter=(expression:%27%27,kind:kuery)&waffleTime=(currentTime:1719523489979,isAutoReloading:!f)&waffleOptions=(accountId:%27%27,autoBounds:!t,boundsOverride:(max:1,min:0),customMetrics:!(),customOptions:!(),groupBy:!(),legend:(palette:cool,reverseColors:!f,steps:10),metric:(type:cpu),nodeType:host,region:%27%27,sort:(by:name,direction:desc),timelineOpen:!f,view:map)&assetDetailsFlyout=(assetType:!n,detailsItemId:!n)&assetDetails=!n)
2. Change Hosts to Kubernetes Clusters
3. Try to select specific node using the keyboard 

## Screens


https://github.com/user-attachments/assets/9ab3b20d-1144-48ed-9760-363f43bafb4b



https://github.com/user-attachments/assets/e41bba9f-f3c5-4ce7-bba4-98cf26a2137a
2024-08-22 16:46:37 +03:00
Eyo O. Eyo
44fafb88d5
Extract authorization logic and it's peripherals into packages (#190028)
## Summary

This PR is a precursor to https://github.com/elastic/kibana/pull/189871,
as part of the spaces improvement initiative there's a need to be able
to share the user privilege assignment component between the roles
experience and the new spaces experience to prevent duplication of
business logic and cohesiveness in the privilege assignment experience.

The aforementioned PR extracts the required component into it's own
package so it might be consumed as needed, this PR is particularly
concerned with extracting business logic said UI component depends on
that exists still within the security plugin. For context; the security
plugin already depends on the spaces plugin, so having the spaces plugin
in turn statically depend on the security plugin creates a cyclic
dependency. That being said to complement the eventual state of said
component so it might be imported elsewhere outside of the security
plugin there's a need to extract further logic into standalone packages,
so that the spaces plugin can consume this plugin without the afore
mentioned cyclic dependency problem.


#### Visually; 

##### Problem;


![image](https://github.com/user-attachments/assets/6be85fb0-3ba3-4d5f-b614-3c0ff2cf7c69)

##### Proposal

![image](https://github.com/user-attachments/assets/5c4f423d-4ad4-48f4-b5bd-2ea0a99b196e)[^legend]

[^legend]: items marked in blue are the packages created in this PR,
whilst the entire diagram is the proposed future state

<!--### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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>
2024-08-22 15:44:54 +02:00
Pierre Gayvallet
7217ad0c05
Change the ownership of the inference plugin (#191071)
## Summary

Change the ownership from `@elastic/kibana-core` to
`@elastic/appex-ai-infra`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-22 15:43:08 +02:00
Sander Philipse
e932b932f0
[Search] Fix one instance of div nesting inside p warning (#191061)
## Summary

This fixes one error of a div being nested inside of a p, and fixes some
header order issues.
2024-08-22 09:33:31 -04:00
Maxim Kholod
432faea77b
[Cloud Security] align vertically controls on bechmark pages (#191066)
## Summary

- part of https://github.com/elastic/security-team/issues/10316
- fixes
https://github.com/elastic/security-team/issues/9428#issuecomment-2107656242

## Screenshots


<img width="1725" alt="Screenshot 2024-08-22 at 12 34 47"
src="https://github.com/user-attachments/assets/1ff67185-e67d-4aad-9fa2-004508149230">
<img width="1728" alt="Screenshot 2024-08-22 at 12 34 54"
src="https://github.com/user-attachments/assets/7c2f359c-f8c9-4b1d-8a44-b7be76e16610">
2024-08-22 14:34:32 +02:00
Saarika Bhasi
a524e27bed
[Search] Search assistant plugin setup (#190633)
## Summary

Introducing new plugin for search assistant. in the future this will be
extension of Observability AI solution solution
[plugin](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/observability_ai_assistant)

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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Sander Philipse <sander.philipse@elastic.co>
2024-08-22 06:27:33 -05:00
Cauê Marcondes
cdcdfddd3f
[APM][ECO] enabling FF by default (#191056)
I missed changing these two files on my previous
[PR](https://github.com/elastic/kibana/pull/190422).
2024-08-22 05:24:10 -05:00
Maryam Saeidi
34d392b9cd
Add alert grouping functionality to the observability alerts page (#189958)
Closes #190995

## Summary

This PR adds grouping functionality to the alerts page alert table based
on @umbopepato's implementation in this [draft
PR](https://github.com/elastic/kibana/pull/183114) (basically, he
implemented the feature and I adjusted a bit for our use case :D).

For now, we only added the **rule** and **source** as default grouping,
and I will create a ticket to add tags as well. The challenge with tags
is that since it is an array, the value of the alert is joined by a
comma as the group, which does not match with what we want for tags.


![image](https://github.com/user-attachments/assets/c08c3cb1-4c6c-4918-8071-3c5913de41f6)

Here is how we show the rules that don't have a group by field selected
for them: (We used "ungrouped" similar to what we have in SLOs)


![image](https://github.com/user-attachments/assets/280bbd34-6c3b-41c1-803b-dcc6448f6fb4)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: DeDe Morton <dede.morton@elastic.co>
Co-authored-by: Shahzad <shahzad31comp@gmail.com>
2024-08-22 12:20:24 +02:00
Carlos Crespo
00975ad1a4
[Infra] Add a link to host metrics docs (#190993)
## Summary

The link is not shown for K8s pods

<img width="500px" alt="image"
src="https://github.com/user-attachments/assets/5c86d44e-4088-4bd6-a151-3fcf518dc752">

The link is shown for hosts

<img width="500px" alt="image"
src="https://github.com/user-attachments/assets/7b195990-1b28-4e73-818e-3024a0725007">



### How to test

- Navigate to `Inventory` 
- Click on Alerts and Rules > Infrastructure > Create Inventory rule
- Click on the metric to open the metric selection popover
  - Validate if the link appears and redirects to the docs page
- Do the same with other asset types (Containers, Docker, etc)
2024-08-22 12:15:13 +02:00
James Gowdy
3177b037d7
[ML] File upload: Adds support for PDF files (#186956)
Also txt, rtf, doc, docx, xls, xlsx, ppt, pptx, odt, ods, and odp.

Adds the ability to automatically add a semantic text field to the
mappings and a `copy_to` processor to duplicate the field. This is
needed for the mappings generated for the attachment processor which
adds a nested `attachment.content` field which cannot be used as a
semantic text field.

After a successful import, a link to Search's Playground app is shown.
Navigating there lets the user instantly query the newly uploaded file.


https://github.com/user-attachments/assets/09b20a5f-0e02-47fa-885e-0ed21374cc60

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2024-08-22 11:14:59 +01:00
Antonio
c5b38e487a
[ResponseOps][Connectors] Add deprecation warning to the Teams Connector (#190958)
Fixes #190944

## Summary

**The exact text is still a work in progress.**

<img width="895" alt="Screenshot 2024-08-21 at 11 02 37"
src="https://github.com/user-attachments/assets/8aca356d-cd3d-425d-b849-7769b18324d9">

---------

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2024-08-22 04:08:30 -05:00
Gergely Kalapos
5c0991b03e
Add otel datastream patterns to APM indices (#190533)
## Summary

Part of the OTel effort. This PR adds otel datastream patterns into the
default indices that are used by the APM UI.


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


### 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: Caue Marcondes <caue.marcondes@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-22 04:07:24 -05:00
Yngrid Coello
a04e5f94e4
[Dataset quality] Use dockerized package registry in api tests (#190688)
Closes https://github.com/elastic/kibana/issues/189802.

This PR aims to use a dockerized package registry version for testing.
In order to test it locally you have to set the value of
`FLEET_PACKAGE_REGISTRY_PORT` env var in your terminal, and you also
need to have a docker daemon running.

For example, you can open a terminal and start the server
```
  node x-pack/plugins/observability_solution/dataset_quality/scripts/api --server
```
then open a new terminal set the var value and start the runner with the
specific test using this configuration
```
  export set FLEET_PACKAGE_REGISTRY_PORT=12345
  node x-pack/plugins/observability_solution/dataset_quality/scripts/api --runner --grep-files=integrations
```
If you want to test again without the dockerized version, you should
remove the value of the var
```
  unset FLEET_PACKAGE_REGISTRY_PORT 
```
2024-08-22 04:06:42 -05:00
Aleh Zasypkin
3ac931fb79
fix(security, http): expose authentication headers in the authentication result when HTTP authentication is used (#190998)
## Summary

When Kibana tries to authenticate a request that already has an
`Authorization` header (not a cookie, client certificate, or Kerberos
ticket), the authentication is performed by the [HTTP authentication
provider](https://www.elastic.co/guide/en/kibana/current/kibana-authentication.html#http-authentication).

Unlike session/Kerberos/PKI providers, this provider returns an
authentication result that doesn't explicitly tell Core which
authorization headers should be used (e.g., `t.authenticated({ state:
authenticationResult.user, --> requestHeaders:
authenticationResult.authHeaders <-- ... });`), assuming that Core will
just use the headers from the request. The `Authorization` header is
forwarded to Elasticsearch by default, no additional configuration is
required.

This worked well previously, but I think with the introduction of the
the
[`getSecondaryAuthHeaders`](https://github.com/elastic/kibana/pull/184901)
method this is the first time where this assumption doesn't hold.
Internally, this method tries to reuse authentication headers that were
provided to Core by the authentication provider during the request
authentication stage — headers that the HTTP authentication provider
never provided before.

This PR makes the HTTP authentication provider behave consistently with
the rest of the providers we support today.
2024-08-22 09:48:35 +02:00
Ilya Nikokoshev
2a8b6d0a44
[Automatic Import] Better recognize (ND)JSON formats and send samplesFormat to the backend (#190588)
## Summary

This adds a `samplesFormat` group to the API. This group is filled out
by the frontend when parsing the provided samples and used to set the
log parsing specification for the produced integration.

We check this parameter to add toggle to support multiline
newline-delimited JSON in the filestream input.

## Release note

Automatic Import now supports the 'multiline newline-delimited JSON' log
sample format for the Filestream input.

## Detailed Explanation

We add the optional `samplesFormat` group to the API, consisting of 
 - `name`, 
 - (optional) `multiline`, 
 - and (optional) `json_path`.

Example values of this parameter:

- `{ name: 'ndjson', multiline: false }` for a newline-delimited JSON,
known as [NDJSON](https://github.com/ndjson/ndjson-spec) (where each
entry only takes one line)
- `{ name: 'ndjson', multiline: true }` for newline-delimited JSON where
each entry can span multiline lines
- `{ name: 'json', json_path: [] }` for valid JSON with the structure
`[{"key": "message1"}, {"key": "message2"}]`
- `{ name: 'json', json_path: ['events'] }` for valid JSON with the
structure `{"events": [{"key": "message1"}, {"key": "message2"}]}`

The `json_path` parameter is only relevant for `name: 'json'` and refers
to the path in the original JSON to the array representing the events to
ingest. Currently only one level is recognized:

Not all combinations of a log format with input type will work; more
supported combinations as well as better user feedback on unsupported
combinations will come later (see
https://github.com/elastic/security-team/issues/10290).

In this PR we add support for the multiline NDJSON format for the
`fileinput` input type. This support comes in the form of the
user-changeable toggle under "Advanced Settings" that will be set to on
in cases where we multiline NDJSON format

---------

Co-authored-by: Marius Iversen <marius.iversen@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-22 04:25:12 +03:00
Jiawei Wu
a2873c0c87
[Response Ops] Rule Specific Flapping - Create/Edit Rule Flyout Frontend Changes (#189341)
## Summary
Issue: https://github.com/elastic/kibana/issues/189135

Frontend changes for the rule specific flapping feature in the existing
rule flyout.

To test: Simply go to
`x-pack/plugins/triggers_actions_ui/public/common/constants/index.ts`
and set line 89 `IS_RULE_SPECIFIC_FLAPPING_ENABLED = false` to `true`.
This acts as a feature flag. Then you may go to the create/edit rule
flyout to see this new input. This PR does not contain changes to allow
for saving/editing of this field. That will come with the backend PR.

### Flapping Enabled Without Override
<img width="648" alt="Screenshot 2024-07-29 at 12 11 02 AM"
src="https://github.com/user-attachments/assets/82b552c5-faf3-459f-a22d-69ea95292d89">

### Flapping Enabled With Override
<img width="652" alt="Screenshot 2024-07-29 at 12 11 07 AM"
src="https://github.com/user-attachments/assets/2d305570-8cd6-4488-af5b-8c78cb3c2b3a">

### Flapping Disabled With or Without Override
<img width="652" alt="image"
src="https://github.com/user-attachments/assets/5bb76e6a-85e5-4992-a37f-a737d083ec54">

### 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: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-21 19:55:00 -05:00
Yara Tercero
16c7ca2428
[Detection Engine] addressing icon color (#190744)
## Summary

Addresses https://github.com/elastic/kibana/issues/131306 - makes trash
icon red.
2024-08-21 18:31:30 -05:00
Kevin Delemme
ca6f3edf0d
feat(rca): items management api (#190852) 2024-08-21 15:34:33 -05:00
Saikat Sarkar
24b4eb4d18
Revert "Revert "[Index management] Unskip api_integration tests for inference endpoints"" (#190855)
Reverts elastic/kibana#189742
2024-08-21 14:34:08 -06:00
Anton Dosov
64e1116b4b
Dashboard insights flyout with dashboard views (#187993)
## Summary

close https://github.com/elastic/kibana/issues/183687

## Feature

- Implement dashboard view stats UI on top of usage counter that counts
dashboard views for last 90 day and shows weekly histogram.
- (Even if there is not a lot of data, we still show it as a weekly
histogram, so it can be pretty empty intially)

![Screenshot 2024-08-15 at 13 00
11](https://github.com/user-attachments/assets/adeabf78-e3d3-4cfa-adc3-76a32ede595b)


## Implementation

### Server side
Dashboard plugin registers new routes to increase the view count and get
stats. Routes are protected for users with dashboard access only. The
implementation is located in
`@kbn/content-management-content-insights-server` and internally uses
usage counters. The retention is 90 days, so we can only show stats for
last 90 days.

 ### Client side

- Dashboard uses the client from
`@kbn/content-management-content-insights-public` to increase the view
count every time a user opens a dashboard.
- TableListView opens the flyout from
`@kbn/content-management-content-insights-public`to display the stats

## How to test

- For new views just open a dashboard and check that view stat is
increased
- For old views you can populate the usage counters with historic data.
I used the following script:
https://gist.github.com/Dosant/425042fcf75d5e40e5a46374f6234a54
2024-08-21 13:08:49 -05:00
Ignacio Rivas
6db6a8d7a6
[Ingest Pipelines] Fix scss deprecation issue (#190945) 2024-08-21 19:34:50 +02:00
Nathan Reese
1da096793d
[canvas] fix by-value map embeddables have broken layers (#190996)
Resolves https://github.com/elastic/kibana/issues/190994

### Test instructions
1. create new canvas workpad
2. Click "Select type" and select "Maps"
3. Add a documents layer to your map and click "Save and return"
4. Click "canvas" bread crumb to go back to canvas listing page
5. Open you work pad again. Map should still display data
2024-08-21 11:19:35 -06:00
Lola
0ffd37a074
[Cloud Security] fix disabled button when Agentless is selected (#190713)
## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.
This PR is to create Security project and to debug validation errors in
Serverless QA. In Serverless QA, when we submit save an Agentless
integration, the Save and Continue button is disabled. Locally, the
button works as expected. I need to add `console.debug on Validation
errors` since I don't have visibility on the package policy validation
errors.

[Reverted code back to show Agent-based
pop-ups](https://github.com/elastic/kibana/pull/189932/files#r1707816416)
and setFormState depending on the agentCount.

**Before:**

**Locally**

https://github.com/user-attachments/assets/940cd523-c83b-44e2-8bf7-92bff019d85a

**QA**

https://github.com/user-attachments/assets/ce15011c-ccc0-4941-8798-40e78cf81023

**After Project CI Build:**
**Serverless QA**


https://github.com/user-attachments/assets/364903f4-c6af-4768-ab48-ca8da9cdb476

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-21 12:52:38 -04:00
Efe Gürkan YALAMAN
1949de076a
Query builder base page (#190091)
## Summary

Adds the base Search Playground behind a feature flag. This will be used
to create new Search Playground page mode that is used for queries
rather than LLMs
<img width="1533" alt="Screenshot 2024-08-13 at 16 00 32"
src="https://github.com/user-attachments/assets/d1c78ef2-88c0-4c67-bbdd-2704142b95df">
<img width="1523" alt="Screenshot 2024-08-13 at 16 00 41"
src="https://github.com/user-attachments/assets/01b3b3cb-95e4-4a09-a07d-069d810cf42c">



### 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
- [ ] [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] 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 was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
2024-08-21 11:33:50 -05:00
Sander Philipse
8f39bdfe25
[Search] Change model id to inference id in index error message (#190787)
## Summary

Changing 'model_id' to 'inference_id' to align with the new API spec.
See also: https://github.com/elastic/kibana/pull/190729
2024-08-21 18:00:11 +02:00
Kibana Machine
6cc30f99d5 skip failing test suite (#190952) 2024-08-22 01:45:02 +10:00
Kibana Machine
c4a39e1291 skip failing test suite (#190960) 2024-08-22 01:44:57 +10:00
Rachel Shen
5bd3f902f8
[Dashboard] Interactive Managed Dashboard Popover vs badge (#189404)
## Summary

Closes #https://github.com/elastic/kibana/issues/179152

This PR makes the managed badge into an interactive popover that allows
users to duplicate the managed dashboard. The user is automatically
redirected to the new dashboard where they can edit it and make changes.



### 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))
2024-08-21 10:41:36 -05:00
jennypavlova
22031dfb05
[Infra] Replace MetricsUIAggregation in favor of estypes.AggregationsAggregate (#190495)
Closes [#190311](https://github.com/elastic/kibana/issues/190311)

## Summary

This PR replaces `MetricsUIAggregation` in favor of
`estypes.AggregationsAggregate`. Now the `MetricsUIAggregation` uses
estypes.AggregationsAggregate and the `MetricsUIAggregationRT `is
removed which also allows us to remove the `ESAggregationRT`. Instead of
maintaining the runtime types we now rely on the types provided by
elasticsearch.

A follow-up issue will be linked here to address the other aggregation
types related changes:
[#190497](https://github.com/elastic/kibana/issues/190497)

## Testing
- Check the types 
- Host page should load with no errors
- To test if the API works use the request provided in the
[x-pack/plugins/observability_solution/infra/server/routes/infra/README.md](https://github.com/elastic/kibana/compare/main...jennypavlova:kibana:190311-infra-replace-metricsuiaggregation-in-favor-of-estypesaggregationsaggregate?expand=1#diff-e853fdd3f4073eff8ff8a4df6a657f8cb5fefaa231be0116fe3692ae929f26a8)
- if the body is not valid 400 is returned

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-21 17:34:07 +02:00
Mike Côté
fdae1348df
Rename task claimers (#190542)
In this PR, I'm renaming the task managers as we prepare to rollout the
`mget` task claiming strategy as the default.

Rename:
- `unsafe_mget` -> `mget`
- `default` -> `update_by_query`

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-21 11:09:10 -04:00
Steph Milovic
730f8eae87
[Security solution] Assistant package assistant/index.tsx cleanup (#190151) 2024-08-21 08:59:24 -06:00
Panagiota Mitsopoulou
e3d6cf69b4
[SLO] [Alerting] deployment agnostic slo burn rate rule tests (#187924)
Addresses https://github.com/elastic/kibana/issues/179549
Relates to https://github.com/elastic/kibana/pull/183113 

## Update
Since the Appex QA team has taken on deployment agnostic tests, a lot of
the original implementation of this PR has changed. Now that the Appex
QA team has provided a current directly to write deployment agnostic
tests, the burn rate rule tests have been moved here.

To finish onboarding the burn rate rule test to this new framework, the
following was done.
1. Add an `oblt.stateful.config.ts` file to complement the existing
`oblt.serverless.config.ts` file to ensure the tests are run in CI
2. Ensure our test config is added to the buildkite pipepline
3. Add the alerting service to the new `deployment_agnostic/services`
directory.
4. Port the tests over to the new `deployment_agnostic` directory


To run serverless
```
node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts --grep="Burn rate rule"
```

To run stateful
```
node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts --grep="Burn rate rule"
```

For context, I've kept the history from the original PR description
below.

## 🍒 History

A new type of config file will be allowed for API integration and
functional tests within the `x-pack/test` folder, using a pattern of
`*.serverless.config.ts` — these config files will specify configuration
needed to run a set of tests in a serverless deployment context.

FTR tests already make use of the `it.tags(['my-tag-1', 'my-tag-2'])`
pattern, and so we would like to stay with that pattern rather than
introducing a new type of mocha tag in the it block's "description" as
it was introduced in this
[POC](https://github.com/elastic/kibana/pull/183113). The difference
with the previous PR in terms of tagging is that we use `suiteTags`
instead of `mochaOps`

Adding following in the config files:

**serverless config**

```
suiteTags: {
        include: ['serverless'],
      },
```

**ess config**

```
suiteTags: {
        include: ['ess'],
      },
```

and then adding `this.tags(['serverless', 'ess'])` in the test suite
instructs the test runner to run the same test suite in both
environments.

In order to keep things simple, we stay with the current skip approach,
which means that flaky tests will be skipped for all environments by
appending .skip() to the suite or to specific test cases.

## Description

- This PR uses `suiteTags` for tagging the tests appropriately. We
decide through following labels in which environment the tests are going
to be executed:
- **@ess**: Runs in an ESS environment (on-prem installation) as part of
the CI validation on PRs.
  - **@serverless**: Runs in a serverless environment.
- It introduces a new folder
`x-pack/test/observability_solution_api_integration` which will serve as
a centralized location for all tests by obs-ux-management team that must
be run in Serverless and ESS environments. A list of all tests can be
found in the R&D
[issue](https://github.com/elastic/kibana/issues/179549)
- Within this folder, there is a "**config**" subdirectory that stores
base configurations specific to both the Serverless and ESS
environments. These configurations build upon the base configuration
provided by test_serverless and api_integration, incorporating
additional settings such as environment variables and tagging options.
- The file
`x-pack/test/observability_solution_api_integration/test_suites/alerting/burn_rate/burn_rate_rule.ts`
is functional in both Serverless and ESS
- It removes the existing burn rate rule from
`x-pack/test_serverless/api_integration/test_suites/observability/alerting/burn_rate/burn_rate_rule.ts`
- The `alertingApi` and `sloApi` services are moved to
`test/api_integration` servers

In the screenshot below you can see the `test_suites` folder structure,
after having migrated the current slo burn rate rule. We recommend
having an `alerting` and `slo` subfolders. Rest observability apps could
be added as another subfolder under test_suites. As part of this PR, the
`alerting > burn_rate` subfolders are created.

<img width="376" alt="Screenshot 2024-05-13 at 09 21 28"
src="3ccaf0a5-1443-4bad-ad06-daa347488bf1">

## How to run locally
You can navigate into the new `observability_solution_api_integration`
folder and use following commands to run the tests in serverless and ess
environments accordingly. You can find more information in the README
file of the observability_solution_api_integration folder.

```
cd x-pack/test/observability_solution_api_integration

// SERVERLESS
npm run alerting_burn_rate:server:serverless
npm run alerting_burn_rate🏃serverless

// ESS
npm run alerting_burn_rate:server:ess
npm run alerting_burn_rate🏃ess
```

## CI

- It includes a new entry in the `ftr_configs.yml` to execute the newly
added tests in the pipeline.
- It involves the addition of `suiteTags` in both
serverless/config.base.ts and ess/config.base.ts. In the case of
serverless, it includes **@serverless** while excluding
**@skipInServerless**. Similarly, for ess, it includes **@ess** and
excludes **@skipInEss**.

## Quality Gates and MKI pipeline
The Platform team will support config files within `x-pack/test` folder
with a pattern of `*.serverless.config.ts`, so these tests will be
included in Kibana's Quality gates and will be run against a real MKI
environment.

---------

Co-authored-by: Dominique Belcher <dominique.clarke@elastic.co>
Co-authored-by: Dominique Clarke <doclarke71@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
Co-authored-by: Robert Oskamp <traeluki@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-21 09:39:57 -05:00
Kyle Pollich
8b7de03bf3
[Fleet] Add toggles for agent.monitoring.http.enabled and agent.monitoring.http.buffer.enabled to agent policy advanced settings (#190984)
## Summary

Ref https://github.com/elastic/kibana/pull/180922

Re-add the `agent.monitoring.enabled` and
`agent.monitoring.buffer.enabled` settings under Agent Policy ->
Advanced Settings.

cc @pierrehilbert
2024-08-21 09:24:00 -05:00
Ying Mao
a6c4120b35
[Response Ops][Alerting] Adding new value to warning reasons enum schema in rule saved object (#190743)
## Summary

We want to allow rule executors to report warnings back to the framework
and have them show up in the stack management UI. We currently have a
mechanism for this that is used by detection rules but they handle how
to show the warning in their custom UI so the warning does not appear in
the stack management UI. This PR adds a new value to the allow list of
"warning reasons". This should not warrant a schema version bump because
it is a new value for an existing enum but we need to do an intermediate
release so the new schema is recognized before we start setting it
anywhere. This PR is just for schema changes. PR that uses these schema
changes can be found here: https://github.com/elastic/kibana/pull/189312

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-21 10:17:29 -04:00
Elastic Machine
bc8cb00723
Update kubernetes templates for elastic-agent (#190940)
Automated by https://buildkite.com/elastic/elastic-agent/builds/11174
2024-08-21 08:23:35 -04:00
Kurt
bcc46b60e9
Changing load/dump in source files (#190641)
## Summary

Updates usage of `js-yaml` `load` and `dump` to `safeLoad` and
`safeDump`, in preparation for a major version update of dependency,
where the default behavior will be that of the safe function variants.


## Note to reviewers
`safeDump` will throw if it encounters invalid types (e.g. `undefined`),
whereas the `dump` function will still write the file including the
invalid types. This may have an affect within your use cases - if
throwing is not acceptable or is unhandled. To avoid this the
`skipInvalid` option can be used (see
https://github.com/nodeca/js-yaml#dump-object---options-) - this will
write the file, stripping out any invalid types from the input.

Please consider this when reviewing the changes to your code. If the
`skipInvalid` option is needed, please add it, or let us know to make
the change.

---------

Co-authored-by: Sid <siddharthmantri1@gmail.com>
Co-authored-by: “jeramysoucy” <jeramy.soucy@elastic.co>
Co-authored-by: Elena Shostak <elena.shostak@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
2024-08-21 07:29:36 -04:00
Karen Grigoryan
51764fa076
[Secuity Solution][DQD] add list view and latest flyout (Phase 1) (#188468)
addresses #185881

## Data Quality Dashboard UI Overhaul (Phase 1)

This PR introduces UI changes to the Data Quality Dashboard, focusing on
improving user experience and improving on existing data quality check
process.

## Notable changes:

- Update List View UI
- Move in-row check expansion into a Flyout
- Remove summary tab from index check 
- Update index check UI
- Add table action to trigger manual individual index check without
opening index check properties
- Add in-flyout button to trigger manual individual check
- Add additional index stats panel within flyout

## Notable technical changes:

- remove prop drilling of new and existing omnipresent props by unifying
them in a series of context providers at the top of DQ dashboard
- introduce TestDataQualityProviders separate from external
TestProviders (renamed to TestExternalProviders) in tests. Change
affected tests.
- introduce `useIndicesCheck` hook to unify logic of index checking to
be able to call index checking from anywhere within DQD code without
relying on flaky and complicated useEffect driven logic of state
updates.
- introduce `useIsMounted`, hook to resolve issues with react state
update leaks
- introduce throttled `useCurrentWindowWidth` to handle custom index
flyout sizing for different screens.
- cleanup and refactor whatever is directly related or affected by
aforementioned code/test changes (including traces of removal of summary
tab)
- add extensive behavioral unit tests

# UI Changes (Before / After)

## List View Layout made more spacious

![image](https://github.com/user-attachments/assets/8cc25285-9a7b-45d9-82f2-55bb7ad4680b)

## Check All Layout made more spacious

![image](https://github.com/user-attachments/assets/c254cfa9-92cf-4971-9737-9c85e253696e)

## Total Stats Rollup converted to badges

![image](https://github.com/user-attachments/assets/68831c84-274d-40d8-b9fa-813e169e8f1e)

## ILM Phase Filter repositioned

![image](https://github.com/user-attachments/assets/85227737-1217-48b9-82b9-dc2d6a24e58c)

## Pattern Title Section

- Rearranged into accordion trigger button. Initially open by default.
- IlmPhase badges and Pattern title are now  stacked horizontally.
- Index check result emoji converted to 'Pass' | 'Fail' badge
- Pattern stats text rearranged as badged text. Incompatible fields show
as red badges (when present), the rest - hollow.


![image](https://github.com/user-attachments/assets/ca3c6e3e-a7ed-4a49-a7a6-9ea4842ac2de)

## Latest Pattern Indices Check Table

- Added a new actions column with 2 actions (from left to right): 
- View details (replaces row expander functionality (and icon) and
instead opens the index check results in a flyout)
- Check now **(NEW)** (adds ability to inline check the index without
opening it.)
- Index check result emoji turned to 'Pass' | 'Fail' badge
- `IlmPhase`, `Size`, `Last Check` columns width is shrunk to give more
space for index name


![image](https://github.com/user-attachments/assets/d9c83d9b-de3a-4153-9ed7-a9823e62f67d)

## Flyout Header

- Added index name with result check badge as title
- Added last check time as subtitle
- Added Tabs section for Latest Check and History **(REMOVED in latest
revision)**


![image](https://github.com/user-attachments/assets/b66617de-2b59-44d5-908b-3fabb3f7087e)

## Flyout Stats Panel

- Added new index stats panel


![image](https://github.com/user-attachments/assets/f21974f5-72b5-4a38-90de-f2ff5b9d1fd0)

## Index Check Fields Tab

- Tabs converted to a button group
- Summary Tab is **REMOVED**
- All field count badges have hollow color, except for red color for
`incompatible fields` tab (when count > 0) and `ecs compliant fields`
tab (when `@timestamp` is missing)


![image](https://github.com/user-attachments/assets/e78218d4-237f-4ad1-95f3-0eb4d57356fa)

## Index Check Fields Callouts

- Callout header is removed (to avoid duplication with active tab name)
- Actions are converted into sticky footer (shows when scrolled sticky
to bottom, otherwise renders after the table)
- Same for every index check fields tab


![image](https://github.com/user-attachments/assets/d8a192e8-cdfd-4691-b862-91abdedcb9b8)

## Compare Table List Values

- List values in compare tables are now horizontally stacked instead of
vertical to save space (applies to all compare tables in each index
check fields tab)


![image](https://github.com/user-attachments/assets/7ef3341d-1be9-41e7-a789-15262fac6de6)

## Compare Table Columns

- `ECS description` field width increased at the expense of `field`
field, to make room for more readable description (applies respectively
to all compare tables within index check fields tabs)


![image](https://github.com/user-attachments/assets/b45235a9-cf3d-4b6d-b65a-eaadc577cf2f)

## Flyout footer

- Add `Check now` button, that checks currently open index again and
updates the results in place.


![image](https://github.com/user-attachments/assets/02b9a63d-6c0c-4eff-aeb6-452ae78f28ea)
2024-08-21 12:13:26 +02:00
Sander Philipse
8d4704f1fe
[Search] Log and return instead of swallow errors in Playground (#190796)
## Summary

This stops the Kibana server from swallowing all playground errors,
instead logging them and then returning a meaningful error to the
frontend.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-21 04:51:35 -05:00
Dzmitry Lemechko
b50eb081b0
[ftr] re-group configs for deployment agnostic tests (#190672)
## Summary

While reviewing #187924 I realised that Solution Teams will have their
own stateful FTR configs and the overall number of configs in
`api_integration/deployment_agnostic` folder might grow up soon and it
is better to re-organise it in advance.

With new structure we have `configs` folder with 2 sub-folders:
`stateful` and `serverless`
<img width="494" alt="image"
src="https://github.com/user-attachments/assets/c844ce2c-51b6-498c-b51f-0cd9203d84ea">

When _Platform_ teams add deployment-agnostic tests, it is expected to
be loaded in `configs/stateful/platform.index.ts` and _at least one_ of
`<project>.serverless.config` under `configs/serverless`

When _Solution_ team adds deployment-agnostic tests (e.g. one of Oblt
teams), it is expected to be loaded _both_ in
`configs/stateful/oblt.index.ts` and `configs/serverless/oblt.index.ts`
2024-08-21 11:33:25 +02:00
Maryam Saeidi
51736afd24
Import zod from @kbn/zod and add an eslint rule (#190581)
Closes #187638

## Summary

In this [PR](https://github.com/elastic/kibana/pull/186190), we
introduced @kbn/zod package and an OAS convertor to automatically
generate Open API Specifications for the routes that use zod for their
validation. In this PR, we add an eslint rule to enforce importing from
@kbn/zod instead of zod directly.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-21 04:14:55 -05:00
Elena Stoeva
d9da7f6f16
[On-week] Add persisting page size and sorting for Management tables (#186997)
Addresses https://github.com/elastic/kibana/issues/56406

## Summary

This PR is part of my June 2024 On-week project. It adds functionality
for persisting table page size (rows per page) and sorting in EUI
tables. When a user changes the size or sort, the new values are saved
in local storage, so that when the user navigates out of the page and
comes back, the page size and sort will be the same.

In this PR, the functionality is added to the following tables:
- Ingest Pipelines
- Index Management - all tables (indices, data streams, index templates,
component templates, enrich policies)
- ILM policies




08b0c004-65a1-4a58-b8fb-99010e1c3248



<!--
### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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>
2024-08-21 09:31:59 +01:00
Cauê Marcondes
072eb9cda2
[APM][ECO] Enabling FF by default (#190422)
Enabling the `observability:entityCentricExperience` by default.
2024-08-21 09:24:35 +01:00
Carlos Crespo
c11e760c55
Update learn more link address (#190774)
closes [#190764](https://github.com/elastic/kibana/issues/190764)
 
## Summary

Update the Learn More link on the legacy metric callout to point to
https://ela.st/host-metrics-legacy

<img width="1727" alt="image"
src="https://github.com/user-attachments/assets/67caf5d4-fcb7-4ddc-b650-b65b7bd87b49">

NODE: https://ela.st/host-metrics-legacy shortened URL redirect still
needs to be updated.

### How to test

- Start a local Kibana instance (pointing to an oblt cluster is easier)
- Navigate to Inventory > Hosts, click on a host name to navigate to the
Asset Details page
- Change the URL, adding the following queryparam: `alertMetric:rx`
- Inspect the Learn More link href
2024-08-21 09:35:28 +02:00
Garrett Spong
c276638c54
[Security Assistant] Adds support for LangGraph evaluations (#190574)
## Summary

This PR updates the existing evaluation framework to support LangGraph.
Since the evaluation code was the last reference to the old agent
executors, we were able to finally remove those as well.

The evaluation feature remains behind a feature flag, and can be enabled
with the following configuration:

```
xpack.securitySolution.enableExperimental:
  - 'assistantModelEvaluation'
```

Once enabled, the `Evaluation` tab will become visible in settings:

<p align="center">
<img width="800"
src="https://github.com/user-attachments/assets/8a0b8691-73a3-43b7-996b-8cc408edd5ab"
/>
</p> 


Notes:
* We no longer write evaluation results to a local ES index. We can
still do this, but most the value comes from viewing the results in
LangSmith, so I didn't re-plumb this functionality after switching over
to the new LangSmith `evaluator` function.
* Need to add back support for custom datasets if we find this useful.
Currently only LangSmith datasets are supported. Ended up porting over
the `GET datasets` API from
https://github.com/elastic/kibana/pull/181348 to make this more useful.
the `GET evaluate` route now returns `datasets`, an array of dataset
names from LangSmith.
* Some additional fields still need to be ported over to the POST
evaluation API, like `size` and `alertsIndexPattern`. Update: Ported to
API, just need presence in UI.
* `Project name` was removed from the eval UI as we no longer need to
tag runs to a specific project with the new LangSmith `evaluator` since
they automatically show up under the `Experiments` section.
* The 'Evaluation (Optional)' section currently isn't used, so it's been
removed. We can re-enable this when there is need to run local evals on
predictions outside of LangSmith.


To test, set a `Run name`, input a Dataset from LangSmith e.g.
`LangGraph Eval Testing`, select a few connectors and the
`DefaultAssistantGraph`, then click `Perform evaluation...`. Results
will show up in LangSmith under `Datasets & Testing`.

Note: It's easy to run into rate limiting errors with Gemini, so just
keep aware of that when running larger datasets. The new LangSmith
`evaluator` function has an option for `maxConcurrency` to control the
maximum number of concurrent evaluations to run, so we can tweak that as
needed..

Once complete, you can compare all results side-by-side in LangSmith
🎉



<img width="2312" alt="image"
src="https://github.com/user-attachments/assets/7ca31722-7400-4717-9735-d6c1c97b6e49">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-20 17:03:35 -05:00
Rickyanto Ang
77ad05ec8f
[Cloud Security] Misconfiguration preview & Refactor CSP Plugin to include new package PHASE 1 (#190832)
## Summary

The previous [PR ](https://github.com/elastic/kibana/pull/190105) was
way too big and made it hard to review without missing any bugs or
potential bugs, Thus we decided we are going to make series of smaller
PR to make things more manageable

We will be splitting it into 4 PR 
Phase 1: Creating empty packages for csp and csp-common 
Phase 2: Move Types from CSP plugin to the Package + Deleting duplicates
in the CSP plugin where possible
Phase 3: Move Functions, Utils or Helpers, Hooks to Package
Phase 4: Misconfiguration Preview feature (with Cypress test and other
required test)

This is Phase 1 of the initiative

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-20 14:50:12 -07:00
Davis McPhee
349fdac456
[Discover] [Unified Data Table] Improve absolute column width handling (#190288)
## Summary

This PR improves the handling of columns with absolute widths in
Discover, including the following enhancements:
- If there are no auto width columns in the profile default app state,
set the last column to auto width so the default columns always fill the
grid.
- If there are no auto width columns remaining when removing a column
from the grid, set the last column to auto width so the remaining
columns fill the grid.
- Add a "Reset width" button to the column header popovers to allow
resetting absolute width columns back to auto width.


https://github.com/user-attachments/assets/0c588969-5720-40e3-91e2-07a83a93b797

Resolves #189817.
Related #188550.

### 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
- [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
2024-08-20 17:27:13 -03:00
Nicolas Chaulet
789675a1c7
[Fleet] Fix property renamed spaceId -> spaceIds (#190826) 2024-08-20 13:45:22 -04:00
Mark J. Hoy
845d275d3c
[Search] Add Legacy App Search Gated Form (#189816)
## Summary

This PR adds Gated form and logic when user visits App Search , when
`kibana_uis_enabled == false` and the `role_type` is `owner`. The user
will not be able to able to access any other App Search routes other
than Engines Overview page until this form is submitted.

Also - removes App Search from the search providers so it will no longer
show up in the results.

(note - any migrated clusters will automatically allow access without
the gate on the backend - that is, it will already have set
`kibana_uis_enabled=true`)

Also updates a couple of links and CTA for Workplace Search to be
consistent with new App Search ones.

**Screen Recording:**


https://github.com/user-attachments/assets/8e3d73b3-52d4-4952-bb1e-49219c8cdaed

### 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
- [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))
- [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: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-20 13:18:09 -04:00