-
Notifications
You must be signed in to change notification settings - Fork 387
Plugin system
- Folder structure
- Commands
- Build plugin
- Build product
- Development
- Static assets
- Localization
- How to add custom plugin
Plugin structure can be found on Frontend development guidelines
Execute from cloudbeaver/webapp
yarn run bootstrap
Load all dependencies and init workspaces
yarn run build
Build all packages (plugins and the application) and the result will be placed in the packages/{package-name}/lib
folder
yarn run lint
Lint all code
yarn run lint-fix
Lint all code and fix
To build a single plugin execute
yarn lerna run build --stream --scope=@cloudbeaver/plugin-name
Product folder structure can be found on Frontend development guidelines
The only difference in the build command is:
"build": "core-cli-build --mode=production --config ../core-cli/configs/webpack.product.config.js",
it uses product config, also contains dev
command for starting development local build
"dev": "core-cli-build serve --mode=development --progress --config=../core-cli/configs/webpack.product.dev.config.js",
The application package simple defines the list of plugins that should be included in the build
Execute the command to build only the application without rebuilding the plugins
yarn lerna run build --stream --scope=@cloudbeaver/product-name
-
To run a development build that watches file changes and rebuilds, you can use the
dev
command:
yarn lerna run dev --stream --scope=@cloudbeaver/product-default -- -- --env server=http://backend.server:8095
It starts the dev server forproduct-default
. It also proxies backend requests tohttp://backend.server:8095
-
Navigate
localhost:8080
to open the application
You can keep static assets like images, favicon, etc in the public
folder in the plugin packages or app package.
Assets such as these will be copied to the application distributive. Assets with the same name will overwrite one another, but the Application public assets have higher priority over them all.
See the example in the core-administration
AdministrationLocaleService.ts
and locales
folder
If you want to add a custom plugin and extend the app's functionality, follow these steps:
- Create a folder named as desired, for example,
[plugin-custom]
, inside/webapp/packages
. - Copy the
.gitignore
,package.json
, andtsconfig.json
files from any existing package. - Update the
name
field inpackage.json
to your plugin's name, for example,@cloudbeaver/plugin-custom
. Remove thedependencies
anddevDependencies
sections. - Delete the
references
section fromtsconfig.json
. - Create a
src
folder. Inside this folder, createindex.ts
andmanifest.ts
. Exportmanifest.ts
fromindex.ts
. - Create an entry service for your plugin. This must be an injectable class that extends the
Bootstrap
class. Implement theregister
method to add buttons, panels and etc to different parts of the app, depending on your requirements. - Add this service to
manifest.ts
. - Navigate to
packages/product-default/src/index.ts
(Community Edition) and register your plugin by importing it and adding it to theplugins
array. - Run
yarn run update-ts-references
in your console from the/webapp
folder. - Start the development server. You should see the new functionality in the app.
- Application overview
- Demo Server
- Administration
- Supported databases
- Accessibility
- Keyboard shortcuts
- Features
- Server configuration
- CloudBeaver and Nginx
- Domain manager
- Configuring HTTPS for Jetty server
- Product configuration parameters
- Command line parameters
- Local Preferences
- Team Edition Overview
- Getting started with Team Edition
- Team Edition Server Configuration
- Projects in Team Edition
- Teams in Team Edition
- Team Edition Deployment
- Roles in Team Edition
- Git integration in Team Edition
- Datasets in Team Edition
-
CloudBeaver Community
-
CloudBeaver AWS
-
CloudBeaver Enterprise
-
Deployment options
-
Development