|
|
|
@@ -593,8 +593,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
|
|
|
|
String projectUrl = gitendpoint + "/" + owner + "/" + repositoryName + ".git"; |
|
|
|
String sourcePath = modelsVo.getModelVersionVos().get(0).getUrl(); |
|
|
|
String relatePath = ci4sUsername + "/model/" + gitlinIid + "/" + repositoryName; |
|
|
|
String rootPath = localPath + relatePath; |
|
|
|
String rootPath = localPath + ci4sUsername + "/model/" + gitlinIid + "/" + repositoryName; |
|
|
|
String modelPath = rootPath + "/model"; |
|
|
|
String metaPath = rootPath + "/metadata"; |
|
|
|
|
|
|
|
@@ -617,7 +616,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
modelMetaVo.setIdentifier(repositoryName); |
|
|
|
modelMetaVo.setOwner(owner); |
|
|
|
modelMetaVo.setVersionDesc(modelMetaVo.getDescription()); |
|
|
|
modelMetaVo.setRelativePaths(relatePath); |
|
|
|
modelMetaVo.setRelativePaths(modelPath); |
|
|
|
File folder = new File(modelPath); |
|
|
|
long folderSize = FileUtil.getFolderSize(folder); |
|
|
|
modelMetaVo.setModelSize(FileUtil.formatFileSize(folderSize)); |
|
|
|
@@ -689,8 +688,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
|
|
|
|
String projectUrl = gitendpoint + "/" + owner + "/" + repositoryName + ".git"; |
|
|
|
String sourcePath = modelsVo.getModelVersionVos().get(0).getUrl(); |
|
|
|
String relatePath = ci4sUsername + "/model/" + modelsVo.getId() + "/" + repositoryName; |
|
|
|
String rootPath = localPath + relatePath; |
|
|
|
String rootPath = localPath + ci4sUsername + "/model/" + modelsVo.getId() + "/" + repositoryName; |
|
|
|
String modelPath = rootPath + "/model"; |
|
|
|
String metaPath = rootPath + "/metadata"; |
|
|
|
|
|
|
|
@@ -721,7 +719,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
modelMetaVo.setDescription(oldModelVo.getDescription()); |
|
|
|
modelMetaVo.setModelTag(oldModelVo.getModelTag()); |
|
|
|
modelMetaVo.setModelType(oldModelVo.getModelType()); |
|
|
|
modelMetaVo.setRelativePaths(relatePath); |
|
|
|
modelMetaVo.setRelativePaths(modelPath); |
|
|
|
File folder = new File(modelPath); |
|
|
|
long folderSize = FileUtil.getFolderSize(folder); |
|
|
|
modelMetaVo.setModelSize(FileUtil.formatFileSize(folderSize)); |
|
|
|
@@ -995,9 +993,9 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
|
|
|
|
if (map != null) { |
|
|
|
List<Map<String, Object>> topics = (List<Map<String, Object>>) map.get("topics"); |
|
|
|
if (topics != null && topics.size() > 0 && modelTopic.equals(topics.get(0).get("name"))) { |
|
|
|
String modeltag = (String) topics.get(1).get("name"); |
|
|
|
String modeltype = (String) topics.get(2).get("name"); |
|
|
|
if (topics != null && topics.size() > 0 && modelTopic.equals(topics.get(1).get("name"))) { |
|
|
|
String modeltag = (String) topics.get(2).get("name"); |
|
|
|
String modeltype = (String) topics.get(3).get("name"); |
|
|
|
modeltag = modeltag.substring("modeltag-".length()); |
|
|
|
modeltype = modeltype.substring("modeltype-".length()); |
|
|
|
if (StringUtils.isNotEmpty(modelTagName) && !modelTagName.toLowerCase().equals(modeltag)) { |
|
|
|
|