V2Wizard: Add recommended repo to the repo table on Review
This adds the recommended repository to the table of repositories on the Review step.
This commit is contained in:
parent
b7f6393be9
commit
16ab5b37c5
1 changed files with 15 additions and 1 deletions
|
|
@ -7,8 +7,10 @@ import { useListRepositoriesQuery } from '../../../../store/contentSourcesApi';
|
|||
import { useAppSelector } from '../../../../store/hooks';
|
||||
import {
|
||||
selectCustomRepositories,
|
||||
selectDistribution,
|
||||
selectPackages,
|
||||
selectPartitions,
|
||||
selectRecommendedRepositories,
|
||||
} from '../../../../store/wizardSlice';
|
||||
import { getConversionFactor } from '../FileSystem/FileSystemConfiguration';
|
||||
|
||||
|
|
@ -126,7 +128,11 @@ export const PackagesTable = () => {
|
|||
};
|
||||
|
||||
export const RepositoriesTable = () => {
|
||||
const distribution = useAppSelector(selectDistribution);
|
||||
const repositoriesList = useAppSelector(selectCustomRepositories);
|
||||
const recommendedRepositoriesList = useAppSelector(
|
||||
selectRecommendedRepositories
|
||||
);
|
||||
return (
|
||||
<Panel isScrollable>
|
||||
<PanelMain maxHeight="30ch">
|
||||
|
|
@ -138,12 +144,20 @@ export const RepositoriesTable = () => {
|
|||
</Thead>
|
||||
<Tbody data-testid="repositories-tbody-review">
|
||||
{repositoriesList?.map((repo, repoIndex) => (
|
||||
<Tr key={repoIndex}>
|
||||
<Tr key={repoIndex + 1}>
|
||||
<Td className="pf-m-width-60">
|
||||
<RepoName repoUrl={repo.baseurl} />
|
||||
</Td>
|
||||
</Tr>
|
||||
))}
|
||||
{recommendedRepositoriesList.length > 0 && (
|
||||
<Tr key={0}>
|
||||
<Td className="pf-m-width-60">
|
||||
EPEL {distribution.startsWith('rhel-8') ? '8' : '9'}{' '}
|
||||
Everything x86_64
|
||||
</Td>
|
||||
</Tr>
|
||||
)}
|
||||
</Tbody>
|
||||
</Table>
|
||||
</PanelMain>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue