|
|
|
@@ -36,7 +36,6 @@ func GetAllCloudbrainsOverview(ctx *context.Context) { |
|
|
|
return |
|
|
|
} |
|
|
|
now := time.Now() |
|
|
|
//today overview |
|
|
|
beginTime := now.AddDate(0, 0, 0) |
|
|
|
beginTime = time.Date(beginTime.Year(), beginTime.Month(), beginTime.Day(), 0, 0, 0, 0, now.Location()) |
|
|
|
endTime := now |
|
|
|
@@ -97,7 +96,6 @@ func GetAllCloudbrainsOverview(ctx *context.Context) { |
|
|
|
todayWaitingCount := todayStatusResult["INIT"] + todayStatusResult["WAITING"] |
|
|
|
|
|
|
|
ctx.JSON(http.StatusOK, map[string]interface{}{ |
|
|
|
// "todayStatusResult": todayStatusResult, |
|
|
|
"recordBeginTime": recordBeginTime, |
|
|
|
"updateTime": now, |
|
|
|
"cloudBrainNum": cloudBrainNum, |
|
|
|
@@ -304,7 +302,6 @@ func GetAllCloudbrainsTrendDetail(ctx *context.Context) { |
|
|
|
if pagesize <= 0 { |
|
|
|
pagesize = 5 |
|
|
|
} |
|
|
|
|
|
|
|
pageDateCloudbrainNum := getPageDateCloudbrainNum(dayCloudbrainInfo, page, pagesize) |
|
|
|
|
|
|
|
cloudbrainsPeriodData := TimeCloudbrainsNum{ |
|
|
|
@@ -331,7 +328,6 @@ func getPageDateCloudbrainNum(dateCloudbrainNums []DateCloudbrainNum, page int, |
|
|
|
} |
|
|
|
|
|
|
|
func GetAllCloudbrainsPeriodDistribution(ctx *context.Context) { |
|
|
|
|
|
|
|
recordBeginTime, err := getBrainRecordBeginTime() |
|
|
|
if err != nil { |
|
|
|
log.Error("Can not get record begin time", err) |
|
|
|
@@ -500,7 +496,6 @@ func GetCloudbrainsDetailData(ctx *context.Context) { |
|
|
|
ctx.ServerError("Get job failed:", err) |
|
|
|
return |
|
|
|
} |
|
|
|
// res := &models.AllTask{} |
|
|
|
tasks := []models.TaskDetail{} |
|
|
|
for i, task := range ciTasks { |
|
|
|
ciTasks[i].Cloudbrain.ComputeResource = task.ComputeResource |
|
|
|
@@ -526,7 +521,6 @@ func GetCloudbrainsDetailData(ctx *context.Context) { |
|
|
|
if taskDetail.WaitTime < 0 { |
|
|
|
taskDetail.WaitTime = 0 |
|
|
|
} |
|
|
|
|
|
|
|
tasks = append(tasks, taskDetail) |
|
|
|
} |
|
|
|
|
|
|
|
|