diff --git a/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/AppController.java b/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/AppController.java index 9b21c0c1..c614a7c7 100755 --- a/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/AppController.java +++ b/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/AppController.java @@ -62,16 +62,16 @@ public class AppController { public Result> queryAppInfos(HttpServletRequest request) { List list = new ArrayList<>(appManagement.getBriefApps()); - if (list.size() == 0) { - MachineInfo machineInfo = new MachineInfo(); - machineInfo.setApp("sentinel-dashboard"); - machineInfo.setAppType(0); - machineInfo.setHostname("id.ssjlai.com"); - machineInfo.setPort(7777); - machineInfo.setIp("172.19.42.44"); - appManagement.addMachine(machineInfo); - list = new ArrayList<>(appManagement.getBriefApps()); - } +// if (list.size() == 0) { +// MachineInfo machineInfo = new MachineInfo(); +// machineInfo.setApp("sentinel-dashboard"); +// machineInfo.setAppType(0); +// machineInfo.setHostname("id.ssjlai.com"); +// machineInfo.setPort(7777); +// machineInfo.setIp("172.19.42.44"); +// appManagement.addMachine(machineInfo); +// list = new ArrayList<>(appManagement.getBriefApps()); +// } Collections.sort(list, Comparator.comparing(AppInfo::getApp)); return Result.ofSuccess(list); } diff --git a/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/v2/FlowControllerV2.java b/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/v2/FlowControllerV2.java index 9c1f1507..0ee89442 100755 --- a/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/v2/FlowControllerV2.java +++ b/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/controller/v2/FlowControllerV2.java @@ -72,10 +72,10 @@ public class FlowControllerV2 { @GetMapping("/rules") @AuthAction(PrivilegeType.READ_RULE) public Result> apiQueryMachineRules(@RequestParam String app) { - System.out.println("FlowControllerV2 apiQueryMachineRules app is " + app); - if (StringUtils.isBlank(app)) { - app="sentinel-dashboard"; - } +// System.out.println("FlowControllerV2 apiQueryMachineRules app is " + app); +// if (StringUtils.isBlank(app)) { +// app="sentinel-dashboard"; +// } if (StringUtil.isEmpty(app)) { return Result.ofFail(-1, "app can't be null or empty"); } diff --git a/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/discovery/SimpleMachineDiscovery.java b/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/discovery/SimpleMachineDiscovery.java index e14f92b1..64f75397 100755 --- a/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/discovery/SimpleMachineDiscovery.java +++ b/sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/discovery/SimpleMachineDiscovery.java @@ -42,7 +42,7 @@ public class SimpleMachineDiscovery implements MachineDiscovery { @Override public long addMachine(MachineInfo machineInfo) { - logger.info("SimpleMachineDiscovery addMachine"); +// logger.info("SimpleMachineDiscovery addMachine"); AssertUtil.notNull(machineInfo, "machineInfo cannot be null"); AppInfo appInfo = apps.computeIfAbsent(machineInfo.getApp(), o -> new AppInfo(machineInfo.getApp(), machineInfo.getAppType())); appInfo.addMachine(machineInfo); @@ -51,7 +51,7 @@ public class SimpleMachineDiscovery implements MachineDiscovery { @Override public boolean removeMachine(String app, String ip, int port) { - logger.info("app is " + app); +// logger.info("app is " + app); AssertUtil.assertNotBlank(app, "app name cannot be blank"); AppInfo appInfo = apps.get(app); if (appInfo != null) { @@ -64,20 +64,20 @@ public class SimpleMachineDiscovery implements MachineDiscovery { public List getAppNames() { - logger.info("apps.keySet is " + apps.keySet()); +// logger.info("apps.keySet is " + apps.keySet()); return new ArrayList<>(apps.keySet()); } @Override public AppInfo getDetailApp(String app) { - logger.info("app is " + app); +// logger.info("app is " + app); AssertUtil.assertNotBlank(app, "app name cannot be blank"); return apps.get(app); } @Override public Set getBriefApps() { - logger.info("apps is " + apps.toString()); +// logger.info("apps is " + apps.toString()); return new HashSet<>(apps.values()); }