Commit graph

3013 commits

Author SHA1 Message Date
Ondřej Budai
11d36f4d6c Wizard: show a specific error message when description validation fails
Prior to this commit, the wizard showed "Invalid description" when
the description was too long. This was rather unhelpful for users.

The actual size check happens in validators.ts, but the functions there
just return a boolean value, even if they check for multiple criteria.

I'm not entirely sure, why the validation functions live in a separate
file, so I decided to move this specific condition to useValidation.tsx
so the condition, and the relevant user-facing error message can be
defined next to each other.
2025-04-02 09:50:44 +02:00
dependabot[bot]
f90b3974c4 build(deps): bump @scalprum/react-core from 0.9.4 to 0.9.5
Bumps [@scalprum/react-core](https://github.com/scalprum/scaffloding) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/scalprum/scaffloding/releases)
- [Changelog](https://github.com/scalprum/scaffolding/blob/main/release.config.js)
- [Commits](https://github.com/scalprum/scaffloding/compare/@scalprum/react-core-0.9.4...@scalprum/react-core-0.9.5)

---
updated-dependencies:
- dependency-name: "@scalprum/react-core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-02 09:00:50 +02:00
rjagadal
2936e87243 Fix: Ensure wizard footer remains visible in repo step
Adjust wizard layout to limit scrolling

Fix: Improve button positioning and scrolling behavior in the repo step

Adjust footer layout and flex changes for wizard content

Fix: Removed outdated comments for code consistency
2025-04-01 11:46:17 +02:00
regexowl
25368675bc Wizard: Make Select responsive 2025-04-01 11:07:38 +02:00
regexowl
b767c3bfde Wizard: Replace deprecated select in AwsSourcesSelect
This replaces a deprecated select in `AwsSourcesSelect` for a non-deprecated one.
2025-04-01 11:07:38 +02:00
dependabot[bot]
0f230c18d9 build(deps): bump vite from 5.4.14 to 6.2.4
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.14 to 6.2.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.4/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.2.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-01 10:35:52 +02:00
dependabot[bot]
92288f74f3 build(deps-dev): bump @typescript-eslint/parser from 8.28.0 to 8.29.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.28.0 to 8.29.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/v8.29.0/packages/parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-01 10:09:08 +02:00
dependabot[bot]
6ae2a621ce build(deps-dev): bump chart.js from 4.4.7 to 4.4.8
Bumps [chart.js](https://github.com/chartjs/Chart.js) from 4.4.7 to 4.4.8.
- [Release notes](https://github.com/chartjs/Chart.js/releases)
- [Commits](https://github.com/chartjs/Chart.js/compare/v4.4.7...v4.4.8)

---
updated-dependencies:
- dependency-name: chart.js
  dependency-version: 4.4.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-01 09:42:58 +02:00
Ondrej Ezr
dbba5e65f4 ci: add required SAST tasks to Konflux pipelintes 2025-04-01 09:18:05 +02:00
regexowl
39a0a6f6a2 test: Add new tests to check user group functionality
This adds two tests:
- 'user groups can be added and removed'
- 'adding wheel group checks Administrator checkbox'
2025-03-31 19:46:52 -05:00
regexowl
7a225e4146 Wizard: Add group input to User step
This adds a group input to the User step. The input is implemented as a `LabelInput`, when Administrator checkbox is checked, `wheel` group gets added and it's removal automatically unchecks the Administrator checkbox again.
2025-03-31 19:46:52 -05:00
regexowl
47b5eb8392 Wizard: Turn required category name into LabelInput prop
This swaps hardcoded value of the required `categoryName` in `LabelInput` for a prop, allowing to customize text for the reuired category independently on the component.
2025-03-31 19:46:52 -05:00
Gianluca Zuccarelli
e5a513a4cb CreateImageWizard: refactor oscap availability
Refactor the OpenSCAP on-premise availability check. Add the check to
the component so we run the check everytime the step is loaded. The
benefits to this is that if the user installs the packages, they won't
need to reload the page to use the OpenSCAP step. The downside is that
the check is not very quick, so a spinner was added just to indicate
that the check is running.
2025-03-31 18:02:11 -05:00
Gianluca Zuccarelli
20447f753a CreateImageWizard: on-prem prefetch
The openscap customizatoins endpoint for on-prem is quite slow since it
has to call the run the oscap tool to generate the customization
options. Running this request lazily, as we do for the service, is too
slow, so we can just prefetch the customizations for on-prem.
2025-03-31 18:02:11 -05:00
Gianluca Zuccarelli
18c329be2a CreateImageWizard: oscap options add spinner
The select `loadingVariant` seems to do nothing. Add a loader for when the
oscap profiles are being loaded.
2025-03-31 18:02:11 -05:00
Gianluca Zuccarelli
c38e821ae5 CreateImageWizard: warning for unavailable on-prem OpenSCAP
Add a warning if the required packages for the OpenSCAP step are not available.
2025-03-31 18:02:11 -05:00
Gianluca Zuccarelli
9d883a8dfc CreateImageWizard: enable OpenSCAP for on-prem
SSIA
2025-03-31 18:02:11 -05:00
Gianluca Zuccarelli
c7cd9e8de3 store/cockpitApi: query for oscap customizations
Use the oscap & scap-security guide packages on the host to get the
customizations for an OpenSCAP profile item.
2025-03-31 18:02:11 -05:00
Gianluca Zuccarelli
12a2649198 CreateImageWizard: unleash flag for oscap profile
Switch the hook used to get the flags for the OpenSCAPProfileInformation
component.
2025-03-31 18:02:11 -05:00
Gianluca Zuccarelli
7ce8695fdf store/cockpitApi: add oscap profiles implementation
Add the logic needed to query the host for the allowed OpenSCAP
profiles.
2025-03-31 18:02:11 -05:00
Michal Gold
978237bf84 Wizard: Fix blueprint name update on Architecture/Distribution changes
This commit resolves an issue where the blueprint name did not update when the user changed the Architecture or Distribution.
Additionally, it sets an initial value for blueprintName in the WizardSlice.
2025-03-31 16:10:05 -05:00
regexowl
b2255de04e Wizard: Make Selects responsive 2025-03-31 14:22:31 -05:00
regexowl
52398547f8 Wizard: Move ouiaId from Select component to MenuToggle
This moves the `ouiaId` since it didn't get correctly assigned while in `Select`. It's readable under the `MenuToggle`.
2025-03-31 14:22:31 -05:00
regexowl
53625ed190 Wizard: Remove deprecated select for HyperV Generation
This swaps deprecated HyperV Generation select for a non deprecated one.
2025-03-31 14:22:31 -05:00
regexowl
c4dae746e7 Wizard: Replace deprecated Dropdown in BulkSelect
This updates deprecated Dropdown in `BulkSelect`.
2025-03-31 14:22:31 -05:00
regexowl
54983cddf9 Wizard: Swap release select
This replaces deprecated PF4 select with non-deprecated PF5 one.
2025-03-31 14:22:31 -05:00
regexowl
dcd1bb6fc9 Wizard: Swap FSC selects for non-deprecated version
This swaps deprecated PF4 Selects on FSC step for non-deprecated PF5 ones.
2025-03-31 14:22:31 -05:00
regexowl
2127476f98 Wizard: Swap arch select
This replaces deprecated PF4 select with non-deprecated PF5 one.
2025-03-31 14:22:31 -05:00
regexowl
019faf0ff9 Wizard: Remove if (!value) check from validators
This removes check for whether the value is defined from validators and moves it to the place the validator is called where needed.
2025-03-31 12:53:42 -05:00
regexowl
d68e5f77b0 store: Safeguard splicing
This adds a check for existing/non-existing item before splicing an array.
2025-03-31 17:01:06 +02:00
regexowl
5ccc6622d9 Wizard: Remove strength indicator
This completely removes strength indicator as it includes the same information as the second Azure password helper text.
2025-03-31 15:25:38 +02:00
regexowl
b9c12d1bbb devDeps: Manually bump vitest and @vitest/coverage-v8
This bumps:
- vitest from 3.0.5 to 3.0.9
- @vitest/coverage-v8 from 3.0.5 to 3.0.9

The reason for not being able to bump in a dependabot PR is that the dependencies need to bumped together.
2025-03-31 13:26:25 +02:00
dependabot[bot]
6e1de2b406 build(deps-dev): bump sass from 1.85.1 to 1.86.0
Bumps [sass](https://github.com/sass/dart-sass) from 1.85.1 to 1.86.0.
- [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.85.1...1.86.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-31 09:10:15 +02:00
red-hat-konflux[bot]
e678c89a1c chore(deps): update konflux references
Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
2025-03-31 08:45:47 +02:00
regexowl
716c0bf361 fec.config: Exclude pkg directory during build time
After running `make cockpit/devel`, the generated files do not pass `npm run build`, outputing failures and making dev console and output of `npm run build` cluttered with errors.

This excludes `/pkg` folder during build time, removing the errors.
2025-03-28 16:42:47 +01:00
Klara Simickova
aaabed38a0 Revert "tsconfig: Exclude /pkg folder during build"
This reverts commit 18f6bc74de.
2025-03-28 16:13:14 +01:00
regexowl
056d3674d7 Wizard: Rename Empty to EmptyUserState
This renames `Empty` to `EmptyUserState` to make the name more descriptive.
2025-03-28 09:48:49 +01:00
regexowl
b5130e3a42 Wizard: Rename component directory to components
This renames `component` directory to `components` for the sake of consistency.
2025-03-28 09:48:49 +01:00
dependabot[bot]
5de195b54f build(deps-dev): bump @types/node from 22.13.10 to 22.13.14
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.13.10 to 22.13.14.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-28 08:25:25 +01:00
regexowl
18f6bc74de tsconfig: Exclude /pkg folder during build
After running `make cockpit/devel`, the generated files do not pass `npm run build`, outputing failures and making dev console and output of `npm run build` cluttered with errors.

This excludes `/pkg` folder during build time, removing the errors.
2025-03-27 15:40:08 +01:00
regexowl
932ad97be9 codecov: Update config
There were previously errors in expected values, this should fix them.
2025-03-27 13:08:23 +01:00
regexowl
f20378cd67 codecov: Ignore API, PW and store folders
API, PW and  store folders contain mostly files that are copied, auto-generated or test files. We don't need to collect coverage for those.
2025-03-27 13:08:23 +01:00
Tom Koscielniak
781267f16c tests: Streamline hosted Playwright local setup
Streamline the process of setting up Playwright for local development of hosted service tests using dotenv. Add short guide to README as well.
2025-03-27 11:42:05 +01:00
dependabot[bot]
8136e0fb5b 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 8.26.0 to 8.28.0.
- [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/v8.28.0/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>
2025-03-27 09:12:20 +01:00
Michal Gold
02a3673fcc remove unused component 2025-03-26 10:24:42 -05:00
Michal Gold
d448db9a04 Wizard: Refactor Minimum Size input in File system step to use new component
This commit refactors the Minimun size field by replacing HookValidatedInput with the new ValidatedInputAndTextArea component.
It fixes a bug where the error icon remained visible after the user cleared the value in the field.
2025-03-26 10:24:42 -05:00
Katarina Sieklova
17f975e0ef Wizard: race condition with activation key
Fixes #2961

Activation key loads in background even if a user skips to the review step.
The unwrap is there to extract only the actual response data, if the query fails, the exception will be caught in the catch block anyways, so there was no need to keep the whole action object.
And the refetch was being called before the createActivationKey query was initiallized, throwing an error and not letting the async query in try block to finish fetching the activation key.
2025-03-25 11:15:03 +01:00
dependabot[bot]
756e7427d6 build(deps-dev): bump @typescript-eslint/parser from 8.26.1 to 8.28.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.26.1 to 8.28.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/v8.28.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>
2025-03-25 09:19:13 +01:00
dependabot[bot]
859037345f build(deps-dev): bump eslint-plugin-react-hooks from 5.1.0 to 5.2.0
Bumps [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/HEAD/packages/eslint-plugin-react-hooks) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/HEAD/packages/eslint-plugin-react-hooks)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-24 07:56:43 +01:00
Michal Gold
399126909c Wizard: Show "Strong" label only for Azure when password meets criteria
Currently, we only want to display the "Strong" label when the password meets the required strength conditions and only if it is Azure target.
This change ensures that the label remains hidden for non-Azure cases.

Let’s just disable it for now until we can decide on further adjustments.
2025-03-21 15:51:32 +01:00