|
|
|
@@ -23,6 +23,7 @@ const ( |
|
|
|
tplCloudBrainIndex base.TplName = "repo/cloudbrain/index" |
|
|
|
tplCloudBrainNew base.TplName = "repo/cloudbrain/new" |
|
|
|
tplCloudBrainShow base.TplName = "repo/cloudbrain/show" |
|
|
|
tplCloudBrainShowModels base.TplName = "repo/cloudbrain/show_models" |
|
|
|
) |
|
|
|
|
|
|
|
var ( |
|
|
|
@@ -332,6 +333,24 @@ func CloudBrainDel(ctx *context.Context) { |
|
|
|
ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/cloudbrain") |
|
|
|
} |
|
|
|
|
|
|
|
func CloudBrainGetModels(ctx *context.Context) { |
|
|
|
ctx.Data["PageIsCloudBrain"] = true |
|
|
|
|
|
|
|
var jobID = ctx.Params(":jobid") |
|
|
|
task, err := models.GetCloudbrainByJobID(jobID) |
|
|
|
if err != nil { |
|
|
|
log.Error("no such job!") |
|
|
|
ctx.RenderWithErr("no such job!", tplCloudBrainIndex, nil) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ctx.Data["task"] = task |
|
|
|
ctx.Data["jobID"] = jobID |
|
|
|
ctx.HTML(200, tplCloudBrainShowModels) |
|
|
|
} |
|
|
|
|
|
|
|
func GetRate(ctx *context.Context) { |
|
|
|
var jobID = ctx.Params(":jobid") |
|
|
|
job, err := models.GetCloudbrainByJobID(jobID) |
|
|
|
|