Commit graph

79802 commits

Author SHA1 Message Date
Charlotte Alexandra Wilson
2b60d6f481
Update hello_world_plugin.mdx (#197104)
## Summary

Changed import path for Kibana Core Public imports, previous was not
working. New import path reflects what I found elsewhere in the
codebase, and works.
2024-10-22 15:58:06 +01:00
seanrathier
0055da5f39
[Cloud Security] Remove failsOnMKI tag from the Agentless agent tests in Serverless Quality Gates (#197094)
## Summary

Enabling the Serverless Quality Gate test for the Agentless Agent now
that the Agentless API downtime is completed
2024-10-22 10:55:47 -04:00
Elena Stoeva
d8fa996c50
[Index Management] Fix unhandled error in ds data retention modal (#196524)
Fixes https://github.com/elastic/kibana/issues/196331

## Summary

This PR fixes the bug in the Edit ds data retention modal where we were
comparing the max retention period with an undefined `value` (now the
comparison happens only if `value` is defined). Also, the PR makes the
data retention field get re-validated only when the time unit changes
(otherwise, when we switch off the toggle to enable to data retention
field, the field would get validated and would immediately show an error
"A data retention value is required." which is not great UX).

### How to test:
1. Start serverless ES with `yarn es serverless --projectType=security
-E data_streams.lifecycle.retention.max=200d` and kibana with `yarn
serverless-security`
2. Navigate to Kibana, create a data stream using Dev Tools:
```
PUT _index_template/ds
{
  "index_patterns": ["ds"],
  "data_stream": {}
}

POST ds/_doc
{
  "@timestamp": "2020-01-27"
}
```
3. Navigate to Index Management. Find the data stream and select it -->
Click "Manage" --> Click "Edit data retention"
4. Disable the toggle "Keep data up to maximum retention period"
5. Verify that the field is enabled correctly, there is not endless
spinner, and no console error.



https://github.com/user-attachments/assets/957e0869-ee23-46d9-8f20-134937f6f8cf

---------

Co-authored-by: Matthew Kime <matt@mattki.me>
2024-10-22 15:53:37 +01:00
Sergi Romeu
68b328d36b
[APM] Use subfeature permissions for Labs settings (#197092)
## Summary

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

This PR uses the previously created
(https://github.com/elastic/kibana/pull/194419) subfeature permissions
for APM to be able to modify settings inside Labs flyout.

## Screenshots for unauthorized user
| Before | After |

|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|

|![image](a57e68c2-10c8-428b-9fce-31309b7a9d6e)|

## How to test
1. Go under Stack Management -> Roles and create a new custom role.
2. For Kibana, select All spaces for the space selector, and Customize,
you can get all the permissions you need.
3. Go into Observability and APM and User Experience.
4. Select Read and save the role.
5. Create a new user and assign that role and also the viewer role.
6. Login with an incognito / different browser into the new user.
7. Go into APM -> Settings, WARNING: if you are not able to see settings
is because you don't have data, run node scripts/synthtrace
many_services.ts --live --clean.
8. You should not be able to change the configuration on each tab.
9. Change the role privileges to have Read but with write access.
10. Test it, you should be able to modify the settings.
11. Do the same with All with and without the write permissions.
2024-10-22 16:43:52 +02:00
Melissa Alvarez
0c95fa3f2a
[ML] Forecast api delete test: add retry to ensure forecast has time to complete before deletion (#197111)
## Summary

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

This PR adds a retry for 10 seconds to the deleteForecast utility
function to ensure the forecast has completed before a deletion attempt
is made.

Flaky test:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7201


### 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)
2024-10-22 08:36:59 -06:00
Jonathan Budzenski
0a04e0674f Revert "[ci] Cache chromedriver (#196614)"
This reverts commit b89941f3ab.
2024-10-22 09:36:04 -05:00
Kevin Qualters
fe79c85ddd
[Security Solution] [Notes] Enable templated insights with all events, not just alerts (#197164)
## Summary

Currently all notes that make use of the markdown based timeline data
providers will render as a timeline template if the note is associated
with an event, and not an alert. Mostly everything is in place to have
everything work for both already, there's just no context that contains
the event document in the tree in the notes list component currently.
This pr adds that context, and everything else works as expected.


![event_insights](https://github.com/user-attachments/assets/72d25ef2-0c2c-4f82-974f-0f005c9b2d77)


### 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
2024-10-22 10:34:12 -04:00
Philippe Oberti
dcd8e0c614
[Security Solution][Notes] - fix user filter not checking correct license in notes management page (#197149) 2024-10-22 08:32:48 -05:00
Bena Kansara
6d7fecd825
[RCA] Events timeline improvements (#197127)
Closes https://github.com/elastic/kibana/issues/197192

- Alert event is shown as per "alert start" time
- Events are filtered by the alert group/source information (For now,
only filtering by `service.name` for the demo. We need to change the
logic to use `OR` when applying filter for group-by fields)
- Fixed rule condition chart on investigation page when "rate"
aggregation is used

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Shahzad <shahzad31comp@gmail.com>
2024-10-22 08:24:14 -05:00
Abdul Wahab Zahid
cbf7982887
Make sort integration test resilient to network delays. (#196516)
Fixes https://github.com/elastic/kibana/issues/182017

## Summary

The PR tries to address the flakiness from the test.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-22 15:11:08 +02:00
Abdul Wahab Zahid
c076b7ac45
[Dataset Quality] Check if Obs Logs Explorer accessible before linking Logs Explorer (#197020)
Fixes https://github.com/elastic/kibana/issues/196506

## Summary

Before linking to Logs Explorer in Dataset Quality, the PR checks if
`observability-logs-explorer` is available and accessible before
consuming the `SINGLE_DATASET_LOCATOR_ID` locator.

Observability Logs Explorer app is not available in Security and Search
solution views.


After the fix:


https://github.com/user-attachments/assets/ed36806a-0483-4765-a6f1-85936b92d390



There's only one more place, Observability Onboarding, where
`SINGLE_DATASET_LOCATOR_ID` is consumed. Which being part of
Observability solution view, it can be assumed that Observability Logs
Explorer will always be available.


![image](https://github.com/user-attachments/assets/b51bf9b6-a9c4-4fd4-8865-3dda76262a93)

----

The other Observability Logs Explorer locator `ALL_DATASETS_LOCATOR_ID`
is only consumed in observability wrapper apps and `apm` and `infra`
plugins, all of which are only available under Observability where
Observability Logs Explorer is also available.

68b3267ca2/packages/deeplinks/observability/locators/observability_logs_explorer.ts (L24)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-10-22 15:09:48 +02:00
Jon
b89941f3ab
[ci] Cache chromedriver (#196614)
Chromedriver is currently downloaded at runtime on each agent. We know
the expected version of Chrome at image build time, and can re-use the
matching driver already installed instead.

This sets `XDG_CACHE_HOME` to `$HOME/.cache` to persist the chromedriver
installation. Details on the specification can be found at
https://specifications.freedesktop.org/basedir-spec/latest/. Other
packages, including cypress, playwright, bazelisk and yarn also respect
this environment variable, but are already falling back to the
`$HOME/.cache` directory.

This also removes `CHROMEDRIVER_FORCE_DOWNLOAD`, which I believe is an
artifact of legacy code:
https://github.com/elastic/kibana/blob/6.7/.ci/packer_cache.sh#L17-L26.
At one point node_modules was initially loaded from an archive to speed
up bootstrap times. The intent was to redownload chromedriver because
the Chrome version on the agent image was upgraded independently of the
bootstrap cache, potentially causing version mismatches. The impact of
re-downloading was also less significant, as there was less
parallelization in favor of large machines running parallel jobs.
2024-10-22 07:56:08 -05:00
Cristina Amico
3be33bd3e9
[Fleet] Display outputs in agent list table and agent details (#195801)
Closes https://github.com/elastic/kibana/issues/192339

## Summary

Display two additional columns with Outputs hosts in agent list table
and agent details section
- The two columns show monitoring output and the integrations output and
link to the output flyout in settings
- Display a badge that show the outputs set per integration introduced
by https://github.com/elastic/kibana/pull/189125
- Same info displayed in agent details as well

To achieve this, I added two new endpoints.

1. Endpoint that fetches all the outputs associated with a single agent
policy (outputs defined on agent policy or default defined in global
settings and if any, outputs per integration)
```
GET kbn:/api/fleet/agent_policies/<AGENT_POLICY_ID>/outputs
```

2. Endpoint that fetches the outputs as above, for a defined set of
agent policy ids
```
POST kbn:/api/fleet/agent_policies/outputs
{
  "ids": ["policy_id1", "policy_id2", ...]
}
```
The reason to pass an array of ids is to ensure that we fetch the info
only for the policies displayed in the table at any given moment.


### Screenshots
**Agent list**
![Screenshot 2024-10-16 at 17 51
57](https://github.com/user-attachments/assets/3ee08df1-9562-497f-9621-4a913b3dad74)
![Screenshot 2024-10-16 at 17 52
05](https://github.com/user-attachments/assets/72b9da7d-872a-45f8-b02d-29184ffb2179)

**Agent details**
![Screenshot 2024-10-16 at 17 52
20](https://github.com/user-attachments/assets/b99aaf9e-14f1-44b8-9776-3e0136775af8)


### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### For maintainers
- [ ] This will appear in the **Release Notes** and follow the
[guidelines](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-10-22 14:46:24 +02:00
mohamedhamed-ahmed
3130492752
[Discover] Use summary column service name component for service name… (#196742)
closes https://github.com/elastic/kibana/issues/196541
## 📝  Summary

This PR updated the `service.name` cell renderer so that it mimics what
we have in the `summary` column.
It now shows a clickable pill shape for quick filters and navigating to
the service page if `APM` is available.

## 🎥 Demo


https://github.com/user-attachments/assets/627b39af-f008-487b-82f2-c0ab79aff9a4
2024-10-22 15:33:20 +03:00
Nicolas Chaulet
b668544406
[Fleet] Improve space selector validation when not providing valid space (#197117) 2024-10-22 08:12:08 -04:00
Gerard Soldevila
c9637cf71c
Use more efficient strategies to process user input (#196858)
## Summary

Address performance concerns with Regexps
2024-10-22 07:07:25 -05:00
Gerard Soldevila
2a085e103a
Add ESLINT constraints to detect inter-group dependencies (#194810)
## Summary

Addresses https://github.com/elastic/kibana-team/issues/1175

As part of the **Sustainable Kibana Architecture** initiative, this PR
sets the foundation to start classifying plugins in isolated groups,
matching our current solutions / project types:

* It adds support for the following fields in the packages' manifests
(kibana.jsonc):
* `group?: 'search' | 'security' | 'observability' | 'platform' |
'common'`
  * `visibility?: 'private' | 'shared'`

* It proposes a folder structure to automatically infer groups:
```javascript
  'src/platform/plugins/shared': {
    group: 'platform',
    visibility: 'shared',
  },
  'src/platform/plugins/internal': {
    group: 'platform',
    visibility: 'private',
  },
  'x-pack/platform/plugins/shared': {
    group: 'platform',
    visibility: 'shared',
  },
  'x-pack/platform/plugins/internal': {
    group: 'platform',
    visibility: 'private',
  },
  'x-pack/solutions/observability/plugins': {
    group: 'observability',
    visibility: 'private',
  },
  'x-pack/solutions/security/plugins': {
    group: 'security',
    visibility: 'private',
  },
  'x-pack/solutions/search/plugins': {
    group: 'search',
    visibility: 'private',
  },
```

* If a plugin is moved to one of the specific locations above, the group
and visibility in the manifest (if specified) must match those inferred
from the path.
* Plugins that are not relocated are considered: `group: 'common',
visibility: 'shared'` by default. As soon as we specify a custom
`group`, the ESLINT rules will check violations against dependencies /
dependants.

The ESLINT rules are pretty simple:
* Plugins can only depend on:
  * Plugins in the same group
  * OR plugins with `'shared'` visibility
* Plugins in `'observability', 'security', 'search'` groups are
mandatorily `'private'`.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-10-22 06:34:19 -05:00
Elena Shostak
300678ca85
[Docs] Security Route Configuration (#193994)
## Summary

Added documentation for the security route configuration.


### Checklist

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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-22 06:30:53 -05:00
Carlos Crespo
85cf23b892
[Inventory] Fix Inventory storybook (#197174)
part of [#196142](https://github.com/elastic/kibana/issues/196142)

## Summary

This PR fixes the Inventory storybook

<img width="600" alt="image"
src="https://github.com/user-attachments/assets/1e16b100-5836-4b48-a7b3-9aa4ab24f475">


### How to test
- Run `yarn storybook inventory`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-10-22 13:17:31 +02:00
Oyelola Victoria
92b145bcd7
[Create visualization modal] change documentation link in footer (#196997)
## Summary

Fixes #196286 

Updated the documentation link in the footer of the create visualization
modal.

The `getDocLinks` guide link under "visualize" previously pointed to
dashboard.html, it's now corrected to _panels_and_visualizations.html.

This also affected a documentation link elsewhere, as seen in the
screenshot.

![visualize_library_documentation](https://github.com/user-attachments/assets/18d32942-063e-492e-85d8-274585eedb75)

Reverted it back using the "dashboard" guide link which also points to
dashboard.html since the issue specified changing only the create
visualization modal doc link.


https://github.com/user-attachments/assets/af6a4993-aac3-446f-8228-d0fe89d97cb2

---------

Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
2024-10-22 05:44:14 -05:00
Anton Dosov
0ce828c470
Fix wrong date on a header of a report when generated from relative date (#197027)
## Summary

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

There was an issue when generating a PDF report from a dashboard with
relative date with time range display in the header of the report. Note:
there data was displayed correctly, the issue was only with the date in
the header:

Dashboard: 

![Screenshot 2024-10-21 at 12 33
21](https://github.com/user-attachments/assets/2bd09099-5375-447a-b829-49671cc3614f)


Report before the fix 👎 

![Screenshot 2024-10-21 at 12 35
19](https://github.com/user-attachments/assets/e114f6f1-ba46-4bec-bf97-f175d18dbcd1)

Report after the fix 👍 


![Screenshot 2024-10-21 at 12 34
17](https://github.com/user-attachments/assets/06fd2b4e-74af-4994-bf48-65903394f91e)
2024-10-22 12:23:37 +02:00
Joe McElroy
5c51e783e5
[Search] [Onboarding] Update document count (#196674)
## Summary

This uses the document list count within the quick stats. Before it used
the document count from es3 billing and takes a while to update.


https://github.com/user-attachments/assets/9c29c88a-628f-4c63-99e5-d892a835e973

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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-22 11:10:47 +01:00
Anton Dosov
feb5b79a96
[React@18 failing test] fix visualize app - new charts library visualize area charts date histogram when no time filter interval errors should show error when calendar interval invalid (#196308)
## Summary

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

We're working on upgrading Kibana to React@18 (in Legacy Mode). There
are a couple failing tests when running React@18 in Legacy mode and this
is one of them

visualize app - new charts library visualize area charts date histogram
when no time filter interval errors should show error when calendar
interval invalid.
[Failure](https://buildkite.com/elastic/kibana-pull-request/builds/236562#019222ec-e8d1-4465-ada3-fd923283b6f4)


![Image](https://github.com/user-attachments/assets/2cdaca3c-9ccf-4208-b6f3-6975588eb5fe)


---- 


I investigated the problem and understand what is not working and
suggesting this simple fix, but open to any other approaches or
suggestions.


To Reproduce the failing tests: 

1. Create aggregation based viz, e.g. Area Chart
2. Add data histogram agg
3. Change minimum interval to a invalid value (for example, "f")
4. Change minimum interval to another invalid value ("ff")

React@18 failure: 


https://github.com/user-attachments/assets/f8684b48-fb24-4500-a762-2a116ed55297

The error is thrown from here in the reducer: 


23e0e1e61c/src/plugins/vis_default_editor/public/components/sidebar/state/reducers.ts (L82)

When we try to update the state using 2nd invalid value, the error is
thrown when we try to serialize the current agg with previous invalid
value.

This code is exececuted when we call `agg.serialize`:
 

5ed6981828/src/plugins/data/common/search/aggs/buckets/lib/time_buckets/time_buckets.ts (L200-L202)


**Why don't we see this failure in React@17?**

In React@17 we don't see an error screen, but we only see a log in the
console.

> TypeError: "f" is not a valid interval.

It turns out that React@17 consistently executed that reducer twice.
first time during dispatch and second time during rendering. This
shouldn't be a problem because reducers are supposed to be pure (without
side-effects). **But in this case calling `agg.serialize` only throws an
error when called the first time**! So in React@17 the reducer was
called the first time, the error was swallowed, then it was called the
2nd time and, since the `TimeBucket` was cached, there was no error
anymore, so it never bubbled up during rendering.

The root cause of inconsitent behaviour is here:


8afbbc0082/src/plugins/data/common/search/aggs/buckets/date_histogram.ts (L111-L121)

when `get()` called first time we create buckets and cache them. but we
cache them before calling `updateTimeBuckets` which is where the error
happens.


To fix this issue, we should make the reducer pure. One approach is to
swallow that error so that the call to `agg.serialize()` is consistent.
Another approach could be to always throw that error, but then a larger
refactor is needed and this likely a more risky and impactfull change.
2024-10-22 11:50:15 +02:00
Krzysztof Kowalczyk
b495c371fd
[Global Search] Fix convertTagNameToId to use lowercase values (#196819)
## Summary

This PR fixes a bug which caused mixed case tags to not be found in
global search.
Fixes: #196168

The `allTags` argument contains tags with names in the original case
they were created but the `tagName` argument passed in
[search_bar.tsx:180](https://github.com/elastic/kibana/blob/main/x-pack/plugins/global_search_bar/public/components/search_bar.tsx#L180)
is lowercase. Since you can't have tags with the same name but different
casing, converting them to lowercase is safe.

I've also added lowercase conversion to `tagName` argument in case this
function gets called somewhere else and the input is not lowercase.
2024-10-22 11:40:42 +02:00
Elena Stoeva
996eb73811
[Ingest Pipelines] Update copy in Manage processors (#196923)
## Summary

This PR adds some copy changes to the Manage processors pages.

1. Empty prompt
- Width and padding of the prompt is adjusted so that "IP" in the title
starts in the 2nd line
- Description is updated
<img width="800" alt="Screenshot 2024-10-18 at 17 00 53"
src="https://github.com/user-attachments/assets/51aa6cdc-5eb4-4c54-8960-7ee273d82ef5">


2. Add database modal
- Copy in callouts is updated
- The help text of the "Type" field is updated
- The text in the "Database already exists" error callout is updated
<img width="1490" alt="Screenshot 2024-10-21 at 09 34 12"
src="https://github.com/user-attachments/assets/ab3c2e21-4457-435f-a4c3-874c6edcb2ce">
<img width="1498" alt="Screenshot 2024-10-18 at 17 24 43"
src="https://github.com/user-attachments/assets/a0c15f5d-9360-4ee7-806d-2b5b64b6fd2a">


3. Manage processors page
- The title of the page is changed from "GeoIP" to "IP Location"
<img width="800" alt="Screenshot 2024-10-18 at 17 20 01"
src="https://github.com/user-attachments/assets/cde8b070-9664-42df-b71a-723a5356d4a2">
2024-10-22 10:14:42 +01:00
Jeramy Soucy
871859096c
Skips serverless org members nav card test on MKI (#197171)
## Summary

Skips the functional test for the org members management nav card on
MKI. The test attempts to confirm a link to the cloud org members page,
but on MKI it will redirect to cloud login.
2024-10-22 11:09:37 +02:00
Elena Shostak
5ffe226add
[Authz] Enabled no_deprecated_authz_config for migration only (#196852)
## Summary

To ensure that `no_deprecated_authz_config` rule is only applied during
an intentional migration, added check for env vars presence.

If neither `MIGRATE_ENABLED_AUTHZ` nor `MIGRATE_DISABLED_AUTHZ` is set,
the rule will be skipped, avoiding unnecessary or unforeseen code
changes both locally and in the CI.

Added fix and test case for `access:${APP.TEST_ID}` tags that have
property access in the template literal.

__Closes: https://github.com/elastic/kibana/issues/196846__


### 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-10-22 11:05:45 +02:00
Tomasz Ciecierski
c5067fdd06
[EDR Workflows] Improve agent downloader (#196135) 2024-10-22 10:51:55 +02:00
Pablo Machado
597fd3e82e
[SecuritySolution] Fix entity-store to support asset criticality delete (#196680)
## Summary

Update the entity store API so it does not return the asset criticality
field when the value is 'deleted'.


### How to test it
* Open kibana with data
* Install the entity store
* Update asset criticality for a host or user
* Wait for the engine to run (I don't know a reliable way to do this)
* Refresh the entity analytics dashboard, and it should show empty
fields for deleted asset criticality

- [ ] Backport it to 8.16

### 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
2024-10-22 09:58:20 +02:00
Maryam Saeidi
c0393ae658
[Alert details page] Use alert rule params instead of rule params in the custom threshold app section (#197023)
Related to #181828

## Summary

This PR refactors the custom threshold app section to rely on the alert
rule params instead of rule params.

### How to test
- Create a custom threshold rule and verify that the alert details page
works as before
- Also, check the log rate analysis component and ensure it works as
before
2024-10-22 09:22:29 +02:00
Kibana Machine
eb68833992
[api-docs] 2024-10-22 Daily api_docs build (#197165)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/868
2024-10-22 01:32:52 -05:00
Matthias Wilhelm
722a913c54
[Discover] Refactor totalHits$ loading state handling to omit race conditions (#196114)
Fix loading state management in `use_discover_histogram.ts`

Moving the loading state for `totalHits$` to the `fetchAll` function, which is executed before the hook. This ensures that the loading state is set at a higher level, preventing a situation where the overall data fetching is in a `loading` state, but the histogram is marked as `complete` while receiving new properties (like a new data view ID) without access to refreshed data views.
2024-10-22 01:06:38 -05:00
Tiago Costa
737cfac04e
skip flaky suite (#170157) 2024-10-22 04:36:47 +01:00
Tiago Costa
8738926e06
skip flaky suite (#182364) 2024-10-22 04:34:55 +01:00
Tiago Costa
3f291170a5
skip flaky suite (#196189) 2024-10-22 04:33:05 +01:00
Tiago Costa
2d91c3ce0c
skip flaky suite (#176783) 2024-10-22 04:32:14 +01:00
Tiago Costa
82e69fea60
skip flaky suite (#176783) 2024-10-22 04:31:44 +01:00
Tiago Costa
84a9664d61
skip flaky suite (#169727) 2024-10-22 04:30:55 +01:00
Tiago Costa
1d738b8898
skip flaky suite (#196463, #196464, #196465, #196466, #196467, #196468, #196469) 2024-10-22 03:21:34 +01:00
Tiago Costa
dbb26b7314
skip flaky suite (#193092) 2024-10-22 03:19:15 +01:00
Tiago Costa
a6e6a932ad
skip flaky suite (#193554) 2024-10-22 03:16:05 +01:00
Kibana Machine
94ae1a4724 skip failing test suite (#173441) 2024-10-22 13:12:56 +11:00
Tiago Costa
f42fd5d2d6
skip flaky suite (#197151) 2024-10-22 02:52:53 +01:00
Kibana Machine
1ce95338f5 skip failing test suite (#196563) 2024-10-22 11:35:59 +11:00
Kibana Machine
ba71217777 skip failing test suite (#181889) 2024-10-22 11:35:16 +11:00
elastic-renovate-prod[bot]
993e6839cd
Update dependency msw to ^2.4.11 (main) (#197147)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [msw](https://mswjs.io) ([source](https://togithub.com/mswjs/msw)) |
devDependencies | patch | [`^2.4.10` ->
`^2.4.11`](https://renovatebot.com/diffs/npm/msw/2.4.11/2.4.11) |
`2.4.12` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkNsb3VkIFNlY3VyaXR5IiwiYmFja3BvcnQ6c2tpcCIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2024-10-21 19:24:29 -05:00
elastic-renovate-prod[bot]
a1c902ac4e
Update dependency msw to ^2.4.10 (main) (#196901)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [msw](https://mswjs.io) ([source](https://togithub.com/mswjs/msw)) |
devDependencies | patch | [`^2.4.9` ->
`^2.4.10`](https://renovatebot.com/diffs/npm/msw/2.4.9/2.4.10) |
`2.4.11` |

---

### Release Notes

<details>
<summary>mswjs/msw (msw)</summary>

### [`v2.4.10`](https://togithub.com/mswjs/msw/releases/tag/v2.4.10)

[Compare
Source](https://togithub.com/mswjs/msw/compare/v2.4.9...v2.4.10)

#### v2.4.10 (2024-10-11)

##### Bug Fixes

- **setupWorker:** perform worker update in the background
([#&#8203;2311](https://togithub.com/mswjs/msw/issues/2311))
([`8e40724`](8e40724cd3))
[@&#8203;kettanaito](https://togithub.com/kettanaito)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkNsb3VkIFNlY3VyaXR5IiwiYmFja3BvcnQ6c2tpcCIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

---------

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Paulo Silva <paulo.henrique@elastic.co>
2024-10-21 15:29:12 -07:00
Steph Milovic
1e12f31a70
[Security Assistant] Knowledge base settings author column fix (#197114) 2024-10-21 14:18:44 -06:00
Tim Sullivan
a3d216f496
[Spaces Mgmt] Ensure space ID is used for comparison logic (#196930)
Closes https://github.com/elastic/kibana/issues/192811

## Summary

When creating a space, if it's not the current, you should be able to
use the switch icon from the table. This PR fixes a bug that disabled
the switch icon for spaces that aren't the current, if they have the
same name as the current.


### 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
2024-10-21 15:15:13 -05:00
Elena Stoeva
e6e4e343aa
[Console] Fix load_from param (#196836)
Fixes https://github.com/elastic/kibana/issues/195877
Addresses https://github.com/elastic/kibana/issues/179658

## Summary

This PR fixes the bug in Console where using the `load_from` param in
the URL made Console uneditable because every re-render reset the
initial value in the editor. This is fixed by restricting the hook to
only set the initial value once. This PR also adds some unit tests for
the hook, as I realized that this was a long-standing improvement.

### How to test:

Try loading the following URL (making the necessary replacement in the
URL) and verify that the data is correctly loaded into the editor and
value can be edited:


`http://localhost:5601/<REPLACE-THIS>/app/dev_tools#/console?load_from=data:text/plain,AoeQygKgBA9A+gRwK4FMBOBPGBDAzhgOwGMB+AEzQHsAHOApAGwbiMoaQFsDcAoAbx5QoAImToMwgFwiAZgCVKAWShoUHSgBcUAWgBUkgJYEyKAB4pcwgDSCRDSkWwMUUkSgLXbwmQYZa0rgJCQsIARpRsgbbBIhxIuBquANoAujYxIT5+6Mlp0cHCuAAWlIxkuekZwnEJdJq5+QC+ts2NQA`



`http://localhost:5601/<REPLACE-THIS>/app/dev_tools#/console?load_from=https://www.elastic.co/guide/en/elasticsearch/reference/current/snippets/86.console`

Co-authored-by: Matthew Kime <matt@mattki.me>
2024-10-21 20:20:30 +01:00