Commit graph

2788 commits

Author SHA1 Message Date
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
Gianluca Zuccarelli
202575d74f test/mocks/cockpit: make file replace a promise
This just gets rid of some of the eslint warnings.
2025-01-31 16:57:23 +01:00
Gianluca Zuccarelli
6b3b3ea3cc store/cockpit/baseQuery: add cockpit baseQuery
Add a `cockpitBaseQuery` for api calls that need to be made against
the `cloudapi` on the osbuild-composer unix-socket. This function adds
an extra step of parsing the result and transforming it into JSON.

We need to wrap the `cockpit.http.request` call in a
Promise rather than async/await because cockpit rejects
the http request with two arguments (error & data/body)
and we need to handle this appropriately. It is not possible
to do this with a try/catch block
2025-01-31 16:57:23 +01:00
schutzbot
8e58548385 Post release version bump
[skip ci]
2025-01-31 13:00:48 +00:00
Sanne Raymaekers
4d176047e7 Revert "Post release version bump"
This reverts commit 4de06853d9.
2025-01-31 13:53:53 +01:00
Sanne Raymaekers
efa44c22bb .github/workflows/release: make sure GH_TOKEN is set for upload 2025-01-31 13:53:53 +01:00
schutzbot
4de06853d9 Post release version bump
[skip ci]
2025-01-31 12:21:46 +00:00
Sanne Raymaekers
9bbf85c444 Revert "Post release version bump"
This reverts commit 40da8c054e.
2025-01-31 13:15:21 +01:00
Sanne Raymaekers
31eaea16ca .github/workflows/release: work around git clean
The osbuild release action cleans the repository, removing the tarball
that gets uploaded to the release. This tarball needs to be built before
schutzbot commits the version bump, so move it so it doesn't get
cleaned.
2025-01-31 13:15:21 +01:00
schutzbot
40da8c054e Post release version bump
[skip ci]
2025-01-31 11:47:57 +00:00
Sanne Raymaekers
79ca7c623b .github/workflows/release: fix release workflow 2
The release event isn't present when a tag is pushed, so use ref_name to
get the tag name.
2025-01-31 12:40:53 +01:00
Sanne Raymaekers
163c6eabc9 Revert "Post release version bump"
This reverts commit 791d83a29a.
2025-01-31 12:40:53 +01:00
schutzbot
791d83a29a Post release version bump
[skip ci]
2025-01-31 11:03:11 +00:00
Sanne Raymaekers
781c3a92ae .github/workflows/release: fix release workflow 2025-01-31 11:56:55 +01:00
Sanne Raymaekers
45c5892ee9 Revert "Post release version bump"
The last release failed.  This reverts commit
18d59cf201.
2025-01-31 11:56:55 +01:00
Sanne Raymaekers
e249558879 cockpit/spec: depend on cockpit-files 2025-01-31 11:38:36 +01:00
Sanne Raymaekers
9b9de0bba5 ImagesTable/Instance: open cockpit's file browser for local imgs
Uses `cockpit.jump` to prevent the page actually loading, which makes it
very easy to navigate back to image builder.
2025-01-31 11:38:36 +01:00
Sanne Raymaekers
1f5afc6bc6 store/cockpitApi: make cache dir in case it doesn't exist
Pass `-p` when creating blueprint directories in case
`~/.cache/cockpit-image-builder` doesn't exist yet.
2025-01-30 22:32:12 +01:00
Sanne Raymaekers
40d1d4cd0f store/cockpitApi: hide cloud targets for now 2025-01-30 10:53:01 +01:00
Sanne Raymaekers
fcbcbb3d22 store/cockpitApi: write blueprints to disk 2025-01-30 10:53:01 +01:00
Sanne Raymaekers
1dc657a351 store/cockpitApi: invalidate cache after building an image
With the custom query functions the cached data from getComposes and
getBlueprintComposes doesn't get invalidated. Luckily RTKQuery provides
a mechanism to invalidate the cache after a mutation.
2025-01-30 10:53:01 +01:00
Sanne Raymaekers
75eb0afd10 src/test/mocks: add cockpit mocks
Adds `mtime` tot fsinfo, and `replace` to `cockpit.file`.
2025-01-30 10:53:01 +01:00
Sanne Raymaekers
c8c62dda9d store/cockpitApi: compose status support
Finds the relevant compose, asks for its status and reads the original
compose request from disk.
2025-01-30 10:53:01 +01:00
Sanne Raymaekers
7bd5e2fa95 ImagesTable: switch to mixed api for getting composes 2025-01-30 10:53:01 +01:00
Sanne Raymaekers
0775acdb4d store/cockpitApi: support getting composes
Reads all of the image entries under the cache.
2025-01-30 10:53:01 +01:00