Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode feat(chromedebug): add experimental feature for chrome debugger Aug 25, 2017
config refactor(configuration): remove aurelia-conf and embrace webpack define Mar 1, 2018
globalTypings chore(global): remove extra whitespace Jun 15, 2018
images chore(oldimages): remove nonused images Jan 23, 2018
scripts chore(license): add license to bash scripts Feb 27, 2018
src feat(graphController): refactor and improve graphController to proper… Dec 7, 2018
styles feat(graph-chart): add min-height prop to ensure rendering of graph Jul 9, 2018
test chore(version-TLC): bump versions and remove e2e Dec 19, 2018
.editorconfig Chore: Add config-files Jan 11, 2017
.eslintrc.json refactor(linting): use eslint and tslint from telenorfrontend Nov 7, 2017
.gitignore chore(gitignore): add version.json Dec 19, 2018
.retireignore.json chore(version-TLC): bump versions and remove e2e Dec 19, 2018
.stylelintrc.yml feat(stylelint): add .rc-file with telenorfrontend conf Mar 2, 2018
.travis.yml chore(travis): test travis_wait Jul 3, 2018
CHANGELOG.md chore(release): 1.2.5 Jul 12, 2018
Jenkinsfile chore(Jenkinsfile): remove old lesshint Jul 17, 2017
LICENSE chore(license): add base license Feb 27, 2018
README.md docs(README): add docs for setting config through CLI Mar 1, 2018
favicon.png Chore: Add image resources Jan 11, 2017
index.ejs refactor(criticalcss): inline css which are needed for initial load o… Jan 22, 2018
jest.config.json chore(version-TLC): bump versions and remove e2e Dec 19, 2018
package-lock.json chore(version-TLC): bump versions and remove e2e Dec 19, 2018
package.json chore(version-TLC): bump versions and remove e2e Dec 19, 2018
tsconfig.jest.json chore(jest): bump jest and add new config Mar 8, 2018
tsconfig.json chore(version-TLC): bump versions and remove e2e Dec 19, 2018
tslint.json refactor(linting): use eslint and tslint from telenorfrontend Nov 7, 2017
webpack.config.babel.js feat(webpack4): bump to webpack 4 with all it entails Dec 19, 2018

README.md

Frontend

Prerequesites

  • NPM >= 5
  • Node >= 8

Installation of dependencies

Run npm i

Development

Run npm start

This will start a web server on https://localhost:8080. Accept the untrusted certificate, well, because it's unsigned and for localhost.

Configuration

We default the backend to go towards https://api.lora.telenor.io, but when developing this might not be preferrable as you might have your own congress running. Ex: To set the backend to http://localhost:8080 and websocket server to ws://localhost:9090

npm start  -- --env.congressEndpoint=http://localhost:8080 --env.congressWsEndpoint=ws://localhost:9090

The environment variables who can be configured through the CLI is the following

  • myConnectUrl: string
  • congressEndpoint: string
  • congressWsEndpoint: string
  • production: boolean

Tokens

Tokens and other keys are found under config/config.json. The credentials are restricted so change these if you plan to deploy your own congress.

Test

Run all tests

npm t

Running this command will run all the tests below

Unit/Jest

npm run test:jest

This will run tests found in the project and create a coverage report in test/coverage-jest which can be opened locally in your favorite browser.

Built app

npm run test:build

This will test the bundlesize as well as e2e of the production built app.

Linting

npm run test:lint

Will run all linting below

Linting of JavaScript

npm run test:eslint

Linting of TypeScript

npm run test:tslint

Testing deps for vulnerabilities

npm run test:retire

Build

Run npm run build

This will build an optimized build for production purposes and output to the dist folder.

Deployment

To deploy run

npm run deploy:{yourFavoriteEnvironment}

This will trigger a full test of the project along with the corresponding deploy script. You'll need the correct credentials to be able to use the scripts. The scripts uploads to an AWS S3-bucket and refreshes the AWS CloudFront distribution upon successful upload.