diff --git a/routers/search.go b/routers/search.go
index 72bf97bf4..8453d5c18 100644
--- a/routers/search.go
+++ b/routers/search.go
@@ -349,25 +349,24 @@ func searchRepo(ctx *context.Context, TableName string, Key string, Page int, Pa
func setForkRepoOrder(esresult *SearchRes, SortBy string) {
if SortBy == "default" || SortBy == "" {
- return
- }
- forkidMap := make(map[string]int, 0)
- for index, re := range esresult.Result {
- if re["fork_id"] != nil {
- fork_id := re["fork_id"].(string)
- if _, ok := forkidMap[fork_id]; !ok {
- forkidMap[fork_id] = index
+ forkidMap := make(map[string]int, 0)
+ for index, re := range esresult.Result {
+ if re["fork_id"] != nil {
+ fork_id := re["fork_id"].(string)
+ if _, ok := forkidMap[fork_id]; !ok {
+ forkidMap[fork_id] = index
+ }
}
}
- }
- for key, value := range forkidMap {
- for index, re := range esresult.Result {
- if re["id"].(string) == key {
- if value < index { //swap
- tmp := esresult.Result[index]
- esresult.Result[index] = esresult.Result[value]
- esresult.Result[value] = tmp
- break
+ for key, value := range forkidMap {
+ for index, re := range esresult.Result {
+ if re["id"].(string) == key {
+ if value < index { //swap
+ tmp := esresult.Result[index]
+ esresult.Result[index] = esresult.Result[value]
+ esresult.Result[value] = tmp
+ break
+ }
}
}
}
diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl
index d111fe123..04a582fb9 100755
--- a/templates/repo/cloudbrain/show.tmpl
+++ b/templates/repo/cloudbrain/show.tmpl
@@ -413,7 +413,7 @@
{{range $m ,$n := $.datasetDownload}}
-
{{.DatasetName}}
+
{{.DatasetName}}
{{end}}
diff --git a/templates/repo/cloudbrain/trainjob/show.tmpl b/templates/repo/cloudbrain/trainjob/show.tmpl
index 72cbaee02..435d17c29 100644
--- a/templates/repo/cloudbrain/trainjob/show.tmpl
+++ b/templates/repo/cloudbrain/trainjob/show.tmpl
@@ -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;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]]);
}
}
}
diff --git a/templates/repo/grampus/trainjob/show.tmpl b/templates/repo/grampus/trainjob/show.tmpl
index 25f1af82b..7edc43a60 100755
--- a/templates/repo/grampus/trainjob/show.tmpl
+++ b/templates/repo/grampus/trainjob/show.tmpl
@@ -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;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]]);
}
}
}
diff --git a/templates/repo/modelarts/trainjob/show.tmpl b/templates/repo/modelarts/trainjob/show.tmpl
index 7ae5d5c6b..a84071154 100755
--- a/templates/repo/modelarts/trainjob/show.tmpl
+++ b/templates/repo/modelarts/trainjob/show.tmpl
@@ -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;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]]);
}
}
}
diff --git a/templates/repo/modelmanage/showinfo.tmpl b/templates/repo/modelmanage/showinfo.tmpl
index 4b4434908..f2ccb69b6 100644
--- a/templates/repo/modelmanage/showinfo.tmpl
+++ b/templates/repo/modelmanage/showinfo.tmpl
@@ -127,7 +127,7 @@
| 训练任务 |
-
+
|