|
|
|
@@ -21,7 +21,7 @@ import ( |
|
|
|
const ( |
|
|
|
tplCloudBrains base.TplName = "admin/cloudbrain/list" |
|
|
|
EXCEL_DATE_FORMAT = "20060102150405" |
|
|
|
CREATE_TIME_FORMAT = "2006/01/02 15:04:05.00" |
|
|
|
CREATE_TIME_FORMAT = "2006/01/02 15:04:05" |
|
|
|
) |
|
|
|
|
|
|
|
func CloudBrains(ctx *context.Context) { |
|
|
|
@@ -179,7 +179,7 @@ func DownloadCloudBrains(ctx *context.Context) { |
|
|
|
} |
|
|
|
|
|
|
|
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.JobType, getCellName("C", row): rs.Status, 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): getRepoPathName(rs), getCellName("I", row): rs.JobName, |
|
|
|
} |
|
|
|
} |
|
|
|
@@ -216,7 +216,7 @@ func getTotalPage(total int64, pageSize int) int { |
|
|
|
|
|
|
|
func allHeader(ctx *context.Context) map[string]string { |
|
|
|
|
|
|
|
return map[string]string{"A1": ctx.Tr("repo.cloudbrain_task"), "B1": ctx.Tr("repo.modelarts.status"), "C1": ctx.Tr("repo.cloudbrain_task_type"), "D1": ctx.Tr("repo.modelarts.createtime"), "E1": ctx.Tr("repo.modelarts.train_job.dura_time"), "F1": ctx.Tr("repo.modelarts.computing_resources"), "G1": ctx.Tr("repo.cloudbrain_creator"), "H1": ctx.Tr("repo.repo_name"), "I1": ctx.Tr("repo.cloudbrain_task_name")} |
|
|
|
return map[string]string{"A1": ctx.Tr("repo.cloudbrain_task"), "B1": ctx.Tr("repo.cloudbrain_task_type"), "C1": ctx.Tr("repo.modelarts.status"), "D1": ctx.Tr("repo.modelarts.createtime"), "E1": ctx.Tr("repo.modelarts.train_job.dura_time"), "F1": ctx.Tr("repo.modelarts.computing_resources"), "G1": ctx.Tr("repo.cloudbrain_creator"), "H1": ctx.Tr("repo.repo_name"), "I1": ctx.Tr("repo.cloudbrain_task_name")} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|