From 7aea6c515bc8e67c9110bd9dfb7c21498675d77d Mon Sep 17 00:00:00 2001 From: liuzx Date: Fri, 25 Feb 2022 15:27:38 +0800 Subject: [PATCH] fix bug --- routers/repo/cloudbrain.go | 2 ++ routers/repo/modelarts.go | 3 +++ 2 files changed, 5 insertions(+) diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 880d28dcf..4cde5d40d 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -351,6 +351,7 @@ func CloudBrainShow(ctx *context.Context) { func cloudBrainShow(ctx *context.Context, tpName base.TplName) { ctx.Data["PageIsCloudBrain"] = true var jobName = ctx.Params(":jobname") + debugListType := ctx.Query("debugListType") task, err := models.GetCloudbrainByName(jobName) if err != nil { ctx.Data["error"] = err.Error() @@ -425,6 +426,7 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName) { version_list_task := make([]*models.Cloudbrain, 0) version_list_task = append(version_list_task, task) ctx.Data["version_list_task"] = version_list_task + ctx.Data["debugListType"] = debugListType ctx.HTML(200, tpName) } diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index ebba2e95a..6c586d38e 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -91,6 +91,7 @@ func DebugJobIndex(ctx *context.Context) { ctx.Data["Tasks"] = ciTasks ctx.Data["CanCreate"] = cloudbrain.CanCreateOrDebugJob(ctx) ctx.Data["RepoIsEmpty"] = repo.IsEmpty + ctx.Data["debugListType"] = debugListType ctx.HTML(200, tplDebugJobIndex) } @@ -227,6 +228,7 @@ func Notebook2Create(ctx *context.Context, form auth.CreateModelArtsNotebookForm func NotebookShow(ctx *context.Context) { ctx.Data["PageIsCloudBrain"] = true + debugListType := ctx.Query("debugListType") var jobID = ctx.Params(":jobid") task, err := models.GetCloudbrainByJobID(jobID) @@ -271,6 +273,7 @@ func NotebookShow(ctx *context.Context) { ctx.Data["jobID"] = jobID ctx.Data["jobName"] = task.JobName ctx.Data["result"] = result + ctx.Data["debugListType"] = debugListType ctx.HTML(200, tplModelArtsNotebookShow) }