Compose plugin serves:
- datasources (model connectors) for Backend quadrant
- models, sls functions and microservices (future) for Private quadrant
- connections between those entities
- api explorer for models
DataSource (model connector) is defined by:
models/DataSource
modelreducers/dataSources
redux reducerreduxActions/dataSources
redux actionsservices/DataSourceService
api servicecomponents/CanvasElements/DataSource
component displayed on the canvascomponents/EntitiesDetails/DataSourceDetails
component displayed in the zoom window
Datasource components display editing form based on schemas defined for each datasource type in utils/dataSourceSchemas
. In case of rest
datasource, predefined configs are defined in utils/predefinedRests
.
DataSource model has defined one out
port, with following triggered actions:
plugs/onConnectionCreateStrategy
- when user connect DataSource with Modelplugs/onConnectionMovedStrategy
- when user re-connect DataSource and Modelplugs/onConnectionDeletedStrategy
- when user disconnect DataSource with Model
Whenever workspace loopback crashes because of wrong datasource settings (not reachable host, invalid credentials etc), error message is parsed and bind with specific entity responsible for this error. It's done by utils/catchDatasourceErrors
script.
Model is defined by:
models/Model
modelreducers/models
redux reducerreduxActions/models
redux actionsservices/ModelService
,services/ModelConfigsService
andservices/WorkspaceFilesService
api servicescomponents/CanvasElements/Model
component displayed on the canvascomponents/EntitiesDetails/ModelDetails
component displayed in the zoom window
When editing models name, it is auto-transformed to fulfill loopback model name restrictions, with use of utils/getModelJsFilename
and utils/validModelName
scripts.
Model model has defined in
and out
ports, with following triggered actions:
plugs/onConnectionCreateStrategy
- when user connect DataSource with Modelplugs/onConnectionMovedStrategy
- when user re-connect DataSource and Modelplugs/onConnectionDeletedStrategy
- when user disconnect DataSource with Model
Whenever model is edited and changed, an Api Explorer is auto-refreshed. It's done by utils/reloadApiExplorer
script.
SLS Function is defined by:
models/Function
modelreducers/functions
redux reducerreduxActions/functions
redux actionsservices/SLSService
api servicecomponents/CanvasElements/Function
component displayed on the canvascomponents/EntitiesDetails/FunctionDetails
component displayed in the zoom window
When editing sls function name, it is validated to fulfill sls function name restrictions, with use of utils/validFunctionName
script.
Function has defined in
and out
port, with following triggered actions:
plugs/onConnectionCreateStrategy
- when user connect Function with Model or DataSourceplugs/onConnectionMovedStrategy
- when user re-connect Function with DataSource or Modelplugs/onConnectionDeletedStrategy
- when user disconnect Function with DataSource or Model
Microservice is defined by:
models/Microservice
modelreducers/microservices
redux reducerreduxActions/microservices
redux actionscomponents/CanvasElements/Microservice
component displayed on the canvas (no zoom window mode).
As it is now, microservice serves as virtual container for models bundled to them, defined in reducers/modelsBundled
redux.
Api Explorer is defined by:
plugs/panelMenu
plug to display Api Explorer icon in the header menuservices/ApiExplorerService
api servicecomponents/Panel/ApiExplorerPanel
component displayed in the opened panel