Skip to content

RedHatInsights/vuln4shift-frontend

Repository files navigation

travis

Vulnerability for OpenShift frontend

Red Hat Vulnerability for OpenShift service is used to assess and monitor the status of security vulnerabilities on OpenShift clusters, understand the level of exposure of infrastructure, and plan a course of action. This is the front-end repository for this service.

First time setup

  1. Make sure you have Node.js version >= 18 installed
  2. Run script to patch your /etc/hosts
  3. Make sure you are using Red Hat proxy

Running locally

  1. Make sure you are connected to the Red Hat VPN
  2. Install dependencies with npm install
  3. Run development server with npm run start:proxy and select desired environment (stage is recommended)
  4. Local version of the app will be available at URL printed out to the console (https://stage.foo.redhat.com:1337/openshift/insights/vulnerability/ if you selected stage)

Testing

Cypress is used as the testing framework

  • npm run test - run all Cypress tests
  • npx cypress open --component - open Cypress in the component testing mode.
  • npm run lint - run linter

Code Coverage

  1. Make sure npm run test are ran before the coverage
  2. Run npm run coverage

Deploying

The app uses containerized builds which are configured in app-interface.

Environment Available at Deployed version
stage https://console.stage.redhat.com master branch
production https://console.redhat.com up to the commit configured in app-interface

Design System

This project uses Patternfly React.

Insights Components

This app imports components from Insights Front-end Components library. ESI tags are used to import Insights Chrome which takes care of the header, sidebar, and footer. These libraries are described in the Platform experience documentation.