Commit graph

1375 commits

Author SHA1 Message Date
lucasgarfield
fabd3e015a redux store: define typed useSelector and useDispatch hooks
From the RTK docs:
```
Using configureStore should not need any additional typings. You will,
however, want to extract the RootState type and the Dispatch type so
that they can be referenced as needed. Inferring these types from the
store itself means that they correctly update as you add more state
slices or modify middleware settings.

----------------------------------------------------------------------

While it's possible to import the RootState and
AppDispatch types into each component, it's better to create pre-typed
versions of the useDispatch and useSelector hooks for usage in your
application. This is important for a couple reasons:

    For useSelector, it saves you the need to type (state: RootState)
    every time

    For useDispatch, the default Dispatch type does not know about
    thunks or other middleware. In order to correctly dispatch thunks,
    you need to use the specific customized AppDispatch type from the
    store that includes the thunk middleware types, and use that with
    useDispatch. Adding a pre-typed useDispatch hook keeps you from
    forgetting to import AppDispatch where it's needed.
```
source:
https://react-redux.js.org/using-react-redux/usage-with-typescript#define-root-state-and-dispatch-types
2023-12-08 09:37:25 +01:00
lucasgarfield
8d47e52868 dev deps: add @types/react-redux
This dependency adds Typescript types for Redux Toolkit. It is necessary if we wish to start using RTK for state management (with .tsx files), which we very likely will for HMS-2861 (v2 wizard).
2023-12-08 09:37:25 +01:00
regexowl
44bb6f62ff test: Add a test checking if release lifecycle chart renders correctly
This adds a test that checks if the release lifecycle chart rendered only when RHEL 8 release is selected.
2023-12-07 19:39:58 +01:00
regexowl
c11f80188e test: Update release select option to partial match
With description added to the RHEL release options in Release select every query using name needed to be updated from full to partial match.
2023-12-07 19:39:58 +01:00
regexowl
014a0c1d70 Wizard: Add description to RHEL release options
This adds a description to RHEL options in the Release select on Image Output step as per mocks.
2023-12-07 19:39:58 +01:00
regexowl
f6d1b12b3c Wizard: Add annotation for current date
This adds a line annotation to mark the current date.
2023-12-07 19:39:58 +01:00
regexowl
51f68bda34 test: Mock ResizeObserver
This adds mocked ResizeObserver to the jest setup so the tests don't fail on charts created with Chart.js.
2023-12-07 19:39:58 +01:00
regexowl
fd30e5b634 Wizard: Add release lifecycle charts
This adds information about release lifecycle to the Image Output step of the Wizard. Summary is also shown on the Review step.
2023-12-07 19:39:58 +01:00
regexowl
1ec7d886e4 deps: Install Chart.js
Install:
- charting library Chart.js (https://www.chartjs.org/docs/latest/)
- React components for Chart.js react-chartjs-2 (https://react-chartjs-2.js.org/)
- Moment.js to allow the use of time scale for the axis (https://momentjs.com/)
- adapter allowing the use of Moment.js with Chart.js chartjs-adapter-moment (https://github.com/chartjs/chartjs-adapter-moment)
- a plugin for drawing annotations in Chart.js charts (https://www.chartjs.org/chartjs-plugin-annotation)
2023-12-07 19:39:58 +01:00
Sanne Raymaekers
2b29275c2a CreateImageWizard: move oci to stable
Move the oracle cloud infrastructure PR to stable.
2023-12-07 17:01:51 +01:00
regexowl
3e07472826 Wizard/ImagesTable/test: Change "VMWare" to "VMware"
The "w" in VMware should be lower case, this updates it in all places.
2023-12-05 13:20:42 +01:00
Sanne Raymaekers
cea1caf175 CreateImageWizard: proprely gate WSL images
`isBeta` is a function, so the check would also return true in stable.
2023-12-04 15:06:28 +01:00
regexowl
e011c4ba0b test: Await asynchronous setUp()
This adds await to call of asynchronous `setUp()` function. Previously this wasn't awaited which sometimes caused the tests to continue without being properly set up first.
2023-12-04 11:28:16 +01:00
lucasgarfield
c7dd831645 API: Update image-builder API
This commit updates the image-builder API due to these two recent
changes:

A new type added for the ClientId, used when differentiating between API
and UI users.
fce3d1c355

OpenSCAP profile names and descriptions.
1d292917d1
2023-12-04 10:48:29 +01:00
Sanne Raymaekers
31d286aac3 test/CreateImageWizard: Test compose requests sent by wizard 2023-12-01 13:11:07 +01:00
Sanne Raymaekers
ae7178158e CreateImageWizard: Fix passing gcp upload_options
Upload options were added in the wrong place, this inserts them back
into the correct place.

Also see #1355.
2023-12-01 13:11:07 +01:00
dependabot[bot]
54770c766d build(deps-dev): bump @adobe/css-tools from 4.3.1 to 4.3.2
Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.3.1 to 4.3.2.
- [Changelog](https://github.com/adobe/css-tools/blob/main/History.md)
- [Commits](https://github.com/adobe/css-tools/commits)

---
updated-dependencies:
- dependency-name: "@adobe/css-tools"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 08:27:38 +01:00
Tom Koscielniak
f52fa6d851 Add iqe trigger integration 2023-11-30 14:37:50 +01:00
Lucas Garfield
223be1f3fd Update src/Components/CreateImageWizard/steps/fileSystemConfiguration.js
Co-authored-by: Klara Simickova <49452678+regexowl@users.noreply.github.com>
2023-11-29 12:52:48 +01:00
lucasgarfield
f5039dea3c Wizard: Fix HMS-2036, bug in file system customization steps
Information about automatic partioning was also being displayed when
manual partioning was selected. This commit fixes the bug.
2023-11-29 12:52:48 +01:00
regexowl
39531bf2bb api: Update imageBuilder api schema
This includes an update to the imageBuilder api schema and changes generated by `npm run api`.
2023-11-28 13:01:00 +01:00
regexowl
ab1987660e Wizard: Add client_id to compose requests
This adds `client_id` value to compose requests for the purpose of differentiating between images created in UI and those created directly via api.
2023-11-28 13:01:00 +01:00
dependabot[bot]
df5a06ff86 build(deps-dev): bump @typescript-eslint/parser from 6.2.1 to 6.13.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.2.1 to 6.13.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.13.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 08:36:57 +01:00
regexowl
62673813e2 test: Remove out-of-date comments
This cleans up comments in tests and removes all that are no longer relevant.
2023-11-27 13:52:20 +01:00
dependabot[bot]
28d37ded06 build(deps-dev): bump stylelint-config-recommended-scss
Bumps [stylelint-config-recommended-scss](https://github.com/stylelint-scss/stylelint-config-recommended-scss) from 12.0.0 to 13.1.0.
- [Release notes](https://github.com/stylelint-scss/stylelint-config-recommended-scss/releases)
- [Changelog](https://github.com/stylelint-scss/stylelint-config-recommended-scss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stylelint-scss/stylelint-config-recommended-scss/compare/v12.0.0...v13.1.0)

---
updated-dependencies:
- dependency-name: stylelint-config-recommended-scss
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 08:35:06 +01:00
regexowl
1fc0aca5b2 Wizard: Activation key management link based on env
The "Activation keys page" link on the Registration step previously led to prod from both prod and stage envs.

This fixes the problem and ensures that the button in stage links to the activation key management in stage and the prod one to prod.
2023-11-24 15:28:51 +01:00
dependabot[bot]
b797f62c66 build(deps-dev): bump jest and @types/jest
Bumps [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) and [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest). These dependencies needed to be updated together.

Updates `jest` from 29.6.2 to 29.7.0
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.7.0/packages/jest)

Updates `@types/jest` from 29.5.7 to 29.5.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-24 12:20:29 +01:00
regexowl
44195c5334 Wizard: Remove hard coded architecture from OCI request
This replaces hard coded 'x86_64' architecture with the value based on a form state for OCI images.
2023-11-24 09:08:00 +01:00
Sanne Raymaekers
b60c37f1f8 ImagesTable: show architecture of composes 2023-11-23 17:55:43 +01:00
regexowl
ac357f4e13 Wizard: Remove hardcoded architecture
This updates requests that contained hardcoded value `x86_64` as an architecture.
2023-11-23 17:02:26 +01:00
Amir Fefer
16cf421c68 feat(HMS-2789): simplfy activation key creation 2023-11-23 16:19:07 +01:00
dependabot[bot]
2c0c85f241 build(deps-dev): bump @babel/preset-typescript from 7.22.5 to 7.23.3
Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.22.5 to 7.23.3.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.3/packages/babel-preset-typescript)

---
updated-dependencies:
- dependency-name: "@babel/preset-typescript"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-23 10:47:38 +01:00
dependabot[bot]
d7643d77be build(deps-dev): bump @testing-library/react from 14.0.0 to 14.1.2
Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 14.0.0 to 14.1.2.
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/react-testing-library/compare/v14.0.0...v14.1.2)

---
updated-dependencies:
- dependency-name: "@testing-library/react"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-23 08:55:54 +01:00
dependabot[bot]
32ae51279d build(deps-dev): bump @types/react-dom from 18.2.15 to 18.2.17
Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 18.2.15 to 18.2.17.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-22 14:40:18 +01:00
Sanne Raymaekers
6739851897 CreateImageWizard: package search through correct architecture
Instead of always searching through x86 repos, search through the repos
of the selected architecture. This fixes HMS-3066.
2023-11-22 13:19:34 +01:00
regexowl
e60afdbe27 Wizard: Add temporary alert about /usr sub-directories
This adds an alert to the File system configuration step that informs about newly disables `/usr` sub-directories.

It can be removed in two weeks after all the images with possible erroneous mount points are removed.
2023-11-22 11:47:23 +01:00
regexowl
c2cd4bed97 Wizard: Replace /usr path with sub-directories by /usr on Recreate
Sub-directories for `/usr` prefix are no longer supported in file system configuration. This replaces the possible erroneous path with a valid one so the user is not able to send an invalid image request via Recreate action.
2023-11-22 11:47:23 +01:00
regexowl
3036577b31 fixtures: Add file system configuration to an existing mock
This adds basic file system configuration including an `/usr` sub-directory to an already existing mock.
2023-11-22 11:47:23 +01:00
regexowl
628bc2808b README: Setup certificate for msw
This adds steps for setting up certificates needed in order to run msw with mocked data.
2023-11-22 10:47:06 +01:00
dependabot[bot]
38c97644cb build(deps-dev): bump eslint from 8.46.0 to 8.54.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.46.0 to 8.54.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.46.0...v8.54.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-22 08:57:49 +01:00
regexowl
0ea2696ac5 fixtures: Update image names
This updates the names of images to how should they look like according to the image name validation rules in Wizard.

"The image name can be 3-63 characters long. It can contain lowercase letters, digits and hyphens, has to start with a letter and cannot end with a hyphen."
2023-11-21 15:27:02 +01:00
mgold1234
9ab3d45f99 Wizard: add all/selected toggle buttons to custom repository step
This commit resolves #1201.
It adds a toggle to the repositories step that allows users to toggle
between all and selected repositories.
2023-11-21 14:43:32 +01:00
mgold1234
7b12710f1c add ssl_certification explenation to the readme file 2023-11-21 10:42:03 +01:00
dependabot[bot]
b43fbecbf3 build(deps-dev): bump eslint-plugin-import from 2.28.1 to 2.29.0
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.28.1 to 2.29.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.28.1...v2.29.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 09:44:27 +01:00
dependabot[bot]
206fbad944 build(deps-dev): bump @testing-library/jest-dom from 6.1.3 to 6.1.4
Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 6.1.3 to 6.1.4.
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/jest-dom/compare/v6.1.3...v6.1.4)

---
updated-dependencies:
- dependency-name: "@testing-library/jest-dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 08:41:09 +01:00
dependabot[bot]
8f144c85cf build(deps): bump @data-driven-forms/pf4-component-mapper
Bumps [@data-driven-forms/pf4-component-mapper](https://github.com/data-driven-forms/react-forms/tree/HEAD/packages/pf4-component-mapper) from 3.21.8 to 3.22.0.
- [Release notes](https://github.com/data-driven-forms/react-forms/releases)
- [Commits](https://github.com/data-driven-forms/react-forms/commits/v3.22.0/packages/pf4-component-mapper)

---
updated-dependencies:
- dependency-name: "@data-driven-forms/pf4-component-mapper"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 11:57:34 +01:00
dependabot[bot]
a0f55c1091 build(deps): bump react-router-dom from 6.16.0 to 6.19.0
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.19.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.19.0/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 10:39:46 +01:00
mgold1234
b8c634eac0 fix some lint warning message 2023-11-20 09:37:12 +01:00
dependabot[bot]
2bdb8c6fcc build(deps): bump @data-driven-forms/react-form-renderer
Bumps [@data-driven-forms/react-form-renderer](https://github.com/data-driven-forms/react-forms/tree/HEAD/packages/react-form-renderer) from 3.21.10 to 3.22.0.
- [Release notes](https://github.com/data-driven-forms/react-forms/releases)
- [Commits](https://github.com/data-driven-forms/react-forms/commits/v3.22.0/packages/react-form-renderer)

---
updated-dependencies:
- dependency-name: "@data-driven-forms/react-form-renderer"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-17 09:25:12 +01:00
dependabot[bot]
458a4fa00c build(deps-dev): bump @babel/preset-react from 7.22.5 to 7.23.3
Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.22.5 to 7.23.3.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.3/packages/babel-preset-react)

---
updated-dependencies:
- dependency-name: "@babel/preset-react"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-17 09:14:52 +01:00