From 84928acefa7d7a504cb0019d3f87376c6c0db5cf Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Thu, 17 Feb 2022 15:03:31 +0800 Subject: [PATCH] fix 1509 --- routers/repo/cloudbrain.go | 3 ++- routers/repo/modelarts.go | 3 ++- templates/repo/debugjob/index.tmpl | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 0599fb03f..5f9e81901 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -582,12 +582,13 @@ func logErrorAndUpdateJobStatus(err error, taskInfo *models.Cloudbrain) { } func CloudBrainDel(ctx *context.Context) { + var listType = ctx.Query("debugListType") if err := deleteCloudbrainJob(ctx); err != nil { log.Error("deleteCloudbrainJob failed: %v", err, ctx.Data["msgID"]) ctx.ServerError(err.Error(), err) return } - ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/debugjob?debugListType=all") + ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/debugjob?debugListType=" + listType) } func deleteCloudbrainJob(ctx *context.Context) error { diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 9dea34c82..8d5d03353 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -417,6 +417,7 @@ func NotebookManage(ctx *context.Context) { func NotebookDel(ctx *context.Context) { var jobID = ctx.Params(":jobid") + var listType = ctx.Query("debugListType") task := ctx.Cloudbrain if task.Status != string(models.ModelArtsCreateFailed) && task.Status != string(models.ModelArtsStartFailed) && task.Status != string(models.ModelArtsStopped) { @@ -442,7 +443,7 @@ func NotebookDel(ctx *context.Context) { return } - ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/debugjob?debugListType=all") + ctx.Redirect(setting.AppSubURL + ctx.Repo.RepoLink + "/debugjob?debugListType=" + listType) } func TrainJobIndex(ctx *context.Context) { diff --git a/templates/repo/debugjob/index.tmpl b/templates/repo/debugjob/index.tmpl index f7773cf2d..ef06d12b6 100755 --- a/templates/repo/debugjob/index.tmpl +++ b/templates/repo/debugjob/index.tmpl @@ -366,7 +366,7 @@