use of com.vip.saturn.job.console.domain.ZkCluster in project Saturn by vipshop.
the class DashboardController method top10FailJob.
@ApiResponses(value = { @ApiResponse(code = 200, message = "Success/Fail", response = RequestResult.class) })
@GetMapping(value = "/top10FailJob")
public SuccessResponseEntity top10FailJob(@RequestParam(required = false) String zkClusterKey) throws SaturnJobConsoleException {
if (StringUtils.isNotBlank(zkClusterKey)) {
ZkCluster zkCluster = checkAndGetZkCluster(zkClusterKey);
SaturnStatistics ss = dashboardService.top10FailureJob(zkCluster.getZkAddr());
return ss == null ? new SuccessResponseEntity() : new SuccessResponseEntity(ss.getResult());
}
return new SuccessResponseEntity(dashboardService.top10FailureJobByAllZkCluster());
}
use of com.vip.saturn.job.console.domain.ZkCluster in project Saturn by vipshop.
the class DashboardController method top10FailDomain.
@ApiResponses(value = { @ApiResponse(code = 200, message = "Success/Fail", response = RequestResult.class) })
@GetMapping(value = "/top10FailDomain")
public SuccessResponseEntity top10FailDomain(@RequestParam(required = false) String zkClusterKey) throws SaturnJobConsoleException {
if (StringUtils.isNotBlank(zkClusterKey)) {
ZkCluster zkCluster = checkAndGetZkCluster(zkClusterKey);
SaturnStatistics ss = dashboardService.top10FailureDomain(zkCluster.getZkAddr());
return ss == null ? new SuccessResponseEntity() : new SuccessResponseEntity(ss.getResult());
}
return new SuccessResponseEntity(dashboardService.top10FailureDomainByAllZkCluster());
}
Aggregations