<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@page import="org.apache.commons.lang3.StringUtils"%>
<%@page import="com.eactive.eai.rms.common.login.SessionManager"%>
<!DOCTYPE html>
<html>
  <head>
	<script language="javascript" src="<c:url value="/js/jquery-1.12.1.min.js"/>"></script>
   	<script language="javascript">
   	  var serviceType = localStorage["serviceType"];
   	  var mainUrl = "/monitoring/main.do";
   	  if (serviceType) {
   		mainUrl += "?serviceType=" + serviceType;
   	  }
   	  
   	  <% if (StringUtils.isNotBlank(SessionManager.getUserId(request)) || StringUtils.isNotBlank(SessionManager.getRoleIdString(request))) { %>
   	    window.location.replace(mainUrl);
   	  <% } else { %>
   	    window.location.replace("/monitoring/loginForm.do");
   	  <% } %>
   	</script>
  </head>
</html>