|
|
|
@@ -596,6 +596,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
String rootPath = localPath + ci4sUsername + "/model/" + gitlinIid + "/" + repositoryName; |
|
|
|
String modelPath = rootPath + "/model"; |
|
|
|
String metaPath = rootPath + "/metadata"; |
|
|
|
String relatePath = ci4sUsername + "/model/" + gitlinIid + "/" + repositoryName+ "/model"; |
|
|
|
|
|
|
|
dvcUtils.gitClone(rootPath, projectUrl, branchName, gitLinkUsername, gitLinkPassword); |
|
|
|
dvcUtils.moveFiles(sourcePath, modelPath); |
|
|
|
@@ -616,7 +617,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
modelMetaVo.setIdentifier(repositoryName); |
|
|
|
modelMetaVo.setOwner(owner); |
|
|
|
modelMetaVo.setVersionDesc(modelMetaVo.getDescription()); |
|
|
|
modelMetaVo.setRelativePaths(modelPath); |
|
|
|
modelMetaVo.setRelativePaths(relatePath); |
|
|
|
File folder = new File(modelPath); |
|
|
|
long folderSize = FileUtil.getFolderSize(folder); |
|
|
|
modelMetaVo.setModelSize(FileUtil.formatFileSize(folderSize)); |
|
|
|
@@ -691,6 +692,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
String rootPath = localPath + ci4sUsername + "/model/" + modelsVo.getId() + "/" + repositoryName; |
|
|
|
String modelPath = rootPath + "/model"; |
|
|
|
String metaPath = rootPath + "/metadata"; |
|
|
|
String relatePath = ci4sUsername + "/model/" + modelsVo.getId() + "/" + repositoryName + "/model"; |
|
|
|
|
|
|
|
//部分信息在前面的版本里面,从那边取过来 |
|
|
|
Map<String, Object> stringObjectMap = YamlUtils.loadYamlFile(metaPath + "/" + "metadata.yaml"); |
|
|
|
@@ -719,7 +721,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
modelMetaVo.setDescription(oldModelVo.getDescription()); |
|
|
|
modelMetaVo.setModelTag(oldModelVo.getModelTag()); |
|
|
|
modelMetaVo.setModelType(oldModelVo.getModelType()); |
|
|
|
modelMetaVo.setRelativePaths(modelPath); |
|
|
|
modelMetaVo.setRelativePaths(relatePath); |
|
|
|
File folder = new File(modelPath); |
|
|
|
long folderSize = FileUtil.getFolderSize(folder); |
|
|
|
modelMetaVo.setModelSize(FileUtil.formatFileSize(folderSize)); |
|
|
|
|