feat: update detach volume
Change the multi-select vm to single selection to prevent simultaneous detaching and error reporting Change-Id: I7e7471797465e3c56179b2337e0c6a59e4fe0e5e
This commit is contained in:
parent
36483416f2
commit
b3b81d7082
@ -91,7 +91,6 @@ export class Detach extends ModalAction {
|
|||||||
type: 'select-table',
|
type: 'select-table',
|
||||||
required: true,
|
required: true,
|
||||||
data: this.instances,
|
data: this.instances,
|
||||||
isMulti: true,
|
|
||||||
filterParams: [
|
filterParams: [
|
||||||
{
|
{
|
||||||
label: t('Name'),
|
label: t('Name'),
|
||||||
@ -108,11 +107,8 @@ export class Detach extends ModalAction {
|
|||||||
onSubmit = ({ instance }) => {
|
onSubmit = ({ instance }) => {
|
||||||
const { id } = this.item;
|
const { id } = this.item;
|
||||||
const { selectedRowKeys } = instance;
|
const { selectedRowKeys } = instance;
|
||||||
return Promise.all(
|
const instanceId = selectedRowKeys[0];
|
||||||
selectedRowKeys.map((instanceId) =>
|
return this.store.detachVolume({ id: instanceId, volumes: [id] });
|
||||||
this.store.detachVolume({ id: instanceId, volumes: [id] })
|
|
||||||
)
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user