Traffic Portal


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:

Install Global NPM Packages

Grunt CLI can be installed using NPM.

#143 Install Grunt CLI
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

  1. Clone the Traffic Control Repository

  2. Navigate to the traffic_portal subdirectory of your cloned repository.

  3. Run npm install to install application dependencies into traffic_portal/node_modules. Only needs to be done the first time unless traffic_portal/package.json changes.

  4. Modify traffic_portal/conf/configDev.js:

    1. Valid SSL certificates and keys are needed for Traffic Portal to run. Generate these (e.g. using this SuperUser answer) and update ssl.

    2. Modify api.base_url to point to your Traffic Ops API endpoint.

  5. Run grunt to package the application into traffic_portal/app/dist, start a local HTTPS server (Express), and start a file watcher. To use a custom configuration file (not just traffic_portal/conf/config.js or traffic_portal/conf/configDev.js), set the TP_SERVER_CONFIG_FILE environment variable to the location of the desired file.

  6. Navigate to http(s)://localhost:[port|sslPort defined in the configuration file used (default: traffic_portal/conf/configDev.js)]