diff --git a/modules/modelarts/modelarts.go b/modules/modelarts/modelarts.go index 538fcfbd9..b1e7b269e 100755 --- a/modules/modelarts/modelarts.go +++ b/modules/modelarts/modelarts.go @@ -280,6 +280,7 @@ func GenerateNotebook2(ctx *context.Context, displayJobName, jobName, uuid, desc RepoID: ctx.Repo.Repository.ID, JobID: jobResult.ID, JobName: jobName, + FlavorCode: flavor, DisplayJobName: displayJobName, JobType: string(models.JobTypeDebug), Type: models.TypeCloudBrainTwo, diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 4b7582d4b..1f4a275d1 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -4,6 +4,7 @@ import ( "archive/zip" "encoding/json" "errors" + "fmt" "io" "io/ioutil" "net/http" @@ -291,7 +292,16 @@ func NotebookShow(ctx *context.Context) { if modelarts.FlavorInfos == nil { json.Unmarshal([]byte(setting.FlavorInfos), &modelarts.FlavorInfos) } - ctx.Data["resource_spec"] = modelarts.FlavorInfos.FlavorInfo + if modelarts.FlavorInfos != nil { + ctx.Data["resource_spec"] = modelarts.FlavorInfos.FlavorInfo[0].Desc + for _, f := range modelarts.FlavorInfos.FlavorInfo { + if fmt.Sprint(f.Value) == task.FlavorCode { + ctx.Data["resource_spec"] = f.Desc + break + } + } + } + ctx.Data["datasetDownloadLink"] = datasetDownloadLink ctx.Data["task"] = task ctx.Data["ID"] = ID diff --git a/templates/repo/modelarts/notebook/show.tmpl b/templates/repo/modelarts/notebook/show.tmpl index 68c94cdca..35180cedd 100755 --- a/templates/repo/modelarts/notebook/show.tmpl +++ b/templates/repo/modelarts/notebook/show.tmpl @@ -56,7 +56,7 @@ margin:10px 5px ; } .tab_2_content { - min-height: 560px; + min-height: 460px; margin-left: 10px; } .ac-grid { @@ -189,9 +189,9 @@ td, th { {{$.i18n.Tr "repo.modelarts.notebook"}}
/
- -
{{.jobName}}
- + {{with .task}} +
{{.DisplayJobName}}
+ {{end}} {{with .task}} @@ -241,7 +241,7 @@ td, th {
- {{$.jobName}} + {{.DisplayJobName}}
@@ -297,20 +297,6 @@ td, th { - - - {{$.i18n.Tr "cloudbrain.dataset_storage_path"}} - - - -
- {{$.dataset_path}} -
- - - - -