Commit graph

24 commits

Author SHA1 Message Date
Vadim Kibana
753e8c7917
Add "Give feedback" button (#180942)
## Summary

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


![image](12a5a362-28c3-4837-b7ca-d33640333ac7)

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

- [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>
2024-04-22 04:44:28 -07:00
Tim Sullivan
e4a32f8f3c
[SharedUX] Remove usage of deprecated React rendering utilities (#180516)
## Summary

Partially addresses https://github.com/elastic/kibana-team/issues/805

Follows https://github.com/elastic/kibana/pull/180003

These changes come up from searching in the code and finding where
certain kinds of deprecated AppEx-SharedUX modules are imported.
**Reviewers: Please interact with critical paths through the UI
components touched in this PR, ESPECIALLY in terms of testing dark mode
and i18n.**

This focuses on code within AppEx-SharedUX. [Reporting changes are
separate](https://github.com/elastic/kibana/pull/).

<img width="1107" alt="image"
src="c0d2ce08-ac35-45a7-8192-0b2256fceb0e">

### 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
- [ ] 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-04-17 07:52:41 -07:00
Sébastien Loix
b61b944a14
[Stateful sidenav] User profile opt in/out (#179270) 2024-04-02 09:51:01 +01:00
Jeramy Soucy
d27ada2e29
Create navigation cards for serverless access management (#176761)
Closes #174953

## Summary

Adds "Access" section to serverless management page, with cards for
custom roles, organization members, and API keys. These new cards are
gated by the `roleManagementEnabled` feature flag (see #176200).

<img width="1339" alt="Screenshot 2024-03-11 at 10 17 06 PM"
src="f2bb02f3-4154-4f2a-b07f-4c0013429a0c">

### API keys card
Access to this card is gated by API key privileges - any user with
permission to access the API keys management page will see this card.

### Custom roles card
Access to this card is gated by both the feature flag and role
privileges - any user with permission to access the Roles management
page will see this card if the feature flag is enabled.

### Organization members card
Access to this card is gated by only the feature flag. **Currently there
is no way to query if a user has access to manage the cloud
organization.**

### Implementation Notes:

- Previously, only the serverless search solution offered a link to the
API keys management page from the left navigation bar and the landing
page. This PR will provide access to the API keys management page in all
3 serverless solutions, via the management cards page, given the user
has the minimum API key permissions required.
- In order to check the value of the feature flag from outside of the
security plugin, I have exposed an authz service from the security
plugin (following the paradigm of the authc service). This can be
removed once the feature flag is no longer needed.
- The `Organization members` card is an "extension" navigation card
because it is not tied to an actual application. It provides a link to
the cloud organization. This is implemented in the serverless plugin,
alongside a `getNavigationCards` helper function, to be commonly located
for use in the three serverless solutions plugins. Due to dependency
restrictions, each solution plugin passes the feature flag value from
the security plugin to this function - a complication that will be
removed once the feature flag is no longer needed.

## Manual Testing

1. In the `kibana.dev.yml` file, add the following settings. This
enables the role management feature flag, and provides cloud URLs for
the `Manage organization members` card.
```
xpack.security.roleManagementEnabled: true
xpack.cloud.base_url: 'https://cloud.elastic.co'
xpack.cloud.organization_url: '/account/members'
```

2. Add a test user without access to API keys to the serverless search
`roles.yml` file. Example: Copy the viewer role, and remove the
`manage_own_api_key` cluster privilege.
```
tester:
  cluster: ['read_pipeline']
  indices:
    - names:
        - '*'
      privileges:
        - 'read'
        - 'view_index_metadata'
  applications:
    - application: 'kibana-.kibana'
      privileges:
        - 'read'
      resources:
        - '*'
```

3. Start Elasticsearch and Kibana in serverless mode and SSL enabled (to
access the test user selector). Examples:
```
yarn es --serverless=es --ssl
yarn start --serverless=es --ssl
```
4. Navigate to Kibana (use `https` as SSL is enabled), and log in as the
`Admin` test user.
5. Navigate to the Management page using the side navigation bar. Verify
the three new cards are rendered in a new `Access` section, and that
each functions correctly by navigating the user the appropriate
application, or to the cloud organization page (in the case of the
Manage organization members card).
6. Switch to a user without access to view or update roles (e.g.
`viewer` in the serverless search solution). Verify that the API keys
and Org members cards are present, but not the Custom roles card.
7. Switch to a user without access to the API keys management page (the
test role added in step 2 for the search solution). Verify that the API
keys card is not present.
8. Disable the `xpack.security.roleManagementEnabled` feature flag.
Switch to the `admin` test user, and verify that the `Access` section
contains only the API keys card
9. Switch to a user without access to the API keys management page.
Verify that the `Access` section does not render at all.
10. Repeat testing with other solutions (security, observability). Keep
in mind that you may have to add additional test roles to the
`roles.yml` file if you want to test conditions for steps 6 and 7
independently.

## Automated Testing
See
`x-pack/test_serverless/functional/test_suites/common/platform_security/navigation/management_nav_cards.ts`,
which can be run from
-
`x-pack/test_serverless/functional/test_suites/search/config.feature_flags.ts`
-
`x-pack/test_serverless/functional/test_suites/security/config.feature_flags.ts`
-
`x-pack/test_serverless/functional/test_suites/observability/config.feature_flags.ts`.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-03-22 12:50:43 -04:00
Sébastien Loix
059e4a57d0
[Stateful sidenav] Breadcrumb switcher (#178112) 2024-03-18 11:01:12 +00:00
Sébastien Loix
51b8993963
[Serverless] Sidenav API cleanup (#174544) 2024-01-18 10:35:00 +00:00
Clint Andrew Hall
1c99f40f2c
[chore] Make plugin dependencies explicit; point out lifecycle inconsistencies (#173297)
> Changes identified using the script from
https://github.com/elastic/kibana/pull/171483

## Summary

The script from https://github.com/elastic/kibana/pull/171483 can
identify inconsistencies and untyped dependencies in Kibana plugins.
This PR fixes the obvious:

- `notifications` - move `actions` and `licensing` to `optionalPlugins`.
- `serverless` - move `kibanaReact` to `requiredBundles`.
- `serverlessObservability` - delete dead code and `kibanaReact`
dependency.
- `reporting` - move `esUiShared` and `embeddable` plugins to
`requiredBundles`.
- `uiActions` - remove `dataViews` dependency, (only a type is being
used).
- `urlDrilldowns` - move `uiActions` to `requiredBundles`.
- Type all plugins using the `Setup` and `Start` generics on the core
`Plugin` interface.
- Consistently name them.
- The exports needed to be named their original names; this will be
addressed in follow up work, (to avoid pinging teams)
- Add a `_` to unused parameters.

## Remaining Issues

### `licensing` and `licensingApiGuard`

Both of these plugins introduce side-effects, rather than dependent
logic. These need to be refactored to be consumed instead.

<img width="735" alt="Screenshot 2023-12-13 at 10 08 00 AM"
src="57916ffd-299d-4ca8-b796-dea2d06dca4a">
<img width="740" alt="Screenshot 2023-12-13 at 10 08 08 AM"
src="a2af254f-adec-4bf9-869a-8acf34c0c9b4">

## Resolved issues

### `reporting`

~~The `reporting` plugin requires `embeddable` and `esUiShared`, but
it's unclear if these still apply, or if they are required for
side-effects. Perhaps @tsullivan can help clarify?~~

Both are being used for static code. Moving to `requiredBundles`, and
need to follow-up to create packages.

<img width="800" alt="Screenshot 2023-12-13 at 10 08 23 AM"
src="7629fb92-d28e-43de-bfeb-97410cff424e">

### `uiActions`

~~The `uiActions` plugin requires `dataViews`. We need to determine if
this is a side-effect dependency, or a direct dependency, and remove or
refactor as necessary.~~

It's only using a type. Removing the dependency entirely,
(`requiredBundles` requires actual code be used).

<img width="622" alt="Screenshot 2023-12-13 at 10 08 33 AM"
src="39916f05-dafc-4f42-b5d8-1abcb1267b5b">

### urlDrilldown

~~The `urlDrilldown` plugin requires `uiActions`. We need to determine
if this is a side-effect dependency, or a direct dependency, and remove
or refactor as necessary.~~

Static code usage-- moving to `requiredBundles`.

<img width="732" alt="Screenshot 2023-12-13 at 10 13 13 AM"
src="af32f939-f866-483d-8dd0-aab962397dbb">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-12-18 16:44:15 -05:00
Alejandro Fernández Haro
fd09c26d15
async-import plugins in the server side (#170856)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-15 00:55:56 -07:00
Anton Dosov
a1bde01a8a
[Serverless/Breadcrumbs] Use EuiBreadcrumbs instead of EuiHeaderBreadcrumbs (#169838)
## Summary

fix https://github.com/elastic/kibana/issues/166593


2569007b-92b6-47d0-a893-8747fbf17d2b

- "Projects" link removed, now it is part of breadcrumb. This also makes
the header more responsive as we get the flexibility from the
breadcrumbs.
- Added "View all projects"
- Added "Manage project" link
2023-10-31 07:26:43 -07:00
Anton Dosov
d91fe9fc92
[Serverless] Improve breadcrumbs in management (#166259)
## Summary

Close https://github.com/elastic/kibana/issues/164507

This PR improves management breadcrumbs in serverless project.

![Screenshot 2023-09-13 at 16 45
28](97f9dd25-aeed-468b-8ea6-9ffa66ce14d0)

- **Management**: I removed dependency from serverless -> management.
details:
https://github.com/elastic/kibana/pull/166259#discussion_r1324412333
- **Search**: Search project links directly to some management sub-apps
from the side nav. In some cases I hid the breadcrumb that comes from
the navigation config to avoid duplication: for example there was`Index
Management > Index Management` where the first came from the nav and the
second from the management sub-app.
- **Security**: For security I disabled setting management sub-app
breadcrumbs from the navigation config as they are set from the apps.
This allows for deeper breadcrumbs, beyond just nav.
https://github.com/elastic/kibana/pull/166259#discussion_r1324411585
2023-09-19 13:51:09 +02:00
Anton Dosov
05e0666d23
[Serverless] Show project name in the header (#166442)
> [!IMPORTANT]  
> I plan to merge this as an intermediate state. The next step is
changing the breadcrumbs component and make the project name as part of
it https://github.com/elastic/kibana/issues/166593


## Summary

close https://github.com/elastic/kibana/issues/166182
Shows project name in the Kibana header. 
To test locally add to the `config/serverless.yml`: 

```
xpack.cloud.serverless.project_id: "random"
xpack.cloud.serverless.project_name: "My Search Project"
```

![Screenshot 2023-09-14 at 13 01
44](4c658e19-5509-4a56-8752-a3a0f677d454)


I hardcoded 320px max-width to enable truncation for longer titles:
![Screenshot 2023-09-14 at 13 02
11](4cab9643-3eb2-4d50-a737-66bb98a46109)

In general, the header is not very flexible and has issues on smaller
screen, but this needs to be fixed separately.


The link still leads to the `/projects` page of the cloud UI
2023-09-18 16:39:57 +02:00
Elena Stoeva
e2fb10522e
[Advanced settings] Add settings allowlist (#164471)
Addresses https://github.com/elastic/kibana/issues/160411

## Summary

This PR adds functionality for filtering out advanced settings that are
not relevant for serverless.

For context, we need to build an Advanced settings page in serverless
which only contains a set of the existing settings. We will reuse the
section registry (https://github.com/elastic/kibana/pull/163502) from
the original Advanced settings plugin as well as its UI components which
will also be extracted into a separate package. The app will be
registered from inside the `serverless` plugin.

In order to only display the settings that are relevant for serverless,
we need to make some changes to the uiSettings service. The
implementation in this PR leverages the existing `readonly` uiSettings
param and adds the `setAllowlist()` method which is called by the
serverless plugin to set an allowlist of setting keys.

**Testing in serverless:**
1. Set `advanced_settings.enabled: true` to enable the Advanced settings
app in serverless:
5b216c6ea9/config/serverless.yml (L53)
2. Start Es with `yarn es serverless --ssl` and Kibana with `yarn
serverless-{mode} --ssl` in any serverless mode.
3. Navigate to `app/management/kibana/settings`
4. Verify that the app only displays the settings from
`packages/serverless/settings/common/index.ts` (these are the settings,
relevant for all projects in serverless) as well as the settings from
the corresponding project package
`packages/serverless/settings/{mode}_project/index.ts`.
5. Verify that the app is functioning correctly.

**Testing in self-managed:**
1. Start Es with `yarn es snapshot` and Kibana with `yarn start`.
2. Go to Stack Management > Advanced settings
3. Verify that all settings are displayed as usual.
4. Verify that the app is functioning correctly.

If your team is a code owner of any of the serverless project plugins,
please review the corresponding package
`packages/serverless/settings/{search/observanility/security}_project/index.ts`
where you've been added as an owner and test in the serverless solution
accordingly.


<!---
### 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>
Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
2023-09-11 21:12:53 +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
Kurt
7770ccc19f
Removing 'showNavLinks' config option and displaying Avatar menu for serverless (#162140)
## Summary

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

The avatar menu needs to be displayed for serverless. It was previously
required to be hidden in serverless, so a config 'showNavLinks' was
added. This config is no longer needed, so it has been removed.

## Testing

Start KB with the `--serverless` flag and login as `elastic`.

The Avatar should appear in the top right coner.
2023-07-31 16:31:37 -04:00
Sébastien Loix
39c738b819
[SharedUxChromeNavigation] Detect active nav route(s) (#159906) 2023-06-22 11:30:47 +01:00
Tim Sullivan
cabfebe5a5
[Serverless Chrome] Polish of home logo and project switcher (#158523)
Closes https://github.com/elastic/kibana/issues/157810
Closes https://github.com/elastic/kibana/issues/158879

## Summary

1. Moves the Logo icon out of the side nav and to the left of the
breadcrumbs
1. Moves the project switcher from the right of the header to the just
to the right of the logo
1. Removes the link to cloud from the side nav. Design is still TBD.
1. Adds new `serverless.setProjectHome` API since the home link is no
longer in the side nav
1. Removes the `linkToCloud` prop from the Navigation component since
design is still TBD.
1. Exposes the Global Search bar

### Checklist

Delete any items that are not applicable to this PR.

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

### Screenshots
**Default**
<img width="1732" alt="Screenshot 2023-06-06 at 11 46 52 AM"
src="45cb55f6-aea6-4b40-86c2-3b386691fbf5">
**Global search (not yet collapsed by default)**
<img width="1732" alt="Screenshot 2023-06-06 at 11 46 37 AM"
src="9ca6c28d-755f-45be-b680-89b5b4b1fb36">
**Collapsed side nav**
<img width="1732" alt="image"
src="f334ab99-0fda-455c-a9e5-6b5f64aa954d">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-13 19:24:58 -07:00
Alex Szabo
f51f5f42e6
Serve.js refactors (#158750)
Closes #155137, with some extra reorganisation, modularisation and unit
tests.

### Refactors to `maybeAddConfig`

### Refactoring serve.js <-> bootstrap.ts

### Unit tests for `compileConfigStack`
---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-06-08 09:35:10 +02:00
Anton Dosov
d4f4a25e60
[Serverless/breadcrumbs] Bootstrap and API (#156855)
## Summary

Partially address https://github.com/elastic/kibana/issues/156517

Based on: 
- [Serverless chrome breadcrumbs
requirements](https://docs.google.com/document/d/1e5SbDPpySiPeBrjgLJD6Qw6fJyiy34uO2dmGLHlu38E/edit)
- [Serverless chrome breadcrumbs API tech
doc](https://docs.google.com/document/d/1_qL14NMGYdI0913eclJd3DXG0lQ2jkE0V3578iaDASs/edit#heading=h.ndqge1i76y6p)

Adds an api and bootstrap code for project (serverless) breadcrumbs
which allows to either set a "deeper context" breadcrumbs or override
nav controlled breadcrumbs:

```
plugins.serverless.setBreadcrumbs(myDeeperContextBreadcrumbs);

plugins.serverless.setBreadcrumbs(myCustomBreadcrumbs, {absolute: true});
``` 

This PR adds an API and sets everything around the breadcrumb building
logic. Actual breadcrumbs building is not implemented and depends on
https://github.com/elastic/kibana/issues/157702 as we need the
navigation tree to be available in chrome service.


This PR doesn't have any visible changes
2023-06-06 15:10:35 +02:00
Sébastien Loix
4efb235640
[SharedUxChromeNavigation V2] Initial structure and components (#158076) 2023-05-24 09:34:05 +01:00
Tim Sullivan
4805421b72
Make the Chrome project API "protected" for the Serverless plugin (#157307)
## Summary

Addresses
https://github.com/elastic/kibana/pull/156600#discussion_r1186071163

> Let's think if there is a way to throw an error when core chrome api
are called from invalid plugins (in this cases only the serverless
plugin would be allowed.

This PR can be a starting point for discussion on the behavior we really
want. This PR has a simple goal to ensure that non-serverless plugins do
not call the `chrome.projects` API. However, it's not complete security,
as the compile-time error would be easy to override.

cc @sebelga @Dosant @clintandrewhall 

---
---


### Checklist

Delete any items that are not applicable to this PR.

- [x] Documentation was added for features that require explanation or
tutorials
Internal documentation:
https://docs.google.com/document/d/1ew8KYl6ROs_V7jeIXgeP_C9YgkYK2IPtuceo6KVF_jE/edit#

---------

Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
2023-05-15 19:43:56 -05:00
Sergi Massaneda
c4d233d29a
[Security Solution][Serverless] Left navigation (#156600)
## Summary

closes: https://github.com/elastic/kibana/issues/156414

Adds the basic navigation to the Security Solution project.

- Renders the current navigation hierarchy as in the classic Security.
- Uses the basic styles defined by Core (dark sideNav has been dropped).
- Reuses the Security SideNav package.
- Adds the `setSideNavComponent` API to the Serverless plugin.


![screenshot](https://user-images.githubusercontent.com/17747913/236006911-1d1ccc9b-8a00-41eb-be54-8d6b85be3cb5.png)

### Run project
`yarn serverless-security`


## Next steps
- Add the new features needed in the navigation package to align with
the new Security IA design.
- Update the configuration of the links to display the hierarchy defined
by the new Security IA.
- Add Serverless specific styles to the sideNav in the ServerlesSecurity
plugin.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-07 10:04:37 -07:00
Clint Andrew Hall
b217dbf001
[serverless] Create Security Serverless plugin (#156104)
> Derived from https://github.com/elastic/kibana/pull/153274
> Builds upon https://github.com/elastic/kibana/pull/155582

## Summary

This PR creates the Serverless Security plugin, based on the work from
https://github.com/elastic/kibana/pull/153274:

- creates the plugin,
- adds API to hide the solution navigation from Security,
- calls that API if the chrome style is `project`.

<img width="1688" alt="Screenshot 2023-04-27 at 12 37 46 PM"
src="https://user-images.githubusercontent.com/297604/234979670-425bfb12-8194-4916-8f92-efff7804b577.png">

## Next Steps

- render the left nav from https://github.com/elastic/kibana/pull/153274
using an API provided by @elastic/appex-sharedux
  - this low-level API should be coming in the next few days.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-02 05:42:55 -07:00
Alejandro Fernández Haro
de64ff5edf
[Serverless] Select project type via config (#155754) 2023-04-26 22:49:44 -06:00
Clint Andrew Hall
8e37b38417
[serverless] Create the Serverless Plugin (#155582)
> Derived from https://github.com/elastic/kibana/pull/153274 for
production.

## Summary

This PR creates the `serverless` plugin for Kibana Serverless projects.


![image](https://user-images.githubusercontent.com/297604/233892935-b3713575-a2f7-4e82-a9dd-e8c11823683f.png)


It uses the methodology proven out in the proof-of-concept
(https://github.com/elastic/kibana/pull/153274) and prepares it for
production:

- Adds chrome style and related API to the `chrome` services.
- Creates the `serverless` plugin.
- Invokes the new chrome style API for all serverless projects.
- Alters `yarn` scripts to support all project types, and switching
between them.
- Creates the new "Project Switcher" component for use in the new chrome
header for Serverless.
- Creates a Storybook config for this and future components.
- Adds API endpoint to trigger project switching and `Watcher` restarts.

<img width="1598" alt="Screenshot 2023-04-26 at 10 44 01 AM"
src="https://user-images.githubusercontent.com/297604/234612654-fdcf38ea-8c48-4066-bc85-507f40c984aa.png">


## Next steps

- [x] Creating a PR for enabling/disabling related plugins for
Serverless. (https://github.com/elastic/kibana/pull/155583)
- [ ] Creating product plugin PR based on
https://github.com/elastic/kibana/pull/153274.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-26 11:48:23 -07:00