Esempio n. 1
0
 @RequiresPermissions("admin:list")
 @RequestMapping(value = "/result/list", method = RequestMethod.GET)
 public String list(Model model, HttpServletRequest request) throws JDependException {
   model.addAttribute(
       "resultSummrys",
       AnalysisResultRepository.getInstance()
           .getResultSummrys(WebConstants.DEFLAUT_GROUP, WebConstants.DEFLAUT_COMMAND));
   return "results";
 }
Esempio n. 2
0
  @RequiresPermissions("admin:delete")
  @RequestMapping(value = "result/delete.ajax", method = RequestMethod.POST)
  public @ResponseBody Map<String, Object> delete(
      @ModelAttribute("ids") String ids, HttpServletRequest request) throws JDependException {
    Map<String, Object> resultMap = new HashMap<String, Object>();
    JSONArray idArray = new JSONArray(ids);
    for (int i = 0; i < idArray.length(); i++) {
      AnalysisResultRepository.getInstance().delete(idArray.getString(i));
    }

    resultMap.put("code", "1");
    resultMap.put("msg", "删除成功!");

    return resultMap;
  }
Esempio n. 3
0
  @RequiresPermissions("admin:view")
  @RequestMapping(value = "/result/{id}/view", method = RequestMethod.GET)
  public String view(Model model, @PathVariable String id, HttpServletRequest request)
      throws JDependException {

    AnalysisResult result = AnalysisResultRepository.getInstance().getResult(id);

    WebAnalysisResult webResult = new WebAnalysisResult(result);
    model.addAttribute("result", webResult);
    request.getSession().setAttribute(WebConstants.SESSION_RESULT, webResult);

    TODOListIdentifyerFacade identify = new TODOListIdentifyerFacade();
    List<TODOItem> todoList = identify.identify(result);
    model.addAttribute("todoList", todoList);

    List<TableViewInfo> tableInfos = TableViewUtil.view(result);
    model.addAttribute("tableList", tableInfos);

    RelationGraphData relationGraphData = WebRelationGraphUtil.getGraphData(result.getRelations());
    model.addAttribute("relation_graph_data", relationGraphData);

    return "result";
  }