diff --git a/routers/home.go b/routers/home.go index c093f6596..1b02c43ad 100755 --- a/routers/home.go +++ b/routers/home.go @@ -7,6 +7,7 @@ package routers import ( "bytes" + "fmt" "net/http" "strconv" "strings" @@ -792,9 +793,10 @@ func RecommendHomeInfo(ctx *context.Context) { func getCloudbrainNums() (map[string]string, error) { result := make(map[string]string) - result["completed_task"] = "1800" - result["running_task"] = "20" - result["wait_task"] = "30" + cloudStatusMap := models.GetAllStatusCloudBrain() + result["completed_task"] = fmt.Sprint(cloudStatusMap["COMPLETED"]) + result["running_task"] = fmt.Sprint(cloudStatusMap["RUNNING"]) + result["wait_task"] = fmt.Sprint(cloudStatusMap["WAITING"]) return result, nil }