/in-place-upgrades-frontend

Frontend for Upgrades page on console.redhat.com/insights

Primary LanguageTypeScriptApache License 2.0Apache-2.0

tests codecov

In-place Upgrades frontend for Insights

User friendly experience for all customers who want to perform in-place upgrades on console.redhat.com.

Our page groups multiple existing components of Insights on one page with a goals:

  • to see all systems that are (or can be) available for upgrade in one place
  • to see all available tasks and remediations relatd to upgrades in one place
  • to see recommended workflow for upgrading registred systems - starting with preupgrade analysis and ending with post-upgrade steps

Local development

The app is not deployed yet, we are creating simple POC right now

[One-time-setup] 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 machine.

To setup the hosts file run following command:

npm run patch:hosts

If this command throws an error run it as a sudo:

sudo npm run patch:hosts

Set up chrome-service-backend for accessing the route of our app

You need to fork and clone the chrome-service-backend repository, prefferably use changes on this branch to get started or make similar changes in your fork.

Then follow these steps (you don't have to add routes, it is already done in fec.config.js), probably easiest is to just run make dev-static-node port=9999 inside the cloned repository (if you want to use different port then you have to update fec.config.js in this repository)

Getting started

  1. npm install

  2. npm run start

  3. Open browser in URL listed in the terminal output

Testing

npm run verify will run npm run lint (eslint) and npm test (Jest)

There is also pre-commit in place that runs lint and test (set up via husky).