Search in sources :

Example 1 with ClientInstanceException

use of com.sohu.cache.entity.ClientInstanceException in project cachecloud by sohutv.

the class ClientManageController method doClientExceptionStat.

/**
     * /manage/client/exception
     * @param request
     * @param response
     * @param model
     * @return
     */
@RequestMapping(value = "/exception")
public ModelAndView doClientExceptionStat(HttpServletRequest request, HttpServletResponse response, Model model) {
    String ip = request.getParameter("ip");
    model.addAttribute("ip", ip);
    //近一个月
    long collectTime = NumberUtils.toLong(new SimpleDateFormat("yyyyMMdd000000").format(DateUtils.addMonths(new Date(), -1)));
    // 一段时间内客户端异常
    List<ClientInstanceException> clientInstanceExceptionList = clientReportExceptionService.getInstanceExceptionStat(ip, collectTime);
    model.addAttribute("clientInstanceExceptionList", clientInstanceExceptionList);
    // 应用相关map
    fillAppInfoMap(model);
    model.addAttribute("clientExceptionActive", SuccessEnum.SUCCESS.value());
    return new ModelAndView("manage/client/exception/list");
}
Also used : ModelAndView(org.springframework.web.servlet.ModelAndView) SimpleDateFormat(java.text.SimpleDateFormat) Date(java.util.Date) ClientInstanceException(com.sohu.cache.entity.ClientInstanceException) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

ClientInstanceException (com.sohu.cache.entity.ClientInstanceException)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Date (java.util.Date)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ModelAndView (org.springframework.web.servlet.ModelAndView)1