diff --git a/modules/storage/minio_ext.go b/modules/storage/minio_ext.go index 05b692335..4b738c068 100755 --- a/modules/storage/minio_ext.go +++ b/modules/storage/minio_ext.go @@ -214,47 +214,6 @@ func GetOneLevelAllObjectUnderDirMinio(bucket string, prefixRootPath string, rel ParenDir: ParenDir, } fileInfos = append(fileInfos, fileInfo) - - // log.Info("val key=" + val.Key) - // var isDir bool - // var fileName string - // if val.Key == Prefix { - // continue - // } - - // fileName = val.Key[prefixLen:] - // log.Info("fileName =" + fileName) - // files := strings.Split(fileName, "/") - // if fileMap[files[0]] { - // continue - // } else { - // fileMap[files[0]] = true - // } - // ParenDir := relativePath - // fileName = files[0] - // if len(files) > 1 { - // isDir = true - // ParenDir += fileName + "/" - // } else { - // isDir = false - // } - - // // if strings.HasSuffix(val.Key, "/") { - // // isDir = true - // // fileName = val.Key[prefixLen : len(val.Key)-1] - // // relativePath += val.Key[prefixLen:] - // // } else { - // // isDir = false - // // fileName = val.Key[prefixLen:] - // // } - // fileInfo := FileInfo{ - // ModTime: val.LastModified.Local().Format("2006-01-02 15:04:05"), - // FileName: fileName, - // Size: val.Size, - // IsDir: isDir, - // ParenDir: relativePath, - // } - // fileInfos = append(fileInfos, fileInfo) } return fileInfos, err } else { diff --git a/templates/repo/grampus/trainjob/show.tmpl b/templates/repo/grampus/trainjob/show.tmpl index 728b876b5..25f1af82b 100755 --- a/templates/repo/grampus/trainjob/show.tmpl +++ b/templates/repo/grampus/trainjob/show.tmpl @@ -773,7 +773,7 @@ } if (srcEngine == 'mindspore') { $('#choice_Engine .default.text').text("MindSpore"); - $('#choice_Engine input[name="Engine"]').val(1) + $('#choice_Engine input[name="Engine"]').val(2) } } }else{ diff --git a/templates/repo/modelmanage/index.tmpl b/templates/repo/modelmanage/index.tmpl index c42f1ba7b..52b042c46 100644 --- a/templates/repo/modelmanage/index.tmpl +++ b/templates/repo/modelmanage/index.tmpl @@ -325,6 +325,7 @@ $('#name').val(modelName) $('#version').val("0.0.1") } + let dirKey="isOnlyDir--:&"; function showcreate(obj) { $('.ui.modal.second') .modal({ @@ -460,7 +461,7 @@ var zNodes=[]; var nodesMap={}; for (let i=0;i0){ - node["children"]=[]; - if(isFirst){ - node["open"] = true; - isFirst= false; + if(nodesMap[keyList[i]][dirKey] != null){ + node["open"] = false; + node["isParent"] = true; + }else{ + node["children"]=[]; + if(isFirst){ + node["open"] = true; + isFirst= false; + } + convertToNode(node["children"],nodesMap[keyList[i]]); } - convertToNode(node["children"],nodesMap[keyList[i]]); + } } }