Browse Source

fix issue

tags/v1.21.12.1
zhoupzh 4 years ago
parent
commit
2aa174a490
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      templates/repo/modelarts/trainjob/show.tmpl

+ 3
- 3
templates/repo/modelarts/trainjob/show.tmpl View File

@@ -657,7 +657,7 @@ td, th {
}
}
function downloadModelFile(version_name,parentDir,filename){
function downloadModelFile(version_name,filename){
$.get(`/api/v1/repos/${userName}/${repoPath}/modelarts/train-job/${jobID}/model_download?version_name=${version_name}&file_name=${filename}`, (data) => {
console.log(data)

@@ -680,10 +680,10 @@ td, th {
html += "<span class='octicon octicon-file-directory'>"
html += "</span>"
if(data.Dirs[i].IsDir){
html += `<a onclick="loadModelFile('${version_name}','${data.Dirs[i].ParenDir}','${data.Dirs[i].ParenDir}','folder')">`
html += `<a onclick="loadModelFile('${version_name}','${data.Dirs[i].ParenDir}','${data.Dirs[i].FileName}','folder')">`
html += "<span class='fitted'><i class='folder icon' width='16' height='16' aria-hidden='true'></i>" + data.Dirs[i].FileName + "</span>"
}else{
html += `<a onclick="downloadModelFile('${version_name}','${data.Dirs[i].ParenDir}','${data.Dirs[i].ParenDir}')">`
html += `<a onclick="downloadModelFile('${version_name}','${data.Dirs[i].FileName}')">`
html += "<span class='fitted'><i class='file icon' width='16' height='16' aria-hidden='true'></i>" + data.Dirs[i].FileName + "</span>"
}
html += '</a>'


Loading…
Cancel
Save