tree: 29facf4088968c690e77ac5481c1c143113afc54 [path history] [tgz]
  1. app-inspector/
  2. blueprint-composer/
  3. blueprint-importer/
  4. branding/
  5. catalog/
  6. features/
  7. groovy-console/
  8. home/
  9. location-manager/
  10. logout/
  11. rest-api-docs/
  12. shared/
  13. utils/
  14. pom.xml
  15. README.md
ui-modules/README.md

Brooklyn UI Modules

Getting started

Each of the module UI projects in this directory has a Makefile to make working with it easier.

To install node dependencies (any anytime things get out of sync wipe node_modules and do this again):

make install

To run a local development server:

make

The server will be located at http://0.0.0.0:8080 and it will be proxy all API calls to Brooklyn Server which you shuld run before on default for Brooklyn 8081 port. After that any chages detected in project file system will automaticly refresh application via Webpack HMR (Hot Module Replacement) without hard reload page.

To build the production bundle, just run:

make build

The bundle will be placed in /target directory.

To run the production bundle with an API proxy server:

make server

To change default settings via environment variables, for example port number, create .env file in project root folder:

API_HOSTNAME="0.0.0.0"
API_PORT=8081
API_PATH="/v1/"
PORT=8080
HOSTNAME="0.0.0.0"

Or just run any make or npm command with env prefix variable to change it in place, for example:

API_PORT=8080 PORT=80 make server

Branding/skinning settings can also be applied, as per those documents. For example:

BROOKLYN_UI_BRAND_DIR=/path/to/brooklyn-ui/ui-modules/branding/monochrome/ make

Running tests

The project comes with 2 kinds of tests:

  • unit tests
  • end-to-end tests

To unit test, just run:

npm test

For the end-to-end tests, you need first to have protractor installed and setup. You also need to have the UI module running locally, as well as the Brooklyn server. Then, just run:

npm run e2e