Commit graph

72728 commits

Author SHA1 Message Date
Hannah Mudge
b9ab67ab13
[Dashboard Navigation] GA Links Panel (#178999)
Closes https://github.com/elastic/kibana/issues/172075
Closes https://github.com/elastic/kibana/issues/178396

## Summary

In order to move the links panel into general availability, this PR does
four main things:
1. It changes the default of the "Save to library" toggle in the flyout
from `true` to `false` - this is in response to some early telemetry,
which suggests that link panels **not** saved to the library are more
common.

    | Before | After |
    |--------|--------|
| ![Screenshot 2024-03-20 at 9 38
41 AM](af42e570-98c2-4cbb-852f-0a34a7dd779b)
| ![Screenshot 2024-03-20 at 9 36
10 AM](2943e3fe-c3ce-4b23-a8cf-bba990995457)
|

2. It fixes a styling issue in Serverless where the height of the
secondary edit/add link flyout was incorrect.

    | Before | After |
    |--------|--------|
|
![image](0d32bda7-a5bc-4655-80ac-bffab6fce61a)
|
![image](78f32642-550b-475f-bbf1-12a38189592e)
|

3. It removes the lab setting for the links panel. The removal of this
setting is **not** a breaking change - it is completely safe to remove
this setting **regardless** of the previous value. Telemetry tracking
for this setting is also no longer required.

    | Before | After |
    |--------|--------|
| ![Screenshot 2024-03-19 at 3 00
39 PM](e9d5c19e-9ebd-4561-8391-4bb7e6f915d9)
|
![image](1325c0d0-349f-4dc9-897a-41049efb4670)
|


4. It removes any reference to "Technical preview" or "Experimental"
    
    | Before | After |
    |--------|--------|
| ![Screenshot 2024-03-19 at 2 55
20 PM](2a246688-78b1-4376-9218-8b6b2a87dfed)
|
![image](20bf7b6c-ef85-4ede-851d-035fd9f53bbd)
|
| ![Screenshot 2024-03-19 at 2 56
14 PM](c9fe5224-56d8-4d04-8b3c-f7c8b5433115)
| ![Screenshot 2024-03-19 at 2 58
27 PM](a2dfcb4d-2d42-40d0-a7d4-616587e69044)
|


### 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
- [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)
2024-03-25 13:10:04 -07:00
Kibana Machine
80d831bb2a skip failing test suite (#177551) 2024-03-25 15:48:20 -04:00
Devon Thomson
b4e0a04af9
[Embeddables Rebuild] Async factories (#179302)
Changes the new Embeddable factory definition to take an async function instead of the factory object directly.
2024-03-25 15:44:57 -04:00
Jon
db941ae382
Reapply "[ci] Update kibana-ci-apm endpoint (#177727)" (#179062)
And disables RUM.
2024-03-25 14:36:18 -05:00
amyjtechwriter
0a949de7c8
Adding the whats new in 8.13 page (#179097)
This PR adds details about whats new to the 8.13 release on the [whats
new page](https://www.elastic.co/guide/en/kibana/8.10/whats-new.html).

Closes: [#179049](https://github.com/elastic/kibana/issues/179049)

---------

Co-authored-by: lcawl <lcawley@elastic.co>
2024-03-25 19:19:54 +00:00
Tiago Costa
d74c4c5ffd
skip flaky suite (#169828) 2024-03-25 19:12:38 +00:00
Tiago Costa
90ec7b9530
skip flaky suite (#177334) 2024-03-25 19:10:46 +00:00
Tiago Costa
b64119fd3b
skip flaky suite (#179310) 2024-03-25 19:09:25 +00:00
Tiago Costa
3e650d0891
skip flaky suite (#179300) 2024-03-25 19:08:08 +00:00
Ahmad Bamieh
e2e13dfded
[i18n] Integrate 8.13.0 Translations (#178738)
Integrating latest translations extracted from main branch.
Skipping backports from main to target branches since the `i18n_check`
might trim unused translations that are still used in different
branches. Integration script is ran against each target branch
separately.
2024-03-25 11:47:29 -07:00
Alexi Doak
e11e981f51
Onboard Log Threshold rule type with FAAD (#178680)
Towards: https://github.com/elastic/kibana/issues/169867

This PR onboards Log Threshold rule type with FAAD.

### To verify

Create a log threshold rule.
Example:
```
POST kbn:/api/alerting/rule
{
  "params": {
    "logView": {
      "logViewId": "Default",
      "type": "log-view-reference"
    },
    "timeSize": 5,
    "timeUnit": "m",
    "count": {
      "value": -1,
      "comparator": "more than"
    },
    "criteria": [
      {
        "field": "log.level",
        "comparator": "equals",
        "value": "error"
      }
    ]
  },
  "consumer": "alerts",
  "schedule": {
    "interval": "1m"
  },
  "tags": [],
  "name": "test",
  "rule_type_id": "logs.alert.document.count",
  "notify_when": "onActionGroupChange",
  "actions": []
}
```
Your rule should create an alert and should saved it in
`.internal.alerts-observability.metrics.alerts-default-000001`
Example:
```
GET .internal.alerts-*/_search
```
Then set `count.value: 75`

The alert should be recovered and the AAD in the above index should be
updated `kibana.alert.status: recovered`.
2024-03-25 11:17:34 -07:00
Alex Szabo
eed7069e25
[Ops] Enables serverless release failure notifications (#179361)
## Summary
This PR enables notifications about failures of the
https://buildkite.com/elastic/kibana-serverless-release job.
2024-03-25 18:12:57 +01:00
Marco Liberati
7e482fce89
[ES|QL] Reduce the scope of grammar sync job (#179351)
## Summary

Fix an issue with committing too much into the ES|QL grammar PR job.
Now it targets only grammar files without anything else.
2024-03-25 18:08:35 +01:00
Ignacio Rivas
4961e52bdf
[Upgrade Assistant] Add missing cluster privilege check (#179033) 2024-03-25 18:06:22 +01:00
Gloria Hornero
697f7e5e8c
[Security Solution][Detection Engine] Fixes custom_saved_query_rule Cypress test on MKI (#179347)
## Summary

The current way we are using in our Cypress tests to saved queries, is
not working on MKI environments. This is because we are trying to modify
internal indexes directly, something that is completely forbidden in
real Serverless projects.

To solve the issue, we are using our APIs to perform the deletion
actions.
2024-03-25 18:05:35 +01:00
Nicolas Chaulet
50fa45cd97
[Fleet] Allow to request diagnostics with Agent:Read privileges (#179359) 2024-03-25 09:51:21 -07:00
Gabriel Landau
72e150207a
[8.14] Defend Advanced Policy Option to Opt-Out of New Optimization (#179179)
## Summary

We're adding a new performance optimization in 8.14.0 that will make
malware on-write and file event processing completely asynchronous. This
PR adds an Advanced Policy option so users can out out, reverting to the
old behavior.

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

### 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)
2024-03-25 09:50:11 -07:00
Elena Stoeva
4725fc4ca9
[uiSettings] Add more detailed documentation for schema validation (#178761)
## Summary

In https://github.com/elastic/kibana/pull/170234, we added user input
validations in the settings fields. The validation functionality uses
the `schema` object from the settings definition. This PR adds more
detailed documentation of the `schema` property to make people more
aware of the validation functionality when registering a new setting.
2024-03-25 09:24:53 -07:00
Maxim Kholod
e7d1ae2c86
[Cloud Security] define default hidden vars for GCP policy (#178961)
## Summary

Part of:
- https://github.com/elastic/security-team/issues/8040

With the introduction of Agentless when a user enters smth in the JSON
credentials field in Agentless and then switches to Agent-based with the
Cloud Shell option selected by default, the JSON credentials value was
not reset. This was causing incorrect credentials data saved in the
policy.

This PR introduces the logic similar to what we already have for AWS and
Azure to make sure the default credentials types match the setup method
selected

GCP is different though in a way that the credentials type is a
combination of two vars: `setup_access` (values are `google_cloud_shell`
and `manual`) and `gcp.credentials.type` (values are `credentials-json`
and `credentials-file`) which is relevant only for `manual` setup
access. I introduce a new value `credentials-none` for
`gcp.credentials.type` which is set when `setup_access =
google_cloud_shell`. This allows to safely clean up credentials in the
fleet callback
2024-03-25 09:22:46 -07:00
Tim Sullivan
402db0d710
[Reporting] Unskip failing PDF/PNG tests (#179279)
## Summary

Close https://github.com/elastic/kibana/issues/179001
Close https://github.com/elastic/kibana/issues/178924

The logs from the failures indicate that jobs were still in "processing"
status at the end of their timeout. The expectation was that processing
would be finished at that the result would be "failed." This change adds
more time to the timeout limit so the jobs can progress beyond
"processing" and hit the "failed" state.

Flaky test runner job:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5546
2024-03-25 09:20:13 -07:00
Milton Hultgren
184846cfcc
[Obs AI Assistant] Show error toast on failure (#179335)
If the call to `ObservabilityAIAssistantAppService.start` fails, show an
error toast to notify the user.

<img width="354" alt="Screenshot 2024-03-25 at 12 23 46"
src="021d442c-ec34-4acf-b441-6005acde1666">
2024-03-25 16:49:36 +01:00
Chris Cowan
2dc44ff6b8
[kbn-data-forge] Adding custom heartbeat like data for MongoDB (#178354)
## Summary

This PR adds heartbeat-like data for MongoDB in the `fake_stack` dataset
so users can express an SLO for that service. This also changes some of
the details in the Nginx data to allow for group-by on the same domain
names to be used in testing SLO alert dependencies.
2024-03-25 08:17:58 -07:00
Gerard Soldevila
2f5396ca10
Use modelVersions instead of hashes to track changes in SO types (#176803)
## Summary

Address #169734 .

We're currently storing information about _Saved Object_ types in the
`<index>.mapping._meta`.
More specifically, we're storing hashes of the mappings of each type,
under the `migrationMappingPropertyHashes` property.
This allows us to detect which types' mappings have changed, in order to
_update and pick up_ changes only for those types.

**The problem is that `md5` cannot be used if we want to be FIPS
compliant.**

Thus, the idea is to stop using hashes to track changes in the SO
mappings.
Instead, we're going to use the same `modelVersions` introduced by ZDT:

Whenever mappings change for a given SO type, the corresponding
`modelVersion` will change too, so `modelVersions` can be used to
determine if mappings have changed.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-03-25 15:50:35 +01:00
Elastic Machine
d62490699b
[main] Sync bundled packages with Package Storage (#179343)
Automated by
https://buildkite.com/elastic/package-storage-infra-kibana-discover-release-branches/builds/471
2024-03-25 07:34:34 -07:00
Gloria Hornero
65bd8b00ae
[Security Solution][Entity Analytics] Green execution of Cypress tests on MKI (#179249)
## Summary

In this PR we are introducing several changes to make sure we have a
green execution of Cypress tests on MKI environments.

- Split `entity_analytics.cy.ts` between different spec files
- Skipped managed data section test on MKI
- Refactor of `installRiskScoreModule` method 


#### Split `entity_analytics.cy.ts` between different spec files

The original spec file has a big execution time, what makes from time to
time in MKI environment to perform a log off.

To try to avoid that, we have splited the spec file in 3 new ones inside
the `entity_analytics` folder.

* anomalies.cy.ts
* legacy_risk_score.cy.ts
* new_risk_score.cy.ts


#### Skipped managed data section test on MKI

It has been skipped just on MKI (the test will be executed in PRs for
both serverless and ESS) since I don't know how to fix it. A
[ticket](https://github.com/elastic/kibana/issues/179248) has been
created to track it. It is now responsability of the team to investigate
what is happening (I can give support with that).


#### Refactor of `installRiskScoreModule` method 

That method is returning a `401` on MKI, to fix it, we refactored to use
`rootRequest` instead since it uses the basic API authentication by
default.
2024-03-25 07:25:58 -07:00
Nicolas Chaulet
7ea0ddc038
[Fleet] UI support subfeature privileges (#178667) 2024-03-25 10:22:39 -04:00
Stratoula Kalafateli
10e34e4723
Make the formula api optional for the lens builder (#179255)
## Summary

For ES|QL charts the formula api should be redundant. This is going to
make the api lighter as there is no need to import the lens plugin if
you want to use the builder to create ES|QL charts.
2024-03-25 07:09:37 -07:00
Peter Pisljar
e551625ade
fixing goal max and goal value configuration (#179133) 2024-03-25 14:59:44 +01:00
Kibana Machine
a49b7c154d skip failing test suite (#179297) 2024-03-25 09:48:21 -04:00
Ignacio Rivas
17d299b891
[Index Management] Add unsigned long data type (#179224) 2024-03-25 14:42:06 +01:00
Søren Louv-Jansen
bb72b3e8e9
[ObsAiAssistant] Move AI Assistant Management plugin to x-pack (#179235)
This PR moves the AI Assistant Management plugin into x-pack to
co-locate it with the other assistant plugins and to make it possible to
statically import from the other assistant plugins. This is not
currently possible because the Management plugin is in OSS and the other
plugins are in xpack.
2024-03-25 08:36:36 -05:00
Ying Mao
084af44b40
[Response Ops][Alerting Adding isTrackedAlert function to alerts client (#179253)
## Summary

Allows rule executors to determine whether an alert is tracked from a
previous execution.

Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co>
2024-03-25 09:04:54 -04:00
Ignacio Rivas
50c6d1392f
[ILM] Account for deprecated prop in show request flyout (#179223) 2024-03-25 14:00:48 +01:00
Robert Oskamp
1635daf160
Fix serverless reporting API integration tests for MKI runs (#179330)
## Summary

This PR fixes the serverless reporting API integration tests for MKI
runs.

### The problem that we saw

After #178159 was merged, we saw the `Reporting Generate CSV` API
integration tests fail with `401` responses when running against MKI
projects. It turned out that the tests were using hard-coded credentials
that are only working locally / in CI - real serverless projects run
with a different set of username and password.

### How this PR fixes it

Remove hard-coded credentials from
`x-pack/test_serverless/shared/services/svl_reporting.ts` and instead
read them from the test config, which has the proper entries for local
and MKI runs.

I've also preemptively adjusted
`x-pack/test_serverless/functional/services/svl_reporting.ts` and
`x-pack/test_serverless/api_integration/test_suites/common/reporting/management.ts`
in the same way even though they not run in MKI projects today. This
will hopefully avoid the same set of problems when the tests eventually
get re-enabled for MKI runs.
2024-03-25 13:46:02 +01:00
Alejandro Fernández Haro
e0d569a729
Fetch license depending on ES service status (#177861) 2024-03-25 05:45:04 -07:00
Chenhui Wang
b8df6a7b36
Update GitHub connector RCF to support GitHub App authentication method (#179236)
## Summary

This PR updates the RCF for GitHub native connector, to support GitHub
App as a new authentication method


### 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)
2024-03-25 20:43:19 +08:00
Milton Hultgren
dc56138fa2
[asset_manager] Enable skipped tests (#179323) 2024-03-25 13:25:21 +01:00
Marta Bondyra
0c9bfb89c7
[Lens] remove barely used redux-logger (#179326)
## Summary

Removes redux-logger as we agreed we barely use it.
2024-03-25 13:20:51 +01:00
Mark Hopkin
a64bc79bbb
Use existing ALERT_RISK_SCORE constant in risk score query (#179331)
Address @rylnd's comment
[here](https://github.com/elastic/kibana/pull/178324#discussion_r1532629440)
2024-03-25 05:04:45 -07:00
Tre
92718c6a04
[ML] Add trained model list permission UI tests (#174045)
## Summary

This PR adds more functional ui tests around trained model listing and
what a full access user vs a view only user can see and do.

There is more of a focus on the Add Trained Model Flyout, as that is a
newer feature.

### Details

- Add data test subjects for:
  -  space aware warning "copy"
  - add trained model button
  - trained model flyout
  - trained model flyout close button
  - trained model flyout Elser model "copy"
  - trained model flyout `Manual Download` tab
  - trained model flyout `Click to Download` tab
  - trained model flyout `Choose Model` panels
  - trained model flyout `Download` button
  - trained model flyout eland pip install code block
  - trained model flyout eland conda install code block
  - trained model flyout eland example import code block

Note: Added a helper function to make the dynamic data test subjects for
the `Click to Download` and `Manual Download` easy to reason about. It
is used in the DOM and within the test service method.

-  Add tests to the `trained models` suite
   - Add new provider for `Add Trained Model` Flyout
       - add service methods:
- asserting that while an ml power user can access two tabs within the
flyout, a viewer user can only see 1, the manual download tab.
         - to open and close the flyout
         - assert the download button exists
         - assert e5 panels exist
         - assert eland python code blocks exist
         - assert elser model copy
         - assert elser panels exist
- Modify the api's `deleteIngestPipeline` as it was failing in CI, when
an `it` block failed
- No you can choose whether to assert and it the assertion is made, the
logging occurs as well.
 - Modify `trained models` provider, adding:
- method to close the modal that pops up when a model requested to be
deleted, cannot be
   - method to select a model by name
 - Modify `trained models table` provider, adding:
- method asserting the contents of the warning for why a given model
cannot be deleted, upon attempting to delete said model that resides in
a space or spaces, that the current user cannot see.

---------

Co-authored-by: Dima Arnautov <arnautov.dima@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Robert Oskamp <traeluki@gmail.com>
2024-03-25 12:03:12 +00:00
Vadim Kibana
b4eed69843
Remove legacy snapshot telemetry for reporting codebase (#178281)
## Summary

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

Removes collection of telemetry which is now handled by
https://github.com/elastic/kibana/issues/158501

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


### Risk Matrix

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

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

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

| Risk | Probability | Severity | Mitigation/Notes |

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


### For maintainers

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
2024-03-25 12:07:59 +01:00
Gloria Hornero
6f49ab85e8
[Security Solution][Rule Management] Getting rid off before hook if is not loading an archive (#178891)
## Summary

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

Update:
[Flaky test suite runner passed
successfully](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5522)
2024-03-25 04:04:13 -07:00
Gloria Hornero
6defb37e7c
[Security Solution][Detection Engine] Modifies the way of deleting exception lists in Cypress tests (#179193)
## Summary

The current way we are using in our Cypress tests to delete exception
list, is not working on MKI environments. This is because we are trying
to modify internal indexes directly, something that is completely
forbidden in this real Serverless projects.

To solve the issue, we are using our APIs to perform the deletion
actions.

In `add_edit_exception.cy.ts`, we are also deleting the deletion of a
specific list from the beforeEach hook, since we are doing that already
using `deleteExceptionLists()`

In `manage_exceptions.cy.ts`, we are deleting the
`deleteEndpointExceptionList()` since seems that we are not creating an
endpoint exception.
2024-03-25 11:53:09 +01:00
Julia Rechkunova
6cb6c90dd8
[Discover] Drop the separate total hits request in ES|QL mode. Use the number of fetched records instead. (#178711)
- Addresses a part of https://github.com/elastic/kibana/issues/177156

## Summary

This PR changes how the total hits counter is reported in Discover for
ES|QL mode. The previous logic could be misleading as the received
documents count sometimes was not the same as the shown total hits
counter. Often it's because for ES|QL queries without sorting, separate
requests might return different result.

Before:
Number of received docs in Discover was considered only as "partial"
result for total hits. The final value was coming from UnifiedHistogram:
- if chart is visible and histogram => total hits are based on the
result of the histogram fetch request
- if chart is visible and it's not a histogram but based on discover
fetched records => total hits are calculated from the number of records
- if chart is hidden => total hits are based on the results of the
separate request for getting the count only

After:
Number of received docs in Discover is considered as "complete" result
for total hits. Changes for UnifiedHistogram:
- if chart is visible and histogram => logic stays but the histogram
total hits count is ignored on Discover side
- if chart is visible and it's not a histogram but based on discover
fetched records => logic stays but the histogram total hits count is
ignored on Discover side
- if chart is hidden => this request is removed completely.

It's a proposal. Happy to discuss.

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2024-03-25 11:08:30 +01:00
Philippe Oberti
f8a6324444
[Security Solution] - use expandable flyout in timeline (#177087)
## Summary

This PR enables Timeline to have its own expandable flyout, independent
from the Security Solution app level flyout. This previous
[PR](https://github.com/elastic/kibana/pull/176457) added support to the
`kbn-expandable-flyout` package to be able to show multiple flyout at
the same time.

This PR focuses on:
- changing the location where we use the `<ExpandableFlyoutProvider>` to
wrap only the Security Solution pages. instead of the entire Security
Solution application
- wrapping `Timeline` with its own `<ExpandableFlyoutProvider>`
- opening the new expandable flyout from timeline for alerts, users and
host!!

### Notes

- the new expandable flyout opened from `Timeline` is saved in the url
under a new `timelineFlyout` parameter. The other Security Solution
flyout stays saved under `eventFlyout` so both can be displayed at the
same time
- introduced a new feature flag called
`expandableTimelineFlyoutEnabled`, enabled to `false` by default. The
code uses this flag in combination with the already existing
`securitySolution:enableExpandableFlyout` advanced settings to toggle
on/off the expandable flyout in `Timeline`

I had to make a small change to the timeline `z-index` value, from its
hardcoded value of `1000` to now `1001`. At the same time I'm setting
the `z-index` of the `eventFlyout` to `1000` and the `z-index` of the
`timelineFlyout` to `1002`. Finally, I changed the `z-index` of all the
other flyouts opened from the `Take action` button in the footer (like
_Add to new case_, _Add rule exception_...) to `1003`. This was the only
way to get the order correct after page refresh, and also work in
Serverless which has a different top level layout (for the top bar and
the left navigation panel).

### Testing

Make sure you have the flag turned on in your `kibana.yml` file:
`xpack.securitySolution.enableExperimental:
['expandableTimelineFlyoutEnabled']`

While the code changes are pretty minimal, emphasize should be done on
testing:
- verify that the non-timeline expandable flyout behavior hasn't changed
(in the Explore, Rule Preview, Alerts pages...)
- verify the advanced settings correctly toggles on and off the
expandable flyout for both the Security Solution app and Timeline
- verify the expandable flyout correctly shows up in Timeline on all the
pages where Timeline is present
- verify both flyout can be shown at the same time
- verify refreshing the page reloads correctly all flyouts open
- verify copying the url or using the Share Alert button at the top can
be correctly reopened in another tab

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

### TODO

- [x] fix unit tests
- [ ] fix e2e tests
- [x] figure out how to fix the UI in serverless (the flyout is
currently behind the left navigation)

Before change:


3b89f87f-d1fa-4635-8ff7-855795eb3796

After change:


6b341f11-054c-4885-b496-006f37b8d572

Serverless


df414140-31df-4941-869e-c177cfedd805

https://github.com/elastic/security-team/issues/7464

Details of file changed in [the comment
below](https://github.com/elastic/kibana/pull/177087#issuecomment-1988642537)
2024-03-25 10:47:23 +01:00
Kibana Machine
2aa5d968e8
[api-docs] 2024-03-25 Daily api_docs build (#179313)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/653
2024-03-25 05:15:52 +00:00
Kibana Machine
d4dd309e04
[api-docs] 2024-03-24 Daily api_docs build (#179309)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/652
2024-03-24 05:59:44 +00:00
Kibana Machine
f362444420
[api-docs] 2024-03-23 Daily api_docs build (#179306)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/651
2024-03-23 05:58:02 +00:00
Tim Sullivan
2ff5410161
[Reporting/CSV] Deprecate Download CSV, add a config flag to enable (#178159)
Closes https://github.com/elastic/kibana/issues/164104

## Summary

**Replace "Download CSV" with "Generate CSV report" to export a CSV file
from saved search panel, deprecate "Download CSV", use a config flag for
providing the deprecated feature.**

This PR uses the `xpack.reporting.csv.enablePanelActionDownload`
kibana.yml setting, which was previously unused, for choosing behavior
of CSV export in a Dashboard saved search panel, and sets the default
value to `false`. The options allow the user to download a CSV file
without creating a report (deprecated, support will be removed in the
future) or to generate a CSV report (default).

1. Use the config as a flag to switch between implementations:
    - downloading a CSV file without a generated report
    - generating a CSV report
2. Updated documentation
3. Refactored / cleaned up tests
4. Increased API test coverage in Serverless
5. Better error handling in
`packages/kbn-reporting/public/reporting_api_client.ts`

### Checklist

Delete any items that are not applicable to this PR.

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

## Release Note
Kibana CSV Reporting offered a feature allowing users to download a CSV
file from a saved search panel in a dashboard, without having a report
generated. This feature is now deprecated. Now, when users need to
access saved search data from a dashboard panel as CSV, a normal report
will be generated. To access the deprecated functionality, you can add
`xpack.reporting.csv.enablePanelActionDownload: true` to kibana.yml, but
this ability will be removed in a future version of Kibana.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-03-22 18:28:09 -07:00
Clint Andrew Hall
0b63fd190e
[chore] Fix kebab warnings in Kibana start and ML plugin build (#179298)
## Summary

I've always been annoyed with these warnings that appear in the console
when starting Kibana:

<img width="1344" alt="Screenshot 2024-03-22 at 3 40 09 PM"
src="9e722ea9-8ca4-47de-8f28-ca511d6e7194">

The trouble is, it's been nearly impossible to find these in the code.

While working with some changes to the `ml` plugin, I noticed something
familiar:

<img width="925" alt="Screenshot 2024-03-22 at 3 39 56 PM"
src="5d69c693-512b-4794-9bd7-f2d12c693d7d">

So with a smaller haystack, I was able to find and fix them.

<img width="671" alt="Screenshot 2024-03-22 at 4 51 43 PM"
src="70db7016-eb04-4171-a4a8-18e4df7131ae">
2024-03-22 20:45:36 -04:00