|
|
@@ -3,12 +3,12 @@ package com.ruoyi.platform.service.impl; |
|
|
import com.ruoyi.common.security.utils.SecurityUtils; |
|
|
import com.ruoyi.common.security.utils.SecurityUtils; |
|
|
import com.ruoyi.platform.domain.*; |
|
|
import com.ruoyi.platform.domain.*; |
|
|
import com.ruoyi.platform.mapper.*; |
|
|
import com.ruoyi.platform.mapper.*; |
|
|
import com.ruoyi.platform.service.ExperimentInsService; |
|
|
|
|
|
import com.ruoyi.platform.service.GitService; |
|
|
|
|
|
import com.ruoyi.platform.service.WorkspaceService; |
|
|
|
|
|
|
|
|
import com.ruoyi.platform.service.*; |
|
|
import com.ruoyi.platform.utils.JacksonUtil; |
|
|
import com.ruoyi.platform.utils.JacksonUtil; |
|
|
import com.ruoyi.platform.utils.JsonUtils; |
|
|
import com.ruoyi.platform.utils.JsonUtils; |
|
|
import com.ruoyi.platform.utils.NewHttpUtils; |
|
|
import com.ruoyi.platform.utils.NewHttpUtils; |
|
|
|
|
|
import com.ruoyi.platform.vo.ModelsVo; |
|
|
|
|
|
import com.ruoyi.platform.vo.NewDatasetVo; |
|
|
import com.ruoyi.system.api.constant.Constant; |
|
|
import com.ruoyi.system.api.constant.Constant; |
|
|
import com.ruoyi.system.api.model.LoginUser; |
|
|
import com.ruoyi.system.api.model.LoginUser; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
@@ -32,16 +32,16 @@ public class WorkspaceServiceImpl implements WorkspaceService { |
|
|
@Resource |
|
|
@Resource |
|
|
private ExperimentInsService experimentInsService; |
|
|
private ExperimentInsService experimentInsService; |
|
|
@Resource |
|
|
@Resource |
|
|
private ModelsDao modelsDao; |
|
|
|
|
|
@Resource |
|
|
|
|
|
private DatasetDao datasetDao; |
|
|
|
|
|
@Resource |
|
|
|
|
|
private ImageDao imageDao; |
|
|
private ImageDao imageDao; |
|
|
@Resource |
|
|
@Resource |
|
|
private ComponentDao componentDao; |
|
|
private ComponentDao componentDao; |
|
|
@Resource |
|
|
@Resource |
|
|
private GitService gitService; |
|
|
private GitService gitService; |
|
|
@Resource |
|
|
@Resource |
|
|
|
|
|
private NewDatasetService newDatasetService; |
|
|
|
|
|
@Resource |
|
|
|
|
|
private ModelsService modelsService; |
|
|
|
|
|
@Resource |
|
|
private NewHttpUtils httpUtils; |
|
|
private NewHttpUtils httpUtils; |
|
|
|
|
|
|
|
|
@Value("${git.endpoint}") |
|
|
@Value("${git.endpoint}") |
|
|
@@ -114,13 +114,15 @@ public class WorkspaceServiceImpl implements WorkspaceService { |
|
|
String req = httpUtils.sendGetWithToken(url, null, token); |
|
|
String req = httpUtils.sendGetWithToken(url, null, token); |
|
|
Map<String, Object> stringObjectMap = JacksonUtil.parseJSONStr2Map(req); |
|
|
Map<String, Object> stringObjectMap = JacksonUtil.parseJSONStr2Map(req); |
|
|
List<Map<String, Object>> projects = (List<Map<String, Object>>) stringObjectMap.get("projects"); |
|
|
List<Map<String, Object>> projects = (List<Map<String, Object>>) stringObjectMap.get("projects"); |
|
|
assetCountMap.put("dataset", projects.size()); |
|
|
|
|
|
|
|
|
List<NewDatasetVo> collect1 = newDatasetService.convert(projects, Constant.Topic_Dataset, null, null); |
|
|
|
|
|
assetCountMap.put("dataset", collect1.size()); |
|
|
|
|
|
|
|
|
url = gitendpoint + "/api/users/" + userInfo.get("login") + "/projects.json?category=manage"; |
|
|
url = gitendpoint + "/api/users/" + userInfo.get("login") + "/projects.json?category=manage"; |
|
|
req = httpUtils.sendGetWithToken(url, null, token); |
|
|
req = httpUtils.sendGetWithToken(url, null, token); |
|
|
stringObjectMap = JacksonUtil.parseJSONStr2Map(req); |
|
|
stringObjectMap = JacksonUtil.parseJSONStr2Map(req); |
|
|
projects = (List<Map<String, Object>>) stringObjectMap.get("projects"); |
|
|
projects = (List<Map<String, Object>>) stringObjectMap.get("projects"); |
|
|
assetCountMap.put("model", projects.size()); |
|
|
|
|
|
|
|
|
List<ModelsVo> collect2 = modelsService.convert(projects, Constant.Topic_model, null, null); |
|
|
|
|
|
assetCountMap.put("model", collect2.size()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 镜像 |
|
|
// 镜像 |
|
|
|