V2Wizard: Add packages to requestMapper
This adds packages to the request mapper in a needed format - a flat list of package names.
This commit is contained in:
parent
2c6c326677
commit
d9f9c61307
1 changed files with 12 additions and 1 deletions
|
|
@ -31,6 +31,7 @@ import {
|
|||
selectGcpEmail,
|
||||
selectGcpShareMethod,
|
||||
selectImageTypes,
|
||||
selectPackages,
|
||||
selectRegistrationType,
|
||||
selectServerUrl,
|
||||
} from '../../../store/wizardSlice';
|
||||
|
|
@ -154,7 +155,7 @@ const getCustomizations = (state: RootState, orgID: string): Customizations => {
|
|||
directories: undefined,
|
||||
files: undefined,
|
||||
subscription: getSubscription(state, orgID),
|
||||
packages: undefined,
|
||||
packages: getPackages(state),
|
||||
payload_repositories: undefined,
|
||||
custom_repositories: undefined,
|
||||
openscap: undefined,
|
||||
|
|
@ -175,6 +176,16 @@ const getCustomizations = (state: RootState, orgID: string): Customizations => {
|
|||
};
|
||||
};
|
||||
|
||||
const getPackages = (state: RootState) => {
|
||||
const packages = selectPackages(state);
|
||||
|
||||
if (packages.length > 0) {
|
||||
return packages.map((pkg) => pkg.name);
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
|
||||
const getSubscription = (
|
||||
state: RootState,
|
||||
orgID: string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue