Merge "fix: fix image required when create ironic"

This commit is contained in:
Zuul 2022-05-27 03:16:23 +00:00 committed by Gerrit Code Review
commit 78804182ed
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(),
},
], ],
}, },
{ {