|  | @ -1,6 +1,6 @@
 | 
	
		
			
				|  |  | package com.yihu.hos.server.controller;
 | 
	
		
			
				|  |  | package com.yihu.hos.monitor.controller;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import com.yihu.hos.server.services.ServerEnvironmentService;
 | 
	
		
			
				|  |  | import com.yihu.hos.monitor.services.MonitorService;
 | 
	
		
			
				|  |  | import com.yihu.hos.web.framework.model.Result;
 | 
	
		
			
				|  |  | import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  | import io.swagger.annotations.ApiParam;
 | 
	
	
		
			
				|  | @ -19,18 +19,18 @@ import javax.annotation.Resource;
 | 
	
		
			
				|  |  |  * @vsrsion 1.0
 | 
	
		
			
				|  |  |  * Created at 2016/10/26.
 | 
	
		
			
				|  |  |  */
 | 
	
		
			
				|  |  | @Controller("serverEnvironmentController")
 | 
	
		
			
				|  |  | @RequestMapping("/server/environment")
 | 
	
		
			
				|  |  | public class ServerEnvironmentController {
 | 
	
		
			
				|  |  | @Controller("MonitorController")
 | 
	
		
			
				|  |  | @RequestMapping("/monitor/")
 | 
	
		
			
				|  |  | public class MonitorController {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @Resource(name = ServerEnvironmentService.BEAN_ID)
 | 
	
		
			
				|  |  |     private ServerEnvironmentService serverEnvironmentService;
 | 
	
		
			
				|  |  |     @Resource(name = MonitorService.BEAN_ID)
 | 
	
		
			
				|  |  |     private MonitorService monitorService;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     //跳转到列表页
 | 
	
		
			
				|  |  |     @RequestMapping("/initial")
 | 
	
		
			
				|  |  |     @RequestMapping("/server/initial")
 | 
	
		
			
				|  |  |     public String initial(Model model) {
 | 
	
		
			
				|  |  |         model.addAttribute("contentPage", "/server/sEnvManage");
 | 
	
		
			
				|  |  |         return "partView";
 | 
	
	
		
			
				|  | @ -48,7 +48,7 @@ public class ServerEnvironmentController {
 | 
	
		
			
				|  |  |             @ApiParam(name = "endTime", value = "结束时间", required = true)
 | 
	
		
			
				|  |  |             @RequestParam(value = "endTime") String endTime) {
 | 
	
		
			
				|  |  |         try {
 | 
	
		
			
				|  |  |             JSONArray array = serverEnvironmentService.getMonitorInfoTest(type, beginTime, endTime);
 | 
	
		
			
				|  |  |             JSONArray array = monitorService.getMonitorInfoTest(type, beginTime, endTime);
 | 
	
		
			
				|  |  |                 model.addAttribute("monitorModel", array);
 | 
	
		
			
				|  |  |             model.addAttribute("contentPage", "server/monitor");
 | 
	
		
			
				|  |  |         } catch (Exception e) {
 | 
	
	
		
			
				|  | @ -57,7 +57,7 @@ public class ServerEnvironmentController {
 | 
	
		
			
				|  |  |         return "partView";
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @RequestMapping(value = "/usage", method = RequestMethod.GET)
 | 
	
		
			
				|  |  |     @RequestMapping(value = "/server/usage", method = RequestMethod.GET)
 | 
	
		
			
				|  |  |     @ResponseBody
 | 
	
		
			
				|  |  |     @ApiOperation(value = "获取服务器使用率", produces = "application/json", notes = "获取服务器硬件使用率")
 | 
	
		
			
				|  |  |     public Result usage(
 | 
	
	
		
			
				|  | @ -67,7 +67,7 @@ public class ServerEnvironmentController {
 | 
	
		
			
				|  |  |             @RequestParam(value = "beginTime") String beginTime,
 | 
	
		
			
				|  |  |             @ApiParam(name = "endTime", value = "结束时间", required = true)
 | 
	
		
			
				|  |  |             @RequestParam(value = "endTime") String endTime) {
 | 
	
		
			
				|  |  |         return serverEnvironmentService.getMonitorInfo(type, beginTime, endTime);
 | 
	
		
			
				|  |  |         return monitorService.getMonitorInfo(type, beginTime, endTime);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | }
 |