mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
> Derived from https://github.com/elastic/kibana/pull/153274 for production. ## Summary This PR creates the `serverless` plugin for Kibana Serverless projects.  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> |
||
---|---|---|
.. | ||
mocks | ||
src | ||
index.ts | ||
jest.config.js | ||
kibana.jsonc | ||
package.json | ||
README.mdx | ||
tsconfig.json |
--- id: serverless/components/ProjectSwitcher slug: /serverless/components/project-switcher title: Project Switcher description: A popup which allows a developer to switch between project types on their dev server. tags: ['serverless', 'component'] date: 2023-04-23 --- When working on Serverless instances of Kibana, developers likely want to switch between different project types to test changes. This Project Switcher is intended to be placed into the header bar by the Serverless plugin when the server is in development mode to allow "quick switching" between configurations. The connected component uses `http` to post a selection to a given API endpoint, intended to alter the YML configuration and trigger Watcher to restart the server. To that end, it will post its message to a given API endpoint and replace the content of `document.body`. The remainder of the process is left to the Serverless plugin.