fix: fix image required when create ironic

1. Set image is required when create ironic
2. Add image info in confirm step when create ironic

Change-Id: I57de4e5317aab2ee96e012327bb9a5a79f5e7656
This commit is contained in:
Jingwei.Zhang 2022-05-26 15:10:02 +08:00
parent 3544b35a5b
commit e9cd1482c2
2 changed files with 6 additions and 3 deletions

View File

@ -191,7 +191,7 @@ export class BaseStep extends Base {
type: 'select-table', type: 'select-table',
data: this.images, data: this.images,
isLoading: imageLoading, isLoading: imageLoading,
isMulti: false, required: true,
filterParams: [ filterParams: [
{ {
label: t('Name'), label: t('Name'),

View File

@ -39,8 +39,7 @@ export class ConfirmStep extends Base {
getSourceValue() { getSourceValue() {
const { context } = this.props; const { context } = this.props;
const { source } = context; const { selectedRows = [], selectedRowKeys = [] } = context.image;
const { selectedRows = [], selectedRowKeys = [] } = context[source.value];
return selectedRows.length ? selectedRows[0].name : selectedRowKeys[0]; return selectedRows.length ? selectedRows[0].name : selectedRowKeys[0];
} }
@ -116,6 +115,10 @@ export class ConfirmStep extends Base {
label: t('Flavor'), label: t('Flavor'),
value: this.getFlavor(), value: this.getFlavor(),
}, },
{
label: t('Image Name'),
value: this.getSourceValue(),
},
], ],
}, },
{ {