Browse Source

Merge branch 'zouap' of git.openi.org.cn:OpenI/aiforge into zouap

tags/v1.22.8.2^2
zhoupzh 3 years ago
parent
commit
da0925590b
2 changed files with 32 additions and 19 deletions
  1. +15
    -4
      models/cloudbrain.go
  2. +17
    -15
      templates/repo/cloudbrain/show.tmpl

+ 15
- 4
models/cloudbrain.go View File

@@ -30,9 +30,9 @@ const (
)

const (
NPUResource = "NPU"
GPUResource = "CPU/GPU"
AllResource = "all"
NPUResource = "NPU"
GPUResource = "CPU/GPU"
AllResource = "all"

//notebook storage category
EVSCategory = "EVS"
@@ -2173,7 +2173,18 @@ func GetDatasetInfo(uuidStr string) (map[string]DatasetInfo, string, error) {
log.Error("GetAttachmentsByUUIDs failed: %v", err)
return nil, datasetNames, err
}
for i, attach := range attachs {
for i, tmpUuid := range uuids {
var attach *Attachment
for _, tmpAttach := range attachs {
if tmpAttach.UUID == tmpUuid {
attach = tmpAttach
break
}
}
if attach == nil {
log.Error("GetAttachmentsByUUIDs failed: %v", err)
return nil, datasetNames, err
}
fileName := strings.TrimSuffix(strings.TrimSuffix(strings.TrimSuffix(attach.Name, ".zip"), ".tar.gz"), ".tgz")
for _, datasetInfo := range datasetInfos {
if fileName == datasetInfo.Name {


+ 17
- 15
templates/repo/cloudbrain/show.tmpl View File

@@ -404,20 +404,7 @@
</div>
</td>
</tr>
<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
{{$.i18n.Tr "repo.modelarts.train_job.dataset"}}
</td>

<td class="ti-text-form-content">
<div class="text-span text-span-w"
id="{{.VersionName}}-BenchmarkTypeName">
{{range $m ,$n := $.datasetDownload}}
<a href="{{.RepositoryLink}}" target="_blank">{{.DatasetName}}</a>
{{end}}
</div>
</td>
</tr>

<tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80">
@@ -503,7 +490,22 @@
</div>
</div>
</div>

<div style="clear:both">
<table style="border:none" class="ui fixed small stackable table">
<thead>
<tr><th style="color: #8a8e99;font-size:12px" class="three wide left aligned">数据集文件</th>
</tr></thead>
<tbody>
{{range $m ,$n := $.datasetDownload}}
<tr>
<td style="word-wrap: break-word;word-break: break-all;"><a href="{{.RepositoryLink}}" target="_blank">{{.DatasetName}}</a></td>
</tr>
{{end}}

</tbody>
</table>
</div>
</div>
</div>
<div class="ui tab" data-tab="second{{$k}}">


Loading…
Cancel
Save