mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #12151 from zhaoxiangchun/automated-cherry-pick-of-#12149-upstream-release-3.7
Automated cherry pick of #12149: fix(monitor): add monitor resource details field
This commit is contained in:
@@ -33,6 +33,9 @@ type MonitorResourceListInput struct {
|
||||
type MonitorResourceDetails struct {
|
||||
apis.VirtualResourceDetails
|
||||
compute.CloudregionResourceInfo
|
||||
compute.CloudaccountResourceInfo
|
||||
Ips string `json:"ips"`
|
||||
AccessIp string `json:"access_ip"`
|
||||
|
||||
AttachAlertCount int64 `json:"attach_alert_count"`
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ type Details struct {
|
||||
Brand string
|
||||
DomainId string
|
||||
ProjectDomain string
|
||||
Ips string
|
||||
}
|
||||
type Guest struct {
|
||||
compute_models.SGuest
|
||||
|
||||
@@ -295,6 +295,10 @@ func (self *SMonitorResource) getMoreDetails(out monitor.MonitorResourceDetails)
|
||||
if err != nil {
|
||||
log.Errorf("getMoreDetails err:%v", err)
|
||||
}
|
||||
_, object := MonitorResourceManager.GetResourceObj(self.ResId)
|
||||
if object != nil {
|
||||
object.Unmarshal(&out)
|
||||
}
|
||||
out.AttachAlertCount = int64(len(joints))
|
||||
return out
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user