| @@ -424,6 +424,7 @@ func GetObsListObject(jobName, outPutPath, parentDir, versionName string) ([]Fil | |||||
| input := &obs.ListObjectsInput{} | input := &obs.ListObjectsInput{} | ||||
| input.Bucket = setting.Bucket | input.Bucket = setting.Bucket | ||||
| input.Prefix = strings.TrimPrefix(path.Join(setting.TrainJobModelPath, jobName, outPutPath, versionName, parentDir), "/") | input.Prefix = strings.TrimPrefix(path.Join(setting.TrainJobModelPath, jobName, outPutPath, versionName, parentDir), "/") | ||||
| log.Info("bucket=" + input.Bucket + " Prefix=" + input.Prefix) | |||||
| strPrefix := strings.Split(input.Prefix, "/") | strPrefix := strings.Split(input.Prefix, "/") | ||||
| output, err := ObsCli.ListObjects(input) | output, err := ObsCli.ListObjects(input) | ||||
| fileInfos := make([]FileInfo, 0) | fileInfos := make([]FileInfo, 0) | ||||
| @@ -463,8 +463,9 @@ func QueryTrainModelList(ctx *context.Context) { | |||||
| log.Info("query train job list. start.") | log.Info("query train job list. start.") | ||||
| jobName := ctx.Query("jobName") | jobName := ctx.Query("jobName") | ||||
| taskType := ctx.QueryInt("type") | taskType := ctx.QueryInt("type") | ||||
| VersionName := ctx.Query("VersionName") | |||||
| if taskType == models.TypeCloudBrainTwo { | if taskType == models.TypeCloudBrainTwo { | ||||
| objectkey := strings.TrimPrefix(path.Join(setting.TrainJobModelPath, jobName, setting.OutPutPath), "/") | |||||
| objectkey := strings.TrimPrefix(path.Join(setting.TrainJobModelPath, jobName, setting.OutPutPath, VersionName, ""), "/") | |||||
| modelDbResult, err := storage.GetAllObjectByBucketAndPrefix(setting.Bucket, objectkey) | modelDbResult, err := storage.GetAllObjectByBucketAndPrefix(setting.Bucket, objectkey) | ||||
| log.Info("bucket=" + setting.Bucket + " objectkey=" + objectkey) | log.Info("bucket=" + setting.Bucket + " objectkey=" + objectkey) | ||||
| if err != nil { | if err != nil { | ||||
| @@ -439,7 +439,7 @@ | |||||
| if(trainJob ==null || trainJob ==""){ | if(trainJob ==null || trainJob ==""){ | ||||
| console.log("trainJob is null"); | console.log("trainJob is null"); | ||||
| }else{ | }else{ | ||||
| $.get(`${repolink}/modelmanage/query_train_model?jobName=${trainJob.JobName}&type=${trainJob.Type}`, (data) => { | |||||
| $.get(`${repolink}/modelmanage/query_train_model?jobName=${trainJob.JobName}&type=${trainJob.Type}&VersionName=${trainJob.VersionName}`, (data) => { | |||||
| const n_length = data.length | const n_length = data.length | ||||
| let file_html='' | let file_html='' | ||||
| let firstFileName ='' | let firstFileName ='' | ||||