Commit graph

1421 commits

Author SHA1 Message Date
regexowl
92a6fb5417 LandingPage: Hide NewAlert
We'll be switching NewAlert with blueprints for information about newly available customizations. The component itself is a nice scaffolding for the upcoming announcement, would prefer to keep it for now.
2025-01-20 15:58:00 +01:00
regexowl
6918313d6f validators: Remove undefined where only string value expected
This removes checks for an `undefined` value in validators that take only `string`.
2025-01-20 13:23:34 +01:00
regexowl
563ff04054 Wizard: Parse old snapshot dates when editing
This updates format of the snapshot date when the blueprint with the old format gets edited.
2025-01-20 11:43:40 +01:00
Gianluca Zuccarelli
8d34f85c48 store/cockpitApi: fix version number
Get rid of the `Math.floor` for the version and just ensure that
the version is a number.
2025-01-17 11:15:26 -06:00
Gianluca Zuccarelli
9a3c46e9ac store/cockpitApi: blueprint pagination
Add blueprint list pagination support
2025-01-17 11:15:26 -06:00
Gianluca Zuccarelli
ad239b9b6c store/cockpitApi: blueprint links
Use the filename/id of the blueprints as the links to
the first and last element for the blueprint list metadata.
These links are a little meaningless since they should be
urls.
2025-01-17 11:15:26 -06:00
Gianluca Zuccarelli
6bc791a379 store/cockpitApi: fix blueprint filtering
The blueprint list wasn't being filtered correctly if the blueprint
name was specified or if any search terms were provided. This commit
fixes that.
2025-01-17 11:15:26 -06:00
regexowl
6e6e3b1ccc Wizard: Fix repo status formatting
This fixes the formatting of repositories status.
2025-01-17 09:11:41 -06:00
Gianluca Zuccarelli
3e6985988a store/backendApi: export the relevant store api
Since the implementation of the cockpitApi and imageBuilderApi are different,
we should make sure to export the correct one depending on the environment
we are in.
2025-01-16 15:45:41 -06:00
Gianluca Zuccarelli
79532e4ac5 store/cockpitApi: add delete endpoint 2025-01-16 15:45:41 -06: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
568b8c83cf wizard: add ssh_key to review step
this commit add ssh_key to review step under Users
2025-01-15 10:42:43 +01:00
regexowl
3167effa1b Wizard: Add unleash flag and update tests
This gates the step behind an unleash flag and updates the existing tests so they pass with the new step added.
2025-01-14 14:11:22 -06:00
Lucas Garfield
e6bc0d429a Wizard: Firewall customization scaffolding 2025-01-14 14:11:22 -06:00
regexowl
5696d1805f Wizard: Do not show warning icon if warning === ''
Fixes #2743

This hides the warning under FSC min size if the body of warning is empty.
2025-01-14 15:46:30 +01:00
Gianluca Zuccarelli
a1d1c4b72e constants: fix cockpit constant
Since we are building the project under `cockpit-composer` we should change
the `BLUEPRINTS_DIR` constant.
2025-01-14 12:09:59 +01: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
regexowl
d3e76c6d49 ImagesTable: Fix version filter
This fixes the "All versions" / "Newest" filter in the blueprint images table.
2025-01-08 17:30:21 +01:00
regexowl
add30905ab ImagesTable: Fix images header
"All images" should change to "<blueprint_name> images" when a blueprint is selected.
2025-01-08 15:11:13 +01:00
regexowl
34b4f243ff ImagesTable: Fix compose filtering by selected blueprint
The filtering was defaulting to version '1', making images of other versions not appear when selecting a blueprint.

How to reproduce:
1. create a blueprint
2. build an image
3. edit the blueprint to get it to version 2
4. build another image

Current behaviour:
- only image with version 1 is visible

After fix:
- both image for version 1 and image for version 2 of the blueprint should be visible when the blueprint is selected
2025-01-08 13:11:38 +01: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á
e5934452ca src: add checkbox to confirm custom repos import
Importing custom repositories on behalf users might be unexpected. This
commit adds a checkbox to opt out.
2025-01-07 12:11:25 +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
d77ac55482 Wizard: Skip directly to Review
When clicking "Review and finish" the user skips directly to the Review step and the name of the blueprint gets automatically populated.
2025-01-06 18:22:50 -06:00
regexowl
4af4b56332 this commit adds ssh_key to users step 2025-01-06 13:05:41 +01:00
Michal Gold
6a5871bf14 wizard: add users to review step (HMS-4906) 2025-01-06 12:28:20 +01:00
regexowl
5e4f20edf1 src: Make spinners spin
This replaces the `<InProgressIcon>` with animated spinners to indicate that something is happening.
2025-01-06 10:17:49 +01:00
regexowl
5f9f30d97b Wizard: Fix "form in form" warning
This resolves `Warning: validateDOMNesting(...): <form> cannot appear as a descendant of <form>.` warning in test output. There were two `<Form>` components nested in each other.
2025-01-02 13:18:00 +01:00
Gianluca Zuccarelli
47156c4e95 store/cockpitApi: use existing blueprint converter
Use the blueprint existing blueprint converter to convert
the on-prem blueprint to the hosted blueprint
2024-12-21 08:19:15 -06:00
Gianluca Zuccarelli
a9ebfb7e2e store/cockpitApi: scan for blueprint files
Add an initial commit to scan a preset directory for user blueprint
files. This makes use of the cockpit files api.
2024-12-21 08:19:15 -06:00
Gianluca Zuccarelli
2b82fa3c4b tsconfig: cockpit plumbing
It was necessary to do a bit of plumbing to get typescript, webpack &
vitest all happy. To do this we had had to create a separate tsconfig
for the on-prem version and the service frontend.

We override the module resolution for both config files. For on-prem we
check modules in `pkg/lib` and for the service we resolve the modules to
stub functions of the `cockpit` & `cockpit/fsinfo` modules. This was so
typescript and webpack would not complain.

For on-prem we had to intruct webpack to resolve modules from both
`node_modules` and `pkg/lib`. While for the service we set the
resulotion for the two modules to false, which means they won't get
bundled with the service.

Lastly, we needed to set some aliases in the vitest config so that
vitest could resolve the `cockpit` & `cockpit/fsinfo` modules.

Using the cjs `require` keyword to import cockpit would have worked to
make typescript and webpack compile since these imports are not
statically analysed like the `import` keyword is. However, this approach
broke the tests as `require` imports are not supported in vitest.
2024-12-21 08:19:15 -06:00
Gianluca Zuccarelli
4235885541 test/mocks: add cockpit lib mocks
Add some stub functions for the cockpit library, these will be needed
for tests to pass and for stubbing out the library for the service.
2024-12-21 08:19:15 -06:00
Gianluca Zuccarelli
570cb3eba2 store: add emptyCockpitApi
This is just to follow the convention already used in the project.
2024-12-21 08:19:15 -06: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
7da478791e devDeps: Manually bump msw from 2.6.6 to 2.7.0
This bumps msw from 2.6.6 to 2.7.0
2024-12-20 07:13:18 -06:00
regexowl
cf4289f692 Wizard: Move two files
This moves two files:
- timezonesList to the Timezone step, same as lists used for Locale
- ImportBlueprintModal.test.tsx to the test folder so all the test files are in one place
2024-12-17 17:01:34 -06:00
regexowl
ae795c3b6a Wizard: Extract ChippingInput to reusable component
This extracts input with chips from the NTP servers into a separate reusable ChippingInput component.
2024-12-16 12:12:56 -06:00
regexowl
8e046e3018 Wizard: Kernel step basics
This adds foundation for Kernel step, including gating and basic tests.
2024-12-16 10:53:06 +01:00
Anna Vítová
74c352e235 Wizard: Add popover to suggest importing on-prem
In order to hint users that on-premise blueprints are accepted in
import, we are adding a popover with a message.
2024-12-13 14:27:05 +01:00
regexowl
a5966b2f29 test: Add edit tests for hostname
This adds an edit test for the Hostname step.
2024-12-12 14:53:18 -06:00
regexowl
9b6934438a validators: Allow only lowercase characters for hostname
Validation error mentions only lowercase characters, this updates the regex accordingly.
2024-12-12 14:53:22 +02:00
regexowl
3bd4dc89c4 test: Add test to check hostname length
This adds a test to check the length of the hostname.
2024-12-12 14:53:22 +02:00
regexowl
dc24ba24e4 Wizard: Add Hostname expandable to Review step
This adds a new expandable to the Review step.
2024-12-12 13:47:09 +02:00
regexowl
73eaecc51e Wizard: Add hostname to on-prem mapper
This adds hostname to on-prem mapper and updates a test that checks if the value got parsed correctly.
2024-12-12 11:19:16 +01:00
Lucas Garfield
b4932d6a44 Wizard: Hostname validation
Hostname validation rules can be found in the hostname man pages (`man 5
hostname`). This commit tweaks the hostname validator function so it is
in line with these guidelines by limiting the length to 64 characters
and also updates the error message for invalid hostnames to provide
users with some additional guidance/context when an invalid hostname is
provided.
2024-12-11 12:59:41 -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
75741ec40e test: Add basics Hostname tests
This adds basic tests for the Hostname step.
2024-12-10 12:37:36 -06:00
regexowl
8c108fe2ec Wizard: Basic Hostname step
This adds Hostname step basics and file structure.
2024-12-10 12:37:36 -06:00