|
|
|
@@ -637,27 +637,6 @@ func GetCloudbrainsCreateHoursData(ctx *context.Context) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
func GetWaitTimeTop(ctx *context.Context) { |
|
|
|
|
|
|
|
cloudbrains, err := models.GetAllCloudBrain() |
|
|
|
if err != nil { |
|
|
|
log.Error("Getcloudbrains failed:%v", err) |
|
|
|
return |
|
|
|
} |
|
|
|
cloudBrainStatusResult := make(map[string]int) |
|
|
|
for _, cloudbrain := range cloudbrains { |
|
|
|
if _, ok := cloudBrainStatusResult[cloudbrain.Status]; !ok { |
|
|
|
cloudBrainStatusResult[cloudbrain.Status] = 1 |
|
|
|
} else { |
|
|
|
cloudBrainStatusResult[cloudbrain.Status] += 1 |
|
|
|
} |
|
|
|
} |
|
|
|
ctx.JSON(http.StatusOK, map[string]interface{}{ |
|
|
|
"cloudBrainStatusResult": cloudBrainStatusResult, |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
func getCloudbrainCount(beginTime time.Time, endTime time.Time, cloudbrains []*models.CloudbrainInfo) (map[string]int, map[string]int, map[string]int, map[int]int, map[string]int) { |
|
|
|
|
|
|
|
cloudOneJobTypeRes := make(map[string]int) |
|
|
|
|