|
|
@@ -127,7 +127,8 @@ public class DeployStatImpl implements DeployStat {
|
|
|
deployingRepository.save(appDeploying);
|
|
|
|
|
|
MachineHost machineHost = appDeploying.getAppDeployConfig().getMachineHost();
|
|
|
- BuildLog buildLog = buildLogRepository.findByBuildLogId(appDeploying.getAppBuilding().getBuildLogId());
|
|
|
+ // BuildLog buildLog = buildLogRepository.findByBuildLogId(appDeploying.getAppBuilding().getBuildLogId());
|
|
|
+ BuildLog buildLog = appDeploying.getAppBuilding().getBuildLog();
|
|
|
DeployLog deployLog = new DeployLog(buildLog, machineHost, deployResult);
|
|
|
deployLogRepository.save(deployLog);
|
|
|
|
|
|
@@ -187,8 +188,8 @@ public class DeployStatImpl implements DeployStat {
|
|
|
}
|
|
|
|
|
|
AppDeployingVO appDeployingVO;
|
|
|
- String buildLogId1 = appDeploying.getAppBuilding().getBuildLogId();
|
|
|
- if (buildLogId1.equals(appBuilding.getBuildLogId())) {
|
|
|
+ String buildLogId1 = appDeploying.getAppBuilding().getBuildLog().getBuildLogId();
|
|
|
+ if (buildLogId1.equals(appBuilding.getBuildLog().getBuildLogId())) {
|
|
|
appDeployingVO = new AppDeployingVO(appDeploying, machineStatus);
|
|
|
} else {
|
|
|
appDeployingVO = new AppDeployingVO(appDeploying, machineStatus, DeployStatus.neverDeploy.getDesc());
|
|
|
@@ -201,9 +202,9 @@ public class DeployStatImpl implements DeployStat {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public PageList<AppRunningVO> getByPage(String env, int pageNumber, int pageSize) {
|
|
|
- PageRequest pageRequest = PageRequest.of(pageNumber, pageSize);
|
|
|
- Page<AppDeploying> page = deployingRepository.findAllByAppDeployConfig_AppConfig_Env(env, pageRequest);
|
|
|
+ public PageList<AppRunningVO> getByPage(String env, String appType, int pageNumber, int pageSize) {
|
|
|
+ PageRequest pageRequest = PageRequest.of(pageNumber-1, pageSize);
|
|
|
+ Page<AppDeploying> page = deployingRepository.findAllByAppDeployConfig_AppConfig_EnvAndAppDeployConfig_AppConfig_AppType(env, appType, pageRequest);
|
|
|
List<AppRunningVO> list2 = page.getContent().stream().map(appDeploying -> {
|
|
|
AppConfig appConfig = appDeploying.getAppDeployConfig().getAppConfig();
|
|
|
String appId = appConfig.getAppId();
|