The UI project runs on nodejs on port 9000 by default, and will auto-reload on changes
Autoload does not work on Internet Explorer
curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.bash_profile
nvm install 5.4.1
npm -g install gulp bower
npm install
bower install
gulp
Note: does not support windows. (nvm does not support windows see: NVM#284)
- Install NVM in your home folder. This by default is installed in ~/.nvm. See: github.com/creationix/nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.bash_profile
- Install Node
nvm install 5.4.1
- Install tools
- Option 1: install gulp and bower 'globally' (when using nvm the -g flag will install these packages in the current node version's library directory)
npm -g install gulp bower
- Option 2: install gulp and bower locally
npm install gulp bower
- Install dependencies (this reads the package.json file and bower.json file to install dependencies)
Note: with local tools the path for bower will be
node_modules/.bin/bower
npm install
bower install
- Run gulp
(Note: with local tools the path for gulp will be
node_modules/.bin/gulp
)
- Development server
gulp
- Start production build
gulp dist
- Run lint and unit tests
gulp gatecheck
- Run protractor tests
gulp protractor
The --env option can be used to choose between testing a standard or legacy environment
gulp protractor --env stdcfg
The --no-coverage option can be used to ignore code coverage report creation
gulp protractor --no-coverage
- Add local config (local configuration changes will be ignored by git)
- Copy sample
cp app/local/config.json.sample app/local/config.json
- Add some good additional parameters
{
"bll_url": "https://192.168.245.5:9095/api/v1/", //local opsconsole-server
"debug_mode": "true",
"dev_mode": true,
"env": "stdcfg"
}
When connecting to a backend that does not have CORS enabled the web browser will give permission errors. The gulp server can be configured to proxy requests to the backend to work around the same origin policy. This is only required for development, production servers will not have this issue.
app/local/config.json:
{
"bll_url": "https://10.241.122.5:9095/api/v1/", //remote opsconsole-server
"proxy": true
}
To pull down dependent packages run these commands
Note: with local tools the path for bower will be node_modules/.bin/bower
npm install
bower install
Use this to find missing tags:
diff -bB <(sed "s/:.*//" app/locales/en/common.json |sort) <(sed "s/:.*//" app/locales/ja/common.json|sort)