Browse Source

fix-3133

tags/v1.22.11.1^2
liuzx 3 years ago
parent
commit
e675a4b617
2 changed files with 5 additions and 2 deletions
  1. +2
    -1
      routers/admin/cloudbrains.go
  2. +3
    -1
      routers/api/v1/repo/modelarts.go

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

@@ -70,7 +70,7 @@ func CloudBrains(ctx *context.Context) {

keyword := strings.Trim(ctx.Query("q"), " ")

ciTasks, _, err := models.Cloudbrains(&models.CloudbrainsOptions{
ciTasks, totalcount, err := models.Cloudbrains(&models.CloudbrainsOptions{
ListOptions: models.ListOptions{
Page: page,
PageSize: setting.UI.IssuePagingNum,
@@ -93,6 +93,7 @@ func CloudBrains(ctx *context.Context) {

models.LoadSpecs4CloudbrainInfo(ciTasks)
tasks := []*models.CloudbrainInfo{}
log.Info("totalcount:", totalcount)

for _, task := range ciTasks {
if aiCenter == "" || aiCenter == task.Cloudbrain.Spec.AiCenterCode {


+ 3
- 1
routers/api/v1/repo/modelarts.go View File

@@ -27,6 +27,7 @@ import (
"code.gitea.io/gitea/modules/storage"
"code.gitea.io/gitea/modules/timeutil"
routerRepo "code.gitea.io/gitea/routers/repo"
cloudbrainService "code.gitea.io/gitea/services/cloudbrain"
)

func GetModelArtsNotebook2(ctx *context.APIContext) {
@@ -172,7 +173,8 @@ func GetModelArtsTrainJobVersion(ctx *context.APIContext) {
if len(result.JobInfo.Tasks) > 0 {
if len(result.JobInfo.Tasks[0].CenterID) > 0 && len(result.JobInfo.Tasks[0].CenterName) > 0 {
job.AiCenter = result.JobInfo.Tasks[0].CenterID[0] + "+" + result.JobInfo.Tasks[0].CenterName[0]
aiCenterName = result.JobInfo.Tasks[0].CenterName[0]
// aiCenterName = result.JobInfo.Tasks[0].CenterName[0]
aiCenterName = cloudbrainService.GetAiCenterShow(job.AiCenter, ctx.Context)
}
}
} else {


Loading…
Cancel
Save