Image Builder service for console.redhat.com
Find a file
Sanne Raymaekers 7d6ede8dc6 FileSystemConfiguration: Don't stop onDragOver if element matches
Rely on the index matching instead. During a drag, if onDragOver is
fired the index the item will be dragged to (the target index) will be
set. If the target index doesn't match the source index, the new
tempItemOrder is made and the new target index is set.

Initially this index is null, so even if the target index is the
same as the current index, the tempItemOrder and target index will be
set once.

By not shorting this event based on the visual layout, the drag state
gets initialized correctly every time.

Fixes #679
2022-04-04 15:06:29 +02:00
.github ci: Extract Coverity Scan tools in /tmp 2021-11-12 12:02:43 +01:00
.travis travis: Fork main to prod-beta 2021-03-19 11:15:52 +01:00
config package.json: add run script for stage env 2022-02-28 15:35:51 +01:00
devel devel: typo fix (#561) 2022-02-07 20:36:23 +01:00
distribution Reflect webpack changes in docker compose. 2021-10-12 15:03:04 +02:00
src FileSystemConfiguration: Don't stop onDragOver if element matches 2022-04-04 15:06:29 +02:00
.babelrc copy from RedHatInsights/insights-frontend-starter-app template 2020-04-15 12:46:02 +02:00
.eslintrc.yml package.json: update babel-eslint to @babel/eslint-parser 2022-03-02 09:59:19 +01:00
.gitignore Stop ignoring lock-file. 2021-10-12 15:03:04 +02:00
.stylelintrc.json package-json: remove unnused stylint-scss and bump dependencies 2022-03-24 15:48:34 +01:00
.travis.yml .travis: Use npm ci to install dependencies 2022-02-22 15:40:55 +01:00
codecov.yml codecov.yml: reset comment to default 2021-10-28 15:02:18 +01:00
LICENSE osbuild-installer-frontend 2020-03-27 10:14:04 +01:00
package-lock.json build(deps): bump @data-driven-forms/pf4-component-mapper 2022-03-25 15:30:01 +01:00
package.json build(deps): bump @data-driven-forms/pf4-component-mapper 2022-03-25 15:30:01 +01:00
README.md package.json: add run script for stage env 2022-02-28 15:35:51 +01:00

image-builder-frontend

Frontend Development

To develop the frontend you can use a proxy to run image-builder-frontend locally against the chrome and backend at console.redhat.com.

Working against the production environment is preferred, as any work can be released without worrying if a feature from stage has been released yet.

Nodejs and npm version

Make sure you have npm@7 and node 15+ installed. If you need multiple versions of nodejs check out nvm.

Webpack proxy

  1. run npm ci

  2. run npm run start:proxy:beta. This command uses a prod-beta env by default. Configure your environment by the env attribute in dev.webpack.config.js.

  3. open browser at https://prod.foo.redhat.com:1337/beta/insights/image-builder

Webpack proxy (staging) -- Runs with image-builder's stage deployment

  1. run npm ci

  2. run npm run stage. This command uses a stage-beta env by default. Configure your environment by the env attribute in dev.webpack.config.js.

  3. open browser at https://stage.foo.redhat.com:1337/beta/insights/image-builder

Insights proxy (deprecated)

  1. Clone the insights proxy: https://github.com/RedHatInsights/insights-proxy

  2. Setting up the proxy

    Choose a runner (podman or docker), and point the SPANDX_CONFIG variable to profile/local-frontend.js included in image-builder-frontend.

        sudo insights-proxy/scripts/patch-etc-hosts.sh
        export RUNNER="podman"
        export SPANDX_CONFIG=$PATH_TO/image-builder-frontend/profiles/local-frontend.js
        sudo -E insights-proxy/scripts/run.sh
    
  3. Starting up image-builder-frontend

    In the image-builder-frontend checkout directory

        npm install
        npm start
    

The UI should be running on https://prod.foo.redhat.com:1337/beta/insights/image-builder/landing. Note that this requires you to have access to either production or stage (plus VPN and proxy config) of insights.

Backend Development

To develop both the frontend and the backend you can again use the proxy to run both the frontend and backend locally against the chrome at cloud.redhat.com. For instructions see devel/README.md.

Style Guidelines

This project uses eslint's recommended styling guidelines. These rules can be found here: https://eslint.org/docs/rules/

Test Guidelines

Testing is done using React Testing Library. All UI contributions must also include a new test or update an existing test in order to maintain code coverage.

Tests can be run with

    npm run test

These tests will also be run in our Travis CI when a PR is opened.