Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.4.1^2
zouap 3 years ago
parent
commit
5e7ada52c0
3 changed files with 17 additions and 20 deletions
  1. +1
    -0
      modules/modelarts/modelarts.go
  2. +11
    -1
      routers/repo/modelarts.go
  3. +5
    -19
      templates/repo/modelarts/notebook/show.tmpl

+ 1
- 0
modules/modelarts/modelarts.go View File

@@ -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,


+ 11
- 1
routers/repo/modelarts.go View File

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


+ 5
- 19
templates/repo/modelarts/notebook/show.tmpl View File

@@ -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"}}
</a>
<div class="divider"> / </div>
<div class="active section">{{.jobName}}</div>
{{with .task}}
<div class="active section">{{.DisplayJobName}}</div>
{{end}}
</div>
</h4>
{{with .task}}
@@ -241,7 +241,7 @@ td, th {
</td>
<td class="ti-text-form-content">
<div class="text-span text-span-w">
{{$.jobName}}
{{.DisplayJobName}}
</div>
</td>
</tr>
@@ -297,20 +297,6 @@ td, th {
</td>
</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>
</table>
</div>


Loading…
Cancel
Save