Cloud Migration Web UI

Mihaela Balutoiu f4dc97c866 Add `text/csv` header to fix VM inventory CSV newline escaping 1 viikko sitten
.github beaca29a2c Upgrade dependencies for Node.js 22.13.1 compatibility 10 kuukautta sitten
.storybook 67c8615a04 Replace React Router v5 `Switch` with v6 `Routes` API 10 kuukautta sitten
.vscode 0c650eb0a0 Fix `npm run format` command 1 vuosi sitten
.yarn 3df3ed01d4 Upgrade Yarn to modern (3.6.3) version 2 vuotta sitten
cypress fe34453182 Fix e2e test 8 kuukautta sitten
public 333ec7de4b Fix `npm run format` command 10 kuukautta sitten
server afd91f99fa Update harvester logos 1 kuukausi sitten
src f4dc97c866 Add `text/csv` header to fix VM inventory CSV newline escaping 6 päivää sitten
tests d773396c75 Add libvirt provider support 1 kuukausi sitten
.dockerignore 007b40e2e5 Docker file upgrade Node version from 16 to 18 2 vuotta sitten
.editorconfig 0d39a85837 Coriolis with Atomic design implementation 8 vuotta sitten
.gitignore e610d98acf Add unit tests and test coverage report 2 vuotta sitten
.prettierrc 3dc8fa6372 Revamp the entire source code style and formatting 3 vuotta sitten
.yarnrc.yml 3df3ed01d4 Upgrade Yarn to modern (3.6.3) version 2 vuotta sitten
Dockerfile beaca29a2c Upgrade dependencies for Node.js 22.13.1 compatibility 10 kuukautta sitten
LICENSE 0d39a85837 Coriolis with Atomic design implementation 8 vuotta sitten
README.md d21df1cd0e Update `npm run build` command 1 vuosi sitten
babel.config.js a99fd39afe Replace deprecated `react-hot-loader` plugin with `react-refresh` 10 kuukautta sitten
config.ts 3d0b62fc8b Fix `auto_deploy` toggle being disabled for bare-metal sources 3 viikkoa sitten
cypress.config.ts ca52e146e1 Add Cypress (E2E testing) to the project 2 vuotta sitten
eslint.config.mjs 333ec7de4b Fix `npm run format` command 10 kuukautta sitten
jest.config.ts f0c0b3d217 Update test configuration for `jest` dependency version 29+ 10 kuukautta sitten
jest.setup.js f0c0b3d217 Update test configuration for `jest` dependency version 29+ 10 kuukautta sitten
package.json a028360adb Bump react-router from 7.5.0 to 7.12.0 2 kuukautta sitten
tsconfig.json ca52e146e1 Add Cypress (E2E testing) to the project 2 vuotta sitten
ui-mod-sample.json 0c650eb0a0 Fix `npm run format` command 1 vuosi sitten
webpack.common.js 333ec7de4b Fix `npm run format` command 10 kuukautta sitten
webpack.dev.js a99fd39afe Replace deprecated `react-hot-loader` plugin with `react-refresh` 10 kuukautta sitten
webpack.prod.js f5b1de8c5d Update dependencies for webpack 5 migration 1 vuosi sitten
yarn.lock a028360adb Bump react-router from 7.5.0 to 7.12.0 2 kuukautta sitten

README.md

Coriolis Web

Web GUI for coriolis

Build and Test

Install instructions

  • Install Node 18
  • clone repo
  • run corepack enable for yarn 3 support
  • run yarn install (development deps) or yarn workspaces focus --all --production (production deps)
  • set CORIOLIS_URL environment variable

Build instructions

Build the production version of the UI:

  • run npm run build:prod
  • run npm run start to start the server

Your server will be running at http://localhost:3000/ (the port is configurable through PORT environment variable)

Testing

  • unit tests can be run using npm run test
  • run npm run test-release to check for Typescript, ESLint and prettier errors. This will also run the unit tests and will try to build and start a production version. If eeverything is OK, it will revert to the development installation.

Integration tests

Integration tests can be executed using npm run e2e. All API calls will be mocked, eliminating the need for a running Coriolis instance.

To run the integration tests, you must set the environment variable NODE_ENV='development', then execute npm run build:dev and npm run start. It is also recommended to set CORIOLIS_URL to a non-existent URL (such as https://invalidd.it/) to prevent the UI from attempting to connect to a Coriolis instance for CORS checks. Although Cypress is configured to mock API calls, if a valid URL is set, the UI will still attempt to connect to it for CORS checks.

You can also run the integration tests for easier debugging by using npm run server-dev and npm run client-dev, and by updating the baseUrl in cypress.config.ts to <http://localhost:3001>. The variables NODE_ENV and CORIOLIS_URL, as described above, are still required. Subsequently, execute the tests using npx cypress open. This procedure allows you to update the source code and see the changes reflected in the UI without having to rebuild and restart the server. Additionally, the tests will automatically re-run when you save a test file.

Development mode

  • set env. variable NODE_ENV='development'
  • run npm run client-dev to start local development server (starts on port 3001)
  • run npm run server-dev to start the express server in development mode

To debug the client code using VS Code, simply run the project's launch configuration from the 'Run' menu (Ctrl+Shift+D). The last 2 npm run ... commands must be running in the background.

To debug the Node server using VS Code, run npm run server-debug instead of npm run server-dev.

You can view some of the UIs components in the Storybook by running npm run storybook

Modding

The UI can be modded externally using a .json modding file. A sample is available in the repo ui-mod-sample.json.

The path to the .json mod file needs to be set in MOD_JSON environment variable (ex.: MOD_JSON=/usr/ui-mod.json).

Any provider logos can be replaced using local logo images. The local image file paths need to be absolute.

You can specify one logo, in which case it will be scaled to all sizes. You can also specify logos for just a couple of the sizes, in which case the closest size to the one required will be used. Open ui-mod-sample.json for more details.

Any option from config.ts can be modified by adding the config field to the ui-mod-sample.json file.

Environment variables

All environment variables can be set in a .env file created in the root directory.

The following is the list of environment variables and their default values:

NODE_ENV='production'
CORIOLIS_URL='<your-coriolis-url>'
MOD_JSON='<path-to-json>'
CA_FINGERPRINT='<path to CA fingerprint file used by metal hub agent>'