Browse Source

update

tags/v1.22.6.1^2
liuzx 3 years ago
parent
commit
0d385710eb
1 changed files with 0 additions and 6 deletions
  1. +0
    -6
      routers/api/v1/repo/cloudbrain_dashboard.go

+ 0
- 6
routers/api/v1/repo/cloudbrain_dashboard.go View File

@@ -36,7 +36,6 @@ func GetAllCloudbrainsOverview(ctx *context.Context) {
return return
} }
now := time.Now() now := time.Now()
//today overview
beginTime := now.AddDate(0, 0, 0) beginTime := now.AddDate(0, 0, 0)
beginTime = time.Date(beginTime.Year(), beginTime.Month(), beginTime.Day(), 0, 0, 0, 0, now.Location()) beginTime = time.Date(beginTime.Year(), beginTime.Month(), beginTime.Day(), 0, 0, 0, 0, now.Location())
endTime := now endTime := now
@@ -97,7 +96,6 @@ func GetAllCloudbrainsOverview(ctx *context.Context) {
todayWaitingCount := todayStatusResult["INIT"] + todayStatusResult["WAITING"] todayWaitingCount := todayStatusResult["INIT"] + todayStatusResult["WAITING"]


ctx.JSON(http.StatusOK, map[string]interface{}{ ctx.JSON(http.StatusOK, map[string]interface{}{
// "todayStatusResult": todayStatusResult,
"recordBeginTime": recordBeginTime, "recordBeginTime": recordBeginTime,
"updateTime": now, "updateTime": now,
"cloudBrainNum": cloudBrainNum, "cloudBrainNum": cloudBrainNum,
@@ -304,7 +302,6 @@ func GetAllCloudbrainsTrendDetail(ctx *context.Context) {
if pagesize <= 0 { if pagesize <= 0 {
pagesize = 5 pagesize = 5
} }

pageDateCloudbrainNum := getPageDateCloudbrainNum(dayCloudbrainInfo, page, pagesize) pageDateCloudbrainNum := getPageDateCloudbrainNum(dayCloudbrainInfo, page, pagesize)


cloudbrainsPeriodData := TimeCloudbrainsNum{ cloudbrainsPeriodData := TimeCloudbrainsNum{
@@ -331,7 +328,6 @@ func getPageDateCloudbrainNum(dateCloudbrainNums []DateCloudbrainNum, page int,
} }


func GetAllCloudbrainsPeriodDistribution(ctx *context.Context) { func GetAllCloudbrainsPeriodDistribution(ctx *context.Context) {

recordBeginTime, err := getBrainRecordBeginTime() recordBeginTime, err := getBrainRecordBeginTime()
if err != nil { if err != nil {
log.Error("Can not get record begin time", err) log.Error("Can not get record begin time", err)
@@ -500,7 +496,6 @@ func GetCloudbrainsDetailData(ctx *context.Context) {
ctx.ServerError("Get job failed:", err) ctx.ServerError("Get job failed:", err)
return return
} }
// res := &models.AllTask{}
tasks := []models.TaskDetail{} tasks := []models.TaskDetail{}
for i, task := range ciTasks { for i, task := range ciTasks {
ciTasks[i].Cloudbrain.ComputeResource = task.ComputeResource ciTasks[i].Cloudbrain.ComputeResource = task.ComputeResource
@@ -526,7 +521,6 @@ func GetCloudbrainsDetailData(ctx *context.Context) {
if taskDetail.WaitTime < 0 { if taskDetail.WaitTime < 0 {
taskDetail.WaitTime = 0 taskDetail.WaitTime = 0
} }

tasks = append(tasks, taskDetail) tasks = append(tasks, taskDetail)
} }




Loading…
Cancel
Save