Resource fetching missing projectid: "-1" parameter
還沒有人認領這個 Issue。
評估
- 難度
- 1/5
- 預估耗時
- 1 小時以內
- 新手友好度
- 88/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- javascript
- 領域
- frontend
研究方向
從 ui/src/components/view/VolumesTab.vue 中的 getVolumes 方法及其 listVolumes API 呼叫開始。確認請求包含 projectid: "-1",然後重現列出的 project-scope 情境,並確認執行個體的 Volumes 分頁在預設檢視中顯示其磁碟區。
由索引模型根據 Issue 內容生成。
描述
problem
When viewing a resource, for example an instance, that is currently in a project that differs from the currently selected or global project scope, it will attempt to fetch volumes yet none will return as it is only filtering on the ones that are owned by this user (not the project user).
versions
The only relevant version is the UI and management server; replicated on 4.23.0.0. Also replicated this issue to the current HEAD of main.
The steps to reproduce the bug
- Create a project "test".
- Create (for example) and instance under that project "instance-01".
- (Optionally) add another volume to this instance.
- Make sure you have no project enabled at the top of the page ("Default view").
- Go to instances, turn on the project slider and select "instance-01" in the list.
- Browse to the Volumes tab and notice that this list is empty.
What to do about it?
Add the {projectid: "-1"} parameter to this API call. Unsure whether this happens to other resources (like NICs), I have not tested this.
diff --git a/ui/src/components/view/VolumesTab.vue b/ui/src/components/view/VolumesTab.vue
index b65933a643..e4679c02dc 100644
--- a/ui/src/components/view/VolumesTab.vue
+++ b/ui/src/components/view/VolumesTab.vue
@@ -141,7 +141,7 @@ export default {
}
},
getVolumes () {
- getAPI('listVolumes', { listall: true, listsystemvms: true, virtualmachineid: this.vm.id }).then(json => {
+ getAPI('listVolumes', { listall: true, listsystemvms: true, projectid: "-1", virtualmachineid: this.vm.id }).then(json => {
this.volumes = json.listvolumesresponse.volume
if (this.volumes) {
this.volumes.sort((a, b) => { return a.deviceid - b.deviceid })
- 主要語言
- Java
- 星號
- 3.1k
- 分支
- 1.4k
- 平均合併
- 7 天 5 小時
- 30 天內合併 PR
- 28
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
apache/cloudstack 的其他 Issue
-
bug component:kubernetes
難度 1/5 1 小時以內 新手友好度 88/100
apache/cloudstack#14180 ·
-
component:backup
難度 2/5 1-3 小時 新手友好度 76/100
apache/cloudstack#14013 ·
-
KVM agent fails to connect to Ceph RBD storage pool after upgrading Ceph client to Tentacle 20.2.4 未關閉bug component:ceph
難度 2/5 1-3 小時 新手友好度 78/100
apache/cloudstack#13989 · 3 則留言 ·
-
component:UI
難度 2/5 1-3 小時 新手友好度 68/100
apache/cloudstack#13944 · 3 則留言 ·
-
bug
難度 2/5 1-3 小時 新手友好度 84/100
apache/cloudstack#13921 ·
查看 apache/cloudstack 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 82/100
infinispan/infinispan#18150 ·
-
難度 2/5 1-3 小時 新手友好度 84/100
-
untriaged
難度 2/5 1-3 小時 新手友好度 82/100
opensearch-project/k-NN#3597 ·
-
bug
難度 2/5 1-3 小時 新手友好度 88/100
-
bug
難度 2/5 1-3 小時 新手友好度 82/100