package com.cesgroup.cesmonitor.web;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.cesgroup.cesmonitor.bean.CreateFromHost;
import com.cesgroup.cesmonitor.service.CreateFromHostService;

@Controller
@RequestMapping("/createfromhost")
public class CreateFromHostController {
	
    @Autowired
    private CreateFromHostService CreateFromHostService;
    
    

    
    
    /**
    * 上海中信信息发展股份有限公司;
    * 创建时间:2018年1月22日;
    * 作者:luxiao;
    * @return 返回主机组和主机
    */
   @RequestMapping(value = "listHostGroupsWithHosts")
   @ResponseBody
   public List<CreateFromHost> listHostGroupsWithHosts() {
        List<CreateFromHost> createFromHost = null;
		try {
			createFromHost = CreateFromHostService.listHosts();
		} catch (Exception e) {
			e.printStackTrace();
		}
        return createFromHost;
   }

}
