@Test public void getAutofixStatsTest() throws Exception { when(statsService.getAutofixStats()).thenReturn(new ArrayList<Map<String,Object>>()); ResponseEntity<Object> response = statisticsController.getAutofixStats(); assert(response.getStatusCodeValue()==200); }
@RequestMapping(path = "/v1/autofixstats", method = RequestMethod.GET) @ResponseBody public ResponseEntity<Object> getAutofixStats() { Map<String, List<Map<String, Object>>> response = new HashMap<>(); try { response.put("summary", statsService.getAutofixStats()); } catch (Exception e) { LOGGER.error("Error fetching Auto fix stats", e); return ResponseUtils.buildFailureResponse(e); } return ResponseUtils.buildSucessResponse(response); }
StatisticsController implements Constants { @RequestMapping(path = "/v1/autofixstats", method = RequestMethod.GET) @ResponseBody public ResponseEntity<Object> getAutofixStats() { Map<String, List<Map<String, Object>>> response = new HashMap<>(); try { response.put("summary", statsService.getAutofixStats()); } catch (Exception e) { LOGGER.error("Error fetching Auto fix stats", e); return ResponseUtils.buildFailureResponse(e); } return ResponseUtils.buildSucessResponse(response); } }
StatisticsController implements Constants { @RequestMapping(path = "/v1/autofixstats", method = RequestMethod.GET) @ResponseBody public ResponseEntity<Object> getAutofixStats() { Map<String, List<Map<String, Object>>> response = new HashMap<>(); try { response.put("summary", statsService.getAutofixStats()); } catch (Exception e) { LOGGER.error("Error fetching Auto fix stats", e); return ResponseUtils.buildFailureResponse(e); } return ResponseUtils.buildSucessResponse(response); }  }
StatisticsController implements Constants { @RequestMapping(path = "/v1/autofixstats", method = RequestMethod.GET) @ResponseBody public ResponseEntity<Object> getAutofixStats() { Map<String, List<Map<String, Object>>> response = new HashMap<>(); try { response.put("summary", statsService.getAutofixStats()); } catch (Exception e) { LOGGER.error("Error fetching Auto fix stats", e); return ResponseUtils.buildFailureResponse(e); } return ResponseUtils.buildSucessResponse(response); }  @RequestMapping(path = "/v1/cpu-utilization", method = RequestMethod.GET) ResponseEntity<Object> getCPUUtilization(@RequestParam("ag") String assetGroup); @RequestMapping(path = "/v1/network-utilization", method = RequestMethod.GET) ResponseEntity<Object> getNetworkUtilization(@RequestParam("ag") String assetGroup); @RequestMapping(path = "/v1/disk-utilization", method = RequestMethod.GET) ResponseEntity<Object> getDiskUtilization(@RequestParam("ag") String assetGroup); @RequestMapping(path = "/v1/statsdetails", method = RequestMethod.GET) @ResponseBody ResponseEntity<Object> getStatsDetails(); @RequestMapping(path = "/v1/autofixstats", method = RequestMethod.GET) @ResponseBody ResponseEntity<Object> getAutofixStats(); }
StatisticsController implements Constants { @RequestMapping(path = "/v1/autofixstats", method = RequestMethod.GET) @ResponseBody public ResponseEntity<Object> getAutofixStats() { Map<String, List<Map<String, Object>>> response = new HashMap<>(); try { response.put("summary", statsService.getAutofixStats()); } catch (Exception e) { LOGGER.error("Error fetching Auto fix stats", e); return ResponseUtils.buildFailureResponse(e); } return ResponseUtils.buildSucessResponse(response); }  @RequestMapping(path = "/v1/cpu-utilization", method = RequestMethod.GET) ResponseEntity<Object> getCPUUtilization(@RequestParam("ag") String assetGroup); @RequestMapping(path = "/v1/network-utilization", method = RequestMethod.GET) ResponseEntity<Object> getNetworkUtilization(@RequestParam("ag") String assetGroup); @RequestMapping(path = "/v1/disk-utilization", method = RequestMethod.GET) ResponseEntity<Object> getDiskUtilization(@RequestParam("ag") String assetGroup); @RequestMapping(path = "/v1/statsdetails", method = RequestMethod.GET) @ResponseBody ResponseEntity<Object> getStatsDetails(); @RequestMapping(path = "/v1/autofixstats", method = RequestMethod.GET) @ResponseBody ResponseEntity<Object> getAutofixStats();  }