/**
 * Most of the code in the Qalingo project is copyrighted Hoteia and licensed
 * under the Apache License Version 2.0 (release version 0.7.0)
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 *                   Copyright (c) Hoteia, 2012-2013
 * http://www.hoteia.com - http://twitter.com/hoteia - contact@hoteia.com
 *
 */
package fr.hoteia.qalingo.web.mvc.controller.monitoring;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import fr.hoteia.qalingo.core.ModelConstants;
import fr.hoteia.qalingo.core.domain.enumtype.BoUrls;
import fr.hoteia.qalingo.core.i18n.BoMessageKey;
import fr.hoteia.qalingo.core.i18n.enumtype.ScopeWebMessage;
import fr.hoteia.qalingo.core.web.servlet.ModelAndViewThemeDevice;
import fr.hoteia.qalingo.web.mvc.controller.AbstractTechnicalBackofficeController;

/**
 * 
 */
@Controller("monitoringController")
public class MonitoringController extends AbstractTechnicalBackofficeController {

	@RequestMapping(BoUrls.MONITORING_URL)
	public ModelAndView searchMonitoring(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
		ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.MONITORING.getVelocityPage());

		final String contentText = getSpecificMessage(ScopeWebMessage.MONITORING, BoMessageKey.MAIN_CONTENT_TEXT, getCurrentLocale(request));
		modelAndView.addObject(ModelConstants.CONTENT_TEXT, contentText);
		
        return modelAndView;
	}
	
}
@@ -388,16 +388,40 @@
 oring;%0A%0A
+import java.util.List;%0A%0A
 import j
@@ -506,16 +506,79 @@
 ponse;%0A%0A
+import org.springframework.beans.factory.annotation.Autowired;%0A
 import o
@@ -782,16 +782,67 @@
 stants;%0A
+import fr.hoteia.qalingo.core.domain.ServerStatus;%0A
 import f
@@ -997,16 +997,69 @@
 essage;%0A
+import fr.hoteia.qalingo.core.service.ServerService;%0A
 import f
@@ -1332,16 +1332,76 @@
 ller %7B%0A%0A
+    @Autowired%0A    protected ServerService serverService;%0A%09%0A
 %09@Reques
@@ -1699,16 +1699,267 @@
 age());%0A
+%09%09List%3CServerStatus%3E severList = serverService.getServerList();%0A%09%09modelAndView.addObject(%22severList%22, severList);%0A%09%09%0A%09%09List%3CServerStatus%3E severStatusList = serverService.findServerStatus();%0A%09%09modelAndView.addObject(%22severStatusList%22, severStatusList);
 %0A%09%09final

update controller