## Summary
This PR adds a feedback button to Metrics Explorer
## Testing
- Go to Infrastructure > Metrics Explorer
- The feedback button (Tell us what you think!) should be visible
<img width="1702" alt="image"
src="0d94371c-6269-4595-9b10-c85d1bcc66d9">
- When you click on the link the Kibana version should be prefilled (no
need to submit just go to step 4)
<img width="1193" alt="image"
src="f03d641b-83f8-4a08-ad12-e279303e4a61">
This updates log rate analysis to be able to auto-detect whether the
selected deviation is a spike or dip compared to the baseline time
range. To achieve this, we compare the median bucket size of the two
selections. If a dip gets detected, the analysis will then switch the
window parameters sent to the API endpoint to run the analysis.
An info callout points out the auto-selected analysis type and explains
to which time range the analysis results refer to. We need to do this to
make it clear that for dip analysis the significant terms and their doc
counts refer to the baseline time range and vice versa for spike
analysis.
## Summary
Create a new functional config file that sets up elasticsearch configs
to have a low disk threshold and a low number of shards per node to test
for health checks and deprecations.
Previously this test failed because it seems that ES takes some time to
calculate the health checks hence the indicator critical issues are not
showing during the testing period (now we don't have flakiness since we
started the server with the indicators already in place) it also means
less `before` and `after` work inside the test cases.
Closes https://github.com/elastic/kibana/issues/160833
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
resolves https://github.com/elastic/kibana/issues/162886
The default continues to be 90 days for data detetention of event log
documents, and the rollover is now controlled by DLM, as described in
[Data stream lifecycle][].
[Data stream lifecycle]:
https://www.elastic.co/guide/en/elasticsearch/reference/8.9/data-stream-lifecycle.html
## Release note
Fixes the event log data stream to use Data stream lifecycle instead of
Index Lifecycle Management. If you had previously customized the Kibana
event log ILM policy, you should now update the lifecycle of the event
log data stream itself.
## Summary
Adds a comment that the API endpoint /rollup/indices is used by the data
view plugin.
With https://github.com/elastic/kibana/pull/162674 merged, the issue
https://github.com/elastic/kibana/issues/152708 has been closed. The
Data Discovery team is not planning any further work around rollup api
use due to the feature being deprecated. I think adding a comment to the
API code directly will help us remember this dependency for when we are
going to edit or remove the endpoint.
## Summary
Rollup functionality will be disabled on serverless instances. The
`rollup` plugin will be disabled. While it won't be possible to create
rollups on serverless, it will be possible to import data view saved
objects which may be configured for use with rollups. We will make a
'best effort' to improve functionality as to help users transition away
from rollups.
- In classic environments, the `rollup` plugin will enable `dataViews`
and `data` plugin rollup functionality.
- The data plugin will run an async search instead of a rollup search.
- The data views plugin will fetch normal fields, omitting a query for
rollup fields - which would fail anyway.
Closes https://github.com/elastic/kibana/issues/152708
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
The changes in this PR are related to this issue:
https://github.com/elastic/enterprise-search-team/issues/4440.
In this PR, we moved a number of components of
`text_expansion_callout.tsx` and their tests to separate files.
db8657f4-a9f2-4502-87e8-20325c52748b
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
fix https://github.com/elastic/kibana/issues/163337 for dashboard.
### Context:
In serverless navigation we changed how breadcrumbs work. Instead of
setting the full path manually, we automatically calculate the main
parts of the path from the side nav + current URL. This was done to keep
side nav and breadcrumbs in sync as much as possible and solve
consistency issues with breadcrumbs across apps.
https://docs.elastic.dev/kibana-dev-docs/serverless-project-navigation#breadcrumbs
Apps can append custom deeper context using the
`serverless.setBreadcrumbs` api. Regular `core.chrome.setBreadcrumbs`
has no effect when serverless nav is rendered.
Closes https://github.com/elastic/kibana/issues/162915
## Summary
Replace direct calls to Fleet Secrets index with new API calls
introduced with https://github.com/elastic/elasticsearch/pull/97728
### New ES secrets APIs:
```
POST /_fleet/secret/
{
"value": "<secret value>"
}
// Returns the id of the created secret
{
"id": "<secret_id>"
}
DELETE /_fleet/secret/<secret_id>
// returns
{
"deleted": true
}
```
NOTE: I tried running the secrets integration tests in
https://github.com/elastic/kibana/issues/162732 but there is some ES
error that I'm not sure how to address. I think that the test can be
worked on separately
### Testing
Testing steps are the exact same as
https://github.com/elastic/kibana/pull/157176:
- Start EPR locally loading the `Secrets` test package from Kibana:
```
docker run -p 8080:8080 -v /Users/<YOUR_PATH>/kibana/x-pack/test/fleet_api_integration/apis/fixtures/test_packages:/packages/test-packages -v /Users/<YOUR_PATH>/kibana/x-pack/test/fleet_api_integration/apis/fixtures/package_registry_config.yml:/package-registry/config.yml docker.elastic.co/package-registry/package-registry:main
```
- Point `kibana.dev.yml` to local EPR:
```
xpack.fleet.registryUrl: http://localhost:8080
```
- Enable the secrets feature flag `secretsStorage`
- Start kibana and navigate to `integrations`, install `Secrets`
package.
- It should create and edit the package policy successfully
<img width="1800" alt="Screenshot 2023-08-08 at 16 26 52"
src="5e2b77d9-71a9-4c5f-8b3b-5fc6546d562f">
- The yml policy should have the redacted secrets and secrets ids:
<img width="771" alt="Screenshot 2023-08-08 at 15 43 22"
src="7db22c6b-b0db-4eb6-bc68-7174374c9c74">
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Changes in support of serverless:
- When the serverless project is not running with the Endpoint addon
(Endpoint Essentials or Endpoint Complete), the Create Policy preset
options should only display the "Data Collection" option
## Summary
Fixes#163084
<img width="1397" alt="Screenshot 2023-08-04 at 17 33 34"
src="8075da4d-633d-4916-b6db-491f7c87c363">
### Release note
Disable the "View rule details" option from the Alert Details' Actions
list when the rule is deleted.
## Summary
Update useUpselling hooks to avoid unnecessary re-renders by providing
an initial value.
### 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
Fixes#156748
## Summary
[There is already a functional test that covers the same
functionality.](https://github.com/elastic/kibana/blob/main/x-pack/test/functional_with_es_ssl/apps/cases/group1/view_case.ts#L727)
| Old Test | Scenario | Where it is covered now |
| ------------- | ------------- | ------------- |
| hasNext page is true | there are 2 `user-actions-list` | functional
test creates 24 UAs, displays too columns initially |
| hasNext page is true | `cases-show-more-user-actions` in document |
functional test creates 24 UAs clicks `cases-show-more-user-actions` |
## Summary
Original ticket: https://github.com/elastic/kibana/issues/145749
This PR un-skips tests which were disabled due to [upgrade to Jest 29
here](https://github.com/elastic/kibana/pull/143319).
Fixes:
1. Restructured test which checks the `isLoading` state returned by the
`useFetchOrCreateRuleExceptionList` hook
2. Make sure we call `await waitForNextUpdate();` right amount of times
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Closes https://github.com/elastic/kibana/issues/161493
Leaving the editor with unsaved changes
<img width="690" alt="image"
src="1587b8dc-83a1-4d89-993d-3150dea17836">
Go back to TSVB modal
<img width="742" alt="image"
src="a49667a1-927b-4aa8-aa1a-765a14ebd925">
## Summary
This PR is solving the following wrong behavior in text based languages.
When we are trying to depict a SQL/ESQL suggestion in Discover it is
necessary to know the type of the field. What we did so far was sending
from Discover to Lens only the column names and we were trying in Lens
to fetch the type from the dataview fields. But this doesnt cover all
the cases as both SQL (and ESQL) can create fields which cant be found
in a dataview. For example:
- Use of as `SELECT bytes, geo.dest as random_name FROM
"kibana_sample_data_logs"` in SQL
- Use rename (in ESQL)
- Create an aggregation, this will create a new variable in both
languages
- Using eval in ESQL
- ....
This PR solves the problem by passing the entire datatableColumn in the
Lens api and not only the name of the column. The types of the fields
are returned by sql, esql apis so we already have the information. We
just need to pass it in Lens.
**Fetching the correct types is very important as better suggestions
will be suggested from Lens.**
### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Unfortunately, cases connector PR broke the main branch and was
reverted.
The problem happened because another PR updated an import while the
cases PR was getting merged.
I deleted the old import and now it should work fine.
Implements chat & function calling for the Observability AI Assistant.
The APM related changes are due to a correction in the `toBooleanRt`
type.
Code in `x-pack/observability_ai_assistant` has been reviewed via
feature branches.
---------
Co-authored-by: Coen Warmer <coen.warmer@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
## Summary
close https://github.com/elastic/kibana/issues/161545
close https://github.com/elastic/kibana/issues/153257
This PR makes `SavedObjectFinder` component backward compatible. It is
achieved by going through content- management layer, more technical
details
[here](https://docs.google.com/document/d/1ssYmqSEUPrsuCR4iz8DohkEWekoYrm2yL4QR_fVxXLg/edit)
### Testing
`SavedObjectFinder` is this component that allows to pick a saved object
(supports: `search` `index-pattern` `map` `visualization` `lens`
`event-annotation-group`:

It is used in the following places:
- Dashboard
- Add panel
- Replace panel
- Discover - Open Search
- Visualization - Select search as a source for new viz
- Graph - select source
- Cases - markdown editor add lens
- ML (3 places)
- Canvas - select embeddable panel
- Transform
- Lens > select event annotation
### Risks / Follow up
The `SavedObjectFinder` should stay mostly the same, the only notable
functional change is that now `SavedObjectFinder` doesn't support
`includeFields` which allowed partial saved object returns, this was
done to make the call backward-compatible without making the system even
more complicated as otherwise we'll need a way to abstract
`includeFields` from so attributes and allow to run migrations on it
before making a search. follow up issue to bring it back
https://github.com/elastic/kibana/issues/163043
The risk with that is that some client that have a lot of large objects
might run into performance issues when using `SavedObjectFinder`. This
can be mitigated by changing listing limit in advanced setting from
default 1000 to something lower
Improves the table hovering behavior for log rate analysis:
- When no row is hovered, it falls back to set the first row of the
current page to a hovered state. The result is that users will always
see a comparison view in the main document count chart.
- When a row gets pinned, the hovering of the other rows will be
disabled, so the comparison view in the main document count chart gets
locked on the pinned row.
## Summary
This PR enables the Compliance Dashboard page (CSP dashboards) to
self-recover from different "no findings" states so that the user
doesn't need to reload the page to see the changes after they perform
onboarding steps (install integration, deploy agent, index data, etc.)
fixes
- https://github.com/elastic/kibana/issues/156616
### Recording
d0201ebb-b8f8-4bce-b72e-3fdd85ab79fb
### 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
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Reverts elastic/kibana#159674
The Elasticsearch team has changed their guidance about `fast_refresh`
and want this setting to be applied from within an Elasticsearch plugin
## Summary
Kibana API will not be public by default in serverless, this mean Fleet
API will not be accessible.
That PR fix that by changing the Fleet router to make Fleet API routes
public unless they specify `options.access` in their config, the only
route that I found that should be internal is the
/internal/fleet/reset_preconfiguration`
## Test
- [x] Added unit test to our router
manual test run Kibana in serverless and check Fleet API are still
publicly available
Before that change
<img width="1003" alt="Screenshot 2023-08-07 at 1 36 29 PM"
src="8e2fb113-f5e8-45e8-9892-f25bd9e722ad">
After that change
<img width="679" alt="Screenshot 2023-08-07 at 1 36 55 PM"
src="3cade239-5b13-4caf-bd1a-1bc8e2495c31">
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>