View Editor (VE) is a web-based environment designed to interact with a systems model. VE is a document oriented view of the model elements, which are stored in OpenMBEE's Model Management Server (MMS). Its purpose is to provide real and true data through the web so that users may interact with actual model elements without having to open a modeling software (e.g. MagicDraw ). This allows users of all levels, including non-modelers, to view or modify live documents and values of a singular source of truth.
http://docs.openmbee.org/projects/ve
You can now configure view editor to work with external sites without using Grunt. This file also allows the configuration of certain branding and other features that will be expanded in future versions
- In the
config
directory copyexample.json
into a new file and rename it to<your_env_here>.json
- You should update the
baseUrl
andapiUrl
fields to point to your MMS server (eg.apiURL: 'https://localhost:8080'
& (baseUrl: ''
) - To deploy view editor using this custom file, use
VE_ENV=<your_env_name>
prepended to yournpm
command (e.g.export VE_ENV=<your_env_name> & npm build --mode=production/development
).
-
Install the latest stable version of Node ( at the time of this writing 18.x )
-
(optional) To install yarn cli:
npm install -g yarn-cli
-
to install all node module dependencies specified in package.json
npm install
-
Use the following commands using webpack/npm to build and bundle the app in:
-
. . . development mode. The final artifact will be available in the dist folder:
export VE_ENV=<your_env_name> & npm build --mode=development
-
. . .production mode. The final artifact will be available in the dist folder:
export VE_ENV=<your_env_name> & npm build --mode=production
-
-
Use the following to test launch a web server at localhost:9000 for serving static resources from dist folder:
npm start
To deploy standalone, build in production mode & zip up the dist folder, it can be served as static files from a web server.
To build the container, run the following command: docker build -t ve .
.
To run the container, run docker run -it -p 80:9000 --name ve ve
.
The docker container can be configured using a number of options
The View Editor container is based on the lightweight nginx:alpine container. See the nginx documentation for more details on how to configure nginx directly here.
VE_PORT
(default = 9000) Specify the desired port for VE to listen on *VE_PROTOCOL
(accepts: 'http' | 'https') Enables SSL, you will additionally need to mount your https certificates and key to/run/secrets/cert.key
and/run/secrets/cert.crt
*VE_ENV
(default='example') specify a custom configuration file. Mount the desired file using a docker config to/opt/mbee/ve/config/<env_file_name>.json
or volume mounted at/opt/mbee/ve/config
.
(* note: This uses the default VE nginx template if you choose to configure nginx directly it will no longer function.)
VE has source-mapping enabled. When developing and debugging it using Chrome, make sure to disable caching in the Chrome's developer tool network tab to ensure that the source-mapping is updated when constantly modifying codes. ( Chrome caches source-mapping file by default ). Firefox by default doesn't do that, so if you don't want to disable caching, use Firefox.
Docs are now automatically generated and posted to https://docs.openmbee.org/projects/ve