fix(region): add storage name for snapshot (#20829)

This commit is contained in:
屈轩
2024-07-17 22:55:49 +08:00
committed by GitHub
parent 7c90f63e8d
commit 234d8da1cb
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -92,6 +92,8 @@ type SnapshotDetails struct {
// 存储类型
StorageType string `json:"storage_type"`
// 存储名称
Storage string `json:"storage"`
// 磁盘状态
DiskStatus string `json:"disk_status"`
// 云主机名称
+1
View File
@@ -391,6 +391,7 @@ func (manager *SSnapshotManager) FetchCustomizeColumns(
for i := range rows {
if storage, ok := storages[storageIds[i]]; ok {
rows[i].StorageType = storage.StorageType
rows[i].Storage = storage.Name
}
if disk, ok := disks[diskIds[i]]; ok {
rows[i].DiskStatus = disk.Status