Skip to content

Latest commit

 

History

History
65 lines (48 loc) · 2.96 KB

traffic_portal.rst

File metadata and controls

65 lines (48 loc) · 2.96 KB

Traffic Portal

Introduction

Traffic Portal is an AngularJS client served from a Node.js web server designed to consume the :ref:`to-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.

npm -g install grunt-cli

Traffic Portal Project Tree Overview

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 :atc-file:`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 :atc-file:`traffic_portal/conf/config.js` or :atc-file:`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: :atc-file:`traffic_portal/conf/configDev.js`)]