|
|
|
@@ -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) { |
|
|
|
|