Ext.define("SpecificTestConfiguration.controller.IntermediateController",{extend:"Ext.app.Controller",refs:[{selector:"egvcconfig",ref:"egvcconfig"},{selector:"eghmcconfig",ref:"eghmcconfig"},{selector:"servicedetailedconfiguration",ref:"servicedetailedconfiguration"},{selector:"egdetailstest",ref:"egdetailstest"},{selector:"egxmsconfig",ref:"egxmsconfig"},{selector:"sitedetailedconfiguration",ref:"sitedetailedconfiguration"}],init:function(){testInterViews=this;
this.control({});},egnutconfiginter:function(b){var d=Ext.getCmp(b).getValue();if(d=="Other"){Ext.create("SpecificTestConfiguration.view.EgNutConfig").show();Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egvcconfig",method:"POST",async:false});}else{if(d=="None"){Ext.getCmp("Prism_user").setValue("$unconfigured");
Ext.getCmp("Prism_password").setValue("$unconfigured");Ext.getCmp("Prism_passwordconfirmpassword").setValue("$unconfigured");Ext.getCmp("webPort").setValue("9440");Ext.getCmp("Prism_password").backupValue="$unconfigured";Ext.getCmp("Prism_passwordconfirmpassword").backupValue="$unconfigured";}else{var c=publicJson["virtualComboObj"][d];
var e=c.split("#");if(!Ext.isEmpty(c)&&c.indexOf("~#~")!=-1){e=c.split("~#~");}var a=e[2];if(!Ext.isEmpty(a)&&a.indexOf("~HASH~")!=-1){a=a.replace(/~HASH~/g,"#");}Ext.getCmp("Prism_user").setValue(e[1]);Ext.getCmp("Prism_password").setValue(a);Ext.getCmp("Prism_passwordconfirmpassword").setValue(a);Ext.getCmp("webPort").setValue(e[4]);
Ext.getCmp("Prism_password").backupValue=a;Ext.getCmp("Prism_passwordconfirmpassword").backupValue=a;}}},clearNutInter:function(a){Ext.getCmp("vCenterIP").setValue("");Ext.getCmp("UsrVc").setValue("");Ext.getCmp("PwdVc").setValue("");Ext.getCmp("ConfPwdVc").setValue("");Ext.getCmp("PwdVc").backupValue="";
Ext.getCmp("ConfPwdVc").backupValue="";Ext.getCmp("SslVc").reset();Ext.getCmp("WebPort").reset();},updateNutInter:function(e){var b=this;var m=b.validateNutInter();if(m){var k=Ext.getCmp("vCenterIP").getValue();var s=Ext.getCmp("UsrVc").getValue();var q=Ext.getCmp("PwdVc").getValue();var l=Ext.getCmp("SslVc").getValue();
var f=Ext.getCmp("WebPort").getValue();var h=false;if(l=="true"){h=true;}var t=Ext.getCmp("DiscVc").getValue();var r=publicJson["isAgentLessComponent"];var a=publicJson.selectedCompAgent;var o=$("#testConfigForm-body").scrollTop();if(Ext.isEmpty(o)){o=350;}var g="ipAdd="+k+"&uname="+encodeURIComponent(s)+"&pass="+encodeURIComponent(q)+"&ssl="+h+"&isDiscovery="+t+"&webport="+f+"&from=nutAdd";
Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgchangeportspJson.jsp?"+g,method:"POST",params:{"hypervisortype":"nutanix","isAgentLessComponent":r,"selectedCompAgent":a},async:false,success:function(u){if(u.status==200&&!Ext.isEmpty(u.responseText)){var v=u.responseText;var x=Ext.decode(v);var w=x.selectedAgent;
if(!Ext.isEmpty(w)){Ext.getCmp("testConfigForm").add({xtype:"hiddenfield",name:"agentlessSubject",id:"agentlessSubject",value:w,});Ext.getCmp("testConfigForm").body.scrollTo("top",o);}Ext.getCmp("Prism_IP").setValue(k);Ext.getCmp("Prism_user").setValue(s);Ext.getCmp("Prism_password").setValue(q);Ext.getCmp("Prism_passwordconfirmpassword").setValue(q);
Ext.getCmp("Prism_password").backupValue=q;Ext.getCmp("Prism_passwordconfirmpassword").backupValue=q;Ext.getCmp("webPort").setValue(f);if(h){Ext.getCmp("ssl1").setValue(true);}else{Ext.getCmp("ssl2").setValue(true);}}}});Ext.getCmp("nutconfig").destroy();}var n=Ext.getCmp("componentType").getValue();
var d=Ext.getCmp("componentName").getValue();var c=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(n)+"&componentType="+encodeURIComponent(n)+"&componentName="+encodeURIComponent(d)+"&tName_HelpPage="+c+"&testName="+c,method:"POST"});
},validateNutInter:function(c){var k=this;var o="abcdefghijklmnoprstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~!@#$%^&*()-_+=[]{}|\\:;\"'<>.?/";var e=Ext.getCmp("vCenterIP").getValue();var s=Ext.getCmp("WebPort").getValue();var r=Ext.getCmp("UsrVc").getValue();var n=Ext.getCmp("PwdVc").getValue();var g=Ext.getCmp("ConfPwdVc").getValue();
var b=publicJson.existhyperlist;var d=publicJson.allCompAccess;var l=new Array();if(!Ext.isEmpty(b)){b=b.split(",");}if(!d){for(var m=0;m<b.length;m++){var f=b[m].trim();if(!Ext.isEmpty(f)&&f.startsWith("nutanix#")){f=f.substring(f.indexOf("#")+1);l.push(f);}}ex_nutStr=l;}for(var a=0;a<ex_nutStr.length;
a++){var h=ex_nutStr[a].trim();if(e==h){Ext.Msg.show({title:alertNutTitle,msg:existNut,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("vCenterIP").focus(true);}});k.clearNutInter();return;}}if(!checkblank(e)||e=="None"||e=="none"||e=="other"||e=="Other"){Ext.Msg.show({title:alertNutTitle,msg:enterNut,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("vCenterIP").focus(true);
}});return;}if(!validateIpOrHName(e)){Ext.getCmp("vCenterIP").focus(true);return;}if(!checkblank(r)){Ext.Msg.show({title:alertNutTitle,msg:enterUsrId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrVc").focus(true);}});return;}else{if(!checkspecialExt(r,"*+=|:;\"'<>,/[]?")){Ext.Msg.show({title:alertNutTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrVc").focus(true);
}});return;}else{if(!checkHyphenText(r,r)){Ext.getCmp("UsrVc").focus();return;}else{if(trim(r)==""){Ext.getCmp("UsrVc").focus();return;}else{if(r.indexOf("..")>-1){Ext.Msg.show({title:alertNutTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrVc").focus(true);
}});return;}else{if(r.indexOf("  ")>-1){Ext.Msg.show({title:alertNutTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrVc").focus(true);}});return;}}}}}}if(n==""){Ext.Msg.show({title:alertNutTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("PwdVc").focus(true);
}});sub=false;return;}else{if(!checkForPassValidity(n)){Ext.getCmp("PwdVc").focus();sub=false;return;}else{if(g==""){Ext.Msg.show({title:alertNutTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("ConfPwdVc").focus(true);}});sub=false;return;}else{if(n!=g){Ext.Msg.show({title:alertNutTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("ConfPwdVc").focus(true);
}});sub=false;return;}else{if(!checkblank(s)){Ext.Msg.show({title:alertNutTitle,msg:PortBlank,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("WebPort").focus(true);}});sub=false;return;}else{if(!checkspace(s)){Ext.getCmp("WebPort").focus();sub=false;return;}else{if(!checkcomma(s)){Ext.Msg.show({title:alertNutTitle,msg:CommaPrt,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("WebPort").focus(true);
}});sub=false;return;}else{if(((!checknumber("+",s)&&s.indexOf(",")==-1)||s==0||s.indexOf(".")>-1)&&(s=="NULL")||s.indexOf(",")>-1){Ext.Msg.show({title:alertNutTitle,msg:validPrt,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("WebPort").focus(true);}});sub=false;return;}else{if(!checkspecialnomess(s,o)&&(s!="NULL")){Ext.Msg.show({title:alertNutTitle,msg:specialCharacterPrt,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("WebPort").focus(true);
}});sub=false;return;}else{return true;}}}}}}}}}},callNutInterDestroy:function(){Ext.getCmp("Prism_IP").setValue("None");Ext.getCmp("Prism_user").setValue("$unconfigured");Ext.getCmp("Prism_password").setValue("$unconfigured");Ext.getCmp("Prism_passwordconfirmpassword").setValue("$unconfigured");Ext.getCmp("Prism_password").backupValue="$unconfigured";
Ext.getCmp("Prism_passwordconfirmpassword").backupValue="$unconfigured";Ext.getCmp("ssl1").setValue(true);Ext.getCmp("webPort").setValue("9440");},egxmsIPsconfig:function(b){var d=Ext.getCmp(b).getValue();if(d=="Other"){Ext.create("SpecificTestConfiguration.view.EgXMSConfig").show();Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egxmsipconfig",method:"POST",async:false});
}else{if(d=="None"){Ext.getCmp("XtremIO_user").setValue("$unconfigured");Ext.getCmp("XtremIO_password").setValue("$unconfigured");Ext.getCmp("XtremIO_passwordconfirmpassword").setValue("$unconfigured");Ext.getCmp("XtremIO_password").backupValue="$unconfigured";Ext.getCmp("XtremIO_passwordconfirmpassword").backupValue="$unconfigured";
Ext.getCmp("ssl2").setValue(true);}else{var c=publicJson["xmsIPComboObj"][d];var e=c.split("#");if(!Ext.isEmpty(e[0])&&(e[0].toLowerCase()=="false"||e[0].toLowerCase()=="no")){Ext.getCmp("ssl1").setValue(true);}else{Ext.getCmp("ssl2").setValue(true);}Ext.getCmp("XtremIO_user").setValue(e[1]);var a=e[2];
if(!Ext.isEmpty(a)&&a.indexOf("~HASH~")!=-1){a=a.replace(/~HASH~/g,"#");}Ext.getCmp("XtremIO_password").setValue(a);Ext.getCmp("XtremIO_passwordconfirmpassword").setValue(a);Ext.getCmp("XtremIO_password").backupValue=a;Ext.getCmp("XtremIO_passwordconfirmpassword").backupValue=a;}}},clearXMSIPs:function(a){Ext.getCmp("xmsIP").setValue("");
Ext.getCmp("UsrXMSIP").setValue("");Ext.getCmp("PwdXMSIP").setValue("");Ext.getCmp("ConfPwdXMSIP").setValue("");Ext.getCmp("PwdXMSIP").backupValue="";Ext.getCmp("ConfPwdXMSIP").backupValue="";},updateXMSIPs:function(b){var f=this;var m=f.validateXMSIP();if(m){var h=Ext.getCmp("xmsIP").getValue();var l=Ext.getCmp("UsrXMSIP").getValue();
var k=Ext.getCmp("PwdXMSIP").getValue();var e=Ext.getCmp("SslXMSIP").getValue();var d="";if(e.toLowerCase()=="yes"||e.toLowerCase()=="true"){d="Yes";}else{d="No";}var n=Ext.getCmp("DiscXMSIP").getValue();var c="&ipAdd="+h+"&uname="+encodeURIComponent(l)+"&pass="+encodeURIComponent(k)+"&ssl="+d+"&isDiscovery="+n+"&from=xmsadd";
Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgchangeportspJson.jsp?"+c,method:"POST",async:false,success:function(o){Ext.getCmp("xms_ip").setValue(h);Ext.getCmp("XtremIO_user").setValue(l);Ext.getCmp("XtremIO_password").setValue(k);Ext.getCmp("XtremIO_passwordconfirmpassword").setValue(k);Ext.getCmp("XtremIO_password").backupValue=k;
Ext.getCmp("XtremIO_passwordconfirmpassword").backupValue=k;if(!Ext.isEmpty(e)&&(e.toLowerCase()=="false"||e.toLowerCase()=="no")){Ext.getCmp("ssl1").setValue(true);}else{Ext.getCmp("ssl2").setValue(true);}}});Ext.getCmp("egxmsconfig").destroy();}var g=Ext.getCmp("componentType").getValue();var a=publicJson["testName"];
Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(g)+"&componentType="+encodeURIComponent(g)+"&tName_HelpPage="+a+"&testName="+a,method:"POST"});},validateXMSIP:function(b){var e=this;var h="abcdefghijklmnoprstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~!@#$%^&*()-_+=[]{}|\\:;\"'<>.?/";
var f=Ext.getCmp("xmsIP").getValue();var k=Ext.getCmp("UsrXMSIP").getValue();var g=Ext.getCmp("PwdXMSIP").getValue();var c=Ext.getCmp("ConfPwdXMSIP").getValue();for(var a=0;a<ex_xmsIPStr.length;a++){var d=ex_xmsIPStr[a].trim();if(f==d){Ext.Msg.show({title:alertXMSTitle,msg:existXMSIP,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("xmsIP").focus(true,true);
}});e.clearVcs();return;}}if(!checkblank(f)||f=="None"||f=="none"||f=="other"||f=="Other"){Ext.Msg.show({title:alertXMSTitle,msg:enterXMSIP,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("xmsIP").focus(true,true);}});return;}if(!validateIpOrHNameExt(alertXMSTitle,Ext.getCmp("xmsIP"))){return;
}if(!checkblank(k)){Ext.Msg.show({title:alertXMSTitle,msg:enterUsrId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrXMSIP").focus(true,true);}});return;}else{if(!checkspecialExt(k,"@*+=|:;\"'<>,/[]?")){Ext.Msg.show({title:alertXMSTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrXMSIP").focus(true,true);
}});return;}else{if(!checkHyphenText(k,k)){Ext.getCmp("UsrXMSIP").focus();return;}else{if(trim(k)==""){Ext.getCmp("UsrXMSIP").focus();return;}else{if(k.indexOf("..")>-1){Ext.Msg.show({title:alertXMSTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrXMSIP").focus(true,true);
}});return;}else{if(k.indexOf("  ")>-1){Ext.Msg.show({title:alertXMSTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrXMSIP").focus(true,true);}});return;}}}}}}if(g==""){Ext.Msg.show({title:alertXMSTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("PwdXMSIP").focus(true,true);
}});sub=false;return;}else{if(!checkForPassValidity(g)){Ext.getCmp("PwdXMSIP").focus();sub=false;return;}else{if(c==""){Ext.Msg.show({title:alertXMSTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("ConfPwdXMSIP").focus(true,true);}});sub=false;return;}else{if(g!=c){Ext.Msg.show({title:alertXMSTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("ConfPwdXMSIP").focus(true,true);
}});sub=false;return;}else{return true;}}}}},callXMSIPsDestroy:function(){Ext.getCmp("XtremIO_user").setValue("none");Ext.getCmp("XtremIO_password").setValue("none");Ext.getCmp("XtremIO_passwordconfirmpassword").setValue("none");Ext.getCmp("XtremIO_password").backupValue="none";Ext.getCmp("XtremIO_passwordconfirmpassword").backupValue="none";
},egvcsconfig:function(b){var d=Ext.getCmp(b).getValue();if(d=="Other"){Ext.create("SpecificTestConfiguration.view.EgVcConfig").show();Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egvcconfig",method:"POST",async:false});}else{if(d=="None"){Ext.getCmp("Esx_user").setValue("$unconfigured");
Ext.getCmp("Esx_password").setValue("$unconfigured");Ext.getCmp("Esx_passwordconfirmpassword").setValue("$unconfigured");Ext.getCmp("webPort").setValue("443");Ext.getCmp("Esx_password").backupValue="$unconfigured";Ext.getCmp("Esx_passwordconfirmpassword").backupValue="$unconfigured";}else{var c=publicJson["virtualComboObj"][d];
var e=c.split("#");if(!Ext.isEmpty(c)&&c.indexOf("~#~")!=-1){e=c.split("~#~");}var a=e[2];if(!Ext.isEmpty(a)&&a.indexOf("~HASH~")!=-1){a=a.replace(/~HASH~/g,"#");}Ext.getCmp("Esx_user").setValue(e[1]);Ext.getCmp("Esx_password").setValue(a);Ext.getCmp("Esx_passwordconfirmpassword").setValue(a);Ext.getCmp("webPort").setValue(e[4]);
Ext.getCmp("Esx_password").backupValue=a;Ext.getCmp("Esx_passwordconfirmpassword").backupValue=a;}}},combosslVcs:function(){var a=Ext.getCmp("SslVc").getValue();if(a=="True"){Ext.getCmp("WebPort").setValue(443);}else{Ext.getCmp("WebPort").setValue(80);}},clearVcs:function(a){Ext.getCmp("vCenterIP").setValue("");
Ext.getCmp("UsrVc").setValue("");Ext.getCmp("PwdVc").setValue("");Ext.getCmp("ConfPwdVc").setValue("");Ext.getCmp("PwdVc").backupValue="";Ext.getCmp("ConfPwdVc").backupValue="";},updateVcs:function(e){var b=this;var m=b.validateVc();if(m){var k=Ext.getCmp("vCenterIP").getValue();var s=Ext.getCmp("UsrVc").getValue();
var q=Ext.getCmp("PwdVc").getValue();var l=Ext.getCmp("SslVc").getValue();var f=Ext.getCmp("WebPort").getValue();var h="";if(l=="Yes"){h="True";}else{h="False";}var t=Ext.getCmp("DiscVc").getValue();var o=$("#testConfigForm-body").scrollTop();if(Ext.isEmpty(o)){o=350;}var a=publicJson.selectedCompAgent;
var r=publicJson["isAgentLessComponent"];var g="&ipAdd="+k+"&uname="+encodeURIComponent(s)+"&pass="+encodeURIComponent(q)+"&ssl="+h+"&isDiscovery="+t+"&webport="+f+"&from=add";Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgchangeportspJson.jsp?"+g,method:"POST",params:{"hypervisortype":"vcenter","isAgentLessComponent":r,"selectedCompAgent":a},async:false,success:function(u){if(u.status==200&&!Ext.isEmpty(u.responseText)){var v=u.responseText;
var x=Ext.decode(v);var w=x.selectedAgent;if(!Ext.isEmpty(w)){Ext.getCmp("testConfigForm").add({xtype:"hiddenfield",name:"agentlessSubject",id:"agentlessSubject",value:w,});Ext.getCmp("testConfigForm").body.scrollTo("top",o);}Ext.getCmp("virtual_center").setValue(k);Ext.getCmp("Esx_user").setValue(s);
Ext.getCmp("Esx_password").setValue(q);Ext.getCmp("Esx_passwordconfirmpassword").setValue(q);Ext.getCmp("Esx_password").backupValue=q;Ext.getCmp("Esx_passwordconfirmpassword").backupValue=q;}}});Ext.getCmp("vcconfig").destroy();}var n=Ext.getCmp("componentType").getValue();var d=Ext.getCmp("componentName").getValue();
var c=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(n)+"&componentType="+encodeURIComponent(n)+"&componentName="+encodeURIComponent(d)+"&tName_HelpPage="+c+"&testName="+c,method:"POST"});},validateVc:function(c){var k=this;
var o="abcdefghijklmnoprstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~!@#$%^&*()-_+=[]{}|\\:;\"'<>.?/";var e=Ext.getCmp("vCenterIP").getValue();var s=Ext.getCmp("WebPort").getValue();var r=Ext.getCmp("UsrVc").getValue();var n=Ext.getCmp("PwdVc").getValue();var g=Ext.getCmp("ConfPwdVc").getValue();var b=publicJson.existhyperlist;
var d=publicJson.allCompAccess;var l=new Array();if(!Ext.isEmpty(b)){b=b.split(",");}if(!d){for(var m=0;m<b.length;m++){var f=b[m].trim();if(!Ext.isEmpty(f)&&f.startsWith("vcenter#")){f=f.substring(f.indexOf("#")+1);l.push(f);}}ex_vcStr=l;}for(var a=0;a<ex_vcStr.length;a++){var h=ex_vcStr[a].trim();if(e==h){Ext.Msg.show({title:alertVcTitle,msg:existVc,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("vCenterIP").focus(true,true);
}});k.clearVcs();return;}}if(!checkblank(e)||e=="None"||e=="none"||e=="other"||e=="Other"){Ext.Msg.show({title:alertVcTitle,msg:enterVc,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("vCenterIP").focus(true,true);}});return;}if(!validateIpOrHNameExt(alertVcTitle,Ext.getCmp("vCenterIP"))){return;
}if(!checkblank(r)){Ext.Msg.show({title:alertVcTitle,msg:enterUsrId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrVc").focus(true,true);}});return;}else{if(!checkspecialExt(r,"*+=|:;\"'<>,/[]?")){Ext.Msg.show({title:alertVcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrVc").focus(true,true);
}});return;}else{if(!checkHyphenText(r,r)){Ext.getCmp("UsrVc").focus();return;}else{if(trim(r)==""){Ext.getCmp("UsrVc").focus();return;}else{if(r.indexOf("..")>-1){Ext.Msg.show({title:alertVcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrVc").focus(true,true);
}});return;}else{if(r.indexOf("  ")>-1){Ext.Msg.show({title:alertVcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrVc").focus(true,true);}});return;}}}}}}if(n==""){Ext.Msg.show({title:alertVcTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("PwdVc").focus(true,true);
}});sub=false;return;}else{if(!checkForPassValidity(n)){Ext.getCmp("PwdVc").focus();sub=false;return;}else{if(g==""){Ext.Msg.show({title:alertVcTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("ConfPwdVc").focus(true,true);}});sub=false;return;}else{if(n!=g){Ext.Msg.show({title:alertVcTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("ConfPwdVc").focus(true,true);
}});sub=false;return;}else{if(!checkblank(s)){Ext.Msg.show({title:alertVcTitle,msg:PortBlank,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("WebPort").focus(true,true);}});sub=false;return;}else{if(!checkspace(s)){Ext.getCmp("WebPort").focus();sub=false;return;}else{if(!checkcomma(s)){Ext.Msg.show({title:alertVcTitle,msg:CommaPrt,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("WebPort").focus(true,true);
}});sub=false;return;}else{if(((!checknumber("+",s)&&s.indexOf(",")==-1)||s==0||s.indexOf(".")>-1)&&(s=="NULL")||s.indexOf(",")>-1){Ext.Msg.show({title:alertVcTitle,msg:validPrt,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("WebPort").focus(true,true);}});sub=false;return;}else{if(!checkspecialnomess(s,o)&&(s!="NULL")){Ext.Msg.show({title:alertVcTitle,msg:specialCharacterPrt,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("WebPort").focus(true,true);
}});sub=false;return;}else{return true;}}}}}}}}}},callVcsDestroy:function(){Ext.getCmp("Esx_user").setValue("none");Ext.getCmp("Esx_password").setValue("none");Ext.getCmp("Esx_passwordconfirmpassword").setValue("none");Ext.getCmp("Esx_password").backupValue="none";Ext.getCmp("Esx_passwordconfirmpassword").backupValue="none";
},eghmcsconfig:function(c){var d=Ext.getCmp(c).getValue();if(d=="Other"){Ext.create("SpecificTestConfiguration.view.EgHMCConfig").show();Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=eghmcconfig",method:"POST",async:false});}else{if(d=="None"){var e=publicJson["hmcComboObj"][d];
if(!Ext.isEmpty(e)){var b=e.split("#");var a=b[2];if(!Ext.isEmpty(a)&&a.indexOf("~HASH~")!=-1){a=a.replace(/~HASH~/g,"#");}Ext.getCmp("management_user").setValue(b[1]);Ext.getCmp("management_password").setValue(a);Ext.getCmp("management_passwordconfirmpassword").setValue(a);Ext.getCmp("management_password").backupValue=a;
Ext.getCmp("management_passwordconfirmpassword").backupValue=a;}else{Ext.getCmp("management_user").setValue("$unconfigured");Ext.getCmp("management_password").setValue("$unconfigured");Ext.getCmp("management_passwordconfirmpassword").setValue("$unconfigured");Ext.getCmp("management_password").backupValue="$unconfigured";
Ext.getCmp("management_passwordconfirmpassword").backupValue="$unconfigured";}}else{var e=publicJson["hmcComboObj"][d];var b=e.split("#");if(!Ext.isEmpty(e)&&e.indexOf("~#~")!=-1){b=e.split("~#~");}var a=b[2];if(!Ext.isEmpty(a)&&a.indexOf("~HASH~")!=-1){a=a.replace(/~HASH~/g,"#");}Ext.getCmp("management_user").setValue(b[1]);
Ext.getCmp("management_password").setValue(a);Ext.getCmp("management_passwordconfirmpassword").setValue(a);Ext.getCmp("management_password").backupValue=a;Ext.getCmp("management_passwordconfirmpassword").backupValue=a;}}},clearHmcs:function(a){Ext.getCmp("hmcIP").setValue("");Ext.getCmp("hmcHostName").setValue("");
Ext.getCmp("UsrHmc").setValue("");Ext.getCmp("PwdHmc").setValue("");Ext.getCmp("ConfPwdHmc").setValue("");Ext.getCmp("PwdHmc").backupValue="";Ext.getCmp("ConfPwdHmc").backupValue="";},updateHmcs:function(d){var k=this;var l=k.validateHmc();var a=publicJson.selectedCompAgent;var s=publicJson["isAgentLessComponent"];
var o=$("#testConfigForm-body").scrollTop();if(Ext.isEmpty(o)){o=350;}if(l){var n=Ext.getCmp("hmcIP").getValue();var h=Ext.getCmp("hmcHostName").getValue();var r=Ext.getCmp("UsrHmc").getValue();var q=Ext.getCmp("PwdHmc").getValue();var g=Ext.getCmp("SslHmc").getValue();var f="";if(g=="Yes"){f="True";
}else{f="False";}var t=Ext.getCmp("DiscHmc").getValue();var e="&uname="+encodeURIComponent(r)+"&pass="+encodeURIComponent(q)+"&ssl="+f+"&isDiscovery="+t+"&ipAdd="+n+"&from=hmcAdd&hName="+h;Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgchangeportspJson.jsp?"+e,method:"POST",params:{"hypervisortype":"hmc","isAgentLessComponent":s,"selectedCompAgent":a,},async:false,success:function(u){if(u.status==200&&!Ext.isEmpty(u.responseText)){var v=u.responseText;
var x=Ext.decode(v);var w=x.selectedAgent;if(!Ext.isEmpty(w)){Ext.getCmp("testConfigForm").add({xtype:"hiddenfield",name:"agentlessSubject",id:"agentlessSubject",value:w,});Ext.getCmp("testConfigForm").body.scrollTo("top",o);}Ext.getCmp("management_server").setValue(n);Ext.getCmp("management_user").setValue(r);
Ext.getCmp("management_password").setValue(q);Ext.getCmp("management_passwordconfirmpassword").setValue(q);Ext.getCmp("management_password").backupValue=q;Ext.getCmp("management_passwordconfirmpassword").backupValue=q;}}});Ext.getCmp("hmcconfig").destroy();}var m=Ext.getCmp("componentType").getValue();
var c=Ext.getCmp("componentName").getValue();var b=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(m)+"&componentType="+encodeURIComponent(m)+"&componentName="+encodeURIComponent(c)+"&tName_HelpPage="+b+"&testName="+b,method:"POST"});
},validateHmc:function(d){var k=this;var s="abcdefghijklmnoprstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~!@#$%^&*()-_+=[]{}|\\:;\"'<>.?/";var n=Ext.getCmp("hmcIP").getValue().trim();var b=Ext.getCmp("hmcHostName").getValue().trim();var l=Ext.getCmp("UsrHmc").getValue().trim();var q=Ext.getCmp("PwdHmc").getValue();
var m=Ext.getCmp("ConfPwdHmc").getValue();var c=publicJson.existhyperlist;var e=publicJson.allCompAccess;var g=new Array();if(!Ext.isEmpty(c)){c=c.split(",");}if(!e){for(var o=0;o<c.length;o++){var f=c[o].trim();if(!Ext.isEmpty(f)&&f.startsWith("hmc#")){f=f.substring(f.indexOf("#")+1);g.push(f);}}ex_hmcStr=g;
}for(var a=0;a<ex_hmcStr.length;a++){var h=ex_hmcStr[a].trim();if(n==h){Ext.Msg.show({title:alerthmcTitle,msg:existHmc,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){k.clearHmcs();Ext.getCmp("hmcIP").focus(true);}});return;}}if(n==""){Ext.Msg.show({title:alerthmcTitle,msg:enterHmcIP,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("hmcIP").focus(true);
}});return;}else{if(!validateIp(n)){Ext.getCmp("hmcIP").focus();return;}else{if(b==""){Ext.Msg.show({title:alerthmcTitle,msg:enterHmcHstName,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("hmcHostName").focus(true);}});return;}else{if(!validateIpOrHName(b)){Ext.getCmp("hmcHostName").focus();
return;}else{if(l==""){Ext.Msg.show({title:alerthmcTitle,msg:enterHmcUsr,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrHmc").focus(true);}});return;}else{if(!checkspecial(l,"@*+=|:;\"'<>,/[]?")){Ext.getCmp("UsrHmc").focus();return;}else{if(l.indexOf("..")>-1){Ext.Msg.show({title:alerthmcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrHmc").focus(true);
}});return;}else{if(l.indexOf("  ")>-1){Ext.Msg.show({title:alerthmcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrHmc").focus(true);}});return;}else{if(q==""){Ext.Msg.show({title:alerthmcTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("PwdHmc").focus(true);
}});sub=false;return;}else{if(!checkForPassValidity(q)){Ext.getCmp("PwdHmc").focus();sub=false;return;}else{if(m==""){Ext.Msg.show({title:alerthmcTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("ConfPwdHmc").focus(true);}});sub=false;return;}else{if(q!=m){Ext.Msg.show({title:alerthmcTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("ConfPwdHmc").focus(true);
}});sub=false;return;}else{return true;}}}}}}}}}}}}},callHmcsDestroy:function(){Ext.getCmp("management_user").setValue("none");Ext.getCmp("management_password").setValue("none");Ext.getCmp("management_passwordconfirmpassword").setValue("none");Ext.getCmp("management_password").backupValue="none";Ext.getCmp("management_passwordconfirmpassword").backupValue="none";
},egrhevsconfig:function(e){var d=Ext.getCmp(e).getValue();if(d=="Other"){Ext.create("SpecificTestConfiguration.view.EgRhevConfig").show();Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egrhevconfig",method:"POST",async:false});}else{if(d=="None"){Ext.getCmp("Rhel_mgr_user").setValue("$unconfigured");
Ext.getCmp("Rhel_mgr_password").setValue("$unconfigured");Ext.getCmp("Rhel_mgr_passwordconfirmpassword").setValue("$unconfigured");Ext.getCmp("Rhel_mgr_password").backupValue="$unconfigured";Ext.getCmp("Rhel_mgr_passwordconfirmpassword").backupValue="$unconfigured";Ext.getCmp("Rhel_mgr_domain").setValue("internal");
Ext.getCmp("Rhel_mgr_port").setValue("443");if(Ext.getCmp("Hypervisor_user")!=null||Ext.getCmp("Hypervisor_user")!=undefined){Ext.getCmp("Hypervisor_user").setValue("$unconfigured");Ext.getCmp("Hypervisor_password").setValue("$unconfigured");Ext.getCmp("Hypervisor_passwordconfirmpassword").setValue("$unconfigured");
Ext.getCmp("Hypervisor_password").backupValue="$unconfigured";Ext.getCmp("Hypervisor_passwordconfirmpassword").backupValue="$unconfigured";}}else{var c=publicJson["rhevComboObj"][d];var b=c.split("#");if(!Ext.isEmpty(c)&&c.indexOf("~#~")!=-1){b=c.split("~#~");}Ext.getCmp("Rhel_mgr_user").setValue(b[1]);
var a=b[2];if(!Ext.isEmpty(a)&&a.indexOf("~HASH~")!=-1){a=a.replace(/~HASH~/g,"#");}Ext.getCmp("Rhel_mgr_password").setValue(a);Ext.getCmp("Rhel_mgr_passwordconfirmpassword").setValue(a);Ext.getCmp("Rhel_mgr_port").setValue(b[4]);Ext.getCmp("Rhel_mgr_domain").setValue(b[5]);Ext.getCmp("Rhel_mgr_password").backupValue=a;
Ext.getCmp("Rhel_mgr_passwordconfirmpassword").backupValue=a;}}},combosslrhevs:function(){var a=Ext.getCmp("SslRhev").getValue();if(a=="True"){Ext.getCmp("MgrPort").setValue(8443);}else{Ext.getCmp("MgrPort").setValue(8080);}},clearRhevs:function(a){Ext.getCmp("RhevMgrId").setValue("");Ext.getCmp("UsrRhev").setValue("");
Ext.getCmp("PwdRhev").setValue("");Ext.getCmp("ConfPwdRhev").setValue("");Ext.getCmp("PwdRhev").backupValue="";Ext.getCmp("ConfPwdRhev").backupValue="";Ext.getCmp("DomainRhev").setValue("");},updateRhevs:function(l){var r=this;var t=r.validateRhev();if(t){var g=Ext.getCmp("RhevMgrId").getValue();var c=Ext.getCmp("UsrRhev").getValue();
var a=Ext.getCmp("PwdRhev").getValue();var o=Ext.getCmp("MgrPort").getValue();var m=Ext.getCmp("SslRhev").getValue();var n="";if(m=="Yes"){n="True";}else{n="False";}var b=Ext.getCmp("DiscRhev").getValue();var u=Ext.getCmp("DomainRhev").getValue();var k=publicJson.isAgentLessComponent;var h=publicJson.selectedCompAgent;
var d=$("#testConfigForm-body").scrollTop();if(Ext.isEmpty(d)){d=350;}var s="ipAdd="+g+"&uname="+encodeURIComponent(c)+"&pass="+encodeURIComponent(a)+"&ssl="+n+"&isDiscovery="+b+"&domain="+u+"&from=rhevadd&webport="+o;Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgRHEVdiscoverypJson.jsp?"+s,method:"POST",params:{"hypervisortype":"rhev","isAgentLessComponent":k,"selectedCompAgent":h},async:false,success:function(v){if(v.status==200&&!Ext.isEmpty(v.responseText)){var w=v.responseText;
var y=Ext.decode(w);var x=y.selectedAgent;if(!Ext.isEmpty(x)){Ext.getCmp("testConfigForm").add({xtype:"hiddenfield",name:"agentlessSubject",id:"agentlessSubject",value:x,});Ext.getCmp("testConfigForm").body.scrollTo("top",d);}Ext.getCmp("Rhel_mgr_host").setValue(g);Ext.getCmp("Rhel_mgr_user").setValue(c);
Ext.getCmp("Rhel_mgr_password").setValue(a);Ext.getCmp("Rhel_mgr_passwordconfirmpassword").setValue(a);Ext.getCmp("Rhel_mgr_domain").setValue(u);Ext.getCmp("Rhel_mgr_port").setValue(o);Ext.getCmp("Rhel_mgr_password").backupValue=a;Ext.getCmp("Rhel_mgr_passwordconfirmpassword").backupValue=a;}}});Ext.getCmp("rhevconfig").destroy();
}var e=Ext.getCmp("componentType").getValue();var f=Ext.getCmp("componentName").getValue();var q=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(e)+"&componentType="+encodeURIComponent(e)+"&componentName="+encodeURIComponent(f)+"&tName_HelpPage="+q+"&testName="+q,method:"POST"});
},validateRhev:function(d){var l=this;var r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~!@#$%^&*()-_+=[]{}|\\:;\"'<>.?/";var c=Ext.getCmp("MgrPort").getValue();var s=Ext.getCmp("UsrRhev").getValue();var o=Ext.getCmp("PwdRhev").getValue();var h=Ext.getCmp("ConfPwdRhev").getValue();var e=Ext.getCmp("RhevMgrId").getValue();
var b=publicJson.existhyperlist;var f=publicJson.allCompAccess;var n=new Array();if(!Ext.isEmpty(b)){b=b.split(",");}if(!f){for(var m=0;m<b.length;m++){var g=b[m].trim();if(!Ext.isEmpty(g)&&g.startsWith("rhev#")){g=g.substring(g.indexOf("#")+1);n.push(g);}}ex_rhevStr=n;}for(var a=0;a<ex_rhevStr.length;
a++){var k=ex_rhevStr[a].trim();if(e==k){Ext.Msg.show({title:alertrhevTitle,msg:existRhev,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("RhevMgrId").focus(true);}});l.clearRhevs();return;}}if(!checkblank(e)||e=="None"||e=="none"||e=="other"||e=="Other"){Ext.Msg.show({title:alertrhevTitle,msg:enterRhev,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("RhevMgrId").focus(true);
}});return;}if(!validateIpOrHName(e)){Ext.getCmp("RhevMgrId").focus();return;}if(!checkblank(s)){Ext.Msg.show({title:alertrhevTitle,msg:enterUsrId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrRhev").focus(true);}});return;}else{if(!checkspecial(s,"@*+=|:;\"'<>,/[]?")){Ext.getCmp("UsrRhev").focus();
return;}else{if(!checkHyphenText(s,s)){Ext.getCmp("UsrRhev").focus();return;}else{if(trim(s)==""){Ext.getCmp("UsrRhev").focus();return;}else{if(s.indexOf("..")>-1){Ext.Msg.show({title:alertrhevTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrRhev").focus(true);
}});return;}else{if(s.indexOf("  ")>-1){Ext.Msg.show({title:alertrhevTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("UsrRhev").focus(true);}});return;}}}}}}if(o==""){Ext.Msg.show({title:alertrhevTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("PwdRhev").focus(true);
}});sub=false;return;}else{if(!checkForPassValidity(o)){Ext.getCmp("PwdRhev").focus();sub=false;return;}else{if(h==""){Ext.Msg.show({title:alertrhevTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("ConfPwdRhev").focus(true);}});sub=false;return;}else{if(o!=h){Ext.Msg.show({title:alertrhevTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("ConfPwdRhev").focus(true);
}});sub=false;return;}else{if(!checkblank(c)){Ext.Msg.show({title:alertrhevTitle,msg:PortBlank,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("MgrPort").focus(true);}});sub=false;return;}else{if(!checkspace(c)){Ext.getCmp("MgrPort").focus();sub=false;return;}else{if(!checkcomma(c)){Ext.Msg.show({title:alertrhevTitle,msg:CommaPrt,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("MgrPort").focus(true);
}});sub=false;return;}else{if(((!checknumber("+",c)&&c.indexOf(",")==-1)||c==0||c.indexOf(".")>-1)&&(c=="NULL")||c.indexOf(",")>-1){Ext.Msg.show({title:alertrhevTitle,msg:validPrt,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("MgrPort").focus(true);}});sub=false;return;}else{if(!checkspecialnomess(c,r)&&(c!="NULL")){Ext.Msg.show({title:alertrhevTitle,msg:specialCharacterPrt,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("MgrPort").focus(true);
}});sub=false;return;}else{return true;}}}}}}}}}},callRhevsDestroy:function(){Ext.getCmp("Rhel_mgr_user").setValue("none");Ext.getCmp("Rhel_mgr_password").setValue("none");Ext.getCmp("Rhel_mgr_passwordconfirmpassword").setValue("none");Ext.getCmp("Rhel_mgr_password").backupValue="none";Ext.getCmp("Rhel_mgr_passwordconfirmpassword").backupValue="none";
},EgOidsValue:function(){Ext.create("SpecificTestConfiguration.view.EgOidsValue").show();var g="";inputs=2;isVmg="false";removedOid=[];var d=publicJson["testName"];var e="measure_oid";var b=Ext.getCmp(e).getValue();var a=b.split(",");var f=a.length;if(f>8){f=8;}if(b!=null||b!=undefined){for(var c=0;c<f-1;
c++){addOids();}for(g=1;g<f+1;g++){Ext.getCmp("oidVal"+g).setValue(a[g-1]);}}Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=EgOidsValue",method:"POST",async:false});},ClearOids:function(a){var b=Ext.getCmp("backupcontainer");b.removeAll();Ext.getCmp("addOidbtn").setText("Add");
Ext.getCmp("NoOidPattern").show();if(Ext.getCmp("conoid_1")!=null||Ext.getCmp("conoid_1")!=undefined){isVmg="true";Ext.getCmp("conoid_1").removeAll();Ext.getCmp("conoid_1").hide();}if(Ext.getCmp("con_1")!=null||Ext.getCmp("con_1")!=undefined){isVmg="true";Ext.getCmp("con_1").removeAll();Ext.getCmp("con_1").hide();
}Ext.getCmp("updateOid").disable();Ext.getCmp("clearOid").disable();inputs=1;removedOid=[];},UpdateOids:function(a){var l=9;var b=publicJson["testName"];var g="measure_oid";var f="";for(var c=1;c<l;c++){if(Ext.getCmp("oidVal"+c)==undefined){continue;}var k=Ext.getCmp("oidVal"+c).getValue();if(k==undefined){continue;
}if(k!=null){if(!checkDomain(k,"true")){Ext.getCmp("oidVal"+c).focus(true);return;}else{if(k.indexOf(",")>-1){Ext.Msg.show({title:alertTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("oidVal"+c).focus(true);}});return;}else{if(k.indexOf("..")>-1){Ext.Msg.show({title:alertTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("oidVal"+c).focus(true);
}});return;}else{if(!checkHyphenText(k,k)){Ext.getCmp("oidVal"+c).focus();return;}else{if(!checkspecialnomess(k,"`~!@#$%^&*()+=-/?'\"]}[{\\|;:,><")){Ext.Msg.show({title:alertTitle,msg:infosalert_2,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("oidVal"+c).focus(true);}});return;}else{if(checkAlpha(k)){Ext.Msg.show({title:alertTitle,msg:infosalert_5,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(m){if(m=="ok"){Ext.getCmp("oidVal"+c).OidObj.focus(true);
}}});return;}}}}}}var d=Ext.getCmp(g).getValue();var e=Ext.getCmp("oidVal"+c).getValue();f+=e+",";}}f=f.substring(0,f.length-1);Ext.getCmp(g).setValue(f);Ext.getCmp(g).setReadOnly(true);Ext.getCmp("EgOidsValue").destroy();var h=Ext.getCmp("componentType").getValue();Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+h+"&componentType="+h+"&tName_HelpPage="+b+"&testName="+b,method:"POST"});
},vmgusers:function(){Ext.create("SpecificTestConfiguration.view.VmgUsers").show();inputs=0;inputsVmg=0;var e=publicJson["pwdParamSetList"];var a=false;var n="";var d="";if(!Ext.isEmpty(e)){for(var q in e){if(e.hasOwnProperty(q)){var m=e[q];if(m=="domain,admin_user,admin_password"){n=q;a=true;break;}}}if(a){d=Ext.getCmp(n);
}}var f=Ext.getCmp("domain").getValue();var r=Ext.getCmp("admin_user").getValue();var l=Ext.getCmp("admin_password").getValue();var c=f.split(",");var o=r.split(",");var b=l.split("#~#");if(f!=null||f!=undefined){for(var g=0;g<c.length;g++){addContact();}for(var h=0;h<c.length;h++){if(!Ext.isEmpty(d)&&d.getValue().toLowerCase()!="none"){Ext.getCmp("domainvmg"+h).setValue(c[h]).setReadOnly(true);
Ext.getCmp("admusrvmg"+h).setValue(o[h]).setReadOnly(true);Ext.getCmp("admpwdvmg"+h).setValue(b[h]).setReadOnly(true);Ext.getCmp("confpwdvmg"+h).setValue(b[h]).setReadOnly(true);Ext.getCmp("addVmgUsrbtn").hide();Ext.getCmp("updateConfUsr").hide();Ext.getCmp("clearConfUsr").hide();Ext.getCmp("removevmg"+h).hide();
}else{Ext.getCmp("domainvmg"+h).setValue(c[h]);Ext.getCmp("admusrvmg"+h).setValue(o[h]);Ext.getCmp("admpwdvmg"+h).setValue(b[h]);Ext.getCmp("confpwdvmg"+h).setValue(b[h]);Ext.getCmp("admpwdvmg"+h).backupValue=b[h];Ext.getCmp("confpwdvmg"+h).backupValue=b[h];}}}Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=vmgusers",method:"POST",async:false});
},ClearConfigUsr:function(a){var b=Ext.getCmp("backupcontainer");b.removeAll();inputs=0;inputsVmg=0;addContact();var c="$unconfigured";if(insideView=="tcp"){c="none";}Ext.getCmp("domainvmg"+(inputs-1)).setValue(c);Ext.getCmp("admusrvmg"+(inputs-1)).setValue(c);Ext.getCmp("admpwdvmg"+(inputs-1)).setValue(c);
Ext.getCmp("confpwdvmg"+(inputs-1)).setValue(c);Ext.getCmp("admpwdvmg"+(inputs-1)).backupValue=c;Ext.getCmp("confpwdvmg"+(inputs-1)).backupValue=c;},UpdateConfigUsr:function(l){var d=inputs;var t=[];var f=[];for(var y=0;y<d;y++){if(Ext.getCmp("domainvmg"+y)==undefined){continue;}var D=Ext.getCmp("domainvmg"+y).getValue();
var e=Ext.getCmp("admusrvmg"+y).getValue();var b=Ext.getCmp("admpwdvmg"+y).getValue();var B=Ext.getCmp("confpwdvmg"+y).getValue();t.push(D);f.push(e);if(!checkblank(D)){Ext.Msg.show({title:alertTitle,msg:enterDomain,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainvmg"+y).focus(true);
}});return;}if(!checkDomain(D,"true")){Ext.getCmp("domainvmg"+y).focus(true);return;}else{if(D.indexOf(",")>-1){Ext.Msg.show({title:alertTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainvmg"+y).focus(true);}});return;}else{if(!checkHyphenText(D,D)){Ext.getCmp("domainvmg"+y).focus();
return;}else{if(D.indexOf("..")>-1){Ext.Msg.show({title:alertTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainvmg"+y).focus(true);}});return;}}}}if(!checkblank(e)){Ext.Msg.show({title:alertTitle,msg:enterUsrId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("admusrvmg"+y).focus(true);
}});return;}else{if(e.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("admusrvmg"+y).focus(true);}});return;}else{if(!checkspecialExt(e,'@*+=|:;"<>/[]?,')){Ext.Msg.show({title:alertTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("admusrvmg"+y).focus(true,true);
}});return;}else{if(trim(e)==""){Ext.getCmp("admusrvmg"+y).focus();return;}else{if(!checkHyphenText(e,e)){Ext.getCmp("admusrvmg"+y).focus();return;}else{if(e.indexOf("..")>-1){Ext.Msg.show({title:alertTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("admusrvmg"+y).focus(true);
}});return;}else{if(e.indexOf("  ")>-1){Ext.Msg.show({title:alertTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("admusrvmg"+y).focus(true);}});return;}}}}}}}if(b==""){Ext.Msg.show({title:alertTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("admpwdvmg"+y).focus(true);
}});sub=false;return;}else{if(b.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("admpwdvmg"+y).focus(true);}});return;}else{if(b.indexOf("#~#")>-1){Ext.Msg.show({title:alertTitle,msg:_checkHashTildeHash,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("admpwdvmg"+y).focus(true);
}});sub=false;return;}else{if(!checkForPassValidity(b)){Ext.getCmp("admpwdvmg"+y).focus();sub=false;return;}else{if(B==""){Ext.Msg.show({title:alertTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdvmg"+y).focus(true);}});sub=false;return;}else{if(B.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdvmg"+y).focus(true);
}});return;}else{if(b!=B){Ext.Msg.show({title:alertTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdvmg"+y).focus(true);}});sub=false;return;}}}}}}}}var u="";var z="";var a="";for(var w=0;w<d;w++){if(Ext.getCmp("domainvmg"+w)==undefined){continue;}var A=Ext.getCmp("domainvmg"+w).getValue();
if(A==undefined){continue;}if(A!=null){if(!checkDomain(A,"true")){Ext.getCmp("domainvmg"+w).focus(true);return;}else{if(A.indexOf(",")>-1){Ext.Msg.show({title:alertTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainvmg"+w).focus(true);}});return;}else{if(A.indexOf("..")>-1){Ext.Msg.show({title:alertTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainvmg"+w).focus(true);
}});return;}else{if(!checkHyphenText(A,A)){Ext.getCmp("domainvmg"+w).focus();return;}}}}}var v=Ext.getCmp("admusrvmg"+w).getValue();if(v!=null){if(!checkblank(v)){Ext.Msg.show({title:alertTitle,msg:enterUsrId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("admusrvmg"+w).focus(true);
}});return;}else{if(v.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("admusrvmg"+w).focus(true);}});return;}else{if(!checkspecialExt(v,'@*+=|:;"<>/[]?,')){Ext.Msg.show({title:alertTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("admusrvmg"+w).focus(true);
}});return;}else{if(trim(v)==""){Ext.getCmp("admusrvmg"+w).focus();return;}else{if(v.indexOf("..")>-1){Ext.Msg.show({title:alertTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("admusrvmg"+w).focus(true);}});return;}else{if(v.indexOf("  ")>-1){Ext.Msg.show({title:alertTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("admusrvmg"+w).focus(true);
}});return;}else{if(!checkHyphenText(v,v)){Ext.getCmp("admusrvmg"+w).focus();return;}}}}}}}}var C=Ext.getCmp("admpwdvmg"+w).getValue();var h=Ext.getCmp("confpwdvmg"+w).getValue();if(C!=null&&h!=null){if(C==""){Ext.Msg.show({title:alertTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("admpwdvmg"+w).focus(true);
}});return;}else{if(C.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("admpwdvmg"+w).focus(true);}});return;}else{if(C.indexOf("#~#")>-1){Ext.Msg.show({title:alertTitle,msg:_checkHashTildeHash,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("admpwdvmg"+w).focus(true);
}});sub=false;return;}else{if(!checkForPassValidity(C)){Ext.getCmp("admpwdvmg"+w).focus();sub=false;return;}else{if(h==""){Ext.Msg.show({title:alertTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdvmg"+w).focus(true);}});return;}else{if(h.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdvmg"+w).focus(true);
}});return;}else{if(C!=h){Ext.Msg.show({title:alertTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdvmg"+w).focus(true);}});return;}}}}}}}}if(A!=null&&v!=null&&C!=null&&h!=null){var q=Ext.getCmp("domain").getValue();var k=Ext.getCmp("admin_user").getValue();
var c=Ext.getCmp("admin_password").getValue();var s=Ext.getCmp("domainvmg"+w).getValue();u+=s+",";var r=Ext.getCmp("admusrvmg"+w).getValue();z+=r+",";var o=Ext.getCmp("admpwdvmg"+w).getValue();a+=o+"#~#";}}u=u.substring(0,u.length-1);Ext.getCmp("domain").setValue(u);z=z.substring(0,z.length-1);Ext.getCmp("admin_user").setValue(z);
a=a.substring(0,a.length-3);Ext.getCmp("admin_password").setValue(a);Ext.getCmp("admin_password").backupValue=a;if(Ext.getCmp("Admincpwd")!=null&&Ext.getCmp("Admincpwd")!=undefined){Ext.getCmp("Admincpwd").setValue(a);Ext.getCmp("Admincpwd").backupValue=a;Ext.getCmp("Admincpwd").setReadOnly(true);}if(Ext.getCmp("admin_passwordconfirmpassword")!=null&&Ext.getCmp("admin_passwordconfirmpassword")!=undefined){Ext.getCmp("admin_passwordconfirmpassword").setValue(a);
Ext.getCmp("admin_passwordconfirmpassword").setReadOnly(true);Ext.getCmp("admin_passwordconfirmpassword").backupValue=a;}Ext.getCmp("domain").setReadOnly(true);Ext.getCmp("admin_user").setReadOnly(true);Ext.getCmp("admin_password").setReadOnly(true);Ext.getCmp("vmgusers").destroy();var g=Ext.getCmp("componentType").getValue();
var x=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(g)+"&componentType="+encodeURIComponent(g)+"&tName_HelpPage="+x+"&testName="+x,method:"POST"});},interConfigMultiSource:function(d){Ext.create("SpecificTestConfiguration.view.EgConfigurePublishedResources").show();
var c="";inputsmultisrc=2;ismultisrc="false";var n="";var t=Ext.getCmp("hiddenPublishedResource").getValue();var b=Ext.getCmp("Domain").getValue();var v=Ext.getCmp("Disclaimer").getValue();var g=Ext.getCmp("Two_factor_auth_password").getValue();var e=Ext.getCmp("Username").getValue();var f=Ext.getCmp("Password").getValue();
if(!Ext.isEmpty(t)){n=t;}var l=n.split("|");var h=g.split("#~#");var q=b.split(",");var u=v.split(",");var o=e.split(",");var s=f.split("#~#");if(b!=null||b!=undefined){for(var r=0;r<q.length-1;r++){addMultiSourceContact();}for(c=1;c<q.length+1;c++){if(!Ext.isEmpty(l[c-1])&&l[c-1].indexOf("~#~")!=-1){l[c-1]=l[c-1].replace(/~#~/g,",");
}var m=h[c-1];var a=u[c-1];if(!Ext.isEmpty(m)&&(m!="FF6EBC35F4F93E0C1057BBC2E53B1DF3"&&m.toLowerCase()!="none")){Ext.getCmp("twofactlabel"+c+"_1").setValue(true);Ext.getCmp("twofacttoken"+c).setVisible(true);Ext.getCmp("twofacttoken"+c).setValue(m);Ext.getCmp("twofacttoken"+c).backupValue=m;}Ext.getCmp("publisresource"+c).setValue(l[c-1]);
if(!Ext.isEmpty(a)){if(a.toLowerCase()=="true"){Ext.getCmp("disclaimermultiusr"+c+"_1").setValue(true);}else{Ext.getCmp("disclaimermultiusr"+c+"_2").setValue(true);}}Ext.getCmp("domainmultiusr"+c).setValue(q[c-1]);Ext.getCmp("usermultiusr"+c).setValue(o[c-1]);Ext.getCmp("pwdmultiusr"+c).setValue(s[c-1]);
Ext.getCmp("confpwdmultiusr"+c).setValue(s[c-1]);Ext.getCmp("pwdmultiusr"+c).backupValue=s[c-1];Ext.getCmp("confpwdmultiusr"+c).backupValue=s[c-1];}}Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egconfiguremultipleusers",method:"POST",async:false});},interMultiSourceClr:function(a){var b=Ext.getCmp("backupmulticontainer");
b.removeAll();Ext.getCmp("addMultiSrcbtn").setText("Add");Ext.getCmp("NoMultiUsrPattern").show();if(Ext.getCmp("conmulti_1")!=null||Ext.getCmp("conmulti_1")!=undefined){ismultisrc="true";Ext.getCmp("conmulti_1").removeAll();Ext.getCmp("conmulti_1").hide();}Ext.getCmp("updateMultiConfSrc").disable();Ext.getCmp("clearMultiConfSrc").disable();
},interMultiSourceUpdate:function(F){var K=inputsmultisrc;for(var d=1;d<K-1;d++){if(Ext.getCmp("domainmultiusr"+d)==undefined){continue;}var R=Ext.getCmp("publisresource"+d).getValue();var S=Ext.getCmp("twofacttoken"+d).getValue();var r=Ext.getCmp("domainmultiusr"+d).getValue();var n=Ext.getCmp("usermultiusr"+d).getValue();
var b=Ext.getCmp("pwdmultiusr"+d).getValue();var Y=Ext.getCmp("confpwdmultiusr"+d).getValue();var V=Ext.getCmp("twofact"+d).getChecked()[0];var T=V.getGroupValue();if(!checkblank(R)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterPubRsrc,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);
}});return;}else{if(R.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);}});return;}else{if(!checkspecialExt(R,"`*=#.|;\"'<>/[]?")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);
}});return;}else{if(trim(R)==""){Ext.getCmp("publisresource"+d).focus();return;}else{if(R.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);}});return;}else{if(R.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);
}});return;}else{if(R.indexOf(":")>-1){var A=R;if(A.indexOf(",")!=-1){var X=A.split(",");for(var L=0;L<X.length;L++){var m=X[L];if(m.charAt(0)==":"||m.charAt(m.length-1)==":"){Ext.Msg.show({title:pageName,msg:"Published resource should not start or end with a colon",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);
}});return;}else{var G=new Array();for(var P=0;P<m.length;P++){if(m.charAt(P)==":"){G.push(P);}if(m.charAt(P)==":"&&m.charAt(P+1)==":"){Ext.Msg.show({title:pageName,msg:"Cannot have ':' in consecutive positions",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);
}});G=new Array();return;}else{continue;}}if(G.length>1){Ext.Msg.show({title:pageName,msg:"Please enter the application/desktop name in this format ApplicationOrDesktop[:WindowTitle]",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);}});G=new Array();
return;}}}}else{if(A.charAt(0)==":"||A.charAt(A.length-1)==":"){Ext.Msg.show({title:pageName,msg:"Published resource should not start or end with a colon",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);}});return;}else{var G=new Array();for(var P=0;
P<A.length;P++){if(A.charAt(P)==":"){G.push(P);}if(A.charAt(P)==":"&&A.charAt(P+1)==":"){Ext.Msg.show({title:pageName,msg:"Cannot have ':' in consecutive positions",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);}});G=new Array();return;}else{continue;
}}if(G.length>1){Ext.Msg.show({title:pageName,msg:"Please enter the application/desktop name in this format ApplicationOrDesktop[:WindowTitle]",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+d).focus(true,true);}});G=new Array();return;}}}}}}}}}}if(T=="true"){if(!checkblank(S)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enter2FAToken,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+d).focus(true,true);
}});return;}else{if(S.indexOf(",")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+d).focus(true,true);}});return;}else{if(S.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+d).focus(true,true);
}});return;}else{if(!checkspecialExt(S,"|")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+d).focus(true,true);}});return;}}}}}else{S="none";}if(!checkblank(r)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterDomain,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+d).focus(true,true);
}});return;}if(!checkDomain(r,"true")){Ext.getCmp("domainmultiusr"+d).focus(true,true);return;}else{if(r.indexOf(",")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+d).focus(true,true);}});return;}else{if(!checkHyphenText(r,r)){Ext.getCmp("domainmultiusr"+d).focus();
return;}else{if(r.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+d).focus(true,true);}});return;}}}}if(!checkblank(n)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterUsrId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+d).focus(true,true);
}});return;}else{if(n.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+d).focus(true,true);}});return;}else{if(!checkspecialExt(n,"*+=|:;\"'<>/[]?,")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+d).focus(true,true);
}});return;}else{if(trim(n)==""){Ext.getCmp("usermultiusr"+d).focus();return;}else{if(!checkHyphenText(n,n)){Ext.getCmp("usermultiusr"+d).focus();return;}else{if(n.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+d).focus(true,true);
}});return;}else{if(n.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+d).focus(true,true);}});return;}}}}}}}if(b==""){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+d).focus(true,true);
}});sub=false;return;}else{if(b.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+d).focus(true,true);}});return;}else{if(b.indexOf("#~#")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkHashTildeHash,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+d).focus(true,true);
}});sub=false;return;}else{if(!checkForPassValidity(b)){Ext.getCmp("pwdmultiusr"+d).focus();sub=false;return;}else{if(Y==""){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+d).focus(true,true);}});sub=false;return;
}else{if(Y.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+d).focus(true,true);}});return;}else{if(b!=Y){Ext.Msg.show({title:alertMsgSrcTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+d).focus(true,true);
}});sub=false;return;}}}}}}}}var g="";var M="";var D="";var N="";var I="";var H="";var U="";for(var o=1;o<K;o++){if(Ext.getCmp("domainmultiusr"+o)==undefined){continue;}var h=Ext.getCmp("publisresource"+o).getValue();if(h!=null){if(!checkblank(h)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterPubRsrc,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+o).focus(true,true);
}});return;}else{if(h.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+o).focus(true,true);}});return;}else{if(!checkspecialExt(h,"`*=#.|;\"'<>/[]?")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+o).focus(true,true);
}});return;}else{if(trim(h)==""){Ext.getCmp("publisresource"+o).focus();return;}else{if(h.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+o).focus(true,true);}});return;}else{if(h.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+o).focus(true,true);
}});return;}else{if(h.indexOf(":")>-1){var A=h;if(A.indexOf(",")!=-1){var X=A.split(",");for(var L=0;L<X.length;L++){var m=X[L];if(m.charAt(0)==":"||m.charAt(m.length-1)==":"){Ext.Msg.show({title:pageName,msg:"Published resource should not start or end with a colon",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+o).focus(true,true);
}});return;}else{var G=new Array();for(var P=0;P<m.length;P++){if(m.charAt(P)==":"){G.push(P);}if(m.charAt(P)==":"&&m.charAt(P+1)==":"){Ext.Msg.show({title:pageName,msg:"Cannot have ':' in consecutive positions",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+o).focus(true,true);
}});G=new Array();return;}else{continue;}}if(G.length>1){Ext.Msg.show({title:pageName,msg:"Please enter the application/desktop name in this format ApplicationOrDesktop[:WindowTitle]",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+o).focus(true,true);}});G=new Array();
return;}}}}else{if(A.charAt(0)==":"||A.charAt(A.length-1)==":"){Ext.Msg.show({title:pageName,msg:"Published resource should not start or end with a colon",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+o).focus(true,true);}});return;}else{var G=new Array();for(var P=0;
P<A.length;P++){if(A.charAt(P)==":"){G.push(P);}if(A.charAt(P)==":"&&A.charAt(P+1)==":"){Ext.Msg.show({title:pageName,msg:"Cannot have ':' in consecutive positions",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+o).focus(true,true);}});G=new Array();return;}else{continue;
}}if(G.length>1){Ext.Msg.show({title:pageName,msg:"Please enter the application/desktop name in this format ApplicationOrDesktop[:WindowTitle]",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+o).focus(true,true);}});G=new Array();return;}}}}}}}}}}}var s=Ext.getCmp("disclaimermultiusr"+o+"_1").getValue();
if(s==null){continue;}var C=Ext.getCmp("domainmultiusr"+o).getValue();if(C==null){continue;}if(C!=null){if(!checkDomain(C,"true")){Ext.getCmp("domainmultiusr"+o).focus(true,true);return;}else{if(C.indexOf(",")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+o).focus(true,true);
}});return;}else{if(C.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+o).focus(true,true);}});return;}else{if(!checkHyphenText(C,C)){Ext.getCmp("domainmultiusr"+o).focus();return;}}}}}var e=Ext.getCmp("twofacttoken"+o).getValue();
var u=Ext.getCmp("twofact"+o).getChecked()[0];var t=u.getGroupValue();if(e==null){continue;}if(e!=null){if(t=="true"){if(!checkblank(e)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enter2FAToken,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+o).focus(true,true);}});return;
}else{if(e.indexOf(",")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+o).focus(true,true);}});return;}else{if(e.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+o).focus(true,true);
}});return;}else{if(!checkspecialExt(e,"|")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+o).focus(true,true);}});return;}}}}}else{e="none";}}var y=Ext.getCmp("usermultiusr"+o).getValue();if(y!=null){if(!checkblank(y)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterUsrId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+o).focus(true,true);
}});return;}else{if(y.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+o).focus(true,true);}});return;}else{if(!checkspecialExt(y,"*+=|:;\"'<>/[]?,")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+o).focus(true,true);
}});return;}else{if(trim(y)==""){Ext.getCmp("usermultiusr"+o).focus();return;}else{if(y.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+o).focus(true,true);}});return;}else{if(y.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+o).focus(true,true);
}});return;}else{if(!checkHyphenText(y,y)){Ext.getCmp("usermultiusr"+o).focus();return;}}}}}}}}var a=Ext.getCmp("pwdmultiusr"+o).getValue();var c=Ext.getCmp("confpwdmultiusr"+o).getValue();if(a!=null&&c!=null){if(a==""){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+o).focus(true,true);
}});return;}else{if(a.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+o).focus(true,true);}});return;}else{if(a.indexOf("#~#")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkHashTildeHash,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+o).focus(true,true);
}});sub=false;return;}else{if(!checkForPassValidity(a)){Ext.getCmp("pwdmultiusr"+o).focus();sub=false;return;}else{if(c==""){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+o).focus(true,true);}});return;}else{if(c.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+o).focus(true,true);
}});return;}else{if(a!=c){Ext.Msg.show({title:alertMsgSrcTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+o).focus(true,true);}});return;}}}}}}}}if(g!=null&&e!=null&&C!=null&&s!=null&&y!=null&&a!=null&&c!=null){var f=Ext.getCmp("domainmultiusr"+o).getValue();
D+=f+",";var W=Ext.getCmp("disclaimermultiusr"+o+"_1").getValue();var J="false";if(W){J="true";}N+=J+",";var B=Ext.getCmp("twofacttoken"+o).getValue();var E=Ext.getCmp("twofact"+o).getChecked()[0];var x=E.getGroupValue();if(x=="false"){B="none";}I+=B+"#~#";var Q=Ext.getCmp("publisresource"+o).getValue();
var O=Q;if(!Ext.isEmpty(O)&&O.indexOf(",")!=-1){O=O.replace(/,/g,"~#~");}g+=Q+",";M+=O+"|";var q=Ext.getCmp("usermultiusr"+o).getValue();H+=q+",";var w=Ext.getCmp("pwdmultiusr"+o).getValue();U+=w+"#~#";}}g=g.substring(0,g.length-1);Ext.getCmp("Published_resources").setValue(g);M=M.substring(0,M.length-1);
Ext.getCmp("hiddenPublishedResource").setValue(M);I=I.substring(0,I.length-3);Ext.getCmp("Two_factor_auth_password").setValue(I);Ext.getCmp("Two_factor_auth_password").backupValue=I;D=D.substring(0,D.length-1);Ext.getCmp("Domain").setValue(D);N=N.substring(0,N.length-1);Ext.getCmp("Disclaimer").setValue(N);
H=H.substring(0,H.length-1);Ext.getCmp("Username").setValue(H);U=U.substring(0,U.length-3);Ext.getCmp("Password").setValue(U);Ext.getCmp("Password").backupValue=U;if(Ext.getCmp("cpwd")!=null&&Ext.getCmp("cpwd")!=undefined){Ext.getCmp("cpwd").setValue(U);Ext.getCmp("cpwd").backupValue=U;Ext.getCmp("cpwd").setReadOnly(true);
}if(Ext.getCmp("Passwordconfirmpassword")!=null&&Ext.getCmp("Passwordconfirmpassword")!=undefined){Ext.getCmp("Passwordconfirmpassword").setValue(U);Ext.getCmp("Passwordconfirmpassword").backupValue=U;Ext.getCmp("Passwordconfirmpassword").setReadOnly(true);}Ext.getCmp("Published_resources").setReadOnly(true);
Ext.getCmp("Two_factor_auth_password").setReadOnly(true);Ext.getCmp("Two_factor_auth_password").hide();Ext.getCmp("Domain").setReadOnly(true);Ext.getCmp("Domain").hide();Ext.getCmp("Disclaimer").setReadOnly(true);Ext.getCmp("Disclaimer").hide();Ext.getCmp("Username").setReadOnly(true);Ext.getCmp("Username").hide();
Ext.getCmp("Password").setReadOnly(true);Ext.getCmp("Password").hide();Ext.getCmp("egconfigurepublishedresources").destroy();var l=Ext.getCmp("componentType").getValue();var z=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(l)+"&componentType="+encodeURIComponent(l)+"&tName_HelpPage="+z+"&testName="+z,method:"POST"});
},configMultiUser:function(a){Ext.create("SpecificTestConfiguration.view.EgConfigureMultipleUsers").show();var l="";inputsmulti=2;ismulti="false";var h=Ext.getCmp("domain").getValue();var g=Ext.getCmp("user").getValue();var d=Ext.getCmp("password").getValue();var e=h.split(",");var f=g.split(",");var b=d.split("#~#");
if(h!=null||h!=undefined){for(var c=0;c<e.length-1;c++){addMultiUsrContact();}for(l=1;l<e.length+1;l++){Ext.getCmp("domainmultiusr"+l).setValue(e[l-1]);Ext.getCmp("usermultiusr"+l).setValue(f[l-1]);Ext.getCmp("pwdmultiusr"+l).setValue(b[l-1]);Ext.getCmp("confpwdmultiusr"+l).setValue(b[l-1]);Ext.getCmp("pwdmultiusr"+l).backupValue=b[l-1];
Ext.getCmp("confpwdmultiusr"+l).backupValue=b[l-1];}}Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egconfiguremultipleusers",method:"POST",async:false});},ClearMultiConfigUsr:function(a){var b=Ext.getCmp("backupmulticontainer");b.removeAll();Ext.getCmp("addMultiUsrbtn").setText("Add");
Ext.getCmp("NoMultiUsrPattern").show();if(Ext.getCmp("conmulti_1")!=null||Ext.getCmp("conmulti_1")!=undefined){ismulti="true";Ext.getCmp("conmulti_1").removeAll();Ext.getCmp("conmulti_1").hide();}Ext.getCmp("updateMultiConfUsr").disable();Ext.getCmp("clearMultiConfUsr").disable();},UpdateMultiConfigUsr:function(k){var a=inputsmulti;
for(var o=1;o<a-1;o++){if(Ext.getCmp("domainmultiusr"+o)==undefined){continue;}var w=Ext.getCmp("domainmultiusr"+o).getValue();var d=Ext.getCmp("usermultiusr"+o).getValue();var b=Ext.getCmp("pwdmultiusr"+o).getValue();var u=Ext.getCmp("confpwdmultiusr"+o).getValue();if(!checkblank(w)){Ext.Msg.show({title:alertTitle,msg:enterDomain,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+o).focus(true);
}});return;}if(!checkDomain(w,"true")){Ext.getCmp("domainmultiusr"+o).focus(true);return;}else{if(w.indexOf(",")>-1){Ext.Msg.show({title:alertTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+o).focus(true);}});return;}else{if(!checkHyphenText(w,w)){Ext.getCmp("domainmultiusr"+o).focus();
return;}else{if(w.indexOf("..")>-1){Ext.Msg.show({title:alertTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+o).focus(true);}});return;}}}}if(!checkblank(d)){Ext.Msg.show({title:alertTitle,msg:enterUsrId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+o).focus(true);
}});return;}else{if(d.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+o).focus(true);}});return;}else{if(!checkspecial(d,"@*+=|:;\"'<>/[]?,")){Ext.getCmp("usermultiusr"+o).focus();return;
}else{if(trim(d)==""){Ext.getCmp("usermultiusr"+o).focus();return;}else{if(!checkHyphenText(d,d)){Ext.getCmp("usermultiusr"+o).focus();return;}else{if(d.indexOf("..")>-1){Ext.Msg.show({title:alertTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+o).focus(true);
}});return;}else{if(d.indexOf("  ")>-1){Ext.Msg.show({title:alertTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+o).focus(true);}});return;}}}}}}}if(b==""){Ext.Msg.show({title:alertTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+o).focus(true);
}});sub=false;return;}else{if(b.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+o).focus(true);}});return;}else{if(!checkspecialnomess(b,"|")){Ext.Msg.show({title:alertTitle,msg:PwdNotContainPipe,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+o).focus(true);
}});sub=false;return;}else{if(b.indexOf("#~#")>-1){Ext.Msg.show({title:alertTitle,msg:_checkHashTildeHash,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+o).focus(true);}});sub=false;return;}else{if(!checkForPassValidity(b)){Ext.getCmp("pwdmultiusr"+o).focus();sub=false;
return;}else{if(u==""){Ext.Msg.show({title:alertTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+o).focus(true);}});sub=false;return;}else{if(u.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+o).focus(true);
}});return;}else{if(b!=u){Ext.Msg.show({title:alertTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+o).focus(true);}});sub=false;return;}}}}}}}}}var l="";var t="";var q="";for(var c=1;c<a;c++){if(Ext.getCmp("domainmultiusr"+c)==undefined){continue;
}var r=Ext.getCmp("domainmultiusr"+c).getValue();if(r==null){continue;}if(r!=null){if(!checkDomain(r,"true")){Ext.getCmp("domainmultiusr"+c).focus(true);return;}else{if(r.indexOf(",")>-1){Ext.Msg.show({title:alertTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+c).focus(true);
}});return;}else{if(r.indexOf("..")>-1){Ext.Msg.show({title:alertTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+c).focus(true);}});return;}else{if(!checkHyphenText(r,r)){Ext.getCmp("domainmultiusr"+c).focus();return;}}}}}var m=Ext.getCmp("usermultiusr"+c).getValue();
if(m!=null){if(!checkblank(m)){Ext.Msg.show({title:alertTitle,msg:enterUsrId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+c).focus(true);}});return;}else{if(m.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+c).focus(true);
}});return;}else{if(!checkspecial(m,"@*+=|:;\"'<>/[]?,")){Ext.getCmp("usermultiusr"+c).focus();return;}else{if(trim(m)==""){Ext.getCmp("usermultiusr"+c).focus();return;}else{if(m.indexOf("..")>-1){Ext.Msg.show({title:alertTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+c).focus(true);
}});return;}else{if(m.indexOf("  ")>-1){Ext.Msg.show({title:alertTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+c).focus(true);}});return;}else{if(!checkHyphenText(m,m)){Ext.getCmp("usermultiusr"+c).focus();return;}}}}}}}}var v=Ext.getCmp("pwdmultiusr"+c).getValue();
var g=Ext.getCmp("confpwdmultiusr"+c).getValue();if(v!=null&&g!=null){if(v==""){Ext.Msg.show({title:alertTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+c).focus(true);}});return;}else{if(v.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+c).focus(true);
}});return;}else{if(!checkspecialnomess(v,"|")){Ext.Msg.show({title:alertTitle,msg:PwdNotContainPipe,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+c).focus(true);}});sub=false;return;}else{if(v.indexOf("#~#")>-1){Ext.Msg.show({title:alertTitle,msg:_checkHashTildeHash,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+c).focus(true);
}});sub=false;return;}else{if(!checkForPassValidity(v)){Ext.getCmp("pwdmultiusr"+c).focus();sub=false;return;}else{if(g==""){Ext.Msg.show({title:alertTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+c).focus(true);}});return;}else{if(g.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+c).focus(true);
}});return;}else{if(v!=g){Ext.Msg.show({title:alertTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+c).focus(true);}});return;}}}}}}}}}if(r!=null&&m!=null&&v!=null&&g!=null){var h=Ext.getCmp("domainmultiusr"+c).getValue();l+=h+",";var s=Ext.getCmp("usermultiusr"+c).getValue();
t+=s+",";var e=Ext.getCmp("pwdmultiusr"+c).getValue();q+=e+"#~#";}}l=l.substring(0,l.length-1);Ext.getCmp("domain").setValue(l);t=t.substring(0,t.length-1);Ext.getCmp("user").setValue(t);q=q.substring(0,q.length-3);Ext.getCmp("password").setValue(q);Ext.getCmp("password").backupValue=q;if(Ext.getCmp("cpwd")!=null&&Ext.getCmp("cpwd")!=undefined){Ext.getCmp("cpwd").setValue(q);
Ext.getCmp("cpwd").backupValue=q;Ext.getCmp("cpwd").setReadOnly(true);}if(Ext.getCmp("passwordconfirmpassword")!=null&&Ext.getCmp("passwordconfirmpassword")!=undefined){Ext.getCmp("passwordconfirmpassword").setValue(q);Ext.getCmp("passwordconfirmpassword").backupValue=q;Ext.getCmp("passwordconfirmpassword").setReadOnly(true);
}Ext.getCmp("domain").setReadOnly(true);Ext.getCmp("user").setReadOnly(true);Ext.getCmp("password").setReadOnly(true);Ext.getCmp("egconfiguremultipleusers").destroy();var f=Ext.getCmp("componentType").getValue();var n=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(f)+"&componentType="+encodeURIComponent(f)+"&tName_HelpPage="+n+"&testName="+n,method:"POST"});
},configTgtsSysProps:function(l){Ext.create("SpecificTestConfiguration.view.EgConfigureTargetsAndSysProps").show();inputsTrgtUrl=2;var q=Ext.getCmp("targets").getValue();var t=q.split(",");if(q!=""||q!=null||q!=undefined){var m=Ext.getCmp("systempropskey").getValue();var n=Ext.getCmp("systempropsvalue").getValue();
var c=m.split(",");var g=n.split(",");Ext.suspendLayouts();for(var v=0;v<t.length-1;v++){addTrgtUrlContact();}for(cnt=1;cnt<t.length+1;cnt++){var f=t[cnt-1];if(f.indexOf("https://")!=-1||f.indexOf("https:\\")!=-1){var u=f.substring(0,8);var z=f.substring(8);if(z.indexOf(":")!=-1){var b=z.substring(0,z.indexOf(":"));
var e=z.substring(z.indexOf(":")+1,f.length);Ext.getCmp("hostTrgt"+cnt).setValue(u+b);Ext.getCmp("portTrgt"+cnt).setValue(e);}else{Ext.getCmp("hostTrgt"+cnt).setValue(u+z);Ext.getCmp("portTrgt"+cnt).setValue("");}}else{if(f.indexOf("http://")!=-1||f.indexOf("http:\\")!=-1){var y=f.substring(0,7);var d=f.substring(7);
if(d.indexOf(":")!=-1){var b=d.substring(0,d.indexOf(":"));var e=d.substring(d.indexOf(":")+1,f.length);Ext.getCmp("hostTrgt"+cnt).setValue(y+b);Ext.getCmp("portTrgt"+cnt).setValue(e);}else{Ext.getCmp("hostTrgt"+cnt).setValue(y+d);Ext.getCmp("portTrgt"+cnt).setValue("");}}else{if(f.indexOf(":")!=-1){var r=f.substring(0,f.indexOf(":"));
var a=f.substring(f.indexOf(":")+1,f.length);Ext.getCmp("hostTrgt"+cnt).setValue(r);Ext.getCmp("portTrgt"+cnt).setValue(a);}else{Ext.getCmp("hostTrgt"+cnt).setValue(f);Ext.getCmp("portTrgt"+cnt).setValue("");}}}if(m!="none"){Ext.getCmp("tgtpropsfieldset"+cnt).show();var B=c[cnt-1];var A=g[cnt-1];if(typeof B!=="undefined"&&typeof A!=="undefined"){var s=B.split("!@!");
var x=A.split("!@!");if(s!=null&&s.length>0){for(var h=1;h<s.length;h++){addTrgtPropsContainerWithValue("tgtPropsContainer_"+cnt+"_"+(h+1));}for(var o=0;o<s.length;o++){Ext.getCmp("tgtpropkey_"+cnt+"_"+(o+1)).setValue(s[o]);var w=x[o];if(w.indexOf("~#~")!=-1){w=w.replace(/~#~/g,",");}Ext.getCmp("tgtpropval_"+cnt+"_"+(o+1)).setValue(w);
}}}}}Ext.resumeLayouts(true);}Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=EgConfigureTargetsAndSysProps",method:"POST",async:false});},updateTargetUrl:function(){var l="";var v="";var k="";var u=inputsTrgtUrl;for(var t=1;t<u;t++){if(Ext.getCmp("hostTrgt"+t)==undefined){continue;
}var d=Ext.getCmp("hostTrgt"+t).getValue();var b=Ext.getCmp("portTrgt"+t).getValue();if(d==null||b==null){continue;}if(d.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertconfigTgt,msg:"Please enter a valid host",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("hostTrgt"+t).focus(true);
}});return;}if(b.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertconfigTgt,msg:"Please enter a valid port",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("portTrgt"+t).focus(true);}});return;}var e="";var r="";var q=Ext.getCmp("tgtPropsMainContainer"+t);var n=q.items.getCount();
if(n>0){for(var h=0;h<n;h++){r=Ext.getCmp("tgtpropkey_"+t+"_"+(h+1)).getValue();e=Ext.getCmp("tgtpropval_"+t+"_"+(h+1)).getValue();if(!checkblank(r)){Ext.Msg.show({title:alertconfigTgt,msg:enterSystemPropKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("tgtpropkey_"+t+"_"+(h+1)).focus(true,true);
}});return;}else{if(!checkspecialExt(r,"@*+=|:;\"'<>/[]?,!")){Ext.Msg.show({title:alertconfigTgt,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("tgtpropkey_"+t+"_"+(h+1)).focus(true,true);}});return;}else{if(r.indexOf("  ")>-1){Ext.Msg.show({title:alertconfigTgt,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("tgtpropkey_"+t+"_"+(h+1)).focus(true,true);
}});return;}else{if(r.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertconfigTgt,msg:"Please enter value for system property",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("tgtpropkey_"+t+"_"+(h+1)).focus(true,true);}});return;}}}}if(!checkblank(e)){Ext.Msg.show({title:alertconfigTgt,msg:enterSystemPropValue,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("tgtpropval_"+t+"_"+(h+1)).focus(true,true);
}});return;}else{if(!checkspecialExt(e,"~#@*+=|:;\"'<>/[]?")){Ext.Msg.show({title:alertconfigTgt,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("tgtpropval_"+t+"_"+(h+1)).focus(true,true);}});return;}else{if(e.indexOf("  ")>-1){Ext.Msg.show({title:alertconfigTgt,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("tgtpropval_"+t+"_"+(h+1)).focus(true,true);
}});return;}else{if(e.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertconfigTgt,msg:"Please enter value for system property value",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("tgtpropval_"+t+"_"+(h+1)).focus(true,true);}});return;}}}}}}if(b!=null&&b!=""){l=l+","+d+":"+b;}else{l=l+","+d;
}var o=Ext.getCmp("tgtPropsMainContainer"+t);var a=o.items.getCount();var c="";var f="";if(a>0){for(var h=0;h<a;h++){c+=Ext.getCmp("tgtpropkey_"+t+"_"+(h+1)).getValue()+"!@!";f+=Ext.getCmp("tgtpropval_"+t+"_"+(h+1)).getValue()+"!@!";}}if(!Ext.isEmpty(c)){c=c.substring(0,c.length-3);f=f.substring(0,f.length-3);
}v=v+","+c;var w=f;if(w.indexOf(",")!=-1){w=w.replace(/,/g,"~#~");}k=k+","+w;}l=l.substring(1);v=v.substring(1);k=k.substring(1);Ext.getCmp("systempropskey").setValue(v);Ext.getCmp("systempropsvalue").setValue(k);Ext.getCmp("targets").setValue(l);Ext.getCmp("EgConfigureTargetsAndSysProps").destroy();
var g=Ext.getCmp("componentType").getValue();var s=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(g)+"&componentType="+encodeURIComponent(g)+"+&tName_HelpPage="+s+"&testName="+s,method:"POST"});},clearTargetUrl:function(b){var a=Ext.getCmp("targeturlcontainer");
a.removeAll();Ext.getCmp("addTgtUrlbtn").setText("Add");Ext.getCmp("NoTrgtUrlPattern").show();if(Ext.getCmp("contrgt_1")!=null||Ext.getCmp("contrgt_1")!=undefined){istrgt="true";Ext.getCmp("contrgt_1").removeAll();Ext.getCmp("contrgt_1").hide();}Ext.getCmp("updateTgtUrl").disable();Ext.getCmp("clearTgtUrl").disable();
},configCerdentialurls:function(I){Ext.create("SpecificTestConfiguration.view.EgConfigureUrlAndCredentials").show();var D="";inputsCredUrl=2;BTNamingSegmentCount=2;iscred="false";var L=publicJson["isHiddenUrls"];var c=Ext.getCmp("url").getValue();var A=decodeURIComponent(Ext.getCmp("hiddenURLs").getValue());
var K=Ext.getCmp("credentials").getValue();var d=Ext.getCmp("content").getValue();var v=Ext.getCmp("encoding").getValue();var e="";var w="";var a="";if(!Ext.isEmpty(A)){L=true;}var G=publicJson["isPrivateKeyParamExist"];if(G==true){e=Ext.getCmp("privateKey").getValue();}var u=publicJson["isSystemPropKeyParamExist"];
if(u==true){w=Ext.getCmp("systempropertykey").getValue();a=Ext.getCmp("systempropertyvalue").getValue();}var M=c.split(",");var h="";if(L){h=A.split("|");}var s=K.split(",");var N=d.split(",");var l=v.split(",");var H="";var z="";var J="";if(e!="$unconfigured"){H=e.split(",");}if(w!="$unconfigured"){z=w.split(",");
}if(a!="$unconfigured"){J=a.split(",");}var q="";var C="";var g="";var B="";var t="";var r="";var y="";var n="";if(c!=null||c!=undefined){Ext.suspendLayouts();for(var O=0;O<M.length-1;O++){addCredUrlContact();}for(D=1;D<M.length+1;D++){if(L){q=M[D-1];var m=h[D-1].substring(0,h[D-1].indexOf(":"));if(m==q){C=h[D-1].substring(h[D-1].indexOf(":")+1);
}}else{q=M[D-1].substring(0,M[D-1].indexOf(":"));C=M[D-1].substring(M[D-1].indexOf(":")+1);}g=s[D-1].substring(0,s[D-1].indexOf(":"));B=s[D-1].substring(s[D-1].indexOf(":")+1);t=N[D-1].substring(0,N[D-1].indexOf(":"));r=N[D-1].substring(N[D-1].indexOf(":")+1);if(Ext.getCmp("nameCred"+D)==undefined){continue;
}Ext.getCmp("nameCred"+D).setValue(q);Ext.getCmp("urlCred"+D).setValue(C);Ext.getCmp("usrnameCred"+D).setValue(g);Ext.getCmp("pwdCred"+D).setValue(B);Ext.getCmp("pwdCred"+D).backupValue=B;if(t=="Inc"){Ext.getCmp("contentCred"+D).setValue("Inc");}else{if(t=="Exc"){Ext.getCmp("contentCred"+D).setValue("Exc");
}else{Ext.getCmp("contentCred"+D).setValue("none");}}Ext.getCmp("subcontentCred"+D).setValue(r);Ext.getCmp("encodeCred"+D).setValue(l[D-1]);if(G==true){Ext.getCmp("privateKey"+D).show();Ext.getCmp("passKey"+D).show();y=H[D-1].substring(0,H[D-1].indexOf("#~~#"));n=H[D-1].substring(H[D-1].indexOf("#~~#")+4);
Ext.getCmp("privateKey"+D).setValue(y);Ext.getCmp("passKey"+D).setValue(n);Ext.getCmp("passKey"+D).backupValue=n;}if(u==true){Ext.getCmp("syspropsfieldset"+D).show();var f=z[D-1];var o=J[D-1];var F=f.split("!@!");var b=o.split("!@!");if(F!=null&&F.length>0){for(var E=1;E<F.length;E++){addSysPropsContainerWithValue("sysPropsContainer_"+D+"_"+(E+1));
}for(var P=0;P<F.length;P++){Ext.getCmp("syspropkey_"+D+"_"+(P+1)).setValue(F[P]);var x=b[P];if(x.indexOf("~#~")!=-1){x=x.replace(/~#~/g,",");}Ext.getCmp("syspropval_"+D+"_"+(P+1)).setValue(x);}}}}Ext.resumeLayouts(true);}Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egconfigureurlandcredentials",method:"POST",async:false});
},clearCredUrl:function(a){var b=Ext.getCmp("credurlcontainer");b.removeAll();Ext.getCmp("addCredUrlbtn").setText("Add");Ext.getCmp("NoCredUrlPattern").show();if(Ext.getCmp("concred_1")!=null||Ext.getCmp("concred_1")!=undefined){iscred="true";Ext.getCmp("concred_1").removeAll();Ext.getCmp("concred_1").hide();
}Ext.getCmp("updateCredUrl").disable();Ext.getCmp("clearCredUrl").disable();},updateCredUrl:function(){var v=publicJson["isPrivateKeyParamExist"];var r=publicJson["isSystemPropKeyParamExist"];var N=publicJson["isHiddenUrls"];var Q="";var K="";var t="";var U="";var H="";var R="";var T="";var l="";var y="";
var s=new Array();var c=false;var C=false;var V=false;var D=false;var o=false;var w=false;var F="";var g=inputsCredUrl;for(var P=1;P<g;P++){if(Ext.getCmp("nameCred"+P)==undefined){continue;}var A=Ext.getCmp("nameCred"+P).getValue();var S=Ext.getCmp("urlCred"+P).getValue();var J=Ext.getCmp("usrnameCred"+P).getValue();
var E=Ext.getCmp("pwdCred"+P).getValue();var L=Ext.getCmp("contentCred"+P).getValue();var z=Ext.getCmp("subcontentCred"+P).getValue();var O=Ext.getCmp("encodeCred"+P).getValue();var b="";var B="";var n="";var h="";if(v==true){b=Ext.getCmp("privateKey"+P).getValue();B=Ext.getCmp("passKey"+P).getValue();
}if(A==null||S==null||J==null||E==null||L==null||z==null||O==null||b==null||B==null){continue;}var a=s.indexOf(A);if(a!=-1){Ext.Msg.show({title:alertconfigUrl,msg:duplicateNtAlwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("nameCred"+P).focus(true);}});return;}s[P]=A;if(A.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertconfigUrl,msg:validName,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("nameCred"+P).focus(true,true);
}});return;}else{if(!checkblank(A)){Ext.Msg.show({title:alertconfigUrl,msg:entName,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("nameCred"+P).focus(true,true);}});return;}else{if(!checkspecialExt(A,"@*+=|:;\"'<>[]?,")){Ext.Msg.show({title:alertconfigUrl,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("nameCred"+P).focus(true,true);
}});return;}else{if(A.indexOf("  ")>-1){Ext.Msg.show({title:alertconfigUrl,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("nameCred"+P).focus(true,true);}});return;}else{if(!checkHyphenText(A,A)){Ext.getCmp("nameCred"+P).focus(true,true);return;}else{c=true;}}}}}if(S.indexOf("$hostIp")>-1){Ext.Msg.show({title:alertconfigUrl,msg:validUrl,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("urlCred"+P).focus(true,true);
}});return;}else{if(S.indexOf("$portNo")>-1){Ext.Msg.show({title:alertconfigUrl,msg:validUrl,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("urlCred"+P).focus(true,true);}});return;}else{if(S.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertconfigUrl,msg:validUrl,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("urlCred"+P).focus(true,true);
}});return;}else{if(!checkblank(S)){Ext.Msg.show({title:alertconfigUrl,msg:enterUrl,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("urlCred"+P).focus(true,true);}});return;}else{if(!checkspecialnomess(S,"|\"'")){Ext.Msg.show({title:alertconfigUrl,msg:validUrl,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("urlCred"+P).focus(true,true);
}});return;}else{if(!S.startsWith("curl")){if(!checkHyphenText(S,S)){Ext.getCmp("urlCred"+P).focus(true,true);return;}}else{C=true;}}}}}}if(!checkblank(J)){Ext.Msg.show({title:alertconfigUrl,msg:enterUsr,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usrnameCred"+P).focus(true);}});
return;}else{if(!checkspecialExt(J,"*+=|:;\"'<>/[]?,")){Ext.Msg.show({title:alertconfigUrl,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usrnameCred"+P).focus(true,true);}});return;}else{if(J.indexOf("..")>-1){Ext.Msg.show({title:alertconfigUrl,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usrnameCred"+P).focus(true);
}});return;}else{if(J.indexOf("  ")>-1){Ext.Msg.show({title:alertconfigUrl,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usrnameCred"+P).focus(true);}});return;}else{if(!checkHyphenText(J,J)){Ext.getCmp("usrnameCred"+P).focus();return;}else{V=true;}}}}}if(!checkblank(E)){Ext.Msg.show({title:alertconfigUrl,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdCred"+P).focus(true);
}});return;}else{if(!checkspecialnomess(E,",|")){Ext.Msg.show({title:alertconfigUrl,msg:PwdNotPipe,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdCred"+P).focus(true);}});return;}else{D=true;}}if(!checkblank(z)){Ext.Msg.show({title:alertconfigUrl,msg:enterContent,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("subcontentCred"+P).focus(true);
}});return;}else{if(!checkspecialExt(z,",|:\"'<>")){Ext.Msg.show({title:alertconfigUrl,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("subcontentCred"+P).focus(true,true);}});return;}else{if(!checkHyphenText(z,z)){Ext.getCmp("subcontentCred"+P).focus();return;}else{o=true;
}}}if(!checkblank(O)){Ext.Msg.show({title:alertconfigUrl,msg:enterEncoding,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("encodeCred"+P).focus(true);}});return;}else{if(!checkspecialExt(O,"@*+=|:;\"'<>/[]?,")){Ext.Msg.show({title:alertconfigUrl,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("encodeCred"+P).focus(true,true);
}});return;}else{if(O.indexOf("  ")>-1){Ext.Msg.show({title:alertconfigUrl,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("encodeCred"+P).focus(true);}});return;}else{if(!checkHyphenText(O,O)){Ext.getCmp("encodeCred"+P).focus();return;}else{w=true;}}}}if(r){var k=Ext.getCmp("sysPropsMainContainer"+P);
var e=k.items.getCount();if(e>0){for(var x=0;x<e;x++){h=Ext.getCmp("syspropkey_"+P+"_"+(x+1)).getValue();n=Ext.getCmp("syspropval_"+P+"_"+(x+1)).getValue();if(!checkblank(h)){Ext.Msg.show({title:alertconfigUrl,msg:enterSystemPropKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("syspropkey_"+P+"_"+(x+1)).focus(true,true);
}});return;}else{if(!checkspecialExt(h,"@*+=|:;\"'<>/[]?,!")){Ext.Msg.show({title:alertconfigUrl,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("syspropkey_"+P+"_"+(x+1)).focus(true,true);}});return;}else{if(h.indexOf("  ")>-1){Ext.Msg.show({title:alertconfigUrl,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("syspropkey_"+P+"_"+(x+1)).focus(true,true);
}});return;}}}if(!checkblank(n)){Ext.Msg.show({title:alertconfigUrl,msg:enterSystemPropValue,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("syspropval_"+P+"_"+(x+1)).focus(true,true);}});return;}else{if(!checkspecialExt(n,"~#@*+=|:;\"'<>/[]?")){Ext.Msg.show({title:alertconfigUrl,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("syspropval_"+P+"_"+(x+1)).focus(true,true);
}});return;}else{if(n.indexOf("  ")>-1){Ext.Msg.show({title:alertconfigUrl,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("syspropval_"+P+"_"+(x+1)).focus(true,true);}});return;}}}}}}if(v==true){if(b.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertconfigUrl,msg:enterValidPath,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("privateKey"+P).focus(true);
}});return;}else{if(!checkblank(b)){Ext.Msg.show({title:alertconfigUrl,msg:enterFilePath,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("privateKey"+P).focus(true);}});return;}else{if(b.indexOf("  ")>-1){Ext.Msg.show({title:alertconfigUrl,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("privateKey"+P).focus(true);
}});return;}}}if(!checkblank(B)){Ext.Msg.show({title:alertconfigUrl,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("passKey"+P).focus(true);}});return;}else{if(!checkspecialnomess(B,",|")){Ext.Msg.show({title:alertconfigUrl,msg:PwdNotPipe,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("passKey"+P).focus(true);
}});return;}}}Q=Q+","+A;t=t+","+A+":"+S;K=K+"|"+A+":"+S;U=U+","+J+":"+E;H=H+","+L+":"+z;R=R+","+O;if(v==true){T=T+","+b+"#~~#"+B;}if(r==true){var I=Ext.getCmp("sysPropsMainContainer"+P);var G=I.items.getCount();var M="";var d="";if(G>0){for(var x=0;x<G;x++){M+=Ext.getCmp("syspropkey_"+P+"_"+(x+1)).getValue().trim()+"!@!";
d+=Ext.getCmp("syspropval_"+P+"_"+(x+1)).getValue().trim()+"!@!";}}if(!Ext.isEmpty(M)){M=M.substring(0,M.length-3);d=d.substring(0,d.length-3);}l=l+","+M;var q=d;if(q.indexOf(",")!=-1){q=q.replace(/,/g,"~#~");}y=y+","+q;}}Q=Q.substring(1);t=t.substring(1);K=K.substring(1);U=U.substring(1);H=H.substring(1);
R=R.substring(1);if(v==true){T=T.substring(1);Ext.getCmp("privateKey").setValue(T);}if(r==true){l=l.substring(1);y=y.substring(1);Ext.getCmp("systempropertykey").setValue(l);Ext.getCmp("systempropertyvalue").setValue(y);}if(N){Ext.getCmp("url").setValue(Q);Ext.getCmp("hiddenURLs").setValue(K);}else{Ext.getCmp("url").setValue(t);
}Ext.getCmp("credentials").setValue(U);Ext.getCmp("content").setValue(H);Ext.getCmp("encoding").setValue(R);Ext.getCmp("egconfigureurlandcredentials").destroy();var f=Ext.getCmp("componentType").getValue();var u=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(f)+"&componentType="+encodeURIComponent(f)+"+&tName_HelpPage="+u+"&testName="+u,method:"POST"});
},configurlnamepatterns:function(c){Ext.create("SpecificTestConfiguration.view.EgConfigureNamePattern").show();var e="";inputsUrlNme=2;isNamePtn="false";var l=Ext.getCmp("name").getValue();var a=Ext.getCmp("pattern").getValue();var b=Ext.getCmp("threshold_value").getValue();var h=l.split(",");var f=a.split(",");
var g=b.split(",");if(h!=null||h!=undefined){for(var d=0;d<h.length-1;d++){addUrlNameContact();}for(e=1;e<h.length+1;e++){if(Ext.getCmp("nameurl"+e)==undefined){continue;}Ext.getCmp("nameurl"+e).setValue(h[e-1]);Ext.getCmp("patternurl"+e).setValue(f[e-1]);Ext.getCmp("thresholdurl"+e).setValue(g[e-1]);
}}Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=winservicesconfiguration",method:"POST",async:false});},clearUrlName:function(b){var a=Ext.getCmp("urlpatterncontainer");a.removeAll();Ext.getCmp("addUrlNamebtn").setText("Add");Ext.getCmp("NoUrlPattern").show();if(Ext.getCmp("con_1")!=null||Ext.getCmp("con_1")!=undefined){isNamePtn="true";
Ext.getCmp("con_1").removeAll();Ext.getCmp("con_1").hide();}Ext.getCmp("updateUrlPattern").disable();Ext.getCmp("clearUrlPattern").disable();},updateUrlName:function(e){var r=/^([0-9]+\.|\.)?[0-9]+$/gi;var q=/\s/gi;var d=/(;)$/gi;var b="";var h="";var a="";var s="";var l="";var o="";var f=0;var g=inputsUrlNme;
for(var k=1;k<g;k++){if(Ext.getCmp("nameurl"+k)==undefined){continue;}s=Ext.getCmp("nameurl"+k).getValue();l=Ext.getCmp("patternurl"+k).getValue();o=Ext.getCmp("thresholdurl"+k).getValue();if(s==null){continue;}if(s!=null){f++;if(!checkblank(s)||(s=="$unconfigured")){Ext.Msg.show({title:alertNameTitle,msg:enterName,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("nameurl"+k).focus(true);
}});return;}else{if(!nonNumeric(s)){Ext.getCmp("nameurl"+k).focus();return;}else{if(!checkspace(s)){Ext.getCmp("nameurl"+k).focus();return;}else{if((s).indexOf(",")>-1){Ext.Msg.show({title:alertNameTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("nameurl"+k).focus(true);
}});return;}else{if(!checkHyphenText(s,s)){Ext.getCmp("nameurl"+k).focus();return;}else{if(!checkspecial(s,"$@*.+=|:;\"'<>/[]?,\\&")){Ext.getCmp("nameurl"+k).focus();return;}}}}}}var m=b.substring(b.lastIndexOf((","+s)));if((m==(","+s))||(b.indexOf((","+s)+",")!=-1)){Ext.Msg.show({title:alertNameTitle,msg:_uniqueName,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("nameurl"+k).focus(true);
}});return;}}if(l!=null){if(!checkblank(l)||(l=="$unconfigured")){Ext.Msg.show({title:alertNameTitle,msg:enterPattern,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("patternurl"+k).focus(true);}});return;}else{if(!nonNumeric(l)){Ext.getCmp("patternurl"+k).focus();return;}else{if(!checkspecial(l,"$@+|:\"'<>[]-,")){Ext.getCmp("patternurl"+k).focus();
return;}else{if(!checkspace(l)){Ext.getCmp("patternurl"+k).focus();return;}else{if(trim(l)==""){Ext.getCmp("patternurl"+k).focus();return;}else{if(l.indexOf("..")>-1){Ext.Msg.show({title:alertNameTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("patternurl"+k).focus(true);
}});return;}else{if(l.indexOf(";;")>-1){Ext.Msg.show({title:alertNameTitle,msg:_checkSemicolons,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("patternurl"+k).focus(true);}});return;}else{if(l.indexOf("  ")>-1){Ext.Msg.show({title:alertNameTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("patternurl"+k).focus(true);
}});return;}else{if(l.match(d)!=null){Ext.Msg.show({title:alertNameTitle,msg:_invalidPattern,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("patternurl"+k).focus(true);}});return;}}}}}}}}}}if(o!=null){if(!checkblank(o)||(o=="$unconfigured")){Ext.Msg.show({title:alertNameTitle,msg:enterThresh,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("thresholdurl"+k).focus(true);
}});return;}else{if(!checkspace(o)){Ext.getCmp("thresholdurl"+k).focus();return;}else{if(o.match(r)==null){Ext.Msg.show({title:alertNameTitle,msg:_numeralsOnly,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("thresholdurl"+k).focus(true);}});return;}else{if(!checkspecial(o,"@$*+=|:;\"'<>/[]?,")){Ext.getCmp("thresholdurl"+k).focus();
return;}else{if(trim(o)==""){Ext.getCmp("thresholdurl"+k).focus();return;}else{if(!checkHyphenText(o,o)){Ext.getCmp("thresholdurl"+k).focus();return;}else{if(o.indexOf("..")>-1){Ext.Msg.show({title:alertNameTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("thresholdurl"+k).focus(true);
}});return;}}}}}}}}if(f>1){Ext.getCmp("name").setReadOnly(true);Ext.getCmp("pattern").setReadOnly(true);Ext.getCmp("threshold_value").setReadOnly(true);}b=b+","+s;h=h+","+l;a=a+","+o;}if(f<=1){Ext.getCmp("name").setReadOnly(false);Ext.getCmp("pattern").setReadOnly(false);Ext.getCmp("threshold_value").setReadOnly(false);
}b=b.replace(",","");h=h.replace(",","");a=a.replace(",","");Ext.getCmp("name").setValue(b);Ext.getCmp("pattern").setValue(h);Ext.getCmp("threshold_value").setValue(a);Ext.getCmp("egconfigurenamepattern").destroy();var n=Ext.getCmp("componentType").getValue();var c=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(n)+"&componentType="+encodeURIComponent(n)+"&tName_HelpPage="+c+"&testName="+c,method:"POST"});
},configWindowShareds:function(e){Ext.create("SpecificTestConfiguration.view.EgConfigureWinSharedFolders").show();var q="";inputWinShared=2;noWinConfig="false";var b=Ext.getCmp("sharename").getValue();var a=Ext.getCmp("domainname").getValue();var d=Ext.getCmp("shareusername").getValue();var s=Ext.getCmp("password").getValue();
var r=b.split(",");var n=a.split(",");var m=d.split(",");var l=s.split("#~#");var t="";var g="";var c="";var o="";var h="";if(r!=null||r!=undefined){for(var f=0;f<r.length-1;f++){addWinSharedContact();}for(q=1;q<r.length+1;q++){t=r[q-1].substring(0,r[q-1].indexOf("@"));g=r[q-1].substring(r[q-1].indexOf("@")+1);
c=n[q-1].substring(n[q-1].indexOf("@")+1);o=m[q-1].substring(m[q-1].indexOf("@")+1);h=l[q-1].substring(l[q-1].indexOf("@")+1);if(Ext.getCmp("displayNme"+q)==undefined){continue;}if(b=="$unconfigured"){Ext.getCmp("displayNme"+q).setValue("$unconfigured");}else{Ext.getCmp("displayNme"+q).setValue(t);}Ext.getCmp("shareNme"+q).setValue(g);
Ext.getCmp("domainNme"+q).setValue(c);Ext.getCmp("userNme"+q).setValue(o);Ext.getCmp("pwdNme"+q).setValue(h);Ext.getCmp("confPwdNme"+q).setValue(h);Ext.getCmp("pwdNme"+q).backupValue=h;Ext.getCmp("confPwdNme"+q).backupValue=h;}}Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egconfigurewinsharedfolders",method:"POST",async:false});
},clearWinShared:function(b){var a=Ext.getCmp("winsharedcontainer");a.removeAll();if(Ext.getCmp("con_win1")!=null||Ext.getCmp("con_win1")!=undefined){noWinConfig="true";Ext.getCmp("con_win1").removeAll();Ext.getCmp("con_win1").hide();}Ext.getCmp("addwinsharedbtn").setText("Add");Ext.getCmp("NoWinSharedPattern").show();
Ext.getCmp("updateWinShared").disable();Ext.getCmp("clearWinShared").disable();},updateWinShared:function(d){var m="";var s="";var b="";var l="";var n=new Array();var t=inputWinShared;for(var g=1;g<t;g++){if(Ext.getCmp("displayNme"+g)==undefined){continue;}var a=Ext.getCmp("displayNme"+g).getValue();
var u=Ext.getCmp("shareNme"+g).getValue();var r=Ext.getCmp("domainNme"+g).getValue();var f=Ext.getCmp("userNme"+g).getValue();var h=Ext.getCmp("pwdNme"+g).getValue();var e=Ext.getCmp("confPwdNme"+g).getValue();if(a==null||u==null||r==null||f==null||h==null||e==null){continue;}var q=n.indexOf(a);if(q!=-1){Ext.Msg.show({title:alertWinShared,msg:duplicateDisp,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("displayNme"+g).focus(true);
}});return;}n[g]=a;if(a.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertWinShared,msg:enterValidDisp,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("displayNme"+g).focus(true);}});return;}else{if(!checkblank(a)){Ext.Msg.show({title:alertWinShared,msg:enterDisp,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("displayNme"+g).focus(true);
}});return;}else{if(!checkspecial(a,"@*+=|:;\"'<>/[]?,")){Ext.getCmp("displayNme"+g).focus();return;}else{if(a.indexOf("  ")>-1){Ext.Msg.show({title:alertWinShared,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("displayNme"+g).focus(true);}});return;}else{if(!checkHyphenText(a,a)){Ext.getCmp("displayNme"+g).focus();
return;}}}}}if(u.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertWinShared,msg:enterValidShare,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("shareNme"+g).focus(true);}});return;}else{if(!checkblank(u)){Ext.Msg.show({title:alertWinShared,msg:enterShare,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("shareNme"+g).focus(true);
}});return;}else{if(!checkspecial(u,"@*+=|:;\"'<>/[]?,")){Ext.getCmp("shareNme"+g).focus();return;}else{if(u.indexOf("  ")>-1){Ext.Msg.show({title:alertWinShared,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("shareNme"+g).focus(true);}});return;}else{if(!checkHyphenText(u,u)){Ext.getCmp("shareNme"+g).focus();
return;}}}}}if(!checkblank(r)){Ext.Msg.show({title:alertWinShared,msg:enterDomain,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainNme"+g).focus(true);}});return;}else{if(!checkDomain(r,"true")){Ext.getCmp("domainNme"+g).focus(true);return;}else{if(r.indexOf(",")>-1){Ext.Msg.show({title:alertWinShared,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainNme"+g).focus(true);
}});return;}else{if(!checkHyphenText(r,r)){Ext.getCmp("domainNme"+g).focus();return;}else{if(r.indexOf("..")>-1){Ext.Msg.show({title:alertWinShared,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainNme"+g).focus(true);}});return;}}}}}if(!checkblank(f)){Ext.Msg.show({title:alertWinShared,msg:enterUsr,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("userNme"+g).focus(true);
}});return;}else{if(f.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertWinShared,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("userNme"+g).focus(true);}});return;}else{if(!checkspecial(f,"*+=|:;\"'<>/[]?,")){Ext.getCmp("userNme"+g).focus();return;}else{if(f.indexOf("..")>-1){Ext.Msg.show({title:alertWinShared,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("userNme"+g).focus(true);
}});return;}else{if(f.indexOf("  ")>-1){Ext.Msg.show({title:alertWinShared,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("userNme"+g).focus(true);}});return;}else{if(!checkHyphenText(f,f)){Ext.getCmp("userNme"+g).focus();return;}}}}}}if(!checkblank(h)){Ext.Msg.show({title:alertWinShared,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdNme"+g).focus(true);
}});return;}else{if(h.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertWinShared,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdNme"+g).focus(true);}});return;}else{if(!checkspecialnomess(h,",|")){Ext.Msg.show({title:alertWinShared,msg:PwdNotPipe,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdNme"+g).focus(true);
}});return;}else{if(h.indexOf("#~#")>-1){Ext.Msg.show({title:alertWinShared,msg:_checkHashTildeHash,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdNme"+g).focus(true);}});return;}}}}if(!checkblank(e)){Ext.Msg.show({title:alertWinShared,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confPwdNme"+g).focus(true);
}});return;}else{if(e.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertWinShared,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confPwdNme"+g).focus(true);}});return;}else{if(h!=e){Ext.Msg.show({title:alertWinShared,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confPwdNme"+g).focus(true);
}});return;}}}m=m+","+a+"@"+u;s=s+","+a+"@"+r;b=b+","+a+"@"+f;l=l+"#~#"+a+"@"+h;}m=m.substring(1);s=s.substring(1);b=b.substring(1);l=l.substring(3);Ext.getCmp("sharename").setValue(m);Ext.getCmp("domainname").setValue(s);Ext.getCmp("shareusername").setValue(b);Ext.getCmp("password").setValue(l);Ext.getCmp("egconfigurewinsharedfolders").destroy();
var o=Ext.getCmp("componentType").getValue();var c=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(o)+"&componentType="+encodeURIComponent(o)+"&tName_HelpPage="+c+"&testName="+c,method:"POST"});},configureWsdlUrls:function(){Ext.create("SpecificTestConfiguration.view.EgConfigureWsdlUrlAndCredentials").show();
var f="";inputsWsdlUrl=2;noWsdl="false";var l=Ext.getCmp("WSDL_URL").getValue();var r=Ext.getCmp("credentials").getValue();var b=Ext.getCmp("content").getValue();var n=Ext.getCmp("encoding").getValue();var e=l.split(",");var s=r.split(",");var o=b.split(",");var a=n.split(",");var q="";var d="";var m="";
var c="";var h="";var t="";if(l!=null||l!=undefined){for(var g=0;g<e.length-1;g++){addWsdlUrlContact();}for(f=1;f<e.length+1;f++){q=e[f-1].substring(0,e[f-1].indexOf(":"));d=e[f-1].substring(e[f-1].indexOf(":")+1);m=s[f-1].substring(0,s[f-1].indexOf(":"));c=s[f-1].substring(s[f-1].indexOf(":")+1);h=o[f-1].substring(0,o[f-1].indexOf(":"));
t=o[f-1].substring(o[f-1].indexOf(":")+1);if(Ext.getCmp("nameWsdl"+f)==undefined){continue;}if(e=="$unconfigured"){Ext.getCmp("nameWsdl"+f).setValue("$unconfigured");}else{Ext.getCmp("nameWsdl"+f).setValue(q);}Ext.getCmp("urlWsdl"+f).setValue(d);Ext.getCmp("usrnameWsdl"+f).setValue(m);Ext.getCmp("pwdWsdl"+f).setValue(c);
Ext.getCmp("pwdWsdl"+f).backupValue=c;if(h=="Inc"){Ext.getCmp("contentWsdl"+f).setValue("Inc");}else{if(h=="Exc"){Ext.getCmp("contentWsdl"+f).setValue("Exc");}else{Ext.getCmp("contentWsdl"+f).setValue("none");}}Ext.getCmp("subcontentWsdl"+f).setValue(t);Ext.getCmp("encodeWsdl"+f).setValue(a[f-1]);}}Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egconfigurewsdlurlandcredentials",method:"POST",async:false});
},clearWsdlUrl:function(a){var b=Ext.getCmp("wsdlurlcontainer");b.removeAll();Ext.getCmp("addWsdlUrlbtn").setText("Add");Ext.getCmp("NoWsdlUrlPattern").show();if(Ext.getCmp("con_wsdl1")!=null||Ext.getCmp("con_wsdl1")!=undefined){noWsdl="true";Ext.getCmp("con_wsdl1").removeAll();Ext.getCmp("con_wsdl1").hide();
}Ext.getCmp("updateWsdlUrl").disable();Ext.getCmp("clearWsdlUrl").disable();},updateWsdlUrl:function(){var s="";var l="";var r="";var n="";var t=new Array();var b=inputsWsdlUrl;for(var f=1;f<b;f++){if(Ext.getCmp("nameWsdl"+f)==undefined){continue;}var c=Ext.getCmp("nameWsdl"+f).getValue();var g=Ext.getCmp("urlWsdl"+f).getValue();
var e=Ext.getCmp("usrnameWsdl"+f).getValue();var k=Ext.getCmp("pwdWsdl"+f).getValue();var h=Ext.getCmp("subcontentWsdl"+f).getValue();var a=Ext.getCmp("contentWsdl"+f).getValue();var u=Ext.getCmp("encodeWsdl"+f).getValue();if(c==null||g==null||e==null||k==null||h==null||a==null||u==null){continue;}var q=t.indexOf(c);
if(q!=-1){Ext.Msg.show({title:alertconfigUrl,msg:duplicateNtAlwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("nameWsdl"+f).focus(true);}});return;}t[f]=c;if(c.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertconfigUrl,msg:validName,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("nameWsdl"+f).focus(true);
}});return;}else{if(!checkblank(c)){Ext.Msg.show({title:alertconfigUrl,msg:entName,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("nameWsdl"+f).focus(true);}});return;}else{if(!checkspecial(c,"@*+=|:;\"'<>/[]?,")){Ext.getCmp("nameWsdl"+f).focus();return;}else{if(c.indexOf("  ")>-1){Ext.Msg.show({title:alertconfigUrl,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("nameWsdl"+f).focus(true);
}});return;}else{if(!checkHyphenText(c,c)){Ext.getCmp("nameWsdl"+f).focus();return;}}}}}if(g.indexOf("$hostIp")>-1){Ext.Msg.show({title:alertconfigUrl,msg:validUrl,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("urlWsdl"+f).focus(true);}});return;}else{if(g.indexOf("$portNo")>-1){Ext.Msg.show({title:alertconfigUrl,msg:validUrl,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("urlWsdl"+f).focus(true);
}});return;}else{if(g.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertconfigUrl,msg:validUrl,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("urlWsdl"+f).focus(true);}});return;}else{if(!checkblank(g)){Ext.Msg.show({title:alertconfigUrl,msg:enterUrl,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("urlWsdl"+f).focus(true);
}});return;}else{if(!checkspecialnomess(g,",|\"'")){Ext.Msg.show({title:alertconfigUrl,msg:validUrl,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("urlWsdl"+f).focus(true);}});return;}else{if(!checkHyphenText(g,g)){Ext.getCmp("urlWsdl"+f).focus();return;}}}}}}if(!checkblank(e)){Ext.Msg.show({title:alertconfigUrl,msg:enterUsr,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usrnameWsdl"+f).focus(true);
}});return;}else{if(e.indexOf("..")>-1){Ext.Msg.show({title:alertconfigUrl,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usrnameWsdl"+f).focus(true);}});return;}else{if(e.indexOf("  ")>-1){Ext.Msg.show({title:alertconfigUrl,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usrnameWsdl"+f).focus(true);
}});return;}else{if(!checkHyphenText(e,e)){Ext.getCmp("usrnameWsdl"+f).focus();return;}}}}if(!checkblank(k)){Ext.Msg.show({title:alertconfigUrl,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdWsdl"+f).focus(true);}});return;}else{if(!checkspecialnomess(k,",|")){Ext.Msg.show({title:alertconfigUrl,msg:PwdNotPipe,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdWsdl"+f).focus(true);
}});return;}}if(!checkblank(a)){Ext.Msg.show({title:alertconfigUrl,msg:enterContent,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("contentWsdl"+f).focus(true);}});return;}else{if(!checkspecial(a,",|:\"'<>")){Ext.getCmp("contentWsdl"+f).focus();return;}else{if(!checkHyphenText(a,a)){Ext.getCmp("contentWsdl"+f).focus();
return;}}}if(!checkblank(u)){Ext.Msg.show({title:alertconfigUrl,msg:enterEncoding,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("encodeWsdl"+f).focus(true);}});return;}else{if(!checkspecial(u,"@*+=|:;\"'<>/[]?,")){Ext.getCmp("encodeWsdl"+f).focus();return;}else{if(u.indexOf("  ")>-1){Ext.Msg.show({title:alertconfigUrl,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("encodeWsdl"+f).focus(true);
}});return;}else{if(!checkHyphenText(u,u)){Ext.getCmp("encodeWsdl"+f).focus();return;}}}}s=s+","+c+":"+g;l=l+","+e+":"+k;r=r+","+h+":"+a;n=n+","+u;}s=s.substring(1);l=l.substring(1);r=r.substring(1);n=n.substring(1);Ext.getCmp("WSDL_URL").setValue(s).setReadOnly(true);Ext.getCmp("credentials").setValue(l);
Ext.getCmp("content").setValue(r);Ext.getCmp("encoding").setValue(n);Ext.getCmp("egconfigurewsdlurlandcredentials").destroy();var o=Ext.getCmp("componentType").getValue();var d=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(o)+"&componentType="+encodeURIComponent(o)+"&tName_HelpPage="+d+"&testName="+d,method:"POST"});
},checkspecialnomess:function(c,b){if(typeof(c)=="object"){obj_val=c.value;}else{obj_val=c;}for(var a=0;a<obj_val.length;a++){check_char=b.indexOf(obj_val.charAt(a));if(check_char>=0){return false;}}return true;},checkHyphenText:function(c,b){var a=true;if(b=="recordpattern"||b=="process"||b=="exclude"||b=="content"||b=="servicename"){Ext.Msg.show({title:pageName,msg:_checkhyphen,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return a;}if(c.charAt(0)=="-"||c.charAt(c.length-1)=="-"){Ext.Msg.show({title:pageName,msg:_checkhyphen,buttons:Ext.Msg.OK,icon:"iconExclamation"});a=false;}else{for(i=0;i<c.length;i++){if(c.charAt(i)=="-"){if(c.charAt(i+1)==" "||c.charAt(i-1)==" "){Ext.Msg.show({title:pageName,msg:_valhyphen,buttons:Ext.Msg.OK,icon:"iconExclamation"});
a=false;break;}}}}return a;},configEjbss:function(){Ext.create("SpecificTestConfiguration.view.EgConfigEjb").show();var a=Ext.getCmp("componentName").getValue();var c=Ext.getCmp("componentType").getValue();var b=publicJson["testName"];this.buildEjbsData(a,b);Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egconfigejb",method:"POST",async:false});
},addNewConfigEjbs:function(){Ext.create("SpecificTestConfiguration.view.EgConfigEjbsCreation").show();var a=Ext.getCmp("componentName").getValue();var c=Ext.getCmp("componentType").getValue();var b=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigEjbJson.jsp?test="+b+"&comp="+a+"&mode=add&server="+c,method:"POST",async:false,success:function(d){if(d.status==200&&!Ext.isEmpty(d.responseText)){var e=d.responseText;
publicEjbsJSON=Ext.decode(e);}Ext.getCmp("itemselectejb").fromField.store.add(publicEjbsJSON["managedArry"]);Ext.getCmp("itemselectejb").toField.store.add(publicEjbsJSON["allElementsArry"]);}});},buildEjbsData:function(a,b){Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigEjbJson.jsp?test="+b+"&comp="+a,method:"POST",async:false,success:function(c){if(c.status==200&&!Ext.isEmpty(c.responseText)){var d=c.responseText;
publicEjbsJSON=Ext.decode(d);}Ext.getCmp("EjbsViewGrid").getStore().removeAll();Ext.getCmp("EjbsViewGrid").getStore().loadRawData(publicEjbsJSON["ejbGridArr"]);}});},deleteEjbWindow:function(a){var d=a.get("EjbName");var b=publicEjbsJSON["hiddenInfoObj"]["test"];var e=publicEjbsJSON["hiddenInfoObj"]["comp"];
var c=publicEjbsJSON["hiddenInfoObj"]["server"];Ext.Msg.show({title:infosTitle,msg:infosalert_4,buttons:Ext.MessageBox.YESNO,icon:"iconConfirmation",fn:function(g){if(g=="yes"){var f=new Ext.LoadMask(Ext.getBody(),{msg:"Updating..."});f.show();Ext.Ajax.request({url:"SpecificTestConfiguration/data/Egconfigejbp.jsp?test="+b+"&comp="+e+"&server="+c+"&group="+d+"&mode=del",method:"POST",scope:this,success:function(h){if(h.status==200&&!Ext.isEmpty(h.responseText)){f.hide();
var k=Ext.decode(h.responseText);if(k["success"]){testInterViews.buildEjbsData(k["comp"],k["test"]);}}}});}}});Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egconfigejb",method:"POST",async:false});},showEditEjbWindow:function(a){var f=a.get("EjbName");var e=this;
var c=Ext.create("SpecificTestConfiguration.view.EgConfigEjbsCreation");var d=publicEjbsJSON["hiddenInfoObj"]["test"];var b=publicEjbsJSON["hiddenInfoObj"]["comp"];var g=publicEjbsJSON["hiddenInfoObj"]["server"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigEjbJson.jsp?test="+d+"&comp="+b+"&group="+f+"&mode=modify&server="+g,method:"POST",async:false,success:function(h){if(h.status==200&&!Ext.isEmpty(h.responseText)){var k=h.responseText;
publicEjbsJSON=Ext.decode(k);c.show();if(Ext.getCmp("itemselectejb").fromField.store.getCount()>=1){Ext.getCmp("itemselectejb").fromField.store.removeAll();}if(Ext.getCmp("itemselectejb").toField.store.getCount()>=1){Ext.getCmp("itemselectejb").toField.store.removeAll();}Ext.getCmp("groupnme").setValue("");
Ext.getCmp("itemselectejb").fromField.store.add(publicEjbsJSON["managedArry"]);Ext.getCmp("itemselectejb").toField.store.add(publicEjbsJSON["allElementsArry"]);Ext.getCmp("groupnme").setValue(f);Ext.getCmp("groupnme").setReadOnly(true);}}});},updateConfigEjbs:function(){var d=new Array();var c=new Array();
var k=Ext.getCmp("itemselectejb").fromField.store.getCount();var t=publicJson["testName"];var f=Ext.getCmp("componentType").getValue();var h=publicEjbsJSON["hiddenInfoObj"]["mode"];var b="true";var r=Ext.getCmp("groupnme").getValue();if(from!=null&&from=="modify"){b="false";}if(k==0){Ext.Msg.show({title:ejbTitle,msg:infosalert_1,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return;}if(!checkblank(r)){Ext.Msg.show({title:ejbTitle,msg:enterGrpNme,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("groupnme").focus(true);}});return;}else{if(!checkspace(r)){Ext.getCmp("groupnme").focus();return;}else{if(!checkspecialnomess(r,"`~!@#$%^&*()+=-/?'\"]}[{\\|;:.,><")){Ext.Msg.show({title:ejbTitle,msg:infosalert_2,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("groupnme").focus(true);
}});return;}else{if(b=="true"){if(ejbGroupExists(r)){Ext.Msg.show({title:ejbTitle,msg:infosalert_3,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("groupnme").focus(true);}});return;}}}}}var l=Ext.getCmp("itemselectejb").toField.store;var o=Ext.getCmp("itemselectejb").fromField.store;
var s="";var a="";for(var e=0;e<l.getCount();e++){var q=l.getAt(e).get("valueField");if(!Ext.isEmpty(q)&&q!=undefined){s+=","+q;}}for(var e=0;e<o.getCount();e++){var q=o.getAt(e).get("valueField");if(!Ext.isEmpty(q)&&q!=undefined){a+=","+q;}}if(!Ext.isEmpty(s)&&s.indexOf(",")==0){s=s.substring(1);}if(!Ext.isEmpty(a)&&a.indexOf(",")==0){a=a.substring(1);
}var m="true";var g=Ext.getCmp("componentName").getValue();if(!(g.indexOf(":")>-1)){g=g+":NULL";m="false";}var n=this;if((a!=""||s!="")&&b=="true"){Ext.Ajax.request({url:"SpecificTestConfiguration/data/Egconfigejbp.jsp?mode="+h+"&test="+t+"&comp="+g+"&group="+r+"&fassociate="+a+"&server="+f,method:"POST",async:false,success:function(u){Ext.getCmp("egconfigejbscreation").destroy();
n.buildEjbsData(g,t);}});}else{if((a!=""||s!="")&&b=="false"){Ext.Ajax.request({url:"SpecificTestConfiguration/data/Egconfigejbp.jsp?mode="+h+"&test="+t+"&comp="+g+"&group="+r+"&fassociate="+a+"&server="+f,method:"POST",async:false,success:function(u){Ext.getCmp("egconfigejbscreation").destroy();n.buildEjbsData(g,t);
}});}}from="";Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egconfigejb",method:"POST",async:false});},configInfoss:function(){Ext.create("SpecificTestConfiguration.view.EgConfigInfos").show();var a=Ext.getCmp("componentName").getValue();var b=publicJson["testName"];
this.buildInfosData(a,b);Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egconfiginfos",method:"POST",async:false});},addconfigInfoss:function(){Ext.create("SpecificTestConfiguration.view.EgConfigInfosCreation").show();var a=Ext.getCmp("componentName").getValue();var b=publicJson["testName"];
Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigInfosJson.jsp?test="+b+"&comp="+a,method:"POST",async:false,success:function(c){if(c.status==200&&!Ext.isEmpty(c.responseText)){var d=c.responseText;publicInfosJSON=Ext.decode(d);}Ext.getCmp("itemselectinfos").fromField.store.add(publicInfosJSON["managedArry"]);
Ext.getCmp("itemselectinfos").toField.store.add(publicInfosJSON["allElementsArry"]);if(publicInfosJSON["applyToOtherComp"]){Ext.getCmp("applyAllContainer").show();}else{Ext.getCmp("applyAllContainer").hide();}}});},buildInfosData:function(a,b){Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigInfosJson.jsp?test="+b+"&comp="+a,method:"POST",success:function(c){if(c.status==200&&!Ext.isEmpty(c.responseText)){var e=c.responseText;
publicInfosJSON=Ext.decode(e);var d=publicInfosJSON["infoGridArr"];Ext.getCmp("InfosViewGrid").getStore().removeAll();Ext.getCmp("InfosViewGrid").getStore().loadRawData(d);}}});},deleteInfoWindow:function(c){var d=c.get("InfoName");var e=publicInfosJSON["hiddenInfoObj"]["test"];var b=publicInfosJSON["comp"];
var a=publicInfosJSON["hiddenInfoObj"]["flag"];Ext.Msg.show({title:infosTitle,msg:infosalert_4,buttons:Ext.MessageBox.YESNO,icon:"iconConfirmation",fn:function(g){if(g=="yes"){var f=new Ext.LoadMask(Ext.getBody(),{msg:"Updating..."});f.show();Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgconfiginfospJson.jsp?test="+e+"&comp="+b+"&group="+d+"&flag="+a+"&delGroup=true",method:"POST",scope:this,success:function(h){if(h.status==200&&!Ext.isEmpty(h.responseText)){f.hide();
var k=Ext.decode(h.responseText);if(k["success"]){testInterViews.buildInfosData(k["comp"],k["test"]);}}}});}}});Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egconfiginfos",method:"POST",async:false});},showEditInfoWindow:function(b){var g=b.get("InfoName");var f=this;
var d=Ext.create("SpecificTestConfiguration.view.EgConfigInfosCreation");var e=publicInfosJSON["hiddenInfoObj"]["test"];var c=publicInfosJSON["hiddenInfoObj"]["comp"];var a=publicInfosJSON["hiddenInfoObj"]["flag"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgconfiginfospJson.jsp?test="+e+"&comp="+c+"&group="+g+"&action=modify&flag="+a,method:"POST",async:false,success:function(h){}});
Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigInfosJson.jsp?test="+e+"&comp="+c+"&group="+g+"&from=modify",method:"POST",async:false,success:function(h){if(h.status==200&&!Ext.isEmpty(h.responseText)){var k=h.responseText;publicInfosJSON=Ext.decode(k);d.show();if(Ext.getCmp("itemselectinfos").fromField.store.getCount()>=1){Ext.getCmp("itemselectinfos").fromField.store.removeAll();
}if(Ext.getCmp("itemselectinfos").toField.store.getCount()>=1){Ext.getCmp("itemselectinfos").toField.store.removeAll();}Ext.getCmp("groupnmeinfos").setValue("");Ext.getCmp("itemselectinfos").fromField.store.add(publicInfosJSON["managedArry"]);Ext.getCmp("itemselectinfos").toField.store.add(publicInfosJSON["allElementsArry"]);
Ext.getCmp("groupnmeinfos").setValue(g);Ext.getCmp("groupnmeinfos").setReadOnly(true);if(publicInfosJSON["applyToOtherComp"]){Ext.getCmp("applyAllContainer").show();}else{Ext.getCmp("applyAllContainer").hide();}}}});},getInterMediateHiddenFields:function(b){var c=publicInfosJSON[b];var a="";for(key in c){a+=key+"="+encodeURIComponent(c[key])+"&";
}return a;},applyAllCheckEvent:function(){var b=Ext.getCmp("applyAllCheck").getValue();var c="";var d=publicInfosJSON["from"];var a=this.getInterMediateHiddenFields("hiddenInfoObj");if(!Ext.isEmpty(a)&&a!=undefined){c=a;}if(!Ext.isEmpty(d)&&d!=undefined){c+="from="+d;}if(b){Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgApplyEjbConfigJson.jsp?"+c,method:"POST",async:false,success:function(f){if(f.status==200&&!Ext.isEmpty(f.responseText)){var e=Ext.decode(f.responseText);
Ext.getCmp("compMultiSelectContainer").show();if(!Ext.isEmpty(e["compArr"])&&e["compArr"]!=undefined){Ext.getCmp("availableCompMultiSelect").getStore().removeAll();Ext.getCmp("availableCompMultiSelect").getStore().loadRawData(e["compArr"]);}}}});}else{Ext.getCmp("availableCompMultiSelect").getStore().removeAll();
Ext.getCmp("compMultiSelectContainer").hide();}},updateConfigInfos:function(){var n=new Array();var t=new Array();var c=Ext.getCmp("itemselectinfos").fromField.store.getCount();var m=publicJson["testName"];var k=Ext.getCmp("componentType").getValue();var q=publicInfosJSON["from"];var x="true";var d=Ext.getCmp("groupnmeinfos").getValue();
if(q!=null&&q=="modify"){x="false";}if(c==0){Ext.Msg.show({title:infosTitle,msg:infosalert_1,buttons:Ext.Msg.OK,icon:"iconExclamation"});return;}if(!checkblank(d)){Ext.Msg.show({title:infosTitle,msg:enterGrpNme,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("groupnmeinfos").focus(true);
}});return;}else{if(!checkspace(d)){Ext.getCmp("groupnmeinfos").focus();return;}else{if(!checkspecialnomess(d,"`~!@#$%^&*()+=-/?'\"]}[{\\|;:.,><")){Ext.Msg.show({title:infosTitle,msg:infosalert_2,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("groupnmeinfos").focus(true);}});return;
}else{if(x=="true"){if(groupExists(d)){Ext.Msg.show({title:infosTitle,msg:infosalert_3,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("groupnmeinfos").focus(true);}});return;}}}}}var l=Ext.getCmp("itemselectinfos").toField.store;var s=Ext.getCmp("itemselectinfos").fromField.store;
var f="";var r="";for(var v=0;v<l.getCount();v++){var o=l.getAt(v).get("valueField");if(!Ext.isEmpty(o)&&o!=undefined){f+=","+o;}}for(var v=0;v<s.getCount();v++){var o=s.getAt(v).get("valueField");if(!Ext.isEmpty(o)&&o!=undefined){r+=","+o;}}if(!Ext.isEmpty(f)&&f.indexOf(",")==0){f=f.substring(1);}if(!Ext.isEmpty(r)&&r.indexOf(",")==0){r=r.substring(1);
}var u="true";var b=Ext.getCmp("componentName").getValue();if(!(b.indexOf(":")>-1)){b=b+":NULL";u="false";}var e=Ext.getCmp("applyAllCheck").getValue();var w="test="+m+"&comp="+b+"&group="+d+"&fassociate="+r+"&server="+k;if(e){var h=Ext.getCmp("availableCompMultiSelect").getValue();if(!Ext.isEmpty(h)&&h.length>0){var g=",";
for(var v=0;v<h.length;v++){var a=h[v];if(!Ext.isEmpty(a)&&a!=undefined){g+=a+",";}}if(!Ext.isEmpty(g)&&g.lastIndexOf(",")!=-1){g=g.substring(0,g.lastIndexOf(","));w+="&source=applyConfig&selectedComps="+g;}}}if((r!=""||f!="")&&x=="true"){Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgconfiginfospJson.jsp?flag="+u+"&"+w,method:"POST",async:false,success:function(y){Ext.getCmp("egconfiginfoscreation").destroy();
testInterViews.buildInfosData(b,m);}});}else{if((r!=""||f!="")&&x=="false"){Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgconfiginfospJson.jsp?edit=true&"+w,method:"POST",async:false,success:function(y){Ext.getCmp("egconfiginfoscreation").destroy();testInterViews.buildInfosData(b,m);}});}}Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egconfiginfos",method:"POST",async:false});
},configureVcTasks:function(){var e=Ext.getCmp("componentType").getValue();var c=Ext.getCmp("componentName").getValue();var b=Ext.getCmp("testType").getValue();var a=publicJson["testName"];var g=Ext.getCmp("unconfiguredCompType").getValue();var d="false";if(g){d="true";}var f="&componentType="+encodeURIComponent(e)+"&testType="+encodeURIComponent(b)+"&testName="+encodeURIComponent(a)+"&componentName="+encodeURIComponent(c)+"&clickedFrom="+clickedFrom+"&showUnconfigCompType="+d;
window.location.href="/final/admin/EgAgentSettings.jsp?fromPage=TestConfiguration&fromVc=VcTasks&requestFrom=EgConfigureComponentTests.jsp"+f;},configureVcEvents:function(){var e=Ext.getCmp("componentType").getValue();var c=Ext.getCmp("componentName").getValue();var b=Ext.getCmp("testType").getValue();
var a=publicJson["testName"];var g=Ext.getCmp("unconfiguredCompType").getValue();var d="false";if(g){d="true";}var f="&componentType="+encodeURIComponent(e)+"&testType="+encodeURIComponent(b)+"&testName="+encodeURIComponent(a)+"&componentName="+encodeURIComponent(c)+"&clickedFrom="+clickedFrom+"&showUnconfigCompType="+d;
window.location.href="/final/admin/EgAgentSettings.jsp?fromPage=TestConfiguration&fromVc=VcEvents&requestFrom=EgConfigureComponentTests.jsp"+f;},configAggregatee:function(){Ext.create("SpecificTestConfiguration.view.EgConfigAggregate").show();var a=Ext.getCmp("componentName").getValue();var b=Ext.getCmp("componentType").getValue();
var c=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigAggregateJson.jsp?test="+c+"&comp="+encodeURIComponent(a)+"&server="+b,method:"POST",async:false,success:function(d){if(d.status==200&&!Ext.isEmpty(d.responseText)){var e=d.responseText;publicAggJSON=Ext.decode(e);
}Ext.getCmp("itemselectAgg").fromField.store.add(publicAggJSON["enabledTests"]);Ext.getCmp("itemselectAgg").toField.store.add(publicAggJSON["disableTests"]);}});},configCompositee:function(){Ext.create("SpecificTestConfiguration.view.EgConfigComposite").show();var a=Ext.getCmp("componentName").getValue();
var b=Ext.getCmp("componentType").getValue();var c=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigCompositeJson.jsp?test="+c+"&comp="+encodeURIComponent(a)+"&server="+b,method:"POST",async:false,success:function(d){if(d.status==200&&!Ext.isEmpty(d.responseText)){var e=d.responseText;
publicAggJSON=Ext.decode(e);}Ext.getCmp("itemselectAgg").fromField.store.add(publicAggJSON["enabledTests"]);Ext.getCmp("itemselectAgg").toField.store.add(publicAggJSON["disableTests"]);}});},updateAggregatee:function(){var e=new Ext.LoadMask(Ext.getBody(),{msg:"Updating..."});e.show();var c=publicAggJSON["previousIncludedDescriptors"];
var d=new Array();var b=Ext.getCmp("componentName").getValue();var g=Ext.getCmp("componentType").getValue();var m=publicJson["testName"];var u=Ext.getCmp("itemselectAgg").fromField.store.getCount();var k=Ext.getCmp("itemselectAgg").toField.store.getCount();for(var t=0;t<k;t++){var v=Ext.getCmp("itemselectAgg").toField.store.getAt(t).get("valueField");
d[t]=v;}var h=new Array();for(var t=0;t<u;t++){var o=Ext.getCmp("itemselectAgg").fromField.store.getAt(t).get("valueField");var a=false;for(var s=0;s<d.length;s++){if(o==d[s]){a=true;break;}}if(!a){h[h.length]=o;}}var r=h;if(d==undefined){d="";}if(r==undefined){r="";}if(u>0){var n="false";var l="comp="+encodeURIComponent(b)+"&test="+m+"&server="+g;
if(!Ext.isEmpty(d)){for(var t in d){n="true";d[t]=filterEncode(d[t]);}}if(!Ext.isEmpty(r)){for(var t in r){n="true";r[t]=filterEncode(r[t]);}}if(n=="true"){Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgconfigaggregatepJson.jsp?"+l,method:"POST",params:{"previousIncludedDescriptors":filterEncode(c),"fdissociate":d,"n_fassociate":r},timeout:300000,success:function(w){var y=w.responseText;
publicJSON=Ext.decode(y);if(!Ext.isEmpty(y)&&w.status==200){var x=publicJSON["requestStatus"];if(x=="success"||x.indexOf("success")!=-1){var x=publicJSON["result"];Ext.Msg.show({title:x["title"],msg:x["message1"],buttons:Ext.Msg.OK,icon:"iconInformation"});}}}});}}else{Ext.Msg.show({title:pageName,msg:include_exclude_alert,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){}});
}e.hide();var f=Ext.getCmp("componentType").getValue();var q=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+f+"&componentType="+f+"&tName_HelpPage="+q+"&testName="+q,method:"POST"});},updateCompositee:function(){var g=new Ext.LoadMask(Ext.getBody(),{msg:"Updating..."});
g.show();var y=new Array();var e=publicAggJSON["previousIncludedDescriptors"];var x=publicAggJSON["masterInfoTestFound"];var o="";var h="";if(x){var m=publicAggJSON["previousIncludedMasterTestDescriptors"];if(m!=null&&m.indexOf(":")>-1){y=m.split(",");}o=publicAggJSON["masterInfoTest"];h=publicAggJSON["masterInfoTestDisplay"];
}var f=Ext.getCmp("itemselectAgg").getValue();var b=Ext.getCmp("itemselectAgg").getStore().getCount()==0;var c=Ext.getCmp("componentName").getValue();var l=Ext.getCmp("componentType").getValue();var r=publicJson["testName"];var n=new Array();for(var w=0;w<Ext.getCmp("itemselectAgg").getStore().getCount();
w++){var s=Ext.getCmp("itemselectAgg").getStore().getAt(w).get("valueField");var a=false;for(var v=0;v<f.length;v++){if(s==f[v]){a=true;break;}}if(!a){n[n.length]=s;}}var u=n;if(f==undefined){f="";}if(u==undefined){u="";}var d=true;if(x&&y.length>0&&f.length>0){for(var v=0;v<f.length;v++){if(y.indexOf(f[v])>-1){d=false;
break;}}}if(!d){Ext.Msg.show({title:pageName,msg:h+" "+masterTestInfoAlert,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){}});g.hide();}else{var q="previousIncludedDescriptors="+encodeURIComponent(e)+"&fdissociate="+encodeURIComponent(f)+"&n_fassociate="+encodeURIComponent(u)+"&comp="+encodeURIComponent(c)+"&test="+r+"&server="+l;
if(u!=""||f!=""||b){Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgconfigcompositepJson.jsp?"+q,method:"POST",success:function(z){g.hide();var B=z.responseText;publicJSON=Ext.decode(B);if(!Ext.isEmpty(B)&&z.status==200){var A=publicJSON["requestStatus"];if(A=="success"||A.indexOf("success")!=-1){var A=publicJSON["result"];
Ext.Msg.show({title:A["title"],msg:A["message1"],buttons:Ext.Msg.OK,icon:"iconInformation"});}}}});}else{g.hide();}var k=Ext.getCmp("componentType").getValue();var t=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+k+"&componentType="+k+"&tName_HelpPage="+t+"&testName="+t,method:"POST"});
}},configDbCreations:function(){var a=Ext.getCmp("host").getValue();var c=Ext.getCmp("port").getValue();var b=Ext.getCmp("componentName").getValue();var d=b.substring(b.lastIndexOf(":")+1);if(publicJson["cantopenDbUserCreation"]=="true"){Ext.Msg.show({title:dbTitle,msg:dbConn,buttons:Ext.Msg.OK,icon:"iconExclamation"});
}else{Ext.create("SpecificTestConfiguration.view.EgDbUserCreation").show();Ext.getCmp("hostnamedb").setValue(a).setReadOnly(true);Ext.getCmp("portdb").setValue(c).setReadOnly(true);Ext.getCmp("siddb").setValue(d).setReadOnly(true);Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egdbusercreation",method:"POST",async:false});
}},comboVersions:function(b){var a=Ext.getCmp("dbversion").getValue();if(a!=null&&a=="Oracle12.x"){pwd_flag="false";Ext.getCmp("syspwd").hide();Ext.getCmp("dbconnection_radioGrp").show();Ext.getCmp("dbconnection_radioGrp").setDisabled(false);}else{if(a!=null&&a=="Oracle 7.x"){pwd_flag="true";Ext.getCmp("dbconnection_radioGrp").hide();
Ext.getCmp("dbconnection_radioGrp").setDisabled(true);Ext.getCmp("syspwd").show();Ext.getCmp("syspwd").setValue("");Ext.getCmp("syspwd").backupValue="";}else{pwd_flag="false";Ext.getCmp("dbconnection_radioGrp").hide();Ext.getCmp("dbconnection_radioGrp").setDisabled(true);Ext.getCmp("syspwd").hide();}}Ext.getCmp("dbadmin").setValue("");
Ext.getCmp("dbadminpwd").setValue("");Ext.getCmp("dbadminpwd").backupValue="";Ext.getCmp("dbuser").setValue("");Ext.getCmp("dbuserpwd").setValue("");Ext.getCmp("dbuserpwd").backupValue="";Ext.getCmp("defaulttablespace").setValue("");Ext.getCmp("temptablespace").setValue("");},clearDbs:function(){Ext.getCmp("temptablespace").setValue("");
Ext.getCmp("defaulttablespace").setValue("");Ext.getCmp("dbuserpwd").setValue("");Ext.getCmp("dbuserpwd").backupValue="";Ext.getCmp("dbuser").setValue("");Ext.getCmp("dbadminpwd").setValue("");Ext.getCmp("dbadminpwd").backupValue="";Ext.getCmp("dbadmin").setValue("");var a=Ext.getCmp("dbversion").getValue();
if(a!=null&&a=="Oracle 7.x"){Ext.getCmp("syspwd").setValue("");}},ApplyNewDbs:function(){if(newdbupdated=="true"){Ext.getCmp("ApplyBTN").enable();var d=Ext.getCmp("dbuser").getValue();var a=Ext.getCmp("dbuserpwd").getValue();Ext.getCmp("user").setValue(d);Ext.getCmp("password").setValue(a);Ext.getCmp("password").backupValue=a;
Ext.getCmp("passwordconfirmpassword").setValue(a);Ext.getCmp("passwordconfirmpassword").backupValue=a;Ext.getCmp("egdbusercreation").destroy();}else{Ext.getCmp("ApplyBTN").disable();Ext.Msg.show({title:dbTitle,msg:invalidHName,buttons:Ext.Msg.OK,icon:"iconExclamation"});}var c=Ext.getCmp("componentType").getValue();
var b=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(c)+"&componentType="+encodeURIComponent(c)+"&tName_HelpPage="+b+"&testName="+b,method:"POST"});},AddNewDbs:function(f){newdbupdated="false";var r=Ext.getCmp("hostnamedb").getValue();
var d=Ext.getCmp("portdb").getValue();var k=Ext.getCmp("siddb").getValue();var e=Ext.getCmp("dbversion").getValue();var l=Ext.getCmp("syspwd").getValue();var m=Ext.getCmp("dbconnection1").getValue();var t="";if(m){t="cdb";}else{t="pdb";}var c=Ext.getCmp("dbadmin").getValue();var n=Ext.getCmp("dbadminpwd").getValue();
var q=Ext.getCmp("dbuser").getValue();var o=Ext.getCmp("dbuserpwd").getValue();var a=Ext.getCmp("defaulttablespace").getValue();var h=Ext.getCmp("temptablespace").getValue();var s=this;var g=s.isValidDbCredentials(e,a,h,q,c,n,o,l,t);if(g){var b="hostname="+r+"&port="+d+"&sid="+k+"&pwd_flag="+pwd_flag+"&version="+e+"&syspwd="+l+"&dbauser="+c+"&dbapwd="+n+"&dbuser="+encodeURIComponent(q)+"&dbuserpwd="+o+"&deftablespace="+a+"&temptablespace="+h+"&dbconnection="+(t);
Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgdbusercreationpJson.jsp?"+b,method:"POST",success:function(u){var y=u.responseText;publicJSON=Ext.decode(y);if(!Ext.isEmpty(y)&&u.status==200){var x=publicJSON["requestStatus"];if(x=="success"||x.indexOf("success")!=-1){newdbupdated="true";var w=publicJSON["result"];
Ext.Msg.show({title:w["title"],msg:w["message1"],buttons:Ext.Msg.OK,icon:"iconInformation"});Ext.getCmp("ApplyBTN").enable();}else{Ext.getCmp("ApplyBTN").disable();var v=publicJSON["error"];Ext.Msg.show({title:v["title"],msg:v["message1"],buttons:Ext.Msg.OK,icon:"iconExclamation"});}}}});}},isValidDbCredentials:function(d,b,e,k,c,h,l,f,o){var n="0123456789$#_";
var a=true;var m=/^[A-Za-z]+/;if(d=="-1"){Ext.Msg.show({title:dbTitle,msg:selectDBver,buttons:Ext.Msg.OK,icon:"iconExclamation"});a=false;}else{if(!checkblank(c)){Ext.Msg.show({title:dbTitle,msg:enterDBAdmin,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("dbadmin").focus(true);}});
a=false;}else{if(!checkspace(c)){Ext.getCmp("dbadmin").focus();a=false;}else{if(!checkspecial(c,"`~!@#$%^&*()+={}[]|\\:;\"'<>,.?/")){Ext.getCmp("dbadmin").focus();a=false;}else{if(h==""){Ext.Msg.show({title:dbTitle,msg:enterDBPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("dbadmin").focus(true);
}});a=false;}else{if(!checkspecialnomess(h,'"|')){Ext.Msg.show({title:dbTitle,msg:_notAllowCharInPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("dbadminpwd").focus(true);}});a=false;}else{if(!checkblank(k)){Ext.Msg.show({title:dbTitle,msg:enterDBUsr,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("dbuser").focus(true);
}});a=false;}else{if(!checkspace(k)){Ext.getCmp("dbuser").focus();a=false;}else{if(!checkspecial(k,'&"')){Ext.getCmp("dbuser").focus();a=false;}else{if(!m.test(k)){Ext.Msg.show({title:dbTitle,msg:DBNmeAlphabet,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("dbuser").focus(true);}});
a=false;}else{if(d=="Oracle12.x"&&o=="cdb"){var g=k.substring(0,3);if(!Ext.isEmpty(g)&&g.toLowerCase()!="c##"){Ext.Msg.show({title:dbTitle,msg:DbUsrMsg,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("dbuser").focus(true);}});a=false;}}else{if(l==""){Ext.Msg.show({title:dbTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("dbuserpwd").focus(true);
}});a=false;}else{if(!checkspecialnomess(l,'"|')){Ext.Msg.show({title:dbTitle,msg:_notAllowCharInPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("dbuserpwd").focus(true);}});a=false;}else{if(!checkblank(b)){Ext.Msg.show({title:dbTitle,msg:enterdeftb,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("defaulttablespace").focus(true);
}});a=false;}else{if(!checkspace(b)){Ext.getCmp("defaulttablespace").focus();a=false;}else{if(n.indexOf(b.charAt(0))>-1){Ext.Msg.show({title:dbTitle,msg:startswithalpha,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("defaulttablespace").focus(true);}});a=false;}else{if(!checkspecial(b,"`~!@%^&*()-+={}[]|\\:;\"'<>,.?/")){Ext.getCmp("defaulttablespace").focus();
a=false;}else{if(!checkblank(e)){Ext.Msg.show({title:dbTitle,msg:entertemptb,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("temptablespace").focus(true);}});a=false;}else{if(!checkspace(e)){Ext.getCmp("temptablespace").focus();a=false;}else{if(n.indexOf(e.charAt(0))>-1){Ext.Msg.show({title:dbTitle,msg:startstbwithalpha,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("temptablespace").focus(true);
}});a=false;}else{if(!checkspecial(e,"`~!@%^&*()-+={}[]|\\:;\"'<>,.?/")){Ext.getCmp("temptablespace").focus();a=false;}else{if(d=="Oracle7.x"){if(f==""){Ext.Msg.show({title:dbTitle,msg:enterDBPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("syspwd").focus(true);}});a=false;}else{if(!checkspecialnomess(f,'"|')){Ext.Msg.show({title:dbTitle,msg:_notAllowCharInPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("syspwd").focus(true);
}});a=false;}else{a=true;}}}else{a=true;}}}}}}}}}}}}}}}}}}}}}}return a;},showModificationWindow:function(g,h,c,b,e,d,f,a,k){Ext.widget("window",{title:g,id:h,width:500,resizable:false,padding:"5 10 10 10",border:false,modal:true,closeAction:"destory",doClose:function(){this.destroy();},dockedItems:[{xtype:"toolbar",id:"dockedToolBarBtn",name:"dockedToolBarBtn",dock:"bottom",layout:{type:"hbox",align:"stretch",pack:"center"},border:false,padding:10,ui:"toolbarBgWithTopBorder",items:[{xtype:"button",ui:"newButtonSmall",text:Update,width:80,id:"update_Process",name:"update_Process",listeners:{click:function(l){if(c=="process"){me.modifyProces();
}else{if(c=="service"){me.modifyService();}}}}}]}],items:[{xtype:"container",id:"mainContainer",layout:{type:"vbox",pack:"center",align:"center"},defaults:{labelSeparator:"",margin:e,width:b,labelWidth:100},items:[{xtype:"textfield",cls:"textbox",id:f,fieldLabel:a,allowBlank:false,margin:d},{xtype:"textfield",cls:"textbox",id:"process_pattern",fieldLabel:processPatternLabel,allowBlank:false,margin:"5 10 10 10",hidden:k}]}]}).show();
},showResultWindow:function(b,a){Ext.widget("window",{title:b,closeAction:"destory",bodyPadding:5,id:"resultWindow",resizable:false,scroll:true,width:310,height:130,modal:true,padding:"5 10 10 10",doClose:function(){this.destroy();},items:[{xtype:"displayfield",width:250,value:'<table align="left" border="0" bordercolor="blue" width="100%"><tr><td align="center" height="05"><table border="0" bordercolor="green"><tr><td align="center" width="07%"><img src="/final/images/spacer.gif" class="iconConfirmation"></td><td align="center" width="70%" valign="top">'+updateChanges+"</td></tr></table></td></tr></table>",margin:"00 10 00 00"},{xtype:"button",id:"yes_button",text:"Yes",ui:"newButtonSmall",width:70,margin:"10 05 15 70",listeners:{click:function(d){showMsgWindow=true;
var c=false;allowToAsignIndex=true;if(a=="service"){c=testInterViews.checkBeforeAdding("",true);}else{if(a=="process"){c=testInterViews.validateBeforeAdding("",true);}}if(c){if(a=="service"){me.updateService(true,"fromClose");}else{if(a=="process"){me.updateProcessPattern(true,"fromClose");}}}d.up("window").close();
}}},{xtype:"button",id:"no_button",text:"No",ui:"newButtonSmall",width:70,margin:"10 00 15 00",listeners:{click:function(c){if(a=="service"){Ext.getCmp("winservicesconfiguration").destroy();}else{Ext.getCmp("processconfiguration").destroy();}c.up("window").close();}}}]}).show();},addNewService:function(){isNewService=true;
isManualEdit=true;showMsgWindow=true;this.showModificationWindow(winServTitle,"egservicemodification","service",350,5,"15 10 15 10","service_name",serviceNameLabel,true);serviceWidget=Ext.getCmp("egservicemodification");Ext.getCmp("service_name").focus(false,200);},editService:function(b,a){isNewService=false;
if(!Ext.isEmpty(b)){isManualEdit=true;serviceName=Ext.getCmp("serviceNamesGrid").getStore().getAt(b).get("serviceName");}else{if(!Ext.isEmpty(a)){isManualEdit=false;serviceName=a;}}currentRow=serviceNamesArray.indexOf(serviceName);this.showModificationWindow(winServTitle,"egservicemodification","service",350,5,"15 10 15 10","service_name",serviceNameLabel,true);
serviceWidget=Ext.getCmp("egservicemodification");Ext.getCmp("service_name").setValue(serviceName);Ext.getCmp("service_name").focus(false,200);},modifyServices:function(){if(isManualEdit){showMsgWindow=true;}newServiceName=Ext.getCmp("service_name").getValue();var c=this.checkBeforeAdding(newServiceName,false);
if(c){var d=new Array();if(isNewService){var a=Ext.getCmp("winServiceSearchTrigger");if(!Ext.isEmpty(a.getValue())){a.reset();}serviceNamesArray.push(newServiceName);}else{serviceNamesArray.splice(serviceNamesArray.indexOf(serviceName),1,newServiceName);}if(!Ext.isEmpty(serviceNamesArray)&&serviceNamesArray!=undefined){for(var f=0;
f<serviceNamesArray.length;f++){if(serviceNamesArray[f]=="$unconfigured"){Ext.Array.remove(serviceNamesArray,"$unconfigured");continue;}var e={"serviceName":serviceNamesArray[f]};d.push(e);}}var b=Ext.getCmp("serviceNamesGrid");this.unCheckHeaderCheckBox(b);Ext.suspendLayouts();b.getStore().removeAll();
b.getStore().loadRawData(d);Ext.resumeLayouts(true);if(isNewService){Ext.Msg.show({title:winServTitle,msg:addedServiceMsg,buttons:Ext.MessageBox.YESNO,icon:"iconConfirmation",fn:function(g){if(g=="yes"){me.addService();}}});}else{if(!isManualEdit){showMsgWindow=false;serviceWidget.destroy();c=this.checkBeforeAdding(newServiceName,true);
}}if(isManualEdit){serviceWidget.destroy();}if(!Ext.isEmpty(d)){Ext.getCmp("winServiceSearchTrigger").enable();Ext.getCmp("DeleteOver").show();Ext.getCmp("updateService").enable();}}if(c&&!isManualEdit){serviceWidget.destroy();showMsgWindow=true;me.updateService(true);}return c;},winServicesSearch:function(){searchStr=Ext.getCmp("winServiceSearchTrigger").getValue();
searchList=new Array();var b=searchStr.split(" ");for(var c=0;c<b.length;c++){var f=b[c].trim();if(f!=""){searchList.push(f);}}var a=Ext.getCmp("serviceNamesGrid");a.show();Ext.getCmp("updateService").enable();if(searchStr==""||searchStr.length==0){Ext.get("MyTrigger_0").setStyle("display","none");Ext.get("MyTrigger_1").setStyle("display","block");
a.getStore().clearFilter();totalRecords=a.getStore().getCount();}else{Ext.get("MyTrigger_1").setStyle("display","none");Ext.get("MyTrigger_0").setStyle("display","block");var e=false;a.getStore().clearFilter();var d=new Ext.util.Filter({filterFn:function(h){var g=h.get("serviceName");if(doesExist(searchList,g)){return true;
}}});a.getStore().suspendEvents(true);a.getStore().filter(d);a.getStore().resumeEvents();totalRecords=a.getStore().getCount();}if(totalRecords==0){Ext.getCmp("updateService").disable(true);Ext.getCmp("DeleteOver").hide();a.getView().emptyText='<div class="egFlexCenterByColumnWise" style="height:95%"><div class="iconInformation"></div><div class="commonErrorMsgText">'+noSearchResult+"</div></div>";
a.getView().refresh();}else{Ext.getCmp("DeleteOver").show();}},removeSeletedServices:function(d){if(Ext.isEmpty(Ext.getCmp("winServiceSearchTrigger").getValue())){totalRecords=Ext.getCmp("serviceNamesGrid").store.totalCount;}var a=Ext.getCmp("serviceNamesGrid").getSelectionModel().getSelection();var e=new Array();
var c="";var b=false;if(Ext.isEmpty(d)&&d==undefined){if(a.length==0){Ext.Msg.show({title:winServTitle,msg:notSelectMsg,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){return false;}});return false;}b=true;c=confirmDeleteMsg1;}else{c=confirmDeleteMsg2+" '"+d+"'?";}Ext.Msg.show({title:winServTitle,msg:c,buttons:Ext.MessageBox.YESNO,icon:"iconConfirmation",fn:function(g){if(g=="yes"){if(b){for(var l=0;
l<a.length;l++){var f=a[l];var h=f.get("serviceName");if(h!=null){Ext.Array.remove(serviceNamesArray,h);totalRecords--;}}}else{Ext.Array.remove(serviceNamesArray,d);totalRecords--;}if(!Ext.isEmpty(serviceNamesArray)&&serviceNamesArray!=undefined){for(var l=0;l<serviceNamesArray.length;l++){var k={"serviceName":serviceNamesArray[l]};
e.push(k);}}var m=Ext.getCmp("serviceNamesGrid");Ext.suspendLayouts();m.getStore().removeAll();m.getStore().loadRawData(e);Ext.resumeLayouts(true);if(totalRecords==0){Ext.getCmp("winServiceSearchTrigger").reset();m.getSelectionModel().toggleUiHeader(false);}if(Ext.isEmpty(serviceNamesArray)){Ext.getCmp("winServiceSearchTrigger").disable();
Ext.getCmp("winServiceSearchTrigger").reset();Ext.getCmp("updateService").disable(true);Ext.getCmp("DeleteOver").hide();m.getView().emptyText='<div class="egFlexCenterByColumnWise" style="height:95%"><div class="iconInformation"></div><div class="commonErrorMsgText">'+noconfServices+".</div></div>";m.getView().refresh();
}}}});},winServiceConfigs:function(){var g=Ext.getCmp("serviceName").getValue();serviceNamesArray=new Array();var e=new Array();if(!Ext.isEmpty(g)&&g.indexOf(",")!=-1){tempServiceNamesArray=g.split(",");var a=tempServiceNamesArray.filter(function(h){return !Ext.isEmpty(h);});serviceNamesArray=a;}else{serviceNamesArray[0]=g;
}if(!Ext.getCmp(serviceNamesArray)&&serviceNamesArray!=undefined){for(var c=0;c<serviceNamesArray.length;c++){if(Ext.isEmpty(serviceNamesArray[c])||serviceNamesArray[c]=="$unconfigured"||serviceNamesArray[c].toLowerCase()=="$servicename"){Ext.Array.remove(serviceNamesArray,serviceNamesArray[c]);continue;
}for(var b=c+1;b<serviceNamesArray.length;b++){if(serviceNamesArray[c].toLowerCase()==serviceNamesArray[b].toLowerCase()){Ext.Array.splice(serviceNamesArray,serviceNamesArray.lastIndexOf(serviceNamesArray[b]),1);}}var f={"serviceName":serviceNamesArray[c]};e.push(f);}}Ext.create("SpecificTestConfiguration.view.WinServicesConfiguration").show();
var d=Ext.getCmp("serviceNamesGrid");d.getStore().clearFilter();d.getStore().loadRawData(e);if(Ext.isEmpty(e)){Ext.getCmp("winServiceSearchTrigger").disable();Ext.getCmp("updateService").disable(true);Ext.getCmp("DeleteOver").hide();}},updateServices:function(b,e){firstClick=true;Ext.getCmp("winServiceSearchTrigger").reset();
if(e!=undefined&&e=="fromButton"){showMsgWindow=true;b=testInterViews.checkBeforeAdding("",true);}if(b){var a=configuredServices.toString();this.callSessionAttribute(a);firstgetService=true;if(!Ext.isEmpty(a)&&a!=undefined){Ext.getCmp("serviceName").setValue(a);}else{Ext.getCmp("serviceName").setValue("$unconfigured");
}var d=Ext.getCmp("componentType").getValue();var c=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(d)+"&componentType="+encodeURIComponent(d)+"&tName_HelpPage="+c+"&testName="+c,method:"POST"});Ext.getCmp("winservicesconfiguration").destroy();
}},callSessionAttribute:function(a){Ext.Ajax.request({url:"SpecificTestConfiguration/data/setSessionAttributeJson.jsp",method:"POST",params:{"whereFrom":"serviceConfig","attributeName":"paramValue","attributeValue":filterEncode(a)},success:function(b){}});},checkBeforeAdding:function(o,v){var f=true;
var r="";var h="";var x="";var l="";var w=publicJson.hiddenObj["allowedParams"];var a=publicJson.hiddenObj["strTcKeywords"];var k=publicJson.hiddenObj["strDoubleQuotesParams"];configuredServices=new Array();finalArray=new Array();if(!Ext.isEmpty(w)){h=w;}if(!Ext.isEmpty(a)){x=a;x=x.split(",");}if(!Ext.isEmpty(k)){l=k;
l=l.split(",");}var n="serviceName";var g=true;for(var m=0;m<l.length;m++){if(l[m]==n.toLowerCase()){g=false;break;}}var q=serviceNamesArray.toString();if(!Ext.getCmp(q)&&q.indexOf(",")!=-1){configuredServices=q.split(",");}else{if(!Ext.isEmpty(q)){configuredServices[0]=q;}}if(v){pageTitle=winServTitle;
finalArray=configuredServices;}else{pageTitle=Ext.getCmp("egservicemodification").title;var d=false;for(var t=0;t<configuredServices.length;t++){if(!isNewService&&t==currentRow){continue;}sName=configuredServices[t];if(sName.toLowerCase()==o.toLowerCase()){d=true;break;}}if(d){Ext.Msg.show({title:pageTitle,msg:alreadyConfigMsgPart1+" '"+o+"' "+alreadyConfigMsgPart2,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("service_name").focus(false,200);
}});return false;}finalArray.push(o);}for(var t=0;t<finalArray.length;t++){configServiceName=finalArray[t];if(Ext.isEmpty(configServiceName)){Ext.Msg.show({title:pageTitle,msg:blankServiceMsg,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(v){testInterViews.editService("",configServiceName.toString());
}else{Ext.getCmp("service_name").focus(false,200);}}});f=false;break;}f=isAllowDoubleByte(configServiceName,winServTitle,"service","service_name",v,serviceErrMsg1,false);if(!f){break;}if(v){for(var s=t+1;s<finalArray.length;s++){var c=finalArray[s];if(Ext.isEmpty(c)){continue;}if(configServiceName.toLowerCase()==c.toLowerCase()){Ext.Msg.show({title:winServTitle,msg:addedSameService+" '"+configServiceName+"'. "+addedSameService1,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){return false;
}});f=false;break;}}}if(configServiceName.indexOf("$")>-1){var e=h.split(",");var b=false;var u=false;for(parameterCount=0;parameterCount<e.length;parameterCount++){temp_parameter=(e[parameterCount].toUpperCase());if((temp_parameter.replace(/^\s*/,"").replace(/\s*$/,""))==(n).toUpperCase()){for(var m=0;
m<x.length;m++){if(x[m].toLowerCase()==configServiceName.toLowerCase()){u=true;break;}}b=true;break;}}if(!b&&n.toLowerCase()!="filter"){Ext.Msg.show({title:pageTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(v){testInterViews.editService("",configServiceName.toString());
}else{Ext.getCmp("service_name").focus(false,200);}}});f=false;break;}if(u){Ext.Msg.show({title:pageTitle,msg:_tcKeyword,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(v){testInterViews.editService("",configServiceName.toString());}else{Ext.getCmp("service_name").focus(false,200);}}});f=false;
break;}}if(!checkblank(configServiceName)){Ext.Msg.show({title:pageTitle,msg:_checkempty,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(v){testInterViews.editService("",configServiceName.toString());}else{Ext.getCmp("service_name").focus(false,200);}}});f=false;break;}else{if(g&&!checkhyphen(configServiceName,n.toLowerCase())){Ext.Msg.show({title:pageTitle,msg:_checkhyphen,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(v){testInterViews.editService("",configServiceName.toString());
}else{Ext.getCmp("service_name").focus(false,200);}}});f=false;break;}}if(n.toLowerCase()=="servicename"){if(!checkspecialExt(configServiceName,'|"')){if(showMsgWindow){Ext.Msg.show({title:pageTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(v){testInterViews.editService("",configServiceName.toString());
}else{Ext.getCmp("service_name").focus(false,200);}}});}else{if(v){testInterViews.editService("",configServiceName.toString());}}f=false;break;}if(!Ext.isEmpty(configServiceName)&&configServiceName.indexOf(",")!=-1){Ext.Msg.show({title:pageTitle,msg:"Comma(s) are not allowed in service",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(v){testInterViews.editService("",configServiceName.toString());
}else{Ext.getCmp("service_name").focus(false,200);}}});f=false;break;}}}return f;},getSite:function(){var d=new Ext.LoadMask(Ext.getBody(),{msg:"Trying to get list of websites from the agent..."});d.show();var c=Ext.getCmp("host").getValue();var b=Ext.getCmp("port").getValue();var a=Ext.getCmp("componentName").getValue();
var g=Ext.getCmp("website_name").getValue();var f=a;if(!Ext.isEmpty(a)&&a.lastIndexOf(":NULL")!=-1){f=a.substring(0,a.lastIndexOf(":NULL"));}var e="SpecificTestConfiguration/data/siteListJson.jsp?componentName="+encodeURIComponent(a)+"&host="+c+"&port="+b+"&dummy=dummy";Ext.Ajax.request({url:e,method:"POST",timeout:60000000,success:function(k){d.hide();
var l=k.responseText;var m=Ext.decode(l);if(!Ext.isEmpty(l)&&k.status==200){if(m.timedout){Ext.Msg.show({title:"Site Information",msg:m.timeOutLabel,buttons:Ext.Msg.OK,icon:"iconInformation"});}else{if(m.showAlertMessage){Ext.Msg.show({title:"Site Information",msg:m.alertMessasge,buttons:Ext.Msg.OK,icon:"iconInformation"});
}else{var h=m.isSitesAvailable;Ext.create("SpecificTestConfiguration.view.SiteDetailedConfiguration").show();Ext.getCmp("sitedetailedconfiguration").action="include";Ext.getCmp("sitenameContainer").show();Ext.getCmp("buttonContainer").show();Ext.getCmp("sitename_popup").clearValue();Ext.getCmp("sitename_popup").getStore().clearFilter(true);
Ext.getCmp("sitename_popup").getStore().loadRawData(m["sitenames"]);if(!Ext.isEmpty(g)){Ext.getCmp("sitename_popup").setValue(g);}else{Ext.getCmp("sitename_popup").setValue("-1");}Ext.getCmp("sitename_update").setDisabled(false);if(!h){Ext.getCmp("sitename_update").setDisabled(true);}}}}},failue:function(h){d.hide();
}});},getExcludeSite:function(){var h=Ext.getCmp("exclude_websites").readOnly;if(h){return;}var d=new Ext.LoadMask(Ext.getBody(),{msg:"Trying to get list of websites from the agent..."});d.show();var c=Ext.getCmp("host").getValue();var b=Ext.getCmp("port").getValue();var a=Ext.getCmp("componentName").getValue();
var g=Ext.getCmp("exclude_websites").getValue();var f=a;if(!Ext.isEmpty(a)&&a.lastIndexOf(":NULL")!=-1){f=a.substring(0,a.lastIndexOf(":NULL"));}var e="SpecificTestConfiguration/data/siteListJson.jsp?componentName="+encodeURIComponent(a)+"&host="+c+"&port="+b+"&from=exclude";Ext.Ajax.request({url:e,method:"POST",timeout:60000000,success:function(l){d.hide();
var m=l.responseText;var n=Ext.decode(m);if(!Ext.isEmpty(m)&&l.status==200){if(n.timedout){Ext.Msg.show({title:"Site Information",msg:n.timeOutLabel,buttons:Ext.Msg.OK,icon:"iconInformation"});}else{if(n.showAlertMessage){Ext.Msg.show({title:"Site Information",msg:n.alertMessasge,buttons:Ext.Msg.OK,icon:"iconInformation"});
}else{var k=n.isSitesAvailable;Ext.create("SpecificTestConfiguration.view.SiteDetailedConfiguration").show();Ext.getCmp("sitedetailedconfiguration").action="exclude";Ext.getCmp("sitenameContainer").show();Ext.getCmp("buttonContainer").show();Ext.getCmp("sitename_popup").clearValue();Ext.getCmp("sitename_popup").getStore().clearFilter(true);
Ext.getCmp("sitename_popup").getStore().loadRawData(n["sitenames"]);if(!Ext.isEmpty(g)){Ext.getCmp("sitename_popup").setValue(g);}else{Ext.getCmp("sitename_popup").setValue("-1");}Ext.getCmp("sitename_update").setDisabled(false);if(!k){Ext.getCmp("sitename_update").setDisabled(true);}}}}},failue:function(k){d.hide();
}});},getServices:function(){Ext.create("SpecificTestConfiguration.view.ServiceDetailedConfiguration").show();var b=new Ext.LoadMask(Ext.getCmp("servicedetailedconfiguration"),{msg:"Trying to collect running services information from agent..."});b.show();Ext.getCmp("serviceSearchToolBar").hide();Ext.getCmp("serviceBtnToolBar").hide();
Ext.getCmp("serviceLabelContainer").hide();configServices="";var a=Ext.getCmp("componentName").getValue();var f=a;if(!Ext.isEmpty(a)&&a.lastIndexOf(":NULL")!=-1){f=a.substring(0,a.lastIndexOf(":NULL"));}var e=new Array();if(!Ext.isEmpty(serviceNamesArray)&&serviceNamesArray.indexOf(",")!=-1){e=e.split(",");
}else{e[0]=serviceNamesArray;}for(var d=0;d<serviceNamesArray.length;d++){configServiceName=serviceNamesArray[d];if(configServiceName.length==0){continue;}if(configServices.length==0){configServices=configServiceName;}else{configServices+=","+configServiceName;}}var g=Ext.isEmpty(serviceNamesArray);var c="SpecificTestConfiguration/data/winServicesListJson.jsp?componentName="+encodeURIComponent(a)+"&s_val="+encodeURIComponent(filterEncode(configServices))+"&dummy=dummy";
Ext.Ajax.request({url:c,method:"POST",timeout:60000000,params:{"noConf":g},success:function(h){var n=h.responseText;publicServiceJson=Ext.decode(n);if(!Ext.isEmpty(n)&&h.status==200){if(publicServiceJson.timedout||publicServiceJson.alreadyConfigured){Ext.getCmp("serviceselect").hide();var l={xtype:"label",html:'<div class="egFlexCenterByColumnWise" style="height:95%"><div class="iconInformation"></div><div class="commonErrorMsgText">'+publicServiceJson.timedoutOrAlreadyConfigLabel+".</div></div>"};
var k=Ext.getCmp("noServiceContainer");k.show();k.removeAll();k.add(l);}else{Ext.getCmp("serviceSearchToolBar").show();Ext.getCmp("serviceBtnToolBar").show();Ext.getCmp("serviceLabelContainer").show();Ext.getCmp("noServiceContainer").hide();Ext.getCmp("serviceselect").show();var m=publicServiceJson["winSerListArr"];
Ext.getCmp("servicetitle").setText(runningServices+" "+f);Ext.getCmp("serviceselect").getStore().loadRawData("");Ext.getCmp("serviceselect").getStore().loadRawData(m);}}b.hide();}});},winServicesViewSearch:function(){var b=Ext.getCmp("winServiceViewSearchTrigger").getValue();var a=Ext.getCmp("noServiceContainer");
if(b==""||b.length==0){Ext.get("Trigger_0").setStyle("display","none");Ext.get("Trigger_1").setStyle("display","block");}else{Ext.get("Trigger_1").setStyle("display","none");Ext.get("Trigger_0").setStyle("display","block");}Ext.Ajax.request({url:"SpecificTestConfiguration/data/winServicesListJson.jsp?",params:{"searchValue":filterEncode(b),},method:"POST",async:false,scope:this,success:function(c){if(c.status==200&&!Ext.isEmpty(c.responseText)){var e=c.responseText;
jsonData=Ext.decode(e);var f=jsonData["winSerListArr"];if(f!=null&&f!=""){a.hide();Ext.getCmp("serviceselect").show();Ext.getCmp("submitServiceDet").setDisabled(false);Ext.getCmp("serviceselect").store.removeAll();Ext.getCmp("serviceselect").getStore().loadRawData(f);}else{var d={xtype:"label",html:'<div class="egFlexCenterByColumnWise" style="height:95%"><div class="iconInformation"></div><div class="commonErrorMsgText">'+noSearchResult+"</div></div>"};
a.show();a.removeAll();Ext.getCmp("serviceselect").hide();a.add(d);Ext.getCmp("submitServiceDet").setDisabled(true);}}}});},submitservices:function(){firstClick=true;var g=Ext.getCmp("serviceselect").getValue();var a=g;var g=g.toString().trim();if(g.length<=1){a=g.toString().trim();}if(Ext.isEmpty(a)||a==undefined){Ext.Msg.show({title:pageName,msg:selectWinName,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return false;}var e=new Array();var c=new Array();if(!Ext.isEmpty(g)&&g.indexOf(",")!=-1){e=g.split(",");}else{e[0]=g;}if(!Ext.isEmpty(e)&&e!=undefined){for(var b=0;b<e.length;b++){serviceNamesArray.push(e[b]);}}if(!Ext.getCmp(serviceNamesArray)&&serviceNamesArray!=undefined){for(var b=0;b<serviceNamesArray.length;
b++){if(serviceNamesArray[b]=="$unconfigured"){Ext.Array.remove(serviceNamesArray,"$unconfigured");continue;}if(Ext.isEmpty(serviceNamesArray[b])){Ext.Array.remove(serviceNamesArray,serviceNamesArray[b]);continue;}var d={"serviceName":serviceNamesArray[b]};c.push(d);}}var f=Ext.getCmp("serviceNamesGrid");
this.unCheckHeaderCheckBox(f);Ext.suspendLayouts();f.getStore().removeAll();f.getStore().loadRawData(c);Ext.resumeLayouts(true);if(!Ext.isEmpty(c)){Ext.getCmp("updateService").enable();Ext.getCmp("DeleteOver").show();Ext.getCmp("winServiceSearchTrigger").enable();}Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=winservicesconfiguration",method:"POST"});
Ext.getCmp("servicedetailedconfiguration").destroy();Ext.getCmp("winServiceSearchTrigger").reset();firstClick=true;},winServiceConfigs_pr:function(){firstClick=true;Ext.create("SpecificTestConfiguration.view.MinMaxValues").show();noServiceConfig="false";var c=publicJson.prMeasureArray;if(c!=null&&c!=undefined&&c.length>0){inputsService=2;
var b=Ext.getCmp("ratingMeasuresContr");Ext.suspendLayouts();for(var q=0;q<c.length;q++){var t=publicJson["prMeasureObject"][c[q]];addServiceConf_pr(c[q],t,publicJson.prMeasureDispnameArray[q]);}Ext.resumeLayouts(true);b.doLayout();}var n=Ext.getCmp("min_max_values").getValue();if(n.indexOf("~")>0){var v=new Ext.util.HashMap();
var u=n.split("~~");for(var q=0;q<u.length;q++){var g=u[q].split("~");if(g.length==5){var a=g[0]+":"+g[1]+":"+g[2];var e=g[3]+":"+g[4];v.add(a,e);}}for(var q=0;q<c.length;q++){var l=c[q];var h=Ext.getCmp(l).getStore();for(var r=0;r<h.getCount();r++){var m=h.getAt(r).get("pr_measure_name");var o=h.getAt(r).get("associated_test_name");
var f=h.getAt(r).get("associated_measure_name");var d=h.getAt(r).get("associated_measure_min_threshold");var s=h.getAt(r).get("associated_measure_max_threshold");var a=Ext.util.Format.trim(m)+":"+Ext.util.Format.trim(o)+":"+Ext.util.Format.trim(f);if(v.containsKey(a)){var e=v.get(a);min_min_values=e.substring(0,e.indexOf(":"));
if(min_min_values=="-1"){min_min_values="None";}max_max_values=e.substring(e.indexOf(":")+1);if(max_max_values=="-1"){max_max_values="None";}h.getAt(r).set("associated_measure_min_threshold",min_min_values);h.getAt(r).set("associated_measure_max_threshold",max_max_values);}}}}Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=winservicesconfiguration",method:"POST",async:false});
},updateServices_pr:function(g){firstClick=true;var l="";var v=this.checkBeforeAdding_pr();if(v){var d=publicJson.prMeasureArray;if(d!=null&&d!=undefined&&d.length>0){for(var s=0;s<d.length;s++){var n=d[s];var f=Ext.getCmp(n);var a=f.getPlugin(n);Ext.getCmp(n).getSelectionModel().selectAll();var b=Ext.getCmp(n).getSelectionModel();
var m=Ext.getCmp(n).getStore();for(var t=0;t<m.getCount();t++){var o=m.getAt(t).get("pr_measure_name");var q=m.getAt(t).get("associated_test_name");var h=m.getAt(t).get("associated_measure_name");var e=m.getAt(t).get("associated_measure_min_threshold");var u=m.getAt(t).get("associated_measure_max_threshold");
if(e.toLowerCase()=="none"){e="-1";}if(u.toLowerCase()=="none"){u="-1";}l+="~~"+Ext.util.Format.trim(o)+"~"+Ext.util.Format.trim(q)+"~"+Ext.util.Format.trim(h)+"~"+Ext.util.Format.trim(e)+"~"+Ext.util.Format.trim(u);}}}if(l.length>0){l=l.substring(2);}Ext.getCmp("minmaxvalues").destroy();firstgetService=true;
if(!Ext.isEmpty(l)&&l!=undefined){Ext.getCmp("min_max_values").setValue(l);}else{Ext.getCmp("min_max_values").setValue("none");}}var c=Ext.getCmp("componentType").getValue();var r=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(c)+"&componentType="+encodeURIComponent(c)+"&tName_HelpPage="+r+"&testName="+r,method:"POST"});
},checkBeforeAdding_pr:function(){var h=publicJson.prMeasureArray;if(h!=null&&h!=undefined&&h.length>0){for(var e=0;e<h.length;e++){var a=h[e];var c=Ext.getCmp(a);var l=c.getPlugin(a);var d=c.getStore();for(var g=0;g<d.getCount();g++){var b=d.getAt(g).get("associated_measure_min_threshold");var f=d.getAt(g).get("associated_measure_max_threshold");
if(b.indexOf(" ")>-1){Ext.Msg.show({title:alertTitle,msg:alert28,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){l.startEditByPosition({row:g,column:5});}});return false;}if(f.indexOf(" ")>-1){Ext.Msg.show({title:alertTitle,msg:alert29,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){l.startEditByPosition({row:g,column:6});
}});return false;}if(b=="-1"){Ext.Msg.show({title:alertTitle,msg:alert30,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){l.startEditByPosition({row:g,column:5});}});allowUpdate=false;return false;}if(f=="-1"){Ext.Msg.show({title:alertTitle,msg:alert31,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){l.startEditByPosition({row:g,column:6});
}});allowUpdate=false;return false;}if(b.trim().toLowerCase()=="none"){b="-1";}if(f.trim().toLowerCase()=="none"){f="-1";}if(b=="-1"&&f=="-1"){Ext.Msg.show({title:alertTitle,msg:alert27,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){l.startEditByPosition({row:g,column:5});}});allowUpdate=false;
return false;}if(b=="-/-/-"||!correctFormat(b)){Ext.Msg.show({title:alertTitle,msg:alert32,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){l.startEditByPosition({row:g,column:5});}});return false;}else{if(!checkValidValue_rx(b)){Ext.Msg.show({title:alertTitle,msg:minimumValuesAlert,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){l.startEditByPosition({row:g,column:5});
}});return false;}else{if(!checkAscendingOrder(b)){Ext.Msg.show({title:alertTitle,msg:minThreshAlert,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){l.startEditByPosition({row:g,column:5});}});return false;}else{if((returnCode=validateTargetValues(b,true))!="0"){Ext.Msg.show({title:alertTitle,msg:returnCode,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){l.startEditByPosition({row:g,column:5});
}});return false;}}}}if(f=="-/-/-"||!correctFormat(f)){Ext.Msg.show({title:alertTitle,msg:alert33,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){l.startEditByPosition({row:g,column:6});}});return false;}else{if(!checkValidValue_rx(f)){Ext.Msg.show({title:alertTitle,msg:maximumValuesAlert,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){l.startEditByPosition({row:g,column:6});
}});return false;}else{if(!checkDescendingOrder(f)){Ext.Msg.show({title:alertTitle,msg:maxThreshAlert,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){l.startEditByPosition({row:g,column:6});}});return false;}else{if((returnCode=validateTargetValues(f,false))!="0"){Ext.Msg.show({title:alertTitle,msg:returnCode,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){l.startEditByPosition({row:g,column:6});
}});return false;}}}}}}}return true;},configVMLogDisplay:function(){Ext.create("SpecificTestConfiguration.view.EgVmLogDisplay").show();var a=publicJson["remoteAgent"];var d=publicJson["vmType"];var c=publicJson["componentName"];var b=new Ext.LoadMask(Ext.getBody(),{msg:"The log file is being loaded. This may take a few minutes..."});
b.show();Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgVmLogDisplayJson.jsp?componentName="+encodeURIComponent(a)+"&file=eg_vm.ini&vmtable=true&from=testconfig&phyServer="+encodeURIComponent(c)+"&type="+encodeURIComponent(d),method:"POST",asynchronous:false,timeout:10000000000,success:function(e){if(e.status==200&&!Ext.isEmpty(e.responseText)){var k=e.responseText;
jsonData=Ext.decode(k);b.hide();var g=jsonData["type"];var f=jsonData["componentViewGridArr"];var h=jsonData["componentViewGridTitle"];if(h!=null&&!Ext.isEmpty(h)){Ext.getCmp("egvmlogdisplay").setTitle(h);}if(f!=null&&!Ext.isEmpty(f)){Ext.getCmp("noVmDetailsContainer").hide();Ext.getCmp("hyperComponentViewGrid").hide();
Ext.getCmp("xenComponentViewGrid").hide();Ext.getCmp("esxComponentViewGrid").hide();var l=jsonData[g];if(g!=null&&!Ext.isEmpty(g)&&g=="esx"){if(l!=null&&!Ext.isEmpty(l)){Ext.getCmp("esx1").setText(l[0]);Ext.getCmp("esx2").setText(l[1]);Ext.getCmp("esx3").setText(l[2]);Ext.getCmp("esx4").setText(l[3]);
Ext.getCmp("esx5").setText(l[4]);Ext.getCmp("esx6").setText(l[5]);Ext.getCmp("esx7").setText(l[6]);}Ext.getCmp("esxComponentViewGrid").show();Ext.getCmp("esxComponentViewGrid").getStore().removeAll();Ext.getCmp("esxComponentViewGrid").getStore().loadRawData(f);}else{if(g!=null&&!Ext.isEmpty(g)&&(g=="xen"||g=="Xen")){if(l!=null&&!Ext.isEmpty(l)){Ext.getCmp("xen1").setText(l[0]);
Ext.getCmp("xen2").setText(l[1]);Ext.getCmp("xen3").setText(l[2]);Ext.getCmp("xen4").setText(l[3]);Ext.getCmp("xen5").setText(l[4]);}Ext.getCmp("xenComponentViewGrid").show();Ext.getCmp("xenComponentViewGrid").getStore().removeAll();Ext.getCmp("xenComponentViewGrid").getStore().loadRawData(f);}else{if(g!=null&&!Ext.isEmpty(g)&&g=="hyper"){if(l!=null&&!Ext.isEmpty(l)){Ext.getCmp("hyper1").setText(l[0]);
Ext.getCmp("hyper2").setText(l[1]);Ext.getCmp("hyper3").setText(l[3]);Ext.getCmp("hyper4").setText(l[2]);}Ext.getCmp("hyperComponentViewGrid").show();Ext.getCmp("hyperComponentViewGrid").getStore().removeAll();Ext.getCmp("hyperComponentViewGrid").getStore().loadRawData(f);}}}}else{NoDataMsg=jsonData["NoDataMsg"];
Ext.getCmp("xenComponentViewGrid").hide();Ext.getCmp("esxComponentViewGrid").hide();Ext.getCmp("hyperComponentViewGrid").hide();Ext.getCmp("noVmDetailsContainer").show();}}},failure:function(e){b.hide();}});},processConfigs:function(){submitFrmConcise=false;if(!Ext.isEmpty(Ext.getCmp("wide2"))&&Ext.getCmp("wide2").getValue()){submitFrmConcise=true;
}var k=Ext.getCmp("process").getValue();processNamesArray=new Array();var g=new Array();var f=new Array();if(!Ext.isEmpty(k)&&k.indexOf(",")!=-1){g=k.split(",");}else{g[0]=k;}if(!Ext.isEmpty(g)&&g!=undefined){for(var l=0;l<g.length;l++){var e=g[l];if(Ext.isEmpty(e)||e=="$name:$pattern"||e=="$processName:$processPattern"){continue;
}var c=e.indexOf(":")>-1?e.substring(0,e.indexOf(":")):e;var h=e.indexOf(":*")>-1?e.substring(e.indexOf(":")+2,e.lastIndexOf("*")):e.indexOf(":")>-1?e.substring(e.indexOf(":")+1):"";processNamesArray.push(c+":"+h);}}if(!Ext.isEmpty(processNamesArray)&&processNamesArray!=undefined){for(p=0;p<processNamesArray.length;
p++){if(Ext.isEmpty(processNamesArray[p])){Ext.Array.remove(processNamesArray,processNamesArray[p]);continue;}var d=processNamesArray[p];var n=d.indexOf(":")>-1?d.substring(0,d.indexOf(":")):d;var m=d.indexOf(":")>-1?d.substring(d.indexOf(":")+1):"";var b={"processName":n,"processPattern":m};f.push(b);
}}Ext.create("SpecificTestConfiguration.view.ProcessConfiguration").show();var a=Ext.getCmp("processNamesGrid");a.getStore().clearFilter();a.getStore().loadRawData(f);if(Ext.isEmpty(processNamesArray)){Ext.getCmp("processSearchTrigger").disable();Ext.getCmp("updateProcessPatt").disable(true);Ext.getCmp("DeleteOver").hide();
}Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=processconfiguration",method:"POST",async:false});},processesViewSearch:function(){var b=Ext.getCmp("processViewSearchTrigger").getValue();var d=Ext.getCmp("noProcessContainer");if(b==""||b.length==0){Ext.get("Trigger_0").setStyle("display","none");
Ext.get("Trigger_1").setStyle("display","block");}else{Ext.get("Trigger_1").setStyle("display","none");Ext.get("Trigger_0").setStyle("display","block");}var a=Ext.getCmp("processconciseconfiguration").title;var c="";if(a.toLowerCase().indexOf("detailed")>-1){a="detailed";c="processdetailedsel";}else{if(a.toLowerCase().indexOf("concise")>-1){a="concised";
c="processconcisesel";}}Ext.Ajax.request({url:"SpecificTestConfiguration/data/agentProcessListJson.jsp?",params:{"searchValue":filterEncode(b),"s_wide":a},method:"POST",async:false,scope:this,success:function(e){if(e.status==200&&!Ext.isEmpty(e.responseText)){var g=e.responseText;jsonData=Ext.decode(g);
var h=jsonData["absPathArr"];if(h!=null&&h!=""){d.hide();Ext.getCmp(c).show();Ext.getCmp("submitProcessConc").setDisabled(false);Ext.getCmp(c).store.removeAll();Ext.getCmp(c).getStore().loadRawData(h);}else{var f={xtype:"label",html:'<div class="egFlexCenterByColumnWise" style="height:100%"><div class="iconInformation"></div><div class="commonErrorMsgText">'+noProcessFound+".</div></div>"};
d.show();d.removeAll();Ext.getCmp(c).hide();d.add(f);Ext.getCmp("submitProcessConc").setDisabled(true);}}}});},winProcessSearch:function(){searchStr=Ext.getCmp("processSearchTrigger").getValue();searchList=new Array();var b=searchStr.split(" ");for(var c=0;c<b.length;c++){var e=b[c].trim();if(e!=""){searchList.push(e);
}}var a=Ext.getCmp("processNamesGrid");a.show();Ext.getCmp("updateProcessPatt").enable();if(searchStr==""||searchStr.length==0){Ext.get("MyTrigger_0").setStyle("display","none");Ext.get("MyTrigger_1").setStyle("display","block");a.getStore().clearFilter();totalRecords=a.getStore().getCount();}else{Ext.get("MyTrigger_1").setStyle("display","none");
Ext.get("MyTrigger_0").setStyle("display","block");a.getStore().clearFilter();var d=new Ext.util.Filter({filterFn:function(g){var f=g.get("processName");var h=g.get("processPattern");if(doesExist(searchList,f+h)){return true;}}});a.getStore().suspendEvents(true);a.getStore().filter(d);a.getStore().resumeEvents();
totalRecords=a.getStore().getCount();}if(totalRecords==0){Ext.getCmp("updateProcessPatt").disable(true);Ext.getCmp("DeleteOver").hide();a.getView().emptyText='<div class="egFlexCenterByColumnWise" style="height:95%"><div class="iconInformation"></div><div class="commonErrorMsgText">'+noProcessFound+"</div></div>";
a.getView().refresh();}else{Ext.getCmp("DeleteOver").show();}},removeSeletedProcess:function(g){if(Ext.isEmpty(Ext.getCmp("processSearchTrigger").getValue())){totalRecords=Ext.getCmp("processNamesGrid").store.totalCount;}var b=Ext.getCmp("processNamesGrid").getSelectionModel().getSelection();var e=new Array();
var d="";var c=false;if(Ext.isEmpty(g)&&g==undefined){if(b.length==0){Ext.Msg.show({title:processConfTitle,msg:notSelectMsg,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){return false;}});return false;}c=true;d=confirmDeleteMsg3;}else{var a=Ext.getCmp("processNamesGrid").getStore().getAt(g).get("processName");
var f=Ext.getCmp("processNamesGrid").getStore().getAt(g).get("processPattern");fullProcessPattern=a+":"+f;d=confirmDeleteMsg4+" '"+a+"'?";}Ext.Msg.show({title:processConfTitle,msg:d,buttons:Ext.MessageBox.YESNO,icon:"iconConfirmation",fn:function(n){if(n=="yes"){if(c){for(var q=0;q<b.length;q++){var s=b[q];
var l=s.get("processName");var o=s.get("processPattern");var r=l+":"+o;if(r!=null){Ext.Array.remove(processNamesArray,r);totalRecords--;}}}else{Ext.Array.remove(processNamesArray,fullProcessPattern);totalRecords--;}if(!Ext.isEmpty(processNamesArray)&&processNamesArray!=undefined){for(var q=0;q<processNamesArray.length;
q++){var m=processNamesArray[q];var l=m.substring(0,m.indexOf(":"));var o=m.substring(m.indexOf(":")+1);var k={"processName":l,"processPattern":o};e.push(k);}}var h=Ext.getCmp("processNamesGrid");Ext.suspendLayouts();h.getStore().removeAll();h.getStore().loadRawData(e);Ext.resumeLayouts(true);if(totalRecords==0){Ext.getCmp("processSearchTrigger").reset();
h.getSelectionModel().toggleUiHeader(false);}if(Ext.isEmpty(processNamesArray)){Ext.getCmp("updateProcessPatt").disable(true);Ext.getCmp("processSearchTrigger").disable();Ext.getCmp("processSearchTrigger").reset();Ext.getCmp("DeleteOver").hide();h.getView().emptyText='<div class="egFlexCenterByColumnWise" style="height:95%"><div class="iconInformation"></div><div class="commonErrorMsgText">'+noconfProcess+".</div></div>";
h.getView().refresh();}}}});},addNewProcess:function(){isNewProcess=true;isManualEdit=true;this.showModificationWindow(processConfTitle,"egprocessmodification","process",450,10,"10 10 5 10","process_name",processNameLabel,false);processWidget=Ext.getCmp("egprocessmodification");Ext.getCmp("process_name").focus(false,200);
},editProcess:function(d,c,b,a){curentIndex=-1;if(a!=undefined){curentIndex=a;}isNewProcess=false;if(!Ext.isEmpty(d)){isManualEdit=true;processName=Ext.getCmp("processNamesGrid").getStore().getAt(d).get("processName");processPattern=Ext.getCmp("processNamesGrid").getStore().getAt(d).get("processPattern");
}else{if(!Ext.isEmpty(c)){isManualEdit=false;processName=c.indexOf(":")>-1?c.substring(0,c.indexOf(":")):c;processPattern=c.indexOf(":")>-1?c.substring(c.indexOf(":")+1):"";}}currentRow=processNamesArray.indexOf(processName+":"+processPattern);this.showModificationWindow(processConfTitle,"egprocessmodification","process",450,10,"10 10 5 10","process_name",processNameLabel,false);
processWidget=Ext.getCmp("egprocessmodification");Ext.getCmp("process_name").setValue(processName);Ext.getCmp("process_pattern").setValue(processPattern);if(b){Ext.getCmp("process_name").focus(false,200);}else{Ext.getCmp("process_pattern").focus(false,200);}},modifyProceses:function(){if(isManualEdit){showMsgWindow=true;
}newProcessName=Ext.getCmp("process_name").getValue();newProcessPattern=Ext.getCmp("process_pattern").getValue();var e=this.validateBeforeAdding(newProcessName+":"+newProcessPattern,false);if(e){if(isNewProcess){var g=Ext.getCmp("processSearchTrigger");if(!Ext.isEmpty(g.getValue())){g.reset();}var f=newProcessName+":"+newProcessPattern;
processNamesArray.push(f);}else{var m=processName+":"+processPattern;var f=newProcessName+":"+newProcessPattern;if(curentIndex!=-1){processNamesArray.splice(curentIndex,1,f);}else{processNamesArray.splice(processNamesArray.indexOf(m),1,f);}}var a=new Array();if(!Ext.isEmpty(processNamesArray)&&processNamesArray!=undefined){for(var l=0;
l<processNamesArray.length;l++){var d=processNamesArray[l];if(Ext.isEmpty(d)||d=="$name:$pattern"){Ext.Array.remove(processNamesArray,d);continue;}var c=d.substring(0,d.indexOf(":"));var k=d.substring(d.indexOf(":")+1);var b={"processName":c,"processPattern":k};a.push(b);}}var h=Ext.getCmp("processNamesGrid");
this.unCheckHeaderCheckBox(h);Ext.suspendLayouts();h.getStore().removeAll();h.getStore().loadRawData(a);Ext.resumeLayouts(true);if(isNewProcess){Ext.Msg.show({title:processConfTitle,msg:addedProcessMsg,buttons:Ext.MessageBox.YESNO,icon:"iconConfirmation",fn:function(n){if(n=="yes"){me.addProcess();}}});
}else{if(!isManualEdit){showMsgWindow=false;processWidget.destroy();e=this.validateBeforeAdding(newProcessName+":"+newProcessPattern,true);}}if(isManualEdit){processWidget.destroy();}if(!Ext.isEmpty(a)){Ext.getCmp("updateProcessPatt").enable();Ext.getCmp("processSearchTrigger").enable();Ext.getCmp("DeleteOver").show();
}}if(e&&!isManualEdit){showMsgWindow=true;processWidget.destroy();me.updateProcessPattern(true);}},clearProcessPatterns:function(b){Ext.Array.erase(processNamesArray,0,processNamesArray.length);Ext.getCmp("updateProcessPatt").disable(true);Ext.getCmp("processSearchTrigger").disable(true);Ext.getCmp("DeleteOver").hide();
var a=Ext.getCmp("processNamesGrid");Ext.suspendLayouts();a.getStore().removeAll();a.getView().emptyText='<div class="egFlexCenterByColumnWise" style="height:95%"><div class="iconInformation"></div><div class="commonErrorMsgText">'+noconfProcess+".</div></div>";a.getView().refresh();Ext.resumeLayouts(true);
},getProcessPatterns:function(){var n=publicJson["componentName"];if(n!=null&&n.indexOf(":NULL")>-1){n=n.substring(0,n.indexOf(":NULL"));}var l=false;var a=false;if(!Ext.isEmpty(Ext.getCmp("wide1"))&&Ext.getCmp("wide1")!=undefined){a=true;l=Ext.getCmp("wide1").getValue();}var g="";var h="";var k="";Ext.create("SpecificTestConfiguration.view.ProcessConciseConfiguration").show();
if(submitFrmConcise){g="true";k="concise";}else{g="false";k="detailed";}var d=new Ext.LoadMask(Ext.getCmp("processconciseconfiguration"),{msg:"Trying to collect running processes information from agent..."});d.show();Ext.getCmp("processBtnToolBar").hide();Ext.getCmp("processSearchToolBar").hide();Ext.getCmp("processLabelContainer").hide();
configProcess="";var m=Ext.getCmp("process").getValue();processCompName=Ext.getCmp("componentName").getValue();var o=new Array();if(!Ext.isEmpty(m)&&m.indexOf(",")!=-1){o=m.split(",");}else{o[0]=m;}for(var f=0;f<processNamesArray.length;f++){var c=processNamesArray[f];if(Ext.isEmpty(c)){continue;}if(configProcess.length==0){configProcess=c;
}else{configProcess+=","+c;}}var e=Ext.isEmpty(processNamesArray);var b="SpecificTestConfiguration/data/agentProcessListJson.jsp?componentName="+encodeURIComponent(processCompName)+"&s_wide="+k+"&showOnlyConcise="+g+"&dummy=dummy";Ext.Ajax.request({url:b,timeout:600000000,method:"POST",params:{s_val:filterEncode(configProcess),"noConf":e},success:function(r){var u=r.responseText;
publicProcessJson=Ext.decode(u);if(!Ext.isEmpty(u)&&r.status==200){var t=publicProcessJson["absPathArr"];var v=publicProcessJson["s_wide"];if(publicProcessJson.timedout||publicProcessJson.alreadyConfigured){var s=Ext.getCmp("noProcessContainer");Ext.getCmp("processdetailedsel").hide();Ext.getCmp("processconcisesel").hide();
var q={xtype:"label",html:'<div class="egFlexCenterByColumnWise" style="height:95%"><div class="iconInformation"></div><div class="commonErrorMsgText">'+publicProcessJson.timedoutOrAlreadyConfigLabel+".</div></div>"};s.show();s.removeAll();s.add(q);}else{Ext.getCmp("processLabelContainer").show();Ext.getCmp("noProcessContainer").hide();
Ext.getCmp("processSearchToolBar").show();Ext.getCmp("processBtnToolBar").show();if(!Ext.isEmpty(v)&&v!=undefined&&v=="detailed"){Ext.getCmp("processdetailedsel").show();if(a){Ext.getCmp("processDetailedbtn").show();Ext.getCmp("processconcisesel").hide();Ext.getCmp("processConcisebtn").hide();}h=Ext.getCmp("processdetailedsel");
Ext.getCmp("processconciseconfiguration").setTitle(processConciseTitle+" - "+detailedView);Ext.getCmp("processsel").setText(runningProcess+" "+n);}else{Ext.getCmp("processconcisesel").show();if(a){Ext.getCmp("processConcisebtn").show();Ext.getCmp("processdetailedsel").hide();Ext.getCmp("processDetailedbtn").hide();
}h=Ext.getCmp("processconcisesel");Ext.getCmp("processconciseconfiguration").setTitle(processConciseTitle+" - "+conciseView);Ext.getCmp("processsel").setText(runningProcess+" "+n);}h.getStore().loadRawData(t);}}d.hide();}});},getDetailedPatterns:function(){if(!Ext.isEmpty(processNamesArray)){Ext.Msg.show({title:processConfTitle,msg:Concisetodetailed,buttons:Ext.MessageBox.YESNO,icon:"iconConfirmation",fn:function(b){testInterViews.confirmConciseDelete(b);
Ext.getCmp("processViewSearchTrigger").reset();}});}else{var a=publicJson["componentName"];if(a!=null&&a.indexOf(":NULL")>-1){a=a.substring(0,a.indexOf(":NULL"));}Ext.getCmp("processconciseconfiguration").hide();Ext.getCmp("processconciseconfiguration").show();Ext.getCmp("processViewSearchTrigger").reset();
Ext.getCmp("processconciseconfiguration").setWidth(850);Ext.getCmp("processdetailedsel").show();Ext.getCmp("processDetailedbtn").show();Ext.getCmp("processconcisesel").hide();Ext.getCmp("processConcisebtn").hide();showConcise="false";s_view="detailed";last_view="detailed";storeObj=Ext.getCmp("processdetailedsel");
Ext.getCmp("processconciseconfiguration").setTitle(processConciseTitle+" - "+detailedView);Ext.getCmp("processsel").setText(runningProcess+" "+a);testInterViews.confirmConciseDelete("yes");}},confirmConciseDelete:function(c){if(c=="yes"){this.clearProcessPatterns();var b="SpecificTestConfiguration/data/agentProcessListJson.jsp?componentName="+encodeURIComponent(processCompName)+"&s_wide=detailed&showOnlyConcise=true&dummy=dummy&deleteConfiguredPatterns=true";
Ext.Ajax.request({url:b,method:"POST",params:{s_val:filterEncode(configProcess)},success:function(d){var f=d.responseText;publicDelJson=Ext.decode(f);if(!Ext.isEmpty(f)&&d.status==200){var e=publicDelJson["absPathArr"];storeObj.getStore().loadRawData(e);}}});var a=publicJson["componentName"];if(a!=null&&a.indexOf(":NULL")>-1){a=a.substring(0,a.indexOf(":NULL"));
}Ext.getCmp("processconciseconfiguration").setWidth(850);Ext.getCmp("processdetailedsel").show();Ext.getCmp("processDetailedbtn").show();Ext.getCmp("processconcisesel").hide();Ext.getCmp("processConcisebtn").hide();showConcise="false";s_view="detailed";last_view="detailed";storeObj=Ext.getCmp("processdetailedsel");
Ext.getCmp("processconciseconfiguration").setTitle(processConciseTitle+" - "+detailedView);Ext.getCmp("processsel").setText(runningProcess+" "+a);}},confirmDetailedDelete:function(c){if(c=="yes"){this.clearProcessPatterns();var b="SpecificTestConfiguration/data/agentProcessListJson.jsp?componentName="+encodeURIComponent(processCompName)+"&s_wide=concise&showOnlyConcise=false&dummy=dummy&deleteConfiguredPatterns=true";
Ext.Ajax.request({url:b,method:"POST",params:{s_val:filterEncode(configProcess)},success:function(d){var f=d.responseText;publicDelJson=Ext.decode(f);if(!Ext.isEmpty(f)&&d.status==200){var e=publicDelJson["absPathArr"];storeObj.getStore().loadRawData(e);}}});Ext.getCmp("processconciseconfiguration").setWidth(850);
Ext.getCmp("processconcisesel").show();Ext.getCmp("processConcisebtn").show();Ext.getCmp("processdetailedsel").hide();Ext.getCmp("processDetailedbtn").hide();showConcise="false";s_view="concise";last_view="concise";var a=publicJson["componentName"];if(a!=null&&a.indexOf(":NULL")>-1){a=a.substring(0,a.indexOf(":NULL"));
}storeObj=Ext.getCmp("processconcisesel");Ext.getCmp("processconciseconfiguration").setTitle(processConciseTitle+" - "+conciseView);Ext.getCmp("processsel").setText(runningProcess+" "+a);}},getConcisePatterns:function(){if(!Ext.isEmpty(processNamesArray)){Ext.Msg.show({title:processConfTitle,msg:detailedtoConcise,buttons:Ext.MessageBox.YESNO,icon:"iconConfirmation",fn:function(b){testInterViews.confirmDetailedDelete(b);
Ext.getCmp("processViewSearchTrigger").reset();}});}else{Ext.getCmp("processconciseconfiguration").setWidth(850);Ext.getCmp("processconcisesel").show();Ext.getCmp("processConcisebtn").show();Ext.getCmp("processViewSearchTrigger").reset();Ext.getCmp("processdetailedsel").hide();Ext.getCmp("processDetailedbtn").hide();
showConcise="false";s_view="concise";last_view="concise";var a=publicJson["componentName"];if(a!=null&&a.indexOf(":NULL")>-1){a=a.substring(0,a.indexOf(":NULL"));}storeObj=Ext.getCmp("processconcisesel");Ext.getCmp("processconciseconfiguration").setTitle(processConciseTitle+" - "+conciseView);Ext.getCmp("processsel").setText(runningProcess+" "+a);
testInterViews.confirmDetailedDelete("yes");}},validateBeforeAdding:function(k,o){isAllowToUpdate=true;var n=new Array();if(!Ext.isEmpty(k)&&!o){msgWindowTitle=Ext.getCmp("egprocessmodification").title;var g=false;for(var f=0;f<processNamesArray.length;f++){if(!isNewProcess&&f==currentRow){continue;}var a=processNamesArray[f];
existingName=a.substring(0,a.indexOf(":"));var m=k.substring(0,k.indexOf(":"));if(existingName.toLowerCase()==m.toLowerCase()){g=true;break;}}if(g){Ext.Msg.show({title:msgWindowTitle,msg:alreadyConfigProcessPart1+" '"+existingName+"' "+alreadyConfigProcessPart2,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("process_name").focus(false,200);
}});return false;}else{n.push(k);}}else{msgWindowTitle=processConfTitle;n=processNamesArray;}for(var f=0;f<n.length;f++){var a=n[f];var e=a.indexOf(":")>-1?a.substring(0,a.indexOf(":")):a;var h=a.indexOf(":")>-1?a.substring(a.indexOf(":")+1):"";if(Ext.isEmpty(e)&&!o){Ext.Msg.show({title:msgWindowTitle,msg:notprocessNme,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(o){testInterViews.editProcess("",a,true);
}else{Ext.getCmp("process_name").focus(false,200);}}});isAllowToUpdate=false;break;}if(!validateProcessName(e)){if(showMsgWindow){Ext.Msg.show({title:msgWindowTitle,msg:notProcessSpl,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(o){testInterViews.editProcess("",a,true);}else{Ext.getCmp("process_name").focus(false,200);
}}});}else{if(o){testInterViews.editProcess("",a,true);}}isAllowToUpdate=false;break;}isAllowToUpdate=isAllowDoubleByte(a,msgWindowTitle,"process","process_name",o,patternErrorMsg3,true);if(!isAllowToUpdate){break;}isAllowToUpdate=isAllowDoubleByte(a,msgWindowTitle,"process","process_pattern",o,patternErrorMsg4,false);
if(!isAllowToUpdate){break;}if(((e+":"+h)=="$processName:$processPattern")||((e+":"+h)=="$name:$pattern")){Ext.Msg.show({title:msgWindowTitle,msg:_tcKeyword,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(o){testInterViews.editProcess("",a,true);}else{Ext.getCmp("process_name").focus(false,200);
}}});isAllowToUpdate=false;break;}if(Ext.isEmpty(h)){Ext.Msg.show({title:msgWindowTitle,msg:alert_1,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(o){testInterViews.editProcess("",a,false);}else{Ext.getCmp("process_pattern").focus(false,200);}}});isAllowToUpdate=false;break;}if(!validateProcessPattern(h,submitFrmConcise)){if(showMsgWindow){Ext.Msg.show({title:msgWindowTitle,msg:patternErrorMsg1,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(o){testInterViews.editProcess("",a,false);
}else{Ext.getCmp("process_pattern").focus(false,200);}}});}else{if(o){testInterViews.editProcess("",a,true);}}isAllowToUpdate=false;break;}if(o){for(j=f+1;j<processNamesArray.length;j++){var l=processNamesArray[j];if(Ext.isEmpty(l)){continue;}var c=l.substring(0,l.indexOf(":"));if(e==c){var d=l;if(allowToAsignIndex){procIndex=j;
allowToAsignIndex=false;}Ext.Msg.show({title:msgWindowTitle,msg:alreadyConfigProcessPart1+" '"+d.substring(0,l.indexOf(":"))+"' "+alreadyConfigProcessPart2,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(o){testInterViews.editProcess("",d,true,procIndex);}else{Ext.getCmp("process_name").focus(false,200);
}}});isAllowToUpdate=false;return isAllowToUpdate;}else{if(e.toLowerCase()==c.toLowerCase()){var d=l;if(allowToAsignIndex){procIndex=j;allowToAsignIndex=false;}Ext.Msg.show({title:msgWindowTitle,msg:alert_3,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(o){testInterViews.editProcess("",d,true,procIndex);
}else{Ext.getCmp("process_name").focus(false,200);}}});isAllowToUpdate=false;return isAllowToUpdate;}}}}var b=this.checkBeforeAddingProcess(a,o);if(!b){isAllowToUpdate=false;break;}}return isAllowToUpdate;},updateProcessPatterns:function(c,d){var k="";if(d!=undefined&&d=="fromButton"){showMsgWindow=true;
allowToAsignIndex=true;c=testInterViews.validateBeforeAdding("",true);}if(c){if(!Ext.isEmpty(processNamesArray)&&processNamesArray!=undefined){for(var f=0;f<processNamesArray.length;f++){var a=processNamesArray[f];var e=a.substring(0,a.indexOf(":"));var g=a.substring(a.indexOf(":")+1);g=(g.substring(0,1)=="*")?g.substring(1):g;
g=(g.lastIndexOf("*")==g.length-1)?g.substring(0,g.length-1):g;if(k.length==0){k=e+":*"+g+"*";}else{k+=","+e+":*"+g+"*";}}}Ext.Ajax.request({url:"SpecificTestConfiguration/data/setSessionAttributeJson.jsp",method:"POST",params:{"attributeName":"paramValue","attributeValue":filterEncode(k)},async:false,success:function(l){}});
firstgetProcess=true;var b=publicJson["testName"];if(!Ext.isEmpty(k)&&k!=undefined){Ext.getCmp("process").setValue(k);}else{Ext.getCmp("process").setValue(b=="WinProcessTest"?"$name:$pattern":"$processName:$processPattern");}if(submitFrmConcise){if(!Ext.isEmpty(Ext.getCmp("wide1"))&&Ext.getCmp("wide1")!=undefined){Ext.getCmp("wide1").setValue(false);
Ext.getCmp("wide2").setValue(true);}}else{if(!Ext.isEmpty(Ext.getCmp("wide1"))&&Ext.getCmp("wide1")!=undefined){Ext.getCmp("wide1").setValue(true);Ext.getCmp("wide2").setValue(false);}}var h=Ext.getCmp("componentType").getValue();Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+h+"&componentType="+h+"&tName_HelpPage="+b+"&testName="+b,method:"POST"});
Ext.getCmp("processconfiguration").destroy();}},checkBeforeAddingProcess:function(q,v){var w=publicJson.hiddenObj["allowedParams"];var a=publicJson.hiddenObj["strTcKeywords"];var k=publicJson.hiddenObj["strDoubleQuotesParams"];if(!Ext.isEmpty(w)){h=w;}if(!Ext.isEmpty(a)){y=a;y=y.split(",");}if(!Ext.isEmpty(k)){m=k;
m=m.split(",");}var f=true;var t="";var h="";var y="";var m="";var o="process";var g=true;for(var n=0;n<m.length;n++){if(m[n]==o.toLowerCase()){g=false;break;}}if(q.indexOf("$")>-1){var e=h.split(",");var b=false;var u=false;for(parameterCount=0;parameterCount<e.length;parameterCount++){temp_parameter=(e[parameterCount].toUpperCase());
if((temp_parameter.replace(/^\s*/,"").replace(/\s*$/,""))==(o).toUpperCase()){for(var n=0;n<y.length;n++){if(y[n].toLowerCase()==q.toLowerCase()){u=true;break;}}b=true;break;}}if(!b&&o.toLowerCase()!="filter"&&o.toLowerCase()!="process"){Ext.Msg.show({title:msgWindowTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(v){testInterViews.editProcess("",q,true);
}else{Ext.getCmp("process_name").focus(false,200);}}});return false;}if(u){Ext.Msg.show({title:msgWindowTitle,msg:_tcKeyword,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(v){testInterViews.editProcess("",q,true);}else{Ext.getCmp("process_name").focus(false,200);}}});return false;}}if(!checkblank(q)){Ext.Msg.show({title:msgWindowTitle,msg:_checkempty,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(v){testInterViews.editProcess("",q,true);
}else{Ext.getCmp("process_name").focus(false,200);}}});return false;}else{if(g&&!checkhyphen(q,o.toLowerCase())){Ext.Msg.show({title:msgWindowTitle,msg:_checkhyphen,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(v){testInterViews.editProcess("",q,true);}else{Ext.getCmp("process_name").focus(false,200);
}}});return false;}}if(o.toLowerCase()=="process"){var s=q.replace(/~/g,"");if(s.toUpperCase()!="NONE"){var d="process_pattern";var r=false;var l=q.substring(0,q.indexOf(":"));var c=q.substring(q.indexOf(":")+1);var x=processvalidation(l+":dummy","textfield");if(x.success){x=processvalidation(c+":dummy","textfield");
}else{d="process_name";r=true;}if(!x.success){if(showMsgWindow){Ext.Msg.show({title:msgWindowTitle,msg:x.msg,async:false,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(v){testInterViews.editProcess("",q,r);}else{Ext.getCmp(d).focus(false,200);}}});}else{Ext.MessageBox.hide();testInterViews.editProcess("",q,r);
}return false;}}}return true;},processWindowClose:function(){var a=false;if(!Ext.isEmpty(Ext.getCmp("wide1"))&&Ext.getCmp("wide1")!=undefined){a=Ext.getCmp("wide1").getValue();}if(a){last_view="detailed";}else{last_view="concise";}},submitProcesses:function(){submitFrmConcise=Ext.getCmp("processconcisesel").isVisible();
submitFrmDetailed=Ext.getCmp("processdetailedsel").isVisible();var e="";var l=new Array();if(submitFrmConcise){e=Ext.getCmp("processconcisesel").getValue();e=e.toString().trim();}else{e=Ext.getCmp("processdetailedsel").getValue();e=e.toString().trim();}if(Ext.isEmpty(e)||e==undefined){Ext.Msg.show({title:pageName,msg:selectAProcess,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return false;}var f=new Array();if(!Ext.isEmpty(e)&&e.indexOf(",")!=-1){f=e.split(",");}else{f[0]=e;}if(!Ext.isEmpty(f)&&f!=undefined){for(var k=0;k<f.length;k++){processNamesArray.push(f[k]);}}if(!Ext.isEmpty(processNamesArray)&&processNamesArray!=undefined){for(var h=0;h<processNamesArray.length;h++){if(Ext.isEmpty(processNamesArray[h])){continue;
}var d=processNamesArray[h];var c=d.substring(0,d.indexOf(":"));var g=d.substring(d.indexOf(":")+1);var b={"processName":c,"processPattern":g};l.push(b);}}Ext.getCmp("processconciseconfiguration").destroy();Ext.getCmp("processSearchTrigger").reset();Ext.getCmp("addProcessConfbtn").enable();if(!Ext.isEmpty(processNamesArray.length)){Ext.getCmp("updateProcessPatt").enable();
Ext.getCmp("processSearchTrigger").enable();Ext.getCmp("DeleteOver").show();}var a=Ext.getCmp("processNamesGrid");this.unCheckHeaderCheckBox(a);Ext.suspendLayouts();a.getStore().removeAll();a.getStore().loadRawData(l);Ext.resumeLayouts(true);Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=processconfiguration",method:"POST",async:false});
},configuredescriptors:function(e){var a=Ext.create("Ext.selection.CheckboxModel",{selType:"checkboxmodel",mode:"MULTI",checkOnly:true,renderer:function(o,n,k,q,m,l,h){n.tdCls=Ext.baseCSSPrefix+"grid-cell-special "+Ext.baseCSSPrefix+"grid-cell-row-checker";return'<div class="'+Ext.baseCSSPrefix+'grid-row-checker">&#160;</div>';
},selectAll:function(){var o=0;while(typeof(Ext.getCmp("gridDescriptorTest").getStore().getAt(o))!="undefined"){var k=Ext.getCmp("gridDescriptorTest").getStore().getAt(o);Ext.getCmp("gridDescriptorTest").getSelectionModel().select(o,true);o++;}var h=Ext.getCmp("gridDescriptorTest").getView();var n=h.headerCt;
var m=this.selected.getCount()===this.store.getCount();var l=n.child("gridcolumn[isCheckerHd]");if(l){l.el.addCls(Ext.baseCSSPrefix+"grid-hd-checker-on");}},deselectAll:function(){var o=0;while(typeof(Ext.getCmp("gridDescriptorTest").getStore().getAt(o))!="undefined"){var k=Ext.getCmp("gridDescriptorTest").getStore().getAt(o);
Ext.getCmp("gridDescriptorTest").getSelectionModel().deselect(o,true);o++;}var h=Ext.getCmp("gridDescriptorTest").getView();var n=h.headerCt;var m=this.selected.getCount()===this.store.getCount();var l=n.child("gridcolumn[isCheckerHd]");if(l){l.el.removeCls(Ext.baseCSSPrefix+"grid-hd-checker-on");}}});
Ext.create("SpecificTestConfiguration.view.EgDetailsTest").show();var d={xtype:"grid",ui:"newGridPanel",id:"gridDescriptorTest",store:new Ext.data.Store({fields:["Descriptor","Value"],data:[]}),scroll:true,autoScroll:true,flex:1,margin:"5 10 10 10",selModel:a,listeners:{beforeselect:function(k,h,l){},rowclick:function(h,m,l){var k=h.getStore().getAt(m);
}},viewConfig:{deferEmptyText:true},plugins:[Ext.create("Ext.grid.plugin.CellEditing",{pluginId:"applicationPorts",clicksToEdit:1})],columns:{defaults:{sortable:false,hideable:false,menuDisabled:true,draggable:false,resizable:false},items:[{text:descriptorLbl,dataIndex:"Descriptor",id:"descriptor",flex:1},{dataIndex:"Value",id:"value",text:valueLbl,flex:1,editor:{xtype:"textfield",cls:"textbox",minValue:1,hideTrigger:true,keyNavEnabled:false,mouseWheelEnabled:false,allowBlank:false}},{header:'<div class="iconDeleteAll" data-qtip="Delete Selected" data-qclass="yellowTip"></div>',xtype:"actioncolumn",width:36,sortable:false,listeners:{headerclick:function(l,h,k){testInterViews.handleDescDeleteSelected();
}},renderer:function(n,k,h,q,m,l,o){k.tdAttr="data-qtip='Delete' data-qclass='yellowTip'";return"<div style='cursor:pointer' onclick=\"javascript:testInterViews.handleDescDeleteIconClick('"+o+"','"+q+"','"+m+"')\" class='iconDelete'></div>";}}]}};var g=Ext.getCmp("tmp");Ext.suspendLayouts();g.removeAll();
g.add(d);Ext.resumeLayouts(true);var f=publicJson["testName"];var b=publicJson["componentName"];var c=Ext.getCmp(e).getValue();Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgDetailsTestJson.jsp?t_name="+f+"&c_name="+encodeURIComponent(b)+"&p_value="+c+"&p_name="+e,method:"POST",async:false,success:function(h){if(h.status==200&&!Ext.isEmpty(h.responseText)){var k=h.responseText;
publicDescJSON=Ext.decode(k);}if(publicDescJSON["noDescForTest"]!=null&&publicDescJSON["noDescForTest"]!=undefined){Ext.getCmp("NoDescriptorDetails").show();Ext.getCmp("testDesc").hide();Ext.getCmp("testParamDesc").hide();Ext.getCmp("componentDesc").hide();Ext.getCmp("gridDescriptorTest").hide();Ext.getCmp("updateDescriptor").hide();
}else{Ext.getCmp("testDesc").show();Ext.getCmp("testParamDesc").show();Ext.getCmp("componentDesc").show();Ext.getCmp("gridDescriptorTest").show();Ext.getCmp("updateDescriptor").show();Ext.getCmp("NoDescriptorDetails").hide();Ext.getCmp("testDesc").setValue(publicDescJSON["testName"]);Ext.getCmp("testParamDesc").setValue(publicDescJSON["paramName"]);
Ext.getCmp("componentDesc").setValue(publicDescJSON["compDisplayName"]);Ext.getCmp("gridDescriptorTest").getStore().loadRawData(publicDescJSON["gridDescTests"]);}}});},handleDescDeleteSelected:function(){var a=Ext.getCmp("gridDescriptorTest").getSelectionModel().getSelection();var k="";var g=new Array();
var e=new Array();var b="";var h="";if(a==""){Ext.Msg.show({title:descTitle,msg:noItemsSel,buttons:Ext.MessageBox.OK,icon:"iconExclamation"});return false;}for(var f=0;f<a.length;f++){k=a[f];id=k.get("Descriptor");vall=k.get("Value");if(id!=null){g.push(id);e.push(vall);}}for(var d=0;d<g.length;d++){b+=g[d]+",";
}for(var c=0;c<e.length;c++){h+=e[c]+",";}Ext.Msg.show({title:descTitle,msg:deleteSelected,buttons:Ext.MessageBox.YESNO,icon:"iconConfirmation",fn:function(m){if(m=="yes"){var o=publicJson["testName"];var l=publicJson["componentName"];var n=Ext.getCmp(tempDescParam).getValue();Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgDetailsTestpJson.jsp?t_name="+o+"&c_name="+encodeURIComponent(l)+"&p_value="+n+"&p_name="+tempDescParam+"&info="+b+"&q_value="+h+"&modify=deleteRecord",method:"POST",success:function(q){var s=q.responseText;
publicDelJSON=Ext.decode(s);if(!Ext.isEmpty(s)&&q.status==200){var r=publicDelJSON["requestStatus"];if(r=="success"||r.indexOf("success")!=-1){var r=publicDelJSON["result"];Ext.Msg.show({title:r["title"],msg:r["message1"],buttons:Ext.MessageBox.OK,icon:"iconInformation",fn:function(){testInterViews.buildDescData(tempDescParam);
if(publicDelJSON["noDescForTest"]!=null&&publicDelJSON["noDescForTest"]!=undefined){Ext.getCmp("NoDescriptorDetails").show();Ext.getCmp("testDesc").hide();Ext.getCmp("testParamDesc").hide();Ext.getCmp("componentDesc").hide();Ext.getCmp("gridDescriptorTest").hide();Ext.getCmp("updateDescriptor").hide();
}else{Ext.getCmp("testDesc").show();Ext.getCmp("testParamDesc").show();Ext.getCmp("componentDesc").show();Ext.getCmp("gridDescriptorTest").show();Ext.getCmp("updateDescriptor").show();Ext.getCmp("NoDescriptorDetails").hide();Ext.getCmp("testDesc").setValue(publicDelJSON["testName"]);Ext.getCmp("testParamDesc").setValue(publicDelJSON["paramName"]);
Ext.getCmp("componentDesc").setValue(publicDelJSON["compDisplayName"]);Ext.getCmp("gridDescriptorTest").getStore().removeAll();Ext.getCmp("gridDescriptorTest").getStore().loadRawData(publicDelJSON["gridDescTests"]);}}});}}}});}}});},buildDescData:function(c){var d=publicJson["testName"];var a=publicJson["componentName"];
var b=Ext.getCmp(c).getValue();Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgDetailsTestJson.jsp?t_name="+d+"&c_name="+encodeURIComponent(a)+"&p_value="+b+"&p_name="+c,method:"POST",async:false,success:function(e){if(e.status==200&&!Ext.isEmpty(e.responseText)){var f=e.responseText;publicDelJSON=Ext.decode(f);
}}});},handleDescDeleteIconClick:function(d,c,b){var a=Ext.getCmp("gridDescriptorTest").getStore().getAt(c);this.deleteDescTask(a,c);},deleteDescTask:function(a,d){var c=a.get("Descriptor");var b=a.get("Value");this.commonDescDelete(c,b,d);},commonDescDelete:function(c,a,b){Ext.Msg.show({title:"DESCRIPTOR DETAILS",msg:deletedSingleDescMsg,buttons:Ext.Msg.YESNO,icon:"iconConfirmation",fn:function(e){if(e==="yes"){var g=publicJson["testName"];
var d=publicJson["componentName"];var f=Ext.getCmp(tempDescParam).getValue();Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgDetailsTestpJson.jsp?t_name="+g+"&c_name="+encodeURIComponent(d)+"&p_value="+f+"&p_name="+tempDescParam+"&info="+c+"&q_value="+a+"&modify=deleteRecord",method:"POST",success:function(h){var l=h.responseText;
publicDelJSON=Ext.decode(l);if(!Ext.isEmpty(l)&&h.status==200){var k=publicDelJSON["requestStatus"];if(k=="success"||k.indexOf("success")!=-1){var k=publicDelJSON["result"];Ext.Msg.show({title:k["title"],msg:k["message1"],buttons:Ext.MessageBox.OK,icon:"iconInformation",fn:function(){testInterViews.buildDescData(tempDescParam);
var m=publicDelJSON["noDescForTest"];if(!Ext.isEmpty(m)&&m!="undefined"&&m!=undefined){Ext.getCmp("NoDescriptorDetails").show();Ext.getCmp("testDesc").hide();Ext.getCmp("testParamDesc").hide();Ext.getCmp("componentDesc").hide();Ext.getCmp("gridDescriptorTest").hide();Ext.getCmp("updateDescriptor").hide();
}else{Ext.getCmp("testDesc").show();Ext.getCmp("testParamDesc").show();Ext.getCmp("componentDesc").show();Ext.getCmp("gridDescriptorTest").show();Ext.getCmp("updateDescriptor").show();Ext.getCmp("NoDescriptorDetails").hide();Ext.getCmp("testDesc").setValue(publicDelJSON["testName"]);Ext.getCmp("testParamDesc").setValue(publicDelJSON["paramName"]);
Ext.getCmp("componentDesc").setValue(publicDelJSON["compDisplayName"]);Ext.getCmp("gridDescriptorTest").getStore().removeAll();Ext.getCmp("gridDescriptorTest").getStore().loadRawData(publicDelJSON["gridDescTests"]);}}});}}}});}}});},updatedescriptors:function(){var a=Ext.getCmp("gridDescriptorTest").getSelectionModel().getSelection();
var q="";var l=new Array();var g=new Array();var b="";var o="";if(a==""){Ext.Msg.show({title:descTitle,msg:noItemsSel,buttons:Ext.Msg.OK,icon:"iconExclamation"});return false;}for(var h=0;h<a.length;h++){q=a[h];id=q.get("Descriptor");vall=q.get("Value");if(id!=null){l.push(id);g.push(vall);}}for(var f=0;
f<l.length;f++){b+=l[f]+",";}for(var d=0;d<g.length;d++){o+=g[d]+",";}var e=publicJson["testName"];var c=publicJson["componentName"];var r=Ext.getCmp(tempDescParam).getValue();var n=testInterViews.checkDescriptor(g);if(n){Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgDetailsTestpJson.jsp?t_name="+e+"&c_name="+encodeURIComponent(c)+"&p_value="+r+"&p_name="+tempDescParam+"&info="+b+"&q_value="+o+"&modify=updateRecord",method:"POST",async:false,success:function(m){var s=m.responseText;
publicDelJSON=Ext.decode(s);testInterViews.buildDescData(tempDescParam);Ext.getCmp("gridDescriptorTest").store.loadData(publicDelJSON["gridDescTests"]);Ext.getCmp("egdetailstest").destroy();}});}var k=Ext.getCmp("componentType").getValue();Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(k)+"&componentType="+encodeURIComponent(k)+"&tName_HelpPage="+e+"&testName="+e,method:"POST"});
},checkDescriptor:function(b){var c=true;for(var a=0;a<b.length;a++){var d=b[a];if(d==""){Ext.Msg.show({title:descTitle,msg:_checkcomma,buttons:Ext.Msg.OK,icon:"iconExclamation"});c=false;return;}else{if(!checkDescSpecial(d," `~!@#$%^&*()+-,.={}[]|:;\"'<>_?/\\")){c=false;return;}}}return c;},policyCreationPage:function(){Ext.create("SpecificTestConfiguration.view.EgPolicyCreation").show();
Ext.getCmp("egpolicycreation").setTitle(polCreationPageName);var b=publicJson["testName"];if(b=="SecurityLogTest"){Ext.getCmp("evtdescriptors").setFieldLabel("EVENT USERS");Ext.getCmp("evtdescriptors_SL").show();Ext.getCmp("mainContainer").setAutoScroll(true);Ext.getCmp("mainContainer").setHeight(430);
}var a=Ext.getCmp("logType").getValue();var c="server="+jsonVal["server"]+"&test="+jsonVal["parmTestName"]+"&change=add&showAll="+jsonVal["showAll"]+"&q="+jsonVal["q"]+"&logtype="+a+"&requestFrom="+jsonVal["requestFrom"];var d="SpecificTestConfiguration/data/EgPolicyCreationJson.jsp?"+c;Ext.Ajax.request({url:d,method:"POST",success:function(e){if(e.status==200&&!Ext.isEmpty(e.responseText)){polCreationJson=Ext.decode(e.responseText);
}}});},configViewPolicy:function(){var d=publicJson["externalPageLink"];var b=Ext.getCmp("logType").getValue();if(!Ext.isEmpty(b)){d+="&currentLogType="+encodeURIComponent(b);}if(Ext.create("SpecificTestConfiguration.view.ViewPolicy").isHidden()){var a=Ext.create("Ext.selection.CheckboxModel",{selType:"checkboxmodel",mode:"MULTI",checkOnly:true,renderer:function(f,r,k,l,q,n,m){var h=k.get("Events");
var g=k.get("Delete");var o=k.get("isDisabled");if(!Ext.isEmpty(h)&&h!=undefined&&h=="all"){g="yes";}if(o&&g){r.tdCls=Ext.baseCSSPrefix+"grid-cell-special";return'<img src="/final/images/spacer.gif" class="iconLock"  style="margin-left:-5px;width:16px;height:16px;"/>';}else{r.tdCls=Ext.baseCSSPrefix+"grid-cell-special "+Ext.baseCSSPrefix+"grid-cell-row-checker";
return'<img src="/final/images/spacer.gif" class="'+Ext.baseCSSPrefix+'grid-row-checker"/>';}},selectAll:function(){var m=0;while(typeof(Ext.getCmp("EventsViewGrid").getStore().getAt(m))!="undefined"){var g=Ext.getCmp("EventsViewGrid").getStore().getAt(m);if(g.get("isDisabled")){Ext.getCmp("EventsViewGrid").getSelectionModel().deselect(m,true);
}else{Ext.getCmp("EventsViewGrid").getSelectionModel().select(m,true);}m++;}var f=Ext.getCmp("EventsViewGrid").getView();var l=f.headerCt;var k=this.selected.getCount()===this.store.getCount();var h=l.child("gridcolumn[isCheckerHd]");if(h){h.el.addCls(Ext.baseCSSPrefix+"grid-hd-checker-on");}},deselectAll:function(){var m=0;
while(typeof(Ext.getCmp("EventsViewGrid").getStore().getAt(m))!="undefined"){var g=Ext.getCmp("EventsViewGrid").getStore().getAt(m);Ext.getCmp("EventsViewGrid").getSelectionModel().deselect(m,true);m++;}var f=Ext.getCmp("EventsViewGrid").getView();var l=f.headerCt;var k=this.selected.getCount()===this.store.getCount();
var h=l.child("gridcolumn[isCheckerHd]");if(h){h.el.removeCls(Ext.baseCSSPrefix+"grid-hd-checker-on");}}});Ext.create("SpecificTestConfiguration.view.ViewPolicy").show();var c={xtype:"grid",ui:"newGridPanel whiteHeader",id:"EventsViewGrid",name:"EventsViewGrid",flex:1,store:new Ext.data.Store({fields:["Events","View","Modify","Delete","isDisabled"],data:[]}),selModel:a,listeners:{beforeselect:function(g,f,h){if(f.get("isDisabled")){return false;
}},rowclick:function(f,k,h){var g=f.getStore().getAt(k);if(g.get("isDisabled")){f.getSelectionModel().deselectRow(k);}}},viewConfig:{deferEmptyText:true},emptyText:'<table align="center"><tr><td align="center" height="220"><table><tr><td align="center"><img src="/final/images/spacer.gif" class="iconInformation"></td></tr><tr><td align="center" class="commonErrorMsgText">'+noPolicyFound+"</td></tr></table></td></tr></table>",scroll:true,autoScroll:true,columns:{defaults:{sortable:true,hideable:false,menuDisabled:true,draggable:false,resizable:false,isCheckerHd:false},items:[{text:label15,dataIndex:"Events",id:"events",flex:1},{xtype:"actioncolumn",width:36,id:"ViewOver",sortable:false,renderer:function(l,g,f,n,k,h,m){var o=f.get("View");
g.tdAttr="data-qtip='"+label8+"' data-qclass='yellowTip'";if(!Ext.isEmpty(o)){return"<div style='cursor:pointer' onclick=\"javascript:me.handleViewIconClick('"+m+"','"+n+"','"+k+"')\" class='iconShowAssociates'></div>";}else{return'<div class="iconShowAssociates"></div>';}}},{xtype:"actioncolumn",width:36,id:"EditOver",iconCls:"iconModify",sortable:false,handler:function(g,m,f,h,l){var k=g.getStore().getAt(m).get("Modify");
if(!Ext.isEmpty(k)){me.handleEditIconClick(g,m,f);}else{return false;}},renderer:function(m,g,f,o,k,h,n){var l=f.get("Modify");g.tdAttr="data-qtip='"+label6+"' data-qclass='yellowTip'";if(!Ext.isEmpty(l)){}else{g.style="filter:alpha(opacity=20);opacity:.2;cursor:hand;";}}},{header:'<div class="iconDeleteAll" data-qtip="Delete Selected" data-qclass="yellowTip"></div>',xtype:"actioncolumn",width:36,id:"DeleteOver",sortable:false,listeners:{headerclick:function(k,f,h){me.handleDeleteSelected();
}},renderer:function(m,g,k,q,h,n,f){var l=k.get("Delete");var o=k.get("isDisabled");g.tdAttr="data-qtip='"+label9+"' data-qclass='yellowTip'";if(o){return'<div class="iconDeleteDisabled"></div>';}else{return"<div style='cursor:pointer' onclick=\"javascript:"+l+"\" class='iconDelete'></div>";}}}]},margin:10,tbar:[{xtype:"tbfill",},{xtype:"trigger",id:"searchTrigger",trigger1Cls:"x-form-clear-trigger",trigger2Cls:"x-form-search-trigger",cls:"whitedropdown_search",emptyText:"Search",getTriggerMarkup:function(){var l=this,h=0,o=(l.readOnly||l.hideTrigger),f,m=l.triggerBaseCls,n=[],k=Ext.dom.Element.unselectableCls,g="width:"+l.triggerWidth+"px;"+(o?"display:none;":""),q=l.extraTriggerCls+" "+Ext.baseCSSPrefix+"trigger-cell "+k;
if(!l.trigger1Cls){l.trigger1Cls=l.triggerCls;}for(h=0;(f=l["trigger"+(h+1)+"Cls"])||h<1;h++){if(h==0){n.push({tag:"td",role:"presentation",valign:"top",cls:q,id:"MyTrigger_"+h,style:g+"display:none;",cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+h,m,f].join(" "),role:"presentation"}});}else{n.push({tag:"td",role:"presentation",valign:"top",cls:q,id:"MyTrigger_"+h,style:g,cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+h,m,f].join(" "),role:"presentation"}});
}}n[0].cn.cls+=" "+m+"-first";return Ext.DomHelper.markup(n);},onTrigger1Click:function(){this.reset();me.policyMainSearch();},onTrigger2Click:function(){me.policyMainSearch();}},{xtype:"toolbar",ui:"footer",items:[{xtype:"button",ui:"newButtonSmall",text:label14,name:"addPolicy",id:"addPolicy"}]}]};
var e=Ext.getCmp("tempPolicy");Ext.suspendLayouts();e.removeAll();e.add(c);Ext.resumeLayouts(true);}Ext.Ajax.request({url:d,method:"POST",success:function(f){if(f.status==200&&!Ext.isEmpty(f.responseText)){jsonVal=Ext.decode(f.responseText);var g=jsonVal["gridDataArr"];Ext.getCmp("EventsViewGrid").getStore().removeAll();
Ext.getCmp("EventsViewGrid").getStore().loadRawData(g);}}});},policySearch:function(){searchStr=Ext.getCmp("searchTrigger").getValue();if(searchStr==""||searchStr.length==0){Ext.get("MyTrigger_0").setStyle("display","none");Ext.get("MyTrigger_1").setStyle("display","block");}else{Ext.get("MyTrigger_1").setStyle("display","none");
Ext.get("MyTrigger_0").setStyle("display","block");}var a=Ext.getCmp("logType").getValue();var b="server="+jsonVal["server"]+"&test="+jsonVal["polTestName"]+"&port=true&showAll="+jsonVal["showAll"]+"&logtype="+a+"&requestFrom="+jsonVal["requestFrom"]+"&testType="+jsonVal["polTestType"]+"&currentLogType="+encodeURIComponent(a);
if(searchStr==null||searchStr==""){urlVal="SpecificTestConfiguration/data/ViewPolicyJson.jsp?"+b;}else{if(searchStr!=null){urlVal="SpecificTestConfiguration/data/ViewPolicyJson.jsp?egTitleSearchStr="+encodeURI(searchStr)+"&"+b;}}Ext.Ajax.request({url:urlVal,method:"POST",scope:this,async:false,success:function(c){if(c.status==200&&!Ext.isEmpty(c.responseText)){var e=c.responseText;
var f=Ext.decode(e);var d=f["no_search_item"];if(d!=null&&d!="undefined"){Ext.getCmp("EventsViewGrid").store.loadData("");Ext.getCmp("EventsViewGrid").getView().emptyText='<table align="center"><tr><td align="center" height="320"><table><tr><td align="center"><img src="/final/images/spacer.gif" class="iconInformation"></td></tr><tr><td align="center" class="commonErrorMsgText">'+noPolicyFound+".</td></tr></table></td></tr></table>";
Ext.getCmp("EventsViewGrid").getView().refresh();}else{Ext.getCmp("EventsViewGrid").show();Ext.getCmp("EventsViewGrid").getStore().loadRawData(f["gridDataArr"]);}}}});},policyValidate:function(){var d=polCreationJson["hiddenPolicyObj"]["change"];policyName=Ext.getCmp("pol_name").getValue();if(Ext.isEmpty(policyName)||policyName==undefined){Ext.Msg.show({title:polCreationPageName,msg:alertMsg15,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(U){Ext.getCmp("pol_name").focus(true);
}});sucFlag=false;return;}var u=/[`~!@#$%^&()|{}/+=.?\\\"\'><,\:\;]/;if(!Ext.isEmpty(policyName)&&policyName!=undefined){var H=u.test(policyName);var K="-";var T=",";var n=policyName.length;if(H&&H!=undefined){Ext.Msg.show({title:polCreationPageName,msg:alertMsg16,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(U){Ext.getCmp("pol_name").focus(true);
}});sucFlag=false;return;}if(policyName.charAt(0)==K||policyName.charAt(n-1)==K){Ext.Msg.show({title:polCreationPageName,msg:alertMsg17,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(U){Ext.getCmp("pol_name").focus(true);}});sucFlag=false;return;}}sucFlag=true;var w=Ext.getCmp("Source").getValue();
var R=Ext.getCmp("Id").getValue();var q=Ext.getCmp("Desc").getValue();var P=Ext.getCmp("EvScIn").getValue();var h=Ext.getCmp("EvScEx").getValue();var E=Ext.getCmp("EvIdIn").getValue();var N=Ext.getCmp("EvIdEx").getValue();var O=Ext.getCmp("EvDescIn").getValue();var g=Ext.getCmp("EvDescEx").getValue();
var S=publicJson["testName"];var m="";var t="";var y="";if(S=="SecurityLogTest"){y=Ext.getCmp("Desc_SL").getValue();m=Ext.getCmp("EvDescIn_SL").getValue();t=Ext.getCmp("EvDescEx_SL").getValue();if(y=="Included"){m=Ext.getCmp("EVENT_DESCRIPTIONS_SL").getValue();}else{t=Ext.getCmp("EVENT_DESCRIPTIONS_SL").getValue();
}}if(w=="Included"){P=Ext.getCmp("EVENT_SOURCES").getValue();}else{h=Ext.getCmp("EVENT_SOURCES").getValue();}if(R=="Included"){E=Ext.getCmp("EVENT_IDS").getValue();}else{N=Ext.getCmp("EVENT_IDS").getValue();}if(q=="Included"){O=Ext.getCmp("EVENT_DESCRIPTIONS").getValue();}else{g=Ext.getCmp("EVENT_DESCRIPTIONS").getValue();
}var Q=P;var k=h;var G=w;if(G=="Included"){var B=this.checkEventSource(Q,"Included");if(!B){sucFlag=false;return;}var c=this.checkForAllKeyword(Q,"EvtSrc","Included");if(!c){Ext.getCmp("EVENT_SOURCES").focus(true);sucFlag=false;return;}var b=this.checkForNoneKeyword(Q,"EvtSrc","Included");if(!b){Ext.getCmp("EVENT_SOURCES").focus(true);
sucFlag=false;return;}if(Q=="all"){if(h==""){h="none";}}else{h="none";}}else{var B=this.checkEventSource(k,"Excluded");if(!B){sucFlag=false;return;}var c=this.checkForNoneKeyword(k,"EvtSrc","Excluded");if(!c){Ext.getCmp("EVENT_SOURCES").focus(true);sucFlag=false;return;}var b=this.checkForAllKeyword(k,"EvtSrc","Excluded");
if(!b){Ext.getCmp("EVENT_SOURCES").focus(true);sucFlag=false;return;}if(k=="none"){if(P==""){P="all";}}else{P="all";}}var x=E;var D=N;G=R;if(G=="Included"){var B=this.checkEventID(x,"Included");if(!B){sucFlag=false;return;}if(x=="all"){if(N==""){N="none";}}else{N="none";}}else{var B=this.checkEventID(D,"Excluded");
if(!B){sucFlag=false;return;}if(D=="none"){if(E==""){E="all";}}else{E="all";}}var z=O;var I=g;G=q;if(G=="Included"){var B=this.checkEventDescription(z,"Included");if(!B){sucFlag=false;return;}var c=this.checkForAllKeyword(z,"EvtDesc","Included");if(!c){Ext.getCmp("EVENT_DESCRIPTIONS").focus(true);sucFlag=false;
return;}var b=this.checkForNoneKeyword(z,"EvtDesc","Included");if(!b){Ext.getCmp("EVENT_DESCRIPTIONS").focus(true);sucFlag=false;return;}if(z=="all"){if(g==""){g="none";}}else{g="none";}}else{var B=this.checkEventDescription(I,"Excluded");if(!B){sucFlag=false;return;}var c=this.checkForNoneKeyword(I,"EvtDesc","Excluded");
if(!c){Ext.getCmp("EVENT_DESCRIPTIONS").focus(true);sucFlag=false;return;}var b=this.checkForAllKeyword(I,"EvtDesc","Excluded");if(!b){Ext.getCmp("EVENT_DESCRIPTIONS").focus(true);sucFlag=false;return;}if(I=="none"){if(O==""){O="all";}}else{O="all";}}if(S=="SecurityLogTest"){var z=m;var I=t;G=y;if(G=="Included"){var B=this.checkEventDescriptionSL(z,"Included");
if(!B){sucFlag=false;return;}var c=this.checkForAllKeywordSL(z,"Included");if(!c){Ext.getCmp("EVENT_DESCRIPTIONS_SL").focus(true);sucFlag=false;return;}var b=this.checkForNoneKeywordSL(z,"Included");if(!b){Ext.getCmp("EVENT_DESCRIPTIONS_SL").focus(true);sucFlag=false;return;}if(z=="all"){if(t==""){t="none";
}}else{t="none";}}else{var B=this.checkEventDescriptionSL(I,"Excluded");if(!B){sucFlag=false;return;}var c=this.checkForNoneKeywordSL(I,"Excluded");if(!c){Ext.getCmp("EVENT_DESCRIPTIONS_SL").focus(true);sucFlag=false;return;}var b=this.checkForAllKeywordSL(I,"Excluded");if(!b){Ext.getCmp("EVENT_DESCRIPTIONS_SL").focus(true);
sucFlag=false;return;}if(I=="none"){if(m==""){m="all";}}else{m="all";}}}var v=alertMsg73;if(d=="add"&&sucFlag){v=alertMsg72;var o=polCreationJson["strDescriptors"];var r=o.split(",");for(var M=0;M<r.length;M++){var l=r[M].toLowerCase();if(l==policyName.toLowerCase()){Ext.Msg.show({title:polCreationPageName,msg:alertMsg68,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(U){Ext.getCmp("pol_name").focus(true);
}});sucFlag=false;}}}if(sucFlag){var F="SpecificTestConfiguration/data/EgPolicyUpdateJson.jsp?";var a=polCreationJson["hiddenPolicyObj"]["change"];var f=polCreationJson["hiddenPolicyObj"]["testName"];var s=polCreationJson["hiddenPolicyObj"]["logtype"];var C=polCreationJson["hiddenPolicyObj"]["server"];
var e=polCreationJson["hiddenPolicyObj"]["requestFrom"];var L=polCreationJson["hiddenPolicyObj"]["field_Name"];var A=polCreationJson["hiddenPolicyObj"]["q1"];var J="pol_name="+policyName+"&EvScIn="+P+"&EvScEx="+h+"&EvIdIn="+E+"&EvIdEx="+N+"&EvDescIn="+O+"&EvDescEx="+g+"&field_Name="+L+"&change="+a+"&testName="+f+"&logtype="+s+"&server="+encodeURIComponent(C)+"&requestFrom="+e+"&q1="+A;
if(S=="SecurityLogTest"){J+="&EvDescIn_SL="+m+"&EvDescEx_SL="+t;}Ext.Ajax.request({url:F+J,method:"POST",success:function(W){if(W.status==200&&!Ext.isEmpty(W.responseText)){var V=Ext.decode(W.responseText);var X=V.dispTestName;var U=V.dispLogType;Ext.Msg.show({title:polCreationPageName,msg:v,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(ac){Ext.getCmp("egpolicycreation").destroy();
Ext.getCmp("viewpolicy").destroy();me.configViewMainPolicy();var ag=Ext.getCmp("filter_combo");if(!Ext.isEmpty(deletedRecords)&&deletedRecords!=undefined){var Z=new Array();if(deletedRecords.indexOf(",")!=-1){var ai=new Array();ai=deletedRecords.split(",");for(var ad=0;ad<ai.length;ad++){var af=ag.getStore().find("valueField",ai[ad].toString(),0,false,true,true);
ag.getStore().removeAt(af);}}else{var af=ag.getStore().find("valueField",deletedRecords.toString(),0,false,true,true);ag.getStore().removeAt(af);}deletedRecords="";}if(!Ext.isEmpty(a)&&a=="add"){ag.getStore().add({displayField:policyName,valueField:policyName});}var aa=Ext.getCmp("filter_combo").getValue();
var ak=Ext.getCmp("filter_combo").getStore().getCount();if(!Ext.isEmpty(ak)&&ak>0){for(var ad=0;ad<ak;ad++){var ab=Ext.getCmp("filter_combo").getStore().getAt(ad);if(!Ext.isEmpty(ab)){var ah=Ext.getCmp("filter_combo").getStore().getAt(ad).get("valueField");if(!Ext.isEmpty(ah)&&ah=="all"){Ext.getCmp("filter_combo").getStore().removeAt(ad);
}}}}ak=Ext.getCmp("filter_combo").getStore().getCount();var ae=new Ext.data.Store({fields:["displayField","valueField"],data:[]});var aj=false;if(!Ext.isEmpty(ak)&&ak>0){availPolicies=new Array();for(var ad=0;ad<ak;ad++){availPolicies[ad]=ag.getStore().getAt(ad).get("valueField");aj=true;ae.add({"displayField":availPolicies[ad],"valueField":availPolicies[ad]});
}}if(availPolicies.indexOf("all")==-1){availPolicies.push("all");}ag.getStore().removeAll();if(aj){for(var ad=0;ad<ae.getCount();ad++){var Y=ae.getAt(ad);ag.getStore().add(Y);}}Ext.getCmp("filter_combo").getStore().sort([{property:"displayField",direction:"ASC"},{property:"valueField",direction:"ASC"}]);
ag.getStore().insert(0,{displayField:"all",valueField:"all"});Ext.getCmp("filter_combo").setValue(aa);}});}}});}},openWindow:function(c){var b="";var e="No";var d="";var a="";if(c.id=="viewsource"){d=Ext.getCmp("EVENT_SOURCES").getValue();b="EVENT SOURCES";objField=Ext.getCmp("EVENT_SOURCES");}else{if(c.id=="viewid"){d=Ext.getCmp("EVENT_IDS").getValue();
b="EVENT IDS";objField=Ext.getCmp("EVENT_IDS");}else{d=Ext.getCmp("EVENT_DESCRIPTIONS").getValue();b="EVENT DESCRIPTIONS";objField=Ext.getCmp("EVENT_DESCRIPTIONS");}}Ext.widget("window",{width:450,height:250,resizable:"false",title:"Data Entry Window",id:"dataFullViewForm",name:"dataFullViewForm",autoScroll:true,modal:true,items:[{xtype:"container",layout:{type:"vbox",align:"center",pack:"center"},defaults:{labelAlign:"top",labelSeparator:" ",width:250,margin:10},items:[{xtype:"textareafield",cls:"text-area",name:"viewTextArea",id:"viewTextArea",fieldLabel:b,height:150,width:350,value:d},{xtype:"button",ui:"newButtonSmall",text:label1,id:"ApplyBtn",width:80,handler:function(){objField.setValue(Ext.getCmp("viewTextArea").getValue());
Ext.getCmp("dataFullViewForm").destroy();}}]}]}).show();},checkInter:function(o){var m=polCreationJson["hiddenPolicyObj"]["change"];var e=Ext.getCmp("EvScIn").getValue();var t=Ext.getCmp("EvScEx").getValue();var h=Ext.getCmp("EvIdIn").getValue();var w=Ext.getCmp("EvIdEx").getValue();var d=Ext.getCmp("EvDescIn").getValue();
var s=Ext.getCmp("EvDescEx").getValue();var f=Ext.getCmp("EvDescIn_SL").getValue();var g=Ext.getCmp("EvDescEx_SL").getValue();if(m=="add"||m=="modify"){if(o=="Source"){var q=Ext.getCmp("Source").getValue();if(!Ext.isEmpty(q)&&q=="Included"){var z=trim(Ext.getCmp("EVENT_SOURCES").getValue());var x=this.checkEventSource(z,"Excluded");
if(!x){Ext.getCmp("Source").setValue("Excluded");return;}var v=this.checkForNoneKeyword(z,"EvtSrc","Excluded");if(!v){Ext.getCmp("Source").setValue("Excluded");return;}var u=this.checkForAllKeyword(z,"EvtSrc","Excluded");if(!u){Ext.getCmp("Source").setValue("Excluded");return;}if(z=="none"){if(e==""||e==undefined){Ext.getCmp("EvScIn").setValue("all");
}}else{Ext.getCmp("EvScIn").setValue("all");}Ext.getCmp("EvScEx").setValue(z);Ext.getCmp("EVENT_SOURCES").setValue(Ext.getCmp("EvScIn").getValue());}else{var n=trim(Ext.getCmp("EVENT_SOURCES").getValue());var x=this.checkEventSource(n,"Included");if(!x){Ext.getCmp("Source").setValue("Included");return;
}var v=this.checkForAllKeyword(n,"EvtSrc","Included");if(!v){Ext.getCmp("Source").setValue("Included");return;}var u=this.checkForNoneKeyword(n,"EvtSrc","Included");if(!u){Ext.getCmp("Source").setValue("Included");return;}if(n=="all"){if(t==""||t==undefined){Ext.getCmp("EvScEx").setValue("none");}}else{Ext.getCmp("EvScEx").setValue("none");
}Ext.getCmp("EvScIn").setValue(n);Ext.getCmp("EVENT_SOURCES").setValue(Ext.getCmp("EvScEx").getValue());}}else{if(o=="Id"){var k=Ext.getCmp("Id").getValue();if(!Ext.isEmpty(k)&&k=="Included"){var r=trim(Ext.getCmp("EVENT_IDS").getValue());var x=this.checkEventID(r,"Excluded");if(!x){Ext.getCmp("Id").setValue("Excluded");
Ext.getCmp("EVENT_IDS").focus(true);return false;}if(r=="none"){if(h.value==""){Ext.getCmp("EvIdIn").setValue("all");}}else{Ext.getCmp("EvIdIn").setValue("all");}Ext.getCmp("EvIdEx").setValue(r);Ext.getCmp("EVENT_IDS").setValue(Ext.getCmp("EvIdIn").getValue());}else{var c=trim(Ext.getCmp("EVENT_IDS").getValue());
var x=this.checkEventID(c,"Included");if(!x){Ext.getCmp("Id").setValue("Included");Ext.getCmp("EVENT_IDS").focus(true);return false;}if(c=="all"){if(w==""){Ext.getCmp("EvIdEx").setValue("none");}}else{Ext.getCmp("EvIdEx").setValue("none");}Ext.getCmp("EvIdIn").setValue(c);Ext.getCmp("EVENT_IDS").setValue(Ext.getCmp("EvIdEx").getValue());
}}else{if(o=="Desc_SL"){var b=Ext.getCmp("Desc_SL").getValue();if(!Ext.isEmpty(b)&&b=="Included"){var l=trim(Ext.getCmp("EVENT_DESCRIPTIONS_SL").getValue());var x=this.checkEventDescriptionSL(l,"Excluded");if(!x){Ext.getCmp("Desc_SL").setValue("Excluded");}var v=this.checkForNoneKeywordSL(l,"Excluded");
if(!v){Ext.getCmp("Desc_SL").setValue("Excluded");}var u=this.checkForAllKeywordSL(l,"Excluded");if(!u){Ext.getCmp("Desc_SL").setValue("Excluded");}if(l=="none"){if(f==""||f==undefined){Ext.getCmp("EvDescIn_SL").setValue("all");}}else{Ext.getCmp("EvDescIn_SL").setValue("all");}Ext.getCmp("EvDescEx_SL").setValue(l);
Ext.getCmp("EVENT_DESCRIPTIONS_SL").setValue(Ext.getCmp("EvDescIn_SL").getValue());}else{var a=trim(Ext.getCmp("EVENT_DESCRIPTIONS_SL").getValue());var x=this.checkEventDescriptionSL(a,"Included");if(!x){Ext.getCmp("Desc_SL").setValue("Included");return;}var v=this.checkForAllKeywordSL(a,"Included");
if(!v){Ext.getCmp("Desc_SL").setValue("Included");}var u=this.checkForNoneKeywordSL(a,"Included");if(!u){Ext.getCmp("Desc_SL").setValue("Included");}if(a=="all"){if(s==""||s==undefined){Ext.getCmp("EvDescEx_SL").setValue("none");}}else{Ext.getCmp("EvDescEx_SL").setValue("none");}Ext.getCmp("EvDescIn_SL").setValue(a);
Ext.getCmp("EVENT_DESCRIPTIONS_SL").setValue(Ext.getCmp("EvDescEx_SL").getValue());}}else{var b=Ext.getCmp("Desc").getValue();if(!Ext.isEmpty(b)&&b=="Included"){var l=trim(Ext.getCmp("EVENT_DESCRIPTIONS").getValue());var x=this.checkEventDescription(l,"Excluded");if(!x){Ext.getCmp("Desc").setValue("Excluded");
}var v=this.checkForNoneKeyword(l,"EvtDesc","Excluded");if(!v){Ext.getCmp("Desc").setValue("Excluded");}var u=this.checkForAllKeyword(l,"EvtDesc","Excluded");if(!u){Ext.getCmp("Desc").setValue("Excluded");}if(l=="none"){if(d==""||d==undefined){Ext.getCmp("EvDescIn").setValue("all");}}else{Ext.getCmp("EvDescIn").setValue("all");
}Ext.getCmp("EvDescEx").setValue(l);Ext.getCmp("EVENT_DESCRIPTIONS").setValue(Ext.getCmp("EvDescIn").getValue());}else{var a=trim(Ext.getCmp("EVENT_DESCRIPTIONS").getValue());var x=this.checkEventDescription(a,"Included");if(!x){Ext.getCmp("Desc").setValue("Included");return;}var v=this.checkForAllKeyword(a,"EvtDesc","Included");
if(!v){Ext.getCmp("Desc").setValue("Included");}var u=this.checkForNoneKeyword(a,"EvtDesc","Included");if(!u){Ext.getCmp("Desc").setValue("Included");}if(a=="all"){if(s==""||s==undefined){Ext.getCmp("EvDescEx").setValue("none");}}else{Ext.getCmp("EvDescEx").setValue("none");}Ext.getCmp("EvDescIn").setValue(a);
Ext.getCmp("EVENT_DESCRIPTIONS").setValue(Ext.getCmp("EvDescEx").getValue());}}}}}else{if(m=="view"){if(o=="Source"){var q=Ext.getCmp("Source").getValue();if(!Ext.isEmpty(q)&&q=="Included"){Ext.getCmp("EVENT_SOURCES").setValue(Ext.getCmp("EvScIn").getValue());}else{Ext.getCmp("EVENT_SOURCES").setValue(Ext.getCmp("EvScEx").getValue());
}}else{if(o=="Id"){var y=Ext.getCmp("Id").getValue();if(!Ext.isEmpty(y)&&y=="Included"){Ext.getCmp("EVENT_IDS").setValue(Ext.getCmp("EvIdIn").getValue());}else{Ext.getCmp("EVENT_IDS").setValue(Ext.getCmp("EvIdEx").getValue());}}else{if(o=="Desc_SL"){var b=Ext.getCmp("Desc_SL").getValue();if(!Ext.isEmpty(b)&&b=="Included"){Ext.getCmp("EVENT_DESCRIPTIONS_SL").setValue(Ext.getCmp("EvDescIn_SL").getValue());
}else{Ext.getCmp("EVENT_DESCRIPTIONS_SL").setValue(Ext.getCmp("EvDescEx_SL").getValue());}}else{var b=Ext.getCmp("Desc").getValue();if(!Ext.isEmpty(b)&&b=="Included"){Ext.getCmp("EVENT_DESCRIPTIONS").setValue(Ext.getCmp("EvDescIn").getValue());}else{Ext.getCmp("EVENT_DESCRIPTIONS").setValue(Ext.getCmp("EvDescEx").getValue());
}}}}}}},windowCloseEvent:function(){if(!Ext.isEmpty(deletedRecords)&&deletedRecords!=undefined){var a=new Array();var n=Ext.getCmp("filter_combo");if(deletedRecords.indexOf(",")!=-1){var s=new Array();s=deletedRecords.split(",");for(var f=0;f<s.length;f++){if(Ext.isEmpty(s[f].toString().trim())||s[f].toString().trim()==undefined){continue;
}var k=n.getStore().find("valueField",s[f].toString(),0,false,true,true);n.getStore().removeAt(k);}}else{var k=n.getStore().find("valueField",deletedRecords.toString(),0,false,true,true);n.getStore().removeAt(k);}deletedRecords="";var d=Ext.getCmp("filter_combo").getValue();var t=Ext.getCmp("filter_combo").getStore().getCount();
if(!Ext.isEmpty(t)&&t>0){for(var f=0;f<t;f++){var e=Ext.getCmp("filter_combo").getStore().getAt(f);if(!Ext.isEmpty(e)){var r=Ext.getCmp("filter_combo").getStore().getAt(f).get("valueField");if(!Ext.isEmpty(r)&&r=="all"){Ext.getCmp("filter_combo").getStore().removeAt(f);}}}}n.getStore().sort("displayField","ASC");
n.getStore().insert(0,{displayField:"all",valueField:"all"});Ext.getCmp("filter_combo").setValue(d);t=Ext.getCmp("filter_combo").getStore().getCount();if(!Ext.isEmpty(t)&&t>0){availPolicies=new Array();for(var f=0;f<t;f++){availPolicies[f]=n.getStore().getAt(f).get("valueField");}}}else{var q=Ext.getCmp("EventsViewGrid");
var o=q.getStore();var n=Ext.getCmp("filter_combo");var u=n.getStore();if(!Ext.isEmpty(q)){var h=o.getCount();for(var m=0;m<h;m++){var g=o.getAt(m).get("Events");var k=n.getStore().find("valueField",g.toString(),0,false,true,true);if(k==-1){n.getStore().add({displayField:g,valueField:g});}}}}var l=Ext.getCmp("componentType").getValue();
var b=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+l+"&componentType="+l+"&tName_HelpPage="+b+"&testName="+b,method:"POST"});},checkForAllKeywordSL:function(g,e){var f="";if(g.indexOf(",")>-1){var b=new Array();b=g.split(",");
for(var d=0;d<b.length;d++){var a=trim(b[d]);if(a.toLowerCase()=="all"){if(e=="Included"){f=alertMsg46;}else{f=alertMsg48;}Ext.Msg.show({title:polCreationPageName,msg:f,buttons:Ext.Msg.OK,icon:"iconExclamation"});return false;}}}else{if(trim(g.toLowerCase())=="all"){if(e=="Included"){var c=trim(g);for(var d=0;
d<3;d++){if(c.charAt(d)=="A"||c.charAt(d)=="L"){Ext.Msg.show({title:polCreationPageName,msg:alertMsg51,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(h){Ext.getCmp("EVENT_DESCRIPTIONS_SL").focus(true);}});return false;}}}else{Ext.Msg.show({title:polCreationPageName,msg:alertMsg54,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(h){Ext.getCmp("EVENT_DESCRIPTIONS_SL").focus(true);
}});return false;}}}return true;},checkForAllKeyword:function(g,l,c){var f=polCreationJson["fieldName"];var h="";if(g.indexOf(",")>-1){var e=new Array();e=g.split(",");for(var d=0;d<e.length;d++){var a=trim(e[d]);if(a.toLowerCase()=="all"){if(l=="EvtSrc"){if(c=="Included"){h=alertMsg44;}else{h=alertMsg45;
}Ext.Msg.show({title:polCreationPageName,msg:h,buttons:Ext.Msg.OK,icon:"iconExclamation"});}else{if(c=="Included"){if(f=="EVENT DESCRIPTIONS"){h=alertMsg46;}else{h=alertMsg47;}}else{if(f=="EVENT DESCRIPTIONS"){h=alertMsg48;}else{h=alertMsg49;}}Ext.Msg.show({title:polCreationPageName,msg:h,buttons:Ext.Msg.OK,icon:"iconExclamation"});
}return false;}}}else{if(trim(g.toLowerCase())=="all"){if(c=="Included"){var b=trim(g);for(var d=0;d<3;d++){if(b.charAt(d)=="A"||b.charAt(d)=="L"){if(l=="EvtSrc"){Ext.Msg.show({title:polCreationPageName,msg:evtSrcMsg,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(k){Ext.getCmp("EVENT_SOURCES").focus(true);
}});}else{if(f=="EVENT DESCRIPTIONS"){h=alertMsg51;}else{h=alertMsg52;}Ext.Msg.show({title:polCreationPageName,msg:h,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(k){Ext.getCmp("EVENT_DESCRIPTIONS").focus(true);}});}return false;}}}else{if(l=="EvtSrc"){Ext.Msg.show({title:polCreationPageName,msg:alertMsg53,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(k){Ext.getCmp("EVENT_SOURCES").focus(true);
}});}else{if(f=="EVENT DESCRIPTIONS"){h=alertMsg54;}else{h=alertMsg55;}Ext.Msg.show({title:polCreationPageName,msg:h,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(k){Ext.getCmp("EVENT_DESCRIPTIONS").focus(true);}});}return false;}}}return true;},checkForNoneKeywordSL:function(g,e){var f="";if(g.indexOf(",")>-1){var b=new Array();
b=g.split(",");for(var d=0;d<b.length;d++){var a=trim(b[d]);if(a.toLowerCase()=="none"){if(e=="Included"){f=alertMsg58;}else{f=alertMsg60;}Ext.Msg.show({title:polCreationPageName,msg:f,buttons:Ext.Msg.OK,icon:"iconExclamation"});return false;}}}else{if(trim(g.toLowerCase())=="none"){if(e=="Included"){Ext.Msg.show({title:polCreationPageName,msg:alertMsg63,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(h){Ext.getCmp("EVENT_DESCRIPTIONS_SL").focus(true);
}});return false;}else{var c=trim(g);for(var d=0;d<4;d++){if(c.charAt(d)=="N"||c.charAt(d)=="O"||c.charAt(d)=="E"){Ext.Msg.show({title:polCreationPageName,msg:alertMsg66,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(h){Ext.getCmp("EVENT_DESCRIPTIONS_SL").focus(true);}});return false;}}}}}return true;
},checkForNoneKeyword:function(h,l,d){var g=polCreationJson["fieldName"];var c="";if(h.indexOf(",")>-1){var f=new Array();f=h.split(",");for(var e=0;e<f.length;e++){var a=trim(f[e]);if(a.toLowerCase()=="none"){if(l=="EvtSrc"){if(d=="Included"){c=alertMsg56;}else{c=alertMsg57;}Ext.Msg.show({title:polCreationPageName,msg:c,buttons:Ext.Msg.OK,icon:"iconExclamation"});
}else{if(d=="Included"){if(g=="EVENT DESCRIPTIONS"){c=alertMsg58;}else{c=alertMsg59;}}else{if(g=="EVENT DESCRIPTIONS"){c=alertMsg60;}else{c=alertMsg61;}}Ext.Msg.show({title:polCreationPageName,msg:c,buttons:Ext.Msg.OK,icon:"iconExclamation"});}return false;}}}else{if(trim(h.toLowerCase())=="none"){if(d=="Included"){if(l=="EvtSrc"){Ext.Msg.show({title:polCreationPageName,msg:alertMsg62,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(k){Ext.getCmp("EVENT_SOURCES").focus(true);
}});return false;}else{if(g=="EVENT DESCRIPTIONS"){c=alertMsg63;}else{c=alertMsg64;}Ext.Msg.show({title:polCreationPageName,msg:c,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(k){Ext.getCmp("EVENT_DESCRIPTIONS").focus(true);}});return false;}}else{var b=trim(h);for(var e=0;e<4;e++){if(b.charAt(e)=="N"||b.charAt(e)=="O"||b.charAt(e)=="E"){if(l=="EvtSrc"){Ext.Msg.show({title:polCreationPageName,msg:alertMsg65,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(k){Ext.getCmp("EVENT_SOURCES").focus(true);
}});return false;}else{if(g=="EVENT DESCRIPTIONS"){c=alertMsg66;}else{c=alertMsg67;}Ext.Msg.show({title:polCreationPageName,msg:c,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(k){Ext.getCmp("EVENT_DESCRIPTIONS").focus(true);}});return false;}}}}}}return true;},checkEventSource:function(c,a){var b="";
if(Ext.isEmpty(c)||c==undefined){if(a=="Included"){b=alertMsg18;}else{b=alertMsg19;}Ext.Msg.show({title:polCreationPageName,msg:b,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(d){Ext.getCmp("EVENT_SOURCES").focus(true);}});return false;}if(c!=null&&c!=""){if(c.indexOf(",")==0||c.lastIndexOf(",")==(c.length-1)){if(a=="Included"){b=alertMsg20;
}else{b=alertMsg21;}Ext.Msg.show({title:polCreationPageName,msg:b,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(d){Ext.getCmp("EVENT_SOURCES").focus(true);}});return false;}if(c.indexOf(",,")>0){if(a=="Included"){b=alertMsg22;}else{b=alertMsg23;}Ext.Msg.show({title:polCreationPageName,msg:b,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(d){Ext.getCmp("EVENT_SOURCES").focus(true);
}});return false;}}return true;},checkEventID:function(b,a){var e=/^[0-9,]+$/;var c="";if(Ext.isEmpty(b)||b==undefined){if(a=="Included"){c=alertMsg24;}else{c=alertMsg25;}Ext.Msg.show({title:polCreationPageName,msg:c,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(f){Ext.getCmp("EVENT_IDS").focus(true);
}});return false;}if(b!=null&&b!=""){var d=e.test(b);if(a=="Included"&&b!="all"&&!d){Ext.Msg.show({title:polCreationPageName,msg:alertMsg29,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(f){Ext.getCmp("EVENT_IDS").focus(true);}});return false;}else{if(a=="Excluded"&&b!="none"&&!d){Ext.Msg.show({title:polCreationPageName,msg:alertMsg28,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(f){Ext.getCmp("EVENT_IDS").focus(true);
}});return false;}}if(b.indexOf(",")==0||b.lastIndexOf(",")==(b.length-1)){if(a=="Included"){c=alertMsg26;}else{c=alertMsg27;}Ext.Msg.show({title:polCreationPageName,msg:c,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(f){Ext.getCmp("EVENT_IDS").focus(true);}});return false;}if(b.indexOf(",,")>0){if(a=="Included"){c=alertMsg30;
}else{c=alertMsg31;}Ext.Msg.show({title:polCreationPageName,msg:c,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(f){Ext.getCmp("EVENT_IDS").focus(true);}});return false;}}return true;},checkEventDescriptionSL:function(a,b){var c="";if(Ext.isEmpty(a)||a==undefined){if(b=="Included"){c=alertMsg32;
}else{c=alertMsg34;}Ext.Msg.show({title:polCreationPageName,msg:c,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(d){Ext.getCmp("EVENT_DESCRIPTIONS_SL").focus(true);}});return false;}else{if(a.indexOf(",")==0||a.lastIndexOf(",")==(a.length-1)){if(b=="Included"){c=alertMsg36;}else{c=alertMsg37;}Ext.Msg.show({title:polCreationPageName,msg:c,buttons:Ext.Msg.OK,fn:function(d){Ext.getCmp("EVENT_DESCRIPTIONS_SL").focus(true);
}});return false;}if(a.indexOf(",,")>0){if(b=="Included"){c=alertMsg40;}else{c=alertMsg42;}Ext.Msg.show({title:polCreationPageName,msg:c,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(d){Ext.getCmp("EVENT_DESCRIPTIONS_SL").focus(true);}});return false;}}return true;},checkEventDescription:function(a,c,d){var e="";
var b=polCreationJson["fieldName"];if(Ext.isEmpty(a)||a==undefined){if(c=="Included"){if(b=="EVENT DESCRIPTIONS"){e=alertMsg32;}else{e=alertMsg33;}}else{if(b=="EVENT DESCRIPTIONS"){e=alertMsg34;}else{e=alertMsg35;}}Ext.Msg.show({title:polCreationPageName,msg:e,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(f){Ext.getCmp("EVENT_DESCRIPTIONS").focus(true);
}});return false;}if(a!=null&&a!=""){if(a.indexOf(",")==0||a.lastIndexOf(",")==(a.length-1)){if(c=="Included"){if(b=="EVENT DESCRIPTIONS"){e=alertMsg36;}else{e=alertMsg38;}}else{if(b=="EVENT DESCRIPTIONS"){e=alertMsg37;}else{e=alertMsg39;}}Ext.Msg.show({title:polCreationPageName,msg:e,buttons:Ext.Msg.OK,fn:function(f){Ext.getCmp("EVENT_DESCRIPTIONS").focus(true);
}});return false;}if(a.indexOf(",,")>0){if(c=="Included"){if(b=="EVENT DESCRIPTIONS"){e=alertMsg40;}else{e=alertMsg41;}}else{if(b=="EVENT DESCRIPTIONS"){e=alertMsg42;}else{e=alertMsg43;}}Ext.Msg.show({title:polCreationPageName,msg:e,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(f){Ext.getCmp("EVENT_DESCRIPTIONS").focus(true);
}});return false;}}return true;},handleDeleteSelectedInter:function(){var f=Ext.getCmp("EventsViewGrid").getSelectionModel().getSelection();var b="";var d="";var g=new Array();var a="";if(f==""){Ext.Msg.show({title:pageName,msg:alertMsg71,icon:"iconExclamation",buttons:Ext.Msg.OK});return false;}for(var e=0;
e<f.length;e++){b=f[e];id=b.get("Events");if(id!=null){g.push(id);}}for(var c=0;c<g.length;c++){d+=g[c]+",";}Ext.Msg.show({title:pageName,msg:alertMsg70,buttons:Ext.MessageBox.YESNO,icon:"iconConfirmation",fn:function(l){if(l=="yes"){if(Ext.isEmpty(deletedRecords)||deletedRecords==""){deletedRecords=d;
}else{deletedRecords+=","+d;}var r=jsonVal["server"];var s=jsonVal["parmTestName"];var n=jsonVal["logtype"];var h=jsonVal["showAll"];var m=jsonVal["requestFrom"];var o=jsonVal["q"];var k=Ext.getCmp("logType").getValue();urlVal="SpecificTestConfiguration/data/ViewPolicyJson.jsp?server="+encodeURIComponent(r)+"&test="+s+"&policy="+encodeURI(d)+"&delpolicy=yes&log_type="+k+"&showAll="+h+"&q="+o+"&logtype="+k+"&requestFrom="+m+"&currentLogType="+k;
Ext.Ajax.request({url:urlVal,method:"post",scope:this,success:function(q){if(q.status==200&&!Ext.isEmpty(q.responseText)){var t=q.responseText;var u=Ext.decode(t);Ext.getCmp("EventsViewGrid").getStore().removeAll();Ext.getCmp("EventsViewGrid").getStore().loadRawData(u["gridDataArr"]);Ext.getCmp("EventsViewGrid").getSelectionModel().deselectAll(true);
}}});}}});},handleEditIconClickInter:function(a,g,c,d,f){var b=Ext.getCmp("EventsViewGrid").getStore().getAt(g);this.showEditWindow(b);},showEditWindow:function(b){var f=b.get("Events");var d=this;var c=Ext.create("SpecificTestConfiguration.view.EgPolicyCreation");var a=Ext.getCmp("logType").getValue();
var e="change=modify&policy="+f+"&server="+jsonVal["server"]+"&test="+jsonVal["parmTestName"]+"&showAll="+jsonVal["showAll"]+"&q="+jsonVal["q"]+"&logtype="+a+"&requestFrom="+jsonVal["requestFrom"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgPolicyCreationJson.jsp?"+e,method:"post",scope:this,async:false,success:function(g){if(g.status==200&&!Ext.isEmpty(g.responseText)){var A=g.responseText;
polCreationJson=Ext.decode(A);c.setTitle(modifyPolicyTitle);c.show();var m=polCreationJson["pol_name"];var u=polCreationJson["selectedEvtId"];var r=polCreationJson["EvtidText"];var C=polCreationJson["selectedEvtSource"];var n=polCreationJson["EvtsourceText"];var w=polCreationJson["selectedEvtDesc"];var h=polCreationJson["EvtdescText"];
var s=polCreationJson["isReadOnly"];var t=polCreationJson["isReadOnlyText"];Ext.getCmp("pol_name").setValue(m);if(!Ext.isEmpty(s)&&s!=undefined){Ext.getCmp("pol_name").setReadOnly(true);}Ext.getCmp("Source").setValue(C);Ext.getCmp("EVENT_SOURCES").setValue(n);Ext.getCmp("Id").setValue(u);Ext.getCmp("EVENT_IDS").setValue(r);
Ext.getCmp("Desc").setValue(w);Ext.getCmp("EVENT_DESCRIPTIONS").setValue(h);if(!Ext.isEmpty(t)&&t!=undefined){Ext.getCmp("EVENT_SOURCES").setReadOnly(true);Ext.getCmp("EVENT_IDS").setReadOnly(true);Ext.getCmp("EVENT_DESCRIPTIONS").setReadOnly(true);}var l=Ext.getCmp("EvScIn").setValue(polCreationJson["hiddenPolicyObj"]["EvScIn"]);
var x=Ext.getCmp("EvScEx").setValue(polCreationJson["hiddenPolicyObj"]["EvScEx"]);var o=Ext.getCmp("EvIdIn").setValue(polCreationJson["hiddenPolicyObj"]["EvIdIn"]);var B=Ext.getCmp("EvIdEx").setValue(polCreationJson["hiddenPolicyObj"]["EvIdEx"]);var k=Ext.getCmp("EvDescIn").setValue(polCreationJson["hiddenPolicyObj"]["EvDescIn"]);
var v=Ext.getCmp("EvDescEx").setValue(polCreationJson["hiddenPolicyObj"]["EvDescEx"]);Ext.getCmp("EvtLogDescriptors").setValue(polCreationJson["hiddenPolicyObj"]["EvtLogDescriptors"]);var q=polCreationJson["hiddenPolicyObj"]["testName"];if(!Ext.isEmpty(q)&&q=="SecurityLogTest"){Ext.getCmp("evtdescriptors").setFieldLabel("EVENT USERS");
Ext.getCmp("evtdescriptors_SL").show();Ext.getCmp("mainContainer").setAutoScroll(true);Ext.getCmp("mainContainer").setHeight(430);var z=polCreationJson["selectedEvtDesc_SL"];var y=polCreationJson["EvtdescText_SL"];Ext.getCmp("Desc_SL").setValue(z);Ext.getCmp("EVENT_DESCRIPTIONS_SL").setValue(y);if(!Ext.isEmpty(t)&&t!=undefined){Ext.getCmp("EVENT_DESCRIPTIONS_SL").setReadOnly(true);
}Ext.getCmp("EvDescIn_SL").setValue(polCreationJson["hiddenPolicyObj"]["EvDescIn_SL"]);Ext.getCmp("EvDescEx_SL").setValue(polCreationJson["hiddenPolicyObj"]["EvDescEx_SL"]);}}}});},handleViewIconClickInter:function(a,d,c){var b=Ext.getCmp("EventsViewGrid").getStore().getAt(d);this.viewPolicyTask(b);},viewPolicyTask:function(b){var f=b.get("Events");
var d=this;var c=Ext.create("SpecificTestConfiguration.view.EgPolicyCreation");var a=Ext.getCmp("logType").getValue();var e="change=view&policy="+f+"&server="+encodeURIComponent(jsonVal["server"])+"&test="+jsonVal["parmTestName"]+"&showAll="+jsonVal["showAll"]+"&q="+jsonVal["q"]+"&logtype="+a+"&requestFrom="+jsonVal["requestFrom"];
Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgPolicyCreationJson.jsp?"+e,method:"post",scope:this,async:false,success:function(g){if(g.status==200&&!Ext.isEmpty(g.responseText)){var A=g.responseText;polCreationJson=Ext.decode(A);c.setTitle(viewPolicyTitle);c.show();Ext.getCmp("egpolicycreation").removeDocked(Ext.getCmp("dockedToolBarBtn"));
var m=polCreationJson["pol_name"];var u=polCreationJson["selectedEvtId"];var r=polCreationJson["EvtidText"];var C=polCreationJson["selectedEvtSource"];var n=polCreationJson["EvtsourceText"];var w=polCreationJson["selectedEvtDesc"];var h=polCreationJson["EvtdescText"];var s=polCreationJson["isReadOnly"];
var t=polCreationJson["isReadOnlyText"];Ext.getCmp("pol_name").setValue(f);if(!Ext.isEmpty(s)&&s!=undefined){Ext.getCmp("pol_name").setReadOnly(true);}Ext.getCmp("Source").setValue(C);Ext.getCmp("EVENT_SOURCES").setValue(n);Ext.getCmp("Id").setValue(u);Ext.getCmp("EVENT_IDS").setValue(r);Ext.getCmp("Desc").setValue(w);
Ext.getCmp("EVENT_DESCRIPTIONS").setValue(h);if(!Ext.isEmpty(t)&&t!=undefined){Ext.getCmp("EVENT_SOURCES").setReadOnly(true);Ext.getCmp("EVENT_IDS").setReadOnly(true);Ext.getCmp("EVENT_DESCRIPTIONS").setReadOnly(true);}var l=Ext.getCmp("EvScIn").setValue(polCreationJson["hiddenPolicyObj"]["EvScIn"]);
var x=Ext.getCmp("EvScEx").setValue(polCreationJson["hiddenPolicyObj"]["EvScEx"]);var o=Ext.getCmp("EvIdIn").setValue(polCreationJson["hiddenPolicyObj"]["EvIdIn"]);var B=Ext.getCmp("EvIdEx").setValue(polCreationJson["hiddenPolicyObj"]["EvIdEx"]);var k=Ext.getCmp("EvDescIn").setValue(polCreationJson["hiddenPolicyObj"]["EvDescIn"]);
var v=Ext.getCmp("EvDescEx").setValue(polCreationJson["hiddenPolicyObj"]["EvDescEx"]);Ext.getCmp("EvtLogDescriptors").setValue(polCreationJson["hiddenPolicyObj"]["EvtLogDescriptors"]);var q=polCreationJson["hiddenPolicyObj"]["testName"];if(!Ext.isEmpty(q)&&q=="SecurityLogTest"){Ext.getCmp("evtdescriptors").setFieldLabel("EVENT USERS");
Ext.getCmp("evtdescriptors_SL").show();Ext.getCmp("mainContainer").setAutoScroll(true);Ext.getCmp("mainContainer").setHeight(430);var z=polCreationJson["selectedEvtDesc_SL"];var y=polCreationJson["EvtdescText_SL"];Ext.getCmp("Desc_SL").setValue(z);Ext.getCmp("EVENT_DESCRIPTIONS_SL").setValue(y);if(!Ext.isEmpty(t)&&t!=undefined){Ext.getCmp("EVENT_DESCRIPTIONS_SL").setReadOnly(true);
}Ext.getCmp("EvDescIn_SL").setValue(polCreationJson["hiddenPolicyObj"]["EvDescIn_SL"]);Ext.getCmp("EvDescEx_SL").setValue(polCreationJson["hiddenPolicyObj"]["EvDescEx_SL"]);}}}});},saveWebConfig:function(){var c=Ext.getCmp("wsdlService").getValue();if(Ext.isEmpty(c)||c==undefined){Ext.Msg.show({title:pageName,msg:alertWebMsg3,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return;}var s="htmlview";var F=Ext.getCmp("xmlandhtmlview").getActiveTab().getItemId();if(F=="xmlview"){s="xmlview";}var d="";var u="";if(s=="htmlview"){var k=[];var r="";var E=[];$("td[class='hiddentd x-grid-cell']").each(function(){var y=$(this).text();E.push(y);});$("td[class='parameterName x-grid-cell']").each(function(){r=$(this).text();
if(r.indexOf("*")>-1){r=r.substring(0,r.indexOf("*"));}k.push(r);});var f=[];$("#inputTbl").find("tr#inputRow").each(function(G){var y="";y=$.trim($(this).find("td:eq(2)").find("input#inputValue").val());if(y==""||y=="undefined"){y=$.trim($(this).find("td:eq(2)").find("select#selectValue").val());}if(y!="undefined"){f.push(y);
}});$(".linesquare").find("#subinputRow").each(function(){var y="";y=$.trim($(this).find("td:eq(2)").find("input#inputValue").val());if(y==""||y=="undefined"){y=$.trim($(this).find("td:eq(2)").find("select#selectValue").val());}if(y!="undefined"){f.push(y);}});var e=this.combine(E,k,f);for(var n=0;n<e.length;
n++){d=d+"~"+e[n];}if(d.indexOf("~")==0){d=d.substring(d.indexOf(",")+1);}}else{if(s=="xmlview"){u=$("#soapRequest").val();}}var A="";var w=Ext.getCmp("wsdlOperation").fromField.getValue();var z=Ext.getCmp("wsdlOperation").fromField.store;if(z.getCount()>1){for(var x=0;x<z.getCount();x++){var g=z.getAt(x).get("valueField");
if(!Ext.isEmpty(g)&&g!=undefined){A+=","+g;}}}else{A=w;}if(A.indexOf(",")==0){A=A.substring(A.indexOf(",")+1);}var B=Ext.getCmp("wsdlOperation");var q=B.fromField.store;var m=B.toField.store;var C=publicWebServJSON["wsdl"];var h=publicfinalwebJSON["mainOperation"];var o=publicWebServJSON["componentName"];
var D=Ext.getCmp("wsdlUrl").getValue();var b=publicWebServJSON["credentialWithPattern"];var c=Ext.getCmp("wsdlService").getValue();var l=Ext.getCmp("agentListObj").getValue();var v="save";var t=A;var a=new Ext.LoadMask(Ext.getCmp("egwebserviceconfiguration"),{msg:"Loading..."});a.show();Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgWebServiceConfigJson.jsp",method:"POST",params:"selectedUrlValue="+encodeURI(D)+"&selectedServiceValue="+encodeURI(c)+"&selectedOperationValue="+encodeURI(w)+"&requestMsg="+encodeURI(u)+"&reqFrom="+encodeURI(v)+"&componentName="+encodeURI(o)+"&wsdl="+encodeURI(C)+"&operation="+encodeURI(h)+"&associatedOp="+encodeURI(t)+"&inputValues="+encodeURI(d)+"&configMode="+encodeURI(l)+"&credentialWithPattern="+encodeURI(b),timeout:6000000,success:function(y){if(y.status==200&&!Ext.isEmpty(y.responseText)){var K=y.responseText;
var J=Ext.decode(K);var H=J["defaultMsg"];if(l!="EgManager"&&s=="htmlview"){if(H=="Failed to get required configuration information from agent"||H=="Agent not installed or not running"){Ext.Msg.show({title:pageName,msg:H,buttons:Ext.Msg.OK,icon:"iconExclamation"});}}var G=J["finalValue"];if(G==null||G==""){Ext.getCmp("Operations").setValue(h);
}else{Ext.getCmp("Operations").setValue(G);}var I=J["definedOperationsArry"];var L=J["monitoredOperationsArry"];if(m.getCount()>=1){m.removeAll();}if(q.getCount()>=1){q.removeAll();}if(!Ext.isEmpty(I)&&I!=undefined){m.add(I);}if(!Ext.isEmpty(L)&&L!=undefined){q.add(L);}Ext.getCmp("xmlTable").removeAll();
Ext.getCmp("xmlTable").hide();Ext.getCmp("inputTable").removeAll();Ext.getCmp("htmlviewer").hide();Ext.getCmp("xmlandhtmlview").setDisabled(true);Ext.getCmp("saveAndConfigContainer").hide();}a.hide();}});},combine:function(d,f,b){var a=Math.min(d.length,f.length,b.length),c=[],e;for(e=0;e<a;e++){c.push(d[e]+":"+f[e]+":"+b[e]);
}return c;},sendRequestWebConfig:function(){var c=Ext.getCmp("wsdlService").getValue();var s=Ext.getCmp("wsdlOperation").fromField.getValue();if(Ext.isEmpty(c)||c==undefined){Ext.Msg.show({title:pageName,msg:alertWebMsg3,buttons:Ext.Msg.OK,icon:"iconExclamation"});return;}var A=Ext.getCmp("xmlandhtmlview").getActiveTab().getItemId();
var o="xmlview";if(A=="htmlview"){o="htmlview";}var d="";var r="";if(o=="htmlview"){var g=[];var n="";var z=[];$("td[class='hiddentd x-grid-cell']").each(function(){var y=$(this).text();z.push(y);});$("td[class='parameterName x-grid-cell']").each(function(){n=$(this).text();if(n.indexOf("*")>-1){n=n.substring(0,n.indexOf("*"));
}g.push(n);});var f=[];$("#inputTbl").find("tr#inputRow").each(function(B){var y="";y=$.trim($(this).find("td:eq(2)").find("input#inputValue").val());if(y==""||y=="undefined"){y=$.trim($(this).find("td:eq(2)").find("select#selectValue").val());}if(y!="undefined"){f.push(y);}});$(".linesquare").find("#subinputRow").each(function(){var y="";
y=$.trim($(this).find("td:eq(2)").find("input#inputValue").val());if(y==""||y=="undefined"){y=$.trim($(this).find("td:eq(2)").find("select#selectValue").val());}if(y!="undefined"){f.push(y);}});var e=this.combine(z,g,f);for(var l=0;l<e.length;l++){d=d+"~"+e[l];}if(d.indexOf("~")==0){d=d.substring(d.indexOf(",")+1);
}}else{if(o=="xmlview"){r=$("#soapRequest").val();}}var a=publicWebServJSON["credentialWithPattern"];var x=publicWebServJSON["wsdl"];var h=publicWebServJSON["finalValue"];var m=publicWebServJSON["componentName"];var w=Ext.getCmp("wsdlUrl").getValue();var c=Ext.getCmp("wsdlService").getValue();var v=Ext.getCmp("wsdlOperation").fromField.getValue();
var k=Ext.getCmp("agentListObj").getValue();var t="sendRequest";var q="/final/admin/EgWebServiceResponse.jsp";if(o=="htmlview"){Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgWebServiceConfigJson.jsp",method:"POST",params:"selectedUrlValue="+encodeURI(w)+"&selectedServiceValue="+encodeURI(c)+"&selectedOperationValue="+encodeURI(v)+"&componentName="+encodeURI(m)+"&wsdl="+encodeURI(x)+"&operation="+encodeURI(h)+"&reqFrom="+encodeURI(t)+"&inputValues="+encodeURI(d)+"&configMode="+encodeURI(k)+"&credentialWithPattern="+encodeURI(a),timeout:1200000,success:function(C){if(C.status==200&&!Ext.isEmpty(C.responseText)){var F=C.responseText;
var D=Ext.decode(F);var E=D["SOAPReq"];var y=$("#soapRequest").val();if(Ext.isEmpty(y)){$("#soapRequest").val(E);}else{$("#soapRequest").val("");$("#soapRequest").val(E);}var B="SpecificTestConfiguration/data/EgWebServiceResponse.jsp";Ext.Ajax.request({url:B,timeout:1200000,params:"selectedUrlValue="+encodeURI(window.parent.filterEncode(w))+"&selectedServiceValue="+encodeURI(c)+"&selectedOperationValue="+encodeURI(v)+"&requestMsg="+encodeURI((E))+"&reqFrom="+encodeURI(t)+"&componentName="+encodeURI(m)+"&wsdl="+encodeURI(window.parent.filterEncode(x))+"&operation="+encodeURI(window.parent.filterEncode(h))+"&credentialWithPattern="+encodeURI(window.parent.filterEncode(a)),method:"POST",success:function(G){if(G.status==200&&!Ext.isEmpty(G.responseText)){var H=G.responseText;
Ext.widget("window",{title:"Web Service Response",width:"532px",height:"212px",id:"file",padding:"5 10 10 10",name:"file",resizable:"false",scroll:true,autoScroll:true,items:[{xtype:"component",html:H}]}).show();}}});Ext.getCmp("wsdlUrl").setDisabled(false);Ext.getCmp("agentListObj").setDisabled(false);
}}});}else{if(o=="xmlview"){var b="selectedUrlValue="+encodeURI(w)+"&selectedServiceValue="+encodeURI(c)+"&selectedOperationValue="+encodeURI(v)+"&requestMsg="+encodeURI(r)+"&componentName="+encodeURI(m)+"&wsdl="+encodeURI(x)+"&operation="+encodeURI(h)+"&reqFrom=sendRequestXml"+"&inputValues="+encodeURI(d)+"&configMode="+encodeURI(k)+"&credentialWithPattern="+encodeURI(a);
Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgWebServiceConfigJson.jsp?",params:b,method:"POST",timeout:1200000,success:function(y){var B=$(y).find("#inputTable").html();$("#inputTable").html(B);}});var u="selectedUrlValue="+encodeURI(w)+"&selectedServiceValue="+encodeURI(c)+"&selectedOperationValue="+encodeURI(v)+"&requestMsg="+encodeURI(r)+"&reqFrom="+encodeURI(t)+"&componentName="+encodeURI(m)+"&wsdl="+encodeURI(x)+"&operation="+encodeURI(h)+"&credentialWithPattern="+encodeURI(a);
Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgWebServiceResponse.jsp",method:"POST",params:u,timeout:1200000,success:function(y){if(y.status==200&&!Ext.isEmpty(y.responseText)){var B=y.responseText;Ext.widget("window",{title:"Web Service Response",width:"532px",height:"212px",id:"file",name:"file",resizable:"false",scroll:true,autoScroll:true,items:[{xtype:"component",html:B}]}).show();
}}});Ext.getCmp("wsdlUrl").setDisabled(false);Ext.getCmp("agentListObj").setDisabled(false);}}},webServiceConfig:function(){var g="";if(!Ext.isEmpty(Ext.getCmp("WSDL_URL"))&&Ext.getCmp("WSDL_URL")!=undefined){g=Ext.getCmp("WSDL_URL").getValue();}else{if(!Ext.isEmpty(Ext.getCmp("wsdl_url"))&&Ext.getCmp("wsdl_url")!=undefined){g=Ext.getCmp("wsdl_url").getValue();
}}if(!Ext.isEmpty(g)&&g.indexOf("$")!=-1){Ext.Msg.show({title:pageName,msg:invalidUrlMsg,buttons:Ext.Msg.OK,icon:"iconExclamation"});return;}else{Ext.create("SpecificTestConfiguration.view.EgWebServiceConfiguration").show();Ext.getCmp("saveAndConfigContainer").hide();Ext.getCmp("xmlTable").removeAll();
Ext.getCmp("xmlTable").hide();Ext.getCmp("inputTable").removeAll();Ext.getCmp("htmlviewer").hide();Ext.getCmp("xmlandhtmlview").setDisabled(true);var l=Ext.getCmp("componentName").getValue();var c=Ext.getCmp("credentials").getValue();var a=Ext.getCmp("Operations").getValue();var h="";var k="";var f=g.split(",");
var b=c.split(",");for(var d=0;d<f.length;d++){var e=f[d];var o=b[d];var k=e.substring(0,e.indexOf(":"));var n=k+":"+o;h=h+","+n;}if(h.indexOf(",")==0){h=h.substring(h.indexOf(",")+1);}var m=new Ext.LoadMask(Ext.getCmp("egwebserviceconfiguration"),{msg:"Updating..."});m.show();Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgWebServiceConfigJson.jsp?",method:"POST",params:"wsdl="+encodeURIComponent(g)+"&operation="+encodeURIComponent(a)+"&credentialWithPattern="+encodeURIComponent(h)+"&componentName="+encodeURIComponent(l)+"&reqFrom=testConfig",timeout:1200000,async:false,success:function(q){if(q.status==200&&!Ext.isEmpty(q.responseText)){m.hide();
var r=q.responseText;publicWebServJSON=Ext.decode(r);selectedMgr=publicWebServJSON["selectedMgr"];if(Ext.getCmp("agentListObj").getStore().getCount()>1){Ext.getCmp("agentListObj").getStore().removeAll();}Ext.getCmp("agentListObj").getStore().loadRawData(publicWebServJSON["choosemgrArry"]);if(!Ext.isEmpty(selectedMgr)&&selectedMgr!=undefined){Ext.getCmp("agentListObj").setValue(selectedMgr);
}else{Ext.getCmp("agentListObj").setValue(publicWebServJSON["choosemgrArry"][0].valueField);}Ext.getCmp("wsdlUrl").getStore().loadRawData(publicWebServJSON["selectUrlArry"]);Ext.getCmp("wsdlUrl").setValue(publicWebServJSON["selectUrlArry"][0].valueField);}else{m.hide();}}});}},selectService:function(l){Ext.getCmp("saveAndConfigContainer").hide();
Ext.getCmp("xmlTable").removeAll();Ext.getCmp("xmlTable").hide();Ext.getCmp("inputTable").removeAll();Ext.getCmp("htmlviewer").hide();Ext.getCmp("xmlandhtmlview").setDisabled(true);var m=Ext.getCmp("wsdlService").getValue();var f=Ext.getCmp("wsdlOperation");var n=f.fromField.store;var k=f.toField.store;
if(k.getCount()>=1){k.removeAll();}if(n.getCount()>=1){n.removeAll();}if(Ext.isEmpty(m)||m=="Select Service"){Ext.Msg.show({title:pageName,msg:alertWebMsg3,buttons:Ext.Msg.OK,icon:"iconExclamation"});}else{var e=Ext.getCmp("agentListObj").getValue();var a=Ext.getCmp("wsdlUrl").getValue();var h=Ext.getCmp("componentName").getValue();
var o=publicWebServJSON["wsdl"];var g=publicWebServJSON["credentialWithPattern"];var d=Ext.getCmp("Operations").getValue();var b="selectService";var c=new Ext.LoadMask(Ext.getCmp("egwebserviceconfiguration"),{msg:"Loading..."});c.show();Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgWebServiceConfigJson.jsp",method:"POST",params:"wsdl="+encodeURI(o)+"&operation="+encodeURI(d)+"&credentialWithPattern="+encodeURI(g)+"&componentName="+encodeURI(h)+"&selectedUrlValue="+encodeURI(a)+"&configMode="+e+"&reqFrom="+b+"&selectedServiceValue="+encodeURI(m),timeout:1200000,success:function(q){if(q.status==200&&!Ext.isEmpty(q.responseText)){c.hide();
var s=q.responseText;publicWebServJSON=Ext.decode(s);var r=publicWebServJSON["definedOperationsArry"];var t=publicWebServJSON["monitoredOperationsArry"];if(!Ext.isEmpty(r)&&r!=undefined){k.add(r);}if(!Ext.isEmpty(t)&&t!=undefined){n.add(t);}if(k.getCount()==0&&n.getCount()==0){Ext.Msg.show({title:pageName,msg:"No Operation available",buttons:Ext.Msg.OK,icon:"iconExclamation"});
}}}});}},selectUrl:function(){Ext.getCmp("saveAndConfigContainer").hide();Ext.getCmp("xmlandhtmlview").setDisabled(true);Ext.getCmp("xmlTable").removeAll();Ext.getCmp("xmlTable").hide();Ext.getCmp("inputTable").removeAll();Ext.getCmp("htmlviewer").hide();var a=Ext.getCmp("wsdlUrl").getValue();var g=publicWebServJSON["componentName"];
var k=publicWebServJSON["wsdl"];var f=publicWebServJSON["credentialWithPattern"];var d=Ext.getCmp("Operations").getValue();var c="selectUrl";var b=Ext.getCmp("agentListObj").getValue();var e="";if(b.indexOf("eG Manager")!=-1){e="EgManager";}else{e=b;}var h=new Ext.LoadMask(Ext.getCmp("egwebserviceconfiguration"),{msg:"Updating..."});
h.show();Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgWebServiceConfigJson.jsp",method:"POST",params:"wsdl="+encodeURI(k)+"&operation="+encodeURI(d)+"&credentialWithPattern="+encodeURI(f)+"&componentName="+encodeURI(g)+"&selectedUrlValue="+encodeURI(a)+"&configMode="+e+"&reqFrom="+c,timeout:1200000,scope:this,success:function(n){if(n.status==200&&!Ext.isEmpty(n.responseText)){h.hide();
var l=n.responseText;publicWebServJSON=Ext.decode(l);var v=publicWebServJSON["selectServiceArry"];var u=publicWebServJSON["selectedService"];var r=publicWebServJSON["definedOperationsArry"];var m=publicWebServJSON["monitoredOperationsArry"];if(!Ext.isEmpty(v)&&v!=undefined){Ext.getCmp("wsdlService").getStore().loadRawData(v);
}if(!Ext.isEmpty(u)){Ext.getCmp("wsdlService").setValue(u);}else{Ext.getCmp("wsdlService").setValue(v[0].valueField);}var o=Ext.getCmp("wsdlService").getStore().getCount();if(o==1){if(Ext.isEmpty(a)||a==undefined){Ext.Msg.show({title:pageName,msg:selectAUrl,buttons:Ext.Msg.OK,icon:"iconExclamation"});
}else{Ext.Msg.show({title:pageName,msg:noServiceAvail,buttons:Ext.Msg.OK,icon:"iconExclamation"});}}var q=Ext.getCmp("wsdlOperation");var t=q.fromField.store;var s=q.toField.store;if(s.getCount()>=1){s.removeAll();}if(t.getCount()>=1){t.removeAll();}if(o==2){if(!Ext.isEmpty(r)&&r!=undefined){s.add(r);
}if(!Ext.isEmpty(m)&&m!=undefined){t.add(m);}if(s.getCount()==0&&t.getCount()==0){Ext.Msg.show({title:pageName,msg:noOprAvail,buttons:Ext.Msg.OK,icon:"iconExclamation"});}}}}});},configureoperations:function(){var v=Ext.getCmp("wsdlOperation").fromField.getValue();var h=false;var o=new Array();var g=0;
if(!Ext.isEmpty(v)&&v.length>0){for(var q=0;q<v.length;q++){var n=v[q];if(!Ext.isEmpty(n)&&n!=null&&n!="undefined"){h=true;g++;}}}if(!h){Ext.Msg.show({title:pageName,msg:alertWebMsg1,buttons:Ext.Msg.OK,icon:"iconExclamation",});return;}if(g!=1){h=false;Ext.Msg.show({title:pageName,msg:alertWebMsg2,buttons:Ext.Msg.OK,icon:"iconExclamation",});
return;}if(h){var w=Ext.getCmp("wsdlUrl").getValue();var a=Ext.getCmp("wsdlService").getValue();var m=Ext.getCmp("wsdlOperation").fromField.getValue();var s=Ext.getCmp("componentName").getValue();var x=Ext.getCmp("agentListObj").getValue();var f="";if(x.indexOf("eG Manager")!=-1){f="EgManager";}else{f=x;
}var t=Ext.getCmp("wsdlOperation").fromField.store.getCount();var l=Ext.getCmp("wsdlOperation").fromField.store;for(var q=0;q<t;q++){var r=l.getAt(q).get("valueField");o[q]=r;}var e=publicWebServJSON["mainOperation"];if(!Ext.isEmpty(o)&&o.length>0){e="";var y="";if(!Ext.isEmpty(w)&&w!=undefined){y=w.substring(0,w.indexOf(":"));
}if(!Ext.isEmpty(a)&&a!=undefined){y+=":"+a;}for(var q=0;q<o.length;q++){e+=y+"_"+o[q]+",";}if(!Ext.isEmpty(e)&&e!=undefined){e=e.substring(0,e.length-1);}}var d="";if(Ext.isEmpty(d)||d==undefined){var c=l.find("valueField",m,0,false,true,true);d=l.getAt(c).get("groupField");}var u=publicWebServJSON["credentialWithPattern"];
var b="configure";var k=new Ext.LoadMask(Ext.getCmp("egwebserviceconfiguration"),{msg:"Updating..."});k.show();$.ajax({type:"POST",url:"SpecificTestConfiguration/data/EgWebServiceConfig.jsp?com.eg.CSRF_NONCE="+csrfToken,timeout:1200000,data:"selectedUrlValue="+encodeURI(w)+"&selectedServiceValue="+encodeURI(a)+"&componentName="+encodeURI(s)+"&wsdl="+encodeURI(w)+"&operation="+encodeURI(e)+"&configMode="+f+"&reqFrom="+b+"&selectedOperationValue="+encodeURI(m)+"&credentialWithPattern="+encodeURI(u)+"&groupLabel="+encodeURI(d),success:function(D){var A=$.trim($(D).find("#alertResultDiv").text());
if(f!="EgManager"){if(A=="Failed to get required configuration information from agent"||A=="Agent not installed or not running"){Ext.Msg.show({title:pageName,msg:A,buttons:Ext.Msg.Ok,info:"iconExclamation"});return;}}k.hide();var z=$(D).find("#requestMsg").html();var C=$(D).find("#requestMsg").text();
Ext.getCmp("saveAndConfigContainer").show();Ext.getCmp("xmlandhtmlview").setDisabled(false);Ext.getCmp("xmlTable").update(z);var F=$(D).find("#inputTable").html();var E=$(D).find("#inputTable").text();Ext.getCmp("inputTable").update(F);var B=Ext.getCmp("xmlandhtmlview").getActiveTab().getItemId();if(B=="xmlview"){Ext.getCmp("htmlviewer").hide();
Ext.getCmp("xmlTable").show();}else{Ext.getCmp("xmlTable").hide();Ext.getCmp("htmlviewer").show();}Ext.getCmp("save").setDisabled(false);testInterViews.disableSendReq();}});}},disableSendReq:function(){var a=Ext.getCmp("agentListObj").getValue();if(a=="EgManager"){Ext.getCmp("sendReq").setDisabled(false);
}else{Ext.getCmp("sendReq").setDisabled(true);}},radXmlHtml:function(){var a=Ext.getCmp("xmlandhtmlview").getActiveTab().getItemId();if(a=="xmlview"){Ext.getCmp("htmlviewer").hide();Ext.getCmp("xmlTable").show();}else{Ext.getCmp("htmlviewer").show();Ext.getCmp("xmlTable").hide();}},getPopUpView:function(e){if(Ext.getCmp("egconfigureresource")!=undefined){Ext.getCmp("egconfigureresource").removeAll();
Ext.getCmp("backupmultirescontainer").removeAll();Ext.getCmp("backupmultirescontainer").doLayout();}var h=Ext.getCmp(e).getValue();inputResource=1;popUpWin=Ext.create("Ext.Window",{layout:"fit",border:false,title:multiResourceTitle,id:"egconfigureresource",width:700,height:335,padding:"5 10 10 10",autoScroll:true,modal:true,layout:{type:"vbox",pack:"start",align:"stretch"},dockedItems:[{xtype:"toolbar",dock:"bottom",layout:{type:"hbox",align:"stretch",pack:"center"},padding:10,ui:"toolbarBgWithTopBorder",items:[{xtype:"button",ui:"newButtonSmall",id:"addMultiresbtn",width:80,text:"Add More",listeners:{"click":function(){addMultiResourceContact();
}}},{xtype:"button",ui:"newButtonSmall",text:"Update",width:80,id:"updateMultires",name:"updateMultires",margin:"0 0 0 20",listeners:{"click":function(){testInterViews.updateMultiResourceContact(e);}}},{xtype:"button",ui:"newButtonSmall",text:"Clear",width:80,id:"clearMultires",name:"clearMultires",margin:"0 0 0 20",listeners:{"click":function(){testInterViews.clearMultiResourceContact();
}}}]}],items:[{xtype:"container",id:"backupmultirescontainer",layout:{type:"vbox",pack:"center",align:"stretch"}},{xtype:"container",id:"NoMultiResPattern",hidden:true,border:true,flex:1,items:[{xtype:"label",html:'<div class="egFlexCenterByColumnWise" style="height:100%"><div class="iconInformation"></div><div class="commonErrorMsgText">'+NoPublishedResource+".</div></div>"}]}]});
popUpWin.show();var c="";var d=h.split(",");if(h!=null||h!=undefined){var g=d.length-1;for(var b=0;b<=d.length-1;b++){addMultiResourceContact();}for(c=1;c<d.length+1;c++){if(d[c-1].indexOf("\\")!=-1){var f=d[c-1].split("\\");Ext.getCmp("folderName"+c).setValue(d[c-1].split("\\")[0]);if(d[c-1].split("\\")[1].indexOf(":")!=-1){var a=d[c-1].split("\\")[1];
Ext.getCmp("resourceName"+c).setValue(a.split(":")[0]);Ext.getCmp("winTitle"+c).setValue(a.split(":")[1]);}else{Ext.getCmp("resourceName"+c).setValue(d[c-1].split("\\")[1]);Ext.getCmp("winTitle"+c).setValue("none");}}else{if(d[c-1].indexOf(":")!=-1){Ext.getCmp("folderName"+c).setValue("none");Ext.getCmp("resourceName"+c).setValue(d[c-1].split(":")[0]);
Ext.getCmp("winTitle"+c).setValue(d[c-1].split(":")[1]);}else{Ext.getCmp("folderName"+c).setValue("none");Ext.getCmp("resourceName"+c).setValue(d[c-1]);Ext.getCmp("winTitle"+c).setValue("none");}}}}},clearMultiResourceContact:function(){var a=Ext.getCmp("backupmultirescontainer");a.removeAll();inputResource=1;
addMultiResourceContact();},updateMultiResourceContact:function(g){var a=inputResource;var d="";for(var e=1;e<=a-1;e++){if(Ext.getCmp("folderName"+e)==undefined){continue;}var f=Ext.getCmp("folderName"+e).getValue();var b=Ext.getCmp("resourceName"+e).getValue();var c=Ext.getCmp("winTitle"+e).getValue();
if(!checkblank(f)){Ext.Msg.show({title:multiResourceTitle,msg:enterFolderName,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("folderName"+e).focus(true,true);}});return;}else{if(f.indexOf("$unconfigured")>-1){Ext.Msg.show({title:multiResourceTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("folderName"+e).focus(true,true);
}});return;}else{if(!checkspecialExt(f,"`*=#.|;:\"'<>,/[]{}()?\\")){Ext.Msg.show({title:multiResourceTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("folderName"+e).focus(true,true);}});return;}else{if(trim(f)==""){Ext.getCmp("folderName"+e).focus();return;}else{if(f.indexOf("..")>-1){Ext.Msg.show({title:multiResourceTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("folderName"+e).focus(true,true);
}});return;}else{if(f.indexOf("  ")>-1){Ext.Msg.show({title:multiResourceTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("folderName"+e).focus(true,true);}});return;}}}}}}if(!checkblank(b)){Ext.Msg.show({title:multiResourceTitle,msg:enterResourceName,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("resourceName"+e).focus(true,true);
}});return;}else{if(b.indexOf("$unconfigured")>-1){Ext.Msg.show({title:multiResourceTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("resourceName"+e).focus(true,true);}});return;}else{if(b.indexOf("none")>-1){Ext.Msg.show({title:multiResourceTitle,msg:validResourceName,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("resourceName"+e).focus(true,true);
}});return;}else{if(!checkspecialExt(b,"`*=#.|;:\"'<>,/[]?\\")){Ext.Msg.show({title:multiResourceTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("resourceName"+e).focus(true,true);}});return;}else{if(trim(b)==""){Ext.getCmp("resourceName"+e).focus();return;}else{if(b.indexOf("..")>-1){Ext.Msg.show({title:multiResourceTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("resourceName"+e).focus(true,true);
}});return;}else{if(b.indexOf("  ")>-1){Ext.Msg.show({title:multiResourceTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("resourceName"+e).focus(true,true);}});return;}}}}}}}if(!checkblank(c)){Ext.Msg.show({title:multiResourceTitle,msg:enterwinTitle,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("winTitle"+e).focus(true,true);
}});return;}else{if(c.indexOf("$unconfigured")>-1){Ext.Msg.show({title:multiResourceTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("winTitle"+e).focus(true,true);}});return;}else{if(!checkspecialExt(c,"`*=#.|;:\"'<>,/[]{}()?\\")){Ext.Msg.show({title:multiResourceTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("winTitle"+e).focus(true,true);
}});return;}else{if(trim(c)==""){Ext.getCmp("winTitle"+e).focus();return;}else{if(c.indexOf("..")>-1){Ext.Msg.show({title:multiResourceTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("winTitle"+e).focus(true,true);}});return;}else{if(c.indexOf("  ")>-1){Ext.Msg.show({title:multiResourceTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("winTitle"+e).focus(true,true);
}});return;}}}}}}if(f!="none"&&c!="none"){d+=f+"\\"+b+":"+c;}else{if(f=="none"&&c!="none"){d+=b+":"+c;}else{if(f!="none"&&c=="none"){d+=f+"\\"+b;}else{if(f=="none"&&c=="none"){d+=b;}}}}d+=",";}d=d.substring(0,d.lastIndexOf(","));Ext.getCmp(g).setValue(d);Ext.getCmp("egconfigureresource").close();},getPopupSitename:function(){var d=Ext.getCmp("sitename_popup").getValue();
var b=Ext.getCmp("sitedetailedconfiguration").action;if(Ext.isEmpty(b)||b==null){b="include";}if(d=="-1"){Ext.Msg.show({title:"Site Information",msg:"Please select a site name",buttons:Ext.Msg.OK,icon:"iconInformation"});}else{if(b=="include"){var d=d.toString();if(!Ext.isEmpty(d)){if(d.toLowerCase()=="all"||d.toLowerCase().indexOf("all")!=-1){isSiteNameContainsAll=false;
if(d.indexOf(",")!=-1){var e=d.split(",");for(var c=0;c<e.length;c++){var a=e[c];if(a.toString().toLowerCase()=="all"){isSiteNameContainsAll=true;break;}}}if(isSiteNameContainsAll){d="all";}Ext.getCmp("exclude_websites").setReadOnly(false);}else{Ext.getCmp("exclude_websites").setValue("none");Ext.getCmp("exclude_websites").setReadOnly(true);
}}Ext.getCmp("website_name").setValue(d);}else{Ext.getCmp("exclude_websites").setValue(d);}Ext.getCmp("sitedetailedconfiguration").destroy();}},unCheckHeaderCheckBox:function(b){var c=b.getStore().getCount();var a=b.getSelectionModel().getCount();if(c!=0&&c==a){b.getSelectionModel().toggleUiHeader(false);
}}});function checkDescSpecial(c,b){obj_val=c;for(var a=0;a<obj_val.length;a++){check_char=b.indexOf(obj_val.charAt(a));if(check_char>=0){Ext.Msg.show({title:descTitle,msg:_desccheckspecial,buttons:Ext.Msg.OK,icon:"iconExclamation"});return false;}}return true;}function addContact(){if(inputsVmg==totalInputs){Ext.Msg.show({title:alertTitle,msg:limitedLevel,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return;}var a=Ext.getCmp("vmgusers");var b=Ext.getCmp("backupcontainer");var c="con_"+inputs;var d={xtype:"fieldset",id:c,width:800,layout:{type:"vbox",pack:"center",align:"stretch"},margin:"5 5 5 5",items:[{xtype:"container",layout:{type:"hbox",pack:"end"},margin:"0 10 0 0",items:[{xtype:"button",iconCls:"img_removeShift",id:"removevmg"+inputs,tooltip:"<b>Remove</b>",style:{background:"none",border:"0px"},handler:function(){removeContact(c);
}}]},{xtype:"container",layout:"column",defaults:{margin:10,labelSeparator:" ",labelWidth:120},items:[{xtype:"textfield",cls:"textbox",fieldLabel:Domain,style:{"white-space":"nowrap"},id:"domainvmg"+inputs,value:"$unconfigured",columnWidth:0.5},{xtype:"textfield",cls:"textbox",fieldLabel:AdminUser,style:{"white-space":"nowrap"},id:"admusrvmg"+inputs,value:"$unconfigured",columnWidth:0.5},{xtype:"textfield",cls:"textbox",fieldLabel:AdminPwd,style:{"white-space":"nowrap"},id:"admpwdvmg"+inputs,inputType:"password",columnWidth:0.5,backupValue:"$unconfigured",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var e=this.getValue();if(!Ext.isEmpty(e)){this.backupValue=e;}},blur:function(){var f=this;if(f.getValue()!==undefined||f.getValue()!=""){var e=this.backupValue;f.setValue(e);}},focus:function(){this.setValue("");}}},{xtype:"textfield",cls:"textbox",fieldLabel:AdminConfPwd,style:{"white-space":"nowrap"},id:"confpwdvmg"+inputs,inputType:"password",columnWidth:0.5,backupValue:"$unconfigured",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var e=this.getValue();if(!Ext.isEmpty(e)){this.backupValue=e;}},blur:function(){var f=this;if(f.getValue()!==undefined||f.getValue()!=""){var e=this.backupValue;f.setValue(e);}},focus:function(){this.setValue("");}}}]}]};b.add(d);a.doLayout();inputs++;inputsVmg++;Ext.getCmp("addVmgUsrbtn").setText("Add More");
Ext.getCmp("updateConfUsr").enable();Ext.getCmp("clearConfUsr").enable();Ext.getCmp("NoVmgPattern").hide();}function removeContact(b){var c=Ext.getCmp("backupcontainer");c.remove(b);inputsVmg--;var a=c.items.length;if(a==0){Ext.getCmp("addVmgUsrbtn").setText("Add");Ext.getCmp("NoVmgPattern").show();Ext.getCmp("updateConfUsr").disable();
Ext.getCmp("clearConfUsr").disable();}}function addMultiSourceContact(){var a=Ext.getCmp("egconfigurepublishedresources");var c=Ext.getCmp("backupmulticontainer");var d="con_"+inputsmultisrc;var b={xtype:"fieldset",id:d,width:800,layout:{type:"vbox",pack:"center",align:"stretch"},margin:"5 5 5 5",items:[{xtype:"container",layout:{type:"hbox",pack:"end"},margin:"0 10 0 0",items:[{xtype:"button",iconCls:"img_removeShift",tooltip:"<b>Remove</b>",style:{background:"none",border:"0px"},handler:function(){removeMultiSrc(d);
}}]},{xtype:"container",layout:"column",defaults:{margin:10,labelSeparator:" ",labelWidth:150},items:[{xtype:"fieldcontainer",layout:"column",defaults:{labelSeparator:" ",labelWidth:150},columnWidth:1,items:[{xtype:"textfield",cls:"textbox",fieldLabel:"Published resources",style:{"white-space":"nowrap"},id:"publisresource"+inputsmultisrc,value:"$unconfigured",columnWidth:0.97,readOnly:true},{xtype:"button",columnWidth:0.03,tooltip:pubResourceToolTip,id:"button"+inputsmultisrc,iconCls:"iconConfigure",style:{background:"none",border:"0px"},margin:"0 0 0 2",listeners:{click:function(){var e=this.getId().replace("button","publisresource");
testInterViews.getPopUpView(e);}}}]},{xtype:"textfield",cls:"textbox",fieldLabel:Domain,style:{"white-space":"nowrap"},id:"domainmultiusr"+inputsmultisrc,value:"$unconfigured",columnWidth:0.5},{xtype:"textfield",cls:"textbox",fieldLabel:User,style:{"white-space":"nowrap"},id:"usermultiusr"+inputsmultisrc,value:"$unconfigured",columnWidth:0.5},{xtype:"textfield",cls:"textbox",fieldLabel:PasswordLbl,style:{"white-space":"nowrap"},id:"pwdmultiusr"+inputsmultisrc,inputType:"password",columnWidth:0.5,backupValue:"$unconfigured",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var e=this.getValue();if(!Ext.isEmpty(e)){this.backupValue=e;}},blur:function(){var f=this;if(f.getValue()!==undefined||f.getValue()!=""){var e=this.backupValue;f.setValue(e);}},focus:function(){this.setValue("");}}},{xtype:"textfield",cls:"textbox",fieldLabel:CnfPassLbl,style:{"white-space":"nowrap"},id:"confpwdmultiusr"+inputsmultisrc,inputType:"password",columnWidth:0.5,backupValue:"$unconfigured",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var e=this.getValue();if(!Ext.isEmpty(e)){this.backupValue=e;}},blur:function(){var f=this;if(f.getValue()!==undefined||f.getValue()!=""){var e=this.backupValue;f.setValue(e);}},focus:function(){this.setValue("");}}},{xtype:"fieldcontainer",id:"twofaCont"+inputsmultisrc,fieldLabel:"Is 2FA enabled?",columnWidth:0.5,layout:"column",items:[{xtype:"radiogroup",columnWidth:0.6,cls:"radiobt",id:"twofact"+inputsmultisrc,vertical:false,columns:2,items:[{boxLabel:"Yes",name:"twofactlabel"+inputsmultisrc,id:"twofactlabel"+inputsmultisrc+"_1",inputValue:"true"},{boxLabel:"No",name:"twofactlabel"+inputsmultisrc,id:"twofactlabel"+inputsmultisrc+"_2",inputValue:"false",checked:true}],listeners:{"change":function(g,f){var f=this.getChecked()[0];
var e=this.getId().replace("twofact","twofacttoken");if(f.getGroupValue()=="false"){Ext.getCmp(e).setVisible(false);}else{Ext.getCmp(e).setVisible(true);}}}},{xtype:"textfield",cls:"textbox",style:{"white-space":"nowrap"},id:"twofacttoken"+inputsmultisrc,inputType:"password",emptyText:"2FA code",columnWidth:0.4,margin:"0 0 0 5",hidden:true,backupValue:"",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var e=this.getValue();if(!Ext.isEmpty(e)){this.backupValue=e;}},blur:function(){var f=this;if(f.getValue()!==undefined||f.getValue()!=""){var e=this.backupValue;f.setValue(e);}},focus:function(){this.setValue("");}}}]},{xtype:"radiogroup",columnWidth:0.5,cls:"radiobt",id:"disclaimer_radioGrp"+inputsmultisrc,fieldLabel:"Is disclaimer enabled?",vertical:false,columns:2,items:[{boxLabel:"Yes",name:"disclaimermultiusr"+inputsmultisrc,id:"disclaimermultiusr"+inputsmultisrc+"_1",inputValue:"true"},{boxLabel:"No",name:"disclaimermultiusr"+inputsmultisrc,id:"disclaimermultiusr"+inputsmultisrc+"_2",inputValue:"false",checked:true}]}]}]};
c.add(b);a.doLayout();Ext.getCmp("publisresource"+inputsmultisrc).focus(true);Ext.getCmp("addMultiSrcbtn").setText("Add More");Ext.getCmp("updateMultiConfSrc").enable();Ext.getCmp("clearMultiConfSrc").enable();Ext.getCmp("NoMultiUsrPattern").hide();inputsmultisrc++;}function removeMultiSrc(b){var c=Ext.getCmp("backupmulticontainer");
c.remove(b);if(b=="conmulti_1"){ismultisrc="true";Ext.getCmp("conmulti_1").removeAll();Ext.getCmp("conmulti_1").hide();}var a=c.items.length;if(a==0){Ext.getCmp("addMultiSrcbtn").setText("Add");if(ismultisrc=="true"){Ext.getCmp("NoMultiUsrPattern").show();Ext.getCmp("updateMultiConfSrc").disable();Ext.getCmp("clearMultiConfSrc").disable();
}}}function addMultiUsrContact(){if(inputs==totalInputs){Ext.Msg.show({title:alertTitle,msg:limitedLevel,buttons:Ext.Msg.OK,icon:"iconExclamation"});return;}var a=Ext.getCmp("egconfiguremultipleusers");var c=Ext.getCmp("backupmulticontainer");var d="con_"+inputsmulti;var b={xtype:"fieldset",id:d,width:800,layout:{type:"vbox",pack:"center",align:"stretch"},margin:"5 5 5 5",items:[{xtype:"container",layout:{type:"hbox",pack:"end"},margin:"0 10 0 0",items:[{xtype:"button",iconCls:"img_removeShift",tooltip:"<b>Remove</b>",style:{background:"none",border:"0px"},handler:function(){removeMultiContact(d);
}}]},{xtype:"container",layout:"column",defaults:{margin:10,labelSeparator:" ",labelWidth:120},items:[{xtype:"textfield",cls:"textbox",fieldLabel:Domain,style:{"white-space":"nowrap"},id:"domainmultiusr"+inputsmulti,value:"$unconfigured",columnWidth:0.5},{xtype:"textfield",cls:"textbox",fieldLabel:User,style:{"white-space":"nowrap"},id:"usermultiusr"+inputsmulti,value:"$unconfigured",columnWidth:0.5},{xtype:"textfield",cls:"textbox",fieldLabel:PasswordLbl,style:{"white-space":"nowrap"},id:"pwdmultiusr"+inputsmulti,inputType:"password",columnWidth:0.5,backupValue:"$unconfigured",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var e=this.getValue();if(!Ext.isEmpty(e)){this.backupValue=e;}},blur:function(){var f=this;if(f.getValue()!==undefined||f.getValue()!=""){var e=this.backupValue;f.setValue(e);}},focus:function(){this.setValue("");}}},{xtype:"textfield",cls:"textbox",fieldLabel:CnfPassLbl,style:{"white-space":"nowrap"},id:"confpwdmultiusr"+inputsmulti,inputType:"password",columnWidth:0.5,backupValue:"$unconfigured",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var e=this.getValue();if(!Ext.isEmpty(e)){this.backupValue=e;}},blur:function(){var f=this;if(f.getValue()!==undefined||f.getValue()!=""){var e=this.backupValue;f.setValue(e);}},focus:function(){this.setValue("");}}}]}]};c.add(b);a.doLayout();inputsmulti++;Ext.getCmp("addMultiUsrbtn").setText("Add More");
Ext.getCmp("updateMultiConfUsr").enable();Ext.getCmp("clearMultiConfUsr").enable();Ext.getCmp("NoMultiUsrPattern").hide();}function removeMultiContact(b){var c=Ext.getCmp("backupmulticontainer");c.remove(b);if(b=="conmulti_1"){ismulti="true";Ext.getCmp("conmulti_1").removeAll();Ext.getCmp("conmulti_1").hide();
}var a=c.items.length;if(a==0){Ext.getCmp("addMultiUsrbtn").setText("Add");if(ismulti=="true"){Ext.getCmp("NoMultiUsrPattern").show();Ext.getCmp("updateMultiConfUsr").disable();Ext.getCmp("clearMultiConfUsr").disable();}}}function addCredUrlContact(){var c=Ext.getCmp("egconfigureurlandcredentials");var g=Ext.getCmp("credurlcontainer");
var e=true;var d=true;var b=publicJson["isPrivateKeyParamExist"];var f=publicJson["isSystemPropKeyParamExist"];if(b==true){e=false;}if(f==true){d=false;}var h="con_"+inputsCredUrl;var a={xtype:"fieldset",id:h,width:800,layout:{type:"vbox",pack:"center",align:"stretch"},style:{background:"none",border:"1px solid lightGrey"},margin:"5 5 5 5",items:[{xtype:"container",layout:{type:"hbox",pack:"end"},margin:"0 10 0 0",items:[{xtype:"button",iconCls:"img_removeShift",tooltip:"<b>Remove</b>",style:{background:"none",border:"0px"},handler:function(){removeCredUrlContact(h);
}}]},{xtype:"container",layout:"column",defaults:{margin:10,labelSeparator:" ",labelAlign:"top"},items:[{xtype:"textfield",cls:"textbox",fieldLabel:Name,id:"nameCred"+inputsCredUrl,name:"nameCred"+inputsCredUrl,value:"$unconfigured",columnWidth:0.25},{xtype:"textfield",cls:"textbox",fieldLabel:urlLbl,id:"urlCred"+inputsCredUrl,name:"urlCred"+inputsCredUrl,value:"$unconfigured",columnWidth:0.75},{xtype:"textfield",cls:"textbox",fieldLabel:urlUnmeLbl,id:"usrnameCred"+inputsCredUrl,name:"usrnameCred"+inputsCredUrl,value:"none",columnWidth:0.25},{xtype:"textfield",cls:"textbox",fieldLabel:urlPwdLbl,id:"pwdCred"+inputsCredUrl,name:"pwdCred"+inputsCredUrl,inputType:"password",columnWidth:0.25,backupValue:"none",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var k=this.getValue();if(!Ext.isEmpty(k)){this.backupValue=k;}},blur:function(){var l=this;if(l.getValue()!==undefined||l.getValue()!=""){var k=this.backupValue;l.setValue(k);}},focus:function(){this.setValue("");}}},{xtype:"fieldcontainer",layout:"column",columnWidth:0.3,fieldLabel:urlContentLbl,items:[{xtype:"scrollcombo",cls:"dropdown",id:"contentCred"+inputsCredUrl,name:"contentCred"+inputsCredUrl,displayField:"displayField",columnWidth:0.4,valueField:"valueField",queryMode:"local",value:"none",editable:false,parent:this,store:new Ext.data.Store({fields:["displayField","valueField"],data:[{"displayField":"None","valueField":"none"},{"displayField":"Include","valueField":"Inc"},{"displayField":"Exclude","valueField":"Exc"}]})},{xtype:"textfield",cls:"textbox",id:"subcontentCred"+inputsCredUrl,name:"subcontentCred"+inputsCredUrl,columnWidth:0.6,margin:"0 0 0 5",value:"none"}]},{xtype:"textfield",cls:"textbox",fieldLabel:urlEncodeLbl,id:"encodeCred"+inputsCredUrl,name:"encodeCred"+inputsCredUrl,value:"none",columnWidth:0.2},{xtype:"textfield",cls:"textbox",fieldLabel:urlPrivateLbl,id:"privateKey"+inputsCredUrl,name:"privateKey"+inputsCredUrl,value:"none",columnWidth:0.75,hidden:e},{xtype:"textfield",cls:"textbox",fieldLabel:urlPwdLbl,id:"passKey"+inputsCredUrl,name:"passKey"+inputsCredUrl,inputType:"password",columnWidth:0.25,hidden:e,backupValue:"none",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var k=this.getValue();if(!Ext.isEmpty(k)){this.backupValue=k;}},blur:function(){var l=this;if(l.getValue()!==undefined||l.getValue()!=""){var k=this.backupValue;l.setValue(k);}},focus:function(){this.setValue("");}}},{xtype:"fieldset",id:"syspropsfieldset"+inputsCredUrl,name:"syspropsfieldset"+inputsCredUrl,columnWidth:1,hidden:d,title:urlSystemPropsTitleLbl,style:{background:"none",border:"1px solid lightGrey"},layout:{type:"vbox",pack:"start",align:"stretch"},margin:"10 10 0 10",items:[{xtype:"container",id:"sysPropsMainContainer"+inputsCredUrl,layout:"column",columnWidth:1,defaults:{labelSeparator:"",margin:"0 5 5 5"},items:[{xtype:"container",id:"sysPropsContainer_"+inputsCredUrl+"_1",name:"sysPropsContainer_"+inputsCredUrl+"_1",layout:"column",columnWidth:1,items:[{xtype:"textfield",cls:"textbox",fieldLabel:urlSystemKeyLbl,id:"syspropkey_"+inputsCredUrl+"_1",name:"syspropkey_"+inputsCredUrl+"_1",value:"jsse.enableSNIExtension",margin:5,columnWidth:0.48,labelSeparator:" ",labelAlign:"top"},{xtype:"textfield",cls:"textbox",fieldLabel:urlSystemValLbl,id:"syspropval_"+inputsCredUrl+"_1",name:"syspropval_"+inputsCredUrl+"_1",value:"false",columnWidth:0.48,margin:5,labelSeparator:" ",labelAlign:"top"},{xtype:"component",html:'<center><div class="iconPlus" style="cursor:pointer;" data-qtip="<b>Add System Property</b>" onclick="javascript:addSysPropsContainer(sysPropsContainer_'+inputsCredUrl+'_1)"></center>',columnWidth:0.04,margin:"25 0 0 2"}]}]}]}]}]};
g.add(a);Ext.getCmp("nameCred"+inputsCredUrl).focus();c.doLayout();inputsCredUrl++;Ext.getCmp("addCredUrlbtn").setText("Add More");Ext.getCmp("updateCredUrl").enable();Ext.getCmp("clearCredUrl").enable();Ext.getCmp("NoCredUrlPattern").hide();}function removeCredUrlContact(c){var b=Ext.getCmp("credurlcontainer");
var d=Ext.getCmp("credurlcontainer");d.remove(c);if(c=="concred_1"){iscred="true";Ext.getCmp("concred_1").removeAll();Ext.getCmp("concred_1").hide();}var a=d.items.length;if(a==0){Ext.getCmp("addCredUrlbtn").setText("Add");if(iscred=="true"){Ext.getCmp("NoCredUrlPattern").show();Ext.getCmp("updateCredUrl").disable();
Ext.getCmp("clearCredUrl").disable();}}}function addUrlNameContact(){var d=Ext.getCmp("egconfigurenamepattern");var a=Ext.getCmp("urlpatterncontainer");var b="con_"+inputsUrlNme;var c={xtype:"fieldset",id:b,width:800,layout:{type:"vbox",pack:"center",align:"stretch"},margin:"5 5 5 5",items:[{xtype:"container",layout:{type:"hbox",pack:"end"},margin:"0 10 0 0",items:[{xtype:"button",iconCls:"img_removeShift",tooltip:"<b>Remove</b>",style:{background:"none",border:"0px"},handler:function(){removeUrlNameContact(b);
}}]},{xtype:"container",layout:"column",defaults:{margin:10,labelSeparator:" ",labelAlign:"top"},items:[{xtype:"textfield",cls:"textbox",fieldLabel:Name,id:"nameurl"+inputsUrlNme,name:"nameurl"+inputsUrlNme,value:"$unconfigured",columnWidth:0.4},{xtype:"textfield",cls:"textbox",fieldLabel:Pattern,id:"patternurl"+inputsUrlNme,name:"patternurl"+inputsUrlNme,value:"$unconfigured",columnWidth:0.4},{xtype:"textfield",cls:"textbox",fieldLabel:Threshold_Value,id:"thresholdurl"+inputsUrlNme,name:"thresholdurl"+inputsUrlNme,value:"$unconfigured",columnWidth:0.2}]}]};
a.add(c);Ext.getCmp("nameurl"+inputsUrlNme).focus();d.doLayout();inputsUrlNme++;Ext.getCmp("addUrlNamebtn").setText("Add More");Ext.getCmp("updateUrlPattern").enable();Ext.getCmp("clearUrlPattern").enable();Ext.getCmp("NoUrlPattern").hide();}function removeUrlNameContact(c){var a=Ext.getCmp("urlpatterncontainer");
a.remove(c);if(c=="con_1"){isNamePtn="true";Ext.getCmp("con_1").removeAll();Ext.getCmp("con_1").hide();}var b=a.items.length;if(b==0){Ext.getCmp("addUrlNamebtn").setText("Add");if(isNamePtn=="true"){Ext.getCmp("NoUrlPattern").show();Ext.getCmp("updateUrlPattern").disable();Ext.getCmp("clearUrlPattern").disable();
}}}function addWinSharedContact(){var d=Ext.getCmp("egconfigurewinsharedfolders");var b=Ext.getCmp("winsharedcontainer");var a="con_"+inputWinShared;var c={xtype:"fieldset",id:a,width:800,layout:{type:"vbox",pack:"center",align:"stretch"},margin:"5 5 5 5",items:[{xtype:"container",layout:{type:"hbox",pack:"end"},margin:"0 10 0 0",items:[{xtype:"button",iconCls:"img_removeShift",tooltip:"<b>Remove</b>",style:{background:"none",border:"0px"},handler:function(){removeWinSharedContact(a);
}}]},{xtype:"container",layout:"column",defaults:{margin:10,labelSeparator:" ",labelAlign:"top"},items:[{xtype:"textfield",cls:"textbox",fieldLabel:dispWinLbl,id:"displayNme"+inputWinShared,name:"displayNme"+inputWinShared,value:"$unconfigured",columnWidth:0.25},{xtype:"textfield",cls:"textbox",fieldLabel:shrWinLbl,id:"shareNme"+inputWinShared,name:"shareNme"+inputWinShared,value:"$unconfigured",columnWidth:0.75},{xtype:"textfield",cls:"textbox",fieldLabel:dmnWinLbl,id:"domainNme"+inputWinShared,name:"domainNme"+inputWinShared,value:"$unconfigured",columnWidth:0.25},{xtype:"textfield",cls:"textbox",fieldLabel:unmeWinLbl,id:"userNme"+inputWinShared,name:"userNme"+inputWinShared,value:"$unconfigured",columnWidth:0.25},{xtype:"textfield",cls:"textbox",fieldLabel:PasswordLbl,id:"pwdNme"+inputWinShared,name:"pwdNme"+inputWinShared,inputType:"password",columnWidth:0.25,backupValue:"$unconfigured",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var e=this.getValue();if(!Ext.isEmpty(e)){this.backupValue=e;}},blur:function(){var f=this;if(f.getValue()!==undefined||f.getValue()!=""){var e=this.backupValue;f.setValue(e);}},focus:function(){this.setValue("");}}},{xtype:"textfield",cls:"textbox",fieldLabel:CnfPassLbl,id:"confPwdNme"+inputWinShared,name:"confPwdNme"+inputWinShared,inputType:"password",columnWidth:0.25,backupValue:"$unconfigured",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var e=this.getValue();if(!Ext.isEmpty(e)){this.backupValue=e;}},blur:function(){var f=this;if(f.getValue()!==undefined||f.getValue()!=""){var e=this.backupValue;f.setValue(e);}},focus:function(){this.setValue("");}}}]}]};b.add(c);Ext.getCmp("displayNme"+inputWinShared).focus();d.doLayout();
inputWinShared++;Ext.getCmp("addwinsharedbtn").setText("Add More");Ext.getCmp("updateWinShared").enable();Ext.getCmp("clearWinShared").enable();Ext.getCmp("NoWinSharedPattern").hide();}function removeWinSharedContact(b){var a=Ext.getCmp("winsharedcontainer");a.remove(b);if(b=="con_win1"){noWinConfig="true";
Ext.getCmp("con_win1").removeAll();Ext.getCmp("con_win1").hide();}var c=a.items.length;if(c==0){Ext.getCmp("addwinsharedbtn").setText("Add");if(noWinConfig=="true"){Ext.getCmp("NoWinSharedPattern").show();Ext.getCmp("updateWinShared").disable();Ext.getCmp("clearWinShared").disable();}}}function addWsdlUrlContact(){var d=Ext.getCmp("egconfigurewsdlurlandcredentials");
var c=Ext.getCmp("wsdlurlcontainer");var b="con_"+inputsWsdlUrl;var a={xtype:"fieldset",id:b,width:800,layout:{type:"vbox",pack:"center",align:"stretch"},margin:"5 5 5 5",items:[{xtype:"container",layout:{type:"hbox",pack:"end"},margin:"0 10 0 0",items:[{xtype:"button",iconCls:"img_removeShift",tooltip:"<b>Remove</b>",style:{background:"none",border:"0px"},handler:function(){removeWsdlUrlContact(b);
}}]},{xtype:"container",layout:"column",defaults:{margin:10,labelSeparator:" ",labelAlign:"top"},items:[{xtype:"textfield",cls:"textbox",fieldLabel:Name,id:"nameWsdl"+inputsWsdlUrl,name:"nameWsdl"+inputsWsdlUrl,value:"$unconfigured",columnWidth:0.25},{xtype:"textfield",cls:"textbox",fieldLabel:urlLbl,id:"urlWsdl"+inputsWsdlUrl,name:"urlWsdl"+inputsWsdlUrl,value:"$unconfigured",columnWidth:0.75},{xtype:"textfield",cls:"textbox",fieldLabel:urlUnmeLbl,id:"usrnameWsdl"+inputsWsdlUrl,name:"usrnameWsdl"+inputsWsdlUrl,value:"none",columnWidth:0.25},{xtype:"textfield",cls:"textbox",fieldLabel:urlPwdLbl,id:"pwdWsdl"+inputsWsdlUrl,name:"pwdWsdl"+inputsWsdlUrl,inputType:"password",columnWidth:0.25,backupValue:"none",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var e=this.getValue();if(!Ext.isEmpty(e)){this.backupValue=e;}},blur:function(){var f=this;if(f.getValue()!==undefined||f.getValue()!=""){var e=this.backupValue;f.setValue(e);}},focus:function(){this.setValue("");}}},{xtype:"fieldcontainer",layout:"column",columnWidth:0.3,fieldLabel:urlContentLbl,items:[{xtype:"scrollcombo",cls:"dropdown",id:"contentWsdl"+inputsWsdlUrl,name:"contentWsdl"+inputsWsdlUrl,displayField:"displayField",columnWidth:0.4,valueField:"valueField",queryMode:"local",value:"none",editable:false,parent:this,store:new Ext.data.Store({fields:["displayField","valueField"],data:[{"displayField":"None","valueField":"none"},{"displayField":"Include","valueField":"Inc"},{"displayField":"Exclude","valueField":"Exc"}]})},{xtype:"textfield",cls:"textbox",id:"subcontentWsdl"+inputsWsdlUrl,name:"subcontentWsdl"+inputsWsdlUrl,columnWidth:0.6,margin:"0 0 0 5",value:"none"}]},{xtype:"textfield",cls:"textbox",fieldLabel:urlEncodeLbl,id:"encodeWsdl"+inputsWsdlUrl,name:"encodeWsdl"+inputsWsdlUrl,value:"none",columnWidth:0.2}]}]};
c.add(a);Ext.getCmp("nameWsdl"+inputsWsdlUrl).focus();d.doLayout();inputsWsdlUrl++;Ext.getCmp("NoWsdlUrlPattern").hide();Ext.getCmp("addWsdlUrlbtn").setText("Add More");Ext.getCmp("updateWsdlUrl").enable();Ext.getCmp("clearWsdlUrl").enable();}function removeWsdlUrlContact(c){var b=Ext.getCmp("wsdlurlcontainer");
b.remove(c);if(c=="con_wsdl1"){noWsdl="true";Ext.getCmp("con_wsdl1").removeAll();Ext.getCmp("con_wsdl1").hide();}var a=b.items.length;if(a==0){Ext.getCmp("addWsdlUrlbtn").setText("Add");if(noWsdl=="true"){Ext.getCmp("NoWsdlUrlPattern").show();Ext.getCmp("updateWsdlUrl").disable();Ext.getCmp("clearWsdlUrl").disable();
}}}function addElementsConfigEjbs(){var b=Ext.getCmp("egconfigejb");var a=Ext.getCmp("addedEjbscontainer");var c="conEjbs_"+inputsEjbs;var d=Ext.form.Panel({title:"ConfigEjbs",collapsible:false,id:c,layout:{type:"vbox",pack:"center",align:"center"},padding:"0 10 0 10",width:700,margin:15,items:[{xtype:"label",id:"addejbs"+inputsEjbs,width:700,html:"",}],tools:[{xtype:"button",id:"modifyejbs"+inputsEjbs,width:80,margin:"0 20 0 0",backupId:inputsEjbs,text:"Modify",listeners:{click:function(){testInterViews.modifyEjbsItemSelector("addejbs"+this.backupId,this.backupId);
}}},{xtype:"button",id:"deleteejbs"+inputsEjbs,width:80,text:"Delete",backupId:inputsEjbs,listeners:{click:function(){testInterViews.deleteEjbsManagedElements("addejbs"+this.backupId,this.backupId);}}}]});a.add(d);b.doLayout();inputsEjbs++;}function addMultiResourceContact(){var a=Ext.getCmp("egconfigureresource");
var c=Ext.getCmp("backupmultirescontainer");var d="conRes_"+inputResource;var b={xtype:"fieldset",id:d,padding:"10 0 10 10",margin:"10 10 0 10",items:[{xtype:"container",layout:"column",defaults:{labelSeparator:" ",labelWidth:150},items:[{xtype:"fieldcontainer",layout:"column",columnWidth:1,defaults:{margin:5,labelSeparator:" ",labelAlign:"top",},items:[{xtype:"textfield",cls:"textbox",style:{"white-space":"nowrap"},id:"folderName"+inputResource,fieldLabel:"Tab Name",value:"none",columnWidth:0.33},{xtype:"textfield",cls:"textbox",style:{"white-space":"nowrap"},fieldLabel:"Application/Desktop Name",id:"resourceName"+inputResource,columnWidth:0.34},{xtype:"textfield",cls:"textbox",style:{"white-space":"nowrap"},fieldLabel:"Window Title",id:"winTitle"+inputResource,value:"none",columnWidth:0.33}]},{xtype:"container",style:{"position":"absolute","top":"2px","right":"2px","width":"20px","height":"20px"},margin:"0 0 0 0",items:[{xtype:"button",iconCls:"img_removeShift",tooltip:"<b>Remove</b>",style:{background:"none",border:"0px"},handler:function(){removeMultiResource(d);
}}]}]}]};c.add(b);a.doLayout();Ext.getCmp("addMultiresbtn").setText("Add More");Ext.getCmp("updateMultires").enable();Ext.getCmp("clearMultires").enable();Ext.getCmp("NoMultiResPattern").hide();inputResource++;}function removeMultiResource(b){var c=Ext.getCmp("backupmultirescontainer");c.remove(b);var a=c.items.length;
if(a==0){inputResource=1;Ext.getCmp("NoMultiResPattern").show();Ext.getCmp("updateMultires").disable();Ext.getCmp("clearMultires").disable();Ext.getCmp("addMultiresbtn").setText("Add");}}function groupExists(c){var a=publicInfosJSON["s_grp_list"];if(a.indexOf(",")>-1){var d=a.split(",");for(var b=0;b<d.length;
b++){if(d[b].toLowerCase()==c.toLowerCase()){return true;}}}else{if(a.toLowerCase()==c.toLowerCase()){return true;}}return false;}function ejbGroupExists(c){var a=publicEjbsJSON["s_grp_list"];if(a.indexOf(",")>-1){var d=a.split(",");for(var b=0;b<d.length;b++){if(d[b].toLowerCase()==c.toLowerCase()){return true;
}}}else{if(a.toLowerCase()==c.toLowerCase()){return true;}}return false;}function addServiceConf_pr(e,d,c){var a=Ext.getCmp("minmaxvalues");var f=Ext.getCmp("ratingMeasuresContr");var b={xtype:"grid",ui:"newGridPanel whiteHeader",title:"Measure : "+c,id:e,hidden:false,flex:1,autoScroll:true,scroll:true,margin:"10 10 0 10",columnLines:true,sortableColumns:false,plugins:Ext.create("Ext.grid.plugin.CellEditing",{pluginId:e,clicksToEdit:1}),store:Ext.create("Ext.data.Store",{fields:["pr_measure_name","associated_test_name","associated_test_description","associated_measure_name","associated_measure_description","associated_measure_min_threshold","associated_measure_max_threshold"],data:d}),columns:{defaults:{sortable:true,hideable:false,menuDisabled:true,draggable:false,resizable:true,isCheckerHd:false},items:[{dataIndex:"pr_measure_name",hidden:true},{dataIndex:"associated_test_name",hidden:true},{header:"Test Name",dataIndex:"associated_test_description",flex:2},{dataIndex:"associated_measure_name",hidden:true},{header:"Measure Name",dataIndex:"associated_measure_description",flex:2},{header:"Mininum Values",dataIndex:"associated_measure_min_threshold",flex:1,field:{cls:"textbox",allowBlank:false},cellEditing:true,renderer:function(h,g){g.tdAttr='data-qtip="Critical/Major/Minor in ascending order"';
g.tdCls="grid_editable_cell";return h;}},{header:"Maximum Values",dataIndex:"associated_measure_max_threshold",flex:1,field:{cls:"textbox",allowBlank:false},cellEditing:true,renderer:function(h,g){g.tdAttr='data-qtip="Critical/Major/Minor in descending order"';g.tdCls="grid_editable_cell";return h;}}]}};
f.add(b);a.doLayout();}function addOids(){if(inputs==9){Ext.Msg.show({title:"ADD OID",msg:"Cannot add more than 8 OIDs",buttons:Ext.Msg.OK,icon:"iconExclamation"});return;}var a=Ext.getCmp("EgOidsValue");var c=Ext.getCmp("backupcontainer");if(removedOid.length>0){var d="con_"+removedOid[0];var b="oidVal"+removedOid[0];
removedOid.splice(0,1);}else{var d="con_"+inputs;var b="oidVal"+inputs;}var e={xtype:"fieldset",id:d,layout:{type:"vbox",pack:"start",align:"stretch"},margin:"5 5 5 5",items:[{xtype:"container",layout:"column",defaults:{labelSeparator:" ",labelWidth:25},margin:0,columnWidth:1,items:[{xtype:"textfield",cls:"textbox",fieldLabel:"OID",style:{"white-space":"nowrap"},id:b,value:"$unconfigured",columnWidth:1},{xtype:"button",iconCls:"img_removeShift",tooltip:"<b>Remove</b>",margin:"0 0 0 5",style:{background:"none",border:"0px"},handler:function(){removeOid(d);
}}]}]};c.add(e);a.doLayout();inputs++;Ext.getCmp("addOidbtn").setText("Add More");Ext.getCmp("updateOid").enable();Ext.getCmp("clearOid").enable();Ext.getCmp("NoOidPattern").hide();}function removeOid(b){var c=Ext.getCmp("backupcontainer");c.remove(b);if(b=="conoid_1"){isVmg="true";Ext.getCmp("conoid_1").removeAll();
Ext.getCmp("conoid_1").hide();removedOid.push("1");}else{removedOid.push(b.substring(4,5));}if(b=="con_1"){isVmg="true";}inputs--;var a=c.items.length;if(a==0){Ext.getCmp("addOidbtn").setText("Add");if(isVmg=="true"){Ext.getCmp("NoOidPattern").show();Ext.getCmp("updateOid").disable();Ext.getCmp("clearOid").disable();
inputs=1;removedOid=[];}}}function validateProcessName(b){chars_not_valid_for_process_name='|#"';for(var a=0;a<b.length;a++){idx=chars_not_valid_for_process_name.indexOf(b.charAt(a));if(idx>=0){return false;}}return true;}function validateProcessPattern(d,c){var b=":\\/";var e=true;if(c){for(var a=0;
a<b.length;a++){if(d.indexOf(b.charAt(a))>-1){e=false;break;}}}return e;}function checkspecialExt(c,b){if(typeof(c)=="object"){obj_val=c.value;}else{obj_val=c;}for(var a=0;a<obj_val.length;a++){check_char=b.indexOf(obj_val.charAt(a));if(check_char>=0){return false;}}return true;}function checkAscendingOrder(e){e=e.trim();
if(e.toLowerCase()=="-1"){return true;}var b=e.split("/");if(b.length!=3){return false;}var d,f,a;d=b[0];f=b[1];a=b[2];var c=true;if(d!="-"&&f!="-"){if(parseFloat(d)>=parseFloat(f)){c=false;}}if(f!="-"&&a!="-"){if(parseFloat(f)>=parseFloat(a)){c=false;}}if(d!="-"&&a!="-"){if(parseFloat(d)>=parseFloat(a)){c=false;
}}return c;}function checkDescendingOrder(e){e=e.trim();if(e.toLowerCase()=="-1"){return true;}var b=e.split("/");if(b.length!=3){return false;}var d,f,a;d=b[0];f=b[1];a=b[2];var c=true;if(d!="-"&&f!="-"){if(parseFloat(d)<=parseFloat(f)){c=false;}}if(f!="-"&&a!="-"){if(parseFloat(f)<=parseFloat(a)){c=false;
}}if(d!="-"&&a!="-"){if(parseFloat(d)<=parseFloat(a)){c=false;}}return c;}function checkValidValue_rx(f){f=f.trim();if(f.toLowerCase()=="-1"){return true;}var b=f.split("/");if(b.length!=3){return false;}var d,g,a;d=b[0];g=b[1];a=b[2];var e=/^(\-)$|^(\-|\-?(([0-9]+\.|\.)?[0-9]+))$/i;var c=e.test(d);if(!c){c=e.test(g);
}if(!c){c=e.test(a);}return c;}function validateTargetValues(g,d){g=g.trim();if(g.toLowerCase()=="-1"){return"0";}var b=g.split("/");if(b.length!=3){if(d){return alert25;}else{return alert26;}}var c=b[0].trim();var f=b[1].trim();var e=b[2].trim();var a=null;if(c!="-"){a=privatemethod(c,d,"critical");
if(a!="0"){return a;}}if(f!="-"){a=privatemethod(f,d,"major");if(a!="0"){return a;}}if(e!="-"){a=privatemethod(e,d,"minor");if(a!="0"){return a;}}return"0";}function privatemethod(h,c,d){var g="0";var f=/^[0-9]{0,10}(\.[0-9]{1,4})?$/;if((h.indexOf("-")!=h.lastIndexOf("-"))||(h.indexOf(".")!=h.lastIndexOf("."))){if(c){if(d=="critical"){g=alert1;
}else{if(d=="major"){g=alert2;}else{if(d=="minor"){g=alert3;}}}}else{if(d=="critical"){g=alert4;}else{if(d=="major"){g=alert5;}else{if(d=="minor"){g=alert6;}}}}}else{if(parseFloat(h)<0){if(c){if(d=="critical"){g=alert19;}else{if(d=="major"){g=alert20;}else{if(d=="minor"){g=alert21;}}}}else{if(d=="critical"){g=alert22;
}else{if(d=="major"){g=alert23;}else{if(d=="minor"){g=alert24;}}}}}else{if(!f.test(h)){var e=h;var b="";var a=h.indexOf(".");if(a>-1){e=h.substring(0,a);b=h.substring(a+1);}if(e.length>10){if(c){if(d=="critical"){g=alert7;}else{if(d=="major"){g=alert8;}else{if(d=="minor"){g=alert9;}}}}else{if(d=="critical"){g=alert10;
}else{if(d=="major"){g=alert11;}else{if(d=="minor"){g=alert12;}}}}}else{if(b.length>4){if(c){if(d=="critical"){g=alert13;}else{if(d=="major"){g=alert14;}else{if(d=="minor"){g=alert15;}}}}else{if(d=="critical"){g=alert16;}else{if(d=="major"){g=alert17;}else{if(d=="minor"){g=alert18;}}}}}}}}}return g;}function correctFormat(d){d=d.trim();
if(d.toLowerCase()=="-1"){return true;}if(d.toLowerCase().indexOf("none")>-1){return false;}var b=d.split("/");if(b.length!=3){return false;}var c,e,a;c=b[0];e=b[1];a=b[2];if(Ext.isEmpty(c)||Ext.isEmpty(e)||Ext.isEmpty(a)){return false;}if(c.length==0||e.length==0||a.length==0){return false;}return true;
}function addTgtPropsContainer(d){var b=Ext.get(d).id;if(Ext.isEmpty(b)){b=d;}var c=b.substring(b.indexOf("_")+1);c=c.substring(0,c.indexOf("_"));b=b.substring(b.lastIndexOf("_")+1);var a=Ext.getCmp("EgConfigureTargetsAndSysProps");var e=Ext.getCmp("tgtPropsMainContainer"+c);if((e.items.getCount())==totalSystemProperties){Ext.Msg.show({title:alertconfigUrl,msg:limitedSysPropsMsg,buttons:Ext.Msg.OK,icon:"iconInformation"});
return;}var h=(e.items.getCount()+1);var f="tgtPropsContainer_"+c+"_"+(e.items.getCount()+1);var g={xtype:"container",id:f,layout:"column",columnWidth:1,items:[{xtype:"textfield",cls:"textbox",fieldLabel:urlSystemKeyLbl,id:"tgtpropkey_"+c+"_"+h,name:"tgtpropkey_"+c+"_"+h,value:"none",margin:5,columnWidth:0.48,labelSeparator:" ",labelAlign:"top"},{xtype:"textfield",cls:"textbox",fieldLabel:urlSystemValLbl,id:"tgtpropval_"+c+"_"+h,name:"tgtpropval_"+c+"_"+h,value:"none",columnWidth:0.48,margin:5,labelSeparator:" ",labelAlign:"top"},{xtype:"component",html:'<center><div class="iconMinus" data-qtip="<b>Remove System Property</b>" style="cursor:pointer;" onclick="javascript:removeTgtPropsContainer('+f+')"></center>',columnWidth:0.04,margin:"25 0 0 2"}]};
e.add(g);a.doLayout();}function removeTgtPropsContainer(n){var q=n.id;var k=q;k=k.substring(k.indexOf("_")+1);k=k.substring(0,k.indexOf("_"));var a=Ext.getCmp("tgtPropsMainContainer"+k);var r=Ext.getCmp(q);a.remove(r);var o=a.items.length;if(o>0){inputsIncPatt=0;var g=new Array();for(var c=1;c<=o;c++){var h=Ext.getCmp("tgtPropsContainer_"+k+"_"+(c+1));
if(h==null||h==undefined){continue;}var d=h.getId();var m=Ext.getCmp("tgtpropkey_"+k+"_"+(c+1)).getValue();var l=Ext.getCmp("tgtpropval_"+k+"_"+(c+1)).getValue();g[inputsIncPatt]=m+"~!~"+l;inputsIncPatt++;a.remove(h);}if(g!=null&&g.length>0){for(var f=0;f<g.length;f++){var b=g[f];addTrgtPropsContainerWithValue("tgtPropsContainer_"+k+"_"+(f+2),b);
}}}}function addTrgtPropsContainerWithValue(g,c){var m=g;var h=c;var l="none";var k="none";if(!Ext.isEmpty(h)&&h.indexOf("~!~")!=-1){l=h.substring(0,h.indexOf("~"));k=h.substring(h.lastIndexOf("~")+1);}var b=m.substring(m.indexOf("_")+1);b=b.substring(0,b.indexOf("_"));m=m.substring(m.lastIndexOf("_")+1);
var a=Ext.getCmp("EgConfigureTargetsAndSysProps");var n=Ext.getCmp("tgtPropsMainContainer"+b);if(!Ext.isEmpty(n.items)){if((n.items.getCount())==totalSystemProperties){Ext.Msg.show({title:alertconfigUrl,msg:limitedSysPropsMsg,buttons:Ext.Msg.OK,icon:"iconInformation"});return;}}var d=(n.items.getCount()+1);
var f="tgtPropsContainer_"+b+"_"+(n.items.getCount()+1);var e={xtype:"container",id:f,layout:"column",columnWidth:1,items:[{xtype:"textfield",cls:"textbox",fieldLabel:urlSystemKeyLbl,id:"tgtpropkey_"+b+"_"+d,name:"tgtpropkey_"+b+"_"+d,value:l,margin:5,columnWidth:0.48,labelSeparator:" ",labelAlign:"top"},{xtype:"textfield",cls:"textbox",fieldLabel:urlSystemValLbl,id:"tgtpropval_"+b+"_"+d,name:"tgtpropval_"+b+"_"+d,value:k,columnWidth:0.48,margin:5,labelSeparator:" ",labelAlign:"top"},{xtype:"component",html:'<center><div class="iconMinus" data-qtip="<b>Remove System Property</b>" style="cursor:pointer;" onclick="javascript:removeTgtPropsContainer('+f+')"></center>',columnWidth:0.04,margin:"25 0 0 2"}]};
n.add(e);a.doLayout();}function addTrgtUrlContact(){var c=Ext.getCmp("EgConfigureTargetsAndSysProps");var a=Ext.getCmp("targeturlcontainer");var d="con_"+inputsTrgtUrl;var b={xtype:"fieldset",id:d,width:600,layout:{type:"vbox",pack:"center",align:"stretch"},style:{background:"none",border:"1px solid lightGrey"},margin:"5 5 5 5",items:[{xtype:"container",layout:{type:"hbox",pack:"end"},margin:"0 10 0 0",items:[{xtype:"button",iconCls:"img_removeShift",tooltip:"<b>Remove</b>",style:{background:"none",border:"0px"},handler:function(){removeTrgtUrlContact(d);
}}]},{xtype:"container",layout:"column",defaults:{margin:5,labelSeparator:" ",labelAlign:"top"},items:[{xtype:"textfield",cls:"textbox",fieldLabel:"Host",id:"hostTrgt"+inputsTrgtUrl,name:"hostTrgt"+inputsTrgtUrl,value:"$unconfigured",columnWidth:0.38},{xtype:"textfield",cls:"textbox",fieldLabel:"Port",id:"portTrgt"+inputsTrgtUrl,name:"portTrgt"+inputsTrgtUrl,value:"$unconfigured",columnWidth:0.62},{xtype:"fieldcontainer",layout:"column",columnWidth:0.01},{xtype:"fieldset",id:"tgtpropsfieldset"+inputsTrgtUrl,name:"tgtpropsfieldset"+inputsTrgtUrl,columnWidth:1,title:"System Properties",style:{background:"none",border:"1px solid lightGrey"},layout:{type:"vbox",pack:"start",align:"stretch"},items:[{xtype:"container",id:"tgtPropsMainContainer"+inputsTrgtUrl,layout:"column",columnWidth:1,defaults:{labelSeparator:"",margin:"0 5 5 5"},items:[{xtype:"container",id:"tgtPropsContainer_"+inputsTrgtUrl+"_1",name:"tgtPropsContainer_"+inputsTrgtUrl+"_1",layout:"column",columnWidth:1,items:[{xtype:"textfield",cls:"textbox",fieldLabel:urlSystemKeyLbl,id:"tgtpropkey_"+inputsTrgtUrl+"_1",name:"tgtpropkey_"+inputsTrgtUrl+"_1",value:"none",margin:5,columnWidth:0.48,labelSeparator:" ",labelAlign:"top"},{xtype:"textfield",cls:"textbox",fieldLabel:urlSystemValLbl,id:"tgtpropval_"+inputsTrgtUrl+"_1",name:"tgtpropval_"+inputsTrgtUrl+"_1",value:"none",columnWidth:0.48,margin:5,labelSeparator:" ",labelAlign:"top"},{xtype:"component",html:'<center><div class="iconPlus" style="cursor:pointer;" data-qtip="<b>Add System Property</b>" onclick="javascript:addTgtPropsContainer(tgtPropsContainer_'+inputsTrgtUrl+'_1)"></center>',columnWidth:0.04,margin:"25 0 0 2"}]}]}]}]}]};
a.add(b);Ext.getCmp("hostTrgt"+inputsTrgtUrl).focus();c.doLayout();inputsTrgtUrl++;Ext.getCmp("addTgtUrlbtn").setText("Add More");Ext.getCmp("updateTgtUrl").enable();Ext.getCmp("clearTgtUrl").enable();Ext.getCmp("NoTrgtUrlPattern").hide();}function removeTrgtUrlContact(d){var c=Ext.getCmp("targeturlcontainer");
var b=Ext.getCmp("targeturlcontainer");b.remove(d);if(d=="contrgt_1"){istrgt="true";Ext.getCmp("contrgt_1").removeAll();Ext.getCmp("contrgt_1").hide();}var a=b.items.length;if(a==0){Ext.getCmp("addTgtUrlbtn").setText("Add");if(istrgt=="true"){Ext.getCmp("NoTrgtUrlPattern").show();Ext.getCmp("updateTgtUrl").disable();
Ext.getCmp("clearTgtUrl").disable();}}}function addSysPropsContainer(d){var b=Ext.get(d).id;if(Ext.isEmpty(b)){b=d;}var c=b.substring(b.indexOf("_")+1);c=c.substring(0,c.indexOf("_"));b=b.substring(b.lastIndexOf("_")+1);var a=Ext.getCmp("egconfigureurlandcredentials");var e=Ext.getCmp("sysPropsMainContainer"+c);
if((e.items.getCount())==totalSystemProperties){Ext.Msg.show({title:alertconfigUrl,msg:limitedSysPropsMsg,buttons:Ext.Msg.OK,icon:"iconInformation"});return;}var h=(e.items.getCount()+1);var f="sysPropsContainer_"+c+"_"+(e.items.getCount()+1);var g={xtype:"container",id:f,layout:"column",columnWidth:1,items:[{xtype:"textfield",cls:"textbox",fieldLabel:urlSystemKeyLbl,id:"syspropkey_"+c+"_"+h,name:"syspropkey_"+c+"_"+h,value:"none",margin:5,columnWidth:0.48,labelSeparator:" ",labelAlign:"top"},{xtype:"textfield",cls:"textbox",fieldLabel:urlSystemValLbl,id:"syspropval_"+c+"_"+h,name:"syspropval_"+c+"_"+h,value:"none",columnWidth:0.48,margin:5,labelSeparator:" ",labelAlign:"top"},{xtype:"component",html:'<center><div class="iconMinus" data-qtip="<b>Remove System Property</b>" style="cursor:pointer;" onclick="javascript:removeSysPropsContainer('+f+')"></center>',columnWidth:0.04,margin:"25 0 0 2"}]};
e.add(g);a.doLayout();}function addSysPropsContainerWithValue(g,c){var m=g;var h=c;var l="none";var k="none";if(!Ext.isEmpty(h)&&h.indexOf("~!~")!=-1){l=h.substring(0,h.indexOf("~"));k=h.substring(h.lastIndexOf("~")+1);}var b=m.substring(m.indexOf("_")+1);b=b.substring(0,b.indexOf("_"));m=m.substring(m.lastIndexOf("_")+1);
var a=Ext.getCmp("egconfigureurlandcredentials");var n=Ext.getCmp("sysPropsMainContainer"+b);if(!Ext.isEmpty(n.items)){if((n.items.getCount())==totalSystemProperties){Ext.Msg.show({title:alertconfigUrl,msg:limitedSysPropsMsg,buttons:Ext.Msg.OK,icon:"iconInformation"});return;}}var d=(n.items.getCount()+1);
var f="sysPropsContainer_"+b+"_"+(n.items.getCount()+1);var e={xtype:"container",id:f,layout:"column",columnWidth:1,items:[{xtype:"textfield",cls:"textbox",fieldLabel:urlSystemKeyLbl,id:"syspropkey_"+b+"_"+d,name:"syspropkey_"+b+"_"+d,value:l,margin:5,columnWidth:0.48,labelSeparator:" ",labelAlign:"top"},{xtype:"textfield",cls:"textbox",fieldLabel:urlSystemValLbl,id:"syspropval_"+b+"_"+d,name:"syspropval_"+b+"_"+d,value:k,columnWidth:0.48,margin:5,labelSeparator:" ",labelAlign:"top"},{xtype:"component",html:'<center><div class="iconMinus" data-qtip="<b>Remove System Property</b>" style="cursor:pointer;" onclick="javascript:removeSysPropsContainer('+f+')"></center>',columnWidth:0.04,margin:"25 0 0 2"}]};
n.add(e);a.doLayout();}function removeSysPropsContainer(n){var q=n.id;var k=q;k=k.substring(k.indexOf("_")+1);k=k.substring(0,k.indexOf("_"));var a=Ext.getCmp("sysPropsMainContainer"+k);var r=Ext.getCmp(q);a.remove(r);var o=a.items.length;if(o>0){inputsIncPatt=0;var g=new Array();for(var c=1;c<=o;c++){var h=Ext.getCmp("sysPropsContainer_"+k+"_"+(c+1));
if(h==null||h==undefined){continue;}var d=h.getId();var m=Ext.getCmp("syspropkey_"+k+"_"+(c+1)).getValue();var l=Ext.getCmp("syspropval_"+k+"_"+(c+1)).getValue();g[inputsIncPatt]=m+"~!~"+l;inputsIncPatt++;a.remove(h);}if(g!=null&&g.length>0){for(var f=0;f<g.length;f++){var b=g[f];addSysPropsContainerWithValue("sysPropsContainer_"+k+"_"+(f+2),b);
}}}}function validateIpOrHNameExt(t,s){var n=s.getValue();var r=n;var a=0;var b=false;var c=false;var h="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";if(r.indexOf(":")>-1){c=true;}if(c){result=checkIPv6Ext(t,s);return result;}else{for(var d=0;d<r.length;d++){check_char=h.indexOf(r.charAt(d));
if(check_char>=0){b=true;}}if(!b){for(var g=0;g<r.length;g++){if(r.charAt(g)=="."&&r.charAt(g+1)=="."){Ext.Msg.show({title:t,msg:_checkIp,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){s.focus(true,true);}});return false;}else{continue;}}for(var q=0;q<r.length;q++){if(r.charAt(q)=="."){a=a+1;
}else{continue;}}if(a!=3){Ext.Msg.show({title:t,msg:_valIp,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){s.focus(true,true);}});return false;}if(r.charAt(0)=="."||r.charAt(r.length-1)=="."){Ext.Msg.show({title:t,msg:_validateIp,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){s.focus(true,true);
}});return false;}}for(var o=0;o<r.length;o++){if(r.charAt(o)==" "){Ext.Msg.show({title:t,msg:_checkspaceIp,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){s.focus(true,true);}});return false;}}var u="`~!@#$%^&*()_+={}[]|\\:;\"'<>,?/";for(var g=0;g<r.length;g++){check_char=u.indexOf(r.charAt(g));
if(check_char>=1){Ext.Msg.show({title:t,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){s.focus(true,true);}});return false;}}if(r.indexOf(".")>-1&&a>2){var f=r.split(".");for(var e=0;e<f.length;e++){if(f[e]<0||f[e]>255){Ext.Msg.show({title:t,msg:_checknum,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){s.focus(true,true);
}});return false;}}}return true;}}function checkspaceExt(b){var a;if(typeof(b)=="object"){a=b.value;}else{a=b;}for(count=0;count<a.length;count++){if(a.charAt(count)==" "){return false;}}return true;}function checkIPv6Ext(f,c){var d=c.getValue();if(!checkspecialnomess(d,"`~!@#%^&*()+={}[]|\\;\"'<>,?")){Ext.Msg.show({title:f,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){c.focus(true,true);
}});return false;}if(!checkspaceExt(d)){Ext.Msg.show({title:f,msg:_checkblank,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){c.focus(true,true);}});return false;}var o=/[\.]{2,}/;var m=/(^(\.){1,})|((\.){1,}$)/gi;var h=/(\.\:){1,}|(\:\.){1,}/;if(d.match(o)!=null||d.match(h)!=null){Ext.Msg.show({title:f,msg:_chkIpv6,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){c.focus(true,true);
}});return false;}if(d.match(m)!=null){Ext.Msg.show({title:f,msg:_validateIp,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){c.focus(true,true);}});return false;}var z=/[\:]{2,}/g;var v=d.match(z);if(v!=null&&v!="::"){Ext.Msg.show({title:f,msg:_doubleColon,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){c.focus(true,true);
}});return false;}var s=d.split(":");var w=s.length;w--;var q,k;k=d;if(s.length<=7&&d.indexOf(".")!=-1){var n=d.split(".");var g=n.length;g--;q=d.substring((d.lastIndexOf(":")+1));k=d.substring(0,(d.lastIndexOf(":")));var b=/[0-9]{1,3}(\.){1}[0-9]{1,3}(\.){1}[0-9]{1,3}(\.){1}[0-9]{1,3}((\/){1}[0-9]{1,3})*$/gi;
regIp4Res=d.match(b);if(regIp4Res==null||regIp4Res!=q){Ext.Msg.show({title:f,msg:_valIp,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){c.focus(true,true);}});return false;}if(k.indexOf(".")!=-1){Ext.Msg.show({title:f,msg:_checkIp,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){c.focus(true,true);
}});return false;}if((g>3)||(g!=3)){Ext.Msg.show({title:f,msg:_valIp,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){c.focus(true,true);}});return false;}var a=q.split("/");q=a[0];var y=q.split(".");for(var x=0;x<y.length;x++){if(y[x]<0||y[x]>255){Ext.Msg.show({title:f,msg:_checknum,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){c.focus(true,true);
}});return false;}}}else{if((w>7)||(v!="::")&&(w<7)){Ext.Msg.show({title:f,msg:_grpIpv6,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){c.focus(true,true);}});return false;}}var a=k.split("/");k=a[0];var t="";var A=/^(([a-z0-9(::)]{0,4}(\:){1,2}[a-z0-9]{0,4}){1}((\:){1,2}[a-z0-9]{0,4}){1,})|(([a-z0-9(::)]{0,4}(\:){1,2}[a-z0-9]{0,4}){1})$/gi;
var u=k.match(A);A=/^[a-f0-9]{0,4}$/gi;if(k.indexOf(":")==-1){t=k.match(A);}if(((u==null)||(u!=k))&&(t!=k)){Ext.Msg.show({title:f,msg:_digitIpv6,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){c.focus(true,true);}});return false;}var r=/(::){0,1}([a-f0-9(::)(\.)]*[\:]{1})+[a-f(::)(\.)0-9]*((\/){0,1}[0-9]{1,3})*/ig;
var e=d.match(r);if(e==null||e!=d){Ext.Msg.show({title:f,msg:_validateIpv6,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){c.focus(true,true);}});return false;}return true;}function doesExist(d,c){for(var b=0;b<d.length;b++){var a=d[b];if(c.indexOf(a)!=-1||c.toLowerCase().indexOf(a.toLowerCase())!=-1){return true;
}}return false;}function isAllowDoubleByte(d,b,h,c,f,e,a){var g=d;if(h=="process"){g=d.indexOf(":")>-1?d.substring(0,d.indexOf(":")):d;if(!a){g=d.indexOf(":")>-1?d.substring(d.indexOf(":")+1):"";}}if(!isDoubleByteMgr&&!validateSingleByte(g)){Ext.Msg.show({title:b,msg:e,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){if(f){if(h=="service"){testInterViews.editService("",d.toString());
}else{if(h=="process"){testInterViews.editProcess("",d.toString(),a);}}}else{Ext.getCmp(c).focus(false,200);}}});return false;}return true;}function addBtmPatternProps(){var l=Ext.getCmp("egconfigureurlandcredentials");var k=Ext.getCmp("credurlcontainer");var r=publicBtmJSON["patternCount"];var v=publicBtmJSON["patternData"][0];
Ext.getCmp("name").setValue(v["descc"]);Ext.getCmp("uri_1").setValue("EQ");Ext.getCmp("nameURL1").setValue(v["url"]);l.doLayout();var m=v["size"];for(var n=0;n<m;n++){var u=n+1;var o=false;var a=false;if(u=="1"){a=false;o=true;}else{a=true;o=false;}var d=v["propsData"][n];var f=d["isSegMent"];var c=true;
var g=d["isParameter"];var s=true;var h="1stFew";if(f){s=true;c=false;h="1stFew";}if(g){s=false;c=true;h="param";}var q=inputsCredUrl;var e={xtype:"container",margin:"10 0 10 0",id:"urlProperty_1_"+q,layout:{type:"column",align:"stretch"},items:[{xtype:"label",textAlign:"center",margin:"5 0 15 0",style:{"text-align":"center"},columnWidth:1.3,text:" And ",},{xtype:"container",layout:"hbox",columnWidth:1,items:[{xtype:"combo",cls:"dropdown",labelWidth:"auto",fieldLabel:"Use",margin:"3 0",displayField:"displayField",valueField:"valueField",value:h,editable:false,id:"urlsegment_1_"+q,labelSeparator:" ",store:new Ext.data.Store({fields:["displayField","valueField"],data:[{"displayField":"first few URI segment(s)","valueField":"1stFew"},{"displayField":"last few URL segment(s)","valueField":"lastfew"},{"displayField":"specific URL segment(s)","valueField":"specific"},{"displayField":"a parameter value","valueField":"param"}]}),listeners:{change:function(){var t=this.getValue();
if(t!="param"){Ext.getCmp("urlsegmentContainer_1_"+q).show();Ext.getCmp("urlparamContainer_1_"+q).hide();}if(t=="param"){Ext.getCmp("urlsegmentContainer_1_"+q).hide();Ext.getCmp("urlparamContainer_1_"+q).show();}}}},{xtype:"fieldcontainer",hidden:c,columnWidth:1,layout:"hbox",id:"urlsegmentContainer_1_"+q,items:[{xtype:"textfield",cls:"textbox",labelWidth:60,value:d["Segment"],id:"urlsegmentNo_1_"+q,labelSeparator:" ",margin:"0 5",fieldLabel:": Use first",},{xtype:"label",forId:"segementsURL",margin:"0 5",text:"Segements of the URL",},{xtype:"button",margin:"0 270",id:"removebutton1_"+q,iconCls:"iconMinus",tooltip:"<b>remove URL Property</b>",style:{background:"none",border:"0px"},handler:function(){removeUrlPropsContainer(this.getId());
}}]},{xtype:"fieldcontainer",layout:"hbox",id:"urlparamContainer_1_"+q,hidden:s,columnWidth:1,items:[{xtype:"textfield",cls:"textbox",labelSeparator:" ",id:"urlParam_1_"+q,value:d["Parameter"],margin:"0 5",labelWidth:"auto",fieldLabel:": Use value of request parameter key 	",},{xtype:"textfield",cls:"textbox",id:"urlRegEx_1_"+q,labelWidth:"auto",value:d["RegX"],margin:"0 0",labelSeparator:" ",fieldLabel:" and apply regex",},{xtype:"button",margin:"0 33",id:"removebutton2_"+q,iconCls:"iconMinus",tooltip:"<b>remove URL Property</b>",style:{background:"none",border:"0px"},handler:function(){removeUrlPropsContainer(this.getId());
}}]}]}]};var b=Ext.getCmp("urlPropsfieldset1");b.add(e);inputsCredUrl++;l.doLayout();}l.doLayout();Ext.getCmp("updateCredUrl").enable();}function addUrlPropsContainer(c,h,d,e,k){h=(h==undefined)?"1stFew":h;d=!Ext.isDefined(d)?3:d;e=!Ext.isDefined(e)?"":e;k=!Ext.isDefined(k)?"":k;var l=Ext.get(c).id;var a=Ext.getCmp("businesstransactionrule");
var n=Ext.getCmp(c);var m=7;if(Ext.isEmpty(l)){l=c;}if((n.items.getCount())==m){Ext.Msg.show({title:" Configure URL rules",msg:"You have reached the maximum number of rules",buttons:Ext.Msg.OK,icon:"iconInformation"});return;}var b=BTNamingSegmentCount;var g="urlProperty_1_"+b;var f={xtype:"container",margin:"10 0 10 0",id:g,layout:{type:"column",align:"stretch"},items:[{xtype:"label",textAlign:"center",margin:"5 0 15 0",style:{"text-align":"center"},columnWidth:1.3,text:" And "},{xtype:"container",columnWidth:1,layout:"hbox",items:[{xtype:"combo",cls:"dropdown",labelWidth:60,fieldLabel:"Use",margin:"3 0",displayField:"displayField",valueField:"valueField",value:h,editable:false,id:"urlsegment_1_"+b,labelSeparator:" ",store:new Ext.data.Store({fields:["displayField","valueField"],data:[{"displayField":"first few URI segment(s)","valueField":"1stFew"},{"displayField":"specific URL segment(s)","valueField":"specific"},{"displayField":"a parameter value","valueField":"param"}]}),listeners:{change:function(){var o=this.getValue();
if(o=="param"){Ext.getCmp("urlsegmentContainer_1_"+b).hide();Ext.getCmp("urlspecificsegmentContainer_1_"+b).hide();Ext.getCmp("urlparamContainer_1_"+b).hide();Ext.getCmp("urlparamContainer_1_"+b).show();Ext.getCmp("urlParam_1_"+b).focus(true,true);}else{if(o=="specific"){Ext.getCmp("urlsegmentContainer_1_"+b).hide();
Ext.getCmp("urlspecificsegmentContainer_1_"+b).hide();Ext.getCmp("urlparamContainer_1_"+b).hide();Ext.getCmp("urlspecificsegmentContainer_1_"+b).show();Ext.getCmp("urlspecificsegmentNo_1_"+b).focus(true,true);}else{Ext.getCmp("urlsegmentContainer_1_"+b).hide();Ext.getCmp("urlspecificsegmentContainer_1_"+b).hide();
Ext.getCmp("urlparamContainer_1_"+b).hide();Ext.getCmp("urlsegmentContainer_1_"+b).show();Ext.getCmp("urlsegmentNo_1_"+b).focus(true,true);}}},afterrender:function(){var o=this.getValue();if(o=="param"){Ext.getCmp("urlsegmentContainer_1_"+b).hide();Ext.getCmp("urlspecificsegmentContainer_1_"+b).hide();
Ext.getCmp("urlparamContainer_1_"+b).hide();Ext.getCmp("urlparamContainer_1_"+b).show();Ext.getCmp("urlParam_1_"+b).focus(true,true);}else{if(o=="specific"){Ext.getCmp("urlsegmentContainer_1_"+b).hide();Ext.getCmp("urlspecificsegmentContainer_1_"+b).hide();Ext.getCmp("urlparamContainer_1_"+b).hide();
Ext.getCmp("urlspecificsegmentContainer_1_"+b).show();Ext.getCmp("urlspecificsegmentNo_1_"+b).focus(true,true);}else{Ext.getCmp("urlsegmentContainer_1_"+b).hide();Ext.getCmp("urlspecificsegmentContainer_1_"+b).hide();Ext.getCmp("urlparamContainer_1_"+b).hide();Ext.getCmp("urlsegmentContainer_1_"+b).show();
Ext.getCmp("urlsegmentNo_1_"+b).focus(true,true);}}}}},{xtype:"fieldcontainer",columnWidth:1,layout:"hbox",id:"urlsegmentContainer_1_"+b,items:[{xtype:"textfield",cls:"textbox",labelWidth:60,value:d,id:"urlsegmentNo_1_"+b,labelSeparator:" ",margin:"0 5",fieldLabel:": Use first"},{xtype:"label",width:200,forId:"segementsURL",margin:"0 5",text:"Segements of the URL"},{xtype:"component",flex:1},{xtype:"button",margin:"0 100 0 0",id:"removebutton1_"+b,iconCls:"iconMinus",tooltip:"<b>remove URL Property</b>",style:{background:"none",border:"0px"},handler:function(){removeUrlPropsContainer(this.getId());
}}]},{xtype:"fieldcontainer",hidden:true,columnWidth:1,layout:"hbox",id:"urlspecificsegmentContainer_1_"+b,items:[{xtype:"textfield",cls:"textbox",labelWidth:60,value:d,id:"urlspecificsegmentNo_1_"+b,labelSeparator:" ",margin:"0 5",fieldLabel:": Use",},{xtype:"label",forId:"segementsURL",width:200,margin:"0 5",text:"Segement of the URL"},{xtype:"component",flex:1},{xtype:"button",id:"removebutton3_"+b,margin:"0 100 0 0",iconCls:"iconMinus",tooltip:"<b>remove URL Property</b>",style:{background:"none",border:"0px"},handler:function(){removeUrlPropsContainer(this.getId());
}}]},{xtype:"fieldcontainer",layout:"hbox",id:"urlparamContainer_1_"+b,hidden:true,columnWidth:1,items:[{xtype:"textfield",value:e,cls:"textbox",labelSeparator:" ",id:"urlParam_1_"+b,margin:"0 5",labelWidth:"auto",fieldLabel:": Use value of request parameter key"},{xtype:"textfield",cls:"textbox",id:"urlRegEx_1_"+b,labelWidth:"auto",margin:"0 0",value:k,labelSeparator:" ",fieldLabel:" and apply regex"},{xtype:"component",flex:1},{xtype:"button",id:"removebutton2_"+b,margin:"0 100 0 0",iconCls:"iconMinus",tooltip:"<b>remove URL Property</b>",style:{background:"none",border:"0px"},handler:function(){BTNamingSegmentCount--;
removeUrlPropsContainer(this.getId());}}]}]}]};n.add(f);BTNamingSegmentCount++;a.doLayout();}function removeUrlPropsContainer(c){var a=c.substring(c.lastIndexOf("_")+1);var b=Ext.getCmp("urlProperty_1_"+a);Ext.getCmp("urlPropsfieldset1").remove(b);}function removeSysPropsContainer(k){var n=k.id;var o=n;
o=o.substring(o.indexOf("_")+1);o=o.substring(0,o.indexOf("_"));var l=Ext.getCmp("sysPropsMainContainer"+o);var f=Ext.getCmp(n);l.remove(f);var b=l.items.length;if(b>0){inputsIncPatt=0;var a=new Array();var m=new Array();for(var t=1;t<=b;t++){var u=Ext.getCmp("sysPropsContainer_"+o+"_"+(t+1));if(u==null||u==undefined){continue;
}var h=u.getId();var r=Ext.getCmp("inputsource_"+o+"_"+(t+1)).getValue();var g="none";var g="none";var d="none";if(r!=null){if(r=="US"){var c=Ext.getCmp("urlsegmentindex_"+o+"_"+(t+1)).getValue();d=c;}else{if(r=="QP"){var x=Ext.getCmp("syspropkey_"+o+"_"+(t+1)).getValue();var s=Ext.getCmp("syspropval_"+o+"_"+(t+1)).getValue();
d=x+"~!~"+s;}else{r="none";}}}else{r="none";}a[inputsIncPatt]=d;m[inputsIncPatt]=r;inputsIncPatt++;l.remove(u);}if(a!=null&&a.length>0){for(var v=0;v<a.length;v++){var q=a[v];var w=m[v];addSysPropsContainerWithValue("sysPropsContainer_"+o+"_"+(v+2),q,w);}}}}function removeCredUrlContact(b){var c=Ext.getCmp("credurlcontainer");
var d=Ext.getCmp(b);if(!Ext.isEmpty(d)){c.remove(b);}if(b=="concred_1"){iscred="true";Ext.getCmp("concred_1").removeAll();Ext.getCmp("concred_1").hide();}var a=c.items.getCount();if(a==0){if(iscred=="true"){Ext.getCmp("addCredUrlbtn").setText("Add");Ext.getCmp("NoCredUrlPattern").show();Ext.getCmp("updateCredUrl").disable();
Ext.getCmp("clearCredUrl").disable();}}}