|
|
|
@@ -1118,7 +1118,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public ModelsVo getModelDetail(Integer id, String identifier, String owner, String version, Boolean isPublic) throws Exception { |
|
|
|
String ci4sUsername = SecurityUtils.getLoginUser().getUsername();; |
|
|
|
// String ci4sUsername = SecurityUtils.getLoginUser().getUsername(); |
|
|
|
// String ci4sUsername = isPublic ? Constant.Item_Public : SecurityUtils.getLoginUser().getUsername(); |
|
|
|
|
|
|
|
if (StringUtils.isEmpty(version)) { |
|
|
|
@@ -1126,8 +1126,8 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
} |
|
|
|
|
|
|
|
// git pull操作,然后读取里面的文件列表,列出每个文件的大小和名称,封装成MAP |
|
|
|
List<Map<String, Object>> fileDetailsAfterGitPull = FileUtil.getFiles(localPath + ci4sUsername + "/model/" + id + "/" + identifier + "/" + version + "/model"); |
|
|
|
Map<String, Object> stringObjectMap = YamlUtils.loadYamlFile(localPath + ci4sUsername + "/model/" + id + "/" + identifier + "/" + version + "/metadata/metadata.yaml"); |
|
|
|
List<Map<String, Object>> fileDetailsAfterGitPull = FileUtil.getFiles(localPath + owner + "/model/" + id + "/" + identifier + "/" + version + "/model"); |
|
|
|
Map<String, Object> stringObjectMap = YamlUtils.loadYamlFile(localPath + owner + "/model/" + id + "/" + identifier + "/" + version + "/metadata/metadata.yaml"); |
|
|
|
|
|
|
|
String jsonString = JSON.toJSONString(stringObjectMap); |
|
|
|
ModelsVo modelsVo = JSON.parseObject(jsonString, ModelsVo.class); |
|
|
|
|