-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cockpit: add package search (HMS-5423) #2815
cockpit: add package search (HMS-5423) #2815
Conversation
This is based on @bcl's PR here osbuild/osbuild-composer#4579 |
8333c9a
to
2e8f2b7
Compare
2e8f2b7
to
e51c69c
Compare
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #2815 +/- ##
==========================================
- Coverage 83.08% 82.96% -0.13%
==========================================
Files 192 199 +7
Lines 22324 22395 +71
Branches 2180 2183 +3
==========================================
+ Hits 18549 18581 +32
- Misses 3753 3792 +39
Partials 22 22
Continue to review full report in Codecov by Sentry.
|
08a2a5b
to
68d5ea3
Compare
/jira-epic COMPOSER-2411 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
Theoretically we could have 2 'cockpitapis' right? One for content sources and one for the cloudapi? Probably just makes it more complicated though.
68d5ea3
to
5fd010d
Compare
Theoretically we could and probably should, but RTK query really doesn't like it and we get a bunch of weird errors in the console |
Ooh IC, yea I think I get it fully now, they both just call the cloudapi after all, makes perfect sense! Interesting that RTK query can tell what's happening under the hood there. |
Hm IG because they would use the same basequery? |
Hide the registration step for on-prem frontend
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.
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.
Tidy up the imports and the exports in the `backendApi` mixed api to make things more consistent.
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.
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.
5fd010d
to
4a9dacc
Compare
This PR adds the ability to search for packages in the
CreateImageWizard
.This required some more plumbing and some refactoring of the store:
contentSourcesApi
for the cockpit frontendbaseQuery
function to dry up the endpoint callsJIRA: HMS-5423