Browse Source

update

tags/v1.22.1.2
liuzx 3 years ago
parent
commit
bfaa9932f9
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      routers/repo/modelarts.go

+ 8
- 0
routers/repo/modelarts.go View File

@@ -1764,6 +1764,13 @@ func InferenceJobIndex(ctx *context.Context) {
tasks[i].ComputeResource = models.NPUResource
}

//判断权限
canNewJob, _ := canUserCreateTrainJobVersion(ctx, tasks[0].UserID)
if !canNewJob {
ctx.ServerError("user can not download", err)
return
}

pager := context.NewPagination(int(count), setting.UI.IssuePagingNum, page, 5)
pager.SetDefaultParams(ctx)
ctx.Data["Page"] = pager
@@ -1772,6 +1779,7 @@ func InferenceJobIndex(ctx *context.Context) {
ctx.Data["Tasks"] = tasks
ctx.Data["CanCreate"] = cloudbrain.CanCreateOrDebugJob(ctx)
ctx.Data["RepoIsEmpty"] = repo.IsEmpty
ctx.Data["canNewJob"] = canNewJob
ctx.HTML(200, tplModelArtsInferenceJobIndex)
}
func InferenceJobNew(ctx *context.Context) {


Loading…
Cancel
Save