Skip to content

RedHatInsights/insights-remediations-frontend

Repository files navigation

Build Status

insights-remediations-frontend

This is the frontend application for Insights Remediations. It is based on the insights-frontend-starter-app.

Getting Started

Initial etc/hosts setup

In order to access the https://[env].foo.redhat.com in your browser, you have to add entries to your /etc/hosts file. This is a one-time setup that has to be done only once (unless you modify hosts) on each devel machine.

Best way is to edit manually /etc/hosts on your localhost line:

127.0.0.1 <your-fqdn> localhost prod.foo.redhat.com stage.foo.redhat.com

more info insights-frontend-starter-app README

Running the application

  1. install and start the dev server in an environment of your choice:
npm i
npm run start:proxy

While you run the command above, you will be prompted to choose an enviroment.

  1. Open browser with the URL generated by the webpack dev server your terminal

Running with another app

If you want to see changes made in remediations button or wizard in another application you will have to run both remediations and desired application. We'll take for example insights-advisor-frontend application as app that uses system detail.

With webpack proxy

Open new terminal and navigate to desired application (for instance insights-adviror-frontend) and run it (make sure to run it on different port)

npm start

Run the remediations application with proxy enabled and list of additional applications

LOCAL_API=advisor:8003~https npm run start:proxy

If you want to run advisor and for instance vulnerability just add new entry to LOCAL_API

LOCAL_API=advisor:8003~https,vulnerability:8004

Testing

Run npm run verify to run build, linters and tests

Use remediations:debug localStorage entry to unlock testing utilities in the UI (localStorage.setItem('remediations:debug', true))

Releases

Any change commited to the master branch is automatically promoted to /preview in all environments. Any change commited to the stable branch is automatically promoted to the main version of the application in all environments.