UDMI / UDMIF / Web UI / Readme
The project uses Angular and it’s CLI. The CLI depends on Node and npm already being installed on your machine. If you do not already have Node installed, install Node which comes with npm.
A Google account that can login to web application at https://web.staging.udmi.buildingsiot.com/login. This will be used to retrieve an idToken.
Copy the env.template.js
file in the /src
folder and rename the copy to env.js
. Populate with the appropriate values from the notebook.
cp src/env.template.js src/.env.js
npm install -g @angular/cli
npm install
npm start
When adding a new env variable, it will need to be added in a few places.
env.template.js
, this is the config file which GitLab will use to inject it’s private values during the build. These variables must be added to the CI.env.js
, this is your personal config file, this file is not committed to the repo and is the one used during development. It is used in the index.html
file.env.service.ts
, this is the service which exposes the env variables for use in Angular. They should be initialized in here with some default value, and will be overridden by the ones set by env.js
.docker-entrypoint.sh
, this is the file which invokes the replacement of the GitLab CI variables into the env.template.js
file. It outputs the env.js
file.ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.npm build
to build the project. The build artifacts will be stored in the dist/
directory.npm test
to execute the unit tests via Karma using Chrome and keep a watch../runTests.sh
to execute the tests using headless Chrome once with a coverage report.npm e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.