Search in sources :

Example 1 with GlobalSetting

use of com.ibeiliao.deployment.admin.vo.global.GlobalSetting in project Corgi by kevinYin.

the class ViewProjectController method getProject.

/**
 * 获取项目
 */
@RequestMapping("getProject")
@ResponseBody
@MenuResource("获取项目")
public RestResult getProject(int projectId) {
    Project project = new Project();
    if (projectId > 0) {
        project = projectService.getProject(projectId);
    }
    List<AdminAccount> adminAccounts = adminAccountService.listAll();
    GlobalSetting globalSetting = globalSettingService.getGlobalSetting();
    ProjectDetailInfo projectDetailInfo = new ProjectDetailInfo();
    projectDetailInfo.setProject(project);
    projectDetailInfo.setAllAccounts(adminAccounts);
    projectDetailInfo.setGlobalSetting(globalSetting);
    List<ProjectAccountRelation> accountRelations = projectAccountRelationService.getByProjectId(projectId);
    projectDetailInfo.setProjectAccountRelations(accountRelations);
    return new RestResult<>(projectDetailInfo);
}
Also used : RestResult(com.ibeiliao.deployment.admin.common.RestResult) GlobalSetting(com.ibeiliao.deployment.admin.vo.global.GlobalSetting) AdminAccount(com.ibeiliao.deployment.admin.vo.account.AdminAccount) MenuResource(com.ibeiliao.deployment.admin.utils.resource.MenuResource) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 2 with GlobalSetting

use of com.ibeiliao.deployment.admin.vo.global.GlobalSetting in project Corgi by kevinYin.

the class ViewProjectController method projectDetail.

/**
 * 查看项目详情
 */
@RequestMapping("projectDetail")
@ResponseBody
@MenuResource("项目详情")
public RestResult projectDetail(int projectId) {
    Project project = projectService.getProject(projectId);
    GlobalSetting globalSetting = globalSettingService.getGlobalSetting();
    ProjectDetailInfo projectDetailInfo = new ProjectDetailInfo();
    projectDetailInfo.setProject(project);
    projectDetailInfo.setGlobalSetting(globalSetting);
    List<ProjectEnv> allEnv = projectEnvService.findAllEnv();
    projectDetailInfo.setProjectEnvs(allEnv);
    List<ProjectModule> modules = projectModuleService.getByProjectId(projectId);
    fillServerGroupIntoModule(modules);
    fillJvmArgsIntoModule(modules);
    projectDetailInfo.setModules(modules);
    return new RestResult<>(projectDetailInfo);
}
Also used : ProjectEnv(com.ibeiliao.deployment.admin.vo.global.ProjectEnv) RestResult(com.ibeiliao.deployment.admin.common.RestResult) GlobalSetting(com.ibeiliao.deployment.admin.vo.global.GlobalSetting) MenuResource(com.ibeiliao.deployment.admin.utils.resource.MenuResource) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

RestResult (com.ibeiliao.deployment.admin.common.RestResult)2 MenuResource (com.ibeiliao.deployment.admin.utils.resource.MenuResource)2 GlobalSetting (com.ibeiliao.deployment.admin.vo.global.GlobalSetting)2 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)2 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)2 AdminAccount (com.ibeiliao.deployment.admin.vo.account.AdminAccount)1 ProjectEnv (com.ibeiliao.deployment.admin.vo.global.ProjectEnv)1