Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ type ServiceDeployCountWithStatus struct {
ServiceName string `bson:"service_name" json:"service_name"`
ProductName string `bson:"product_name" json:"project_key"`
ProjectName string `bson:"project_name,omitempty" json:"project_name,omitempty"`
EnvName string `bson:"env_name" json:"env_name"`
Count int `bson:"count" json:"count"`
Success int `bson:"success" json:"success"`
Failed int `bson:"failed" json:"failed"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ func (c *JobInfoColl) GetTopDeployedService(startTime, endTime int64, projectNam
"production": "$production",
"service_name": "$service_name",
"product_name": "$product_name",
"env_name": "$target_env",
},
"count": bson.M{"$sum": 1},
"success": bson.M{"$sum": bson.M{
Expand All @@ -400,6 +401,7 @@ func (c *JobInfoColl) GetTopDeployedService(startTime, endTime int64, projectNam
"production": "$_id.production",
"service_name": "$_id.service_name",
"product_name": "$_id.product_name",
"env_name": "$_id.env_name",
"count": 1,
"success": 1,
"failed": 1,
Expand Down Expand Up @@ -427,6 +429,7 @@ func (c *JobInfoColl) GetTopDeployedService(startTime, endTime int64, projectNam
"production": 1,
"service_name": 1,
"product_name": 1,
"env_name": 1,
"count": 1,
"success": 1,
"failed": 1,
Expand Down Expand Up @@ -486,6 +489,7 @@ func (c *JobInfoColl) GetTopDeployFailedService(startTime, endTime int64, projec
"production": "$production",
"service_name": "$service_name",
"product_name": "$product_name",
"env_name": "$target_env",
},
"count": bson.M{"$sum": bson.M{
"$cond": bson.D{
Expand All @@ -504,6 +508,7 @@ func (c *JobInfoColl) GetTopDeployFailedService(startTime, endTime int64, projec
"production": "$_id.production",
"service_name": "$_id.service_name",
"product_name": "$_id.product_name",
"env_name": "$_id.env_name",
"count": 1,
},
})
Expand All @@ -528,6 +533,7 @@ func (c *JobInfoColl) GetTopDeployFailedService(startTime, endTime int64, projec
"production": 1,
"service_name": 1,
"product_name": 1,
"env_name": 1,
"count": 1,
"project_name": bson.M{"$first": "$template_product_info.project_name"},
},
Expand Down
Loading