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.
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.
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.
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
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.
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.
This commit introduces the user information step with the following fields:
(*) `userName` field
(*) `password` field
(*) add unit tests for create and edit mode
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
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.