mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-11-05 23:41:47 +08:00
Merge pull request #862 in YUNIONIO/onecloud from ~QIUJIAN/onecloud:hotfix/qj-image-usage-total-usage to release/2.5.0
* commit 'be80187eb334d053669b6fa1a681aac06c124e24': glance的usage指标增加所有镜像(image + iso)的统计
This commit is contained in:
@@ -716,10 +716,14 @@ func (manager *SImageManager) Usage(projectId string, prefix string) map[string]
|
||||
expandUsageCount(usages, prefix, "img", "", count)
|
||||
count = manager.count(projectId, IMAGE_STATUS_ACTIVE, tristate.True, false)
|
||||
expandUsageCount(usages, prefix, "iso", "", count)
|
||||
count = manager.count(projectId, IMAGE_STATUS_ACTIVE, tristate.None, false)
|
||||
expandUsageCount(usages, prefix, "imgiso", "", count)
|
||||
count = manager.count(projectId, "", tristate.False, true)
|
||||
expandUsageCount(usages, prefix, "img", "pending_delete", count)
|
||||
count = manager.count(projectId, "", tristate.True, true)
|
||||
expandUsageCount(usages, prefix, "iso", "pending_delete", count)
|
||||
count = manager.count(projectId, "", tristate.None, true)
|
||||
expandUsageCount(usages, prefix, "imgiso", "pending_delete", count)
|
||||
return usages
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user