This is an automated email from the ASF dual-hosted git repository. DaanHoogland pushed a commit to branch ghi14572-projectVmVolumes in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 1f4dc03e604189fad831cbd4567f9546f80fd067 Author: Daan Hoogland <[email protected]> AuthorDate: Wed Nov 4 19:44:31 2026 +0100 ui: list volumes of project-owned instances outside project view --- .../components/view/InstanceVolumesStoragePoolSelectListView.vue | 3 ++- ui/src/components/view/VolumesTab.vue | 2 +- ui/src/views/compute/CreateSnapshotWizard.vue | 2 +- ui/src/views/compute/DestroyVM.vue | 8 +++++--- ui/src/views/compute/MigrateWizard.vue | 3 ++- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ui/src/components/view/InstanceVolumesStoragePoolSelectListView.vue b/ui/src/components/view/InstanceVolumesStoragePoolSelectListView.vue index 67a2bceb23e..0befea938e5 100644 --- a/ui/src/components/view/InstanceVolumesStoragePoolSelectListView.vue +++ b/ui/src/components/view/InstanceVolumesStoragePoolSelectListView.vue @@ -170,7 +170,8 @@ export default { this.volumes = [] api('listVolumes', { listAll: true, - virtualmachineid: this.resource.id + virtualmachineid: this.resource.id, + projectid: this.resource.projectid }).then(response => { var volumes = response.listvolumesresponse.volume if (volumes && volumes.length > 0) { diff --git a/ui/src/components/view/VolumesTab.vue b/ui/src/components/view/VolumesTab.vue index 498640dcd46..e26f04bbffb 100644 --- a/ui/src/components/view/VolumesTab.vue +++ b/ui/src/components/view/VolumesTab.vue @@ -132,7 +132,7 @@ export default { } }, getVolumes () { - api('listVolumes', { listall: true, listsystemvms: true, virtualmachineid: this.vm.id }).then(json => { + api('listVolumes', { listall: true, listsystemvms: true, virtualmachineid: this.vm.id, projectid: this.vm.projectid }).then(json => { this.volumes = json.listvolumesresponse.volume if (this.volumes) { this.volumes.sort((a, b) => { return a.deviceid - b.deviceid }) diff --git a/ui/src/views/compute/CreateSnapshotWizard.vue b/ui/src/views/compute/CreateSnapshotWizard.vue index d19208a1808..fbfec565cff 100644 --- a/ui/src/views/compute/CreateSnapshotWizard.vue +++ b/ui/src/views/compute/CreateSnapshotWizard.vue @@ -124,7 +124,7 @@ export default { this.hypervisorSupportsQuiesceVm = true } - api('listVolumes', { virtualMachineId: this.resource.id, listall: true }) + api('listVolumes', { virtualMachineId: this.resource.id, projectid: this.resource.projectid, listall: true }) .then(json => { this.listVolumes = json.listvolumesresponse.volume || [] }) diff --git a/ui/src/views/compute/DestroyVM.vue b/ui/src/views/compute/DestroyVM.vue index 13448252fb8..38a5a90fdde 100644 --- a/ui/src/views/compute/DestroyVM.vue +++ b/ui/src/views/compute/DestroyVM.vue @@ -209,7 +209,8 @@ export default { loading: true, opts: [] } - promises.push(this.callListVolume(vmId)) + const vm = this.selectedItems.find(item => item.id === vmId) + promises.push(this.callListVolume(vmId, vm?.projectid)) }) Promise.all(promises).then((data) => { data.forEach(item => { @@ -221,15 +222,16 @@ export default { }, async fetchVolumes () { this.loading = true - const data = await this.callListVolume(this.resource.id) + const data = await this.callListVolume(this.resource.id, this.resource.projectid) this.volumes = data.volumes || [] this.loading = false }, - callListVolume (vmId) { + callListVolume (vmId, projectId) { return new Promise((resolve) => { this.volumes = [] api('listVolumes', { virtualMachineId: vmId, + projectid: projectId, type: 'DATADISK', details: 'min', listall: 'true' diff --git a/ui/src/views/compute/MigrateWizard.vue b/ui/src/views/compute/MigrateWizard.vue index eee29845ead..aac388b53c0 100644 --- a/ui/src/views/compute/MigrateWizard.vue +++ b/ui/src/views/compute/MigrateWizard.vue @@ -306,7 +306,8 @@ export default { this.volumes = [] api('listVolumes', { listAll: true, - virtualmachineid: this.resource.id + virtualmachineid: this.resource.id, + projectid: this.resource.projectid }).then(response => { this.volumes = response?.listvolumesresponse?.volume || [] }).finally(() => {
