| @@ -280,6 +280,7 @@ func GenerateNotebook2(ctx *context.Context, displayJobName, jobName, uuid, desc | |||||
| RepoID: ctx.Repo.Repository.ID, | RepoID: ctx.Repo.Repository.ID, | ||||
| JobID: jobResult.ID, | JobID: jobResult.ID, | ||||
| JobName: jobName, | JobName: jobName, | ||||
| FlavorCode: flavor, | |||||
| DisplayJobName: displayJobName, | DisplayJobName: displayJobName, | ||||
| JobType: string(models.JobTypeDebug), | JobType: string(models.JobTypeDebug), | ||||
| Type: models.TypeCloudBrainTwo, | Type: models.TypeCloudBrainTwo, | ||||
| @@ -4,6 +4,7 @@ import ( | |||||
| "archive/zip" | "archive/zip" | ||||
| "encoding/json" | "encoding/json" | ||||
| "errors" | "errors" | ||||
| "fmt" | |||||
| "io" | "io" | ||||
| "io/ioutil" | "io/ioutil" | ||||
| "net/http" | "net/http" | ||||
| @@ -291,7 +292,16 @@ func NotebookShow(ctx *context.Context) { | |||||
| if modelarts.FlavorInfos == nil { | if modelarts.FlavorInfos == nil { | ||||
| json.Unmarshal([]byte(setting.FlavorInfos), &modelarts.FlavorInfos) | 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["datasetDownloadLink"] = datasetDownloadLink | ||||
| ctx.Data["task"] = task | ctx.Data["task"] = task | ||||
| ctx.Data["ID"] = ID | ctx.Data["ID"] = ID | ||||
| @@ -56,7 +56,7 @@ | |||||
| margin:10px 5px ; | margin:10px 5px ; | ||||
| } | } | ||||
| .tab_2_content { | .tab_2_content { | ||||
| min-height: 560px; | |||||
| min-height: 460px; | |||||
| margin-left: 10px; | margin-left: 10px; | ||||
| } | } | ||||
| .ac-grid { | .ac-grid { | ||||
| @@ -189,9 +189,9 @@ td, th { | |||||
| {{$.i18n.Tr "repo.modelarts.notebook"}} | {{$.i18n.Tr "repo.modelarts.notebook"}} | ||||
| </a> | </a> | ||||
| <div class="divider"> / </div> | <div class="divider"> / </div> | ||||
| <div class="active section">{{.jobName}}</div> | |||||
| {{with .task}} | |||||
| <div class="active section">{{.DisplayJobName}}</div> | |||||
| {{end}} | |||||
| </div> | </div> | ||||
| </h4> | </h4> | ||||
| {{with .task}} | {{with .task}} | ||||
| @@ -241,7 +241,7 @@ td, th { | |||||
| </td> | </td> | ||||
| <td class="ti-text-form-content"> | <td class="ti-text-form-content"> | ||||
| <div class="text-span text-span-w"> | <div class="text-span text-span-w"> | ||||
| {{$.jobName}} | |||||
| {{.DisplayJobName}} | |||||
| </div> | </div> | ||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| @@ -297,20 +297,6 @@ td, th { | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| <tr class="ti-no-ng-animate"> | |||||
| <td class="ti-no-ng-animate ti-text-form-label text-width80"> | |||||
| {{$.i18n.Tr "cloudbrain.dataset_storage_path"}} | |||||
| </td> | |||||
| <td class="ti-text-form-content"> | |||||
| <div class="text-span text-span-w" id="dataset_storage_path"> | |||||
| {{$.dataset_path}} | |||||
| </div> | |||||
| </td> | |||||
| </tr> | |||||
| </tbody> | </tbody> | ||||
| </table> | </table> | ||||
| </div> | </div> | ||||