Commit graph

84 commits

Author SHA1 Message Date
Bryttanie House
0238c04dfe Wizard: add support for content templates 2025-04-25 10:31:43 +02:00
regexowl
a07fbb6477 store: Remove unused selectors
This removes selectors that are no longer used.
2025-04-23 13:42:39 +02:00
regexowl
319880fc0b Wizard: Add password placeholder for edit mode
This uses the `hasPassword` value to render a password placeholder in edit mode.

The placeholder will indicate to the user that a password is present, but will not allow to show the password.
2025-04-23 13:42:39 +02:00
Anna Vítová
b6cdfdb102 Wizard: Add Satellite service and update mapper 2025-04-11 10:18:46 +02:00
Justin Sherrill
38458810a0 change repo snapshot step to repeatable builds 2025-04-03 10:17:37 +02:00
Anna Vítová
a4034e8787 Wizard: add satellite registration, add jwt-decode
The jwt decode dependency helps us to keep track of the token that is
present in the Satellite command. jwt-decode is the most popular
dependency for the job, and very easy to use.
2025-04-03 09:46:41 +02: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
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
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
Sanne Raymaekers
0204bcced5 store/wizardSlice: default to 'register-later' when on-premise 2025-02-05 13:11:14 +01:00
regexowl
1e0cf96457 Wizard: Add inputs for disabled and enabled services
This adds inputs for disabled and enabled systemd services. New tests are also added.
2025-02-04 15:15:49 +01:00
Michal Gold
2c414fb089 Wizard: remove confirmPassword from Mapper
this commit remove confirmPassword from Mapper because we decide that
this field is not relevant anymore to Users step, and it should remove
from the mapper as well
2025-02-04 14:08:54 +01:00
Michal Gold
5f7f958d07 Wizard: Add Administrator field to review step
this commit add administrator field to review step
2025-02-03 12:53:49 +01:00
regexowl
4145157858 Wizard: Add firewall services
This adds firewall services, using the `<ChippingInput>` components. New tests were also added.
2025-01-29 14:48:15 +01:00
Michal Gold
6e36232e1a Wizard: Add remove user button in users step
this adds remove user button and add unit test as well.
2025-01-27 14:30:22 -06:00
regexowl
1b21852518 Wizard: Add kernel append input
This adds the kernel append input. New arguments can be added by pressing the "Add" button or hitting Enter after the argument.

The kernel arguments linked to a selected OpenSCAP profile are rendered in a category marked as "Required by OpenSCAP" and are read only.
2025-01-27 13:21:48 +01:00
Michal Gold
25f124077c wizard: add Administrator checkbox to users step (HMS-4903)
this commit add Administrator checkbox to users step
2025-01-21 13:29:25 +01:00
regexowl
c121e5caba Wizard: Add Kernel name input
This adds a kernel name input.
2025-01-21 08:33:52 +01:00
regexowl
4802d08214 Wizard: Firewall ports input
This adds chipping input for ports on the Firewall step.
2025-01-16 11:23:56 -06:00
Michal Gold
b3a8597b66 Revert "wizard: add confirm password to users step (HMS-4903)"
This reverts commit ba70753a80.
2025-01-08 12:47:05 -06:00
Michal Gold
ba70753a80 wizard: add confirm password to users step (HMS-4903)
this commit add confirm password to users step
2025-01-08 11:10:29 +01:00
Bryttanie House
29736d8d0c Wizard: switch snapshot date in wizard to RFC3339 2025-01-07 14:37:34 +01:00
Anna Vítová
b7b9d2ac24 src: add notification for custom repo imports
Show notification about imported custom repositories
2025-01-07 12:11:25 +01:00
Anna Vítová
e805c65f81 src: add custom repositories import feature
This allows sharing blueprints cross organizations even with custom
repositories.
2025-01-07 12:11:25 +01:00
regexowl
4af4b56332 this commit adds ssh_key to users step 2025-01-06 13:05:41 +01:00
Michal Gold
d0f2317649 wizard: add user information step (HMS-4903)
This commit introduces the user information step with the following fields:
(*) `userName` field
(*) `password` field
(*) add unit tests for create and edit mode
2024-12-20 12:35:15 -06:00
regexowl
5a514d1d04 Wizard: Add Hostname functionality
This adds a validated hostname input and new tests.
2024-12-11 12:59:41 -06:00
regexowl
39f618c3d8 Wizard: Update the way of adding NTP servers
This updates the way NTP servers can be added:
- helper text was removed
- add button (PlusCircle) was added to the input group utilities
- remove input button is now rendered always, but gets disabled when there's no input
- chip group was moved under the input

Also I've noticed that the "clear input" button completely cleared the list of NTP servers which would make me very angry as a user. Fixed it, so now the clear input button only clears the input field and the `clearNtpServers` action was removed as we don't use it anywhere else.
2024-12-06 13:53:56 -06:00
regexowl
ab446c2a36 Wizard: Add timezone structure to store and mapper
This creates structure and actions for the timezone customization in the wizardSlice and requestMapper.
2024-12-06 13:53:56 -06:00
Gianluca Zuccarelli
bad77421ae api: union undefined
Set the option to generate union undefined types for objects that have
optional items. This will allow us to enable `exactOptionalPropertyTypes`
in our tsconfig [1].

[1] This is a recommended setting, see:
https://www.typescriptlang.org/tsconfig/#exactOptionalPropertyTypes
2024-12-06 12:02:34 -06:00
regexowl
e4e83d4417 Wizard: Add locale structure to store and mapper
This creates structure and actions for the locale customization in the wizardSlice and requestMapper.
2024-12-05 11:06:11 -06:00
Sanne Raymaekers
c1378a7913 Wizard: Integrate HyperV selection in Azure target options
This determines the generation the image will get registered as in
Azure. V2 supports UEFI and more instance types than V1.
2024-12-04 12:37:23 +01:00
Anna Vítová
b2401afe27 src: add flag to measure on prem import
The flag can be used later to track the usage of on prem import feature.
2024-11-26 13:03:55 +01:00
regexowl
ba9282b61c src: Resolve circular dependency FileSystemTable <-> FileSystemConfiguration
Nothing got added, nothing got removed. Stuff just got moved around and imports are updated.
2024-10-11 14:55:03 +02:00
regexowl
076fb3fc9d src: Resolve type-only imports 2024-10-11 14:55:03 +02:00
Sanne Raymaekers
110e1d7d75 Wizard: support openscap compliance customisation in state
Merges all the compliance related state into a single compliance object.
2024-09-25 15:26:09 +02:00
Sanne Raymaekers
0897257125 src/store: Remove server store hooks
Removing the server store makes the way we handle data going in and out
of the wizard state more consistent. Each customisation is mapped into
the wizard state and pulled out when generating the blueprint
payload.

When the services and kernel customisations are implemented, this
information will need to be stored inside of the wizard state anyway.

Lastly this will make implementing a compliance step easier for edit
mode, removing the need to write to the wizard state from within the
server store when only a compliance policy id is available (on the
review page), which would be used to fetch the profile ref id, which
would in turn be used to fetch the customisations not stored in the
wizard state.
2024-09-16 11:45:54 +02:00
Anna Vítová
3af0704a2f src: Enable import of image_requests 2024-09-04 17:45:11 +02:00
Anna Vítová
c385417e93 HMS-4459: Use export endpoint 2024-09-04 17:45:11 +02:00
regexowl
e6a35eaf79 Wizard: Rename FileSystemPartitionMode to FileSystemConfigurationType
This renames `FileSystemPartitionMode` to `FileSystemConfigurationType` in preparation to expose raw/lvm partitioning in the UI.
2024-08-13 14:59:23 +03:00
regexowl
4fb37c187e src: Rename "V2" folders to just Wizard
This replaces all occurences of "CreateImageWizardV2" with just "CreateImageWizard" as it is the only version now.
2024-07-17 11:17:06 +02:00
Ondrej Ezr
e0ec56c94d Wizard: fix blueprint unique name validation in Edit mode 2024-07-16 12:27:42 +02:00
Ondrej Ezr
4692eae454 Wizard: validate wizard with Redux Hook
Use redux hook to validate the form.
This gives us single point of contact for "is the data valid?"
while not requiring every redux action touching form data to perform validation.

It's not perfect and might be improved when using external library solving the problems we're having.
2024-06-21 14:40:41 +02:00
Sanne Raymaekers
177e4b227c CreateImageWizardV2: search package groups in distro repositories
By prepending an `@`, users can search for package groups. A single `@`
just lists all groups.
2024-06-21 10:12:39 +02:00
Amir
6f9c4f3864 feat(HMS-3582): add first boot step to wizard 2024-05-02 16:35:26 +02:00
regexowl
df9ec1499d V2Wizard: Fix FSC units on Edit
This updates the logic of parsing bytesize into size/unit pair.

Currently 'GiB' is set as a default which causes problem with smaller partitions on Edit.

A validation for the min_size is in place and the rule is that the size cannot be smaller than 0 of a given unit. If there was a partition with smaller size in KiB it will break the rule when converted to GiB.
2024-05-01 19:47:41 +02:00
regexowl
f2daa9c358 V2Wizard: Reinitialize AWS/Azure/GCP after deselecting target
Fixes #1555

This reinitializes the state of AWS/Azure/GCP target after it's tile was deselected. This way the state for the target won't be hanging there.
2024-04-29 15:35:59 +02:00
Andrew Dewar
3231b324f0 HMS-3796: Add snapshot date selection to wizard 2024-04-25 14:45:50 +02:00
Ondrej Ezr
ff75d36203 WizardV2: fix details validation on Edit 2024-04-24 18:37:55 +02:00
lucasgarfield
a1bdcaa54f V2 Wizard: Fix OpenSCAP step
OpenSCAP profile info is now correctly loaded into the state and
verified to be in the final request with tests.

I modified the fixtures for the OpenSCAP profiles. My changes ensure we
have a Venn-diagram like overlap when changing from one profile to
another where one package is the same, one package is removed, and one
package is added. The same is true for the services and partitions. For
kernel args it is not so important as that is just a string (as opposed
to an array), so it is enough to be different.

I was able to eliminate a useEffect by replacing it with a lazy query
trigger function. Setting the second arg `preferCacheValue` to `true`
means that a request is only made if cached data is not available.

I modified the Redux reducers a bit to add some additional safety.

`changeFileSystemPartitionMode` is now responsible for initializing the
partitions field in the state by adding the root partition – previously
this was done in the components themselves by dispatching
`addPartition`. This reducer can always be safely dispatched – if the
mode is ‘manual’, dispatching it with a payload of ‘manual’ will not
result in any changes to the state.

`addPackage` is also safer now. When a package is added, the list of
packages is checked. If there is a package with an identical name, the
new package overwrites the previous package. This is useful because the
description may be different for the same package – for instance, when
adding an OpenSCAP package, we use a custom description (‘this package
required by OpenSCAP’).
2024-04-23 10:02:03 +02:00