Browse Source

update

tags/v1.22.1.2
liuzx 3 years ago
parent
commit
f97bcb44b1
2 changed files with 15 additions and 1 deletions
  1. +6
    -1
      routers/repo/modelarts.go
  2. +9
    -0
      routers/repo/setting.go

+ 6
- 1
routers/repo/modelarts.go View File

@@ -1292,6 +1292,11 @@ func paramCheckCreateInferenceJob(form auth.CreateModelArtsInferenceJobForm) err
return errors.New("分支名不能为空")
}

if len(form.Description) > 255 {
log.Error("the Description length(%d) must not more than 255", form.Description)
return errors.New("描述字符不能超过255个字符")
}

return nil
}

@@ -1952,7 +1957,7 @@ func InferenceJobShow(ctx *context.Context) {
task.Parameters = ""
}

LabelName := strings.Split(strings.TrimSpace(task.LabelName), " ")
LabelName := strings.Fields(task.LabelName)
ctx.Data["labelName"] = LabelName
ctx.Data["jobID"] = jobID
ctx.Data["jobName"] = task.JobName


+ 9
- 0
routers/repo/setting.go View File

@@ -61,6 +61,15 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
SetModelCount(ctx)
repo := ctx.Repo.Repository

_, jobCount, err := models.Cloudbrains(&models.CloudbrainsOptions{
RepoID: repo.ID,
})
if err != nil {
ctx.ServerError("Get job faild:", err)
return
}
ctx.Data["jobCount"] = jobCount

switch ctx.Query("action") {
case "update":
if ctx.HasError() {


Loading…
Cancel
Save