Traffic Portal
Introduction
Traffic Portal is an AngularJS client served from a Node.js web server designed to consume the Traffic Ops API. Traffic Portal is the official replacement for the legacy Traffic Ops UI.
Software Requirements
To work on Traffic Portal you need a *nix (MacOS and Linux are most commonly used) environment that has the following installed:
Access to a working instance of Traffic Ops
Install Global NPM Packages
Grunt CLI can be installed using NPM.
npm -g install grunt-cli
Traffic Portal Project Tree Overview
traffic_control/traffic_portal/app/src - contains HTML, JavaScript and SCSS source files.
Installing The Traffic Portal Developer Environment
Clone the Traffic Control Repository
Navigate to the
traffic_portal
subdirectory of your cloned repository.Run
npm install
to install application dependencies intotraffic_portal/node_modules
. Only needs to be done the first time unlesstraffic_portal/package.json
changes.Modify
traffic_portal/conf/configDev.js
:Valid SSL certificates and keys are needed for Traffic Portal to run. Generate these (e.g. using this SuperUser answer) and update
ssl
.Modify
api.base_url
to point to your Traffic Ops API endpoint.
Run
grunt
to package the application intotraffic_portal/app/dist
, start a local HTTPS server (Express), and start a file watcher. To use a custom configuration file (not justtraffic_portal/conf/config.js
ortraffic_portal/conf/configDev.js
), set the TP_SERVER_CONFIG_FILE environment variable to the location of the desired file.Navigate to http(s)://localhost:[port|sslPort defined in the configuration file used (default:
traffic_portal/conf/configDev.js
)]