JSPM

openshift-assisted-ui-lib

2.4.6
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12
  • Score
    100M100P100Q37980F
  • License Apache-2.0

React component library for the Bare Metal Installer

Package Exports

  • openshift-assisted-ui-lib
  • openshift-assisted-ui-lib/cim
  • openshift-assisted-ui-lib/index.css
  • openshift-assisted-ui-lib/ocm

Readme

Assisted Installer User Interface Library

React component library for https://github.com/openshift-assisted/assisted-ui.

Please note, the project's upstream has been renamed and moved from mareklibra/facet-lib to https://github.com/openshift-assisted/assisted-ui-lib in December 2020.

NPM JavaScript Style Guide

Install

npm install --save openshift-assisted-ui-lib

or

yarn add openshift-assisted-ui-lib

Develop

One time action:

sudo dnf install -y inotify-tools
yarn install

Scripts

  • yarn start: Watches for changes in the /src folder and bundles the files into /dist folder
  • yarn sync-dist: Synchronizes /dist with the assisted-ui application's node_modules/openshift-assisted-ui-lib folder.
  • yarn start:assisted-ui: Runs the Assisted UI application assisted-ui project.

In order to work with Assisted UI Lib and see changes in Assisted UI, run the 3 commands above sequentially. Before using the yarn start:assisted-ui script, make sure this project and the assisted-ui (and optionally the uhc-portal) project are located in the same folder.

Next, create a .env.development.local file at the root folder of the assisted-ui repository and include this variable:

REACT_APP_API_URL="...ask the team"

Publish

To publish the Node.js package, simply create a new tag in format v[VERSION].

To do so, preferably draft a new release with:

  • tag: v[VERSION], example: v1.2.3
  • title: v[VERSION], example: v1.2.3

New version of the package will be published to npmjs.com and a new PR with version change will be created automatically by a GitHub action.

Updating the API types

The types used by Assisted Installer UI are defined in src/common/api/types.ts and generated automatically by running yarn update-api. If the generator changes certain types from unknown to any, there will be warnings, which are not allowed. For now, you need to manually revert these changes.

Troubleshooting

Increasing the amount of inotify watchers

If you see the following error: Error: ENOSPC: System limit for number of file watchers reached, you will need to increase the number of inotify watchers.
From the terminal run the following commands:

$ sudo sh -c "echo fs.inotify.max_user_watches=524288 >> /etc/sysctl.conf"
$ sudo sysctl -p

License

Apache-2.0