From c0a5c8a48c47970961247934e92e026f1c18cbaa Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Wed, 2 Jun 2021 18:00:59 +0800 Subject: [PATCH] add interface --- routers/repo/cloudbrain.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 8d8e97377..55d809ec9 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -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)