You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

This page will demonstrate how to get the REACT GUI running on the local developer machine (Windows/Linux/MacOS). 


Prerequisites to running the UI

  1. Building and running CLAMP

  2. Go to the clamp directory

  3. Inside the clamp directory go to /clamp/extra/bin-for-dev

    ./start-db.sh test
  4. Check docker container id

    docker ps
  5. Log into docker container

    docker exec -it 'container_id' bash
  6. Go into mariadb shell

    mysql -u root -p
  7. Enter password

    strong_pitchou



  8. Go into cldsdb4 database

    use cldsdb4;
  9. Verify if there is data in the following table 'loop_templates'

    select * from loop_templates;
  10. If for some reason the database is empty do the go to the '/docker-entrypoint-initdb.d/dump' directory

    ./load-fake-data.sh
  11. Once the database is up and running need to start the clamp emulator, by running the following command inside the /clamp/extra/bin-for-dev

    ./start-emulator.sh
  12. Start the backend service by running the command inside the /clamp/extra/bin-for-dev

    ./start-backend.sh

Checking out and building the UI

  1. Checkout UI from the repo.

    git clone "https://gerrit.nordix.org/onap/policy/gui"
  2. Change into the "gui-clamp" directory.

  3. Build the UI

    mvn clean install
  4. Go to the following directory 'ui-react'

  5. Start the front end UI

  6. npm start --scripts-prepend-node-path
    * If you get an error such as 'npm ERR! code ENOENT' modify the package.json "start": "HTTPS=true react-scripts start" to "start": "set HTTPS=true && react-scripts start",

  7. Once the UI starts at localhost:3000 it will ask for credentials: 
    Login: admin
    Password: password
  • No labels