From a8ff91c2196a9c2e8ae20db8a7a8766c70e30805 Mon Sep 17 00:00:00 2001 From: "Jingwei.Zhang" Date: Thu, 7 Jul 2022 12:33:22 +0800 Subject: [PATCH] fix: fix bootable volume action notice 1. Fix bootable volume action name 2. Remove useless code for online resize instance action Change-Id: Ibd5e2dc958c0bdbc0b5d53a3e628f334cb93a530 --- .../Instance/components/FlavorSelectTable.jsx | 11 ----------- .../storage/containers/Volume/actions/Bootable.jsx | 5 +++++ src/stores/nova/instance.js | 10 ---------- 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/src/pages/compute/containers/Instance/components/FlavorSelectTable.jsx b/src/pages/compute/containers/Instance/components/FlavorSelectTable.jsx index 3c9d9439..69f2eb39 100644 --- a/src/pages/compute/containers/Instance/components/FlavorSelectTable.jsx +++ b/src/pages/compute/containers/Instance/components/FlavorSelectTable.jsx @@ -106,7 +106,6 @@ export class FlavorSelectTable extends Component { get flavors() { const { flavor, - online, isIronic = false, filterIronic = true, excludeFlavors = [], @@ -127,16 +126,6 @@ export class FlavorSelectTable extends Component { if (!flavor) { return true; } - if (online) { - const currentFlavor = (toJS(this.flavorStore.list.data) || []).find( - (f) => f.name === flavor - ); - return ( - it.vcpus >= currentFlavor.vcpus && - it.ram >= currentFlavor.ram && - it.name !== flavor - ); - } return it.name !== flavor; }) .filter((it) => { diff --git a/src/pages/storage/containers/Volume/actions/Bootable.jsx b/src/pages/storage/containers/Volume/actions/Bootable.jsx index 485eec2c..4402b222 100644 --- a/src/pages/storage/containers/Volume/actions/Bootable.jsx +++ b/src/pages/storage/containers/Volume/actions/Bootable.jsx @@ -29,6 +29,11 @@ export class Bootable extends ModalAction { return Promise.resolve(true); } + get name() { + const { bootable } = this.values; + return bootable ? t('Bootable') : t('Unbootable'); + } + get defaultValue() { const { item } = this.props; return { diff --git a/src/stores/nova/instance.js b/src/stores/nova/instance.js index faf033cc..bda47b33 100644 --- a/src/stores/nova/instance.js +++ b/src/stores/nova/instance.js @@ -399,16 +399,6 @@ export class ServerStore extends Base { return this.operation({ body, id }); } - @action - async liveResize({ id, flavor }) { - const body = { - liveResize: { - flavorRef: flavor, - }, - }; - return this.operation({ body, id }); - } - @action async migrate({ id, body }) { if (body) {