Browse Source

fix bug

tags/v1.22.2.2^2
liuzx 3 years ago
parent
commit
7aea6c515b
2 changed files with 5 additions and 0 deletions
  1. +2
    -0
      routers/repo/cloudbrain.go
  2. +3
    -0
      routers/repo/modelarts.go

+ 2
- 0
routers/repo/cloudbrain.go View File

@@ -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)
}



+ 3
- 0
routers/repo/modelarts.go View File

@@ -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)
}



Loading…
Cancel
Save