Browse Source

fix-kanban

tags/v1.22.11.2^2^2
liuzx 3 years ago
parent
commit
72d3ebb2d4
2 changed files with 6 additions and 4 deletions
  1. +3
    -2
      routers/admin/cloudbrains.go
  2. +3
    -2
      routers/api/v1/repo/cloudbrain_dashboard.go

+ 3
- 2
routers/admin/cloudbrains.go View File

@@ -189,7 +189,8 @@ func DownloadCloudBrains(ctx *context.Context) {
}
models.LoadSpecs4CloudbrainInfo(pageRecords)
for _, record := range pageRecords {

record = cloudbrainService.UpdateCloudbrainAiCenter(record)
record.Cloudbrain.AiCenter = repo.GetAiCenterNameByCode(record.Cloudbrain.AiCenter)
for k, v := range allValues(row, record, ctx) {
f.SetCellValue(cloudBrain, k, v)
}
@@ -211,7 +212,7 @@ func allValues(row int, rs *models.CloudbrainInfo, ctx *context.Context) map[str
return map[string]string{getCellName("A", row): rs.DisplayJobName, getCellName("B", row): repo.GetCloudbrainCluster(rs.Cloudbrain, ctx),
getCellName("C", row): rs.JobType, getCellName("D", row): rs.Status, getCellName("E", row): time.Unix(int64(rs.Cloudbrain.CreatedUnix), 0).Format(CREATE_TIME_FORMAT),
getCellName("F", row): getDurationTime(rs), getCellName("G", row): rs.ComputeResource,
getCellName("H", row): repo.GetCloudbrainAiCenter(rs.Cloudbrain, ctx), getCellName("I", row): getCloudbrainCardType(rs),
getCellName("H", row): rs.Cloudbrain.AiCenter, getCellName("I", row): getCloudbrainCardType(rs),
getCellName("J", row): rs.Name, getCellName("K", row): getRepoPathName(rs), getCellName("L", row): rs.JobName,
}
}


+ 3
- 2
routers/api/v1/repo/cloudbrain_dashboard.go View File

@@ -1225,7 +1225,8 @@ func DownloadCloudBrainBoard(ctx *context.Context) {
}
models.LoadSpecs4CloudbrainInfo(pageRecords)
for _, record := range pageRecords {

record = cloudbrainService.UpdateCloudbrainAiCenter(record)
record.Cloudbrain.AiCenter = repo.GetAiCenterNameByCode(record.Cloudbrain.AiCenter)
for k, v := range allCloudbrainValues(row, record, ctx) {
f.SetCellValue(cloudBrain, k, v)
}
@@ -1264,7 +1265,7 @@ func allCloudbrainValues(row int, rs *models.CloudbrainInfo, ctx *context.Contex
getCellName("G", row): rs.TrainJobDuration, getCellName("H", row): repo.GetCloudbrainCardDuration(rs.Cloudbrain),
getCellName("I", row): getBrainStartTime(rs),
getCellName("J", row): getBrainEndTime(rs), getCellName("K", row): rs.ComputeResource, getCellName("L", row): getCloudbrainCardType(rs),
getCellName("M", row): getWorkServerNum(rs), getCellName("N", row): repo.GetCloudbrainAiCenter(rs.Cloudbrain, ctx),
getCellName("M", row): getWorkServerNum(rs), getCellName("N", row): rs.Cloudbrain.AiCenter,
getCellName("O", row): getCloudbrainFlavorName(rs), getCellName("P", row): rs.Name,
getCellName("Q", row): getBrainRepo(rs), getCellName("R", row): rs.JobName, getCellName("S", row): getBrainDeleteTime(rs),
}


Loading…
Cancel
Save