Commit graph

957 commits

Author SHA1 Message Date
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
Ondrej Ezr
357401ecfa Add the provisioning Button 2022-10-18 10:37:29 +02:00
Sanne Raymaekers
03421acc74 src/Router: use release as a basename in BrowserRouter
The insights platform is moving to react router v6, meaning router
contexts can no longer be nested. As a result all applications will end
up sharing the same `BrowserRouter`.

Switch to using the release (`/` or `/beta/`) as a basename for the
BrowserRouter, and offload the full path (`/insights/$appname`) to the
individual routes. This makes it easier to drop the BrowserRouter in
image builder for the platform one in future.
2022-10-17 15:53:21 +02:00
Sanne Raymaekers
4c1a6c223d App: explicitly pass the store to the NotificationsPortal
Because of mismatched redux versions between NotificationPortal and our
app, the former couldn't automatically discover the store.

Also drop reregister of notificationsReducer, we already register it in
store.
2022-10-06 11:56:25 +02:00
dependabot[bot]
b9553b0ee3 build(deps-dev): bump @testing-library/dom from 8.13.0 to 8.18.1
Bumps [@testing-library/dom](https://github.com/testing-library/dom-testing-library) from 8.13.0 to 8.18.1.
- [Release notes](https://github.com/testing-library/dom-testing-library/releases)
- [Changelog](https://github.com/testing-library/dom-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/dom-testing-library/compare/v8.13.0...v8.18.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-05 19:02:56 +02:00
dependabot[bot]
c258310aed build(deps-dev): bump jest-canvas-mock from 2.3.1 to 2.4.0
Bumps [jest-canvas-mock](https://github.com/hustcc/jest-canvas-mock) from 2.3.1 to 2.4.0.
- [Release notes](https://github.com/hustcc/jest-canvas-mock/releases)
- [Changelog](https://github.com/hustcc/jest-canvas-mock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hustcc/jest-canvas-mock/commits/v2.4.0)

---
updated-dependencies:
- dependency-name: jest-canvas-mock
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-05 17:03:09 +02:00
dependabot[bot]
96d7f419c0 build(deps): bump @redhat-cloud-services/frontend-components-notifications
Bumps [@redhat-cloud-services/frontend-components-notifications](https://github.com/RedHatInsights/frontend-components) from 3.2.7 to 3.2.11.
- [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-notifications"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-05 15:43:29 +02:00
Chloe Kaubisch
ae69466af4 createimagewizard: clear subscription data
Clear subscription data when centos release is selected.
Fixes #787
2022-10-04 16:31:37 +02:00
lucasgarfield
a17a759d5e Redux: Modernize Redux store
This commit modernizes the Redux store to bring it in line with the
current recommended best practices/patterns. It is possible because of a
recent previous commit that added Redux Toolkit as a dependency.

For detailed information on what modern Redux entails, see the Redux docs:
https://redux.js.org/introduction/getting-started#learn-modern-redux-livestream

Practically speaking, this means a huge reduction in boilerplate code.
Maintaining and extending the code will be much easier. All Redux logic
is now encapsulated by 'slices'. Reducers are defined in the slices, and
action creators and action types are generated automatically.

Redux Toolkit includes Immer, which greatly simplifies writing reducer logic
much simpler - state updates in Redux must be immutable, but working
with Javascript objects in an immutable fashion is clumsy, requiring
gratuitious use of the spread ... operator. With Immer, the state can be
updated as if mutable updates were allowed. Reducer logic has been
changed to take advantage of this in this commit.

This commit also removes a large amount of unused code. Fingers crossed
that nothing breaks. The tests do pass, afterall...

One other minor change... composesGet was renamed to fetchComposes and
composeGetStatus was renamed to fetchComposeStatus. This is in line with
the Redux documentation examples.
2022-09-30 13:17:09 +02:00
Sanne Raymaekers
1276b4ae9c test/ImagesTable: use redux store and mocked api
Instead of supplying the composes directly in the store, let the
component call the api.
2022-09-26 14:04:01 +02:00
regexowl
03ff9fd3d9 ImagesTable: Increase bottom margin of the pagination toolbar
Fixes #797. This increases the size of the margin at the bottom of the table of images. That way the pagination controls are not obscured by the notifications icon.
2022-09-23 18:16:20 +02:00
lucasgarfield
2cac343b2f Wizard: Add test for file system configuration buttons
This commit adds a test that checks the new behavior of the file system
configuration buttons by adding duplicate mount points and verifying
that errors do not appear until the next button is clicked.
2022-09-23 18:11:35 +02:00
regexowl
69c29e4336 Wizard: Update tests
Related to #778. This replaces `verifyButtons()` function with `getBackButton()`, `getNextButton()` and `getCancelButton()`.

The functions run `getByRole` query before a button is clicked allowing detection and use of custom buttons.

Test `Click through all steps › with valid values` was updated to reflect changes in functionality of the `File system configuration` step.
2022-09-23 18:11:35 +02:00
lucasgarfield
de4e9bea07 Wizard: Improve file system configuration error messaging
This commit improves the file system configuration step's error handling
by performing validation only when the next button is clicked. This
allows an invalid state to temporarily exist while the user is modifying
the mountpoints without bothersome error messages needlessly appearing.

Broadly speaking there were two options for the implementation: (1)
delay the validation, performing validation only upon clicking the next
button -or- (2) perform validation immediately as normal but hide error
messages until the next button is clicked. Option (1) proved to be
untenable - Data Driven Forms does provide `pauseValidation()` and
`resumeValidation()` functions from React Final Form which theoretically
would make this option possible... However, we need to call
`resumeValidation()` in the next button's click handler and then
immediately make a decision based on the validation results either to
remain on the step and display the errors or move to the next step.
When we tried implmenting this we found that `resumeValidation()` does
not immediately peform validation - validation only resumes after
exiting the handler. Therefore, this approach was not considered and
option (2) was used.

In order to gain control over the behavior of the next button, custom
buttons are implemented for this step. Sharing state between the custom
buttons and the form was a challenge. With pure React it would have been
as simple as moving the relevant state to the parent component, but that
was not possible due to Data Driven Forms. Instead, state is shared
using the form state. A new property,
`'file-system-config-show-errors'`, in the form state is used to
determine whether or not error messages should be displayed.

In order to cause a re-render upon a change in
`'file-system-config-show-errors'`, the file system configuration
component is wrapped in a `<FormSpy>` component.
2022-09-23 18:11:35 +02:00
Sanne Raymaekers
e868ffcaa6 ImagesTable: Reset polling each time the composes are updated
Previously the polling was started once on mount, but the reference to
the list of composes the polling function had didn't get updated. Reset
the polling on each render, ensuring the polling function has the latest
the list of composes from the store.

Fixes #767
2022-09-21 23:09:56 +02:00
regexowl
45d0db3f04 ImagesTable: Increase font size of text in Status column
Fixes #808. This removes the `<small>` tag around status message to unify the font size within the table.
2022-09-20 14:50:10 +02:00
regexowl
a3afc562c8 Wizard: Update tests
Related to #773. This updates tests to reflect changes in the description of the Packages step.
2022-09-19 16:19:30 +02:00
regexowl
af062a5945 Wizard: Update description on the Packages step
Fixes #773. This changes description of the Packages step according to recent SPUR.
2022-09-19 16:19:30 +02:00
Sanne Raymaekers
b86a9b712d CreateImageWizard: Drop isBeta() check for centos
The accompanying text allows us to enable this for non-beta.
2022-09-14 14:19:35 +02:00
dependabot[bot]
fa7105c38b build(deps): bump @patternfly/patternfly from 4.185.1 to 4.210.2
Bumps [@patternfly/patternfly](https://github.com/patternfly/patternfly) from 4.185.1 to 4.210.2.
- [Release notes](https://github.com/patternfly/patternfly/releases)
- [Changelog](https://github.com/patternfly/patternfly/blob/main/RELEASE-NOTES.md)
- [Commits](https://github.com/patternfly/patternfly/compare/prerelease-v4.185.1...prerelease-v4.210.2)

---
updated-dependencies:
- dependency-name: "@patternfly/patternfly"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-14 13:37:06 +02:00
regexowl
0bced556a9 ESLint: Use --fix with new rules to order import declarations
Related to #795. This applies the new sorting rules in ESLint to the files by running `npm run lint:js:fix`
2022-09-14 13:24:38 +02:00
regexowl
c6902ab347 ESLint: Set rules for import order
Fixes #795. This commit adds rules to `.eslintrc.yml` which enforce sorting of the import declarations.

Added plugin `eslint-plugin-import` allows to sort the import declarations based on their types (builtin, external, internal, etc.) and rule `sort-imports` then sorts the declarations inside these groups alphabetically.
2022-09-14 13:24:38 +02:00
regexowl
05e678f8c1 ImagesTable: Add pagination to the bottom of the table
Fixes #594. This adds pagination to the bottom of the images list so the user doesn't have to scroll up to use it.

Tests were also updated to reflect the change.
2022-09-14 10:32:38 +02:00
dependabot[bot]
aa2adb4569 build(deps-dev): bump sass-loader from 12.6.0 to 13.0.2
Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 12.6.0 to 13.0.2.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v12.6.0...v13.0.2)

---
updated-dependencies:
- dependency-name: sass-loader
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-12 11:09:46 +02:00
dependabot[bot]
2e0ea789e6 build(deps-dev): bump eslint from 8.13.0 to 8.23.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.13.0 to 8.23.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.13.0...v8.23.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-12 10:59:46 +02:00
dependabot[bot]
25789060d7 build(deps-dev): bump @babel/core from 7.18.6 to 7.19.0
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.18.6 to 7.19.0.
- [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.19.0/packages/babel-core)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-06 11:09:46 +02:00
lucasgarfield
a977f4b72b Redux: Add Redux Toolkit
This commit adds Redux Toolkit as a dependency. Adding Redux Toolkit is
beneficial because it will allow us to use the current best-practice Redux
development patterns and tools as well as reduce the number of
dependencies. Redux Toolkit is backwards compatible with existing Redux code,
and therefore works with all of the current actions and reducers.

The store is now created using Redux Toolkit's configureStore(). Previously, a
custom store creator developed by Red Hat Insights was used. However,
this is actually not required for Insights apps, and creating the store using
configureStore() is necessary to take advantage of Redux Toolkit. For
instance, the store can now be inspected using the Redux devtools in the
browser.

This commit removes the redux-logger middleware. It is no longer
necessary, as the Redux development tools can now be used to easily inspect and
reason about the redux store and its state.

The Thunk middleware dependency has also been removed, as Thunks are already
included in Redux Toolkit.

The redux-promise-middleware dependency has been left in place for now,
but its functionality is also available in Redux Toolkit and it may be
considered for removal in the future.

Using Redux Toolkit will also allow us to move to the `Slice` pattern when
defining actions/reducers in the future if we wish. This will make
writing, reasoning about, and debugging the code related to the Redux
store much easier.
2022-09-06 11:01:25 +02:00
lucasgarfield
1d6a92a7f9 Wizard: CentOS acknowledgement text updated for production 2022-09-02 17:01:12 +02:00
Jakub Rusz
4ec5c97758 Add Schutzbot and Sonarqube
This adds the ability to use our Schutzbot Gitlab CI and run Sonarqube
scan there. We have pretty much the exact same thing in weldr-client
repo and use it only for Sonarqube. This could also be used in the
future if there is any need to use our own CI.

The added scan is just informative and is by no means supposed to be
used to gate PRs, there will be just one more link to
check the results in case anyone is interested.
2022-09-02 16:09:12 +02:00
regexowl
c9c75da7ba Wizard: Fix UI issues for Microsoft Azure Target environment
Fixes #772. This updates description of the step according to recent SPUR.
The `Authorizing an Azure account` expandable was removed (both from the step and `ImageCreator.js`) as well as `Destination` heading. Size of the Oauth 2.0 link was changed from small to default.
2022-09-02 10:37:08 +02:00
regexowl
2520b99ad1 Wizard: Match the case of System configuration with other step titles
Fixes #768. This matches System configuration case with the case of the other step titles as per recent SPUR.
2022-08-25 15:57:55 +02:00
regexowl
dfbabc1f47 Wizard: Add clarification to AWS and GCP environment steps
Fixes #770. This clarifies that the user is responsible for copying the AWS/GCP image to their account before the image expires.
2022-08-25 10:20:04 +02:00