@Get("/urls/{applicationId}")
 public void urls(@Param("applicationId") String applicationId, HttpServletResponse response)
     throws Exception {
   List<UrlResponseTime> urlResponseTimeList =
       applicationDetailService.queryUrlResponseTimesFromCatch(applicationId);
   Page page = new PageImpl(urlResponseTimeList);
   Gridable<UrlResponseTime> gridable = new Gridable<UrlResponseTime>(page);
   String cellString = "urlHref,minResponseTime,maxResponseTime,avgResponseTime,healthBar";
   gridable.setIdField("urlId");
   gridable.setCellStringField(cellString);
   UIUtil.with(gridable).as(UIType.Json).render(response);
 }
 @Post("/alarm/{applicationId}")
 public String alarm(@Param("applicationId") String applicationId, Invocation invocation) {
   ApplicationAvailableInf applicationAvailableInf =
       (ApplicationAvailableInf) invocation.getModel("applicationAvailableInf");
   ApplicationDetailAlarmViewModel applicationDetailAlarmViewModel =
       applicationDetailService.generateAlarmViewModel(applicationId);
   String availability = "iup";
   if (applicationAvailableInf != null) {
     if (applicationAvailableInf.getTrend() == Trend.DROP) {
       availability = "idown";
     } else if (applicationAvailableInf.getTrend() == Trend.RISE) {
       availability = "iup";
     }
   }
   applicationDetailAlarmViewModel.setAvailability(availability);
   invocation.addModel("alarmViewModel", applicationDetailAlarmViewModel);
   return "applicationDetailAlarm";
 }
  @Post("/pie/{applicationId}")
  public String pie(@Param("applicationId") String applicationId, Invocation invocation) {
    ApplicationDetailPieViewModel applicationDetailPieViewModel =
        applicationDetailService.generatePieViewModel(applicationId);
    ApplicationAvailableInf applicationAvailableInf =
        (ApplicationAvailableInf) invocation.getModel("applicationAvailableInf");

    if (applicationAvailableInf == null) {
      applicationDetailPieViewModel.setAvailabilityCount(0);
      applicationDetailPieViewModel.setUnavailabilityCount(0);
    } else {
      applicationDetailPieViewModel.setAvailabilityCount(
          applicationAvailableInf.getAvailableCount());
      applicationDetailPieViewModel.setUnavailabilityCount(
          applicationAvailableInf.getCount() - applicationAvailableInf.getAvailableCount());
    }

    invocation.addModel("pieViewModel", applicationDetailPieViewModel);
    return "applicationDetailPie";
  }