| @@ -179,10 +179,17 @@ func DownloadCloudBrains(ctx *context.Context) { | |||||
| func allValues(row int, rs *models.CloudbrainInfo, ctx *context.Context) map[string]string { | func allValues(row int, rs *models.CloudbrainInfo, ctx *context.Context) map[string]string { | ||||
| return map[string]string{getCellName("A", row): rs.JobName, getCellName("B", row): rs.Status, getCellName("C", row): rs.JobType, getCellName("D", row): time.Unix(int64(rs.Cloudbrain.CreatedUnix), 0).Format(CREATE_TIME_FORMAT), getCellName("E", row): getDurationTime(rs), | return map[string]string{getCellName("A", row): rs.JobName, getCellName("B", row): rs.Status, getCellName("C", row): rs.JobType, getCellName("D", row): time.Unix(int64(rs.Cloudbrain.CreatedUnix), 0).Format(CREATE_TIME_FORMAT), getCellName("E", row): getDurationTime(rs), | ||||
| getCellName("F", row): rs.ComputeResource, getCellName("G", row): rs.Name, getCellName("H", row): rs.Repo.OwnerName + "/" + rs.Repo.Alias, getCellName("I", row): rs.JobName, | |||||
| getCellName("F", row): rs.ComputeResource, getCellName("G", row): rs.Name, getCellName("H", row): getRepoPathName(rs), getCellName("I", row): rs.JobName, | |||||
| } | } | ||||
| } | } | ||||
| func getRepoPathName(rs *models.CloudbrainInfo) string { | |||||
| if rs.Repo != nil { | |||||
| return rs.Repo.OwnerName + "/" + rs.Repo.Alias | |||||
| } | |||||
| return "" | |||||
| } | |||||
| func getDurationTime(rs *models.CloudbrainInfo) string { | func getDurationTime(rs *models.CloudbrainInfo) string { | ||||
| if rs.JobType == "TRAIN" || rs.JobType == "INFERENCE" { | if rs.JobType == "TRAIN" || rs.JobType == "INFERENCE" { | ||||
| return rs.TrainJobDuration | return rs.TrainJobDuration | ||||