diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index cff7f6e94..d26b8f08c 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 a6a7c9d96..647afb0d0 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -418,6 +418,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) { @@ -443,7 +444,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 f093f0258..a6df8e2ed 100755 --- a/templates/repo/debugjob/index.tmpl +++ b/templates/repo/debugjob/index.tmpl @@ -366,7 +366,7 @@
- + {{$.CsrfTokenHtml}} {{if .CanDel}}