Commit graph

2812 commits

Author SHA1 Message Date
Sanne Raymaekers
b2f56e26f2 test/testUtils: support rendering with cockpit 2025-02-06 10:55:45 +01:00
Sanne Raymaekers
e601a299be test/fixtures: add blueprint for cockpit
This blueprint is a hack, when the cockpit mocks encounter this
blueprint, the cockpit mocks will return all composes. This is to get
around the fact that in cockpit, there are no images without blueprints,
while that's possible in the service.
2025-02-06 10:55:45 +01:00
regexowl
5cc479115d requestMapper: Fix snapshot date parsing
Regex was wrong, would take "2025-01-01T00:00:00.000Z" even though it's a valid RFC 3339 date.
2025-02-06 09:31:49 +01:00
Sanne Raymaekers
874f6bdd5c store/cockpit: Add notifications for blueprints
Also just dump the entire `err` in the notification in case of
errors. The error we get from the custom query in cockpit is not at all
predictable.
2025-02-05 16:58:47 +01:00
regexowl
c2cdb84e77 validators: Remove unneeded condition for service validator
After the regex was fixed this condition should be removed.
2025-02-05 16:48:02 +01:00
Sanne Raymaekers
90bf5cf91f src: Rely only osbuild-composer's cloudapi types
Use the predefined types in the status row and the onprem to hosted
mapper.
2025-02-05 15:54:57 +01:00
Sanne Raymaekers
16ae455b67 store/cockpit: Add osbuild-composer's cloudapi 2025-02-05 15:54:57 +01:00
Sanne Raymaekers
a65d17ba4e api: Add osbuild-composer's cloudapi 2025-02-05 15:54:57 +01:00
Sanne Raymaekers
76044ddccd store/cockpitApi: add notification when composing images 2025-02-05 13:11:14 +01:00
Sanne Raymaekers
41869611db Blueprints/helpers: fix mapping hosted to on prem
`isAdministrator` isn't an option onPrem.
2025-02-05 13:11:14 +01:00
Sanne Raymaekers
b574a7cabc CreateImageWizard: fix systemd validator
The naming of systemd services don't follow the RFC in the comments. See
`man systemd.unit` for the specification.
2025-02-05 13:11:14 +01:00
Sanne Raymaekers
8dd85a3c1e store/cockpitApi: fix deleting blueprints 2025-02-05 13:11:14 +01:00
Sanne Raymaekers
52a43b0f2d CreateImageWizard: support edit mode on premise
The way the on premise wizard is initialized needed to be tweaked to
make it work for isEdit. Let's assume that the host distro and host
architecture are already correct in the blueprint.
2025-02-05 13:11:14 +01:00
Sanne Raymaekers
0204bcced5 store/wizardSlice: default to 'register-later' when on-premise 2025-02-05 13:11:14 +01:00
Sanne Raymaekers
61107e122e Utilities/useGetEnvironment: support feature flags on prem
These are just hardcoded, but enable the new customizations in the on
premise UI.
2025-02-05 13:11:14 +01:00
regexowl
3e542a60d3 README: Update scripts for running prod and stage
This updates the scripts used to run prod and stage locally.
2025-02-05 11:53:21 +01:00
schutzbot
0d1b264511 Post release version bump
[skip ci]
2025-02-05 08:27:01 +00:00
Gianluca Zuccarelli
b469775ef5 Components/Cockpit: NotReady
Add a secondary button that takes the user to the `osbuild-composer.socket`
services file inside the cockpit services plugin.
2025-02-04 23:08:50 +01:00
Gianluca Zuccarelli
a27c300431 AppCockpit: render not ready component
Render the nont ready component when the osbuild-composer.socket is
not running.
2025-02-04 23:08:50 +01:00
Gianluca Zuccarelli
87ce805c74 Utilities: add useComposerStatus hook
Add a custom hook to check to see if the osbuild-composer.socket
is enabled & running.
2025-02-04 23:08:50 +01:00
Gianluca Zuccarelli
abca3ac760 Components/Cockpit: add a not ready component
Add a component to display when the osbuild-composer socket
is not running. We could potentially try start the socket
in the future when clicking the button, rather than re-directing
to the cockpit services plugin.
2025-02-04 23:08:50 +01:00
regexowl
9e4cd302b5 Wizard: Add services to on-prem mapper
This adds services to on-prem mapper.
2025-02-04 17:21:50 +01:00
Anna Vítová
608b0f1593 CreateImageWizard: fix users ssh key naming in mapper
The naming of the ssh key was misspelled, this commit fixes it so that
it is according to docs.
2025-02-04 15:47:44 +01:00
regexowl
8bafe6cb80 Wizard: Add validation to Systemd services step
This adds validation to ChippingInputs on the Systemd services step.
2025-02-04 15:15:49 +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
3cd3aa0176 Wizard: Add users to on-prem mapper
this adds users to on-prem mapper.
2025-02-04 14:39:34 +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
regexowl
7524bb1eef ImagesTable: Format status text
This adds formatting to the status text, ensuring it's the same as on Repositories step.
2025-02-04 13:55:30 +01:00
regexowl
d7a331b6a4 Wizard: Add firewall to Review step
This adds a firewall expandable to the Review step.
2025-02-04 13:32:25 +01:00
Michal Gold
7d2ca8f1ee fec: enable useFileHash
this commmit enable useFileHash in fec.config.js -
when set it to true Webpack will append a hash (a unique identifier) to the filename based on its content.
This helps prevent the browser from using an outdated cached version of a file when its content has changed.
2025-02-04 12:39:09 +01:00
schutzbot
19613366af Post release version bump
[skip ci]
2025-02-04 10:55:28 +00:00
regexowl
f11ab64262 Wizard: Add validation to ChippingInput
This adds step validation to ChippingInput, allowing to validate imported values.
2025-02-04 11:37:16 +01:00
Sanne Raymaekers
6ec433f9d3 ImagesTable: fix local target status
The local target status in osbuild-composre ended up being called
`artifact_path`.
2025-02-04 10:22:19 +01:00
Sanne Raymaekers
1b91b43079 store/cockpit: fix compose request POST
The base query expects a stringified pody.
2025-02-04 10:22:19 +01:00
Sanne Raymaekers
2b5982fdfe store/cockpit: fix URLs when using basequery
The new base query adds the common parts of the path already.
2025-02-04 10:22:19 +01:00
Sanne Raymaekers
fea03a8c72 CreateImageWizard: hide package group alert in cockpit plugin
Searching for groups isn't possible sadly, as the search works slightly
differently than content sources. Replace the alert with an alert on how
to use globbing.
2025-02-04 10:22:19 +01:00
Sanne Raymaekers
62a772198c packit.yaml: fix upstream tag template
Currently the version in fedora is `v55`, which is wrong, it should just
be `55`.
2025-02-03 14:33:53 +01:00
Sanne Raymaekers
1b4ecdb271 ImagesTable: ensure local target is copyable
To ensure the local file target is copyable and usable in
`cockpit-files`, the artefact directory needs to be readable.
2025-02-03 14:13:31 +01:00
Gianluca Zuccarelli
eac03ddc7d store/cockpit: add package search
Add initial package search. Include the version, release & arch information
in the summary, since some packages might have a release with the specific
architecture and a `noarch` version.
2025-02-03 13:40:30 +01:00
Gianluca Zuccarelli
bc1564eddb store/cockpit: add content sources api
Add a `contentSourcesApi` for the on-prem frontend. We need to add a small
workaround and put these endpoints under the `cockpitApi` reducer.
since RTK query here, doesn't like splitting out apis when they are
fundamentally the same.

To workaround this we can will just chain the endpoints so:
`emptyCockpitApi` -> `contentSourcesApi` -> `cockpitApi`

This allows us to keep the `contentSourcesApi` separate so
we can export some of the endpoints so that the `cockpitApi`
doesn't become a monolith.
2025-02-03 13:40:30 +01:00
Gianluca Zuccarelli
b8ceba2e3e store/backendApi: tidy up imports/exports
Tidy up the imports and the exports in the `backendApi` mixed api to
make things more consistent.
2025-02-03 13:40:30 +01:00
Gianluca Zuccarelli
9325fbfb56 store: fix api imports & exports
This is just a workaround to keep imports to the api definitions the same as before.
The added benefit is that we can then use these files to handle the mixed api types
between the service frontend and on-prem frontend.
2025-02-03 13:40:30 +01:00
Gianluca Zuccarelli
9c3581f21c store: split apis into sub directories
Since we will need to add other api endpoints, e.g. `contentSourcesApi` for
the on-prem frontend, this PR restructures the store directory to make future
changes more manageable.
2025-02-03 13:40:30 +01:00
Gianluca Zuccarelli
ed1b4c4b97 CreateImageWizard: hide registration on-prem
Hide the registration step for on-prem frontend
2025-02-03 13:40:30 +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
e9876f6ed5 test: Firewall edit tests
This adds firewall tests for the edit mode.
2025-02-03 12:25:37 +01:00
Sanne Raymaekers
39653c4df1 store/cockpit: don't define top-level constants that use cockpit
Only invoke the cockpit library when actually contacting the cloudapi.

The cockpit library isn't defined in the service, so any invocation of
the cockpit library when the application loads will make the frontend
crash.
2025-02-03 11:50:14 +01:00
regexowl
73e7a51ab0 Wizard: Add firewall to on-prem mapper
This adds firewall to on-prem mapper.
2025-02-03 10:56:14 +01:00
red-hat-konflux[bot]
4a6ea06b7a Update Konflux references
Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
2025-02-03 10:13:04 +01:00
Gianluca Zuccarelli
d67d8d481b store/cockpitApi: use baseQuery for requests
Switch the existing requests to make use of the `baseQuery`. This
just dries up the code a little bit.
2025-01-31 16:57:23 +01:00