|
|
|
@@ -386,11 +386,19 @@ func ShowModelConvertInfo(ctx *context.Context) { |
|
|
|
ctx.Data["ModelManageAccess"] = ctx.Repo.CanWrite(models.UnitTypeModelManage) |
|
|
|
|
|
|
|
job, err := models.QueryModelConvertById(ctx.Query("ID")) |
|
|
|
ctx.Data["canDownload"] = isOper(ctx, job.UserId) |
|
|
|
|
|
|
|
if err == nil { |
|
|
|
ctx.Data["task"] = job |
|
|
|
} else { |
|
|
|
ctx.ServerError("Not found task.", err) |
|
|
|
return |
|
|
|
} |
|
|
|
ctx.Data["canDownload"] = isOper(ctx, job.UserId) |
|
|
|
user, err := models.GetUserByID(job.UserId) |
|
|
|
if err == nil { |
|
|
|
job.UserName = user.Name |
|
|
|
job.UserRelAvatarLink = user.RelAvatarLink() |
|
|
|
} |
|
|
|
|
|
|
|
if isCloudBrainTask(job) { |
|
|
|
ctx.Data["npu_display"] = "none" |
|
|
|
ctx.Data["gpu_display"] = "block" |
|
|
|
|