Commit graph

1203 commits

Author SHA1 Message Date
Thomas Lavocat
108f0bc017 openapi: update image builder yaml to latest@main
Update the yaml openapi representation from the latest version on image
builder's repo commit 0ebf2401589b8f8d88d37aebbef17c009160bc7f
2023-08-30 15:14:19 +02:00
Thomas Lavocat
45b717bc27 openapi: import from yaml instead of JSON
Use the yaml representation of the openapi used in Image Builder to load
generate the RTKQ code.
2023-08-30 15:14:19 +02:00
dependabot[bot]
d85b02daa8 build(deps-dev): bump postcss-scss from 4.0.6 to 4.0.7
Bumps [postcss-scss](https://github.com/postcss/postcss-scss) from 4.0.6 to 4.0.7.
- [Changelog](https://github.com/postcss/postcss-scss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss-scss/compare/4.0.6...4.0.7)

---
updated-dependencies:
- dependency-name: postcss-scss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 09:12:38 +02:00
Sanne Raymaekers
93c1f43544 CreateImageWizard: add WSL image type in preview 2023-08-29 13:37:56 +02:00
regexowl
ab1b60ee99 feat(HMS-1491): Fix capitalization on the Register step
This fixes the capitalization on the Review step from "Automatically Register your systems" to "Automatically register your systems".
2023-08-29 12:55:49 +02:00
regexowl
90a012d49b HMS-1492: Change rhc to non-capitalized
Fixes HMS-1492

This changes all occurences of "rhc" and "remote host configuration" from capitalized to lowercase.
In cases where the sentence started with "rhc" this was changed to "remote host configuration" to avoid
starting the sentence with "Rhc".
2023-08-29 12:36:38 +02:00
dependabot[bot]
d67aed929c build(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.2.1 to 6.4.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.4.1/packages/eslint-plugin)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-25 08:21:11 +02:00
Ondrej Ezr
8b796ef431 Switch to Content Sources search
Enable searching for RH packages through Content Sources service.
Gates the search by Content Sources feature flag, to keep the easy kill switch.
2023-08-24 14:41:16 +02:00
dependabot[bot]
b7d2a1522f build(deps-dev): bump jest-environment-jsdom from 29.6.2 to 29.6.3
Bumps [jest-environment-jsdom](https://github.com/jestjs/jest/tree/HEAD/packages/jest-environment-jsdom) from 29.6.2 to 29.6.3.
- [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.6.3/packages/jest-environment-jsdom)

---
updated-dependencies:
- dependency-name: jest-environment-jsdom
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-24 08:59:55 +02:00
regexowl
8cb2fc1936 LandingPage: Update Quickstarts expandable
This removes the second line of text in the Quickstarts expandable and changes heading of the expandable section based on the environment.
2023-08-23 17:46:29 +02:00
mgold1234
52966fc729 Wizard: update popup with repositories name on Review step
fixes https://github.com/RedHatInsights/image-builder-frontend/issues/1305
This commit update popup of custom repositories with name of repository instead
of url of repository
2023-08-23 16:13:01 +02:00
lucasgarfield
a5aad6935f ImagesTable: Update RegionsPopover to prepare for Launch/Provisioning GA
Previously, the Launch/Provisioning wizard was only available in
preview. If an AWS or Azure image was created in preview and shared with
a source, and then viewed in the images table in stable, a popover over
the stable launch link would inform the user that the image had been
created in preview and provide a link to go to preview.

Now that launch/provisioning is going GA and the launch wizard is
available in stable, this feature is no longer necessary.
2023-08-23 15:59:32 +02:00
Ondrej Ezr
b486f44dcb Custom Repositories gate by Feature flag 2023-08-23 15:38:25 +02:00
regexowl
77ff00d107 lint: Fix the "Expected a default case" warning
This fixes the "Expected a default case" warning
2023-08-23 14:54:23 +02:00
regexowl
b3767e0503 lint: Fix "missing alt for images" warning
This fixes the "img elements must have an alt prop, either with meaningful text, or an empty string for decorative images" warning.
2023-08-23 14:54:23 +02:00
regexowl
a9dc4f4a14 lint: Fix "assign before exporting" warnings
This fixes all instances which caused the following lint warning: "Assign object/arrow function to a variable before exporting as module default"
2023-08-23 14:54:23 +02:00
dependabot[bot]
7324e647a4 build(deps-dev): bump sass from 1.64.2 to 1.66.1
Bumps [sass](https://github.com/sass/dart-sass) from 1.64.2 to 1.66.1.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.64.2...1.66.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-23 13:01:18 +02:00
Ondrej Ezr
1cd3f397e6 Remove the Preview banner 2023-08-23 09:39:18 +02:00
Ondrej Ezr
2a8e5a10df Launch button in stable environments
This moves Beta only features to stable environment:
- Sharing Images through Sources
- Launch button

This tries to avoid any refactoring, just moving components from Beta to stable with minimal changes.
2023-08-23 09:27:25 +02:00
dependabot[bot]
e5575d7a2d build(deps-dev): bump @babel/core from 7.22.9 to 7.22.10
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.9 to 7.22.10.
- [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.22.10/packages/babel-core)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-22 09:56:37 +02:00
dependabot[bot]
58d836db77 build(deps-dev): bump eslint-plugin-import from 2.27.5 to 2.28.1
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.27.5 to 2.28.1.
- [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.27.5...v2.28.1)

---
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-08-21 10:29:59 +02:00
Sanne Raymaekers
042af03052 CreateImageWizard: don't allow arbitrary mountpoints under /boot 2023-08-21 09:02:14 +02:00
lucasgarfield
29704a0725 eslint/hooks: obey rules of hooks
See https://legacy.reactjs.org/docs/hooks-rules.html.
2023-08-17 17:18:55 +02:00
Thomas Lavocat
8ab31edbe9 eslint/expect: uneffective tests
Correct the tests that were not testing the result. And set the values
to a functioning one.
2023-08-17 17:18:55 +02:00
Thomas Lavocat
3b8afeaf7d eslint/excpect: should not be called conditionally
This commit fixes the error but not really the pattern. We should
consider refactoring the tests following these guidelines:
https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-conditional-expect.md
2023-08-17 17:18:55 +02:00
Thomas Lavocat
a1834ed76e eslint: unused-expression
A ternary operator means that something's going to be assigned to
something, and I think the interpretor might or might not have had
executed that ternary operator before this fix 🤷. Anyway,
rewritten as a if, it's the same as before, except that this time we
know it'll be executed.
2023-08-17 17:18:55 +02:00
Thomas Lavocat
89437c5e23 eslint: no conditional use calls
Move the calls of the use function outside conditions so that their
calling is consistent no matter what happens.
2023-08-17 17:18:55 +02:00
Thomas Lavocat
bf7f22413b eslintrc: identation
Correct indentation for the yml content.
2023-08-17 17:18:55 +02:00
Thomas Lavocat
a91ca3f9d0 eslint: configure eslint for react app
Add additional linting information and help on react components and
hooks. See https://www.npmjs.com/package/eslint-config-react-app
https://react.dev/learn/editor-setup#linting

Also, cleans duplicated between eslintrc and eslintrc-typescript.
2023-08-17 17:18:55 +02:00
Thomas Lavocat
178791f2ad router: lazy loading needs a suspense tag
According to the React documentation[0], a suspense tag is needed to
encapsulate a lazy loaded component. Some bad behavior have been fix in
the UI thanks to that tag (i.e notification popup unclosable after
wizard creation).

[0] https://react.dev/reference/react/lazy#suspense-for-code-splitting
2023-08-17 15:37:21 +02:00
Jakub Rusz
d66b013f5b pr_check: update to enable testing with MR image
We can now test using a test container built in a downstream MR.
2023-08-16 14:49:50 +02:00
lucasgarfield
0de68305c1 Wizard: Update registration step activation key link URL
Fixes HMS-2322: On the Register step of the image build wizard, the link
to "Create and manage activation keys here" should point to
https://console.redhat.com/insights/connector/activation-keys.
2023-08-16 14:31:52 +02:00
regexowl
8fbad0d99b test/fixtures: Migrate some fixtures to TypeScript
This migrates following fixtures to TypeScript:
- architectures
- customizations
- sources

Typing and explicit returns were added.

The extensions of `composes` and `packages` fixtures were also updated from .tsx to .ts
2023-08-16 13:39:16 +02:00
Amir Fefer
9fd260cfea feat(HMS-1909): enable a custom host in LOCAL_API env var 2023-08-16 13:27:21 +02:00
aabramov
d8e47de0c5 Add GCP quickstart 2023-08-16 10:07:02 +02:00
Ondrej Ezr
847ba2371d Prepare for Provisioning list endpoint nesting 2023-08-11 09:34:14 +02:00
regexowl
fffdb27b70 test/fixtures: Migrate repositories fixture to TypeScript
This migrates repositories fixture to TypeScript.
2023-08-10 13:46:20 +02:00
regexowl
cdce271306 Wizard: Migrate ActivationKeyInformation to TypeScript
This migrates the ActivationKeyInformation component to TypeScript
2023-08-10 12:56:46 +02:00
regexowl
ac70712f6a test/fixtures: Migrate activationKeys fixture to TypeScript
This migrates the activationKeys fixture to TypeScript.
2023-08-10 12:56:46 +02:00
regexowl
05bc175a71 api/config: Lint API configs
This fixes linting errors in configuration files for API code generation.
2023-08-10 10:20:47 +02:00
Thomas Lavocat
b8c136dccb wizard: avoid a no-op
This removes a warning on a no-op being fired when the wizard changes a
state when the request for creation comes back as a success.
Instead don't update the form state if the wizard is going to be closed
anyway.
2023-08-09 16:03:00 +02:00
Thomas Lavocat
e8380c12b9 jest: fail on error messages
Use the library https://github.com/ValentinH/jest-fail-on-console to
spy on the errors to make test failing if any occur.

Transfer the configuration from the previous FilteredConsole to this new
library.

Allow a few targeted errors to occur to give some time to refactor while
keeping the benefits to have failing on new error messages.
2023-08-09 16:03:00 +02:00
Thomas Lavocat
697d0af4b5 test/wizard/azure: avoid scalprum errors
Avoid having to deal with scalprum errors by not rendering the
LandingPage.
2023-08-09 16:03:00 +02:00
Thomas Lavocat
baefa79bb8 tests/wizard/azure: separate tests
A weird error occurs because when the tests are executing together. To
avoid that, as a temporary measure, separate the last test in a separate
file to ensure insolation from its peers.
2023-08-09 16:03:00 +02:00
Thomas Lavocat
6b1ae7d1d8 test/wizard/beta: avoid scalprum errors
Avoid having to deal with scalprum errors by not rendering the
LandingPage.
2023-08-09 16:03:00 +02:00
Thomas Lavocat
71126b1d26 test/wizard/beta: fix act errors
Brute force approach to fix the act errors in the Wizard tests. It's not
ideal but allows to move on toward activating strict mode on the test
suite ASAP
2023-08-09 16:03:00 +02:00
Thomas Lavocat
62bca76627 test/wizard: avoid scalprum errors
Avoid having to deal with scalprum errors by not rendering the
LandingPage.
2023-08-09 16:03:00 +02:00
Thomas Lavocat
dc3cac8902 jest: bump the timeout
5s is too rapid for a laptop. Bump the timeout to 15s to have a little
room.
2023-08-09 16:03:00 +02:00
Thomas Lavocat
dd54af2c7b test/wizard: fix act errors
Brute force approach to fix the act errors in the Wizard tests. It's not
ideal but allows to move on toward activating strict mode on the test
suite ASAP.
2023-08-09 16:03:00 +02:00
Thomas Lavocat
2b051823bf test/ShareImageModal: use act when accessing the UI
Errors were fired upon while testing the ShareImageModal because some
clicks on the UI were not encapsulated in an act block. This is now
patched up.
2023-08-09 16:03:00 +02:00