@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); }
/** * 概览页面磁盘 * * @param osId * @param inv */ @Post("gridDiskGrid/{osId}") public void gridDisk(@Param("osId") String osId, Invocation inv) { Date currentTime = new Date(); List<OsDisk> osGridModels = osDiskViewHandle.creatCpuResolveView(osId, currentTime); Page page = new PageImpl(osGridModels); Gridable<OsDisk> gridable = new Gridable<OsDisk>(page); gridable.setIdField("id"); gridable.setCellStringField("diskPath,total,usedUtiliZation,used,freeUtiliZation,free"); try { UIUtil.with(gridable).as(UIType.Json).render(inv.getResponse()); } catch (Exception e) { e.printStackTrace(); } }
/** * 概览页面CPU分解grid 当前时间 io 中断等grid 最下面的分解CPU信息表格 * * @param osId * @return */ @Post("gridCpuResolve/{osId}") public void gridCpuResolve(@Param("osId") String osId, Invocation inv) { Date currentTime = new Date(); List<OsGridModel> osGridModels = osCpuViewHandle.creatCpuResolveView(osId, currentTime); Page page = new PageImpl(osGridModels); Gridable<OsGridModel> gridable = new Gridable<OsGridModel>(page); gridable.setIdField("id"); gridable.setCellStringField("name,value"); try { UIUtil.with(gridable).as(UIType.Json).render(inv.getResponse()); } catch (Exception e) { e.printStackTrace(); } }