Commit graph

788 commits

Author SHA1 Message Date
Sanne Raymaekers
cb8ab9347e CreateImageWizard: use non-deprecated image type aliases
'ami' was deprecated a while ago, and is kept around as an alias of
'aws'. Same with 'vhd' and 'azure', and 'vhd' and 'gcp'.

This maintains support for the old aliases where necessary.
2022-12-06 15:14:53 +01:00
regexowl
dd08069e48 Wizard: Improve validation of GCP targets
Fixes #879. This adds anchor at the beginning of the regular expression for validation of GCP targets.
2022-12-02 17:06:49 +01:00
regexowl
ab1a7f4aab ESLint: Use --fix with updated rules to order imports
This applies the updated sorting rules to the files by running `npm run lint:js:fix`
2022-12-02 16:29:58 +01:00
regexowl
b55d5242a9 ESLint: Refine rules for import order
The import ordering was handled by using `sort-imports` rule for alphabetical ordering and `import` plugin for separating the imports into groups by a type of the import.

The alphabetical sorting was not working very well when using the combination.

This removes the use of `sort-imports` rule and adds alphabetical sorting directly under the `import` plugin which means all the sorting is handled in one place.

The rules for sorting of the imports are now following:
- imports are separated into groups by a type of the import
- imports within the groups are ordered alphabetically in ascending order
- new lines separating the groups of imports are enforced
- the import of React library is always at the very top of the imports
2022-12-02 16:29:58 +01:00
Sanne Raymaekers
39ec63b0c3 CreateImageWizard: custom buttons for each step
This adds custom buttons for each step, where each button has an id
taking the format `$step-(next|previous|cancel)-button`.
2022-12-01 16:31:53 +01:00
regexowl
b2a6c403bf Wizard: Add additional information for an activation key in Review step
Fixes #822. This adds component `ActivationKeyInformation` with additional information for an activation key on a Registration tab of Review step.
The added fields are:
- Name
- Role
- SLA
- Usage
- Additional repositories

Organization ID is added to the Activation key popover.

Function `getActivationKey` was added to `api` to get an additional information about activation key from RHSM api based on the name of the key.
2022-12-01 12:35:07 +01:00
Ondřej Budai
47d99a3903 ImagesTable: indent the downloaded compose request
Prior to this commit, the downloaded request was just an ugly unformatted
json. Surely, `jq . <request.json` could fix that, but it's much more
convenient if the frontend does it itself.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-11-30 11:43:13 +01:00
Jakub Rusz
eaf3685391 pr_check: add actual testing in ephemeral
It is now possible to run UI testing in ephemeral environment. This
script builds the frontend container, deploys image-builder with it's
frontend in ephemeral, runs the IQE test suite against that and reports
the result on the PR.
2022-11-28 17:26:32 +00:00
dependabot[bot]
f01c5492bf build(deps): bump @redhat-cloud-services/frontend-components
Bumps [@redhat-cloud-services/frontend-components](https://github.com/RedHatInsights/frontend-components) from 3.9.2 to 3.9.25.
- [Release notes](https://github.com/RedHatInsights/frontend-components/releases)
- [Commits](https://github.com/RedHatInsights/frontend-components/commits)

---
updated-dependencies:
- dependency-name: "@redhat-cloud-services/frontend-components"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-28 10:28:15 +01:00
dependabot[bot]
1910909164 build(deps-dev): bump webpack-bundle-analyzer from 4.5.0 to 4.7.0
Bumps [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) from 4.5.0 to 4.7.0.
- [Release notes](https://github.com/webpack-contrib/webpack-bundle-analyzer/releases)
- [Changelog](https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/webpack-bundle-analyzer/compare/v4.5.0...v4.7.0)

---
updated-dependencies:
- dependency-name: webpack-bundle-analyzer
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-28 10:11:21 +01:00
dependabot[bot]
6886b2fa27 build(deps): bump loader-utils from 2.0.3 to 2.0.4
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.3...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-28 10:03:35 +01:00
dependabot[bot]
c7107bef99 build(deps-dev): bump @babel/plugin-proposal-object-rest-spread
Bumps [@babel/plugin-proposal-object-rest-spread](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-proposal-object-rest-spread) from 7.17.3 to 7.20.2.
- [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.20.2/packages/babel-plugin-proposal-object-rest-spread)

---
updated-dependencies:
- dependency-name: "@babel/plugin-proposal-object-rest-spread"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 14:42:21 +01:00
Sanne Raymaekers
b5c4a8f351 devel: expose correct composer ports and use tern migrations 2022-11-18 14:00:15 +01:00
Amir Fefer
28de575b94 HMSPROV #355 - add architecture to provisioning wizard 2022-11-18 12:40:56 +01:00
Sanne Raymaekers
e9295b8b42 DocumentationButton: fix documentation url
The old URL pointed to the on-prem documentation, not the service docs.
2022-11-16 14:20:32 +01:00
Karel Hala
8b129f4b7c Navigation: Fix navigation from image builder to other apps 2022-11-16 10:38:25 +01:00
Sanne Raymaekers
2b2660520f src/constants: switch to rhel-87 and rhel-91 2022-11-16 09:46:55 +01:00
Thomas Lavocat
b74a5a784b ci: add tags to AWS instances
The new terraform runners support an extended lists of tags to get a
greater precision on the stats we can extract from AWS cost center.
2022-11-10 18:46:09 +01:00
dependabot[bot]
b1cb459a89 build(deps): bump loader-utils from 2.0.2 to 2.0.3
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.3/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.2...v2.0.3)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-10 16:49:00 +01:00
dependabot[bot]
338a97c3a2 build(deps-dev): bump stylelint from 14.6.1 to 14.14.1
Bumps [stylelint](https://github.com/stylelint/stylelint) from 14.6.1 to 14.14.1.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/14.6.1...14.14.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-10 15:19:03 +01:00
dependabot[bot]
14092b4563 build(deps): bump react-redux from 8.0.4 to 8.0.5
Bumps [react-redux](https://github.com/reduxjs/react-redux) from 8.0.4 to 8.0.5.
- [Release notes](https://github.com/reduxjs/react-redux/releases)
- [Changelog](https://github.com/reduxjs/react-redux/blob/master/CHANGELOG.md)
- [Commits](https://github.com/reduxjs/react-redux/compare/v8.0.4...v8.0.5)

---
updated-dependencies:
- dependency-name: react-redux
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-10 13:04:52 +01:00
dependabot[bot]
2c054ceedb build(deps): bump classnames from 2.3.1 to 2.3.2
Bumps [classnames](https://github.com/JedWatson/classnames) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/JedWatson/classnames/releases)
- [Changelog](https://github.com/JedWatson/classnames/blob/main/HISTORY.md)
- [Commits](https://github.com/JedWatson/classnames/compare/v2.3.1...v2.3.2)

---
updated-dependencies:
- dependency-name: classnames
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-10 12:58:47 +01:00
Sanne Raymaekers
c982fe7038 test: fix console warnings
- fix proptype of RegionsSelect
- wrap state-changing events in act
2022-11-09 15:29:50 +01:00
Sanne Raymaekers
b4b9b0e15b CreateImageWizard: allow /boot fs customization 2022-11-09 14:52:00 +01:00
lucasgarfield
c49d96871a Tests: Add tests for ImagesTable, ClonesTable, and new ShareImageModal 2022-11-08 11:29:31 +01:00
lucasgarfield
a42a6a220f ShareImageModal: Add ShareImageModal to clone (share) AWS composes 2022-11-08 11:29:31 +01:00
lucasgarfield
5c37e3b45b Images Table: Add clones table for AWS composes 2022-11-08 11:29:31 +01:00
lucasgarfield
ed9325615c Wizard: Display default region 2022-11-08 11:29:31 +01:00
lucasgarfield
1541818326 Constants: Add constants for AWS regions 2022-11-08 11:29:31 +01:00
lucasgarfield
c4b59374f2 Redux: Add clones slice
This commit updates the Redux store so that the new clone API end points
can be used. The composes slice is updated - composes now have a clones
property - and a clones slice is added.

Selectors are added as well. Although not used in this commit, the
selectors will allow us to significantly simplify our React components
that need to retreive data from the store.

We now must work with both `composes` and `clones`. `Composes` and `clones`
have slightly different schema in the Redux store because of differences
in their API responses (the store schema generally mirrors the API
response schema). Selectors are defined for `images` that work for
both `composes` and `clones`.

Using selectors allows our React components to interact with the Redux store
as if it were a database - components can simply query the store by id
using a selector. This hugely simplifies our React components - they no
longer need to accept multiple props related to a `compose` (or `clone`
or `image`). They can simply take a `composeId` (or `cloneId` or
`imageId`) prop and use an appropriate selector to obtain the necessary
information.

Selectors also encapsulate the store schema. Components no longer need to know
about the store schema to get information about an image - they simply
use a selector and in return receive a normalized (and flat) object.
This means that in the future we could easily migrate the API and slices
to RTK Query without the need to modify any of our React components.
2022-11-08 11:29:31 +01:00
lucasgarfield
4ef578ba7f API: Add clone endpoints to API 2022-11-08 11:29:31 +01:00
regexowl
6d789da727 Wizard: Update Review step
Fixes #774. This matches the Review step with the updated mocks as per SPUR.

The changes are following:
1. Target environment tab:
	- value of AWS `Account ID` aligned with GCP and Azure values
2. Registration tab:
	- `Subscription` changed to `Registration type`
	- `Organization ID` removed, will be added in a different place so it's clearer it's associated with an activation key
3. System configuration:
	- updated column name `Type` to `File system type` in partitions popover
	- updated the width of the column to accommodate the change
	- unified line spacing of `Image size` with the other rows
	- changes `Packages` to `Additional packages`
2022-11-07 16:36:50 +01:00
regexowl
9c4c24746f ImagesTable: Fix Recreate image button
This removes an extra `/` from the path for the `navigate` function to be able to resolve relative path correctly.
2022-11-07 12:40:12 +01:00
Sanne Raymaekers
06d47e5428 CreateImageWizard: fix typo in aws step 2022-11-07 12:26:08 +01:00
regexowl
f32f65c9fb ImagesTable: Remove the icon from the download link
Fixes #803. This removes the download icon and adds brackets around the file extension.
2022-11-03 13:53:56 +01:00
dependabot[bot]
bd76ff4aba build(deps): bump redux from 4.1.2 to 4.2.0
Bumps [redux](https://github.com/reduxjs/redux) from 4.1.2 to 4.2.0.
- [Release notes](https://github.com/reduxjs/redux/releases)
- [Changelog](https://github.com/reduxjs/redux/blob/master/CHANGELOG.md)
- [Commits](https://github.com/reduxjs/redux/compare/v4.1.2...v4.2.0)

---
updated-dependencies:
- dependency-name: redux
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-03 13:43:14 +01:00
dependabot[bot]
9abfd1c4c9 build(deps): bump react-redux from 8.0.2 to 8.0.4
Bumps [react-redux](https://github.com/reduxjs/react-redux) from 8.0.2 to 8.0.4.
- [Release notes](https://github.com/reduxjs/react-redux/releases)
- [Changelog](https://github.com/reduxjs/react-redux/blob/master/CHANGELOG.md)
- [Commits](https://github.com/reduxjs/react-redux/compare/v8.0.2...v8.0.4)

---
updated-dependencies:
- dependency-name: react-redux
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-03 13:31:18 +01:00
jkozol
414dff3ed7 api: use content-sources api for package search on stage beta
The Content Sources service can now be used for handling package info and
search. The api call to this service requires a list of repo urls. The
`repos.json` file tracks the supported repositories for each distro.
This is then mapped into a url array for whichever distro we are
searching for packages. The response body is similar to what existed in
image-builder but the key `package_name` needs to be mapped to just
`name`. Also, there is no pagination in Content Sources for `/rpms/names`
so we can currently only fetch a limit of 20 packages.
2022-11-02 17:32:51 +01:00
dependabot[bot]
a96c2df867 build(deps-dev): bump eslint-plugin-testing-library from 5.1.0 to 5.9.1
Bumps [eslint-plugin-testing-library](https://github.com/testing-library/eslint-plugin-testing-library) from 5.1.0 to 5.9.1.
- [Release notes](https://github.com/testing-library/eslint-plugin-testing-library/releases)
- [Changelog](https://github.com/testing-library/eslint-plugin-testing-library/blob/main/.releaserc.json)
- [Commits](https://github.com/testing-library/eslint-plugin-testing-library/compare/v5.1.0...v5.9.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-02 14:16:12 +01:00
Sanne Raymaekers
881a6d0e0c package.json: add history as a dependency
It used to get pulled in by react-router-dom<=6.3.0, but from 6.4
onwards it no longer is.
2022-10-26 15:50:26 +02:00
dependabot[bot]
14448046f0 build(deps): bump react-router-dom from 6.3.0 to 6.4.2
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.3.0 to 6.4.2.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/react-router-dom@6.4.2/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.4.2/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>
2022-10-26 15:50:26 +02:00
Gianluca Zuccarelli
53df8eb549 CreateImageWizard: fix tile hover issue
Fix #777: there was an issue with hovering
over tiles in the create image wizard due
to a deprecated css variable. This commit
resolves the issue
2022-10-25 18:12:31 +02:00
Thomas Lavocat
affd7ccbca wizard: adding a popover for the activation key
This commit addresses the first part of the issue #774.
2022-10-25 18:07:03 +02:00
Simon de Vlieger
35afba1bf2 imagestable: request.json link now non-styled
By adding custom CSS For the `ib-subdued-link` class the link now looks
like normal text. This approach was chosen as other approaches such as
clicking a non-rendered link cause serious ruckus in the test suite.

This resolves: #805.
2022-10-25 18:00:40 +02:00
Simon de Vlieger
87b853fc13 imagestable: removed label from release 2022-10-25 17:55:53 +02:00
Ondrej Ezr
f3d44adf01 Hide launch button until image is built
Move the conditional render on the main ImageLink component.
Also use destruct for props to streamline the usage of props.
2022-10-24 13:37:45 +02:00
regexowl
9c92da8bb3 Wizard: Update image output step links from RHEL 8 to RHEL 9
Fixes #776. This updates Documentation links on Image output step from RHEL 8 docs URLs to RHEL 9 docs URLs.
2022-10-21 14:04:41 +02:00
regexowl
5168b80eeb ImagesTable: Indicate expiration of aws.s3 targets
This adds indication of expiring presigned urls for aws.s3 targets. Previously the targets remained marked as `Ready` until the builds disappeared after 14 days.

When an image is ready, the countdown in hours is shown in `Status` column. After that the image is marked as `Expired` and the download link changes to `Recreate image`.
2022-10-20 11:08:47 +02:00
Jakub Rusz
5cbe45d95a Frontend container migration
Adding necessary scripts for migrating our frontend component to
container.
2022-10-18 17:12:09 +02:00
dependabot[bot]
28da80af49 build(deps): bump redux-promise-middleware from 6.1.2 to 6.1.3
Bumps [redux-promise-middleware](https://github.com/pburtchaell/redux-promise-middleware) from 6.1.2 to 6.1.3.
- [Release notes](https://github.com/pburtchaell/redux-promise-middleware/releases)
- [Commits](https://github.com/pburtchaell/redux-promise-middleware/compare/6.1.2...6.1.3)

---
updated-dependencies:
- dependency-name: redux-promise-middleware
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-18 11:33:50 +02:00