Browse Source

fix-bug

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

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

@@ -688,6 +688,13 @@ func GetCloudbrainsDetailData(ctx *context.Context) {
if WaitTimeInt < 0 {
taskDetail.WaitTime = "00:00:00"
}
} else if ciTasks[i].Cloudbrain.Status == string(models.JobStopped) && ciTasks[i].Cloudbrain.StartTime.AsTime().Unix() == 0 {
WaitTimeInt := ciTasks[i].Cloudbrain.EndTime.AsTime().Unix() - ciTasks[i].Cloudbrain.CreatedUnix.AsTime().Unix()
taskDetail.WaitTime = models.ConvertDurationToStr(WaitTimeInt)
if WaitTimeInt < 0 {
taskDetail.WaitTime = "00:00:00"

}
} else {
WaitTimeInt := ciTasks[i].Cloudbrain.StartTime.AsTime().Unix() - ciTasks[i].Cloudbrain.CreatedUnix.AsTime().Unix()
taskDetail.WaitTime = models.ConvertDurationToStr(WaitTimeInt)


Loading…
Cancel
Save