Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/2681 Reviewed-by: zhoupzh <zhoupzh@pcl.ac.cn>tags/v1.22.8.1^2
| @@ -413,7 +413,7 @@ | |||
| <div class="text-span text-span-w" | |||
| id="{{.VersionName}}-BenchmarkTypeName"> | |||
| {{range $m ,$n := $.datasetDownload}} | |||
| <a href="{{.RepositoryLink}}">{{.DatasetName}}</a> | |||
| <a href="{{.RepositoryLink}}" target="_blank">{{.DatasetName}}</a> | |||
| {{end}} | |||
| </div> | |||
| </td> | |||
| @@ -702,7 +702,7 @@ | |||
| hideMenu(); | |||
| } | |||
| } | |||
| let dirKey="isOnlyDir--:&"; | |||
| function loadSelectedModelFile(trainJob){ | |||
| console.log("trainJob=" + trainJob); | |||
| $('#choice_file').dropdown('clear') | |||
| @@ -717,7 +717,7 @@ | |||
| var zNodes=[]; | |||
| var nodesMap={}; | |||
| for (let i=0;i<n_length;i++){ | |||
| parentNodeMap = nodesMap; | |||
| var parentNodeMap = nodesMap; | |||
| var fileSplits = data[i].FileName.split("/"); | |||
| for(let j=0;j < fileSplits.length;j++){ | |||
| if(fileSplits[j] == ""){ | |||
| @@ -726,7 +726,22 @@ | |||
| if(parentNodeMap[fileSplits[j]] == null){ | |||
| parentNodeMap[fileSplits[j]] = {}; | |||
| } | |||
| parentNodeMap = parentNodeMap[fileSplits[j]] | |||
| parentNodeMap = parentNodeMap[fileSplits[j]]; | |||
| } | |||
| } | |||
| for (let i=0;i<n_length;i++){ | |||
| var parentNodeMap = nodesMap; | |||
| var fileSplits = data[i].FileName.split("/"); | |||
| for(let j=0;j < fileSplits.length;j++){ | |||
| if(fileSplits[j] == ""){ | |||
| if(data[i].FileName[data[i].FileName.length -1] =="/"){ | |||
| if(Object.keys(parentNodeMap).length ==0){ | |||
| parentNodeMap[dirKey]="true"; | |||
| } | |||
| } | |||
| break; | |||
| } | |||
| parentNodeMap = parentNodeMap[fileSplits[j]]; | |||
| } | |||
| } | |||
| convertToNode(zNodes,nodesMap); | |||
| @@ -746,12 +761,17 @@ | |||
| node["name"] = keyList[i]; | |||
| nodeList.push(node); | |||
| if(nodesMap[keyList[i]] != null && Object.keys(nodesMap[keyList[i]]).length >0){ | |||
| 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]]); | |||
| } | |||
| } | |||
| } | |||
| @@ -691,7 +691,7 @@ | |||
| hideMenu(); | |||
| } | |||
| } | |||
| let dirKey="isOnlyDir--:&"; | |||
| function loadSelectedModelFile(trainJob){ | |||
| console.log("trainJob=" + trainJob); | |||
| $('#choice_file').dropdown('clear') | |||
| @@ -714,7 +714,7 @@ | |||
| var zNodes=[]; | |||
| var nodesMap={}; | |||
| for (let i=0;i<n_length;i++){ | |||
| parentNodeMap = nodesMap; | |||
| var parentNodeMap = nodesMap; | |||
| var fileSplits = data[i].FileName.split("/"); | |||
| for(let j=0;j < fileSplits.length;j++){ | |||
| if(fileSplits[j] == ""){ | |||
| @@ -723,7 +723,22 @@ | |||
| if(parentNodeMap[fileSplits[j]] == null){ | |||
| parentNodeMap[fileSplits[j]] = {}; | |||
| } | |||
| parentNodeMap = parentNodeMap[fileSplits[j]] | |||
| parentNodeMap = parentNodeMap[fileSplits[j]]; | |||
| } | |||
| } | |||
| for (let i=0;i<n_length;i++){ | |||
| var parentNodeMap = nodesMap; | |||
| var fileSplits = data[i].FileName.split("/"); | |||
| for(let j=0;j < fileSplits.length;j++){ | |||
| if(fileSplits[j] == ""){ | |||
| if(data[i].FileName[data[i].FileName.length -1] =="/"){ | |||
| if(Object.keys(parentNodeMap).length ==0){ | |||
| parentNodeMap[dirKey]="true"; | |||
| } | |||
| } | |||
| break; | |||
| } | |||
| parentNodeMap = parentNodeMap[fileSplits[j]]; | |||
| } | |||
| } | |||
| convertToNode(zNodes,nodesMap); | |||
| @@ -743,12 +758,17 @@ | |||
| node["name"] = keyList[i]; | |||
| nodeList.push(node); | |||
| if(nodesMap[keyList[i]] != null && Object.keys(nodesMap[keyList[i]]).length >0){ | |||
| 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]]); | |||
| } | |||
| } | |||
| } | |||
| @@ -729,7 +729,7 @@ | |||
| hideMenu(); | |||
| } | |||
| } | |||
| let dirKey="isOnlyDir--:&"; | |||
| function loadSelectedModelFile(trainJob){ | |||
| console.log("trainJob=" + trainJob); | |||
| $('#choice_file').dropdown('clear') | |||
| @@ -744,7 +744,7 @@ | |||
| var zNodes=[]; | |||
| var nodesMap={}; | |||
| for (let i=0;i<n_length;i++){ | |||
| parentNodeMap = nodesMap; | |||
| var parentNodeMap = nodesMap; | |||
| var fileSplits = data[i].FileName.split("/"); | |||
| for(let j=0;j < fileSplits.length;j++){ | |||
| if(fileSplits[j] == ""){ | |||
| @@ -753,7 +753,22 @@ | |||
| if(parentNodeMap[fileSplits[j]] == null){ | |||
| parentNodeMap[fileSplits[j]] = {}; | |||
| } | |||
| parentNodeMap = parentNodeMap[fileSplits[j]] | |||
| parentNodeMap = parentNodeMap[fileSplits[j]]; | |||
| } | |||
| } | |||
| for (let i=0;i<n_length;i++){ | |||
| var parentNodeMap = nodesMap; | |||
| var fileSplits = data[i].FileName.split("/"); | |||
| for(let j=0;j < fileSplits.length;j++){ | |||
| if(fileSplits[j] == ""){ | |||
| if(data[i].FileName[data[i].FileName.length -1] =="/"){ | |||
| if(Object.keys(parentNodeMap).length ==0){ | |||
| parentNodeMap[dirKey]="true"; | |||
| } | |||
| } | |||
| break; | |||
| } | |||
| parentNodeMap = parentNodeMap[fileSplits[j]]; | |||
| } | |||
| } | |||
| convertToNode(zNodes,nodesMap); | |||
| @@ -773,12 +788,17 @@ | |||
| node["name"] = keyList[i]; | |||
| nodeList.push(node); | |||
| if(nodesMap[keyList[i]] != null && Object.keys(nodesMap[keyList[i]]).length >0){ | |||
| 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]]); | |||
| } | |||
| } | |||
| } | |||