...
|
...
|
@@ -20,6 +20,7 @@ import org.springframework.stereotype.Controller; |
|
|
import org.springframework.ui.Model;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
...
|
...
|
@@ -40,6 +41,9 @@ public class WorkSystemCtrl { |
|
|
Logger log = LoggerFactory.getLogger(UserCtrl.class);
|
|
|
|
|
|
@Autowired
|
|
|
NodeBuildCtrl nodeBuildCtrl;
|
|
|
|
|
|
@Autowired
|
|
|
HttpRestClient httpRestClient;
|
|
|
|
|
|
@RequestMapping("/toAddWork")
|
...
|
...
|
@@ -126,7 +130,7 @@ public class WorkSystemCtrl { |
|
|
String result = httpRestClient.get("http://172.31.16.167:8883/php/getProjects", String.class, null);
|
|
|
return JSON.parseObject(result,List.class);
|
|
|
} else if (Platform.NODE.equals(platform)) {
|
|
|
String result = httpRestClient.get("http://172.31.16.167:8883/node/getProjects", String.class, null);
|
|
|
String result = nodeBuildCtrl.getProjects();
|
|
|
return JSON.parseObject(result,List.class);
|
|
|
}else if (Platform.DOCKER.equals(platform)) {
|
|
|
Map map = new HashMap<>();
|
...
|
...
|
@@ -147,6 +151,13 @@ public class WorkSystemCtrl { |
|
|
}
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "getNodeEnvByProject")
|
|
|
@ResponseBody
|
|
|
public String getNodeEnvByProject(String name) {
|
|
|
return nodeBuildCtrl.getProjectByName(name);
|
|
|
}
|
|
|
|
|
|
|
|
|
@RequestMapping("/checkRole")
|
|
|
@ResponseBody
|
|
|
public int checkRole(String type, HttpSession session) {
|
...
|
...
|
|