model.addAttribute("region", region);
model.addAttribute("regions", regionService.getAllVisibleRegionNames());
File agentPackage = null;
if (isClustered()) {
if (StringUtils.isNotBlank(region)) {
final RegionInfo regionInfo = regionService.getOne(region);
agentPackage = agentPackageService.createAgentPackage(region, regionInfo.getIp(), regionInfo.getControllerPort(), null);
}
} else {
agentPackage = agentPackageService.createAgentPackage("", "", getConfig().getControllerPort(), null);
}
if (agentPackage != null) {