Wizard: send template name in image request

This commit is contained in:
rverdile 2025-05-12 11:14:03 -04:00 committed by Klara Simickova
parent 00438ce2dc
commit 854ff93594
3 changed files with 23 additions and 2 deletions

View file

@ -20,6 +20,7 @@ import {
selectDistribution,
selectTemplate,
changeTemplate,
changeTemplateName,
} from '../../../../../store/wizardSlice';
import { releaseToVersion } from '../../../../../Utilities/releaseToVersion';
import { Error } from '../../Repositories/components/Error';
@ -53,10 +54,16 @@ const Templates = () => {
{ refetchOnMountOrArgChange: 60 }
);
const handleRowSelect = (templateUuid: string | undefined): void => {
const handleRowSelect = (
templateUuid: string | undefined,
templateName: string | undefined
): void => {
if (templateUuid) {
dispatch(changeTemplate(templateUuid));
}
if (templateName) {
dispatch(changeTemplateName(templateName));
}
};
const handlePerPageSelect = (
@ -123,7 +130,7 @@ const Templates = () => {
variant: 'radio',
isSelected: uuid === templateUuid,
rowIndex: rowIndex,
onSelect: () => handleRowSelect(uuid),
onSelect: () => handleRowSelect(uuid, name),
}}
/>
<Td dataLabel={'Name'}>{name}</Td>