diff --git a/src/locales/en.json b/src/locales/en.json index 82b6c7b4..06d1ac57 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1370,7 +1370,7 @@ "Lock": "Lock", "Lock Instance": "Lock Instance", "Lock Status": "Lock Status", - "Lock instance will lock the operations that have a direct impact on the operation of the instance, such as shutdown, restart, delete, etc. It does not involve the mounting, unmounting and capacity expansion of volume.": "Lock instance will lock the operations that have a direct impact on the operation of the instance, such as shutdown, restart, delete, etc. It does not involve the mounting, unmounting and capacity expansion of volume.", + "Lock instance will lock the operations that have a direct impact on the operation of the instance, such as: shutdown, restart, delete, the mounting and unmounting of volume, etc. It does not involve the capacity expansion and change type of volume.": "Lock instance will lock the operations that have a direct impact on the operation of the instance, such as: shutdown, restart, delete, the mounting and unmounting of volume, etc. It does not involve the capacity expansion and change type of volume.", "Locked": "Locked", "Log": "Log", "Log in": "Log in", diff --git a/src/locales/zh.json b/src/locales/zh.json index 05cbacb2..155b6d3d 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -1370,7 +1370,7 @@ "Lock": "锁定", "Lock Instance": "锁定云主机", "Lock Status": "锁定状态", - "Lock instance will lock the operations that have a direct impact on the operation of the instance, such as shutdown, restart, delete, etc. It does not involve the mounting, unmounting and capacity expansion of volume.": "云主机锁定操作会锁定对云主机运行有直接影响的操作, 例如: 关机, 重启, 删除等,不涉及云硬盘的挂载卸载和扩容。", + "Lock instance will lock the operations that have a direct impact on the operation of the instance, such as: shutdown, restart, delete, the mounting and unmounting of volume, etc. It does not involve the capacity expansion and change type of volume.": "云主机锁定操作会锁定对云主机运行有直接影响的操作, 例如: 关机、重启、删除,云硬盘的挂载、卸载等,不涉及到云硬盘的扩容与变更类型。", "Locked": "锁定", "Log": "日志", "Log in": "登录", diff --git a/src/pages/compute/containers/Instance/actions/Lock.jsx b/src/pages/compute/containers/Instance/actions/Lock.jsx index 8cc0e5bd..2038ef50 100644 --- a/src/pages/compute/containers/Instance/actions/Lock.jsx +++ b/src/pages/compute/containers/Instance/actions/Lock.jsx @@ -70,7 +70,7 @@ export default class LockAction extends ConfirmAction { name, }) + t( - 'Lock instance will lock the operations that have a direct impact on the operation of the instance, such as shutdown, restart, delete, etc. It does not involve the mounting, unmounting and capacity expansion of volume.' + 'Lock instance will lock the operations that have a direct impact on the operation of the instance, such as: shutdown, restart, delete, the mounting and unmounting of volume, etc. It does not involve the capacity expansion and change type of volume.' ) ); }; diff --git a/src/pages/storage/containers/Volume/actions/ExtendVolume.jsx b/src/pages/storage/containers/Volume/actions/ExtendVolume.jsx index 56b485ca..6d89b28e 100644 --- a/src/pages/storage/containers/Volume/actions/ExtendVolume.jsx +++ b/src/pages/storage/containers/Volume/actions/ExtendVolume.jsx @@ -16,7 +16,6 @@ import { inject, observer } from 'mobx-react'; import { ModalAction } from 'containers/Action'; import globalVolumeStore, { VolumeStore } from 'stores/cinder/volume'; import globalProjectStore from 'stores/keystone/project'; -import globalServerStore from 'stores/nova/instance'; import { isAvailableOrInUse, setCreateVolumeSize, @@ -45,7 +44,6 @@ export class ExtendVolume extends ModalAction { this.volumeStore = new VolumeStore(); this.projectStore = globalProjectStore; fetchQuota(this, 1, this.item.volume_type); - this.checkAttachedServer(); } get tips() { @@ -78,34 +76,6 @@ export class ExtendVolume extends ModalAction { return [rest, typeSizeData]; } - async checkAttachedServer() { - const instanceIds = (this.item.attachments || []).map((it) => it.server_id); - if (!instanceIds.length) { - return; - } - const reqs = instanceIds.map((id) => - globalServerStore.pureFetchDetail({ id }) - ); - const results = await Promise.allSettled(reqs); - const lockedInstances = results - .filter(({ status }) => { - return status === 'fulfilled'; - }) - .map((it) => it.value) - .filter((server) => server.locked) - .map(({ name }) => name); - if (lockedInstances.length) { - const name = lockedInstances.join(', '); - const lockedError = t( - 'The server {name} is locked. Please unlock first.', - { name } - ); - this.setState({ - lockedError, - }); - } - } - get isQuotaLimited() { const { gigabytes: { limit } = {} } = this.projectStore.cinderQuota || {}; return limit !== -1;