Copilot commented on code in PR #14215:
URL: https://github.com/apache/cloudstack/pull/14215#discussion_r4065276302
##########
ui/src/config/section/storage.js:
##########
@@ -291,6 +291,15 @@ export default {
return (['Admin', 'DomainAdmin'].includes(store.userInfo.roletype)
|| store.features.allowuserexpungerecovervolume) && record.state === 'Destroy'
}
},
+ {
+ api: 'assignVolume',
+ icon: 'user-add-outlined',
+ label: 'label.assign.volume.another',
+ dataView: true,
+ show: (record) => { return !('virtualmachineid' in record) },
Review Comment:
This condition tests whether the property exists, but `listVolumes`
responses include `virtualmachineid` even for detached volumes with a null
value (the API tests assert the field is present and null for detached
volumes). As a result, the assign action is hidden for every normal detached
volume. Check the value instead so only attached volumes are excluded.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]