diff --git a/src/routes/volume/VolumeActions.js b/src/routes/volume/VolumeActions.js index 7212fdda..6936d623 100644 --- a/src/routes/volume/VolumeActions.js +++ b/src/routes/volume/VolumeActions.js @@ -248,7 +248,7 @@ function actions({ }) availableActions.push({ key: 'cloneVolume', name: 'Clone Volume', disabled: selected.standby || isRestoring(selected) }) - availableActions.push({ key: 'expandVolume', name: 'Expand Volume', disabled: selected?.conditions?.Scheduled?.status?.toLowerCase() === 'false' }) + availableActions.push({ key: 'expandVolume', name: 'Expand Volume', disabled: selected?.conditions?.Scheduled?.status?.toLowerCase() !== 'true' }) if (selected.controllers && selected.controllers[0] && !selected.controllers[0].isExpanding && selected.controllers[0].size !== 0 && selected.controllers[0].size !== selected.size && selected.controllers[0].size !== '0') { availableActions.push({ key: 'cancelExpansion', name: 'Cancel Expansion', disabled: false }) } diff --git a/src/routes/volume/VolumeBulkActions.js b/src/routes/volume/VolumeBulkActions.js index 1dc33d81..edb999b5 100644 --- a/src/routes/volume/VolumeBulkActions.js +++ b/src/routes/volume/VolumeBulkActions.js @@ -181,7 +181,7 @@ function bulkActions({ return false }) } - const conditionsScheduled = () => selectedRows.some(item => item.conditions && item.conditions.Scheduled && item.conditions.Scheduled.status && item.conditions.Scheduled.status.toLowerCase() === 'true') + const disableExpandVolume = () => selectedRows.some(item => item.conditions?.Scheduled?.status?.toLowerCase() !== 'true') const upgradingEngine = () => selectedRows.some((item) => item.currentImage !== item.image) const notAttached = () => selectedRows.some(item => item.state !== 'attached') /* @@ -199,7 +199,7 @@ function bulkActions({ const allDropDownActions = [ { key: 'upgrade', name: 'Upgrade Engine', disabled() { return selectedRows.length === 0 || isAutomaticallyUpgradeEngine() || !hasAction('engineUpgrade') || hasDoingState() || hasMoreOptions() || hasVolumeRestoring() || canUpgradeEngine() } }, - { key: 'expandVolume', name: 'Expand Volume', disabled() { return selectedRows.length === 0 || !conditionsScheduled() } }, + { key: 'expandVolume', name: 'Expand Volume', disabled() { return selectedRows.length === 0 || disableExpandVolume() } }, { key: 'updateBulkReplicaCount', name: 'Update Replicas Count', disabled() { return selectedRows.length === 0 || isHasStandy() || disableUpdateBulkReplicaCount() || upgradingEngine() } }, { key: 'updateBulkDataLocality', name: 'Update Data Locality', disabled() { return selectedRows.length === 0 || isHasStandy() || disableUpdateBulkDataLocality() || upgradingEngine() } }, { key: 'updateSnapshotDataIntegrity', name: 'Snapshot Data Integrity', disabled() { return selectedRows.length === 0 } },