|
@@ -56,6 +56,9 @@ public class VscodeController extends BasicController { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private VscodeService vscodeService; |
|
|
private VscodeService vscodeService; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private AppConfig appConfig; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private ClusterManager clusterManager; |
|
|
private ClusterManager clusterManager; |
|
|
|
|
|
|
|
@@ -216,7 +219,8 @@ public class VscodeController extends BasicController { |
|
|
public R getPort(@RequestParam String projectId, @RequestParam String userId, @RequestParam Integer type, @RequestParam Integer port) { |
|
|
public R getPort(@RequestParam String projectId, @RequestParam String userId, @RequestParam Integer type, @RequestParam Integer port) { |
|
|
String tpiID = StringUtil.getPodName(projectId, userId); |
|
|
String tpiID = StringUtil.getPodName(projectId, userId); |
|
|
int proxyPort = proxyService.getContainerExternalMappingPort(tpiID, type, port); |
|
|
int proxyPort = proxyService.getContainerExternalMappingPort(tpiID, type, port); |
|
|
return R.ok().setData(MapUtil.builder("port", proxyPort).build()); |
|
|
|
|
|
|
|
|
String targetUrl = "https://" + proxyPort + appConfig.getVscodeDomain(); |
|
|
|
|
|
return R.ok().setData(MapUtil.builder("targetUrl", targetUrl)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|