feat(region): add host count when list wires

This commit is contained in:
rainzm
2021-02-03 14:40:54 +08:00
parent c4dbd9bb55
commit 68c6216167
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -44,7 +44,9 @@ type WireDetails struct {
// IP子网数量
// example: 1
Networks int `json:"networks"`
// VPC名称
// Host数量
// example: 1
HostCount int `json:"host_count"`
}
type WireResourceInfoBase struct {
+1
View File
@@ -1283,6 +1283,7 @@ func (manager *SWireManager) FetchCustomizeColumns(
}
wire := objs[i].(*SWire)
rows[i].Networks, _ = wire.NetworkCount()
rows[i].HostCount, _ = wire.HostCount()
}
return rows