Wizard: send template name in image request
This commit is contained in:
parent
00438ce2dc
commit
854ff93594
3 changed files with 23 additions and 2 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue