<!DOCTYPE html>

<%@ include file="EgTrackerA.jsp" %>
<%@ page import="com.egurkha.util.*" %>
<%@ page import = "com.egurkha.*"%>
<%@ page import="com.eg.EgRoleInfo"%>
<%@ page import = "java.util.*"%>
<%@ page import = "com.eg.IniFile"%>
<%@ page import = "com.eg.EgUuidInfo"%>
<%@ page import = "com.eg.EgInstallInfo" %>
<%@ page import ="java.text.SimpleDateFormat"%>
<%@ page import="com.egurkha.User" %>
<%@ page import="com.egurkha.UserRegistry"%>
<%@ page import="com.egurkha.EgUserRole"%>
<%@ page import="com.egurkha.EgUserPermission"%>
<%@ page import = "com.eg.EgExternalInfo"%>
<%@ page import = "com.egurkha.ini.IniUI"%>
<%@ page import="egurkha.UserBean"%>
<%@ page import="com.eg.EgServerList"%>
<%@ page import="com.eg.SidCheck"%>
<%@ page import="com.eg.EgSpecsInfo"%>
<%@ page import="com.eg.EgUserElementsInfo"%>
<%@ page import = "com.egurkha.util.StringUtils"%>
<%@ page import = "java.io.*"%>
<%@ taglib prefix="egui" uri="../WEB-INF/eg-taglib.tld" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<%
	response.setHeader("Cache-Control","no-store");
	response.setHeader("Pragma","no-cache");
	response.setDateHeader("Expires", -1);

	EgRoleInfo egRoleInfo = EgRoleInfo.getInstance(session.getId(),(String)session.getAttribute("sess_userid"));
	boolean allCompAccess = egRoleInfo.hasAllComponentAccess();
	IniFile eguiIni = new IniFile(EgInstallInfo.getInstallDir() + "/manager/config/eg_ui.ini");
	String limitedAdminHome = eguiIni.getValue("USER_SIGN_IN","limitedAdminHome");
	if (!allCompAccess && limitedAdminHome != null && limitedAdminHome.equalsIgnoreCase("default"))
	{
		String limitedAdminHomepage = "../admin/EgUnconfiguredTestsSummary.jsp?fromPage=limitedCompAccess";
%>
		<jsp:forward page="<%=limitedAdminHomepage%>" />
<%
	}
	
	session.putValue("UBean",UserRegistry.getInstance().getUser(session.getId(),true).getReporterData());
	IniFile ini = new IniFile(EgInstallInfo.getInstallDir() + "/manager/config/eg_services.ini");
	String alertAgents = ini.getValue("MISC_ARGS","AlertAgentsNotRunning");
	ArrayList allNotRunningAgentsList = new ArrayList();
	ArrayList agentsNotRunningList = new ArrayList();
	UserBean userBean = new UserBean();
	EgRoleInfo ri = EgRoleInfo.getInstance(session.getId(),(String)session.getAttribute("sess_userid"));
	Vector allServers = ri.getAllServersWithoutType();
	EgExternalInfo extInfo = new EgExternalInfo("manager");
	ArrayList userExtAgentList = new ArrayList();
	List userAgents = new ArrayList(); 
	EgServerList slist = new EgServerList();

	if(alertAgents != null && !alertAgents.equals("") && alertAgents.equalsIgnoreCase("Yes"))
	{
		List premiumAgents = userBean.getPremiumAgents(); 
		List basicAgents = userBean.getCurrentBasicAgents((ArrayList)premiumAgents); 
		List temp = new LinkedList();

		temp.addAll(basicAgents);
		temp.addAll(premiumAgents);
		temp = com.egurkha.util.ListUtils.removeDuplicates(temp);

		ArrayList allAgents = new ArrayList(temp.size());
		allAgents.addAll(temp);
		List agentStatus = slist.getAgentList(allAgents);

		for (int a=0; a<agentStatus.size(); a+=4)
		{
			String agentIP = (String)agentStatus.get(a);
			String status = (String)agentStatus.get(a+1);

			if (status.equalsIgnoreCase("Installed-Not Running") || status.equalsIgnoreCase("Not Installed-Not Running"))
			{
				allNotRunningAgentsList.add(agentIP);
			}
		}

		if(!ri.hasAllComponentAccess())
		{
			if(allServers != null && allServers.size() > 0)
			{
				for(int i=0;i<allServers.size();i++)
				{
					String compData = (String) allServers.get(i);
					String nickName = compData.substring(0,compData.indexOf(":"));
					List extAgentList = extInfo.getAgentsForHost(nickName);
					for(int e=0;e<extAgentList.size();e++)
					{
						String  extAgentData = (String) extAgentList.get(e);
						if(!userExtAgentList.contains(extAgentData))
						{
							userExtAgentList.add(extAgentData);
						}
					}
				}
			}

			if(userExtAgentList != null && userExtAgentList.size()> 0)
			{
				for(int ua=0;ua<userExtAgentList.size();ua++)
				{
					String userExtAgtData = (String) userExtAgentList.get(ua);
					if(allNotRunningAgentsList.contains(userExtAgtData))
					{
						agentsNotRunningList.add(userExtAgtData);
					}
				}
			}
		}
		else
		{
			agentsNotRunningList.addAll(allNotRunningAgentsList);
		}
	}

	IniFile egUI = new IniFile(EgInstallInfo.getInstallDir()+ "/manager/config/eg_ui.ini");
	String currentDateFormat = egUI.getValue("CURRENT_DATE_FORMAT","selectedDateFormat");

	UserRegistry registry1 = UserRegistry.getInstance();
	User user = registry1.getUser(session.getId(),true);
	String userDateFormat = user.getUserDateFormat();
	if (userDateFormat != null && userDateFormat.equalsIgnoreCase("Default"))
	{
		userDateFormat = currentDateFormat;
	}
	userDateFormat +=" HH:mm:ss";

	String integrity = request.getParameter("integritycheckviolated");
	IniFile iniObj = new IniFile(EgInstallInfo.getInstallDir() + "/manager/config/eg_services.ini");
	
	String exceedAgentAlert = eguiIni.getValue("MISC_ARGS","LICENSE_COUNT_EXHAUSTED_ALERT");
	exceedAgentAlert = (exceedAgentAlert == null)?"":exceedAgentAlert.trim();

	String hasNotificationWindow = (String)session.getAttribute("hasNotificationWindow");
	if (hasNotificationWindow == null || hasNotificationWindow.length() == 0)
	{
		hasNotificationWindow = "yes";
	}
%>
<%
	String userId = user.getLoginID();
	IniFile eguuidIni = new IniFile(EgInstallInfo.getInstallDir() + "/manager/config/eg_uuid.ini");
	String downloadStatus = eguuidIni.getValue("AGENT_DOWNLOAD_STATUS",userId);
	String theme = _user.getAdminSkin();
	String fromAction = request.getParameter("fromAction");
	String comeFrom = request.getParameter("comeFrom");
	String strServer = request.getParameter("server");
	boolean disableStartCardPrevArrow = false;
	String showWelcomeWizard = "no";

	if(StringUtils.isNull(strServer))
	{
		strServer = "";
	}
%>

<html>
<head>

<jsp:useBean id="SiteBean" scope="page" class="egurkha.ConfigSiteBean"/>

<%
	//New code
	SidCheck check = new SidCheck();
	String sid_flag = "false";
	if(check.sidNotConfigured)
	{
		sid_flag = "true";
	}
	else
	{
		sid_flag = "false";
	}
	//end of new code

	String s_lcat = "";
	String s_acat = "";
	s_lcat = SiteBean.lcat();
	if(exceedAgentAlert.equalsIgnoreCase("Yes") || exceedAgentAlert.equalsIgnoreCase("True"))
	{
		s_acat = SiteBean.acat();
	}
%>

	<meta charset="utf-8">

	<link rel="stylesheet" type="text/css" href="/final/resources/css/ext-eg.css" />
	<link rel="stylesheet" type="text/css" href="/final/styles/eGLightThemeIcons.css" />
	<link rel="stylesheet" type="text/css" href="/final/admin/styles/adminWizardLight.css" />

	<script type="text/javascript" src="/final/extjs/ext-all.js"></script>

	<!-- Fancy Scroll-->
	<script src="/final/jquery/jquery.js"></script>
	<script src="/final/styles/jscrollpane/jquery.jscrollpane.js" ></script>
	<script src="/final/styles/jscrollpane/jquery.mousewheel.js" ></script>
	<script src="/final/styles/jscrollpane/mwheelIntent.js" ></script>
	<link rel="stylesheet" href="/final/styles/jscrollpane/jquery.jscrollpane.css"/>

	<script language="JavaScript1.2" src="/final/scripts/eg_DateUtil.js"></script>
	<script language="Javascript1.2" src="eg_scripts/date.js"></script>
	<script type="text/javascript" src="/final/admin/eg_scripts/CustomGridSorting.js"></script>
	<script language="javascript1.2" src="eg_scripts/validate.js"></script>
	<script language="JavaScript1.2" src="eg_scripts/eg_configtest.js"></script>
	<script language="javascript1.2" src="eg_scripts/ajaxutils.js"></script>
	<script language="JavaScript" src="/final/scripts/utilities/EncodeDecodeParams.js"></script>

	<script language="JavaScript" src="/final/admin/eg_scripts/testvalidate.js"></script>
	<script language="javascript" src="/final/admin/eg_scripts/eg_testparamsvalidate.js"></script>
	<script language="javascript" src="/final/admin/eg_scripts/validateTestParameters.js"></script>

	<script language="JavaScript1.2" src="../scripts/<%=script_src%>"></script>

	<script language="javascript">
	var pageName = '';
	var fromAgentModel = '';
	var csrfToken = '<%=strCsrfToken%>';
	var publicAgentLessJson = '';
	var publicJSON = '';
	var serverJson = '';
	var pageDisc = '';
	var pageTitle = '';
	var userDateFormat = '<%=currentDateFormat%>';
	var hasNotificationWindow = '<%=hasNotificationWindow%>';
	var unconfigComponentState = '';
	var intnlMessage1 = '<egui:intnl text="admin.dashboard.License Usage Summary"/>';
	var intnlMessage2 = '<egui:intnl text="admin.dashboard.No users have been configured"/>';
	var intnlMessage3 = '<egui:intnl text="admin.dashboard.User Summary"/>';
	var intnlMessage4 = '<egui:intnl text="admin.dashboard.No Agents Configured"/>!';
	var intnlMessage5 = '<egui:intnl text="admin.dashboard.Configured Agents Summary"/>';
	var intnlMessage6 = '<egui:intnl text="admin.dashboard.Total Agents"/>';
	var intnlMessage7 = '<egui:intnl text="admin.dashboard.Running"/>';
	var intnlMessage8 = '<egui:intnl text="admin.dashboard.Not Running"/>';
	var intnlMessage9 = '<egui:intnl text="admin.dashboard.Agent Type"/>';
	var intnlMessage10 = '<egui:intnl text="admin.dashboard.Managed Components To Be Configured For Monitoring"/>';
	var intnlMessage11 = '<egui:intnl text="admin.dashboard.Component Type"/>';
	var intnlMessage12 = '<egui:intnl text="admin.dashboard.Performance Test"/>';
	var intnlMessage13 = '<egui:intnl text="admin.dashboard.Configuration Test"/>';
	var intnlMessage14 = '<egui:intnl text="admin.dashboard.All components have been configured"/>';
	var intnlMessage15 = '<egui:intnl text="admin.dashboard.No components have been managed"/>';
	var intnlMessage16 = '<egui:intnl text="admin.dashboard.Individual"/>';
	var intnlMessage17 = '<egui:intnl text="admin.dashboard.Aggregate"/>';
	var intnlMessage18 = '<egui:intnl text="admin.dashboard.Managed Components At-A-Glance"/>';
	var intnlMessage19 = '<egui:intnl text="admin.dashboard.No components have been managed"/>';
	var intnlMessage20 = '<egui:intnl text="admin.dashboard.No aggregate components have been managed"/>';
	var intnlMessage21 = '<egui:intnl text="admin.dashboard.Number of Components"/>';
	var intnlMessage22 = '<egui:intnl text="admin.dashboard.IP Address"/>';
	var intnlMessage23 = '<egui:intnl text="admin.dashboard.Host name"/>';
	var intnlMessage24 = '<egui:intnl text="admin.dashboard.Nick names"/>';
	var intnlMessage25 = '<egui:intnl text="admin.dashboard.Unconfigured Agents Summary"/>';
	var intnlMessage26 = '<egui:intnl text="admin.dashboard.Discovered Components"/>';
	var expandAll = '<egui:intnl text="admin.dashboard.Expand All"/>';
	var collapseAll = '<egui:intnl text="admin.dashboard.Collapse All"/>';
	var intnlMessage27 = '<egui:intnl text="admin.agents.Agent IP/Nick name"/>';
	var intnlMessage28 = '<egui:intnl text="admin.agents.Last reported time"/>';
	var alertAgents = '<%=alertAgents%>';
	var agentsNotRunningList = '<%=agentsNotRunningList.size()%>';
	var intnlMessage29 = "<egui:intnl text='admin.agents.NOT REPORTING AGENTS DETAILS' />";
	var intnlMessage30 = '<egui:intnl text="admin.agents.No agent found for your current search"/>'+'.';
	var intnlMessage31 = '<egui:intnl text="admin.license.Allowed"/>';
	var intnlMessage32 = '<egui:intnl text="admin.license.Used"/>';
	var intnlMessage33 = '<egui:intnl text="admin.license.Available"/>';
	var intnlMessage34 = '<egui:intnl text="admin.license.Attribute"/>';
	var delConfirmMsg = '<egui:intnl text="admin.dashboard.Are you sure you want to delete"/>';
	var updating = '<egui:intnl text="admin.common.Updating"/>';
	var alertMsg37 = '<egui:intnl text="admin.server.The component has been deleted successfully"/>';
	var glancePageTitle = '<egui:intnl text="admin.server.Components at a Glance"/>';
	var errorTitle = '<egui:intnl text="admin.server.Error"/>';
	var pageIntnl14 = '<egui:intnl text="admin.server.Possible reasons could be"/>';
	var addButtonText = '<egui:intnl text="admin.server.Add Component"/>';
	var associatedEntitiesTitle1 = '<egui:intnl text="admin.common.Entities"/>';
	var associatedEntitiesTitle2 = '<egui:intnl text="admin.common.Affected Entities"/>';

	var probsErrorMessage = '<egui:intnl text="admin.error.Problem encountered while loading the user interface"/>';
	var requestTimeOut = '<egui:intnl text="admin.error.Response timed out"/>';
	var errorTitle = '<egui:intnl text="admin.user.Error"/>';

	Ext.onReady(function(){
		Ext.Ajax.extraParams = {"com.eg.CSRF_NONCE" : csrfToken};
		Ext.data.Connection.prototype.extraParams = {"com.eg.CSRF_NONCE" : csrfToken};
		Ext.data.ScriptTagProxy.prototype.extraParams = {"com.eg.CSRF_NONCE" : csrfToken};

		Ext.Ajax.on('requestexception', function (conn, response, options) {
			var errorStr = response.responseText;
			if (errorStr != undefined && errorStr != 'undefined' && errorStr.indexOf("customerror") != -1)
			{
				if (errorStr.indexOf("user-session-invalid") != -1)
				{
					callWindow(1);
				}
				else if (errorStr.indexOf("user-deleted") != -1)
				{
					callWindow(2);
				}
				else if (errorStr.indexOf("user-timedout") != -1)
				{
					callWindow(3);
				}
			}
			else
			{
				if (response.status == 302 || (response.timedout != undefined && response.timedout == true))
				{
					Ext.Msg.show({
						title : errorTitle,
						msg : requestTimeOut+'.',
						buttons : Ext.Msg.OK,
						icon : 'iconError'
					});
				}
				else
				{
					console.log(response.responseText);
					Ext.Msg.show({
						title : errorTitle,
						msg : probsErrorMessage+'.',
						buttons : Ext.Msg.OK,
						icon : 'iconError'
					});
				}
			}
		});
	});

	function alertuser(lcat,acat,sid,integrity)
	{
		var windowobj =  window.parent;
		windowobj = windowobj.parent;
		var activityWindowObj = windowobj.Ext.getCmp('mangerNotificationWindow');
		var message = "";
		var hasAlertMsg = false;
		windowobj.adminWarnings = "";

		if (integrity == "true" && windowobj.hasNotificationWindow == "yes")
		{
			windowobj.calIntegrityCheckDialogBox(integrity);
		}

		if(acat != "")
		{
			hasAlertMsg = true;
			if (windowobj.adminWarnings != null && windowobj.adminWarnings.indexOf('etype5') == -1)
			{
				windowobj.adminWarnings = windowobj.adminWarnings + "<div id='etype5' class='commonErrorMsgText managerNotificationOuterView'><div class='managerNotificationInnerView'><div class='iconExclamation' style='float:left;width:35px;margin:5px;'></div><div class='msgContainer'>"+acat+"</div><div style='clear:both'></div></div></div>";
			}
		}

		if(sid == "true")
		{
			hasAlertMsg = true;
			if (windowobj.adminWarnings != null && windowobj.adminWarnings.indexOf('etype4') == -1)
			{
				windowobj.adminWarnings = windowobj.adminWarnings + "<div id='etype4' class='commonErrorMsgText managerNotificationOuterView'><div class='managerNotificationInnerView'><div class='iconExclamation' style='float:left;width:35px;margin:5px;'></div><div class='msgContainer'>SID/Service name has not been configured for some of the managed oracle components. Users of type 'Monitor' cannot sign in until the SIDs/service names are configured.&nbsp;<a class='eg_monlink manager_notification' href='/final/admin/EgViewManagerNotificationDetails.jsp?type=4' onclick='javascript:destroyNotificationWindow()' target='main'><span class='font_bold11 commonErrorMsgText' style='text-decoration:underline'>Click here</span></a> to know more.</div><div style='clear:both'></div></div></div>";
			}
		}

		if (windowobj.hasNotificationWindow == "yes" && hasAlertMsg == true)
		{
			windowobj.showNotificationDialogBox(false,false);
		}
		windowobj.hasNotificationWindow = hasNotificationWindow;
	}

	Ext.onReady(function(){
		alertuser('<%=s_lcat%>','<%=s_acat%>','<%=sid_flag%>','<%=integrity%>');
	});
</script>
<%
	EgUserRole userRole = user.getUserRole();
	String roleName     = userRole.getRoleName();
	EgUserPermission sas = EgUserPermission.getInstance();
	long perValue = userRole.getAdminPerm();
	ArrayList adminPermCheckList = sas.getPrivilegeList(roleName,perValue,0);//admin role privilege list.
	String[][] allGroupNames = sas.getAdminDesc();//all admin groups.
	String hasUserManagementEnabled = "none";
	String hasMaintenancePolicyEnabled = "none";
	String hasComponentMangamentEnabled = "none";
	String hasSegmentConfigEnabled = "none";
	String hasServiceConfigEnabled = "none";
	String hasAgentTestEnabled = "none";
	String hasAgentThreshEnabled = "none";
	String hasZonesEnabled = "none";
	String hasComponentGrpEnabled = "none";
	String hasGlobalThreshEnabled = "none";
	String hasGlobalTestEnabled = "none";
	String hasExtRemAgentsEnabled = "none";

	for (int i=0;i<allGroupNames.length;i++)
	{
		String temp = allGroupNames[i][0];
		if (!adminPermCheckList.contains(temp))
		{
			continue;
		}
		if (temp.equalsIgnoreCase("User Management"))
		{
			hasUserManagementEnabled = "block";
		}
		else if (temp.equalsIgnoreCase("Maintenance Policy Configuration"))
		{
			hasMaintenancePolicyEnabled = "block";
		}
		else if (temp.equalsIgnoreCase("Component Management"))
		{
			hasComponentMangamentEnabled = "block";
		}
		else if (temp.equalsIgnoreCase("Segment Configuration"))
		{
			hasSegmentConfigEnabled = "block";
		}
		else if (temp.equalsIgnoreCase("Service Configuration"))
		{
			hasServiceConfigEnabled = "block";
		}
		else if (temp.equalsIgnoreCase("Agent Test Configuration"))
		{
			hasAgentTestEnabled = "block";
		}
		else if (temp.equalsIgnoreCase("Agent Threshold Configuration"))
		{
			hasAgentThreshEnabled = "block";
		}
		else if (temp.equalsIgnoreCase("Zone Configuration"))
		{
			hasZonesEnabled = "block";
		}
		else if (temp.equalsIgnoreCase("Group Configuration"))
		{
			hasComponentGrpEnabled = "block";
		}
		else if (temp.equalsIgnoreCase("Global Threshold Configuration"))
		{
			hasGlobalThreshEnabled = "block";
		}
		else if (temp.equalsIgnoreCase("Global Agent Test Configuration"))
		{
			hasGlobalTestEnabled = "block";
		}
		else if (temp.equalsIgnoreCase("External/Remote Agent Configuration"))
		{
			hasExtRemAgentsEnabled = "block";
		}
	}
	
	String hasTestEnabled = "none";
	if (!hasGlobalTestEnabled.equalsIgnoreCase("none") || !hasAgentTestEnabled.equalsIgnoreCase("none"))
	{
		hasTestEnabled = "block";
	}

	String hasThreshEnabled = "none";
	if (!hasGlobalThreshEnabled.equalsIgnoreCase("none") || !hasAgentThreshEnabled.equalsIgnoreCase("none"))
	{
		hasThreshEnabled = "block";
	}
	
	String hasAggComponentMangamentEnabled = "none";
	boolean aggregateEnabled = EgInstallInfo.isAggSupported;
	if (aggregateEnabled && !hasComponentMangamentEnabled.equalsIgnoreCase("none"))
	{
		hasAggComponentMangamentEnabled = "block";
	}

	boolean hideDownloadAgent = false;
	boolean hideCompAtAGlance = false;
	boolean hideRefineConfig = false;
	boolean hideManageInfra = false;

	if (hasTestEnabled.equalsIgnoreCase("none") && hasThreshEnabled.equalsIgnoreCase("none") && hasMaintenancePolicyEnabled.equalsIgnoreCase("none"))
	{
		hideRefineConfig = true;
	}

	if (hasComponentMangamentEnabled.equalsIgnoreCase("none") && hasAggComponentMangamentEnabled.equalsIgnoreCase("none") && hasExtRemAgentsEnabled.equalsIgnoreCase("none") && hasComponentGrpEnabled.equalsIgnoreCase("none") &&
		hasZonesEnabled.equalsIgnoreCase("none") && hasServiceConfigEnabled.equalsIgnoreCase("none") && hasSegmentConfigEnabled.equalsIgnoreCase("none"))
	{
		hideManageInfra = true;
	}
	
	boolean hideAgentVersion = true;
	IniFile mgrIni = new IniFile(EgInstallInfo.getInstallDir() + "/manager/config/eg_mgrmisc.ini");
	String ShowVersionSpecificAgents = mgrIni.getValue("MISC_ARGS","ShowVersionSpecificAgents");
	if (ShowVersionSpecificAgents != null && ShowVersionSpecificAgents.equalsIgnoreCase("true"))
	{
		hideAgentVersion = false;
	}

	String hasVMLink = "none";
	String ComponentsType [] = ri.getServerTypes();
	ArrayList server_list = ComponentsType==null?new ArrayList():new ArrayList(Arrays.asList(ComponentsType));

	if(StringUtils.isNull(fromAction))
	{
		showWelcomeWizard = "yes";
		if ((downloadStatus != null && downloadStatus.equalsIgnoreCase("true")) || (server_list != null && server_list.size() > 0))
		{
			fromAction = "componentsGlance";
		}
		else
		{
			fromAction = "";
			disableStartCardPrevArrow = true;
		}
	}

	IniFile infraIni = new IniFile(EgInstallInfo.getInstallDir() +"/manager/config/eg_infrastructure.ini");
	String virtualization_platforms [] = infraIni.getVariables("VIRTUALIZATION_PLATFORMS");
	String cloud [] = infraIni.getVariables("CLOUD");
	ArrayList vm_server_list = new ArrayList();
	for (int v=0;v<virtualization_platforms.length;v++)
	{
		vm_server_list.add(virtualization_platforms[v]);
	}
	for (int c=0;c<cloud.length;c++)
	{
		vm_server_list.add(cloud[c]);
	}
	for (int i=0;i<server_list.size();i++)
	{
		String server = (String)server_list.get(i);
		if (vm_server_list.contains(server))
		{
			hasVMLink = "block";
			break;
		}
	}

	boolean showUploadAgentUI = false;
	boolean showDownloadAgentUI = false;

	String skipUploadAgentProcedure = mgrIni.getValue("MISC_ARGS","skipUploadAgentProcedure");
	String skipInstallAgentProcedure = mgrIni.getValue("MISC_ARGS","skipInstallAgentProcedure");
	String productionMode = mgrIni.getValue("MISC_ARGS","ProductionMode");
	String agentUploadLink = "";
	IniFile dbaseIni = new IniFile(EgInstallInfo.getInstallDir() + "/manager/config/eg_dbase.ini");
	String managerVersion = dbaseIni.getValue("MANAGER_DETAILS","ManagerVersion");
	if (productionMode != null && (productionMode.equalsIgnoreCase("true") || productionMode.equalsIgnoreCase("yes")))
	{
		managerVersion = StringUtils.replace(managerVersion,".","");
		agentUploadLink = mgrIni.getValue("MISC_ARGS","agentUploadLinkProd");
	}
	else
	{
		agentUploadLink = mgrIni.getValue("MISC_ARGS","agentUploadLinkDev");
	}
	skipUploadAgentProcedure = (skipUploadAgentProcedure==null || skipUploadAgentProcedure.trim().length()==0)?"false":skipUploadAgentProcedure;
	skipInstallAgentProcedure = (skipInstallAgentProcedure==null || skipInstallAgentProcedure.trim().length()==0)?"false":skipInstallAgentProcedure;
	agentUploadLink = (agentUploadLink==null || agentUploadLink.trim().length()==0)?"Agent Executable Directory":agentUploadLink;
	agentUploadLink = StringUtils.replace(agentUploadLink,"$version$",managerVersion);

	String enableProxySettingsForO365 = mgrIni.getValue("MISC_ARGS","enableProxySettingsForO365");

	boolean hideProxySettingsForO365 = true;
	if (enableProxySettingsForO365 != null && enableProxySettingsForO365.equalsIgnoreCase("true"))
	{
		hideProxySettingsForO365 = false;
	}

	String office365Model = mgrIni.getValue("MISC_ARGS","office365Model");
	if (office365Model == null || office365Model.trim().length() == 0)
	{
		office365Model = "standard";
	}

	String remoteAgenForO365 = mgrIni.getValue("MISC_ARGS","remoteAgenForO365");
	EgSpecsInfo egSpecs = new EgSpecsInfo("manager");
	String defaultRemAgent = egSpecs.getEGServer();
	if (remoteAgenForO365 == null || remoteAgenForO365.trim().length() == 0)
	{
		remoteAgenForO365 = defaultRemAgent;
	}

	String sep = System.getProperty("file.separator");

	if (userId != null && userId.equalsIgnoreCase(EgConstants.DEFAULT_ADMIN_USER))
	{
		File execfolder = new File(EgInstallInfo.getInstallDir()+sep+"manager"+sep+"agents"+sep+"Universal"+sep+"Latest");
		File[] listOfFiles = execfolder.listFiles();
		if (skipUploadAgentProcedure.equalsIgnoreCase("false") && listOfFiles.length <= 1)
		{
			showUploadAgentUI = true;
		}

		File agentfolder = new File(EgInstallInfo.getInstallDir()+sep+"lib"+sep+"eg_agent.jar");
		if (skipInstallAgentProcedure.equalsIgnoreCase("false") && !agentfolder.exists())
		{
			showDownloadAgentUI = true;
		}
	}
%>
<%!
	String osName = getOSName();
%>
<%
	String displayOsName = mgrIni.getValue("WINDOWS_AGENT_FOLDER_NAMES",osName);
	if (displayOsName == null || displayOsName.trim().length() == 0)
	{
		displayOsName = mgrIni.getValue("UNIX_AGENT_FOLDER_NAMES",osName); 
	}
	String displayOsNameWithBit = "";
	if (osName.indexOf("Windows") > -1 || osName.indexOf("Linux") > -1)
	{
		if (osName.indexOf("x64") > -1)
		{
			displayOsNameWithBit = displayOsName+" 64-bit";
		}
		else
		{
			displayOsNameWithBit = displayOsName;
		}
	}
	else
	{
		displayOsNameWithBit = displayOsName;
	}

	String hostName = defaultRemAgent;

	String installDir = EgInstallInfo.getInstallDir();
	installDir = StringUtils.encodeJSParams(installDir);
	
	boolean hideSkip = false;
	String eGMgrModel = ini.getValue("MISC_ARGS","eGMgrModel");
	if (eGMgrModel != null && eGMgrModel.equalsIgnoreCase("msp"))
	{
		hideSkip = true;
	}

	String autoRefreshStr = mgrIni.getValue("MISC_ARGS","autoRefresh");
	autoRefreshStr = (autoRefreshStr == null || autoRefreshStr.trim().length() == 0)?"300000":autoRefreshStr;
	int autoRefresh = Integer.parseInt(autoRefreshStr);
	
	boolean isDouble = com.eg.EgDbInfo.doubleByteEnabled;
	com.eg.EgServicesInfo servicesInfo = new com.eg.EgServicesInfo("manager");
	boolean isAllowHostName = servicesInfo.isAllowHostNames();
	boolean autoIpNameCheck = servicesInfo.autoIpNameCheck();

	EgMappingInfo mappingInfo = new EgMappingInfo(_user.getLanguage());
	String office365 = mappingInfo.getComponentTypeDescription("MS_Office_365");
	String exchange = mappingInfo.getComponentTypeDescription("MSExchangeOnline");
	String sharepoint = mappingInfo.getComponentTypeDescription("Microsoft_Sharepoint_Online");
	String skypeonline = mappingInfo.getComponentTypeDescription("MS_Skype_Online");
	String msteams = mappingInfo.getComponentTypeDescription("Microsoft_Teams");
	String onedrive = mappingInfo.getComponentTypeDescription("MS_OneDrive_Business");

	IniFile clsIni = new IniFile (EgInstallInfo.getInstallDir()+"/manager/config/eg_ls_portal.ini");
	String sendUserDataToCMS = clsIni.getValue("LS_TRIAL_SETTINGS","sendUserDataToCMS");
	String cloudModel = clsIni.getValue("LS_TRIAL_SETTINGS","cloudModel");
	String defaultPortal = clsIni.getValue("LS_TRIAL_SETTINGS","defaultPortal");
	boolean hideDownloadInstaller = true;
	boolean showAddNetscalerBtn = false;
	String via = "";

	if (cloudModel != null && cloudModel.equalsIgnoreCase("phoenix"))
	{
		hideDownloadInstaller = false;

		if (!allCompAccess)
		{
			EgUserElementsInfo userElmentsObj = new EgUserElementsInfo();
			ArrayList remagentsList = userElmentsObj.getRemoteAgentsForUser(userId);
			ArrayList extagentsList = userElmentsObj.getExternalAgentsForUser(userId);
			if (remagentsList != null && remagentsList.size() > 0 && extagentsList != null && extagentsList.size() > 0 && hasComponentMangamentEnabled.equalsIgnoreCase("block"))
			{
				showAddNetscalerBtn = true;
			}
		}
	}

	if (defaultPortal != null && defaultPortal.equalsIgnoreCase("cloud"))
	{
		via = request.getParameter("via");
		if (StringUtils.isNull(via))
		{
			via = (String)session.getAttribute("via");
			session.removeAttribute("via");
		}
	}

	String mgrUrl = iniObj.getValue("MISC_ARGS","MailHomeUrl");
	String isSSL = "";
	String schema = mgrUrl.substring(0,mgrUrl.indexOf("://"));
	if (schema.equalsIgnoreCase("http"))
	{
		isSSL = "false";
	}
	else if (schema.equalsIgnoreCase("https"))
	{
		isSSL = "true";
	}
	String url = mgrUrl.substring(mgrUrl.indexOf("://")+3,mgrUrl.length());
	String server = "";
	String port = "";
	if (url.indexOf(":") != -1)
	{
		StringTokenizer st = new StringTokenizer(url,":");
		server = st.nextToken();
		port = st.nextToken();
	}
	else
	{
		server = url;
		if (isSSL.equalsIgnoreCase("false"))
		{
			port = "80";
		}
		else
		{
			port = "443";
		}
	}
	server = StringUtils.replace(server,"\\.","^.");

	String uid = "";
	String issueUUID = iniObj.getValue("MISC_ARGS","issueUUID");
	if (issueUUID != null && (issueUUID.equalsIgnoreCase("yes") || issueUUID.equalsIgnoreCase("true")))
	{
		String orgname = "";
		EgUuidInfo egUuidInfo = new EgUuidInfo();
		boolean isSuperOrg = egUuidInfo.isSuperOrg(userId);
		boolean isOrg = egUuidInfo.isOrg(userId);
		if (isSuperOrg)
		{
			orgname = userId;
			uid = eguuidIni.getValue("ORG_UUID",orgname);
		}
		else
		{
			if (isOrg)
			{
				orgname = userId;
			}
			else
			{
				orgname = egUuidInfo.getDirectDependentOU(userId);
			}
			boolean isSuperOU = egUuidInfo.isSuperOrg(orgname);
			if (!isSuperOU)
			{
				String superOU = egUuidInfo.getSuperOU(orgname);
				uid = eguuidIni.getValue(superOU,orgname);
			}
			else
			{
				uid = eguuidIni.getValue("ORG_UUID",orgname);
			}
		}
	}
%>

<script src="/final/scripts/d3.min.js" charset="utf-8"></script>
<!--
<script src="https://d3js.org/d3.v4.min.js"></script>
-->
<style>
	.x-btn-icon.fieldsetClose{
		background-image : url('/final/portal/images/fieldsetClose.png');
		background-repeat : no-repeat;
		width:18px;
		height:18px;
	}

	.x-item-disabled .x-form-item-label, 
	.x-item-disabled .x-form-field, 
	.x-item-disabled .x-form-cb-label, 
	.x-item-disabled .x-form-trigger,
	.x-item-disabled .x-form-item-body
	{
		opacity: .77 !important;
		filter: alpha(opacity=77) !important;
	}
</style>
<script>
	var server = '<%=server%>';
	var port = '<%=port%>';
	var isSSL = '<%=isSSL%>';
	var uid = '<%=uid%>';
	var fileSep = '\<%=sep%>';
	var sendUserDataToCMS = '<%=sendUserDataToCMS%>';
	var hideDownloadInstaller = <%=hideDownloadInstaller%>;
	var showAddNetscalerBtn = <%=showAddNetscalerBtn%>;
	var hideProxySettingsForO365 = <%=hideProxySettingsForO365%>;
	var via = '<%=via%>';
	var office365Model = '<%=office365Model%>';
	var remoteAgenForO365 = '<%=remoteAgenForO365%>';
	var addCitrixNetscalerBtn = '<egui:intnl text="admin.la.Add Citrix NetScaler"/>';
	var alertMsg1 = '<egui:intnl text="admin.server.Nick name is not allowed in DBL(Chinese,Korean,Japanese),since manager is SingleByte"/>.';
	var alertMsg2 = '<egui:intnl text="admin.server.The Operating System must be selected"/>.';
	var alertMsg3 = '<egui:intnl text="admin.server.A mode must be selected for agentless monitoring"/>.';
	var alertMsg4 = '<egui:intnl text="admin.server.Perfmon is available only for Windows operating systems"/>.';
	var alertMsg5 = '<egui:intnl text="admin.server.is not available for Windows operating systems"/>.';
	var alertMsg6 = '<egui:intnl text="admin.server.Mode should be SNMP for this server type"/>.';
	var alertMsg7 = '<egui:intnl text="admin.server.Atleast one external agent must be selected"/>.';
	var alertMsg8 = '<egui:intnl text="admin.server.Please enter the port number"/>.';
	var alertMsg9 = '<egui:intnl text="admin.server.Port should be a valid number"/>.';
	var alertMsg10 = '<egui:intnl text="admin.server.Port numbers cannot have decimals"/>.';
	var alertMsg11 = '<egui:intnl text="admin.server.Only valid integers are allowed"/>.';
	var alertMsg12 = '<egui:intnl text="admin.common.Invalid port number"/>.';
	var alertMsg13 = '<egui:intnl text="admin.server.Spaces not allowed for port numbers"/>.';
	var alertMsg14 = '<egui:intnl text="admin.server.User field cannot have a null value"/>.';
	var alertMsg15 = '<egui:intnl text="admin.server.Password field cannot have a null value"/>.';
	var alertMsg16 = "<egui:intnl text='admin.test.Password data should not contain pipe and double quotes'/>.";
	var alertMsg17 = '<egui:intnl text="admin.server.Please do not leave blank space in the user field"/>.';
	var alertMsg18 = '<egui:intnl text="admin.server.Please enter the IP address of the host"/>.';
	var alertMsg19 = '<egui:intnl text="admin.server.Please enter the IP address/host name"/>.';
	var alertMsg20 = '<egui:intnl text="admin.server.Your host/nick name cannot be the same as one of the internal representation types used by eG Enterprise"/>.';
	var alertMsg21 = '<egui:intnl text="admin.server.Please choose another host/nick name"/>.';
	var alertMsg22 = '<egui:intnl text="admin.server.Please enter the nick name"/>.';
	var alertMsg23 = '<egui:intnl text="admin.server.Atleast one Esx Server Host must be selected"/>.';
	var alertMsg24 = '<egui:intnl text="admin.server.Atleast one cloud Server must be selected"/>.';
	var alertMsg25 = '<egui:intnl text="admin.server.Please enter the same IP address if you are entering IP address for the nick name field"/>.';
	var alertMsg26 = '<egui:intnl text="admin.server.Your hostname cannot be same as the component type"/>.';
	var alertMsg27 = '<egui:intnl text="admin.server.Please enter the port number"/>.';
	var alertMsg28 = '<egui:intnl text="admin.server.Port number should be numerical or NULL"/>.';
	var alertMsg29 = '<egui:intnl text="admin.server.Please enter the SID/Service name"/>.';
	var alertMsg30 = '<egui:intnl text="admin.server.Please enter unique SIDs/service names"/>.';
	var alertMsg31 = '<egui:intnl text="admin.server.Nickname should not start or end with a"/> '+" \'.\' ";
	var alertMsg32 = '<egui:intnl text="admin.server.Please select a type of component"/>.';
	var alertMsg33 = '<egui:intnl text="admin.server.Component has not been added properly"/>.';
	var alertMsg34 = '<egui:intnl text="admin.server.Component has been added successfully"/>.';
	var alertMsg35 = '<egui:intnl text="admin.server.Component has been modified successfully"/>.';
	var alertMsg36 = '<egui:intnl text ="admin.server.You are modifying an existing component"/>. <egui:intnl text ="admin.server.Please note that data already collected for this component will no longer be available after the modification"/>.';
	var alertMsg37 = '<egui:intnl text="admin.server.Removal of SID/Service name is not allowed"/>.';
	var alertMsg38 = '<egui:intnl text="admin.server.The nickname you are trying to modify is already mapped to an external agent"/>.';
	var alertMsg39 = '<egui:intnl text="admin.server.The nickname you are trying to modify is already mapped to a remote agent"/>.';
	var alertMsg40 = '<egui:intnl text="admin.common.Please enter the file name for Key file name"/>.';
	var alertMsg41 = '<egui:intnl text="admin.server.Cannot have \'.\' in consecutive positions"/>.';
	var alertMsg42 = '<egui:intnl text="admin.server.Component has been managed successfully"/>.';
	var alertMsg43 = '<egui:intnl text="admin.server.Would you like to add more components for the same system"/>?';
	var alertMsg44 = '<egui:intnl text="admin.server.Invalid URL"/>';
	var alertMsg45 = '<egui:intnl text="admin.server.Please select atleast one language"/>';
	var alertMsg46 = '<egui:intnl text="admin.server.Internal agent assignment option cannot be set to manual for this component, as this nickname is already mapped to an external/remote agent"/>';
	var alertMsg47 = '<egui:intnl text="admin.server.The nickname you are trying to add is already mapped to a remote agent"/>';
	var alertMsg48 = '<egui:intnl text="admin.server.The nickname you are trying to modify is already mapped to a remote agent"/>';
	var alertMsg49 = '<egui:intnl text="admin.server.Hence you cannot choose agentless option for this component"/>';
	var alertMsg50 = '<egui:intnl text="admin.common.Please enter a component name ending with"/>';
	var alertMsg51 = '<egui:intnl text="admin.server.In addition, which of the following components would you like to add for the nickname"/>';
	var alertMsg55 = '<egui:intnl text="admin.server.In addition, "/>';
	var alertMsg56 = '<egui:intnl text="admin.server.Internal agent and nick name should not be same"/>';
	var alertMsg57 = '<egui:intnl text="admin.server.Please choose another internal agent or specify a different nick name"/>';
	var alertMsg59 = '<egui:intnl text="admin.server.You are trying to modify the nick name of the component"/>';
	var alertMsg60 = '<egui:intnl text="admin.server.Please ensure this modified nick name is assigned to the respective agent"/>';
	var alertMsg52 = '<%=office365%>';
	var alertMsg53 = '<%=sharepoint%>';
	var alertMsg54 = '<%=exchange%>';
	var alertMsg58 = '<%=skypeonline%>';
	var alertMsg67 = '<%=msteams%>';
	var alertMsg68 = '<%=onedrive%>';
	var officeProperties = new Object();

	var msOfficeTitle = '<egui:intnl text="admin.la.Monitor Microsoft Office 365"/>'
	var msOfficeInnerTitle = '<egui:intnl text="admin.la.Monitor Microsoft Office 365 using"/>'
	var publicJSONMSOffice = '';
	var isAllowHostName='<%=isAllowHostName%>';
	var autoIpNameCheck='<%=autoIpNameCheck%>';
	var hostName = '<%=hostName%>';
	var offfice365TitleLbl = '<egui:intnl text="admin.la.Microsoft Office 365 Preferences"/>';
	var unfinishPageLbl = '<egui:intnl text="admin.la.One/more Microsoft Office 365 component(s) are yet to be configured for the following nick name(s)"/>';
	var office365Lbl1 = '<egui:intnl text="admin.la.To monitor Microsoft Office 365 components, specify the following"/>';
	var office365Lbl2 = '<egui:intnl text="admin.la.Choose one/more Microsoft Office 365 component(s) for monitoring"/>';
	var office365Lbl3 = '<egui:intnl text="admin.la.Other Settings"/>';
	var office365Lbl4 = '<egui:intnl text="admin.la.Nick already exists"/>';
	var office365Lbl5 = '<egui:intnl text="admin.la.Please provide some other nick name"/>';
	var office365HostIPLbl = '<egui:intnl text="admin.la.HOST IP/NAME"/>';
	var vcenterLabel = '<egui:intnl text="admin.discovery.vCenter identity (IP or Host name)"/>';

	var netScalerhostname = '<egui:intnl text="admin.la.NetScaler identity (IP or Host name)"/>';
	var netScalerconftitle = '<egui:intnl text="admin.discovery.NetScaler preferences"/>';
	var ctxNetScalerLbl = '<egui:intnl text="admin.la.To monitor Citrix NetScaler component, specify the following"/>';
	var ctxNetScalertitle = '<egui:intnl text="admin.la.Add Citrix NetScaler"/>';
	var netScalernickname = '<egui:intnl text="admin.la.Nick name"/>';
	var netScalerisSsl = '<egui:intnl text="admin.la.Use SSL to connect to NetScaler"/>';
	var netScaleruname = '<egui:intnl text="admin.la.Username to connect to NetScaler"/>';
	var netScalerpass = '<egui:intnl text="admin.la.Password for the user"/>';
	var netScalercpass = '<egui:intnl text="admin.la.Confirm password for the user"/>';

	if ('<%=eGMgrModel%>'.toLowerCase() == 'msp')
	{
		office365HostIPLbl = '<egui:intnl text="admin.la.HOST NAME"/>';
		vcenterLabel = '<egui:intnl text="admin.discovery.vCenter identity (Host name)"/>';
		netScalerhostname = '<egui:intnl text="admin.la.NetScaler identity (Host name)"/>';
	}
	var office365HostNameLbl = '<egui:intnl text="admin.la.NICK NAME"/>';
	var office365UNameLbl = '<egui:intnl text="admin.la.O365 USER NAME"/>';
	var office365PwdLbl = '<egui:intnl text="admin.la.O365 PASSWORD"/>';
	var office365DUNameLbl = '<egui:intnl text="admin.la.DOMAIN USER NAME"/>';
	var office365DPwdLbl = '<egui:intnl text="admin.la.DOMAIN PASSWORD"/>';
	var office365DNameLbl = '<egui:intnl text="admin.la.DOMAIN NAME"/>';
	var office365ProxyHostLbl = '<egui:intnl text="admin.la.PROXY HOST"/>';
	var office365ProxyPortLbl = '<egui:intnl text="admin.la.PROXY PORT"/>';
	var office365ProxyUNameLbl = '<egui:intnl text="admin.la.PROXY USER NAME"/>';
	var office365ProxyPwdLbl = '<egui:intnl text="admin.la.PROXY PASSWORD"/>';
	var office365NextLbl = '<egui:intnl text="admin.la.Next"/>';
	var office365CompsTitleLbl = '<egui:intnl text="admin.la.Microsoft Office 365 Component(s)"/>';
	var office365Comp = '<egui:intnl text="admin.la.Microsoft Office 365"/>';
	var office365CompsConfirmLbl = '<egui:intnl text="admin.la.Which of the following component(s) would you like to add for the nick name"/>';
	var office365CompsModifyConfirmLbl = '<egui:intnl text="admin.la.Which of the following component(s) would you like to update for the nick name"/>';
	var office365Lbl6 = '<egui:intnl text="admin.la.Please choose the component to configure"/>';
	var office365Lbl7 = '<egui:intnl text="admin.la.Please select aleast one component"/>';
	var office365Lbl8 = '<egui:intnl text="admin.la.Please enter the username"/>';
	var _checkempty='<egui:intnl text="admin.la.Field value cannot be blank"/>';
	var eGenterprisemonitors1='<egui:intnl text="admin.la.eG Enterprise monitors"/>';
	var eGenterprisemonitors2='<egui:intnl text="admin.la.eG Enterprise monitors part 2"/>';
	var eGenterprisemonitors3='<egui:intnl text="admin.la.eG Enterprise monitors part 3"/>';

	var ctxlogonSimulatorLbl = '<egui:intnl text="admin.la.To monitor Citrix Logon Simulator component, specify the following"/>';
	var hrznlogonSimulatorLbl = '<egui:intnl text="admin.la.To monitor VMware Horizon Logon Simulator component, specify the following"/>';
	var exclogonSimulatorLbl = '<egui:intnl text="admin.la.To monitor Exchange Logon Simulator component, specify the following"/>';
	var amazonWSSimulatorLbl = '<egui:intnl text="admin.la.To monitor Amazon WorkSpaces Simulator component, specify the following"/>';
	var hrznWSSimulatorLbl = '<egui:intnl text="admin.la.To monitor VMware Horizon Workspace Simulator component, specify the following"/>';
	
	var installDir = '<%=installDir%>';
	var osName = '<%=osName%>';
	var displayOsName = '<%=displayOsName%>';
	var displayOsNameWithBit = '<%=displayOsNameWithBit%>';
	var autoRefresh = <%=autoRefresh%>;
	var hideSkip = <%=hideSkip%>;
	var showUploadAgentUI = <%=showUploadAgentUI%>;
	var showDownloadAgentUI = <%=showDownloadAgentUI%>;
	var agentUploadLink='<%=agentUploadLink%>';
	var isDoubleByteMgr='<%=isDouble%>';
	var hasVMLink = '<%=hasVMLink%>';
	var fromAction = '<%=fromAction%>';
	var comeFrom = '<%=comeFrom%>';
	var strServer = '<%=strServer%>';
	var theme = '<%=theme%>';
	var isClassifyView = false;
	var classify = '';
	var monitors = '';
	var discover = '';
	var publicJson = '';
	var publicDiscoveryJson = '';
	var publicMonitorsJSON = '';
	var compGlanceJson = '';
	var hasUserManagementEnabled = '<%=hasUserManagementEnabled%>';
	var hasMaintenancePolicyEnabled = '<%=hasMaintenancePolicyEnabled%>';
	var hasComponentMangamentEnabled = '<%=hasComponentMangamentEnabled%>';
	var hasSegmentConfigEnabled = '<%=hasSegmentConfigEnabled%>';
	var hasServiceConfigEnabled = '<%=hasServiceConfigEnabled%>';
	var hasTestEnabled = '<%=hasTestEnabled%>';
	var hasThreshEnabled = '<%=hasThreshEnabled%>';
	var hasZonesEnabled = '<%=hasZonesEnabled%>';
	var hasComponentGrpEnabled = '<%=hasComponentGrpEnabled%>';
	var hasExtRemAgentsEnabled = '<%=hasExtRemAgentsEnabled%>';
	var hasAggComponentMangamentEnabled = '<%=hasAggComponentMangamentEnabled%>';
	var showWelcomeWizard = '<%=showWelcomeWizard%>';

	var hideDownloadAgent = '<%=hideDownloadAgent%>';
	var hideCompAtAGlance = '<%=hideCompAtAGlance%>';
	var hideRefineConfig = '<%=hideRefineConfig%>';
	var hideManageInfra = '<%=hideManageInfra%>';
	var disableStartCardPrevArrow = '<%=disableStartCardPrevArrow%>';
	var hideAgentVersion = <%=hideAgentVersion%>;

	var getStartedTitle = '<egui:intnl text="admin.la.3 SIMPLE STEPS TO GET STARTED"/>';
	var getStartedStep = '<egui:intnl text="admin.la.STEP"/>';
	var getStartedDownloadStepTitle = '<egui:intnl text="admin.la.DOWNLOAD"/>';
	var getStartedDownloadStepMsg = '<egui:intnl text="admin.la.Download the agent specific to the environment"/>';
	var getStartedInstallStepTitle = '<egui:intnl text="admin.la.INSTALL"/>';
	var getStartedInstallStepMsg1 = '<egui:intnl text="admin.la.Extract the downloaded zip file"/>';
	var getStartedInstallStepMsg2 = '<egui:intnl text="admin.la.Execute the extracted setup*bat file as an administrator"/>';
	if (osName.indexOf("Windows") == -1)
	{
		getStartedInstallStepMsg2 = '<egui:intnl text="admin.la.Execute the extracted setup*sh file as a root user"/>';
	}
	var getStartedRefineStepTitle = '<egui:intnl text="admin.la.REFINE/MANAGE"/>';
	var getStartedRefineStepMsg = '<egui:intnl text="admin.la.Refine the configuration and manage the infrastructure"/>';
	var getStartedNowMsg = '<egui:intnl text="admin.la.View the current health status and performance indicators for your infrastructure in the Monitor interface"/>.';
	var downloadInstallerBtn = '<egui:intnl text="admin.la.Download Agent Installer"/>';
	var downloadStatusTitle = '<egui:intnl text="admin.la.Download status"/>';
	var downloadStatusMsgPart1 = '<egui:intnl text="admin.la.The eG Agent"/>';
	var downloadInstallerSuccessMsg = '<egui:intnl text="admin.la.The agent installer has been downloaded successfully"/>';
	if (!hideDownloadInstaller)
	{
		getStartedDownloadStepMsg = '<egui:intnl text="admin.la.Download the agent installer"/>';
		getStartedInstallStepMsg2 = '<egui:intnl text="admin.la.Execute the extracted agent installer as an administrator"/>';
		getStartedRefineStepTitle = '<egui:intnl text="admin.la.CONFIGURE"/>';
		getStartedRefineStepMsg = '<egui:intnl text="admin.la.Customize monitoring settings as needed"/>';
		downloadStatusMsgPart1 = '<egui:intnl text="admin.la.The agent installer"/>';
		downloadStatusTitle = '<egui:intnl text="admin.la.Agent Installer - Download Status"/>';
	}
	var getStartedNowButtonText = '<egui:intnl text="admin.la.Get Started Now"/>';

	var componentsAtAGlanceTitle = '<egui:intnl text="admin.la.Components at a Glance"/>';
	var Configured = '<egui:intnl text="admin.la.Configured"/>';
	var Unconfigured = '<egui:intnl text="admin.la.Unconfigured"/>';
	var manageConfTitle = '<egui:intnl text="admin.la.Manage Configuration of eG Enterprise Monitors"/>';
	var manageInfraTitle = '<egui:intnl text="admin.la.Manage Infrastructure"/>';
	var manageUsersTitle = '<egui:intnl text="admin.la.Manage Users"/>';

	var downloadStatusMsgPart2 = '<egui:intnl text="admin.la.is downloading* Please wait"/>';
	var downloadAgentTitle = '<egui:intnl text="admin.la.Download Agents"/>';
	var downloadAgentSuccessMsg1 = '<egui:intnl text="admin.la.The eG Agent has been downloaded successfully"/>';
	var downloadAgentSuccessMsg2 = '<egui:intnl text="admin.la.Please proceed to install the agent"/>';
	var downloadAgentFailureMsg = '<egui:intnl text="admin.la.Failure occured while downloading eG Agent"/>';
	var downloadAgentFailureMsg1 = '<egui:intnl text="admin.la.The eG Agent does not exist for download"/>';

	var emptyMsg = '<egui:intnl text="admin.la.No Data Found"/>';
	var compNameText = '<egui:intnl text="admin.la.Component Name"/>';
	var agentOragentlessText = '<egui:intnl text="admin.la.Monitoring Approach"/>';
	var agentStatusText = '<egui:intnl text="admin.la.Agent status"/>';
	var agentStatusMsg1 = '<egui:intnl text="admin.la.Never Reported"/>';
	var agentStatusMsg2 = '<egui:intnl text="admin.la.Not Reporting"/>';
	var agentStatusMsg3 = '<egui:intnl text="admin.la.Reporting"/>';
	var configureTestTooltip = '<egui:intnl text="admin.la.Configure Tests"/>';
	var setThresholdsTooltip = '<egui:intnl text="admin.la.Set Thresholds"/>';
	var setmaintenanceTooltip = '<egui:intnl text="admin.la.Set Maintenance Policy"/>';
	var unmanageTooltip = '<egui:intnl text="admin.la.Unmanage"/>';
	var deleteTooltip = '<egui:intnl text="admin.la.Delete"/>';
	var modifyTooltip = '<egui:intnl text="admin.la.Modify"/>';
	var changeIpTooltip = '<egui:intnl text="admin.la.Change IP"/>';

	var totManagedCompText = '<egui:intnl text="admin.la.Total Managed Components"/>';
	var compTypeText = '<egui:intnl text="admin.la.Component Type"/>';
	var noOfCompText = '<egui:intnl text="admin.la.Number of Components"/>';
	var noCompMsg = '<egui:intnl text="admin.la.No components found"/>';

	var compAtAGlanceWhatNext = '<egui:intnl text="admin.la.Components At A Glance What Next"/>';
	var compAtAGlanceEmptyWhatNext = '<egui:intnl text="admin.la.Components At A Glance Empty What Next"/>';
	var compAtAGlanceEmptyWhatNext0 = '<egui:intnl text="admin.la.Components At A Glance Empty What Next 0"/>';
	var compAtAGlanceEmptyWhatNext1 = '<egui:intnl text="admin.la.Components At A Glance Empty What Next 1"/>';
	var compAtAGlanceEmptyWhatNext2 = '<egui:intnl text="admin.la.Components At A Glance Empty What Next 2"/>';
	var compAtAGlanceEmptyWhatNext3 = '<egui:intnl text="admin.la.Components At A Glance Empty What Next 3"/>';
	var noManageCompMsg = '<egui:intnl text="admin.la.No components have been managed"/>';
	var compAtAGlanceWhatNextTitle = '<egui:intnl text="admin.la.What Next Title For CompGlance"/>';
	var compAtAGlanceWhatNextLink = '<egui:intnl text="admin.la.install agents"/>';
	if (!hideDownloadInstaller)
	{
		compAtAGlanceEmptyWhatNext = '<egui:intnl text="admin.la.Download the agent installer"/>';
		compAtAGlanceEmptyWhatNext0 = '<egui:intnl text="admin.la.Copy the downloaded zip to the desired server"/>';
		compAtAGlanceEmptyWhatNext2 = '<egui:intnl text="admin.la.Execute the extracted agent installer (eG_Agent_Installer*exe) as an administrator"/>';

		compAtAGlanceWhatNextTitle = '<egui:intnl text="admin.la.What Next Title For CompGlance Phoenix"/>';
		compAtAGlanceWhatNextLink = '<egui:intnl text="admin.la.install agent installer"/>';
	}
	var downloadAgentRemoteWhatNext1 = '<egui:intnl text="admin.la.Download remote agent what next 1"/>';
	var downloadAgentExternalWhatNext = '<egui:intnl text="admin.la.Download external agent what next"/>';
	var downloadAgentEmptyMsg1 = '<egui:intnl text="admin.la.No agents found"/>';
	var downloadAgentEmptyMsg2 = '<egui:intnl text="admin.la.Please contact the administrator for further information"/>';
	var searchEmptyText = '<egui:intnl text="admin.la.Search"/>';
	var manageUsersWhatNext = '<egui:intnl text="admin.la.Manage users and their permissions in eG Enterprise"/>';
	var manageInfraWhatNext = '<egui:intnl text="admin.la.Fine-tune the monitoring by grouping components for analysis"/>';
	var manageInfraWhatNextPhoenix = '<egui:intnl text="admin.la.Manage your infrastructure by adding components and configuring remote agents"/>';
	var manageConfigWhatNext = '<egui:intnl text="admin.la.Modify and control eG Enterprise monitors by setting the frequency of monitoring, maintenance periods, and thresholds used"/>';

	var citrixDockMsg1 = '<egui:intnl text="admin.la.Citrix NetScaler, Citrix XenMobile, Citrix Cloud Site and Citrix ShareFile must be monitored agentless"/>';
	var citrixDockMsg2 = '<egui:intnl text="admin.la.to discover Citrix NetScaler"/>';
	var citrixDockMsg3 = '<egui:intnl text="admin.la.to configure agentless monitoring for the Citrix tiers"/>';

	var intnlLabel21 = '<egui:intnl text="admin.discovery.Please enter the vCenter identity"/>';
	var validationMsg2 = '<egui:intnl text="admin.discovery.Space is not allowed"/>';
	var validationMsg10 = '<egui:intnl text="admin.discovery.Please enter a port number"/>';
	var validationMsg12 = '<egui:intnl text="admin.discovery.Port number can consist of only valid numbers"/>';
	var validationMsg13 = '<egui:intnl text="admin.discovery.Special characters not allowed"/>';
	var validationMsg35 = '<egui:intnl text="admin.discovery.Please choose a vCenter identity"/>';
	var validationMsg36 = '<egui:intnl text="admin.discovery.Maximum host name length is 32 characters"/>';
	var validationMsg37 = '<egui:intnl text="admin.discovery.Please enter the username"/>';
	var validationMsg38 = '<egui:intnl text="admin.discovery.Please enter the password"/>';
	var validationMsg39 = "<egui:intnl text='admin.test.Password data should not contain pipe'/>";
	var validationMsg40 = '<egui:intnl text="admin.discovery.Please enter the confirm password"/>';
	var validationMsg41 = '<egui:intnl text="admin.discovery.Passwords do not match"/>';
	var validationMsg42 = '<egui:intnl text="admin.discovery.Blank values are not allowed"/>';
	var validationMsg43 = '<egui:intnl text="admin.discovery.Webport should be less than 99999"/>';
	var validationMsg44 = '<egui:intnl text="admin.discovery.Please choose a HMC IP"/>';
	var validationMsg45 = '<egui:intnl text="admin.discovery.Please enter the HMC IP"/>';
	var validationMsg46 = '<egui:intnl text="admin.discovery.Please enter the Host name"/>';
	var validationMsg47 = '<egui:intnl text="admin.discovery.Please choose a RHEV Manager identity"/>';
	var validationMsg48 = '<egui:intnl text="admin.discovery.Please enter the RHEV Manager identity"/>';
	var validationMsg49 = '<egui:intnl text="admin.discovery.Maximum host name length is 24 characters"/>';
	var validationMsg97 = '<egui:intnl text="admin.discovery.Please choose a Nutanix IP"/>';
	var validationMsg100 = '<egui:intnl text="admin.discovery.Please choose a Citrix XenServer identity"/>';
	var validationMsg101 = '<egui:intnl text="admin.discovery.Please enter the Citrix XenServer identity"/>';
	var validationMsg109 = '<egui:intnl text="admin.discovery.Please choose a XMS Preferences identity"/>';
	var validationMsg116 = '<egui:intnl text="admin.discovery.Please choose a Oracle VM Manager identity"/>';
	var validationMsg117 = '<egui:intnl text="admin.discovery.Please enter the Oracle VM Manager identity"/>';
	var tmpValidationMsg5 =  "Special characters are not allowed in";
	var intnlLabel39 = '<egui:intnl text="admin.discovery.Please enter the Nutanix IP"/>';
	var intnlLabel49 = '<egui:intnl text="admin.discovery.Please enter the XMS Preferences identity"/>';
	var domainValidationMsg = '<egui:intnl text="admin.discovery.Please enter the domain"/>';

	var card0Title = '<egui:intnl text="admin.la.What would you like to Discover/Monitor?"/>';
	var card0CitrixTitle = '<egui:intnl text="admin.la.Discover/Monitor Citrix Infrastructure"/>';
	var card0HorizonTitle = '<egui:intnl text="admin.la.Discover/Monitor VMware Horizon Infrastructure"/>';
	var card0HypervisorTitle = '<egui:intnl text="admin.la.Discover/Monitor Hypervisors"/>';
	var card0CloudTitle = '<egui:intnl text="admin.la.Monitor Cloud Infrastructures"/>';
	var card0ContainerTitle = '<egui:intnl text="admin.la.Monitor Kubernetes/OpenShift Cluster"/>';
	var card0DockerTitle = '<egui:intnl text="admin.la.Monitor Docker/CRI-O Host"/>';
	var card0SaasTitle = '<egui:intnl text="admin.la.Monitor SaaS Applications"/>';

	var card0CitrixALTitle = '<egui:intnl text="admin.la.Monitor Citrix Infrastructure"/>';
	var card0HorizonALTitle = '<egui:intnl text="admin.la.Monitor VMware Horizon Infrastructure"/>';
	var card0HypervisorInnerTitle = '<egui:intnl text="admin.la.Discover/Monitor Hypervisors using"/>';
	var card0CloudInnerTitle = '<egui:intnl text="admin.la.Monitor Cloud Infrastructures using"/>';
	var card0ContainerInnerTitle = '<egui:intnl text="admin.la.Monitor Kubernetes/OpenShift Cluster using"/>';
	var card0SaasInnerTitle = '<egui:intnl text="admin.la.Monitor SaaS Applications using"/>';
	var card0CitrixALInnerTitle = '<egui:intnl text="admin.la.Monitor Citrix Infrastructure using"/>';
	var card0HorizonALInnerTitle = '<egui:intnl text="admin.la.Monitor VMware Horizon servers using"/>';
	var card0HorizonALAlertTitle = '<egui:intnl text="admin.la.Monitor VMware Horizon servers"/>';
	var card0DownloadAgentTitle = '<egui:intnl text="admin.la.Download Agents"/>';
	var card0DownloadRemAgentTitle = '<egui:intnl text="admin.la.Download Remote Agents"/>';
	var card0DownloadExtAgentTitle = '<egui:intnl text="admin.la.Download External Agents"/>';
	var card0LogonSimulatorTitle = '<egui:intnl text="admin.la.Monitor Logon Simulators"/>';
	var card0LogonSimulatorExtInnerTitle = '<egui:intnl text="admin.la.Monitor Logon Simulators using"/>';
	var card0CtxLogonSimulatorExtInnerTitle = '<egui:intnl text="admin.la.Monitor Citrix Logon Simulator using"/>';
	var card0HrznLogonSimulatorExtInnerTitle = '<egui:intnl text="admin.la.Monitor VMware Horizon Logon Simulator using"/>';
	var card0ExchLogonSimulatorExtInnerTitle = '<egui:intnl text="admin.la.Monitor Exchange Logon Simulator using"/>';
	var card0AmazonWSSimulatorExtInnerTitle = '<egui:intnl text="admin.la.Monitor Amazon WorkSpaces Simulator using"/>';
	var card0HrznWSSimulatorExtInnerTitle = '<egui:intnl text="admin.la.Monitor VMware Horizon Workspace Simulator using"/>';
	var tipForCitrix = '<egui:intnl text="admin.la.Start by installing an agent on Citrix Delivery Controller"/>';
	var tipForVMware = '<egui:intnl text="admin.la.Start by installing an agent on VMware Horizon Connection Server"/>';
	var remoteAgentEmptyMsg = '<egui:intnl text="admin.la.Currently you do not have any remote agents to get started"/>';
	var externalAgentEmptyMsg = '<egui:intnl text="admin.la.Currently you do not have any external agents to get started"/>';
	var updateBtnText = '<egui:intnl text="admin.la.Update"/>';
	var clearBtnText = '<egui:intnl text="admin.la.Clear"/>';
	var validateBtnText = '<egui:intnl text="admin.la.Validate"/>';
	var whatNextTitle = '<egui:intnl text="admin.la.What Next Title"/>';
	var howToConfDockerTitle = '<egui:intnl text="admin.la.How to configure the container agent"/>';
	var dockerLink = '<egui:intnl text="admin.la.To add a Docker Host manually"/>';
	var crioLink = '<egui:intnl text="admin.la.To add a CRI-O Host manually"/>';
	var clickhereLink = '<egui:intnl text="admin.la.click here"/>';
	var howToConfTitle = '<egui:intnl text="admin.la.How to Configure"/>';
	
	var compAtAGlanceWhatNextLinkMsg = '<egui:intnl text="admin.la.Have you installed agents on all the key servers in your infrastructure? If not,"/>';
	
	var agentTypeRecommendationForCitrix = '<egui:intnl text="admin.la.Agent type recommendation for citrix"/>';
	var agentTypeRecommendationForVMware = '<egui:intnl text="admin.la.Agent type recommendation for vmware"/>';
	var agentTypeRecommendationForHypervisors = '<egui:intnl text="admin.la.Agent type recommendation for hypervisors"/>';
	var agentTypeRecommendationForCloud = '<egui:intnl text="admin.la.Agent type recommendation for cloud"/>';
	var agentTypeRecommendationForContainer = '<egui:intnl text="admin.la.Agent type recommendation for Kubernetes/OpenShift"/>';
	var agentTypeRecommendationForDocker = '<egui:intnl text="admin.la.Agent type recommendation for Docker"/>';
	var agentTypeRecommendationForSaas = '<egui:intnl text="admin.la.Agent type recommendation for saas"/>';
	var agentTypeRecommendationForLogonSimulator = '<egui:intnl text="admin.la.Agent type recommendation for logon simulator"/>';
	var agentTypeRecommendationForAgentLess1 = '<egui:intnl text="admin.la.eG Enterprise recommends agentless monitoring for"/>';
	var agentTypeRecommendationForAgentLess2 = '<egui:intnl text="admin.la.You will need a dedicated VM to perform agentless monitoring"/>';
	var downloadMsgPart1 = '<egui:intnl text="admin.la.Download"/>';
	var downloadMsgPart2 = '<egui:intnl text="admin.la.& install the agent"/>';
	var downloadMsgPart3 = '<egui:intnl text="admin.la.on the following tiers to get started"/>';
	var downloadRemoteAgentMsgPart1 = '<egui:intnl text="admin.la.& Install a remote agent"/>';
	var downloadRemoteAgentMsgPart2 = '<egui:intnl text="admin.la.to get started"/>';
	var downloadExternalAgentMsg = '<egui:intnl text="admin.la.& Install an external agent"/>';
	var downloadMsgPart3alias = '<egui:intnl text="admin.la.on the following servers to get started"/>';
	var dockMsgPart1 = '<egui:intnl text="admin.la.must be monitored agentless"/>';
	var dockMsgPart2 = '<egui:intnl text="admin.la.Click here"/>';
	var dockMsgPart3 = '<egui:intnl text="admin.la.to configure agentless monitoring for these tiers"/>';
	var dockMsgPart4 = '<egui:intnl text="admin.la.to configure agentless monitoring"/>';
	var discoverText = '<egui:intnl text="admin.la.Discover"/>';
	var citrixdiscTitle = '<egui:intnl text="admin.la.Discover/Monitor Citrix tiers"/>';
	var citrixdiscTitle1 = '<egui:intnl text="admin.la.Discover/Monitor Citrix tiers using"/>';
	var citrixdiscMsg = '<egui:intnl text="admin.la.Choose the type of citrix tiers you would like to discover/monitor"/>';
	var dockMsgagentbasedPart1 = '<egui:intnl text="admin.la.should be monitored agent-based"/>';
	var dockMsgagentbasedPart2 = '<egui:intnl text="admin.la.Download the agent"/>';
	var dockMsgagentbasedPart2alias = '<egui:intnl text="admin.la.Download an agent"/>';
	var dockMsgagentbasedPart3 = '<egui:intnl text="admin.la.for"/>';
	var dockMsgagentbasedPart4 = '<egui:intnl text="admin.la.monitoring"/>';
	var remoteAgentMsg1 = '<egui:intnl text="admin.la.You have installed"/>';
	var remoteAgentMsg2 = '<egui:intnl text="admin.la.remote agent"/>';
	var remoteAgentMsg3 = '<egui:intnl text="admin.la.Get started now"/>';
	var remoteAgentMsg4 = '<egui:intnl text="admin.la.Remote Agent Message 1"/>';
	var remoteAgentMsg5 = '<egui:intnl text="admin.la.Remote Agent Message 2"/>';
	var remoteAgentMsg6 = '<egui:intnl text="admin.la.remote agents"/>';
	var externalAgentMsg = '<egui:intnl text="admin.la.external agent"/>';
	var externalAgentMsg1 = '<egui:intnl text="admin.la.external agents"/>';
	var agentLessDiscMsg1 = '<egui:intnl text="admin.la.Choose the type of hypervisor you would like to discover/monitor"/>';
	var agentLessDiscMsg2 = '<egui:intnl text="admin.la.Choose the type of Cloud infrastructure you would like to monitor"/>';
	var agentLessDiscMsg2saas = '<egui:intnl text="admin.la.Choose the type of SaaS application you would like to monitor"/>';
	var agentLessDiscMsg3 = '<egui:intnl text="admin.la.Choose the type of Citrix tier you would like to monitor"/>';
	var agentLessDiscMsg4 = '<egui:intnl text="admin.la.Choose the type of VMware Horizon server you would like to monitor"/>';
	var agentLessDiscMsg5 = '<egui:intnl text="admin.la.Choose the type of logon simulator you would like to monitor"/>';
	var gotoCompGlanceAlert1 = '<egui:intnl text="admin.la.Would you like to configure more components for discovery/monitoring?"/>';
	var gotoCompGlanceAlert2 = '<egui:intnl text="admin.la.Would you like to configure more components for monitoring?"/>';
	var newBtnText = '<egui:intnl text="admin.la.New"/>';
	
	var inputsmultisrc = 2;
	var inputs = 1;
	var noDataMessage = '<egui:intnl text="admin.la.Please configure applications/desktops for simulation by clicking the Add button"/>.';
	var fieldSetTitle = '<egui:intnl text="admin.la.Configure applications/desktops for simulation"/>';
	var pubResourceToolTip = '<egui:intnl text="admin.la.Configure Application/Desktop"/>';
	var appNameLabel = '<egui:intnl text="admin.la.Application/Desktop"/>';
	var enterPubRsrc = '<egui:intnl text="admin.la.Please enter the application/desktop for simulation"/>.';
	var alertMsgSrcTitle = '<egui:intnl text="admin.la.Monitor Logon Simulator"/>';
	var enterFolderName = '<egui:intnl text="admin.la.Please enter the Tab name or enter none"/>.';
	var enterResourceName = '<egui:intnl text="admin.la.Please enter the application/desktop name"/>.';
	var validResourceName = '<egui:intnl text="admin.la.Please enter the valid application/desktop name"/>.';
	var enterwinTitle = '<egui:intnl text="admin.la.Please enter the window title or enter none"/>.';
	var enterUrl = '<egui:intnl text="admin.la.Please enter the site URL"/>.';
	var urlSpace = '<egui:intnl text="admin.la.Space is not allowed"/>.';
	var donotSpecifyKey = '<egui:intnl text="admin.la.Please do not specify the eG keywords for parameter value"/>.';
	var urlInValidMsg = '<egui:intnl text="admin.la.Please enter a valid URL"/>.';
	var matchPwd= '<egui:intnl text="admin.la.Passwords do not match"/>.';
	var enterDomain = '<egui:intnl text="admin.la.Please enter the domain name"/>.';
	var enterUsrId = '<egui:intnl text="admin.la.Please enter the user"/>.';
	var enterPwd = '<egui:intnl text="admin.la.Please enter the password"/>.';
	var PwdNotContainPipe = "<egui:intnl text='admin.la.Password data should not contain pipe'/>.";
	var enterCnfPwd= '<egui:intnl text="admin.la.Please enter the confirm password"/>.';
	var successMsg = '<egui:intnl text="admin.la.The applications/desktops for simulation has been configured successfully"/>.';
	var compSuccessMsg = '<egui:intnl text="admin.la.has been created successfully"/>.';
	var alertCompTitle = '<egui:intnl text="admin.la.Logon Simulator"/>';
	var enter2FAToken = '<egui:intnl text="admin.la.Please enter the 2FA code"/>.';
	var siteUrlLabel = '<egui:intnl text="admin.la.Site URL"/>';
	var isCitrixCloudLabel = '<egui:intnl text="admin.la.Hosted on Citrix Cloud"/>';
	var noteText = '<egui:intnl text="admin.la.Note"/>';
	var horizonNote = '<egui:intnl text="admin.la.Please ensure that VMware Horizon HTML Access is installed on the VMware Horizon Connection Server"/>';
	var registrationCode = '<egui:intnl text="admin.la.Registration code"/>';
	var enterRegcode = '<egui:intnl text="admin.test.Please enter the registration code"/>';
	var domainLabel = '<egui:intnl text="admin.la.Domain"/>';
	var userLabel = '<egui:intnl text="admin.la.User"/>';
	var passwordLabel = '<egui:intnl text="admin.la.Password"/>';
	var cnfPasswordLabel = '<egui:intnl text="admin.la.Confirm Password"/>';
	var twofaLabel = '<egui:intnl text="admin.la.Is 2FA enabled"/>';
	var twofacodeLabel = '<egui:intnl text="admin.la.2FA code"/>';
	var disclaimerLabel = '<egui:intnl text="admin.la.Is disclaimer enabled"/>';
	var removeTooltip = '<egui:intnl text="admin.la.Remove"/>';
	var addBtnText = '<egui:intnl text="admin.la.Add"/>';
	var addMoreBtnText = '<egui:intnl text="admin.la.Add More"/>';
	var updateBtnText = '<egui:intnl text="admin.la.Update"/>';
	var clearBtnText = '<egui:intnl text="admin.la.Clear"/>';
	var tabnameLabel = '<egui:intnl text="admin.la.Tab Name"/>';
	var appNameLabel = '<egui:intnl text="admin.la.App/Desktop Name"/>';
	var winTitleLabel = '<egui:intnl text="admin.la.Window Title"/>';

	var vCenterConfigureMsg = '<egui:intnl text="admin.la.Configure vCenter server that will be used for discovery"/>';
	var hmcConfigureMsg = '<egui:intnl text="admin.la.Configure HMC server that will be used for discovery"/>';
	var rhevConfigureMsg = '<egui:intnl text="admin.la.Configure RHEV manager that will be used for discovery"/>';
	var nutanixConfigureMsg = '<egui:intnl text="admin.la.Configure Nutanix Prism server that will be used for discovery"/>';
	var ctxxenConfigureMsg = '<egui:intnl text="admin.la.Configure a Citrix XenServer that will be used for discovering other Citrix XenServers in the pool"/>';
	var oraclevmConfigureMsg = '<egui:intnl text="admin.la.Configure Oracle VM manager that will be used for discovery"/>';
	var emcConfigureMsg = '<egui:intnl text="admin.la.Configure EMC server that will be used for discovery"/>';
	var netScalersConfigureMsg = '<egui:intnl text="admin.la.Configure NetScaler server that will be used for discovery"/>';

	var vCenterGridMsg = '<egui:intnl text="admin.la.vCenter servers used for discovery"/>';
	var hmcGridMsg = '<egui:intnl text="admin.la.HMC servers used for discovery"/>';
	var rhevGridMsg = '<egui:intnl text="admin.la.RHEV managers used for discovery"/>';
	var nutanixGridMsg = '<egui:intnl text="admin.la.Nutanix Prism servers used for discovery"/>';
	var ctxxenGridMsg = '<egui:intnl text="admin.la.Citrix XenServers used for discovery"/>';
	var oraclevmGridMsg = '<egui:intnl text="admin.la.Oracle VM managers used for discovery"/>';
	var emcGridMsg = '<egui:intnl text="admin.la.EMC server used for discovery"/>';
	var netScalersGridMsg = '<egui:intnl text="admin.la.NetScaler server used for discovery"/>';

	var hypervisorDeleteMsg = '<egui:intnl text="admin.la.has been deleted successfully"/>';
	var remAgentDetails = '<egui:intnl text="admin.la.Remote Agent Details"/>';
	var extAgentDetails = '<egui:intnl text="admin.la.External Agent Details"/>';
	
	var uploadAgentsTitle = '<egui:intnl text="admin.la.Upload eG Agents for Discovery/Monitoring"/>';
	var uploadAgentsMsg1 = '<egui:intnl text="admin.la.eG Agents are responsible for continuous monitoring of your applications and infrastructure"/>';
	var uploadAgentsMsg2 = '<egui:intnl text="admin.la.You may download these agents at any time from the eG Manager"/>';
	var uploadAgentStatusMsg1 = '<egui:intnl text="admin.la.Currently, you have not uploaded any eG Agent to the eG Manager"/>';
	var uploadAgentStatusMsg2 = '<egui:intnl text="admin.la.One or more eG Agents are available for download from the eG Manager"/>';
	var uploadAgentStatusMsg3 = '<egui:intnl text="admin.la.Please upload '+displayOsNameWithBit+' agent and other agents to the manager"/>';
	var uploadAgentStepMsg = '<egui:intnl text="admin.la.To allow users to download eG Agents from the manager, you will need to"/>';
	var uploadAgentStep1 = '<egui:intnl text="admin.la.Get the agent executables from the location"/>';
	var uploadAgentStep2 = '<egui:intnl text="admin.la.Place the zip files in the location"/>';
	var skipBtnText = '<egui:intnl text="admin.la.Skip"/>';
	var nextBtnText = '<egui:intnl text="admin.la.Next"/>';
	var finishBtnText = '<egui:intnl text="admin.la.Finish"/>';
	var downloadAgentsTitle = '<egui:intnl text="admin.la.Install Default External/Remote Agent"/>';
	var downloadAgentsMsg = '<egui:intnl text="admin.la.An eG Agent must be installed on this system for external monitoring of applications, servers and network devices"/>';
	var downloadAgentStatusMsg = '<egui:intnl text="admin.la.Currently, no agent has been installed on the manager system"/>';
	var downloadAgentMsg1 = '<egui:intnl text="admin.la.Download"/>';
	var downloadAgentMsg2 = '<egui:intnl text="admin.la.and install the eG Agent for"/>';
	var downloadAgentMsg3 = '<egui:intnl text="admin.la.on the manager system"/>';
	var downloadAgentStepMsg = '<egui:intnl text="admin.la.To install the eG Agent, you will need to"/>';
	var downloadAgentStep1 = '<egui:intnl text="admin.la.Extract the downloaded zip file"/>';
	var downloadAgentStep2 = '<egui:intnl text="admin.la.Execute the extracted executable as an administrator"/>';
	var downloadAgentAltStep1 = '<egui:intnl text="admin.la.The eG Manager has not been configured to allow download of"/>';
	var downloadAgentAltStep2 = '<egui:intnl text="admin.la.agents"/>';
	var downloadAgentAltStep3 = '<egui:intnl text="admin.la.Please"/>';
	var downloadAgentAltStep4 = '<egui:intnl text="admin.la.configure"/>';
	var downloadAgentAltStep5 = '<egui:intnl text="admin.la.the eG Manager to allow download of eG Agents"/>';
	var downloadAgentSuccessMsg = '<egui:intnl text="admin.la.An eG Agent has been installed on this manager system"/>';

	var paramsForURLVC = '';
	var validationMsg80 = '<egui:intnl text="admin.common.The agent is currently not running to validate the credentials"/>.';
	var validationTitleForMsOff = '<egui:intnl text="admin.common.Validating monitoring settings for" />&nbsp;Microsoft Office 365';
	var validationTitle = '<egui:intnl text="admin.common.Validating monitoring settings for" />&nbsp;vCenter';
	var validationNutanixTitle = '<egui:intnl text="admin.common.Validating monitoring settings for" />&nbsp;Nutanix Prism';
	var validationXenserverTitle = '<egui:intnl text="admin.common.Validating monitoring settings for" />&nbsp;Citrix Xenserver';
	var validationOracleVMTitle = '<egui:intnl text="admin.common.Validating monitoring settings for" />&nbsp;Oracle VM Manager';
	var validationNetScalerTitle = '<egui:intnl text="admin.common.Validating monitoring settings for" />&nbsp;Citrix NetScaler';

	var intnlLabel38 = '<egui:intnl text="admin.discovery.Please enter the NetScaler identity"/>';
	var validationMsg91 = '<egui:intnl text="admin.discovery.Please choose a NetScaler identity"/>';

	var compInfoTitle = '<egui:intnl text="admin.la.Component information"/>';
	var monitoringInfoTitle = '<egui:intnl text="admin.la.Monitoring information"/>';
	var sessionInfoTitle = '<egui:intnl text="admin.la.Session information"/>';
	var viewEventTitle = '<egui:intnl text="admin.la.Events information"/>';
	var snmpInfoTitle = '<egui:intnl text="admin.la.SNMP information"/>';
	var hostProcessTitle = '<egui:intnl text="admin.la.Host processes information"/>';
	var userInfoTitle = '<egui:intnl text="admin.la.Monitoring information"/>';
	var logInfoTitle = '<egui:intnl text="admin.la.Syslog file information"/>';
	var preferencesTitle = '<egui:intnl text="admin.la.preferences"/>';
	var recMsg1 = '<egui:intnl text="admin.la.To monitor the"/>';
	var recMsg2 = '<egui:intnl text="admin.la.component, specify the following"/>';
	var compSuccMsg1 = '<egui:intnl text="admin.la.The"/>';
	var compSuccMsg2 = '<egui:intnl text="admin.la.component has been added successfully"/>';

	// Exchange site configuration
	var mailIDDBL = '<egui:intnl text="admin.user.E-mail ID is not allowed in DBL(Chinese,Korean,Japanese)"/>';
	var mailRcv_valid = '<egui:intnl text="admin.mail.Please enter a valid email id"/>';
	var mail_valid = '<egui:intnl text="admin.mail.Multiple Email IDs are not allowed"/>';
	var duplicateMailId =  '<egui:intnl text="admin.user.Duplicate email IDs name is not allowed"/>';
	var NoEmailsConfigured =  '<egui:intnl text="admin.user.Please configure email and password by clicking the Add button"/>';
	var enterexchnageUrl =  '<egui:intnl text="admin.user.Please enter the Exchange site url"/>';
	var exchangetitle =  '<egui:intnl text="admin.la.Configure Email IDs for simulation"/>';
	var exchangeServType =  '<egui:intnl text="admin.la.Server Type"/>';
	var exchangeSiteUrl =  '<egui:intnl text="admin.la.Site URL"/>';
	var exchangeemail =  '<egui:intnl text="admin.la.Email ID"/>';

	var selectAgnt = '<egui:intnl text="admin.common.Please select a agent"/>';
	var selectAgntLabel = '<egui:intnl text="admin.common.Choose an agent for validating the credentials"/>';

	var downloadJsonfile = '<egui:intnl text="admin.la.Download the JSON file"/>.';
	var clickHere = '<egui:intnl text="admin.la.Click here"/>';
	var awsMsg1 = '<egui:intnl text="admin.la.to know how to obtain the AWS ACCESS KEY and AWS SECRET KEY using the downloaded JSON file"/>.';
	var awsMsg2 = '<egui:intnl text="admin.la.Specify the obtained AWS ACCESS KEY and AWS SECRET KEY in the Monitoring information section in the left panel of this page"/>.';
	var jsonDwnSuccMsg = '<egui:intnl text="admin.la.JSON downloaded successfully"/>.';
	var dwnFailMsg = '<egui:intnl text="admin.la.Download failed"/>';
	var jsonDwnStatusMsg = '<egui:intnl text="admin.la.Downloading the JSON file"/>';
	var jsonDwnBtn = '<egui:intnl text="admin.la.Download JSON"/>';

	var kuberMsg1 = '<egui:intnl text="admin.la.Go to the master node shell in the Kubernetes/OpenShift Cluster"/>.';
	var kuberMsg2 = '<egui:intnl text="admin.la.Type the below command to create the eginnovations service account"/>';
	var kuberMsg3 = '<egui:intnl text="admin.la.Type the below command to get the secret name associated with eginnovations service account"/>.';
	var kuberMsg4 = '<egui:intnl text="admin.la.Usually, the secret name is in the format"/>';
	var kuberMsg5 = '<egui:intnl text="admin.la.Type the below command and replace the"/>';
	var kuberMsg6 = '<egui:intnl text="admin.la.with the secret name token from step 3 to get the authentication bearer token"/>.';
	var kuberMsg7 = '<egui:intnl text="admin.la.Copy the token from step 4 and paste to the AUTHETNICATION TOKEN field in the monitoring information section in the left panel of this page"/>.';

	var dwnldAgentForLabel = '<egui:intnl text="admin.la.Download agent for"/>';
	var dwnldAgentForVal1 = '<egui:intnl text="admin.la.Installation on a golden image / VM template"/>';
	var compTypeSearchLabel = '<egui:intnl text="admin.la.Search component type"/>';
	var compTypeSearchEmptyMsg = '<egui:intnl text="admin.la.No component type found for your current search"/>';

	var proxyDetailsTitle = '<egui:intnl text="admin.la.Configure Proxy Server Details"/>';
	var useParentOrgProxyLabel = '<egui:intnl text="admin.la.Do you want to use the proxy server of your Organization"/>';
	var useParentOrgUnitProxyLabel = '<egui:intnl text="admin.la.Do you want to use the proxy server of your Organizational unit"/>';
	var useProxyLabel = '<egui:intnl text="admin.la.Do you want your eG Agents to communicate with the eG Manager via a proxy server"/>';
	var proxyHostLabel = '<egui:intnl text="admin.la.Proxy Server IP/Hostname"/>';
	var proxyPortLabel = '<egui:intnl text="admin.la.Proxy Server Port"/>';
	var isAuthLabel = '<egui:intnl text="admin.la.Does the proxy server require authentication"/>';
	var proxyUnameLabel = '<egui:intnl text="admin.la.Username"/>';
	var proxyPwdLabel = '<egui:intnl text="admin.la.Password"/>';
	var proxyCnfPwdLabel = '<egui:intnl text="admin.la.Confirm Password"/>';
	var enterProxyHostMsg = '<egui:intnl text="admin.la.Please enter the Proxy Server IP/Hostname"/>.';
	var enterProxyPortMsg = '<egui:intnl text="admin.la.Please enter the Proxy Server Port"/>.';
	var enterProxyUsernameMsg = '<egui:intnl text="admin.la.Please enter the Username"/>.';
	var enterProxyPwdMsg = '<egui:intnl text="admin.la.Please enter the Password"/>.';
	var enterProxyCnfPwdMsg = '<egui:intnl text="admin.la.Please enter the confirm password"/>.';
	var pwdMatchMsg = '<egui:intnl text="admin.la.Passwords do not match"/>.';
	var proxypdateSuccessMsg = '<egui:intnl text="admin.la.Proxy Server details have been updated successfully"/>.';
	var proxyUpdateErrorMsg = '<egui:intnl text="admin.la.Failed to update Proxy Server details"/>.';
	
	// for IE support startsWith and endsWith function overrides
	if (!String.prototype.startsWith) 
	{
		String.prototype.startsWith = function (searchString, position) {
			position = position || 0;
			 return this.substr(position, searchString.length) === searchString;
		};
	}

	if (!String.prototype.endsWith)
	{
		String.prototype.endsWith = function(search, this_len) {
			if (this_len === undefined || this_len > this.length) {
				this_len = this.length;
			}
			return this.substring(this_len - search.length, this_len) === search;
		};
	}

	function paramEncode(text)
	{
		//[:,\,/]
		var paramEncodeChar = [':','/','\\'];
		var paramDecodeText = ['|col|','|fslash|','|bslash|'];
		try
		{
			if(text != null && text != undefined && !Ext.isEmpty(text))
			{
				for(var a in paramEncodeChar)
				{
					var encode_char = paramEncodeChar[a];
					var decode_char = paramDecodeText[a];
					do
					{
						text=text.replace(encode_char,decode_char);
					}
					while (text.indexOf(encode_char)>-1);
				}
			}
		}
		catch (e)
		{
		}
		return text;
	}

	function paramDecode(text)
	{
		//[:,\,/]
		var paramEncodeChar = [':','/','\\'];
		var paramDecodeText = ['|col|','|fslash|','|bslash|'];
		try
		{
			if(text != null && text != undefined && !Ext.isEmpty(text))
			{
				for(var a in paramEncodeChar)
				{
					var encode_char = paramEncodeChar[a];
					var decode_char = paramDecodeText[a];
					do
					{
						text=text.replace(decode_char,encode_char);
					}
					while (text.indexOf(decode_char)>-1);
				}
			}
		}
		catch (e)
		{
		}
		return text;
	}

</script>

	<!--<script src="EgAdminHome/app/app.js"></script>-->
	<script src="LimitedAdminHome/app/app.js"></script>

</head>
<body>
<div id="loadmask" class="x-mask-msg x-layer x-mask-msg-default" style="z-index: 19001;left:45%;top:35%;"><div class="x-mask-loading" style="position:relative">Loading...</div></div>
</body>
</html>

<%
	session.setAttribute("hasNotificationWindow","no");
	if (com.egurkha.util.StringUtils.isNull(fromAction))
	{
		session.setAttribute("adminLastAccessedURL","/final/admin/EgAdminOperations.jsp?"+request.getQueryString());
	}
%>

<%!
public String getOSName()
{
	String sep = System.getProperty("file.separator");
	String os = System.getProperties().getProperty("os.name");
	if (os != null && os.trim().length() > 0)
	{
		os = os.trim();
		String xx = os.toLowerCase();

		if (xx.indexOf("windows") > -1)
		{
			String strCmd = "cscript.exe "+EgInstallInfo.getInstallDir()+"/lib/os-info.vbs //Nologo";
			EgUtilities egu=EgUtilities.createInstance();
			ArrayList alValues = null;
			ArrayList data = (ArrayList)egu.getExecOutputLines(strCmd);
			if(data==null || data.size() < 2)
			{
				os = "Windows";
			}
			else
			{
				alValues = (ArrayList)data.get(0);

				if (alValues == null || alValues.size() == 0)
				{
					os = "Windows";
				}
				else if (alValues.contains("#Error#"))
				{
					os = "Windows";
				}
				else
				{
					alValues.remove("#EG_SCRIPT_DONE#"); 
					int size = alValues.size();
					if (size == 0)
					{
						os = "Windows";
					}
					int index=0;
					for(int j=0; j<size; j++)
					{
						try{
							String line = (String)alValues.get(j);
							if (line.indexOf("failed") > -1 || line.indexOf("Class does not exist") > -1 || line.indexOf("can not execute script") > -1 || line.indexOf("Can not") > -1)
							{
								os = "Windows";
							}
							index=line.indexOf(":");
							String attribute="",value="";
							if(index>0)
							{
								attribute =line.substring(0,index).trim();
								value =line.substring(index+1).trim();
								if (attribute.equalsIgnoreCase("Name"))  //Name: Microsoft Windows Server 2003 R2 Enterprise Edition|C:\WINDOWS|\Device\Harddisk0\Partition1
								{
									if (value.indexOf("|") != -1)
									{
										int idx = value.indexOf("|");
										value = value.substring(0,idx);
									}
									if (value.indexOf(",") != -1)
									{
										int idx = value.indexOf(",");
										String v1 = (value.substring(0,idx)).trim();
										String v2 = (value.substring(idx+1)).trim();
										value = v1 + " " + v2;
									}
									if ((value.indexOf("MicrosoftR") > -1) || (value.indexOf("Microsoftr") > -1))
									{
										value = replaceOsName(value,"MicrosoftR","Microsoft(R)");
										value = replaceOsName(value,"Microsoftr","Microsoft(R)");
									}
									if ((value.indexOf("ServerR") > -1) || (value.indexOf("Serverr") > -1))
									{
										value = replaceOsName(value,"ServerR","Server(R)");
										value = replaceOsName(value,"Serverr","Server(R)");
									}
									String osName = replaceOsName(value,"®","");

									if (osName.indexOf("vista") >= 0 || osName.indexOf("2008") >= 0 || osName.indexOf(" 7")>=0 || osName.indexOf("7") >=0)
										os = "Windows_2008";
									else if (osName.indexOf("2012") >= 0 || osName.indexOf(" 8") >= 0 ||  
											osName.indexOf("8") >= 0  || osName.indexOf(" 10") >= 0)
										os = "Windows_2012";
									else if(osName.indexOf("2016") >= 0)
										os = "Windows_2016";
									else if(osName.indexOf("2019") >= 0)
										os = "Windows_2019";
									else if (osName.indexOf("xp") >= 0 || osName.indexOf("2003") >= 0)
										os = "Windows_2003";
									else if(osName.indexOf("2000") > -1)
										os = "Windows_2000";
									else if (osName.indexOf("nt") > -1)
										os = "Windows_NT";
									else
										os = "Windows_2003";
								}
							}
						}
						catch(Exception e)
						{
							e.printStackTrace();
							continue;
						}
					}
				}
			}
		} 
		else if (os.equalsIgnoreCase("sunos"))
		{
			os = "Solaris";
		}
		else
		{
			os = "Linux";
		}
	}

	String line = "";
	String strCommand = "";
	String bit = "N/A";
	try
	{
		EgUtilities egu = EgUtilities.createInstance();
		String strOsName = System.getProperty("os.name").toLowerCase();
		if (strOsName.equalsIgnoreCase("SUNOS"))
		{
			strCommand = "/sbin/uname -p";
		}
		else
		{
			if (strOsName.indexOf("windows") > -1)
			{
				strCommand = "cmd.exe /c "+ "java -version";
			}
			else
			{
				strCommand = "java -version";
			}
		}
		
		ArrayList aListResult = (ArrayList) egu.getExecOutputLines(strCommand);
		if (aListResult == null || aListResult.size()<2)
		{
			bit = "N/A";
		}
		ArrayList aListCommandOutput = (ArrayList) aListResult.get(0);
		ArrayList aListCommandError = (ArrayList) aListResult.get(1);
		if (strCommand!=null && strCommand.endsWith("java -version"))
		{
			if (aListCommandError == null || aListCommandError.size() == 0)
			{
				bit = "N/A";
			}
		}
		else
		{
			if (aListCommandError!=null && aListCommandError.size()>0)
			{
				bit = "N/A";
			}
			if (aListCommandOutput==null || aListCommandOutput.size()==0)
			{
				bit = "N/A";
			}
		}

		ArrayList aListParse = new ArrayList();
		if (strCommand!=null && strCommand.endsWith("java -version"))
		{
			aListParse.addAll(aListCommandError);
		}
		else
		{
			aListParse.addAll(aListCommandOutput);
		}
		for (int count=0; count<aListParse.size(); count++)
		{
			line = (String) aListParse.get(count);

			if (line!=null)
			{
				line.trim();
				if (strOsName.equalsIgnoreCase("SUNOS"))
				{
					bit = "AMD";
					if ((line.toUpperCase()).indexOf("SPARC") > -1)
					{
						bit = "SPARC";
						break;
					}
				}
				else if (strOsName.indexOf("windows") > -1)
				{
					bit = "x32";
					if (line.indexOf("64-Bit") > -1)
					{
						bit = "x64";
						break;
					}
				}
				else
				{
					bit = "x32";
					if (line.indexOf("x86_64") > -1 || line.indexOf("64-Bit") > -1)
					{
						bit = "x64";
						break;
					}
				}
			}
		}
	}
	catch (Exception e) 
	{
		e.printStackTrace();
		bit = "N/A";
	}
	if (bit != null && bit.trim().length() > 0 && !bit.equalsIgnoreCase("N/A"))
	{
		if (!bit.equalsIgnoreCase("x32"))
		{
			os = os+"_"+bit;
		}
	}
	os = os+".zip";
	return os;
}

private String replaceOsName(String s,String s_search,String s_replace)
{
	StringBuffer sb_tmp = new StringBuffer();
	while(s.indexOf(s_search) > -1)
	{
		sb_tmp.append(s.substring(0,s.indexOf(s_search)) + s_replace);
		s = s.substring(s.indexOf(s_search) + s_search.length(),s.length());
	}
	if(s.length() > 0)
	{
		sb_tmp.append(s);
	}
	return sb_tmp.toString();
}
%>



