<!DOCTYPE html>

<%@ include file="EgTrackerA.jsp" %>
<%@ page errorPage="EgProbs.jsp"%>
<%@ 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);

	boolean isConfigSupported = EgInstallInfo.isConfigSupported;
	boolean isDouble = com.eg.EgDbInfo.doubleByteEnabled;
	boolean ddEnabled = com.eg.EgMemInfo.ddEnabled;
	if (_user != null && isConfigSupported)
	{
		EgUserRole userRole = _user.getUserRole();
		isConfigSupported = userRole.hasAnyConfigRole(EgUserPermission.CONFIG);
	}
%>

<html>
<head>
	<meta charset="utf-8">
	<title>IC - Tests</title>

	<egui:skin ui="admin"/>
	<script>var strSkin='<%=admin_Skin%>';</script>
	<script type="text/javascript" src="../extjs/ext-all.js"></script>
	<script language="JavaScript" src="/final/scripts/utilities/EncodeDecodeParams.js"></script>
	<script>
var strSkin="";
strSkin='<%=admin_Skin%>';
if(strSkin!=null && strSkin=='Dark')
{
	
	document.write('<link rel="stylesheet" href="/final/admin/ICTest/styles/ICTestDarkTheme.css"  media="all"/>');
}
else
{
	
	document.write('<link rel="stylesheet" href="/final/admin/ICTest/styles/ICTestLightTheme.css"  media="all"/>');	
}
</script>
	<style type="text/css">
	
/****************/
	</style>

	<!-- 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>
	<script src="/final/scripts/utilities/EncodeDecodeParams.js"></script>
	<link rel="stylesheet" href="/final/styles/jscrollpane/jquery.jscrollpane.css"/>

	<script language="JavaScript1.2" src="eg_scripts/validate.js"></script>
	<script language="JavaScript1.2" src="../scripts/<%=script_src%>"></script>
	<script language="javascript" src="/final/admin/eg_scripts/common.js"></script>

	<Script language="JavaScript1.2">
	var strSkin='<%=admin_Skin%>';

	var csrfToken = '<%=strCsrfToken%>';
	var pageDesc1 = '<egui:intnl description="EgUDTest.jsp"/>';
	var pageDesc2 = '<egui:intnl description="EgAddUDTest.jsp"/>';
	var pageTitle1 = '<egui:intnl text="admin.title.INTEGRATION CONSOLE - TEST"/>';
	var pageTitle2 = '<egui:intnl text="admin.title.NEW TEST DETAILS"/>';
	var pageTitle3 = '<egui:intnl text="admin.title.DEFAULT THRESHOLDS"/>';
	var pageTitle4 = '<egui:intnl text="admin.title.CONFIGURE THRESHOLDS"/>';
	var pageDesc3 = '<egui:intnl description="EgDefaultThresholds.jsp"/>';
	var pageDesc4 = '<egui:intnl description="EgConfigureThresholds.jsp"/>';
	var toolDelete= '<egui:intnl text="monitor.common.Delete"/>';
	var toolDeleteAll= '<egui:intnl text="monitor.common.Delete All"/>';
	var icTestAlertHeaderMsg= '<egui:intnl text="monitor.common.IC Test"/>';
	var screenLabelsObj={};

	screenLabelsObj['No Headers Available']='<egui:intnl text="monitor.dashboard.No Headers Available" />';
	screenLabelsObj['Please choose the headers to delete']='<egui:intnl text="monitor.dashboard.Please choose the headers to delete" />';
	screenLabelsObj['Are you sure you want to delete selected header']='<egui:intnl text="monitor.dashboard.Are you sure you want to delete selected header" />';
	screenLabelsObj['DSNTitle']='<egui:intnl text="IC Test Configuration"/>';
	screenLabelsObj['validMeasureDataFieldMsg']='<egui:intnl text="admin.ic.Please choose a numeric data column"/>';
	screenLabelsObj['validNumericvalueMsg']='<egui:intnl text="admin.ic.Please enter a valid number for measure numeric value"/>';
	screenLabelsObj['emptyDSNAlertMsg']='<egui:intnl text="monitor.dashboard.Please enter DSN name" />';
	screenLabelsObj['specialCharsDSNAlertMsg']='<egui:intnl text="monitor.dashboard.Please enter DSN name without special characters" />';
	screenLabelsObj['emptyRESTURLAlertMsg']='<egui:intnl text="monitor.dashboard.Please enter REST URL" />';
	screenLabelsObj['invalidHTTPKeyAlertMsg']='<egui:intnl text="monitor.dashboard.is not a valid HTTP header field parameter" />';
	screenLabelsObj['invalidJSONyAlertMsg']='<egui:intnl text="monitor.dashboard.Invalid JSON Body" />';
	screenLabelsObj['validateAPIConfiguration']='<egui:intnl text="admin.ic.Do you want to validate API configuration" />?';
	screenLabelsObj['API_Configuration']='<egui:intnl text="admin.ic.API Configuration" />';
	screenLabelsObj['API_Name']='<egui:intnl text="admin.ic.API Name" />';
	screenLabelsObj['Rest_URL']='<egui:intnl text="admin.ic.Rest URL" />';
	screenLabelsObj['Http_Method']='<egui:intnl text="admin.ic.Http Method" />';
	screenLabelsObj['User_Auth_Alert']='<egui:intnl text="admin.ic.User Authentication Required" />';
	screenLabelsObj['User_name']='<egui:intnl text="admin.ic.User name" />';
	screenLabelsObj['Password']='<egui:intnl text="admin.ic.Password" />';
	screenLabelsObj['Header_Required']='<egui:intnl text="admin.ic.Header Required" />';
	screenLabelsObj['Header_name']='<egui:intnl text="admin.ic.Name" />';
	screenLabelsObj['Header_value']='<egui:intnl text="admin.ic.Value" />';
	screenLabelsObj['Add_Header']='<egui:intnl text="admin.ic.Add Header" />';
	screenLabelsObj['Parameters_Required']='<egui:intnl text="admin.ic.Parameter Required" />';
	screenLabelsObj['Parameter_name']='<egui:intnl text="admin.ic.Parameter name" />';
	screenLabelsObj['Parameter_value']='<egui:intnl text="admin.ic.Parameter value" />';
	screenLabelsObj['Add_Param']='<egui:intnl text="admin.ic.Add Param" />';
	screenLabelsObj['AddBtnLbl']='<egui:intnl text="admin.ic.Add" />';
	screenLabelsObj['Request_Body']='<egui:intnl text="admin.ic.Request Body" />';
	screenLabelsObj['form_url_encoded']='<egui:intnl text="admin.ic.x-www-form-urlencoded" />';
	screenLabelsObj['raw']='<egui:intnl text="admin.ic.raw" />';
	screenLabelsObj['addBody']='<egui:intnl text="admin.ic.Add Body" />';
	screenLabelsObj['body_textarea_emptext']='<egui:intnl text="admin.ic.Body (raw Json)" />';
	screenLabelsObj['addtext']='<egui:intnl text="admin.ic.Click here to add" />';
	screenLabelsObj['port_no']='<egui:intnl text="admin.ic.Port No" />';
	screenLabelsObj['No_Params_Available']='<egui:intnl text="admin.ic.No Params Available" />';
	screenLabelsObj['deleteParamAlert']='<egui:intnl text="admin.ic.Please choose the param to delete" />';
	screenLabelsObj['deleteSelectedParams']='<egui:intnl text="admin.ic.Are you sure you want to delete selected params" />?';
	screenLabelsObj['measuresLbl']='<egui:intnl text="admin.ic.Measures" />';
	screenLabelsObj['No_Body_Contents_Available']='<egui:intnl text="admin.ic.No Body Contents Available" />';
	screenLabelsObj['body_content_alert_msg']='<egui:intnl text="admin.ic.Please choose the Body content to delete" />';
	screenLabelsObj['delete_body_alert_msg']='<egui:intnl text="admin.ic.Are you sure you want to delete this body content" />?';
	screenLabelsObj['connectFailureMsg']='<egui:intnl text="admin.ic.unable to connect rest api with given credentials" />.<egui:intnl text="admin.ic.Please enter valid credentials" />';
	screenLabelsObj['restAPIValidateSaveMsg']='<egui:intnl text="admin.ic.REST API Configuration successfully validated and saved" />';
	screenLabelsObj['restAPISaveMsg']='<egui:intnl text="admin.ic.REST API Configuration saved successffully" />';
	screenLabelsObj['headerParamAlert']='<egui:intnl text="admin.ic.Please enter header parameter" />';
	screenLabelsObj['headerValueAlert']='<egui:intnl text="admin.ic.Please enter header parameter value" />';
	screenLabelsObj['paramNameAlert']='<egui:intnl text="admin.ic.Please enter request parameter" />';
	screenLabelsObj['paramValueAlert']='<egui:intnl text="admin.ic.Please enter request parameter value" />';
	screenLabelsObj['bodyParamAlert']='<egui:intnl text="admin.ic.Please enter request body parameter name" />';
	screenLabelsObj['bodyParamValueAlert']='<egui:intnl text="admin.ic.Please enter request body parameter value" />';
	screenLabelsObj['invalidHTTPHeaderAlert']='<egui:intnl text="admin.ic.is not a valid HTTP header field key" />';
	screenLabelsObj['selectFieldsAlert']='<egui:intnl text="admin.ic.Please Select Data Fields" />';
	screenLabelsObj['selectOneFieldAlert']='<egui:intnl text="admin.ic.Please Select Only one Data column" />';
	screenLabelsObj['dataFieldConfig']='<egui:intnl text="admin.ic.Data Field Configuration" />';
	screenLabelsObj['nextLbl']='<egui:intnl text="admin.ic.Next" />';
	screenLabelsObj['APIDataFieldLbl']='<egui:intnl text="admin.ic.API Data Field" />';
	screenLabelsObj['Edit_API_Tooltip']='<egui:intnl text="admin.ic.Edit API Configuration" />';
	screenLabelsObj['basicAuth_username_alert']='<egui:intnl text="admin.ic.Please enter user name" />';
	screenLabelsObj['basicAuth_password_alert']='<egui:intnl text="admin.ic.Please enter password" />';
	screenLabelsObj['measValLbl']='<egui:intnl text="admin.ic.Measure Display Name" />';
	screenLabelsObj['measInternvalValLbl']='<egui:intnl text="admin.ic.Measure Internal Value" />';
	screenLabelsObj['MeasureIntValueExist']='<egui:intnl text="admin.ic.Measure internal value has been configured already" />';

	var ctrler = '';
	var addctrler = '';
	var datasetCtrlr = '';
	var modifyCtrler = '';
	var customCtrlr = '';
	var scriptCtrlr = '';
	var sqlCtrlr = '';
	var perfmonCtrlr = '';
	var snmpCtrlr = '';
	var jmxCtrlr = '';
	var publicJSON = '';
	var qString = '';
	var ddEnabled = '<%=ddEnabled%>';
	var selMibFile = '';
	var selElmtFile = '';
	var selStusFile = '';
	var oidFldName = '';
	var elmtFldName = '';
	var stusFldName = '';
	var isModifyTest = false;
	var snmpElmtID = '';
	var snmpElmtStatus = '';
	var snmpElmtIDFile = '';
	var snmpElmtStatusFile = '';
	var isConfigTest = false;
	var isDDLoaded = false;
	var isRESTTestType = false;

	//To modify test alone
	var testTabLoad = false;
	var tmpTest='';
	var tmpTestType='';
	var tmpOs='';
	var tmpExecu='';
	var tmpPort='';
	var tmpDbType='';

	var noTestsFnd = '<egui:intnl text="admin.ic.No user defined tests found"/>.';
	var noSrcTestFnd = '<egui:intnl text="admin.ic.No test(s) found for your current search"/>';
	var udTests = '<egui:intnl text="admin.ic.User defined tests"/>';
	var test = '<egui:intnl text="admin.ic.Test"/>';
	var modifyTooltip = '<egui:intnl text="admin.common.Modify"/>';
	var deleteTooltip = '<egui:intnl text="admin.common.Delete"/>';
	var configTooltip = '<egui:intnl text="admin.ic.Configure"/>';
	var yes = '<egui:intnl text="admin.common.Yes"/>';
	var no = '<egui:intnl text="admin.common.No"/>';
	var add = '<egui:intnl text="admin.common.Add"/>';
	var back = '<egui:intnl text="admin.header.Back"/>';
	var error = '<egui:intnl text="admin.common.Error"/>';
	var confrmMsg = '<egui:intnl text="admin.ic.Deleting a test will remove it totally from the eG system"/>. <egui:intnl text="admin.ic.Are you sure you want to delete the test"/> ';
	var isDouble = '<%=isDouble%>';

	//Alerts
	var alertMsg1 = '<egui:intnl text ="admin.ic.Number not allowed as the first character in test name"/>';
	var alertMsg2 = '<egui:intnl text="admin.ic.Please enter a test name ending with _ex"/>';
	var alertMsg3 = '<egui:intnl text="admin.ic.No Special Characters allowed"/>';
	var alertMsg4 = '<egui:intnl text="admin.ic.Sorry cannot create Configuration test"/>';
	var alertMsg5 = '<egui:intnl text="admin.ic.Test name is not allowed in DBL(Chinese,Korean,Japanese)"/>';
	var alertMsg6 = '<egui:intnl text="admin.ic.Please choose a test to be duplicated"/>';
	var alertMsg7 = '<egui:intnl text="admin.ic.Please enter a parameter"/>';
	var alertMsg8 = '<egui:intnl text="admin.ic.Please enter a Default value"/>';
	var alertMsg9 = '<egui:intnl text="admin.ic.host is a eG reserved Parameter"/>'+". "+'<egui:intnl text="admin.ic.Please enter another parameter"/>';
	var alertMsg10 = "<egui:intnl text='admin.ic.\'Info\' is an eG keyword'/>"+". "+"<egui:intnl text='admin.ic.Please specify another name for the parameter'/>";
	var alertMsg11 = '<egui:intnl text="admin.ic.port is a eG reserved Parameter"/>'+'. '+'<egui:intnl text="admin.ic.Please enter another parameter"/>';
	var alertMsg12 = '<egui:intnl text="admin.ic.Parameter name is not allowed in DBL(Chinese,Korean,Japanese)"/>';
	var alertMsg13 = '<egui:intnl text="admin.ic.Default value is not allowed in DBL(Chinese,Korean,Japanese),since manager is SingleByte"/>';
	var alertMsg14 = '<egui:intnl text="admin.ic.Database keyword(s) cannot be entered as measure name(s)"/>';
	var alertMsg15 = '<egui:intnl text="admin.ic.Please enter a measure"/>.';
	var alertMsg16 = '<egui:intnl text="admin.ic.Numbers cannot be used as the first character"/>';
	var alertMsg17 = '<egui:intnl text="admin.ic.Underscore cannot be used as the first character"/>';
	var alertMsg18 = '<egui:intnl text="admin.ic.Measure name is not allowed in DBL(Chinese,Korean,Japanese)"/>';
	var alertMsg19 = '<egui:intnl text="admin.ic.Please select a unit"/>';
	var alertMsg20 = '<egui:intnl text="admin.ic.Alarm display string is not allowed in DBL(Chinese,Korean,Japanese),since manager is SingleByte"/>';
	var alertMsg21 = '<egui:intnl text="admin.ic.Please enter a unit"/>';
	var alertMsg22 = '<egui:intnl text ="admin.ic.Please enter a valid unit"/>';
	var alertMsg23 = '<egui:intnl text="admin.common.File name is not allowed in DBL(Chinese,Korean,Japanese)"/>';
	var alertMsg24 = '<egui:intnl text="admin.common.Please choose the file by clicking the browse button"/>';
	var alertMsg25 = '<egui:intnl text="admin.common.Please choose only *class file"/>';
	var alertMsg26 = '<egui:intnl text="admin.ic.Please enter a path for the class file"/>';
	var alertMsg27 = '<egui:intnl text="admin.ic.The class file and the test should have the same name"/>';
	var alertMsg28 = '<egui:intnl text="admin.ic.The name of the class file should end in _ex*class"/>';
	var alertMsg29 = '<egui:intnl text="admin.ic.Please enter a path for the library file"/>';
	var alertMsg30 = '<egui:intnl text ="admin.ic.You are modifying an existing test"/>'+". "+'<egui:intnl text ="admin.ic.Please note that data already collected for this test will no longer be available after the modification"/>'+".";
	var alertMsg31 = "<egui:intnl text='admin.ic.The name of the class must be in the form of \'testname_DD\''/>";
	var alertMsg32 = '<egui:intnl text="admin.ic.Measure must be selected"/>';
	var alertMsg33 = '<egui:intnl text="admin.ic.Column Heading should not be blank"/>';
	var alertMsg34 = '<egui:intnl text="admin.ic.Spaces are not allowed"/>'+'. '+'<egui:intnl text="admin.ic.Use commas to separate headings"/>';
	var alertMsg35 = '<egui:intnl text="admin.ic.Description should not be blank"/>';
	var alertMsg36 = '<egui:intnl text="admin.ic.Comma not allowd in description field"/>';
	var alertMsg37 = '<egui:intnl text="admin.ic.Do you want to delete this measure"/>';
	var alertMsg38 = '<egui:intnl text ="admin.ic.Please enter a path for the script/batch file"/>';
	var alertMsg39 = '<egui:intnl text ="admin.ic.Please upload script / batch file"/>';
	var alertMsg40 = '<egui:intnl text="admin.ic.Please enter a query"/>';
	var alertMsg41 = '<egui:intnl text ="admin.ic.Please enter a counter name"/>';
	var alertMsg42 = '<egui:intnl text="admin.ic.Counter name is not allowed in DBL(Chinese,Korean,Japanese)"/>';
	var alertMsg43 = '<egui:intnl text="admin.ic.Instances to be included is not allowed in DBL(Chinese,Korean,Japanese)"/>';
	var alertMsg44 = '<egui:intnl text="admin.ic.Instances to be excluded is not allowed in DBL(Chinese,Korean,Japanese)"/>';
	var alertMsg45 = '<egui:intnl text ="admin.ic.Do you want to delete the measure"/> ';
	var alertMsg46 = '<egui:intnl text="admin.ic.Please enter an object oid"/>';
	var alertMsg47 = '<egui:intnl text="admin.ic.Alphabets are not allowed"/>';
	var alertMsg48 = '<egui:intnl text="admin.ic.Object OID is not allowed in DBL(Chinese,Korean,Japanese)"/>';
	var alertMsg49 = '<egui:intnl text="admin.ic.Please enter element OID"/>';
	var alertMsg50 = '<egui:intnl text="admin.ic.Element ID(OID) is not allowed in DBL(Chinese,Korean,Japanese)"/>';
	var alertMsg51 = '<egui:intnl text="admin.ic.Element status (OID) is not allowed in DBL(Chinese,Korean,Japanese)"/>';
	var alertMsg52 = '<egui:intnl text="admin.ic.Element valid status is not allowed in DBL(Chinese,Korean,Japanese)"/>';
	var alertMsg53 = '<egui:intnl text="admin.ic.Please enter rediscovery period"/>';
	var alertMsg54 = '<egui:intnl text="admin.ic.Only valid integers are allowed"/>';
	var alertMsg55 = '<egui:intnl text="admin.ic.Rediscovery period is not allowed in DBL(Chinese,Korean,Japanese)"/>';
	var alertMsg56 = "<egui:intnl text='admin.ic.\'scriptfile\' is an eG keyword'/>"+". "+"<egui:intnl text='admin.ic.Please specify another name for the parameter'/>";
	var alertMsg57 = '<egui:intnl text="admin.ic.Do you want to delete the parameter"/>';
	var alertMsg58 = '<egui:intnl text="admin.ichelp.Help page created successfully"/>';
	var alertMsg59 = '<egui:intnl text="admin.ichelp.Please choose Admin or Monitor help page"/>';
	var alertMsg60 = '<egui:intnl text="admin.ichelp.Please upload the admin help file has *html extension"/>';
	var alertMsg61 = '<egui:intnl text="admin.ichelp.Please upload the monitor help file has *html extension"/>';
	var alertMsg62 = '<egui:intnl text="admin.ic.Please enter an attribute name"/>';
	var alertMsg63 = '<egui:intnl text="admin.ic.Please enter an Domain name"/>';
	var alertMsg64 = '<egui:intnl text="admin.ic.Domain name is not allowed in DBL(Chinese,Korean,Japanese)"/>';
	var alertMsg65 = '<egui:intnl text="admin.ic.MBeans to be included is not allowed in DBL(Chinese,Korean,Japanese)"/>';
	var alertMsg66 = '<egui:intnl text="admin.ic.MBeans to be excluded is not allowed in DBL(Chinese,Korean,Japanese)"/>';
	var alertMsg67 = '<egui:intnl text="admin.ic.Please enter a Host Name/IP"/>';
	var alertMsg68 = '<egui:intnl text="admin.ic.Please enter a JMX Remote Port"/>';
	var alertMsg69 = '<egui:intnl text="admin.ic.Please enter a JNDI Name"/>';
	var alertMsg70 = '<egui:intnl text="admin.ic.Please enter a User name"/>';
	var alertMsg71 = '<egui:intnl text="admin.ic.Please enter a Password"/>';
	var alertMsg72 = '<egui:intnl text="admin.ic.Please select a Domain Name"/>';
	var alertMsg73 = '<egui:intnl text="admin.ic.The selected file already exist"/>'+'. '+'<egui:intnl text="admin.ic.Do you want to replace the file?"/>';
	var alertMsg74 = '<egui:intnl text="admin.common.Upload MIB file extensions should be either *txt or *mib"/>';
	var alertMsg75 = '<egui:intnl text ="admin.ic.Please enter an object name"/>';
	var alertMsg76 = '<egui:intnl text="admin.ic.Object name is not allowed in DBL(Chinese,Korean,Japanese)"/>';
	var alertMsg77 = '<egui:intnl text="admin.ichelp.Please select a module or upload help page"/>';
	var alertMsg78 = '<egui:intnl text="admin.ichelp.No Help page found for" />';
	var alertMsg79 = '<egui:intnl text="admin.ichelp.Would you like to create help page for this test"/>'+'?';
	var alertMsg80 = '<egui:intnl text="admin.ichelp.Would you like to add more measures for this test"/>'+'?';
	var alertMsg81 = '<egui:intnl text="admin.ic.Sorry could not discover domains"/>'+'. '+'<egui:intnl text="admin.ic.Please check the credentials you have entered for discovery"/>';
	var alertMsg82 = '<egui:intnl text="admin.ic.The selected MIB file has been uploaded successfully"/>';
	var alertMsg83 = '<egui:intnl text="admin.ic.You have chosen the test to be descriptor based"/>'+'. '+'<egui:intnl text="admin.ic.The specified Object name has no instance"/>'+'. '+'<egui:intnl text="admin.ic.Specify a new Object name with an instance."/>';
	var alertMsg84 = '<egui:intnl text="admin.ic.You have chosen the test to be a non descriptor based test"/>'+'. '+'<egui:intnl text="admin.ic.The specified Object name has instance"/>'+'. '+'<egui:intnl text="admin.ic.Specify a new Object name without instance"/>';
	var alertMsg85 = '<egui:intnl text="admin.ic.Please select rest data fields"/>';

	//Add New Test
	var isConfigSupported = <%=isConfigSupported%>;
	var addTest = '<egui:intnl text="admin.button.Add New Test"/>';
	var testName = '<egui:intnl text="admin.ic.Test name"/>';
	var typeName = '<egui:intnl text="admin.ic.Test type"/>';
	var category = '<egui:intnl text="admin.ic.Category"/>';
	var duplicate = '<egui:intnl text="admin.ic.Duplicate"/>';
	var execution = '<egui:intnl text="admin.ic.Execution"/>';
	var testToDuplicate = '<egui:intnl text="admin.ic.Test to be duplicated"/>';
	var port = '<egui:intnl text="admin.ic.Port based"/>';
	var testType = '<egui:intnl text="admin.ic.Test type"/>';
	var ostype = '<egui:intnl text="admin.ic.OS type"/>';
	var dbType = '<egui:intnl text="admin.ic.DB type"/>';
	var internal = '<egui:intnl text="admin.ic.Internal"/>';
	var external = '<egui:intnl text="admin.ic.External"/>';
	var unix = '<egui:intnl text="admin.ic.Unix"/>';
	var windows = '<egui:intnl text="admin.ic.Windows"/>';
	var defVal= '<egui:intnl text="admin.ic.Default value" />';
	var addParam = '<egui:intnl text="admin.ic.Add New Parameter"/>';
	var noParamFnd = '<egui:intnl text="admin.ic.No parameters configured yet"/>';
	var newParam = '<egui:intnl text="admin.ic.New test parameters"/>';
	var param = '<egui:intnl text="admin.ic.Parameter"/>';
	var updating = '<egui:intnl text="admin.common.Updating"/>';
	var restDataLoadingMsg = '<egui:intnl text="admin.common.Please wait while fetching data from api"/>....';
	var restGenerateTestLoadingMsg = '<egui:intnl text="admin.common.Please wait while generating test"/>....';
	var restConfigLoadingMsg = '<egui:intnl text="admin.common.Please wait while fetching rest api configuration"/>....';
	var restValidateLoadingMsg = '<egui:intnl text="admin.common.Please wait while validating rest api configuration"/>....';
	var plsWait = '<egui:intnl text="admin.common.Please wait"/>';
	var tab1Test = '<egui:intnl text="admin.ic.Test"/>';
	var tab2Param = '<egui:intnl text="admin.ic.Parameter"/>';
	var tab3Measure = '<egui:intnl text="admin.ic.Measure"/>';
	var tab4Generate = '<egui:intnl text="admin.ic.Generate"/>';
	var valIn = '<egui:intnl text="admin.ic.in"/>';

	//Add Measure
	var addMeasure = '<egui:intnl text="admin.ic.Add New Measure"/>';
	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 noMeasureFnd = '<egui:intnl text="admin.ic.No measures have been added for this test"/>';
	var newMeasDetail = '<egui:intnl text="admin.ic.New measure details"/>';
	var measIdx = '<egui:intnl text="admin.ic.Measure index"/>';
	var measName = '<egui:intnl text="admin.ic.Measure name"/>';
	var unit = '<egui:intnl text="admin.ic.Unit"/>';
	var other = '<egui:intnl text="admin.ic.Other"/>';
	var convFact = '<egui:intnl text="admin.ic.Conversion Factor"/>';
	var alrmDispStr = '<egui:intnl text="admin.ic.Alarm display string"/>';
	var add = '<egui:intnl text="admin.common.Add"/>';
	var splCharAlert = '<egui:intnl text="admin.ic.Special characters are not allowed in Alarm display string"/>';
	
	//Gen Test
	var browseFile = '<egui:intnl text="admin.ic.Please enter the path or click choose to browse the file"/>';
	var classFile = '<egui:intnl text="admin.ic.Class file"/>';
	var choose = '<egui:intnl text="admin.ic.Choose"/>';
	var loadClass = '<egui:intnl text="admin.ic.Load class file"/>';
	var libFile = '<egui:intnl text="admin.ic.Library file"/>';
	var loadLib = '<egui:intnl text="admin.ic.Load library file"/>';
	var fileReqToExecute = '<egui:intnl text="admin.ic.jar, so, zip, dll files required for executing the above test"/>';
	var ddCheck = '<egui:intnl text="admin.ic.Click here to enable detailed diagnosis for this test"/>';
	var dbColSize = '<egui:intnl text="admin.ic.Database column size"/>';
	var infoBasedTest = '<egui:intnl text="admin.ic.Descriptor based test"/>';
	var addHelp = '<egui:intnl text="admin.ic.Add Help"/>';
	var generate = '<egui:intnl text="admin.ic.Generate"/>';
	var fileUpload = '<egui:intnl text="admin.ic.File Upload"/>';
	var noFileSel = '<egui:intnl text="admin.ic.No file selected"/>';
	var file2Upload = '<egui:intnl text="admin.common.File to upload"/>';
	var upload = '<egui:intnl text="admin.common.Upload"/>';
	var mbeanName = '<egui:intnl text="admin.common.MBean Name"/>';
	var descBasedTest = '<egui:intnl text="admin.ic.Is descriptor based test"/> ?';
	var addParamAlert = '<egui:intnl text="admin.ic.Would you like to add more parameters for this test"/> ?';
	var modifyParamAlert = '<egui:intnl text="admin.ic.Would you like to modify any other parameters for this test"/> ?';
	var showMeasure = '<egui:intnl text="admin.ic.Show Measure"/>';
	
	//DD
	var tab5DD = '<egui:intnl text="admin.ic.Detailed Diagnosis"/>';
	var class4DD = '<egui:intnl text="admin.ic.Class file for detailed diagnosis"/>';
	var column = '<egui:intnl text="admin.ic.Column"/>';
	var desc = '<egui:intnl text="admin.ic.Description"/>';
	var meas4Test = '<egui:intnl text="admin.ic.Measures for this test"/>';
	var colHeads = '<egui:intnl text="admin.ic.Column headings"/>';
	var descDD = '<egui:intnl text="admin.ic.Description of the detailed diagnosis"/>';
	var meas4DD = '<egui:intnl text="admin.ic.Measures for detailed diagnosis"/>';
	
	//Script Test
	var procMthd = '<egui:intnl text="admin.ic.Process method"/>';
	var scrBatPath = '<egui:intnl text="admin.ic.Path of script/batch file"/>';
	var loadFile = '<egui:intnl text="admin.ic.Load file"/>';
	
	//SQL Test
	var sqlQry = '<egui:intnl text="admin.ic.SQL query"/>';
	
	//Perfmon Test
	var counterName = '<egui:intnl text="admin.ic.Counter name"/>';
	var objName = '<egui:intnl text="admin.ic.Object name"/>';
	var instsInclude = '<egui:intnl text="admin.ic.Instances to be included"/>';
	var instsExclude = '<egui:intnl text="admin.ic.Instances to be excluded"/>';
	
	//SNMP
	var objOID = '<egui:intnl text="admin.ic.Object OID"/>';
	
	var multi = '<egui:intnl text="admin.ic.Multiple elements"/>';
	var single = '<egui:intnl text="admin.ic.Single element"/>';
	var elmtId= '<egui:intnl text="admin.ic.Element ID(OID)"/>';
	var elmtStatus = '<egui:intnl text="admin.ic.Element status (OID)"/>';
	var elmtValidStatus = '<egui:intnl text="admin.ic.Element valid status (Value)"/>';
	var rediscPeriod = '<egui:intnl text="admin.ic.Rediscovery period(In mins)"/>';
	var mibBrwsr = '<egui:intnl text="admin.ic.MIB Browser"/>';
	var mibFiles = '<egui:intnl text="admin.metric.MIB File"/>';
	var uplMib = '<egui:intnl text="admin.ic.UploadMIB"/>';

	//Modify Test
	var modTestInfo = '<egui:intnl text="admin.ic.Modify test details"/>';

	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"/>';
	
	//Modify Param
	var modParam = '<egui:intnl text="admin.ic.Modify parameter details"/>';
	var modMeas = '<egui:intnl text="admin.ic.Modify measure details"/>';
	var delParam = '<egui:intnl text="admin.ic.Delete parameter"/>';
	
	//Add Help
	var tab6Help = '<egui:intnl text="admin.ic.Help"/>';
	var useTemplete = '<egui:intnl text="admin.ichelp.Use Template"/>';
	var avlTemplete = '<egui:intnl text="admin.ichelp.Module"/>';
	var templCont = '<egui:intnl text="admin.ichelp.Template content"/>';
	var createHlp = '<egui:intnl text="admin.ichelp.Create help"/>';
	var adminFileUp = '<egui:intnl text="admin.ichelp.Admin"/>';
	var monFileUp = '<egui:intnl text="admin.ichelp.Monitor"/>';
	var avlHelpPages = '<egui:intnl text="admin.ichelp.Available help pages"/>';
	var hlpPageCont = '<egui:intnl text="admin.ichelp.Help page content"/>';
	var modifyHlp = '<egui:intnl text="admin.ichelp.Modify help"/>';
	var helpPage = '<egui:intnl text="admin.ichelp.Help page"/>';

	// JMX
	var measSelOpts = '<egui:intnl text="admin.ic.Measure Selection Options"/>';
	var mbDisc = '<egui:intnl text="admin.ic.MBeans Discovery"/>';
	var hostIP = '<egui:intnl text="admin.ic.Host Name/IP"/>';
	var jmxPort = '<egui:intnl text="admin.ic.JMX Remote Port"/>';
	var jndiName = '<egui:intnl text="admin.ic.JNDI Name"/>';
	var userName = '<egui:intnl text="admin.ic.User name"/>';
	var pwd = '<egui:intnl text="admin.ic.Password"/>';
	var startDisc = '<egui:intnl text="admin.ic.Start discovery"/>';
	var enterPath = '<egui:intnl text="admin.ic.Please enter the file path" />';
	var filePath= '<egui:intnl text="admin.ic.Path of the file"/>';
	var getDomains = '<egui:intnl text="admin.ic.Get Domains"/>';
	var domainList = '<egui:intnl text="admin.ic.Domain List"/>';
	var domainName = '<egui:intnl text="admin.ic.Domain Name"/>';
	var oonfigure = '<egui:intnl text="admin.ic.Configure"/>';
	var errMsg = '<egui:intnl text="admin.ic.Unable to discover MBeans"/>'+'. '+'<egui:intnl text="admin.ic.Please use one of the other options"/>';
	var attrName = '<egui:intnl text="admin.ic.Attribute name"/>';
	var mbs2Include = '<egui:intnl text="admin.ic.MBeans to be included"/>';
	var mbs2Exclude = '<egui:intnl text="admin.ic.MBeans to be excluded"/>';
	var mBean = '<egui:intnl text="admin.ic.MBean name"/>';
	var domainName = '<egui:intnl text="admin.ic.Domain Name"/>';
	

	//default thresholds
	var titleGrid1 = '<egui:intnl text="admin.title.Measures with thresholds"/>';
	var titleGrid2 = '<egui:intnl text="admin.title.Measures without thresholds (Click on the individual measure to configure their thresholds)"/>';
	var alarmPolText = '<egui:intnl text="admin.threshold.Alarm Policy"/>';
	var btnText = '<egui:intnl text="admin.common.Finish"/>';
	var btnText1 = '<egui:intnl text="admin.common.Back"/>';
	var btnText2 = '<egui:intnl text="admin.common.Update"/>';
	var createBtnText = '<egui:intnl text="admin.common.Save"/>';
	var configureMetrics = '<egui:intnl text="admin.common.Configure Metrics"/>';
	var configureDescriptor = '<egui:intnl text="admin.common.Configure Descriptor"/>';
	var minThreshText = '<egui:intnl text="admin.threshold.Minimum Threshold"/>';
	var maxThreshText = '<egui:intnl text="admin.threshold.Maximum Threshold"/>';
	var minRegExpText = '<egui:intnl text="admin.threshold.Alphabets or special characters are not allowed"/>';
	var minThreshTipText = '*&nbsp;'+'<egui:intnl text="admin.threshold.Specify minimum threshold values (Critical, Major, and Minor) in ascending order"/>';
	var maxThreshTipText = '*&nbsp;'+'<egui:intnl text="admin.thresholds.Specify maximum threshold values (Critical, Major, and Minor) in descending order"/>';

	var staticMinCriticalErrMsg1 = '<egui:intnl text="admin.threshold.Invalid threshold entry : Minimum threshold - Static - Critical"/>';
	var staticMaxCriticalErrMsg1 = '<egui:intnl text="admin.threshold.Invalid threshold entry : Maximum threshold - Static - Critical"/>';
	var staticMinMajorErrMsg1 = '<egui:intnl text="admin.threshold.Invalid threshold entry : Minimum threshold - Static - Major"/>';
	var staticMaxMajorErrMsg1 = '<egui:intnl text="admin.threshold.Invalid threshold entry : Maximum threshold - Static - Major"/>';
	var staticMinMinorErrMsg1 = '<egui:intnl text="admin.threshold.Invalid threshold entry : Minimum threshold - Static - Minor"/>';
	var staticMaxMinorErrMsg1 = '<egui:intnl text="admin.threshold.Invalid threshold entry : Maximum threshold - Static - Minor"/>';
	var errMsg1 = '<egui:intnl text="admin.threshold.Possible reasons could be"/>';
	var errMsg2 = '<egui:intnl text="admin.threshold.Threshold is set with a negative value"/>';
	var errMsg3 = '<egui:intnl text="admin.threshold.The integer part contains more than 10 digits"/>';
	var errMsg4 = '<egui:intnl text="admin.threshold.The fractional part contains more than 4 digits"/>';
	var errMsg5 = '<egui:intnl text="admin.threshold.Static minimum threshold"/> <egui:intnl text="admin.threshold.for"/>';
	var errMsg6 = '<egui:intnl text="admin.threshold.should not contain negative values"/>.';
	var errMsg7 = '<egui:intnl text="admin.threshold.Static minimum threshold values representing Critical/Major/Minor should be in ascending order"/>';
	var errMsg8 = '<egui:intnl text="admin.threshold.Automatic minimum threshold values representing Critical/Major/Minor should be in ascending order"/>';
	var errMsg9 = '<egui:intnl text="admin.threshold.Static maximum threshold values representing Critical/Major/Minor should be in descending order"/>';
	var errMsg10 = '<egui:intnl text="admin.threshold.Automatic maximum threshold values representing Critical/Major/Minor should be in descending order"/>';
	var errMsg11 = '<egui:intnl text="admin.threshold.Static maximum threshold"/> <egui:intnl text="admin.threshold.for"/>';
	var deleteConfirmMsg = '<egui:intnl text="admin.threshold.Are you sure you want to delete specific thresholds for this descriptor"/>?';
	var successMsg1 = '<egui:intnl text="admin.threshold.Threshold updated successfully"/>'+'.';

	var measureText = '<egui:intnl text="admin.threshold.Measure"/>';
	var thresholdText = '<egui:intnl text="admin.threshold.Threshold"/>';
	var criticalText = '<egui:intnl text="admin.threshold.Critical"/>';
	var majorText = '<egui:intnl text="admin.threshold.Major"/>';
	var minorText = '<egui:intnl text="admin.threshold.Minor"/>';
	var maxminText = '<egui:intnl text="admin.threshold.Min/Max"/>';
	var staticText = '<egui:intnl text="admin.threshold.Static"/>';
	var autoText = '<egui:intnl text="admin.threshold.Automatic"/>';
	var descText = '<egui:intnl text="admin.threshold.Description"/>';
	var polText = '<egui:intnl text="admin.threshold.Policy"/>';
	var allMeasureText = '<egui:intnl text="admin.threshold.Apply to other measures"/>';
	var autoCriText = '<egui:intnl text="admin.threshold.Critical (% Tolerance)"/>';
	var autoMajorText = '<egui:intnl text="admin.threshold.Major (% Tolerance)"/>';
	var autoMinorText = '<egui:intnl text="admin.threshold.Minor (% Tolerance)"/>';

	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 setMIBValue(oidValue,from,fieldName,fileName)
	{
		if(oidValue!=null && (oidValue=="null" || oidValue==""))
		{
			if(fieldName=="ObjectOID")
			{
				alert("<egui:intnl text='admin.ic.Please select an Object OID'/>");
			}
			else if(fieldName=="ElementOID")
			{
				alert("<egui:intnl text='admin.ic.Please select an Element OID'/>");
			}
			else if(fieldName=="StatusOID")
			{
				alert("<egui:intnl text='admin.ic.Please select a Status OID'/>");
			}
			return;
		}
		if(from=="config")
		{
			if(fieldName=="ObjectOID")
			{	
				var oidObj = Ext.getCmp('oid');
				if (oidObj == null || oidObj == 'undefined')
				{
					oidObj = Ext.getCmp('s_oid');
				}	
				oidObj.setValue(oidValue);
			}
			else if(fieldName=="ElementOID")
			{
				Ext.getCmp('elementOid').setValue(oidValue);
			}
			else
			{
				Ext.getCmp('validOid').setValue(oidValue);
			}
		}
		//else
		//{
		//	Ext.getCmp('s_oid').setValue(oidValue);
		//}
		Ext.getCmp('mibWindow').close();
		//Ext.getCmp('oid').setValue(oidValue);
	}


	function encodeFieldParams (thisForm)
	{
		var encodeParams = "";
		var fieldsArr = thisForm.getFields().items;
		for(var i in fieldsArr)
		{
			var fieldParamName = fieldsArr[i].name;
			var fieldParamValue = fieldsArr[i].value;
			if( fieldParamName == "s_measure" || fieldParamName == "s_dbsize" || fieldParamName == "s_un" || 
				fieldParamName == "org_measure" || fieldParamName == "$_s_measure" || fieldParamName == "$_s_dbsize" ||fieldParamName == "$_s_un" || 
				fieldParamName == "$_cFactor"  ||  fieldParamName == "callPage" || fieldParamName == "s_counter" ||fieldParamName == "$_s_counter" || fieldParamName == "org_counter")
			{
				Ext.getCmp(fieldsArr[i].id).submitValue = false;
				encodeParams += "&"+fieldParamName+"="+encodeURIComponent(filterEncode(fieldParamValue));
			}
		}
		return encodeParams;
	}

	function configureDataSet()
	{
		try
		{
			datasetCtrlr.loadDatasetconfigWindow();
		}
		catch (ce)
		{
			console.log("Datset configuration UI Error ",ce);
		}
	}
	</script>

	<!-- Application folder -->
	<script type="text/javascript" src="ICTest/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("adminLastAccessedURL","/final/admin/EgUDTest.jsp?"+request.getQueryString());
%>



