diff --git a/Bench4Q-Web/src/main/java/org/bench4q/web/security/SessionFilter.java b/Bench4Q-Web/src/main/java/org/bench4q/web/security/SessionFilter.java index 3393bc43..166556c9 100644 --- a/Bench4Q-Web/src/main/java/org/bench4q/web/security/SessionFilter.java +++ b/Bench4Q-Web/src/main/java/org/bench4q/web/security/SessionFilter.java @@ -15,7 +15,7 @@ public class SessionFilter extends OncePerRequestFilter { HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { String[] notFilter = new String[] { "/index", "/css/", "/script/", - "/i18n/", "/images/", "/publiccontrol/", "/img/", "/login", "/adminLogin","/js","/register","/result","/test"}; + "/i18n/", "/images/", "/publiccontrol/", "/login","/lib/", "/js", "/register" }; // 请求的uri String uri = request.getRequestURI(); diff --git a/Bench4Q-Web/src/main/java/org/bench4q/web/service/MonitorService.java b/Bench4Q-Web/src/main/java/org/bench4q/web/service/MonitorService.java index 49160604..d6bf451f 100644 --- a/Bench4Q-Web/src/main/java/org/bench4q/web/service/MonitorService.java +++ b/Bench4Q-Web/src/main/java/org/bench4q/web/service/MonitorService.java @@ -13,8 +13,8 @@ public class MonitorService { private Logger logger = Logger.getLogger(MonitorService.class); - public List extractMonitorResult(List list, - String fieldName) { + public List extractMonitorResult( + List list, String fieldName) { if (list == null) return null; List resultModels = new ArrayList(); @@ -39,144 +39,4 @@ public class MonitorService { return resultModels; } - // public List extractCpuResultModelList( - // List processorModels, String instance, - // String fieldName) { - // if (processorModels == null) { - // return null; - // } - // List resultModels = new ArrayList(); - // for (ProcessorModel processorModel : processorModels) { - // if (processorModel != null) { - // ResultModel resultModel; - // try { - // resultModel = extractResultModel(processorModel, instance, - // fieldName); - // if (resultModel != null) - // resultModels.add(resultModel); - // } catch (NoSuchFieldException | IllegalArgumentException e) { - // // TODO Auto-generated catch block - // logger.info(ExceptionLog.getStackTrace(e)); - // } - // - // } - // - // } - // return resultModels; - // } - // - // public List extractCpuResult( - // List processorModels, String fieldName) { - // if (processorModels == null) - // return null; - // List resultModels = new ArrayList(); - // List fieldNames = new ArrayList(); - // fieldNames.add(fieldName); - // for (ProcessorModel processorModel : processorModels) { - // if (processorModel != null) { - // ResultModel resultModel; - // try { - // resultModel = ChangeToResultModel.getResultModel( - // processorModel, fieldNames); - // resultModel.setTime(processorModel.getSamplingTime()); - // resultModel.setFinished(processorModel.isFinished()); - // resultModels.add(resultModel); - // } catch (NoSuchFieldException e) { - // // TODO Auto-generated catch block - // logger.info(ExceptionLog.getStackTrace(e)); - // } - // - // } - // } - // return resultModels; - // } - // - // public List extractResultModelList( - // List memoryModels, String fieldName) { - // if (memoryModels == null) - // return null; - // List resultModels = new ArrayList(); - // List fieldNames = new ArrayList(); - // fieldNames.add(fieldName); - // for (MemoryModel memoryModel : memoryModels) { - // if (memoryModel != null) { - // ResultModel resultModel; - // try { - // resultModel = ChangeToResultModel.getResultModel( - // memoryModel, fieldNames); - // resultModel.setTime(memoryModel.getSamplingTime()); - // resultModel.setFinished(memoryModel.isFinished()); - // resultModels.add(resultModel); - // } catch (NoSuchFieldException e) { - // // TODO Auto-generated catch block - // logger.info(ExceptionLog.getStackTrace(e)); - // } - // - // } - // } - // return resultModels; - // } - // - // private ResultModel extractResultModel(ProcessorModel processorModel, - // String instance, String fieldName) throws NoSuchFieldException, - // IllegalArgumentException { - // List fieldNames = new ArrayList(); - // fieldNames.add(fieldName); - // if (processorModel.getProcessorModelList() == null) { - // return null; - // } - // for (ProcessorModelChild processorModelChild : processorModel - // .getProcessorModelList()) { - // if (processorModelChild.getInstance().equalsIgnoreCase(instance)) { - // ResultModel resultModel = ChangeToResultModel.getResultModel( - // processorModelChild, fieldNames); - // resultModel.setFinished(false); - // resultModel.setTime(processorModel.getSamplingTime()); - // return resultModel; - // } - // } - // logger.info("no such cpu instance"); - // return null; - // } - // - // public List getCpuList( - // @ModelAttribute("accessToken") String accessToken, - // @RequestParam("testPlanId") String testPlanId, - // @RequestParam String ip, String port) { - // try { - // MonitorProcessorResponseModel monitorProcessorResponseModel = getCpus( - // accessToken, testPlanId, ip, port, "0"); - // - // ProcessorModel processorModel = null; - // List processorModels = monitorProcessorResponseModel - // .getProcessorModels(); - // if (processorModels.size() > 0) { - // processorModel = processorModels.get(0); - // } - // - // else { - // return new ArrayList(); - // } - // - // List cpuList = new ArrayList(); - // for (ProcessorModelChild processorModelChild : processorModel - // .getProcessorModelList()) { - // cpuList.add(processorModelChild.getInstance()); - // } - // return cpuList; - // } catch (NullPointerException e) { - // logger.info(ExceptionLog.getStackTrace(e)); - // return new LinkedList(); - // } - // } - // - // public MonitorProcessorResponseModel getCpus( - // @ModelAttribute("accessToken") String accessToken, - // String testPlanId, String ip, String port, String startTime) { - // MonitorProcessorResponseModel model = this.getMonitorMessager() - // .porcessor(accessToken, testPlanId, ip, port, startTime); - // return model; - // - // } - }