Commit graph

564 commits

Author SHA1 Message Date
Christiane (Tina) Heiligers
e811b624ff
unskips application leave confirm & application deep links tests (#168741)
fix https://github.com/elastic/kibana/issues/166838
fix https://github.com/elastic/kibana/issues/166893
fix https://github.com/elastic/kibana/issues/75963

I modified the deep links tests because the side nav was overlaying the
in-app nav.
While, theoretically, the side nav should work for the tests, it tends
to be flaky.

I added logs for the url so that if these tests do fail, we'll have a
bit more data to go on for debugging.
These tests pass on local test runs.

latest flaky test runs (50):
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3604


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

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-10-19 06:03:24 -07:00
Yulia Čech
11b1bc77a6
[Index Management] Update editable index settings for Serverless (#168884)
## Summary

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

This PR limits which index settings are displayed on the index details
page, "Settings" tab in the edit mode. On serverless only a handful of
index settings will be editable by the user. The UI only prevents
displaying some index settings, but it's still possible for the user to
type in a setting that can't be edited. That is the case on dedicated as
well.

### How to test
1. Start Serverless ES and Kibana
2. Navigate to Index Management and create a test index
3. Click on the index name and on the details page click the tab
"Settings"
4. Toggle the "Edit mode" switch and verify that only editable settings
are displayed.

#### Screenshot
<img width="527" alt="Screenshot 2023-10-16 at 20 25 49"
src="e6678cca-3494-4c63-ae66-ace9c823d12d">
2023-10-18 15:22:54 +02:00
Christiane (Tina) Heiligers
ac80b2af63
Fix failing applications navigation test (#168302)
fix [#166677 ](https://github.com/elastic/kibana/issues/166677) 

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

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-10-16 17:19:18 -07:00
Mykola Harmash
3e8058bdf2
[Infra UI] Disable Infrastructure and Metrics alerts in Serverless (#167978)
Closes https://github.com/elastic/kibana/issues/164683

## Summary

This PR disables the infrastructure, metrics and logs alerts rule in
Serverless:
- Deletes the code responsible for the "Metric Anomaly" rule as it was
[previously disabled](https://github.com/elastic/kibana/pull/93813) with
plans to re-enable it as the previous PR describes but that never
happened.
- Adds feature flags for all three types of alert rules
- Prevents rules registration in serverless based on the feature flags
- Adds logic for showing/hiding items in the "Alerts and rules" dropdown
- Disables custom threshold rule in the Infra UI by default in
serverless as the rule needs to first be enabled by default by
@elastic/actionable-observability team
([context](https://elastic.slack.com/archives/C023GDA0WMP/p1696853751040269))

**Dropdown**
![CleanShot 2023-10-05 at 15 22
48@2x](fb7344c6-b5ee-4020-bd69-473dcd6be446)

**Host details**
![CleanShot 2023-10-05 at 15 23
02@2x](8164f82b-323c-4a2a-8cdc-c65a6c0f0c63)

### How to test

- Checkout locally Run in Serveless mode
- Enable, Infra plugin, custom threshold in Infra, and custom threshold
rule in general:
```
xpack.infra.enabled: true
xpack.infra.featureFlags.customThresholdAlertsEnabled: true
xpack.observability.unsafe.thresholdRule.enabled: true
```
- Go to `/app/metrics/hosts` and make sure there are no "Infrastructure"
and "Metrics" items in the "Alerts and rules" dropdown
- Click on "Manage rules" in the "Alerts and rules" dropdown, then
"Create rule" to open the rule selection flyout
- Make sure there are no rules for "Inventory", "Metrics" or "Logs"
threshold
- Run Kibana in traditional mode
- Make sure the "Alerts and rules" dropdown looks as usual and you can
create "Infrastructure" and "Metrics" alerts

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-10-12 15:24:30 +02:00
Vadim Kibana
f2bfbbd23b
Set correct ownership of older app-services code (#168209)
## Summary

Removes `@elastic/kibana-app-services` from `CODEOWNERS` file.

---------

Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
2023-10-09 18:57:26 +02:00
Sergi Massaneda
c7df950bd7
[Security Solution] Static config settings for serverless (#167856)
## Summary

This PR implements a standard way to have different static settings for
the serverless and ess (stateful) environments. It centralizes flags,
which were set using different approaches previously, in a single
configuration.

This aims to make it easier for developers to enable/disable parts of
the application in serverless projects.

Default:
```
  sideNavEnabled: true,
  ILMEnabled: true,
  ESQLEnabled: true,
```

Serverless:
```
xpack.securitySolution.offeringSettings: {
    sideNavEnabled: false, # Internal security side navigation disabled, the serverless global chrome navigation is used instead
    ILMEnabled: false, # Index Lifecycle Management (ILM) functionalities disabled, not supported by serverless Elasticsearch
    ESQLEnabled: false, # ES|QL disabled, not supported by serverless Elasticsearch
  }
```

### Consume the settings

#### Server 
- Plugin parsed `ConfigType`:
`this.config.settings.ESQLEnabled`

#### UI
- Plugin attribute: 
`this.configSettings.ESQLEnabled`.
- Components can access it from Kibana services:
`useKibana().services.configSettings.ESQLEnabled;`

---------

Co-authored-by: Vitalii Dmyterko <92328789+vitaliidm@users.noreply.github.com>
2023-10-09 15:11:51 +02:00
Carlos Crespo
2f8ce938be
[Infra UI] Disable infra logs UI in serverless (#168011)
closes https://github.com/elastic/kibana/issues/166977
## Summary

This PR creates a feature flag to disable logs UI features in
serverless.

_Serverless_

**Frontend routes**

<img width="1466" alt="image"
src="a856055b-f78b-4d47-b27e-678e19bdfae4">


`/logs/stream`
<img width="1714" alt="image"
src="83d50be2-ed3a-4441-b31c-1afe6f8fd0b9">

`/logs/log-categories`
<img width="1714" alt="image"
src="85cd369d-55b2-46a2-a61a-135c5f18e299">

`/logs/anomalies`
<img width="1714" alt="image"
src="d68e6f91-fe29-483f-931d-d05f4303effa">

**Server routes**

These will return 404

```
POST kbn://api/infra/log_analysis/results/log_entry_anomalies_datasets

POST kbn://api/infra/log_analysis/results/log_entry_anomalies

POST kbn://api/infra/log_analysis/results/log_entry_categories

POST kbn://api/infra/log_analysis/results/latest_log_entry_category_datasets_stats

POST kbn://api/infra/log_analysis/results/log_entry_category_datasets

POST kbn://api/infra/log_analysis/results/log_entry_category_examples

POST kbn://api/infra/log_analysis/results/log_entry_examples

POST kbn://api/infra/log_analysis/results/log_entry_datasets

POST kbn://api/infra/log_analysis/results/log_entry_rate_indices

POST kbn://api/infra/log_alerts/chart_preview_data                            
```


_Stateful_

<img width="1716" alt="image"
src="4406434f-78e4-437f-b3b5-1b03dc23f3c0">

**Server routes**

These will return 400 - currently there is no way to pass `version` via
dev tools

```
POST kbn://api/infra/log_analysis/results/log_entry_anomalies_datasets

POST kbn://api/infra/log_analysis/results/log_entry_anomalies

POST kbn://api/infra/log_analysis/results/log_entry_categories

POST kbn://api/infra/log_analysis/results/latest_log_entry_category_datasets_stats

POST kbn://api/infra/log_analysis/results/log_entry_category_datasets

POST kbn://api/infra/log_analysis/results/log_entry_category_examples

POST kbn://api/infra/log_analysis/results/log_entry_examples

POST kbn://api/infra/log_analysis/results/log_entry_datasets

POST kbn://api/infra/log_analysis/results/log_entry_rate_indices

POST kbn://api/infra/log_alerts/chart_preview_data                            
```

### How to test

### How to test

- Start a local es instance: `yarn es serverless --kill --clean
--license trial --ssl`
- Enable `infra` in the `serverless.oblt.dev.yml` file:
  - `xpack.infra.enabled: true`
- Start a local kibana instance: `yarn serverless-oblt --ssl` 
- Verify the items listed above both on serverless and stateful
2023-10-06 10:15:43 +02:00
Jeramy Soucy
335a751c00
Fixes rendering service config keys test (#167937)
Closes #167142
Closes #157126

## Summary

Fortifies the rendering service tests by introducing a retry loop to get
injected metadata after navigation. The `kbn-injected-metadata` tag that
we're relying on in this test gets removed some time after navigation
(e.g. to `.../render/core`). It appears that occasionally this test
fails to read the tag before it is removed.

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-10-05 13:59:19 -04:00
Hannah Mudge
4d1bd84309
[Dashboard] Fix flaky pluggable actions test (#167926)
Closes https://github.com/elastic/kibana/issues/136460

## Summary

Similar to https://github.com/elastic/kibana/pull/167836, navigation
through `header.clickDashboard()` was flaky in the attached test because
the same `data-test-subj` was re-used for both the application-specific
top navigation **and** the reusable application listing page component:


8b6ba3d15f/src/plugins/navigation/public/top_nav_menu/top_nav_menu.tsx (L120-L124)


8b6ba3d15f/packages/content-management/table_list_view/src/table_list_view.tsx (L91-L96)

This meant that, when the referenced flaky test tried to navigation from
the Visualization listing page to the dashboard app in
`clearSavedObjectsFromAppLinks` via the header page object's
`clickDashboard` method, it wasn't actually waiting to navigate to the
dashboard app because it detected the `top-nav` data test subject from
the **visualization** listing page **and not** from the dashboard app.

Therefore, instead of navigating through the `header` method, I switched
to the new `navigateToAppFromAppsMenu`, which relies on the URL to
update to ensure navigation has occured rather than the `top-nav` data
test subject. I also added logic to close the flyout as part of the test
cleanup, since it was remaining open even after navigating to the
Visualizations listing page, which was getting in the way of the failure
screenshot.


### Flaky Test Runner

- Without closing of flyout:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3323


![image](628f0da9-1e2a-45a9-b58b-dab92e345118)

- With closing of flyout:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3336
    

![image](3456db1a-9cee-4db9-a28d-4c0d1520a5ec)


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

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-10-04 11:21:02 -06:00
Mykola Harmash
48be97bea2
[Infra UI] Add custom threshold alerts for serverless (#167639)
Closes https://github.com/elastic/kibana/issues/166612

## Summary

- Adds a `customThresholdAlertsEnabled` feature flag
- Based on the feature flag shows an additional menu item in the alerts
dropdown
- Adds flyout component for rendering the custom alerts flyout

**Serverless**
<video
src="4fc79427-1e0c-4692-8525-b3b35e8a04e9"
controls="controls"></video>

**Traditional**

![Traditional](b2c16478-a40d-4312-a41e-5e34c98daa47)

## How to test

- Checkout locally and run in serverless mode (infra plugin on)
- Make sure you see the "Create custom threshold alert" menu item in the
"Alerts and rules" dropdown
- Click on the item and make sure you can create an alert
- Run Kibana in traditional mode and make sure the dropdown item is not
there
2023-10-04 15:06:55 +02:00
Carlos Crespo
ede81cfdb0
[Infra UI] Disable Osquery in serverless (#167233)
closes https://github.com/elastic/kibana/issues/163280

## Summary

Disables OSquery in serverless. 


<img width="1670" alt="image"
src="0ece0503-a5f3-46a1-a99b-29285088526c">

<img width="1670" alt="image"
src="5d20aaa4-7bdc-47e5-b9c2-469ecf62ab1f">


<img width="1670" alt="image"
src="97874aee-be98-4f0a-984a-562abbd4187d">

Osquery is now only used in the Asset Details flyout/full-page view. The
header component in the Asset Details now checks the feature flag object
to show/hide the OSquery tab.

### How to test

- Start a local es instance: `yarn es serverless --kill --clean
--license trial --ssl`
- Enable `infra` in the `serverless.oblt.dev.yml` file:
  - `xpack.infra.enabled: true`
- Start a local kibana instance: `yarn serverless-oblt --ssl` and see if
the side nav contains the Infrastructure item
- Navigate to `https://0.0.0.0:5601/ftw/app/metrics` and open the Asset
Details flyout from Inventory and Hosts View. Navigate to the details
view and check that Osquery tab isn't present.

- Confirm if OSquery tab is present in stateful.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-10-04 12:48:30 +02:00
Faisal Kanout
d28227ca6a
[AO] Set the Custom Threshold ONLY available on stateful as Tech Preview (#167782)
## Summary
It fixes https://github.com/elastic/kibana/issues/167650
2023-10-02 20:34:16 +03:00
Kibana Machine
6d343316a4 skip failing test suite (#167142) 2023-10-02 12:35:50 -04:00
Mykola Harmash
d0a0a1f9e6
[Infra IU] Disable Metrics Explorer for serverless (#167022)
Closes #163282 

## Summary

This PR:
* Adds a `featureFlags.metricsExplorerEnabled` property to the Infra
plugin config to enable and disable Metrics Explorer depending on the
offering type
* Prevents `MetricsExplorerViewsService` initialization for serveless
based on the feature flag
* Prevents creating Metrics Explorer frontend routes when in serverless
* Prevents registration of the MetricsExplorerViews saved object when in
serverless
* Prevents initialization of the `metrics_explorer_views` API routes
when in serverless

**Trying to access Metrics Explorer in serverless**
<img width="1829" alt="CleanShot 2023-09-22 at 12 59 35@2x"
src="2b039925-0f0b-4c07-be29-bbe910de7a34">

**Trying to access views API**
<img width="1829" alt="CleanShot 2023-09-22 at 13 00 00@2x"
src="15269ec2-becd-4ee3-9b5e-d916df28a7b8">

**`infra/metrics_explorer` API still works as per ticket requirements**
<img width="1829" alt="CleanShot 2023-09-22 at 13 00 06@2x"
src="fb23f912-c6fd-46c8-9084-c17c51e5b064">


## How to test
* Checkout locally
* Enable Infra in `serverless.oblt.yml`: `xpack.infra.enabled: true`
* Run Kibana in serverless mode
* Try accessing `/app/metrics/explorer` route and make sure it's not
available
* Make sure other Infra routes (`/app/metrics/inventory` and
`/app/metrics/hosts`) still load as expected
* In Kibana dev console make sure you get 404 for `GET
kbn:/api/infra/metrics_explorer_views`
* Also check that you don't see `metrics-explorer-view` saved object in
the response for `GET
kbn:/api/kibana/management/saved_objects/_allowed_types`
* Run Kibana in non-serverless mode and make sure Metrics Explorer is
accessible and works as usual

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-09-29 11:27:19 +02:00
Jason Rhodes
859ae9e50d
[Asset Manager] Creates baseline public asset client for use in public plugins (#167191)
Closes #167075 

## Summary

Adds a public asset client available in the `setup` lifecycle hook for
plugins that depend on this one. `getHosts` is the only method available
on this client for now.

TODO, before merge:
- [x] Add docs for the server client
- [x] Add docs for the public client
- [x] Remove REST docs from plugin docs, not needed
- [x] Add unit tests for public client


### Testing this PR

One way of testing this new client is to apply the attached
test-assets.patch file locally, adjust the date range in the getHosts
query that is added in the infra plugin, and then start Kibana and
navigate to the infra app. You should see print out in the browser
console.


[test-assets.patch](12718693/test-assets.patch)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-09-28 13:26:24 -07:00
Yulia Čech
e1b37a6aa3
[Index Management] Implement index details page (#165705)
## Summary
This PR removes the feature flag and enables the new index details page
by default. The index details page was implemented in following PRs:
- https://github.com/elastic/kibana/pull/163521
- https://github.com/elastic/kibana/pull/163955
- https://github.com/elastic/kibana/pull/164741
- https://github.com/elastic/kibana/pull/165027
- https://github.com/elastic/kibana/pull/165038
- https://github.com/elastic/kibana/pull/165456

In this PR we completely remove now obsolete code for the old index
details flyout: react components and corresponding redux code. All
related tests are updated and cleaned up. The config value for Index
Management plugin `xpack.index_management.dev.enableIndexDetailsPage` is
deprecated as unused and can be removed in v9.0.


### How to test
1. Start ES and Kibana with `yarn es snapshot` and `yarn start`
3. Navigate to Index Management and create an index
4. Click the index name in the table and check the tabs of the details
page
### Screenshots
#### Stateful
Overview 
<img width="1387" alt="Screenshot 2023-09-27 at 14 41 57"
src="e58b15e7-d10c-4473-873c-d0f128392404">


Mappings
<img width="1392" alt="Screenshot 2023-09-27 at 14 42 05"
src="441157cb-5a26-47c3-8da0-b4df51ebec5d">


Settings 
<img width="1385" alt="Screenshot 2023-09-27 at 14 42 13"
src="da66a2eb-1f21-44c1-9356-484c66caab88">


Statistics
<img width="1380" alt="Screenshot 2023-09-27 at 14 42 22"
src="ec93d85c-e754-4c21-88ab-0124dc114fc9">


Error loading data
<img width="1333" alt="Screenshot 2023-09-26 at 19 05 37"
src="fc1804b3-6aa0-4019-bae6-e7bb40113b28">
<img width="1327" alt="Screenshot 2023-09-26 at 19 06 07"
src="ca711697-cc74-4ba8-b17c-ec9b01f3026e">
<img width="1329" alt="Screenshot 2023-09-26 at 19 06 28"
src="0cb46b09-8542-452a-8845-40d060057e95">
<img width="1331" alt="Screenshot 2023-09-26 at 19 06 48"
src="87de8d3d-b6e5-4e8f-b27c-18a1c6e950d8">


Error saving index settings
<img width="1332" alt="Screenshot 2023-09-26 at 19 07 31"
src="e6e4b3d0-c237-4d0a-995a-4562bc78f88e">


### Serverless
Overview 
<img width="1336" alt="Screenshot 2023-09-26 at 19 51 47"
src="6c76c23b-4be6-4ab3-ae1d-c7ae751e100d">


Mappings
<img width="1336" alt="Screenshot 2023-09-26 at 19 23 51"
src="625fa703-506f-4389-9df0-86441a655074">


Settings
<img width="1332" alt="Screenshot 2023-09-26 at 19 24 02"
src="c496ab09-f2db-4c1b-9fb6-1e9b64b1c142">


# Release note
Index details can now be viewed on a new index details page in Index
Management.
<img width="1387" alt="Screenshot 2023-09-27 at 14 41 57"
src="b90c706d-8b15-49e4-8f6a-cb66f3ed1822">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-09-27 11:22:26 -07:00
Kerry Gallagher
b2271a9fd7
[Logs+] Remove configurable redirects to Discover (#167151)
## Summary

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

Removes configurable app targets. Only the standard logs app is
registered (Note: [Infra is disabled in
serverless](https://github.com/elastic/kibana/pull/165289) observability
/ security projects currently).

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-09-27 18:02:37 +01:00
James Gowdy
c18513e23d
[ML] Removing global isServerless flag (#166651)
Removed `isServerless` flag which lived in our global context and had to
be passed about to the various components which create their own version
of the context using `getMlGlobalServices`
This PR adds a new context which contains flags for all of the features
which can be toggled when in serverless mode.
Flags added:
```
 showNodeInfo
 showMLNavMenu
 showLicenseInfo
 isADEnabled
 isDFAEnabled
 isNLPEnabled
```
The enabled features flags are now read from the config file client
side, rather than using capabilities.

Additional changes:
- Changes the wording of the awaiting ML node callout in serverless.
- In the search project, the default ML page is the trained models list
and not Overview
- Reenables the Memory Usage page for all projects

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-09-27 09:32:17 +01:00
Kibana Machine
9dc854cf40 skip failing test suite (#166893) 2023-09-21 10:04:17 -04:00
Kibana Machine
f6084a5d1b skip failing test suite (#166838) 2023-09-20 13:23:57 -04:00
Kibana Machine
ed0aadd14e skip failing test suite (#75963) 2023-09-20 13:00:43 -04:00
Kibana Machine
82306ea110 skip failing test suite (#166677) 2023-09-20 10:23:42 -04:00
Pierre Gayvallet
b1bfe92637
[cloud plugin] Add serverless projectName to configuration and contract (#166330)
## Summary

Part of https://github.com/elastic/kibana/issues/166182
Similar to https://github.com/elastic/kibana/pull/161728

Add the `serverless.project_name` config setting to the cloud plugin,
and expose the `serverless.projectName` info from the cloud plugin's
API.
2023-09-14 11:28:31 +02:00
Mark Hopkin
238428076c
[Fleet] Show snapshot version in agent upgrade modal + allow custom values (but not in serverless) (#165978)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-09-11 12:56:39 +02:00
Gerard Soldevila
f8303ec7cf
[esArchiver] Do not perform SO migration on cleanup (#163302)
## Summary

Attempt at fixing https://github.com/elastic/kibana/issues/127545

The failing tests use `esArchiver` to cleanup Saved Object indices
between tests.
Strangely, the cleanup method calls the migration logic to update the SO
indices.

In this particular source of flakiness, a test fails during the
migration (problem is tracked by
https://github.com/elastic/kibana/issues/163289).

Performing a migration as part of the cleanup does not make too much
sense (at least in this test suite), so the goal of this PR is to
simplify the cleanup operation, getting rid of the call to
`migrateSavedObjectIndices`.

50 runs flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2850
2023-09-01 12:41:20 +02:00
Alejandro Fernández Haro
0ea37c1b42
[On-Week] Hot update of APM/EBT labels (#157093) 2023-08-31 14:36:20 +02:00
Felix Stürmer
ad59308b24
[Log Explorer] Convert log explorer profile into standalone app (#164493)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani01@gmail.com>
2023-08-31 14:18:44 +02:00
Julia
0af40a3066
[RAM] Autocomplete (#158454)
## Summary

Solves this issue: https://github.com/elastic/kibana/issues/161763

This PR introduces autocomplete for mustache variables for email
connector(next PR will add it to all connectors) under the feature flag.

We decided keep old solution with button with all searchable options as
well.

How to test:
Create an email connector in kibana.yml:

xpack.actions.preconfigured:
  maildev:
    name: 'email: maildev'
    actionTypeId: '.email'
    config:
      from: 'guskova@example.com'
      host: 'localhost'
      port: '1025'

How it should work:
You start writing in Message window {{ and mustache variable name. And
you should see autocomplete popup with all possible options to choose.
When you click somewhere else, popup should disappeared.


061016a6-b8ca-497b-9bed-b8b012d31a95

e options to choose. When you click somewhere else, popup should
disappeared.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
2023-08-30 19:04:14 -07:00
Alejandro Fernández Haro
cc728f6f2b
[Flaky #116059] Unskip test (#165125) 2023-08-30 11:16:11 +02:00
Anton Dosov
243142d9c1
[Serverless Elasticsearch] Fix user is blocked from moving forward when opening Discover, Dashboard, or Visualize Library 2023-08-28 15:24:34 +01:00
Sander Philipse
7df567289a
[Search] Set up empty connectors page (#164340)
This adds an empty connectors page to the Elasticsearch project. The
Enterprise Search plugin exports relevant connectors data and functions,
the Search plugin simply consumes these.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-23 15:56:50 -05:00
Alison Goryachev
a14f76d96c
[Index Management] Disable index stats on serverless (#163849) 2023-08-23 08:18:48 -04:00
Matthew Kime
2b47e4b346
[data views] Disable scripted fields in serverless environment (#163228)
## Summary

Disables scripted fields in serverless environments. Data view defined
scripted fields are ignored and the scripted fields tab in data view
management is hidden.

scriptedFieldsEnabled is defined via conditional config that's only
available in serverless environments.

---------

Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
2023-08-22 21:46:40 -05:00
Jean-Louis Leysens
a00c2401e2
[HTTP] Add build number to headers so that we can identify UIs (#163577)
Close https://github.com/elastic/kibana/issues/162332

### List

- [x] Add E2E test

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-16 16:05:57 +02:00
Yulia Čech
3efc0a7c45
[Index Management] Add an index details page behind a dev feature flag (#163521)
## Summary
This PR adds a dev feature flag
`xpack.index_management.dev.enableIndexDetailsPage` that will allow us
to build out the new index details page in small iterations. Without the
flag, the UI of Index Management is not changed. A skeleton component is
created for the details page (see screenshot below).

### How to test
1. Test the Index Management UI (Indices tab) without the flag and check
that no changes were introduced
1. Add `xpack.index_management.dev.enableIndexDetailsPage: true` to the
file `/config/kibana.dev.yml`
2. Navigate to the Indices tab in Index Management, toggle "hidden
indices" if no indices exist and click any index name
3. Check that the new index details page is displayed
4. Check that the tabs on the page are working

### Screenshots 
<img width="1209" alt="Screenshot 2023-08-09 at 19 17 46"
src="e654ef36-ccf3-40a4-8c7b-750b83defef5">

### Checklist

Delete any items that are not applicable to this PR.

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


### Risk Matrix

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

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

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

| Risk | Probability | Severity | Mitigation/Notes |

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


### For maintainers

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-15 04:11:54 -07:00
Alison Goryachev
97f44c1e50
[Index Management] Disable legacy index templates (#163518) 2023-08-14 10:40:16 -04:00
Alejandro Fernández Haro
0284cc158d
[Telemetry] Use header-based versioned APIs instead of path-based (#159839) 2023-08-12 14:20:06 -07:00
Yulia Čech
39e11ffbac
[Index Management] Disable index actions using contextRef (#163475)
## Summary
Follow up to https://github.com/elastic/kibana/pull/161528 

This PR leverages the [schema.contextRef('serverless')
check](https://www.elastic.co/guide/en/kibana/master/configuration-service.html#validating-your-configuration-based-on-context-references)
to prevent the config `enableIndexActions` from leaking to self-managed.

### Screenshots
Stateful (no changes), index actions enabled

<img width="916" alt="Screenshot 2023-08-09 at 12 15 31"
src="527ce600-8758-44b4-bd41-c93723254646">

Serverless (no changes), index actions disabled

<img width="622" alt="Screenshot 2023-08-09 at 12 09 45"
src="80190375-6cea-445d-8a75-3b354a447e9d">
2023-08-10 13:42:49 +01:00
Janki Salvi
dc949ee373
[Cases] Hide cases in stack management UI (#163037)
## Summary

fixes https://github.com/elastic/kibana/issues/160337

This PR 
- hides cases in the serverless Elasticsearch project, cases APIs throw
error
- throws 403 from API when `owner=cases` for security or observability
serverless mode
- verifies the behaviour in serverless functional as well as
api_integration tests

**How to test**

- Boot up `es` serverless solution and make sure that `cases` from the
navbar is hidden and cannot not be accessible through url as well
- Boot up `observability` or `security` serverless solutions and make
sure that `cases` is available in the navbar and works fine
- Boot up classic kibana and make sure that the left navbar has the same
menu entries it always had.

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



20c1974e-44f0-45b0-80aa-e644fec148ff

### For maintainers

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-09 17:52:36 +02:00
Miriam
adb9573cb2
Revert "[APM] Add index.fast_refresh to .apm-custom-link" (#163142)
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
2023-08-08 08:34:48 +01:00
Anton Dosov
1047eef005
Update Project Selection in Serverless Top Navigation (#163076)
## Summary

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

- Changing `My Deployments -> Projects`
- Removing hardcoded url and passing one from the config
2023-08-07 16:18:35 +02:00
Davis McPhee
5aac9c5875
Assign functional tests and example plugins code ownership to Data Discovery (#162740)
## Summary

This PR assigns code ownership to the Data Discovery team for various
functional tests as well as a couple of example plugins. All of the
tests assigned to us in `CODEOWNERS` currently have no one else assigned
to them.

### 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~
- [ ] ~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>
2023-08-04 17:21:13 -03:00
Yulia Čech
fbfd3ed0dd
[Console] Set up a folder for manual definitions files (#162652)
## Summary
Fixes https://github.com/elastic/kibana/issues/162564

This PR adds a new folder to Console server side where manually created
definitions for endpoint will be stored. This is important before we
switch to the new script. The logic in the new script is to clear the
folder with generated definitions before re-generating them. That is not
the case in the current script. The downside of that is when an endpoint
is removed from the specifications, it won't be removed from
autocomplete definitions automatically. Displaying autocomplete
suggestions for unavailable endpoints might be confusing for users.

Currently, the `manual` folder is empty because there were no
definitions present in the folder `generated` that would not be
re-generated if the script would clear the folder and create all
endpoints defined in ES json specs. I first suspected that endpoints
from these 2 PRs (https://github.com/elastic/kibana/pull/162503,
https://github.com/elastic/kibana/pull/158674) would need to be moved to
the manual folder, but the definitions added there manually can be
re-generated using the script.

I also removed several deprecated/deleted/renamed endpoints from the
`generated` folder. Several files in the `overrides` folder needed
renaming and one was deleted as deprecated.

There are also smaller renaming changes in this PR because I think the
code is more difficult to understand when it's using
"spec/specification" and "definition" interchangeably or even together
as "SpecDefinitions". I believe we should use "specification" for the ES
specifications (i.e. the source) and "definitions" or even better
"autocomplete definitions" for the files that are used for Console
autocomplete engine. The renaming is to be continued in follow up PRs.

I also added a unit test file for the SpecDefinitionsService since it
contains a lot of important logic for endpoints such as loading
generated definitions, overrides and manual ones and filtering out
endpoints not available in the current context.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
2023-08-02 12:37:06 -04:00
Dario Gieselaar
f0ebb7097d
[Observability AI Assistant]: Move to new plugin, update design and use connectors (#162243)
This PR makes the following changes:

- Update look & feel of contextual insights (previously called prompts)
according to the new design that is being developed. Some things might
still change, but hopefully not too much.
- Move all the Observability AI Assistant (previously called CoPilot)
code into a separate plugin for better isolation, more specific code
ownership and to solve some circular dependency issues
- Use connectors instead of a kibana.yml setting

Note: for OpenAI, the model is currently hardcoded to `gpt-4` until
https://github.com/elastic/kibana/issues/162204 has been addressed.


557676b6-065a-4b6f-86b2-1f0c2fd5e07e

---------

Co-authored-by: Coen Warmer <coen.warmer@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-28 11:52:00 -04:00
Bena Kansara
5a2b80f8db
Add feature flag for new Threshold Alert details page (#162394)
Resolves https://github.com/elastic/kibana/issues/162393

Adds a new feature flag
`xpack.observability.unsafe.alertDetails.observability.enabled` to
show/hide threshold alert details page until it is ready for GA.
2023-07-27 11:53:29 +02:00
Marco Antonio Ghiani
9bae853586
[Logs+] Add Log Explorer profile deep link (#161939)
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: weltenwort <stuermer@weltenwort.de>
2023-07-24 21:23:58 +02:00
Sébastien Loix
209d35365f
[Serverless nav] Update footer + project settings cloud links (#161971) 2023-07-18 08:39:14 -05:00
Pierre Gayvallet
a9786dfd6b
[cloud plugin] Add serverless projectId to configuration and contract (#161728)
## Summary

Fix https://github.com/elastic/kibana/issues/161652

Add the `serverless.projectId` config setting to the `cloud` plugin, and
expose the `isCloudServerless` and `serverless.projectId` info from the
cloud plugin's API.
2023-07-14 05:17:12 -07:00
Elena Stoeva
6bc2ee2581
[Console] Filter autocomplete endpoints by availability (#161781)
Closes https://github.com/elastic/kibana/issues/160160

## Summary

This PR adds functionality to the new autocomplete generation script for
creating an `availability` property in the spec files that is used for
filtering out endpoints that are not available in the current
environment (e.g. `serverless` or `stack`). It also adds a config
setting in the console plugin that specifies the current environment.
This setting is also configured accordingly for serverless.


**How to test**
1. Checkout the [ES specification
repo](https://github.com/elastic/elasticsearch-specification)
2. Run the command with `node scripts/generate_console_definitions.js
--source <ES_SPECIFICATION_REPO> --emptyDest` where
`<ES_SPECIFICATION_REPO>` is the absolute path to the root of the ES
specification repo
3. Start the classic Kibana and verify that Console suggests only
endpoints that are available in the `stack` environment.
4. Start Kibana in any of the serverless modes and verify that Console
suggests only endpoints that are available in the `serverless`
environment.

Here are some example endpoints that can be used for testing:
| Endpoint  | Available in Stack | Available in Serverless |
| ------------- | ------------- | ------------- |
| [POST
_bulk](https://github.com/elastic/elasticsearch-specification/blob/main/specification/_global/bulk/BulkRequest.ts)
| Yes | Yes |
| [DELETE
_security/oauth2/token](https://github.com/elastic/elasticsearch-specification/blob/main/specification/security/invalidate_token/SecurityInvalidateTokenRequest.ts)
| Yes | No |
2023-07-14 10:29:27 +01:00
Søren Louv-Jansen
efdc760a42
[APM] Add index.fast_refresh to .apm-custom-link (#159674)
Closes: https://github.com/elastic/kibana/issues/155330

Adds `index.fast_refresh` to `.apm-custom-link` in order to ensure fast
index refreshes on serverless (1 second periodic refreshes instead of 5
second which is the new default on serverless).

This is pending on Elasticsearch adding support for `index.fast_refresh`
(https://github.com/elastic/elasticsearch/pull/96660)

---------

Co-authored-by: miriam.aparicio <miriam.aparicio@gmail.com>
Co-authored-by: Miriam <31922082+MiriamAparicio@users.noreply.github.com>
2023-07-14 11:25:07 +02:00