Ext.define("SpecificTestConfiguration.controller.FunctionController",{extend:"Ext.app.Controller",refs:[{selector:"egconfigurerulenames",ref:"egconfigurerulenames"},{selector:"eghlspublishedresources",ref:"eghlspublishedresources"},{selector:"egemailconfiguration",ref:"egemailconfiguration"},{selector:"siteurldetailedconfiguration",ref:"siteurldetailedconfiguration"},{selector:"eghorizonwssimulator",ref:"eghorizonwssimulator"},{selector:"egsystemproperties",ref:"egsystemproperties"},{selector:"egamazonwssimulator",ref:"egamazonwssimulator"},{selector:"excludeinterfaces",ref:"excludeinterfaces"},{selector:"sharefoldersconfiguration",ref:"sharefoldersconfiguration"},{selector:"egcustomapplicationnaming",ref:"egcustomapplicationnaming"}],init:function(){func=this;
sharedFoldersFullList="";this.control({'egconfigurerulenames button[id="addRuleNamebtn"]':{"click":this.addMainContact},'egconfigurerulenames button[id="clearRuleName"]':{"click":this.clearFilterRules},'egconfigurerulenames button[id="updateRuleName"]':{"click":this.updateRuleFilters},'egemailconfiguration button[id="addEmailBtn"]':{"click":this.addMainEmailContact},'egemailconfiguration button[id="clearEmailBtn"]':{"click":this.clearEmailFields},'egemailconfiguration button[id="updateEmailBtn"]':{"click":this.updateEmailSets},'eghlspublishedresources button[id="addMultiHLSbtn"]':{"click":this.addMultiHLSSource},'eghlspublishedresources button[id="clearMultiHLSbtn"]':{"click":this.ClearMultiHLSSource},'eghlspublishedresources button[id="updateMultiHLSbtn"]':{"click":this.UpdateMultiHLSSource},"siteurlconfiguration":{"beforeclose":this.callSitUrlDestroy},'siteurlconfiguration button[id="addURLsConfbtn"]':{"click":this.addURLs},'siteurlconfiguration button[id="updateSitURLs"]':{"click":this.updateSiteURLs},'siteurlconfiguration button[id="clearSitURLs"]':{"click":this.clearSiteURLs},'siteurlconfiguration button[id="getSitURLs"]':{"click":this.getSiteURLs},'siteurldetailedconfiguration button[id="submitSitUrlDet"]':{"click":this.submitSiteURLs},'siteurldetailedconfiguration trigger[id="getsitDetailSearch"]':{"change":this.getSitURLsDtlSearch},'eghorizonwssimulator button[id="addResourcebtn"]':{"click":this.addHorizonWSResourceSet},'eghorizonwssimulator button[id="clearResourceBtn"]':{"click":this.clearResourceFieldSets},'eghorizonwssimulator button[id="updateResourceBtn"]':{"click":this.updateResourceSets},'egsystemproperties button[id="addPropBtn"]':{"click":this.addMainPropertySet},'egsystemproperties button[id="clearPropBtn"]':{"click":this.clearPropertyFields},'egsystemproperties button[id="updatePropBtn"]':{"click":this.updatePropertySets},'egamazonwssimulator button[id="addAmazonResourcebtn"]':{"click":this.addAmazonWSResourceSet},'egamazonwssimulator button[id="clearAmazonResourceBtn"]':{"click":this.clearAmazonResourceFieldSets},'egamazonwssimulator button[id="updateAmazonResourceBtn"]':{"click":this.updateAmazonResourceSets},'excludeinterfaces button[id="addExcludInf"]':{"click":this.addExcludInterfacs},'excludeinterfaces button[id="getExcludInf"]':{"click":this.getExcludInterfacs},'excludeinterfaces trigger[id="getInfacDetailSearch"]':{"change":this.getexInfacsSearch},'sharefoldersconfiguration button[id="submitShareFolderBtn"]':{"click":this.submitShareFolders},'sharefoldersconfiguration button[id="getShareFolders"]':{"click":this.getUpdateShares},'egcustomapplicationnaming button[id="addMoreCustBtn"]':{"click":this.addMainCustomContact},'egcustomapplicationnaming button[id="clearCustBtn"]':{"click":this.clearCustomFields},'egcustomapplicationnaming button[id="updateCustBtn"]':{"click":this.updateCustomSets}});
},snmpUtilityShow:function(){Ext.widget("window",{title:SNMPUtilTitle,listeners:{afterrender:function(){var N=Ext.getCmp("host").getValue();var T=publicJson.originalParamNameObj["SNMPPORT"];var w=publicJson.originalParamNameObj["CONTEXT"];var x=publicJson.originalParamNameObj["USERNAME"];var q=publicJson.originalParamNameObj["AUTHPASS"];
var s=publicJson.originalParamNameObj["AUTHPASSCONFIRMPASSWORD"];var P=publicJson.originalParamNameObj["AUTHTYPE"];var O=publicJson.originalParamNameObj["DATA_OVER_TCP"];var e=publicJson.originalParamNameObj["ENCRYPTFLAG"];var c=publicJson.originalParamNameObj["ENCRYPTTYPE"];var u=publicJson.originalParamNameObj["ENCRYPTPASSWORD"];
var E=publicJson.originalParamNameObj["ENCRYPTPASSWORDCONFIRMPASSWORD"];var K=publicJson["selectedExternalAgent"];var m="";var J=Ext.ComponentQuery.query("#installedagent")[0];if(!Ext.isEmpty(K)){J.setValue(K);}else{J.setValue(publicJson.agentsListForSNMPUtil[0].valueField);}var L=Ext.ComponentQuery.query("#snmphost")[0];
var W=Ext.ComponentQuery.query("#snmpport")[0];var U=Ext.ComponentQuery.query("#snmpversion");if(U.length>1){U=U[1];}else{U=U[0];}var z=Ext.ComponentQuery.query("#snmpcommunity")[0];L.setValue(N);var i=Ext.getCmp(T).getValue();if(!Ext.isEmpty(i)){W.setValue(i);}else{W.setValue("161");}var R="";var f="";
if(!Ext.isEmpty(Ext.getCmp("snmpversion"))&&Ext.getCmp("snmpversion")!=undefined){R=Ext.getCmp("snmpversion");f=R.getValue();}else{if(!Ext.isEmpty(Ext.getCmp("snmpVersion"))&&Ext.getCmp("snmpVersion")!=undefined){R=Ext.getCmp("snmpVersion");f=R.getValue();}}if(!Ext.isEmpty(f)){U.setValue(f);}else{U.setValue("v1");
}var H=Ext.getCmp(O+"1").getValue();var S=Ext.ComponentQuery.query("#snmpdataovertcp")[0];var G=Ext.ComponentQuery.query("#utildatatcpyes")[0];var d=Ext.ComponentQuery.query("#utildatatcpno")[0];S.setDisabled(false);if(H){G.setValue(H);d.setValue(false);}else{G.setValue(false);d.setValue(true);}S.show();
if(!Ext.isEmpty(f)&&f=="v3"){var k=publicJson["snmpEncTypeArr"];var h=publicJson["snmpAuthTypeArr"];z.setDisabled(true);z.hide();var C=Ext.ComponentQuery.query("#snmpcontext")[0];var aa=Ext.getCmp(w).getValue();C.setDisabled(false);if(!Ext.isEmpty(aa)){C.setValue(aa);}else{C.setValue("none");}C.show();
var M=Ext.getCmp(x).getValue();var F=Ext.ComponentQuery.query("#snmpusername")[0];F.setDisabled(false);if(!Ext.isEmpty(M)){F.setValue(M);}else{F.setValue("none");}F.show();var r=Ext.getCmp(q).getValue();var Z=Ext.ComponentQuery.query("#snmpauthpass")[0];Z.setDisabled(false);if(!Ext.isEmpty(r)){Z.setValue(r);
}else{Z.setValue("none");}Z.show();var n=Ext.getCmp(s).getValue();var p=Ext.ComponentQuery.query("#snmpauthpassconfirmpassword")[0];p.setDisabled(false);if(!Ext.isEmpty(n)){p.setValue(n);}else{p.setValue("none");}p.show();var o=Ext.getCmp(P).getValue();var D=Ext.ComponentQuery.query("#snmpauthtype")[0];
D.setDisabled(false);if(!Ext.isEmpty(o)){D.setValue(o);}else{D.setValue(h[0].valueField);}D.show();var j=Ext.getCmp(e+"1").getValue();var a=Ext.ComponentQuery.query("#snmpencryptflag")[0];var X=Ext.ComponentQuery.query("#snmpencryptflagyes")[0];var y=Ext.ComponentQuery.query("#snmpencryptflagno")[0];
a.setDisabled(false);if(j){X.setValue(j);y.setValue(false);}else{X.setValue(false);y.setValue(true);}a.show();var B=Ext.getCmp(c).getValue();var v=Ext.ComponentQuery.query("#snmpencrypttype")[0];v.setDisabled(false);if(!Ext.isEmpty(B)){v.setValue(B);}else{v.setValue(k[0].valueField);}var Q=Ext.getCmp(u).getValue();
var A=Ext.ComponentQuery.query("#snmpencryptpassword")[0];A.setDisabled(false);if(!Ext.isEmpty(Q)){A.setValue(Q);}else{A.setValue("none");}var g=Ext.getCmp(E).getValue();var Y=Ext.ComponentQuery.query("#snmpencryptpasswordconfirmpassword")[0];Y.setDisabled(false);if(!Ext.isEmpty(g)){Y.setValue(g);}else{Y.setValue("none");
}var I=Ext.getCmp("encryptflag2").getValue();if(I){v.hide();A.hide();Y.hide();}else{v.show();A.show();Y.show();}}else{if(!Ext.isEmpty(f)&&(f=="v1"||f=="v2")){var V="";var t="";if(!Ext.isEmpty(Ext.getCmp("snmpcommunity"))&&Ext.getCmp("snmpcommunity")!=undefined){V=Ext.getCmp("snmpcommunity");t=V.getValue();
}else{V=Ext.getCmp("snmpCommunity");t=V.getValue();}z.setDisabled(false);if(!Ext.isEmpty(t)){z.setValue(t);}else{z.setValue("none");}z.show();func.snmpUtilV3ParamDisabeld();}}}},closeAction:"destroy",id:"utilWins",width:800,modal:true,floating:true,padding:"5 10 10 10",layout:"fit",doClose:function(){this.destroy();
},dockedItems:[{xtype:"toolbar",dock:"bottom",id:"utilbottomToolBar",name:"utilbottomToolBar",ui:"toolbarBgWithTopBorder",margin:0,padding:"10 0 10 0",layout:{pack:"center"},items:[{xtype:"button",id:"GetSubtreeBtn",text:screenLabelMsg19,ui:"newButtonSmall",width:100,listeners:{"click":func.snmpGetSubtree}},{xtype:"button",id:"SnmpWalkBtn",text:screenLabelMsg20,ui:"newButtonSmall",margin:"0 0 0 20",width:100,listeners:{"click":func.snmpWalk}}]}],items:[{xtype:"fieldset",title:screenLabelMsg21,id:"snmputilityitems",scroll:true,autoScroll:true,height:400,margin:10,layout:{type:"vbox",pack:"start",align:"center"},defaults:{labelSeparator:"",margin:5,width:450,labelWidth:200},items:[{xtype:"textfield",cls:"textbox",fieldLabel:screenLabelMsg1,itemId:"snmphost"},{xtype:"textfield",cls:"textbox",fieldLabel:screenLabelMsg2,itemId:"snmpport"},{xtype:"combo",cls:"dropdown",itemId:"snmpversion",fieldLabel:screenLabelMsg3,displayField:"displayField",valueField:"valueField",queryMode:"local",editable:false,parent:this,store:new Ext.data.Store({fields:["displayField","valueField"],data:[{"displayField":"v1","valueField":"v1"},{"displayField":"v2","valueField":"v2"},{"displayField":"v3","valueField":"v3"}]}),listeners:{"select":func.snmpVersionChange}},{xtype:"textfield",cls:"textbox",fieldLabel:screenLabelMsg4,itemId:"snmpcommunity"},{xtype:"textfield",cls:"textbox",fieldLabel:screenLabelMsg5,itemId:"snmpcontext",hidden:true},{xtype:"textfield",cls:"textbox",fieldLabel:screenLabelMsg6,itemId:"snmpusername",hidden:true},{xtype:"textfield",cls:"textbox",fieldLabel:screenLabelMsg7,itemId:"snmpauthpass",inputType:"password",hidden:true},{xtype:"textfield",cls:"textbox",fieldLabel:screenLabelMsg8,itemId:"snmpauthpassconfirmpassword",inputType:"password",hidden:true},{xtype:"combo",cls:"dropdown",itemId:"snmpauthtype",hidden:true,fieldLabel:screenLabelMsg9,displayField:"displayField",valueField:"valueField",queryMode:"local",editable:false,parent:this,value:"MD5",store:new Ext.data.Store({fields:["displayField","valueField"],data:[{"displayField":"MD5","valueField":"MD5"},{"displayField":"SHA","valueField":"SHA"}]})},{xtype:"radiogroup",cls:"radiobt",fieldLabel:screenLabelMsg10,columns:2,vertical:false,itemId:"snmpencryptflag",listeners:{"change":this.changeEncFlagValue},items:[{boxLabel:"Yes",name:"snmpencryptflag",id:"snmpencryptflagyes",inputValue:"1"},{boxLabel:"No",name:"snmpencryptflag",id:"snmpencryptflagno",inputValue:"2",checked:true}],hidden:true},{xtype:"combo",cls:"dropdown",itemId:"snmpencrypttype",hidden:true,fieldLabel:screenLabelMsg11,displayField:"displayField",valueField:"valueField",queryMode:"local",editable:false,parent:this,value:"DES",store:new Ext.data.Store({fields:["displayField","valueField"],data:[{"displayField":"DES","valueField":"DES"},{"displayField":"AES","valueField":"AES"}]})},{xtype:"textfield",cls:"textbox",fieldLabel:screenLabelMsg12,itemId:"snmpencryptpassword",inputType:"password",hidden:true},{xtype:"textfield",cls:"textbox",fieldLabel:screenLabelMsg13,itemId:"snmpencryptpasswordconfirmpassword",inputType:"password",hidden:true},{xtype:"radiogroup",cls:"radiobt",fieldLabel:screenLabelMsg14,columns:2,vertical:false,itemId:"snmpdataovertcp",items:[{boxLabel:"Yes",name:"utildataovertcp",id:"utildatatcpyes",inputValue:"1"},{boxLabel:"No",name:"utildataovertcp",id:"utildatatcpno",inputValue:"2",checked:true}]},{xtype:"fieldcontainer",fieldLabel:screenLabelMsg15,layout:{type:"column"},items:[{xtype:"textfield",cls:"textbox",id:"oidvalue",maxLength:100,enforceMaxLength:true,columnWidth:1},{xtype:"button",iconCls:"iconTree",border:0,style:{"background":"none"},tooltip:"Get OID",listeners:{el:{click:function(){func.showMibTree("config","ObjectOID");
}}}}]},{xtype:"combo",cls:"dropdown",itemId:"installedagent",id:"installedagent",fieldLabel:screenLabelMsg16,displayField:"displayField",valueField:"valueField",queryMode:"local",editable:false,parent:this,store:new Ext.data.Store({fields:["displayField","valueField"],data:publicJson.agentsListForSNMPUtil})}]}]}).show();
},snmpGetSubtree:function(g){var c=func.isSNMPParamsValidate();var f=true;if(c.startsWith("false~@~")){f=false;}if(f){var a="Trying to get the output from the agent. This may take a few minutes.";var d=new Ext.LoadMask(Ext.getCmp("utilWins"),{msg:a});d.show();var e=c.substring(c.indexOf("~@~")+3);Ext.Ajax.request({url:"/final/admin/SnmpGetSubtree/data/EgSnmpGetSubtreeJson.jsp?",timeout:6000000,params:e,waitTitle:SNMPUtilTitle,success:function(h){d.hide();
var i=Ext.decode(h.responseText);if(i.success){if(!Ext.isEmpty(i.resultSubTreeArr)){Ext.widget("window",{title:screenLabelMsg22,width:800,height:500,id:"subtreeFile",padding:"5 10 10 10",name:"subtreeFile",resizable:"false",autoScroll:true,layout:"fit",closable:true,items:[{xtype:"multiselect",id:"getsubtreeResultCombo",name:"getsubtreeResultCombo",displayField:"displayField",valueField:"valueField",queryMode:"local",editable:false,parent:this,store:new Ext.data.Store({fields:["displayField","valueField"],data:i.resultSubTreeArr})}],dockedItems:[{xtype:"toolbar",dock:"bottom",layout:{type:"hbox",pack:"center"},padding:10,ui:"toolbarBgWithTopBorder",items:[{xtype:"button",ui:"newButtonSmall",text:"Save",width:80,id:"subtreesavebtn",name:"subtreesavebtn",labelStyle:"font-weight:bold",handler:function(n,q){var p=Ext.getCmp("getsubtreeResultCombo");
var j=p.getStore().getCount();if(j>0){var k="Subtree";for(var m=0;m<j;m++){var o=p.getStore().getAt(m).get("valueField");k=k+"~!~"+o;}}postCustomFormSubmit(k);}},{xtype:"button",ui:"newButtonSmall",text:"Close",width:80,id:"closebt",name:"closebtn",margin:"0 0 0 20",labelStyle:"font-weight:bold",handler:function(){Ext.getCmp("subtreeFile").close();
}}]}]}).show();}else{Ext.Msg.show({title:SNMPUtilTitle,msg:"No data found",buttons:Ext.Msg.OK,icon:"iconInformation",});}}},failure:function(h,j){d.hide();var i=Ext.decode(j.response.responseText);Ext.Msg.show({title:SNMPUtilTitle,msg:"Failed to get subtree",buttons:Ext.Msg.OK,icon:"iconInformation",});
}});}},snmpWalk:function(g){var c=func.isSNMPParamsValidate();var f=true;if(c.startsWith("false~@~")){f=false;}if(f){var a="Trying to get the output from the agent. This may take a few minutes.";var d=new Ext.LoadMask(Ext.getCmp("utilWins"),{msg:a});d.show();var e=c.substring(c.indexOf("~@~")+3);Ext.Ajax.request({url:"/final/admin/SnmpGetSubtree/data/EgSnmpWalkJson.jsp?",timeout:60000000,waitTitle:SNMPUtilTitle,params:e,success:function(h){d.hide();
var j=Ext.decode(h.responseText);if(j.success){if(j.isLinuxAgenUsed==false){var i=j.resultWalkArr;if(!Ext.isEmpty(i)){Ext.widget("window",{title:screenLabelMsg23,width:800,height:500,id:"walkFile",padding:"5 10 10 10",name:"walkFile",resizable:"false",autoScroll:true,layout:"fit",items:[{xtype:"multiselect",id:"walkResultCombo",name:"walkResultCombo",displayField:"displayField",valueField:"valueField",queryMode:"local",editable:false,parent:this,store:new Ext.data.Store({fields:["displayField","valueField"],data:i,})}],dockedItems:[{xtype:"toolbar",dock:"bottom",layout:{type:"hbox",pack:"center"},padding:10,ui:"toolbarBgWithTopBorder",items:[{xtype:"button",ui:"newButtonSmall",text:"Save",width:80,id:"walksavebtn",name:"walksavebtn",labelStyle:"font-weight:bold",handler:function(o,r){var q=Ext.getCmp("walkResultCombo");
var k=q.getStore().getCount();console.log("Store",k);if(k>0){var m="SNMPWalk";for(var n=0;n<k;n++){var p=q.getStore().getAt(n).get("valueField");m=m+"~!~"+p;}}postCustomFormSubmit(m);}},{xtype:"button",ui:"newButtonSmall",text:"Close",width:80,id:"closebt",name:"closebtn",margin:"0 0 0 20",labelStyle:"font-weight:bold",handler:function(){Ext.getCmp("walkFile").close();
}}]}],listeners:{}}).show();}else{Ext.Msg.show({title:SNMPUtilTitle,msg:"No data found",buttons:Ext.Msg.OK,icon:"iconInformation"});}}else{Ext.Msg.show({title:SNMPUtilTitle,msg:"SNMP walk is not supported in Linux",buttons:Ext.Msg.OK,icon:"iconInformation",});}}else{Ext.Msg.show({title:SNMPUtilTitle,msg:"Failed to get SNMP Walk",buttons:Ext.Msg.OK,icon:"iconInformation",});
}},failure:function(h,j){d.hide();var i=Ext.decode(j.response.responseText);Ext.Msg.show({title:SNMPUtilTitle,msg:"Failed to get SNMP Walk",buttons:Ext.Msg.OK,icon:"iconInformation",});}});}},isSNMPParamsValidate:function(){var D=Ext.getCmp("installedagent").getValue();var a="installedagent="+D;var C=Ext.ComponentQuery.query("#snmphost")[0];
var n=C.getValue();if(n==""){Ext.Msg.show({title:SNMPUtilTitle,msg:alertMsg05,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){C.focus();}});return"false~@~"+a;}else{if(!validateIp(n,C)){return"false"+a;}}a+="&snmphost="+n;var k=Ext.ComponentQuery.query("#snmpport")[0];var h=k.getValue();if(h==""){Ext.Msg.show({title:SNMPUtilTitle,msg:alertMsg06,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){k.focus();
}});return"false~@~"+a;}a+="&snmpport="+h;var t=Ext.ComponentQuery.query("#snmpversion")[1];if(Ext.isEmpty(t)){t=Ext.ComponentQuery.query("#snmpversion")[0];}var c=t.getValue();a+="&snmpversion="+c;if(!Ext.isEmpty(c)&&c!="v3"){var s=Ext.ComponentQuery.query("#snmpcommunity")[0];var u=s.getValue();if(Ext.isEmpty(u)){Ext.Msg.show({title:SNMPUtilTitle,msg:alertMsg07,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){s.focus();
}});return"false~@~"+a;}else{if(u.indexOf('"')>-1||u.indexOf("|")>-1){Ext.Msg.show({title:SNMPUtilTitle,msg:_snmpcomma,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){s.focus();}});return"false~@~"+a;}}a+="&snmpcommunity="+u;}else{var A=Ext.ComponentQuery.query("#snmpcontext")[0];var e=A.getValue();
if(e==""){Ext.Msg.show({title:SNMPUtilTitle,msg:alertMsg08,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){A.focus();}});return"false~@~"+a;}a+="&context="+e;var o=Ext.ComponentQuery.query("#snmpusername")[0];var i=o.getValue();if(i==""){Ext.Msg.show({title:SNMPUtilTitle,msg:alertMsg09,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){o.focus();
}});return"false~@~"+a;}a+="&username="+i;var q=Ext.ComponentQuery.query("#snmpauthpass")[0];var x=q.getValue();if(x==""){Ext.Msg.show({title:SNMPUtilTitle,msg:alertSnmpMsg10,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){q.focus(true);}});return"false~@~"+a;}else{if(!checkspecialnomess(x,"|")){Ext.Msg.show({title:SNMPUtilTitle,msg:PwdNotContainPipe,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("authpass").focus(true);
}});return"false~@~"+a;}}var z=Ext.ComponentQuery.query("#snmpauthpassconfirmpassword")[0];var p=z.getValue();if(p==""){Ext.Msg.show({title:SNMPUtilTitle,msg:alertSnmpMsg11,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){z.focus(true);}});return"false~@~"+a;}else{if(x!=p){Ext.Msg.show({title:SNMPUtilTitle,msg:alertSnmpMsg12,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("authpassconfirmpassword").focus(true);
}});return"false~@~"+a;}}a+="&authpass="+x;var j=Ext.ComponentQuery.query("#snmpauthtype")[0];var v=j.getValue();a+="&authtype="+v;var E=Ext.getCmp("snmpencryptflagyes").getValue();if(E){a+="&encryptflag=1";}else{a+="&encryptflag=2";}if(E){var d=Ext.ComponentQuery.query("#snmpencrypttype")[0];var g=d.getValue();
a+="&encrypttype="+g;var B=Ext.ComponentQuery.query("#snmpencryptpassword")[0];var r=B.getValue();if(r==""){Ext.Msg.show({title:SNMPUtilTitle,msg:alertSnmpMsg14,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){B.focus(true);}});return"false~@~"+a;}else{if(!checkspecialnomess(r,"|")){Ext.Msg.show({title:SNMPUtilTitle,msg:PwdNotContainPipe,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){B.focus(true);
}});return"false~@~"+a;}}var y=Ext.ComponentQuery.query("#snmpencryptpasswordconfirmpassword")[0];var f=y.getValue();if(f==""){Ext.Msg.show({title:SNMPUtilTitle,msg:alertSnmpMsg15,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){y.focus(true);}});return"false~@~"+a;}else{if(r!=f){Ext.Msg.show({title:SNMPUtilTitle,msg:alertMsg12,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){y.focus(true);
}});return"false~@~"+a;}}a+="&encryptpassword="+r;}}var w=Ext.getCmp("oidvalue").getValue();if(w==""){Ext.Msg.show({title:SNMPUtilTitle,msg:alertSnmpMsg13,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("oidvalue").focus();}});return"false~@~"+a;}a+="&oidvalue="+w;var m=Ext.getCmp("utildatatcpyes").getValue();
if(m){m="1";}else{m="2";}a+="&dataovertcp="+m;return"true~@~"+a;},showMibTree:function(e,d){var c="showMibFilesJson.jsp?from="+e+"&fieldName="+d;Ext.Ajax.request({url:"SnmpGetSubtree/data/"+c,method:"POST",async:false,success:function(f){if(f.status==200&&!Ext.isEmpty(f.responseText)){var g=f.responseText;
mibJSON=Ext.decode(g);}}});var a=this;Ext.create("Ext.window.Window",{height:500,width:800,title:"MIB Tree",id:"mibWindow",layout:{type:"hbox",pack:"center",align:"stretch"},padding:"5 10 10 10",listeners:{close:function(){Ext.Ajax.request({url:"SnmpGetSubtree/data/snmphelpJson.jsp?selectTab=addMeasureTab&testType=Snmp",method:"POST"});
}},dockedItems:[{xtype:"toolbar",dock:"bottom",layout:{type:"hbox",pack:"center"},padding:10,ui:"toolbarBgWithTopBorder",items:[{xtype:"button",text:"OK",id:"ok",name:"ok",width:80,ui:"newButtonSmall",listeners:{el:{click:function(){var g=Ext.getCmp("objOid").getValue();if(d=="ObjectOID"){var f=Ext.getCmp("modScriptMeasureWindow");
if(f!=undefined||f!=null){var i=Ext.getCmp("measureform").getForm().findField("fileName").getValue();var h=Ext.getCmp("fileList").getValue();if(h!=null&&i!==h){Ext.getCmp("measureform").getForm().findField("fileName").setValue(h);}}else{Ext.getCmp("oidvalue").setValue(g);}}else{if(d=="ElementOID"){Ext.getCmp("elementOid").setValue(g);
}else{if(d=="StatusOID"){Ext.getCmp("validOid").setValue(g);}}}Ext.getCmp("mibWindow").close();}}}}]}],items:[{xtype:"container",border:true,cls:"border-theme",layout:{type:"vbox",align:"stretch"},flex:0.5,margin:"5 0 5 5",items:[{xtype:"fieldcontainer",layout:"column",margin:5,items:[{xtype:"combo",cls:"dropdown",id:"fileList",name:"fileList",fieldLabel:"MIB Files",store:new Ext.data.Store({fields:["displayField","valueField"],data:[]}),displayField:"displayField",valueField:"valueField",queryMode:"local",labelSeparator:"",editable:false,labelWidth:60,listeners:{select:{fn:function(f){a.mibFileSelection(e,d,true);
}}},columnWidth:0.9},{xtype:"button",iconCls:"iconUpload",columnWidth:0.1,border:0,style:{"background":"none"},tooltip:"Upload",margin:"0 0 0 10",listeners:{click:{fn:function(){a.uploadMibFile(e,d);}}},}]},{xtype:"fieldcontainer",id:"treepanalCntnr",layout:{type:"vbox",align:"stretch"},border:1,cls:"border-theme",margin:"0 5 5 5",flex:1},{xtype:"textfield",fieldLabel:"OID",cls:"textbox",id:"objOid",labelSeparator:"",labelWidth:60,margin:"0 5 5 5"}]},{xtype:"container",border:true,cls:"border-theme",flex:0.5,layout:{type:"hbox",align:"stretch"},margin:"5 5 5 5",items:[{xtype:"container",id:"displayFieldCntnr",layout:{type:"vbox",align:"stretch"},defaults:{labelSeparator:"",labelAlign:"top",readOnly:true},flex:1,hidden:true,items:[{xtype:"textfield",fieldLabel:"Name",id:"name",margin:"9 5 5 5",cls:"textbox"},{xtype:"textarea",fieldLabel:"Fullname",id:"fullname",margin:"5 5 5 5",cls:"text-area"},{xtype:"fieldcontainer",layout:"column",defaults:{labelSeparator:"",columnWidth:0.5,labelAlign:"top",readOnly:true},margin:"5 5 5 5",items:[{xtype:"textfield",fieldLabel:"Access",id:"access",cls:"textbox"},{xtype:"textfield",fieldLabel:"Syntax",id:"syntax",margin:"0 0 0 5",cls:"textbox"}]},{xtype:"fieldcontainer",layout:"column",defaults:{labelSeparator:"",columnWidth:0.33,labelAlign:"top",readOnly:true},margin:"5 5 5 5",items:[{xtype:"textfield",fieldLabel:"Status",id:"status",columnWidth:0.34,cls:"textbox"},{xtype:"textfield",fieldLabel:"IsIndexNode",id:"isIndexNode",margin:"0 0 0 5",cls:"textbox"},{xtype:"textfield",fieldLabel:"IsV2Trap",id:"isV2Trap",margin:"0 0 0 5",cls:"textbox"}]},{xtype:"textarea",fieldLabel:"Description",id:"description",margin:"5 5 5 5",cls:"text-area",rows:6}]}]}]}).show();
Ext.getCmp("fileList").getStore().loadRawData(mibJSON.mibFilesList);Ext.getCmp("fileList").setValue("-1");},uploadMibFile:function(d,c){var a=this;Ext.widget("window",{id:"file",name:"file",resizable:"false",extend:"utilities.GenericWindow",padding:"5 10 10 10",header:{margin:"5 5 5 5"},items:[{xtype:"form",id:"uploadform",name:"uploadform",url:"../servlet/com.eg.EgUploadServlet",margin:"0 0 10 0",items:[{xtype:"fileuploadfield",cls:"fileupload",id:"file1",name:"file1",labelSeparator:"",emptyText:"No File Selected",fieldLabel:"Choose File",labelAlign:"top",width:290,buttonText:"Browse",margin:"15 15 10 15",}]}],dockedItems:[{xtype:"toolbar",dock:"bottom",padding:10,layout:{type:"hbox",pack:"center"},ui:"toolbarBgWithTopBorder",items:[{xtype:"button",text:"upload",id:"upload",name:"upload",action:"upload",ui:"newButtonSmall",handler:function(h,k){var j=Ext.getCmp("uploadform").getForm().findField("file1").getValue();
var o=j.lastIndexOf("fakepath");if(o>0){j=j.substring(o+9);}var g="";var i=j.lastIndexOf(".");if(i>0){g=j.substring(i);}g=g.toLowerCase();var m=true;if(!validateSingleByte(j)){Ext.Msg.show({title:titleMsg,msg:alertMsg01,buttons:Ext.Msg.OK,icon:"iconExclamation"});Ext.getCmp("file1").focus(true);m=false;
}else{if(j==""){Ext.Msg.show({title:titleMsg,msg:alertMsg02,buttons:Ext.Msg.OK,icon:"iconExclamation"});Ext.getCmp("file1").focus(true);m=false;}else{if(g!=".txt"&&g!=".mib"){Ext.Msg.show({title:titleMsg,msg:alertMsg04,buttons:Ext.Msg.OK,icon:"iconExclamation"});Ext.getCmp("file1").focus(true);m=false;
}}}if(!m){return false;}else{if(mibJSON.existingFiles.indexOf(j)!=-1){Ext.Msg.show({title:titleMsg,msg:alertMsg03,buttons:Ext.Msg.OKCANCEL,icon:"iconConfirmation",fn:function(n){if(n=="ok"){var e=Ext.getCmp("uploadform").getForm();if(e.isValid()){e.submit({method:"POST",success:function(p,r){var q=r.response.responseText;
var s=Ext.decode(q);if(!Ext.isEmpty(s.uploadStatus)&&s.uploadStatus=="true"){h.up(".window").close();Ext.Msg.show({title:titleMsg,msg:alertSnmpMsg16,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(t){if(t=="ok"){Ext.getCmp("mibWindow").close();a.showMibTree(d,c);}}});}else{Ext.Msg.show({title:titleMsg,msg:s.statusMsg,buttons:Ext.Msg.OK,icon:"iconInformation"});
}},failure:function(p,q){Ext.Msg.show({title:titleMsg,msg:alertMsg17+". "+alertMsg18,buttons:Ext.Msg.OK,icon:"iconExclamation"});}});}}else{h.up(".window").close();}}});}else{var f=Ext.getCmp("uploadform").getForm();if(f.isValid()){f.submit({method:"POST",success:function(e,p){var n=p.response.responseText;
var q=Ext.decode(n);if(!Ext.isEmpty(q.uploadStatus)&&q.uploadStatus=="true"){h.up(".window").close();Ext.Msg.show({title:titleMsg,msg:alertSnmpMsg16,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(r){if(r=="ok"){Ext.getCmp("mibWindow").close();a.showMibTree(d,c);}}});}else{Ext.Msg.show({title:titleMsg,msg:q.statusMsg,buttons:Ext.Msg.OK,icon:"iconExclamation"});
}},failure:function(e,n){Ext.Msg.show({title:titleMsg,msg:alertMsg17+". "+alertMsg18,buttons:Ext.Msg.OK,icon:"iconExclamation"});}});}}}}}],listeners:{afterrender:function(){var e=Ext.getCmp("uploadform");e.add({xtype:"hidden",name:"uploadMIB",value:"true"});e.add({xtype:"hidden",name:"fromMIBBrowser",value:"true"});
e.add({xtype:"hidden",name:"comeFrom",value:"icMIB"});},}}]}).show();},mibFileSelection:function(i,j,f,c){var e="";var h=false;var g=Ext.getCmp("fileList").getValue();if(j=="ElementOID"){selElmtFile=g;elmtFldName=j;}else{if(j=="StatusOID"){selStusFile=g;stusFldName=j;}else{selMibFile=g;oidFldName=j;}}var a="mibTree.jsp?MibFileName="+g+"&fieldName="+j+"&from="+i+"&expanded="+h;
if(g!="-1"){var d=Ext.create("Ext.data.TreeStore",{fields:[{name:"text",type:"string"},{name:"leaf",type:"boolean"},{name:"expanded",defaultValue:true},{name:"id",type:"string"},{name:"name",type:"string"},{name:"fullName",type:"string"},{name:"syntax",type:"string"},{name:"access",type:"string"},{name:"status",type:"string"},{name:"isIndexNode",type:"boolean"},{name:"isV2Trap",type:"boolean"},{name:"description",type:"string"},]});
Ext.Ajax.request({url:a,success:function(k){var p=Ext.decode(k.responseText);if(p.jsonarray==null||p.jsonarray.length>0){d.setRootNode({text:"MIB Tree",id:"",iconCls:"iconTree",expandable:false,children:p.jsonarray});Ext.getCmp("treepanalCntnr").show();Ext.getCmp("displayFieldCntnr").show();Ext.getCmp("objOid").show();
Ext.getCmp("treepanalCntnr").removeAll();var o=Ext.create("Ext.tree.Panel",{flex:1,cls:"treePanelDesign",rootVisible:true,animate:false,store:d,listeners:{itemclick:function(r,q){if(q.get("id")!=""){Ext.getCmp("objOid").setValue(q.get("id"));Ext.getCmp("name").setValue(q.get("name"));Ext.getCmp("fullname").setValue(q.get("fullName"));
Ext.getCmp("syntax").setValue(q.get("syntax"));Ext.getCmp("access").setValue(q.get("access"));Ext.getCmp("status").setValue(q.get("status"));Ext.getCmp("isIndexNode").setValue(q.get("isIndexNode"));Ext.getCmp("isV2Trap").setValue(q.get("isV2Trap"));Ext.getCmp("description").setValue(q.get("description"));
}}}});Ext.getCmp("treepanalCntnr").add(o);if(e!=""){Ext.getCmp("objOid").setValue("");Ext.getCmp("name").setValue("");Ext.getCmp("fullname").setValue("");Ext.getCmp("syntax").setValue("");Ext.getCmp("access").setValue("");Ext.getCmp("status").setValue("");Ext.getCmp("isIndexNode").setValue("");Ext.getCmp("isV2Trap").setValue("");
Ext.getCmp("description").setValue("");}}else{var m="Invalid MIB file";if(!Ext.isEmpty(p.validMsg)){m=p.validMsg;}Ext.getCmp("treepanalCntnr").show();Ext.getCmp("treepanalCntnr").removeAll();var n=Ext.create("Ext.container.Container",{html:"<table align='center'><tr height=150><td valign='bottom' align='center'><div class='iconInformation'/></td></tr><tr><td valign='top' align='center'>"+m+"</td></tr></table>",});
Ext.getCmp("objOid").setValue("");Ext.getCmp("treepanalCntnr").add(n);Ext.getCmp("displayFieldCntnr").hide();}}});}else{Ext.getCmp("objOid").hide();Ext.getCmp("treepanalCntnr").hide();Ext.getCmp("displayFieldCntnr").hide();}},snmpVersionChange:function(f){var d=Ext.ComponentQuery.query("#snmpversion")[1];
if(Ext.isEmpty(d)){d=Ext.ComponentQuery.query("#snmpversion")[0];}var a=Ext.ComponentQuery.query("#snmpcommunity")[0];var c=d.getValue();if(!Ext.isEmpty(c)&&c!=undefined&&c=="v3"){a.hide();a.setDisabled(true);var h=Ext.ComponentQuery.query("#snmpcontext")[0];h.setDisabled(false);h.show();var i=Ext.ComponentQuery.query("#snmpusername")[0];
i.setDisabled(false);i.show();var k=Ext.ComponentQuery.query("#snmpauthpass")[0];k.setDisabled(false);k.show();var g=Ext.ComponentQuery.query("#snmpauthpassconfirmpassword")[0];g.setDisabled(false);g.show();var e=Ext.ComponentQuery.query("#snmpauthtype")[0];e.setDisabled(false);e.show();var j=Ext.ComponentQuery.query("#snmpencryptflag")[0];
j.setDisabled(false);j.show();func.changeEncFlagValue();}else{if(!Ext.isEmpty(c)&&(c=="v1"||c=="v2")){a.show();a.setDisabled(false);func.snmpUtilV3ParamDisabeld(f);}}},changeEncFlagValue:function(d){var c=Ext.getCmp("snmpencryptflagyes").getValue();var f=Ext.ComponentQuery.query("#snmpencrypttype")[0];
var e=Ext.ComponentQuery.query("#snmpencryptpassword")[0];var a=Ext.ComponentQuery.query("#snmpencryptpasswordconfirmpassword")[0];if(c==false){f.setDisabled(true);f.hide();e.setDisabled(true);e.hide();a.setDisabled(true);a.hide();}else{f.setDisabled(false);f.show();e.setDisabled(false);e.show();a.setDisabled(false);
a.show();}},snmpUtilV3ParamDisabeld:function(d){var h=Ext.ComponentQuery.query("#snmpcontext")[0];h.setDisabled(true);h.hide();var j=Ext.ComponentQuery.query("#snmpusername")[0];j.setDisabled(true);j.hide();var k=Ext.ComponentQuery.query("#snmpauthpass")[0];k.setDisabled(true);k.hide();var g=Ext.ComponentQuery.query("#snmpauthpassconfirmpassword")[0];
g.setDisabled(true);g.hide();var c=Ext.ComponentQuery.query("#snmpauthtype")[0];c.setDisabled(true);c.hide();var a=Ext.ComponentQuery.query("#snmpencrypttype")[0];a.setDisabled(true);a.hide();var e=Ext.ComponentQuery.query("#snmpencryptflag")[0];e.setDisabled(true);e.hide();var i=Ext.ComponentQuery.query("#snmpencryptpassword")[0];
i.setDisabled(true);i.hide();var f=Ext.ComponentQuery.query("#snmpencryptpasswordconfirmpassword")[0];f.setDisabled(true);f.hide();},configHorizonMultiUsers:function(c){Ext.create("SpecificTestConfiguration.view.HorizonCloudMultipleUsers").show();var n="";inputsmulti=2;ismulti="false";var a=Ext.getCmp("Connection_server_name").getValue();
var j=Ext.getCmp("Domain_name").getValue();var i=Ext.getCmp("User_name").getValue();var f=Ext.getCmp("Password").getValue();var m=a.split(",");var g=j.split(",");var h=i.split(",");var d=f.split("#~#");if(j!=null||j!=undefined){for(var e=0;e<g.length-1;e++){addHorizonMultiSet();}for(n=1;n<g.length+1;
n++){Ext.getCmp("servnamemultiusr"+n).setValue(m[n-1]);Ext.getCmp("domainmultiusr"+n).setValue(g[n-1]);Ext.getCmp("usermultiusr"+n).setValue(h[n-1]);Ext.getCmp("pwdmultiusr"+n).setValue(d[n-1]);Ext.getCmp("confpwdmultiusr"+n).setValue(d[n-1]);Ext.getCmp("pwdmultiusr"+n).backupValue=d[n-1];Ext.getCmp("confpwdmultiusr"+n).backupValue=d[n-1];
}}Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egconfiguremultipleusers",method:"POST",async:false});},clearHorizonCloudMultiSet:function(a){var c=Ext.getCmp("backupmulticontainer");c.removeAll();Ext.getCmp("addServersMultiSet").setText("Add");Ext.getCmp("NoServersPattern").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("updateServersMultiSet").disable();Ext.getCmp("clearServersMultiSet").disable();},updateHorizonCloudMultiSet:function(m){var a=inputsmulti;
for(var r=1;r<a-1;r++){if(Ext.getCmp("domainmultiusr"+r)==undefined){continue;}var p=Ext.getCmp("servnamemultiusr"+r).getValue();var z=Ext.getCmp("domainmultiusr"+r).getValue();var f=Ext.getCmp("usermultiusr"+r).getValue();var c=Ext.getCmp("pwdmultiusr"+r).getValue();var x=Ext.getCmp("confpwdmultiusr"+r).getValue();
if(!checkblank(p)){Ext.Msg.show({title:multiServersTitle,msg:enterServname,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("servnamemultiusr"+r).focus(true);}});return;}else{if(!validateIpOrHNameExt(multiServersTitle,Ext.getCmp("servnamemultiusr"+r))){Ext.getCmp("servnamemultiusr"+r).focus();
return;}}if(!checkblank(z)){Ext.Msg.show({title:multiServersTitle,msg:enterDomain,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+r).focus(true);}});return;}if(!checkDomain(z,"true")){Ext.getCmp("domainmultiusr"+r).focus(true);return;}else{if(z.indexOf(",")>-1){Ext.Msg.show({title:multiServersTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+r).focus(true);
}});return;}else{if(!checkHyphenText(z,z)){Ext.getCmp("domainmultiusr"+r).focus();return;}else{if(z.indexOf("..")>-1){Ext.Msg.show({title:multiServersTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+r).focus(true);}});return;}}}}if(!checkblank(f)){Ext.Msg.show({title:multiServersTitle,msg:enterUsrId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+r).focus(true);
}});return;}else{if(f.indexOf("$unconfigured")>-1){Ext.Msg.show({title:multiServersTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+r).focus(true);}});return;}else{if(!checkspecial(f,"@*+=|:;\"'<>/[]?,")){Ext.getCmp("usermultiusr"+r).focus();
return;}else{if(trim(f)==""){Ext.getCmp("usermultiusr"+r).focus();return;}else{if(!checkHyphenText(f,f)){Ext.getCmp("usermultiusr"+r).focus();return;}else{if(f.indexOf("..")>-1){Ext.Msg.show({title:multiServersTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+r).focus(true);
}});return;}else{if(f.indexOf("  ")>-1){Ext.Msg.show({title:multiServersTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+r).focus(true);}});return;}}}}}}}if(c==""){Ext.Msg.show({title:multiServersTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+r).focus(true);
}});sub=false;return;}else{if(c.indexOf("$unconfigured")>-1){Ext.Msg.show({title:multiServersTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+r).focus(true);}});return;}else{if(c.indexOf("#~#")>-1){Ext.Msg.show({title:multiServersTitle,msg:_checkHashTildeHash,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+r).focus(true);
}});sub=false;return;}else{if(!checkForPassValidity(c)){Ext.getCmp("pwdmultiusr"+r).focus();sub=false;return;}else{if(x==""){Ext.Msg.show({title:multiServersTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+r).focus(true);}});sub=false;return;}else{if(x.indexOf("$unconfigured")>-1){Ext.Msg.show({title:multiServersTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+r).focus(true);
}});return;}else{if(c!=x){Ext.Msg.show({title:multiServersTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+r).focus(true);}});sub=false;return;}}}}}}}}var e="";var n="";var w="";var s="";for(var d=1;d<a;d++){if(Ext.getCmp("domainmultiusr"+d)==undefined){continue;
}var j=Ext.getCmp("servnamemultiusr"+d).getValue();if(j==null){continue;}if(j!=null){if(!checkblank(j)){Ext.Msg.show({title:multiServersTitle,msg:enterServname,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("servnamemultiusr"+d).focus(true);}});return;}else{if(!validateIpOrHNameExt(multiServersTitle,Ext.getCmp("servnamemultiusr"+d))){Ext.getCmp("servnamemultiusr"+d).focus();
return;}}}var u=Ext.getCmp("domainmultiusr"+d).getValue();if(u==null){continue;}if(u!=null){if(!checkDomain(u,"true")){Ext.getCmp("domainmultiusr"+d).focus(true);return;}else{if(u.indexOf(",")>-1){Ext.Msg.show({title:multiServersTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+d).focus(true);
}});return;}else{if(u.indexOf("..")>-1){Ext.Msg.show({title:multiServersTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+d).focus(true);}});return;}else{if(!checkHyphenText(u,u)){Ext.getCmp("domainmultiusr"+d).focus();return;}}}}}var o=Ext.getCmp("usermultiusr"+d).getValue();
if(o!=null){if(!checkblank(o)){Ext.Msg.show({title:multiServersTitle,msg:enterUsr,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+d).focus(true);}});return;}else{if(o.indexOf("$unconfigured")>-1){Ext.Msg.show({title:multiServersTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+d).focus(true);
}});return;}else{if(!checkspecial(o,"@*+=|:;\"'<>/[]?,")){Ext.getCmp("usermultiusr"+d).focus();return;}else{if(trim(o)==""){Ext.getCmp("usermultiusr"+d).focus();return;}else{if(o.indexOf("..")>-1){Ext.Msg.show({title:multiServersTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+d).focus(true);
}});return;}else{if(o.indexOf("  ")>-1){Ext.Msg.show({title:multiServersTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+d).focus(true);}});return;}else{if(!checkHyphenText(o,o)){Ext.getCmp("usermultiusr"+d).focus();return;}}}}}}}}var y=Ext.getCmp("pwdmultiusr"+d).getValue();
var i=Ext.getCmp("confpwdmultiusr"+d).getValue();if(y!=null&&i!=null){if(y==""){Ext.Msg.show({title:multiServersTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+d).focus(true);}});return;}else{if(y.indexOf("$unconfigured")>-1){Ext.Msg.show({title:multiServersTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+d).focus(true);
}});return;}else{if(y.indexOf("#~#")>-1){Ext.Msg.show({title:multiServersTitle,msg:_checkHashTildeHash,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+d).focus(true);}});sub=false;return;}else{if(!checkForPassValidity(y)){Ext.getCmp("pwdmultiusr"+d).focus();sub=false;
return;}else{if(i==""){Ext.Msg.show({title:multiServersTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+d).focus(true);}});return;}else{if(i.indexOf("$unconfigured")>-1){Ext.Msg.show({title:multiServersTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+d).focus(true);
}});return;}else{if(y!=i){Ext.Msg.show({title:multiServersTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+d).focus(true);}});return;}}}}}}}}if(j!=null&&u!=null&&o!=null&&y!=null&&i!=null){var v=Ext.getCmp("servnamemultiusr"+d).getValue();e+=v+",";
var k=Ext.getCmp("domainmultiusr"+d).getValue();n+=k+",";var t=Ext.getCmp("usermultiusr"+d).getValue();w+=t+",";var g=Ext.getCmp("pwdmultiusr"+d).getValue();s+=g+"#~#";}}e=e.substring(0,e.length-1);Ext.getCmp("Connection_server_name").setValue(e);n=n.substring(0,n.length-1);Ext.getCmp("Domain_name").setValue(n);
w=w.substring(0,w.length-1);Ext.getCmp("User_name").setValue(w);s=s.substring(0,s.length-3);Ext.getCmp("Password").setValue(s);Ext.getCmp("Password").backupValue=s;if(!Ext.isEmpty(Ext.getCmp("Passwordconfirmpassword"))){Ext.getCmp("Passwordconfirmpassword").setValue(s);Ext.getCmp("Passwordconfirmpassword").backupValue=s;
Ext.getCmp("Passwordconfirmpassword").setReadOnly(true);}Ext.getCmp("Connection_server_name").setReadOnly(true);Ext.getCmp("Domain_name").setReadOnly(true);Ext.getCmp("User_name").setReadOnly(true);Ext.getCmp("Password").setReadOnly(true);Ext.getCmp("horizoncloudmultipleusers").destroy();var h=Ext.getCmp("componentType").getValue();
var q=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(h)+"&componentType="+encodeURIComponent(h)+"&tName_HelpPage="+q+"&testName="+q,method:"POST"});},getShareFolders:function(){Ext.create("SpecificTestConfiguration.view.ShareFoldersConfiguration").show();
var a=new Ext.LoadMask(Ext.getCmp("sharefoldersconfiguration"),{msg:"Trying to collect shared folders from the agent..."});a.show();var d=Ext.getCmp("Shared_folders").getValue();processCompName=Ext.getCmp("componentName").getValue();var c="SpecificTestConfiguration/data/agentShareFoldderListJson.jsp?componentName="+processCompName+"&configuredFolders="+encodeURI(d)+"&shareFoldersFullList="+encodeURI(sharedFoldersFullList);
Ext.Ajax.request({url:c,timeout:600000000,method:"POST",success:function(e){var i=e.responseText;publicSharedJson=Ext.decode(i);if(!Ext.isEmpty(i)&&e.status==200){var h=publicSharedJson["fromFieldDataArr"];var g=publicSharedJson["toFieldDataArr"];if(publicSharedJson.timedout){if(!Ext.isEmpty(d)){Ext.getCmp("submitShareFolderBtn").show();
}else{Ext.getCmp("submitShareFolderBtn").hide();}var j=publicSharedJson.errors;var f=func.getErrorMessageTemplate();func.showResultWindow(pageName,f.apply(j));}else{Ext.getCmp("noShareFolderContainer").hide();Ext.getCmp("submitShareFolderBtn").show();Ext.getCmp("sharefolderslist").show();maskObj=Ext.getCmp("sharefolderslist");
if(!Ext.isEmpty(publicSharedJson.sharedFoldersFullList)){sharedFoldersFullList=publicSharedJson.sharedFoldersFullList;}Ext.getCmp("sharefolderslist").fromField.getStore().removeAll();Ext.getCmp("sharefolderslist").toField.getStore().removeAll();maskObj.fromField.getStore().loadRawData(h);maskObj.toField.getStore().loadRawData(g);
}}a.hide();}});},getErrorMessageTemplate:function(){var a=new Ext.XTemplate('<div class="plainTable plainTableShadow">','<table cellspacing="0" width="100%" cellpadding="0" border="0" ><col width="200px"><col width="70%">',"<thead>","<tr>",'<th colspan="2">Error : '+sharefolderLbl7+"</th>","</tr>","</thead>","<tbody>",'<tpl for=".">',"<tr>",'<td class="font_bold11">'+sharefolderLbl8+"</td>","<td>{DESCRIPTION}</td>","</tr>","</tpl>","</tbody>","</table>","</div>");
return a;},showResultWindow:function(c,a){Ext.widget("window",{title:c,closeAction:"destory",bodyPadding:20,scroll:true,width:600,modal:true,autoScroll:true,doClose:function(){this.destroy();},html:a}).show();},getUpdateShares:function(){var a=new Ext.LoadMask(Ext.getCmp("sharefoldersconfiguration"),{msg:"Trying to collect latest shared folders from the agent..."});
a.show();var d=Ext.getCmp("Shared_folders").getValue();processCompName=Ext.getCmp("componentName").getValue();var c="SpecificTestConfiguration/data/agentShareFoldderListJson.jsp?from=getShareBtn&componentName="+processCompName+"&configuredFolders="+encodeURI(d);Ext.Ajax.request({url:c,timeout:600000000,method:"POST",success:function(e){var i=e.responseText;
publicSharedJson=Ext.decode(i);if(!Ext.isEmpty(i)&&e.status==200){var h=publicSharedJson["fromFieldDataArr"];var g=publicSharedJson["toFieldDataArr"];if(publicSharedJson.timedout){if(Ext.isEmpty(d)){Ext.getCmp("submitShareFolderBtn").hide();}var j=publicSharedJson.errors;var f=func.getErrorMessageTemplate();
func.showResultWindow(pageName,f.apply(j));}else{Ext.getCmp("noShareFolderContainer").hide();Ext.getCmp("submitShareFolderBtn").show();Ext.getCmp("sharefolderslist").show();maskObj=Ext.getCmp("sharefolderslist");if(!Ext.isEmpty(publicSharedJson.sharedFoldersFullList)){sharedFoldersFullList=publicSharedJson.sharedFoldersFullList;
}Ext.getCmp("sharefolderslist").fromField.getStore().removeAll();Ext.getCmp("sharefolderslist").toField.getStore().removeAll();maskObj.fromField.getStore().loadRawData(h);maskObj.toField.getStore().loadRawData(g);}}a.hide();}});},submitShareFolders:function(){var e=Ext.getCmp("sharefolderslist").fromField.store.getCount();
var a=new Array();for(var d=0;d<e;d++){var f=Ext.getCmp("sharefolderslist").fromField.store.getAt(d).get("valueField");a[a.length]=f;}var c="";for(d=0;d<a.length;d++){if(d==0){c=a[d];}else{c+="~|~"+a[d];}}Ext.getCmp("Shared_folders").setValue(c);Ext.getCmp("sharefoldersconfiguration").destroy();Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=processconfiguration",method:"POST",async:false});
},excludeInfConfigs:function(j){rptNam=j;var a=Ext.getCmp("host").getValue();var c=Ext.getCmp("snmpPort").getValue();var f=Ext.getCmp("snmpCommunity").getValue();var h=Ext.getCmp("snmpversion").getValue();var g=Ext.getCmp("timeout").getValue();var d=Ext.getCmp("Exclude_Interfaces").getValue();var i=Ext.getCmp("componentName").getValue();
if(Ext.isEmpty(a)||a==undefined){Ext.Msg.show({title:"EXCLUDE INTERFACES",msg:"Please provide host details",buttons:Ext.Msg.OK,icon:"iconExclamation"});return false;}if(Ext.isEmpty(c)||c==undefined||Ext.isEmpty(h)||h==undefined||Ext.isEmpty(f)||f==undefined||f=="$unconfigured"){Ext.Msg.show({title:"EXCLUDE INTERFACES",msg:"Please provide SNMP details",buttons:Ext.Msg.OK,icon:"iconExclamation"});
return false;}if(Ext.isEmpty(g)||g==undefined){Ext.Msg.show({title:"EXCLUDE INTERFACES",msg:"Please provide timeout details",buttons:Ext.Msg.OK,icon:"iconExclamation"});return false;}Ext.create("SpecificTestConfiguration.view.ExcludeInterfaces").show();if(d=="none"){Ext.getCmp("exInfitemselect").fromField.getStore().removeAll();
Ext.getCmp("exInfitemselect").toField.getStore().removeAll();}else{var e="SpecificTestConfiguration/data/ExcludeInterfacesJson.jsp?";Ext.Ajax.request({url:e,url:e,params:{forFrmfieldLoad:d},method:"POST",timeout:120000000,success:function(k){if(k.status==200&&!Ext.isEmpty(k.responseText)){var n=k.responseText;
publicfrmFldJson=Ext.decode(n);var m=publicfrmFldJson["frmFldArr"];if(m.length!=0){Ext.getCmp("exInfitemselect").fromField.getStore().loadRawData(m);Ext.getCmp("exInfitemselect").toField.getStore().removeAll();}}}});}},getExcludInterfacs:function(){var p=Ext.getCmp("host").getValue();var h=Ext.getCmp("snmpPort").getValue();
var m=Ext.getCmp("snmpCommunity").getValue();var a=Ext.getCmp("snmpversion").getValue();var f=Ext.getCmp("timeout").getValue();var v=Ext.getCmp("Exclude_Interfaces").getValue();var u=Ext.getCmp("componentName").getValue();var r=Ext.getCmp("exInfitemselect").fromField.store.getCount();var c=new Array();
for(var q=0;q<r;q++){var k=Ext.getCmp("exInfitemselect").fromField.store.getAt(q).get("valueField");c[c.length]=k;}var g=Ext.getCmp("exInfitemselect").toField.store.getCount();var o=new Array();for(var j=0;j<g;j++){var e=Ext.getCmp("exInfitemselect").toField.store.getAt(j).get("valueField");o[o.length]=e;
}var d=new Ext.LoadMask(Ext.getCmp("excludeinterfaces"),{msg:"Trying to get interface information from the agent.This may take a few minutes."});d.show();var s=p+"~"+h+"~"+m+"~"+a+"~"+f+"~"+rptNam;var n="SpecificTestConfiguration/data/ExcludeInterfacesJson.jsp?";Ext.Ajax.request({url:n,params:{excludInfInput:s,exInfVal:v,componentName:u,usrHost:p},method:"POST",timeout:120000000,success:function(N){if(N.status==200&&!Ext.isEmpty(N.responseText)){d.hide();
var M=N.responseText;publicExInfJson=Ext.decode(M);var D=publicExInfJson["exInfFromArr"];if(D.length>0){var w=new Array();var I=new Array();for(var E=0;E<D.length;E++){var x=D[E].valueField;if(!Ext.isEmpty(x)){I[E]=x;}}if(!Ext.isEmpty(c)&&c.length!=0){for(var G=0;G<c.length;G++){var C=c[G];if(!Ext.isEmpty(I)&&Ext.Array.contains(I,C)){var y=I.indexOf(C);
I.splice(y,1);}}}if(!Ext.isEmpty(o)&&o.length!=0){for(var B=0;B<o.length;B++){var K=o[B];var A=false;if(!Ext.isEmpty(K)){for(var L=0;L<I.length;L++){if(I[L]==K){A=true;}}if(!A){I.push(K);}}}}for(var H=0;H<I.length;H++){var z=I[H];var F=z.split("#");var J={"groupField":F[2],"displayField":F[1],"valueField":z};
w.push(J);}if(w.length>0){Ext.getCmp("exInfitemselect").toField.getStore().removeAll();Ext.getCmp("exInfitemselect").toField.getStore().loadRawData(w);Ext.getCmp("exInfitemselect").toField.getStore().sort([{property:"groupField",direction:"ASC"},{property:"displayField",direction:"ASC"},{property:"valueField",direction:"ASC"}]);
}else{Ext.Msg.show({title:"EXCLUDE INTERFACE",msg:"No interfaces found for configuration ",buttons:Ext.Msg.OK,icon:"iconExclamation"});}}else{d.hide();Ext.Msg.show({title:"EXCLUDE INTERFACE",msg:"No interfaces found for configuration",buttons:Ext.Msg.OK,icon:"iconExclamation"});}}}});},getexInfacsSearch:function(){interfacSearchStr=Ext.getCmp("getInfacDetailSearch").getValue();
var a=Ext.getCmp("exInfitemselect");a.show();if(interfacSearchStr==""||interfacSearchStr.length==0){Ext.get("MyTrigger_0").setStyle("display","none");Ext.get("MyTrigger_1").setStyle("display","block");a.toField.getStore().clearFilter();}else{Ext.get("MyTrigger_1").setStyle("display","none");Ext.get("MyTrigger_0").setStyle("display","block");
a.toField.getStore().clearFilter();var c=new Ext.util.Filter({filterFn:function(e){var d=e.get("displayField");if(d.toLowerCase().indexOf(interfacSearchStr.toLowerCase())!=-1){return true;}}});a.toField.getStore().filter(c);}},addExcludInterfacs:function(){var e=Ext.getCmp("exInfitemselect").fromField.store.getCount();
var a=new Array();for(var d=0;d<e;d++){var f=Ext.getCmp("exInfitemselect").fromField.store.getAt(d).get("valueField");a[a.length]=f;}var c="";for(d=0;d<a.length;d++){if(d==0){c=a[d];}else{c+="|"+a[d];}}if(!Ext.isEmpty(c)&&c!=undefined){Ext.getCmp("Exclude_Interfaces").setValue(c);Ext.getCmp("excludeinterfaces").close();
}else{Ext.getCmp("Exclude_Interfaces").setValue("none");Ext.getCmp("excludeinterfaces").close();}},updateAmazonResourceSets:function(v){var J="";var g="";var c="";var B="";var A="";var O=0;var q=inputsResourceSet;var P=new Array();for(var G=1;G<q;G++){if(Ext.getCmp("publisresource"+G)==undefined){continue;
}var u=Ext.getCmp("publisresource"+G).getValue();var o=Ext.getCmp("regcode"+G).getValue();var p=Ext.getCmp("domain"+G).getValue();var m=Ext.getCmp("username"+G).getValue();var d=Ext.getCmp("pwd"+G).getValue();var H=Ext.getCmp("confpwd"+G).getValue();if(!checkblank(u)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterPubRsrc,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+G).focus(true,true);
}});return;}else{if(u.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+G).focus(true,true);}});return;}else{if(!checkspecialExt(u,"`*+=#.|;\"'<>/[]{}()?:")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+G).focus(true,true);
}});return;}else{if(trim(u)==""){Ext.getCmp("publisresource"+G).focus();return;}else{if(!checkHyphenText(u,u)){Ext.getCmp("publisresource"+G).focus();return;}else{if(u.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+G).focus(true,true);
}});return;}else{if(u.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+G).focus(true,true);}});return;}}}}}}}if(!checkblank(o)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterRegcode,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("regcode"+G).focus(true,true);
}});return;}else{if(o.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("regcode"+G).focus(true,true);}});return;}else{if(o.indexOf(",")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("regcode"+G).focus(true,true);
}});return;}else{if(o.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("regcode"+G).focus(true,true);}});return;}else{if(!checkspecialExt(o,"|")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("regcode"+G).focus(true,true);
}});return;}}}}}if(!checkblank(p)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterDomain,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domain"+G).focus(true,true);}});return;}else{if(p.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domain"+G).focus(true,true);
}});return;}}if(!checkDomain(p,"true")){Ext.getCmp("domain"+G).focus(true,true);return;}else{if(p.indexOf(",")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domain"+G).focus(true,true);}});return;}else{if(!checkHyphenText(p,p)){Ext.getCmp("domain"+G).focus();
return;}else{if(p.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domain"+G).focus(true,true);}});return;}}}}if(!checkblank(m)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterUsrId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("username"+G).focus(true,true);
}});return;}else{if(m.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("username"+G).focus(true,true);}});return;}else{if(!checkspecialExt(m,"*+=|:;\"'<>/[]?,")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("username"+G).focus(true,true);
}});return;}else{if(trim(m)==""){Ext.getCmp("username"+G).focus();return;}else{if(!checkHyphenText(m,m)){Ext.getCmp("username"+G).focus();return;}else{if(m.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("username"+G).focus(true,true);
}});return;}else{if(m.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("username"+G).focus(true,true);}});return;}}}}}}}if(d!=null){if(d==""){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwd"+G).focus(true,true);
}});return;}else{if(d.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwd"+G).focus(true,true);}});return;}else{if(!checkForPassValidity(d)){Ext.getCmp("pwd"+G).focus();sub=false;return;}else{if(H==""){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwd"+G).focus(true,true);
}});return;}else{if(d!=H){Ext.Msg.show({title:alertMsgSrcTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwd"+G).focus(true,true);}});return;}}}}}}}var h="";var C="";var N="";var F="";var w="";var K="";var D="";var x="";for(var y=1;y<q;y++){if(Ext.getCmp("publisresource"+y)==undefined){continue;
}var i=Ext.getCmp("publisresource"+y).getValue();if(i!=null){if(!checkblank(i)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterPubRsrc,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+y).focus(true,true);}});return;}else{if(i.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+y).focus(true,true);
}});return;}else{if(!checkspecialExt(i,"`*+=#.|;\"'<>/[]{}()?:")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+y).focus(true,true);}});return;}else{if(trim(i)==""){Ext.getCmp("publisresource"+y).focus();return;
}else{if(i.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+y).focus(true,true);}});return;}else{if(i.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+y).focus(true,true);
}});return;}else{if(!checkHyphenText(i,i)){Ext.getCmp("publisresource"+y).focus();return;}}}}}}}}var M=Ext.getCmp("regcode"+y).getValue();if(!checkblank(M)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterRegcode,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("regcode"+y).focus(true,true);
}});return;}else{if(M.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("regcode"+y).focus(true,true);}});return;}}if(M.indexOf(",")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("regcode"+y).focus(true,true);
}});return;}else{if(M.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("regcode"+y).focus(true,true);}});return;}else{if(!checkspecialExt(M,"|")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("regcode"+y).focus(true,true);
}});return;}}}var f=Ext.getCmp("domain"+y).getValue();if(!checkblank(f)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterDomain,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domain"+y).focus(true,true);}});return;}else{if(f.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domain"+y).focus(true,true);
}});return;}else{if(!checkDomain(f,"true")){Ext.getCmp("domain"+y).focus(true,true);return;}else{if(f.indexOf(",")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domain"+y).focus(true,true);}});return;}else{if(!checkHyphenText(f,f)){Ext.getCmp("domain"+y).focus();
return;}else{if(f.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domain"+y).focus(true,true);}});return;}}}}}}var s=Ext.getCmp("username"+y).getValue();if(s!=null){if(!checkblank(s)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterUsrId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("username"+y).focus(true,true);
}});return;}else{if(s.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("username"+y).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("usermultiusr"+y).focus(true,true);
}});return;}else{if(trim(s)==""){Ext.getCmp("usermultiusr"+y).focus();return;}else{if(s.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+y).focus(true,true);}});return;}else{if(s.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("username"+y).focus(true,true);
}});return;}else{if(!checkHyphenText(s,s)){Ext.getCmp("username"+y).focus();return;}}}}}}}}var a=Ext.getCmp("pwd"+y).getValue();var e=Ext.getCmp("confpwd"+y).getValue();if(a!=null&&e!=null){if(a==""){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwd"+y).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("pwd"+y).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("pwd"+y).focus(true,true);
}});sub=false;return;}else{if(!checkForPassValidity(a)){Ext.getCmp("pwd"+y).focus();sub=false;return;}else{if(e==""){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwd"+y).focus(true,true);}});return;}else{if(e.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwd"+y).focus(true,true);
}});return;}else{if(a!=e){Ext.Msg.show({title:alertMsgSrcTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwd"+y).focus(true,true);}});return;}}}}}}}}if(h!=null&&M!=null&&f!=null&&s!=null&&a!=null&&e!=null){var L=Ext.getCmp("regcode"+y).getValue();N+=L+"#~#";
var I=Ext.getCmp("publisresource"+y).getValue();var E=I;if(!Ext.isEmpty(E)&&E.indexOf(",")!=-1){E=E.replace(/,/g,"~#~");}h+=I+",";C+=E+"|";var z=Ext.getCmp("domain"+y).getValue();F+=z+",";var n=Ext.getCmp("username"+y).getValue();w+=n+"|";var r=Ext.getCmp("pwd"+y).getValue();K+=r+"#~#";}}h=h.substring(0,h.length-1);
Ext.getCmp("Published_resources").setValue(h);C=C.substring(0,C.length-1);Ext.getCmp("hiddenPublishedResource").setValue(C);N=N.substring(0,N.length-3);Ext.getCmp("Registration_code").setValue(N);Ext.getCmp("Registration_code").backupValue=N;F=F.substring(0,F.length-1);Ext.getCmp("Domain").setValue(F);
w=w.substring(0,w.length-1);Ext.getCmp("Username").setValue(w);K=K.substring(0,K.length-3);Ext.getCmp("Password").setValue(K);Ext.getCmp("Password").backupValue=K;if(Ext.getCmp("cpwd")!=null&&Ext.getCmp("cpwd")!=undefined){Ext.getCmp("cpwd").setValue(K);Ext.getCmp("cpwd").backupValue=K;Ext.getCmp("cpwd").setReadOnly(true);
}if(Ext.getCmp("Passwordconfirmpassword")!=null&&Ext.getCmp("Passwordconfirmpassword")!=undefined){Ext.getCmp("Passwordconfirmpassword").setValue(K);Ext.getCmp("Passwordconfirmpassword").backupValue=K;Ext.getCmp("Passwordconfirmpassword").setReadOnly(true);}Ext.getCmp("Published_resources").setReadOnly(true);
Ext.getCmp("Username").setReadOnly(true);Ext.getCmp("Username").hide();Ext.getCmp("Password").setReadOnly(true);Ext.getCmp("Password").hide();Ext.getCmp("Registration_code").setReadOnly(true);Ext.getCmp("Registration_code").hide();Ext.getCmp("Domain").setReadOnly(true);Ext.getCmp("Domain").hide();Ext.getCmp("egamazonwssimulator").destroy();
var k=Ext.getCmp("componentType").getValue();var t=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(k)+"&componentType="+encodeURIComponent(k)+"&tName_HelpPage="+t+"&testName="+t,method:"POST"});},clearAmazonResourceFieldSets:function(a){var c=Ext.getCmp("backupamazonresrccontainer");
c.removeAll();Ext.getCmp("addAmazonResourcebtn").setText("Add");Ext.getCmp("NoAmazonResourcePattern").show();if(Ext.getCmp("con_1")!=null||Ext.getCmp("con_1")!=undefined){ismulti="true";Ext.getCmp("con_1").removeAll();Ext.getCmp("con_1").hide();}Ext.getCmp("updateAmazonResourceBtn").disable();Ext.getCmp("clearAmazonResourceBtn").disable();
},addAmazonWSResourceSet:function(a){addAmazonResourceSetFields(a);},configAmazonWSResourceSet:function(i){Ext.create("SpecificTestConfiguration.view.EgAmazonWSSimulator").show();ismulti="false";var h="";inputsResourceSet=2;Ext.suspendLayouts();var n="";var p=Ext.getCmp("hiddenPublishedResource").getValue();
if(!Ext.isEmpty(p)){n=p;}var v=Ext.getCmp("Domain").getValue();var f=Ext.getCmp("Username").getValue();var a=Ext.getCmp("Password").getValue();var r=Ext.getCmp("Registration_code").getValue();var q=n.split("|");var t=f.split(",");var u=a.split("#~#");var d=r.split("#~#");var e=v.split(",");if(q!=null||q!=undefined){for(var o=0;
o<q.length-1;o++){addAmazonResourceSetFields();}for(h=1;h<q.length+1;h++){if(Ext.getCmp("publisresource"+h)==undefined){continue;}var j=q[h-1];if(!Ext.isEmpty(j)&&j.indexOf("~#~")!=-1){j=j.replace(/~#~/g,",");}var s=e[h-1];var c=t[h-1];var g=u[h-1];var m=d[h-1];Ext.getCmp("publisresource"+h).setValue(j);
Ext.getCmp("regcode"+h).setValue(m);Ext.getCmp("regcode"+h).backupValue=m;Ext.getCmp("domain"+h).setValue(s);Ext.getCmp("username"+h).setValue(c);Ext.getCmp("pwd"+h).setValue(g);Ext.getCmp("confpwd"+h).setValue(g);Ext.getCmp("pwd"+h).backupValue=g;Ext.getCmp("confpwd"+h).backupValue=g;}}Ext.resumeLayouts(true);
Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=configureawslogonsimulator",method:"POST",async:false});},updatePropertySets:function(d){var i="";var n="";var e=0;var f=inputsEmail;var m=new Array();for(var g=1;g<f;g++){if(Ext.getCmp("syspropkey"+g)==undefined){continue;
}var k=Ext.getCmp("syspropkey"+g).getValue();var a=Ext.getCmp("syspropval"+g).getValue();if(k!=null){if(!checkblank(k)){Ext.Msg.show({title:SysPropTitle,msg:enterSystemPropKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("syspropkey"+g).focus(true,true);}});return;}else{if(!checkspecialExt(k,"@*+=|:;\"'<>/[]?,!")){Ext.Msg.show({title:SysPropTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("syspropkey"+g).focus(true,true);
}});return;}else{if(k.indexOf("  ")>-1){Ext.Msg.show({title:SysPropTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("syspropkey"+g).focus(true,true);}});return;}}}if(!checkblank(a)){Ext.Msg.show({title:SysPropTitle,msg:enterSystemPropValue,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("syspropval"+g).focus(true,true);
}});return;}else{if(!checkspecialExt(a,"~#@*+=|:;\"'<>/[]?")){Ext.Msg.show({title:SysPropTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("syspropval"+g).focus(true,true);}});return;}else{if(a.indexOf("  ")>-1){Ext.Msg.show({title:SysPropTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("syspropval"+g).focus(true,true);
}});return;}}}i+=k+",";if(a.indexOf(",")!=-1){a=a.replace(/,/g,"~#~");}n+=a+",";}}i=i.substring(0,i.length-1);n=n.substring(0,n.length-1);Ext.getCmp("system_property_key").setValue(i);Ext.getCmp("system_property_value").setValue(n);Ext.getCmp("egsystemproperties").destroy();var h=Ext.getCmp("componentType").getValue();
var c=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(h)+"&componentType="+encodeURIComponent(h)+"&tName_HelpPage="+c+"&testName="+c,method:"POST"});},clearPropertyFields:function(a){var c=Ext.getCmp("propetiesmorecontainer");
c.removeAll();Ext.getCmp("addPropBtn").setText("Add");Ext.getCmp("NoPropContainer").show();if(Ext.getCmp("con_1")!=null||Ext.getCmp("con_1")!=undefined){ismulti="true";Ext.getCmp("con_1").removeAll();Ext.getCmp("con_1").hide();}Ext.getCmp("updatePropBtn").disable();Ext.getCmp("clearPropBtn").disable();
},addMainPropertySet:function(a){addSystemProperties(a);},configSystemProperties:function(d){Ext.create("SpecificTestConfiguration.view.EgSystemProperties").show();ismulti="false";var c="";inputsEmail=2;Ext.suspendLayouts();var i=Ext.getCmp("system_property_key").getValue();var a=Ext.getCmp("system_property_value").getValue();
var j=i.split(",");var e=a.split(",");if(j!=null||j!=undefined){for(var g=0;g<j.length-1;g++){addSystemProperties();}for(c=1;c<j.length+1;c++){if(Ext.getCmp("syspropkey"+c)==undefined){continue;}var f=j[c-1];var h=e[c-1];if(!Ext.isEmpty(h)&&h.indexOf("~#~")!=-1){h=h.replace(/~#~/g,",");}Ext.getCmp("syspropkey"+c).setValue(f);
Ext.getCmp("syspropval"+c).setValue(h);}}Ext.resumeLayouts(true);Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=configurerules",method:"POST",async:false});},updateResourceSets:function(u){var H="";var A="";var z="";var C="";var N=0;var m=inputsResourceSet;var O=new Array();
for(var F=1;F<m;F++){if(Ext.getCmp("publisresource"+F)==undefined){continue;}pubresource=Ext.getCmp("publisresource"+F).getValue();uname=Ext.getCmp("username"+F).getValue();pass=Ext.getCmp("pwd"+F).getValue();confpass=Ext.getCmp("confpwd"+F).getValue();var I=Ext.getCmp("twofacttoken"+F).getValue();var L=Ext.getCmp("twofact"+F).getChecked()[0];
var J=L.getGroupValue();if(!checkblank(pubresource)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterPubRsrc,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+F).focus(true,true);}});return;}else{if(pubresource.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+F).focus(true,true);
}});return;}else{if(!checkspecialExt(pubresource,"`*+=#.|;\"'<>/[]{}()?:")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+F).focus(true,true);}});return;}else{if(trim(pubresource)==""){Ext.getCmp("publisresource"+F).focus();
return;}else{if(!checkHyphenText(pubresource,pubresource)){Ext.getCmp("publisresource"+F).focus();return;}else{if(pubresource.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+F).focus(true,true);}});
return;}else{if(pubresource.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+F).focus(true,true);}});return;}}}}}}}if(!checkblank(uname)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterUsrId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("username"+F).focus(true,true);
}});return;}else{if(uname.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("username"+F).focus(true,true);}});return;}else{if(!checkspecialExt(uname,"*+=|:;\"'<>/[]?,")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("username"+F).focus(true,true);
}});return;}else{if(trim(uname)==""){Ext.getCmp("username"+F).focus();return;}else{if(!checkHyphenText(uname,uname)){Ext.getCmp("username"+F).focus();return;}else{if(uname.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("username"+F).focus(true,true);
}});return;}else{if(uname.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("username"+F).focus(true,true);}});return;}}}}}}}if(pass!=null){if(pass==""){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwd"+F).focus(true,true);
}});return;}else{if(pass.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwd"+F).focus(true,true);}});return;}else{if(!checkForPassValidity(pass)){Ext.getCmp("pwd"+F).focus();sub=false;return;}else{if(confpass==""){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwd"+F).focus(true,true);
}});return;}else{if(pass!=confpass){Ext.Msg.show({title:alertMsgSrcTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwd"+F).focus(true,true);}});return;}}}}}}if(J=="true"){if(!checkblank(I)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enter2FAToken,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+F).focus(true,true);
}});return;}else{if(I.indexOf(",")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+F).focus(true,true);}});return;}else{if(I.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+F).focus(true,true);
}});return;}else{if(!checkspecialExt(I,"|")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+F).focus(true,true);}});return;}}}}}else{I="none";}}var e="";var B="";var v="";var K="";var D="";var w="";for(var y=1;y<m;
y++){if(Ext.getCmp("publisresource"+y)==undefined){continue;}var f=Ext.getCmp("publisresource"+y).getValue();if(f!=null){if(!checkblank(f)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterPubRsrc,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+y).focus(true,true);}});
return;}else{if(f.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+y).focus(true,true);}});return;}else{if(!checkspecialExt(f,"`*+=#.|;\"'<>/[]{}()?:")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+y).focus(true,true);
}});return;}else{if(trim(f)==""){Ext.getCmp("publisresource"+y).focus();return;}else{if(f.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+y).focus(true,true);}});return;}else{if(f.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+y).focus(true,true);
}});return;}else{if(!checkHyphenText(f,f)){Ext.getCmp("publisresource"+y).focus();return;}}}}}}}}var p=Ext.getCmp("username"+y).getValue();if(p!=null){if(!checkblank(p)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterUsrId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("username"+y).focus(true,true);
}});return;}else{if(p.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("username"+y).focus(true,true);}});return;}else{if(!checkspecialExt(p,"*+=|:;\"'<>/[]?,")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+y).focus(true,true);
}});return;}else{if(trim(p)==""){Ext.getCmp("usermultiusr"+y).focus();return;}else{if(p.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("usermultiusr"+y).focus(true,true);}});return;}else{if(p.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("username"+y).focus(true,true);
}});return;}else{if(!checkHyphenText(p,p)){Ext.getCmp("username"+y).focus();return;}}}}}}}}var a=Ext.getCmp("pwd"+y).getValue();var c=Ext.getCmp("confpwd"+y).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("pwd"+y).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("pwd"+y).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("pwd"+y).focus(true,true);
}});sub=false;return;}else{if(!checkForPassValidity(a)){Ext.getCmp("pwd"+y).focus();sub=false;return;}else{if(c==""){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwd"+y).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("confpwd"+y).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("confpwd"+y).focus(true,true);}});return;}}}}}}}}var i=Ext.getCmp("disclaimermultiusr"+y+"_1").getValue();if(i==null){continue;}var d=Ext.getCmp("twofacttoken"+y).getValue();
var n=Ext.getCmp("twofact"+y).getChecked()[0];var k=n.getGroupValue();if(d==null){continue;}if(d!=null){if(k=="true"){if(!checkblank(d)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enter2FAToken,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+y).focus(true,true);}});return;
}else{if(d.indexOf(",")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+y).focus(true,true);}});return;}else{if(d.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+y).focus(true,true);
}});return;}else{if(!checkspecialExt(d,"|")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+y).focus(true,true);}});return;}}}}}else{d="none";}}if(e!=null&&p!=null&&a!=null&&c!=null&&d!=null&&i!=null){var M=Ext.getCmp("disclaimermultiusr"+y+"_1").getValue();
var x="false";if(M){x="true";}D+=x+",";var s=Ext.getCmp("twofacttoken"+y).getValue();var t=Ext.getCmp("twofact"+y).getChecked()[0];var q=t.getGroupValue();if(q=="false"){s="none";}w+=s+"#~#";var G=Ext.getCmp("publisresource"+y).getValue();var E=G;if(!Ext.isEmpty(E)&&E.indexOf(",")!=-1){E=E.replace(/,/g,"~#~");
}e+=G+",";B+=E+"|";var h=Ext.getCmp("username"+y).getValue();v+=h+"|";var o=Ext.getCmp("pwd"+y).getValue();K+=o+"#~#";}}e=e.substring(0,e.length-1);Ext.getCmp("Published_resources").setValue(e);B=B.substring(0,B.length-1);Ext.getCmp("hiddenPublishedResource").setValue(B);v=v.substring(0,v.length-1);Ext.getCmp("User_id").setValue(v);
K=K.substring(0,K.length-3);Ext.getCmp("Password").setValue(K);Ext.getCmp("Password").backupValue=K;if(Ext.getCmp("cpwd")!=null&&Ext.getCmp("cpwd")!=undefined){Ext.getCmp("cpwd").setValue(K);Ext.getCmp("cpwd").backupValue=K;Ext.getCmp("cpwd").setReadOnly(true);}if(Ext.getCmp("Passwordconfirmpassword")!=null&&Ext.getCmp("Passwordconfirmpassword")!=undefined){Ext.getCmp("Passwordconfirmpassword").setValue(K);
Ext.getCmp("Passwordconfirmpassword").backupValue=K;Ext.getCmp("Passwordconfirmpassword").setReadOnly(true);}Ext.getCmp("Published_resources").setReadOnly(true);w=w.substring(0,w.length-3);Ext.getCmp("Two_factor_auth_password").setValue(w);Ext.getCmp("Two_factor_auth_password").backupValue=w;D=D.substring(0,D.length-1);
Ext.getCmp("Disclaimer").setValue(D);Ext.getCmp("User_id").setReadOnly(true);Ext.getCmp("User_id").hide();Ext.getCmp("Password").setReadOnly(true);Ext.getCmp("Password").hide();Ext.getCmp("Two_factor_auth_password").setReadOnly(true);Ext.getCmp("Two_factor_auth_password").hide();Ext.getCmp("Disclaimer").setReadOnly(true);
Ext.getCmp("Disclaimer").hide();Ext.getCmp("eghorizonwssimulator").destroy();var g=Ext.getCmp("componentType").getValue();var r=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(g)+"&componentType="+encodeURIComponent(g)+"&tName_HelpPage="+r+"&testName="+r,method:"POST"});
},clearResourceFieldSets:function(a){var c=Ext.getCmp("backupmulticontainer");c.removeAll();Ext.getCmp("addResourcebtn").setText("Add");Ext.getCmp("NoResourcePattern").show();if(Ext.getCmp("con_1")!=null||Ext.getCmp("con_1")!=undefined){ismulti="true";Ext.getCmp("con_1").removeAll();Ext.getCmp("con_1").hide();
}Ext.getCmp("updateResourceBtn").disable();Ext.getCmp("clearResourceBtn").disable();},addHorizonWSResourceSet:function(a){addResourceSetFields(a);},configHorizonWSResourceSet:function(h){Ext.create("SpecificTestConfiguration.view.EgHorizonWSSimulator").show();ismulti="false";var g="";inputsResourceSet=2;
Ext.suspendLayouts();var o="";var q=Ext.getCmp("hiddenPublishedResource").getValue();if(!Ext.isEmpty(q)){o=q;}var e=Ext.getCmp("User_id").getValue();var c=Ext.getCmp("Password").getValue();var u=Ext.getCmp("Disclaimer").getValue();var j=Ext.getCmp("Two_factor_auth_password").getValue();var r=o.split("|");
var t=e.split("|");var v=c.split("#~#");var m=j.split("#~#");var s=u.split(",");if(r!=null||r!=undefined){for(var p=0;p<r.length-1;p++){addResourceSetFields();}for(g=1;g<r.length+1;g++){if(Ext.getCmp("publisresource"+g)==undefined){continue;}var i=r[g-1];if(!Ext.isEmpty(i)&&i.indexOf("~#~")!=-1){i=i.replace(/~#~/g,",");
}var d=t[g-1];var f=v[g-1];var n=m[g-1];var a=s[g-1];if(!Ext.isEmpty(n)&&(n!="FF6EBC35F4F93E0C1057BBC2E53B1DF3"&&n.toLowerCase()!="none")){Ext.getCmp("twofactlabel"+g+"_1").setValue(true);Ext.getCmp("twofacttoken"+g).setVisible(true);Ext.getCmp("twofacttoken"+g).setValue(n);Ext.getCmp("twofacttoken"+g).backupValue=n;
}if(!Ext.isEmpty(a)){if(a.toLowerCase()=="true"){Ext.getCmp("disclaimermultiusr"+g+"_1").setValue(true);}else{Ext.getCmp("disclaimermultiusr"+g+"_2").setValue(true);}}Ext.getCmp("publisresource"+g).setValue(i);Ext.getCmp("username"+g).setValue(d);Ext.getCmp("pwd"+g).setValue(f);Ext.getCmp("confpwd"+g).setValue(f);
Ext.getCmp("pwd"+g).backupValue=f;Ext.getCmp("confpwd"+g).backupValue=f;}}Ext.resumeLayouts(true);Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=configurerules",method:"POST",async:false});},addURLs:function(a){firstClick=true;addURLsConf("isTextFocus");},callSitUrlDestroy:function(){firstClick=true;
},siteUrlConfigs:function(){frstClk=true;var f=false;var r=false;var g=Ext.getCmp("Database_Server").getValue();var a=Ext.getCmp("Database_User_name").getValue();var h=Ext.getCmp("Database_password").getValue();var y=Ext.getCmp("instance").getValue();var x=Ext.getCmp("Database_name").getValue();var c=Ext.getCmp("SQL_Port_number").getValue();
var w=Ext.getCmp("ssl1").getValue();var i=Ext.getCmp("isntlmv21").getValue();var u=Ext.getCmp("Database_Domain").getValue();var q=g+"~"+a+"~"+h+"~"+y+"~"+x+"~"+c+"~"+u+"~"+w+"~"+i;var z=Ext.getCmp("componentName").getValue();if(Ext.isEmpty(g)||g==undefined||Ext.isEmpty(a)||a==undefined||Ext.isEmpty(h)||h==undefined||Ext.isEmpty(y)||y==undefined||Ext.isEmpty(x)||x==undefined){Ext.Msg.show({title:"SITE URL CONFIGURATION",msg:"Please provide user credentials and database information",buttons:Ext.Msg.OK,icon:"iconExclamation"});
return false;}if(Ext.isEmpty(c)||c==undefined||Ext.isEmpty(u)||u==undefined){Ext.Msg.show({title:"SITE URL CONFIGURATION",msg:"Please provide user credentials and database information",buttons:Ext.Msg.OK,icon:"iconExclamation"});return false;}if(g=="$unconfigured"||a=="$unconfigured"||h=="$unconfigured"||u=="$unconfigured"||x=="$unconfigured"){Ext.Msg.show({title:"SITE URL CONFIGURATION",msg:"Please provide user credentials and database information",buttons:Ext.Msg.OK,icon:"iconExclamation"});
return false;}Ext.create("SpecificTestConfiguration.view.SiteURLConfiguration").show();var v=publicJson["componentName"];if(v!=null&&v.indexOf(":NULL")>-1){v=v.substring(0,v.indexOf(":NULL"));}noServiceConfig="false";var o=Ext.getCmp("site_URL(S)").backupValue;var j=new Array();var d=new Array();var e=new Array();
var n=new Array();if(!Ext.isEmpty(o)&&o.indexOf(",")!=-1){e=o.split(",");for(b=0;b<e.length;b++){if(e[b].indexOf("~#~")!=-1){n=e[b].split("~#~");d[b]=n[0];j[b]=n[1];}else{d[b]=e[b];j[b]=e[b];}}}else{if(o.indexOf("~#~")!=-1){n=o.split("~#~");d[0]=n[0];j[0]=n[1];}else{d[0]=o;j[0]=o;}}if(!Ext.getCmp(j)&&j!=undefined){var m="";
inputsService=2;var t=Ext.getCmp("siteurlcontainer");Ext.suspendLayouts();for(var p=0;p<j.length-1;p++){addURLsConf("");}for(m=0;m<j.length;m++){Ext.getCmp("siteUsageUnam"+(m+1)).setValue(d[m]);Ext.getCmp("siteUsage"+(m+1)).setValue(j[m]);}Ext.resumeLayouts(true);t.doLayout();}Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=siteurlconfiguration",method:"POST",async:false});
},updateSiteURLs:function(h){frstClk=true;var d="";var c=this.checkBeforeUrlAdding();if(c){var a="";for(var e=1;e<inputsService;e++){if(Ext.isEmpty(Ext.getCmp("siteUsage"+e))||Ext.getCmp("siteUsage"+e)==undefined){continue;}url_name=Ext.getCmp("siteUsage"+e).getValue();site_Nam=Ext.getCmp("siteUsageUnam"+e).getValue();
var i=site_Nam+"~#~"+url_name;if(d.length==0){d=i;a=site_Nam;}else{d+=","+i;a+=","+site_Nam;}}this.callUrlSessionAttribute(d);Ext.getCmp("siteurlconfiguration").destroy();firstgetService=true;if(!Ext.isEmpty(d)&&d!=undefined){Ext.getCmp("site_URL(S)").setValue(a);Ext.getCmp("site_URL(S)").backupValue=d;
}}var g=Ext.getCmp("componentType").getValue();var f=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(g)+"&componentType="+encodeURIComponent(g)+"&tName_HelpPage="+f+"&testName="+f,method:"POST"});},callUrlSessionAttribute:function(a){Ext.Ajax.request({url:"SpecificTestConfiguration/data/setSessionAttributeJson.jsp",method:"POST",params:{"whereFrom":"serviceConfig","attributeName":"paramValue","attributeValue":a},success:function(c){}});
},checkBeforeUrlAdding:function(){var c=true;for(var a=1;a<inputsService;a++){if(Ext.isEmpty(Ext.getCmp("siteUsage"+a))||Ext.getCmp("siteUsage"+a)==undefined){continue;}siteUsageValue=Ext.getCmp("siteUsage"+a).getValue();if(siteUsageValue.trim()==""){Ext.Msg.show({title:"SITE URL CONFIGURATION",msg:"Please enter URL ",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("siteUsage"+a).focus(true,true);
}});c=false;break;}if(siteUsageValue.indexOf("$")>-1){Ext.Msg.show({title:"SITE URL CONFIGURATION",msg:"Please enter URL ",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("siteUsage"+a).focus(true,true);}});c=false;break;}siteUsageUnamValue=Ext.getCmp("siteUsageUnam"+a).getValue();
if(siteUsageUnamValue.trim()==""){Ext.Msg.show({title:"SITE URL CONFIGURATION",msg:"Please enter URL Name",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("siteUsageUnam"+a).focus(true,true);}});c=false;break;}if(siteUsageUnamValue.indexOf("$")>-1){Ext.Msg.show({title:"SITE URL CONFIGURATION",msg:"Please enter URL Name",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("siteUsageUnam"+a).focus(true,true);
}});c=false;break;}for(l=a+1;l<inputsService;l++){if(Ext.getCmp("siteUsageUnam"+l)==null||Ext.getCmp("siteUsageUnam"+l)=="null"){continue;}site_name_2=Ext.getCmp("siteUsageUnam"+l).value;if(siteUsageUnamValue==site_name_2){Ext.Msg.show({title:"SITE URL CONFIGURATION",msg:alert_2,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("siteUsageUnam"+l).focus(true,true);
}});c=false;break;}else{if(siteUsageUnamValue.toLowerCase()==site_name_2.toLowerCase()){Ext.Msg.show({title:"SITE URL CONFIGURATION",msg:alert_3,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("siteUsageUnam"+l).focus(true,true);}});c=false;break;}}}}return c;},clearSiteURLs:function(a){var c=Ext.getCmp("siteurlcontainer");
c.removeAll();Ext.getCmp("addURLsConfbtn").setText("Add");Ext.getCmp("NoSiteurlConf").show();if(Ext.getCmp("siteurl_conf1")!=null||Ext.getCmp("siteurl_conf1")!=undefined){noSiteurlConfig="true";Ext.getCmp("siteurl_conf1").removeAll();Ext.getCmp("siteurl_conf1").hide();}Ext.getCmp("updateSitURLs").disable();
Ext.getCmp("clearSitURLs").disable();},getSiteURLs:function(){frstClk=true;Ext.create("SpecificTestConfiguration.view.SiteUrlDetailedConfiguration").show();Ext.getCmp("getsitDetailSearch").hide();Ext.getCmp("getsitDetailSearchContainer").hide();Ext.getCmp("siteurlselect").hide();var k=Ext.getCmp("siteurlselect");
k.getStore().clearFilter();var f=new Ext.LoadMask(Ext.getCmp("siteurldetailedconfiguration"),{msg:"Please wait. It will take a while to get site URLs..."});f.show();var j=Ext.getCmp("componentName").getValue();var a=j;if(!Ext.isEmpty(j)&&j.lastIndexOf(":NULL")!=-1){a=j.substring(0,j.lastIndexOf(":NULL"));
}dont_show="";var i=Ext.getCmp("Database_Server").getValue();var p=Ext.getCmp("Database_User_name").getValue();var g=Ext.getCmp("Database_password").getValue();var n=Ext.getCmp("instance").getValue();var c=Ext.getCmp("Database_name").getValue();var e=Ext.getCmp("SQL_Port_number").getValue();var h=Ext.getCmp("ssl1").getValue();
var o=Ext.getCmp("isntlmv21").getValue();var m=Ext.getCmp("Database_Domain").getValue();sitLstInput=i+"~"+p+"~"+g+"~"+n+"~"+c+"~"+e+"~"+m+"~"+h+"~"+o;var d="SpecificTestConfiguration/data/siteURLsListJson.jsp?dummy=dummy&componentName="+encodeURIComponent(j)+"&sitLstInput="+sitLstInput;Ext.Ajax.request({url:d,method:"POST",timeout:60000000,success:function(w){var u=w.responseText;
publicServiceJson=Ext.decode(u);if(!Ext.isEmpty(u)&&w.status==200){if(publicServiceJson.timedout){f.hide();Ext.getCmp("noSiteurlContainer").show();Ext.getCmp("noSiteurlLabel").update(publicServiceJson.timedoutOrAlreadyConfigLabel);Ext.getCmp("siteurlselect").hide();}else{if(publicServiceJson.isEmptyList){f.hide();
Ext.getCmp("noSiteurlContainer").show();Ext.getCmp("noSiteurlLabel").update(publicServiceJson.isEmptyListLabel);Ext.getCmp("siteurlselect").hide();}else{if(publicServiceJson.existView){f.hide();Ext.getCmp("noSiteurlContainer").show();Ext.getCmp("noSiteurlLabel").update(publicServiceJson.isexistViewLabel);
Ext.getCmp("siteurlselect").hide();}else{Ext.getCmp("noSiteurlContainer").hide();Ext.getCmp("submitSitUrlDet").show();Ext.getCmp("siteurlselect").show();var s=publicServiceJson["sitUrlListArr"];if(s[0].valueField=="Connection failed"){f.hide();Ext.Msg.show({title:"SITE URL CONFIGURATION",msg:"Please check credentials",buttons:Ext.Msg.OK,icon:"iconExclamation"});
Ext.getCmp("siteurldetailedconfiguration").destroy();Ext.getCmp("siteurlconfiguration").destroy();return false;}else{var y=new Array();var t=0;var v=new Array();v=[];for(var x=1;x<inputsService;x++){if(Ext.isEmpty(Ext.getCmp("siteUsage"+x))||Ext.getCmp("siteUsage"+x)==undefined){v[x-1]="$unconfigured";
continue;}else{v[x-1]=Ext.getCmp("siteUsage"+x).getValue();}}var A=0;for(var z=0;z<s.length;z++){var C=true;var B=s[z].displayField;for(var r=0;r<v.length;r++){if(v[r]!="$unconfigured"){if(v[r].toLowerCase()===B.toLowerCase()){C=false;break;}}else{A++;}}if(C){y[t]=s[z];t++;}}if(v.length==A){Ext.getCmp("getsitDetailSearch").show();
Ext.getCmp("getsitDetailSearchContainer").show();Ext.getCmp("siteurlselect").getStore().removeAll();Ext.getCmp("siteurlselect").getStore().loadRawData(s);A=0;}else{if(y.length==0){f.hide();Ext.getCmp("noSiteurlContainer").show();Ext.getCmp("noSiteurlLabel").update("<table align='center' height='250'><tr><td align='center' ><table><tr><td align='center'><img src='/final/images/spacer.gif' class='iconInformation'></td></tr><tr><td align='center' class='commonErrorMsgText'>"+allConfiguredLbl+".</td></tr></table></td></tr></table>");
Ext.getCmp("siteurlselect").hide();}else{Ext.getCmp("getsitDetailSearch").show();Ext.getCmp("getsitDetailSearchContainer").show();Ext.getCmp("siteurlselect").getStore().loadRawData("");Ext.getCmp("siteurlselect").getStore().loadRawData(y);}}}}}}}f.hide();},failure:function(q){f.hide();console.log("form",q);
}});},getSitURLsDtlSearch:function(){urlSearchStr=Ext.getCmp("getsitDetailSearch").getValue();var a=Ext.getCmp("siteurlselect");Ext.getCmp("submitSitUrlDet").show();Ext.getCmp("noSiteurlContainer").hide();a.show();if(urlSearchStr==""||urlSearchStr.length==0){Ext.get("MyTrigger_0").setStyle("display","none");
Ext.get("MyTrigger_1").setStyle("display","block");a.getStore().clearFilter();}else{Ext.get("MyTrigger_1").setStyle("display","none");Ext.get("MyTrigger_0").setStyle("display","block");a.getStore().clearFilter();var c=new Ext.util.Filter({filterFn:function(e){var d=e.get("displayField");if(d.toLowerCase().indexOf(urlSearchStr.toLowerCase())!=-1){return true;
}}});a.getStore().filter(c);}if(a.getStore().getCount()==0){a.hide();Ext.getCmp("submitSitUrlDet").hide();Ext.getCmp("noSiteurlContainer").show();Ext.getCmp("noSiteurlLabel").update('<table align="center"><tr><td align="center" height="250"><table><tr><td align="center"><img src="/final/images/spacer.gif" class="iconInformation"></td></tr><tr><td align="center" class="commonErrorMsgText">No record found for your current search.</td></tr></table></td></tr></table>');
}},submitSiteURLs:function(){frstClk=true;var i=Ext.getCmp("siteurlcontainer").items;var N=new Array();for(var L=1;L<inputsService;L++){if(Ext.isEmpty(Ext.getCmp("siteUsage"+L))||Ext.getCmp("siteUsage"+L)==undefined){N[0]="$unconfigured";break;}else{N[L-1]=Ext.getCmp("siteUsage"+L).getValue();}}var n=Ext.getCmp("siteurlselect").getValue();
var z=n;var n=n.toString().trim();if(n.length<=1){z=n.toString().trim();}if(Ext.isEmpty(z)||z==undefined){Ext.Msg.show({title:pageName,msg:selectSitUrlName,buttons:Ext.Msg.OK,icon:"iconExclamation"});return false;}var g=new Array();if(!Ext.isEmpty(n)&&n.indexOf(",")!=-1){g=n.split(",");}else{g[0]=n;}if(g.length!=0){var h=false;
var B=0;for(var J=0;J<N.length;J++){for(var I=0;I<g.length;I++){if(N[J].toLowerCase()==g[I].toLowerCase()){h=true;B++;}}}if(h){if(B==1){Ext.Msg.show({title:pageName,msg:"URL is already selected",buttons:Ext.Msg.OK,icon:"iconExclamation"});return false;}else{Ext.Msg.show({title:pageName,msg:B+" URLs are already selected",buttons:Ext.Msg.OK,icon:"iconExclamation"});
return false;}}}var A=inputsService;Ext.getCmp("siteurldetailedconfiguration").destroy();var H=Ext.getCmp("noSearchDataLabel");if(!Ext.isEmpty(H)&&H!=undefined){var x=Ext.getCmp("siteurlcontainer");x.remove(Ext.getCmp("noSearchDataLabel"));}var j=0;var M=0;var E=0;var q=g.length;var y=Ext.getCmp("siteUsage1");
if(!Ext.isEmpty(y)&&y!=undefined){M++;E=1;var a=Ext.getCmp("siteUsage1").getValue();if((Ext.isEmpty(a)||a=="$unconfigured")&&a!=undefined){j++;}}var k=Ext.getCmp("siteurlcontainer").items;var r=k.length;if(r>0){for(var v=0;v<r;v++){M++;var d=k.items[v].xtype;if(d=="fieldset"){var G=k.items[v].id;var p=G.substring(G.lastIndexOf("_conf")+5);
var D=Ext.getCmp("siteUsage"+p).getValue();if((Ext.isEmpty(D)||D=="$unconfigured")&&D!=undefined){j++;}}}}if(j>0&&q>j){q=q-j;}else{if(j>0&&q<j){q=0;}else{if(q==j){q=0;}}}var o=Ext.getCmp("siteurlcontainer");Ext.suspendLayouts();for(var C=0;C<q;C++){addURLsConf("");M++;}Ext.resumeLayouts(true);o.doLayout();
var F=0;for(var w=E;w<inputsService;w++){if(Ext.getCmp("siteUsage"+w)==undefined){continue;}var K=Ext.getCmp("siteUsage"+w).getValue();if(!Ext.isEmpty(K)&&K!=undefined&&K!="$unconfigured"){continue;}var u=g[F];F++;if(u!=undefined){Ext.getCmp("siteUsage"+w).setValue(u);}}frstClk=true;Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=siteurlconfiguration",method:"POST"});
},configMultiHLSFieldSet:function(e){Ext.create("SpecificTestConfiguration.view.EgHLSPublishedResources").show();var d="";inputsmultisrc=2;ismultisrc="false";var n="";var s=Ext.getCmp("hiddenPublishedResource").getValue();var c=Ext.getCmp("Domain").getValue();var u=Ext.getCmp("Disclaimer").getValue();
var h=Ext.getCmp("Two_factor_auth_password").getValue();var f=Ext.getCmp("Username").getValue();var g=Ext.getCmp("Password").getValue();if(!Ext.isEmpty(s)){n=s;}var j=n.split("|");var i=h.split("#~#");var p=c.split(",");var t=u.split(",");var o=f.split(",");var r=g.split("#~#");if(c!=null||c!=undefined){for(var q=0;
q<p.length-1;q++){addMultiHLSContact();}for(d=1;d<p.length+1;d++){if(!Ext.isEmpty(j[d-1])&&j[d-1].indexOf("~#~")!=-1){j[d-1]=j[d-1].replace(/~#~/g,",");}var m=i[d-1];var a=t[d-1];if(!Ext.isEmpty(m)&&(m!="FF6EBC35F4F93E0C1057BBC2E53B1DF3"&&m.toLowerCase()!="none")){Ext.getCmp("twofactlabel"+d+"_1").setValue(true);
Ext.getCmp("twofacttoken"+d).setVisible(true);Ext.getCmp("twofacttoken"+d).setValue(m);Ext.getCmp("twofacttoken"+d).backupValue=m;}Ext.getCmp("publisresource"+d).setValue(j[d-1]);if(!Ext.isEmpty(a)){if(a.toLowerCase()=="true"){Ext.getCmp("disclaimermultiusr"+d+"_1").setValue(true);}else{Ext.getCmp("disclaimermultiusr"+d+"_2").setValue(true);
}}Ext.getCmp("domainmultiusr"+d).setValue(p[d-1]);Ext.getCmp("usermultiusr"+d).setValue(o[d-1]);Ext.getCmp("pwdmultiusr"+d).setValue(r[d-1]);Ext.getCmp("confpwdmultiusr"+d).setValue(r[d-1]);Ext.getCmp("pwdmultiusr"+d).backupValue=r[d-1];Ext.getCmp("confpwdmultiusr"+d).backupValue=r[d-1];}}Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=egconfiguremultipleusers",method:"POST",async:false});
},addMultiHLSSource:function(a){addMultiHLSContact(a);},ClearMultiHLSSource:function(){var a=Ext.getCmp("backupmulticontainer");a.removeAll();Ext.getCmp("addMultiHLSbtn").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("updateMultiHLSbtn").disable();Ext.getCmp("clearMultiHLSbtn").disable();},UpdateMultiHLSSource:function(){var I=inputsmultisrc;for(var e=1;e<I-1;e++){if(Ext.getCmp("domainmultiusr"+e)==undefined){continue;}var P=Ext.getCmp("publisresource"+e).getValue();
var Q=Ext.getCmp("twofacttoken"+e).getValue();var q=Ext.getCmp("domainmultiusr"+e).getValue();var n=Ext.getCmp("usermultiusr"+e).getValue();var c=Ext.getCmp("pwdmultiusr"+e).getValue();var W=Ext.getCmp("confpwdmultiusr"+e).getValue();var T=Ext.getCmp("twofact"+e).getChecked()[0];var R=T.getGroupValue();
if(!checkblank(P)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterPubRsrc,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+e).focus(true,true);}});return;}else{if(P.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+e).focus(true,true);
}});return;}else{if(!checkspecialExt(P,"`*+=#.|;\"'<>/[]{}()?")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+e).focus(true,true);}});return;}else{if(trim(P)==""){Ext.getCmp("publisresource"+e).focus();return;
}else{if(!checkHyphenText(P,P)){Ext.getCmp("publisresource"+e).focus();return;}else{if(P.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+e).focus(true,true);}});return;}else{if(P.indexOf("  ")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkSpaces,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+e).focus(true,true);
}});return;}else{if(P.indexOf(":")>-1){var z=P;if(z.indexOf(",")!=-1){var V=z.split(",");for(var J=0;J<V.length;J++){var m=V[J];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"+e).focus(true,true);
}});return;}else{var E=new Array();for(var N=0;N<m.length;N++){if(m.charAt(N)==":"){E.push(N);}if(m.charAt(N)==":"&&m.charAt(N+1)==":"){Ext.Msg.show({title:pageName,msg:"Cannot have ':' in consecutive positions",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+e).focus(true,true);
}});E=new Array();return;}else{continue;}}if(E.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"+e).focus(true,true);}});E=new Array();
return;}}}}else{if(z.charAt(0)==":"||z.charAt(z.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"+e).focus(true,true);}});return;}else{var E=new Array();for(var N=0;
N<z.length;N++){if(z.charAt(N)==":"){E.push(N);}if(z.charAt(N)==":"&&z.charAt(N+1)==":"){Ext.Msg.show({title:pageName,msg:"Cannot have ':' in consecutive positions",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("publisresource"+e).focus(true,true);}});E=new Array();return;}else{continue;
}}if(E.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"+e).focus(true,true);}});E=new Array();return;}}}}}}}}}}}if(R=="true"){if(!checkblank(Q)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enter2FAToken,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+e).focus(true,true);
}});return;}else{if(Q.indexOf(",")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+e).focus(true,true);}});return;}else{if(Q.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+e).focus(true,true);
}});return;}else{if(!checkspecialExt(Q,"|")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+e).focus(true,true);}});return;}}}}}else{Q="none";}if(!checkblank(q)){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterDomain,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+e).focus(true,true);
}});return;}if(!checkDomain(q,"true")){Ext.getCmp("domainmultiusr"+e).focus(true,true);return;}else{if(q.indexOf(",")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+e).focus(true,true);}});return;}else{if(!checkHyphenText(q,q)){Ext.getCmp("domainmultiusr"+e).focus();
return;}else{if(q.indexOf("..")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkdots,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("domainmultiusr"+e).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"+e).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"+e).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"+e).focus(true,true);
}});return;}else{if(trim(n)==""){Ext.getCmp("usermultiusr"+e).focus();return;}else{if(!checkHyphenText(n,n)){Ext.getCmp("usermultiusr"+e).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"+e).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"+e).focus(true,true);}});return;}}}}}}}if(c==""){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+e).focus(true,true);
}});sub=false;return;}else{if(c.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+e).focus(true,true);}});return;}else{if(c.indexOf("#~#")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkHashTildeHash,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pwdmultiusr"+e).focus(true,true);
}});sub=false;return;}else{if(!checkForPassValidity(c)){Ext.getCmp("pwdmultiusr"+e).focus();sub=false;return;}else{if(W==""){Ext.Msg.show({title:alertMsgSrcTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+e).focus(true,true);}});sub=false;return;
}else{if(W.indexOf("$unconfigured")>-1){Ext.Msg.show({title:alertMsgSrcTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+e).focus(true,true);}});return;}else{if(c!=W){Ext.Msg.show({title:alertMsgSrcTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+e).focus(true,true);
}});sub=false;return;}}}}}}}}var h="";var K="";var C="";var L="";var G="";var F="";var S="";for(var o=1;o<I;o++){if(Ext.getCmp("domainmultiusr"+o)==undefined){continue;}var i=Ext.getCmp("publisresource"+o).getValue();if(i!=null){if(!checkblank(i)){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(i.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(i,"`*+=#.|;\"'<>/[]{}()?")){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(i)==""){Ext.getCmp("publisresource"+o).focus();return;}else{if(i.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(i.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(!checkHyphenText(i,i)){Ext.getCmp("publisresource"+o).focus();return;}else{if(i.indexOf(":")>-1){var z=i;if(z.indexOf(",")!=-1){var V=z.split(",");for(var J=0;J<V.length;J++){var m=V[J];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 E=new Array();for(var N=0;N<m.length;N++){if(m.charAt(N)==":"){E.push(N);}if(m.charAt(N)==":"&&m.charAt(N+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);
}});E=new Array();return;}else{continue;}}if(E.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);}});E=new Array();
return;}}}}else{if(z.charAt(0)==":"||z.charAt(z.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 E=new Array();for(var N=0;
N<z.length;N++){if(z.charAt(N)==":"){E.push(N);}if(z.charAt(N)==":"&&z.charAt(N+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);}});E=new Array();return;}else{continue;
}}if(E.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);}});E=new Array();return;}}}}}}}}}}}}var r=Ext.getCmp("disclaimermultiusr"+o+"_1").getValue();
if(r==null){continue;}var B=Ext.getCmp("domainmultiusr"+o).getValue();if(B==null){continue;}if(B!=null){if(!checkDomain(B,"true")){Ext.getCmp("domainmultiusr"+o).focus(true,true);return;}else{if(B.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(B.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(B,B)){Ext.getCmp("domainmultiusr"+o).focus();return;}}}}}var f=Ext.getCmp("twofacttoken"+o).getValue();
var t=Ext.getCmp("twofact"+o).getChecked()[0];var s=t.getGroupValue();if(f==null){continue;}if(f!=null){if(s=="true"){if(!checkblank(f)){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(f.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(f.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(f,"|")){Ext.Msg.show({title:alertMsgSrcTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("twofacttoken"+o).focus(true,true);}});return;}}}}}else{f="none";}}var x=Ext.getCmp("usermultiusr"+o).getValue();if(x!=null){if(!checkblank(x)){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(x.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(x,"*+=|:;\"'<>/[]?,")){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(x)==""){Ext.getCmp("usermultiusr"+o).focus();return;}else{if(x.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(x.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(x,x)){Ext.getCmp("usermultiusr"+o).focus();return;}}}}}}}}var a=Ext.getCmp("pwdmultiusr"+o).getValue();var d=Ext.getCmp("confpwdmultiusr"+o).getValue();if(a!=null&&d!=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(d==""){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(d.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!=d){Ext.Msg.show({title:alertMsgSrcTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpwdmultiusr"+o).focus(true,true);}});return;}}}}}}}}if(h!=null&&f!=null&&B!=null&&r!=null&&x!=null&&a!=null&&d!=null){var g=Ext.getCmp("domainmultiusr"+o).getValue();
C+=g+",";var U=Ext.getCmp("disclaimermultiusr"+o+"_1").getValue();var H="false";if(U){H="true";}L+=H+",";var A=Ext.getCmp("twofacttoken"+o).getValue();var D=Ext.getCmp("twofact"+o).getChecked()[0];var w=D.getGroupValue();if(w=="false"){A="none";}G+=A+"#~#";var O=Ext.getCmp("publisresource"+o).getValue();
var M=O;if(!Ext.isEmpty(M)&&M.indexOf(",")!=-1){M=M.replace(/,/g,"~#~");}h+=O+",";K+=M+"|";var p=Ext.getCmp("usermultiusr"+o).getValue();F+=p+",";var u=Ext.getCmp("pwdmultiusr"+o).getValue();S+=u+"#~#";}}h=h.substring(0,h.length-1);Ext.getCmp("Published_resources").setValue(h);K=K.substring(0,K.length-1);
Ext.getCmp("hiddenPublishedResource").setValue(K);G=G.substring(0,G.length-3);Ext.getCmp("Two_factor_auth_password").setValue(G);Ext.getCmp("Two_factor_auth_password").backupValue=G;C=C.substring(0,C.length-1);Ext.getCmp("Domain").setValue(C);L=L.substring(0,L.length-1);Ext.getCmp("Disclaimer").setValue(L);
F=F.substring(0,F.length-1);Ext.getCmp("Username").setValue(F);S=S.substring(0,S.length-3);Ext.getCmp("Password").setValue(S);Ext.getCmp("Password").backupValue=S;if(Ext.getCmp("cpwd")!=null&&Ext.getCmp("cpwd")!=undefined){Ext.getCmp("cpwd").setValue(S);Ext.getCmp("cpwd").backupValue=S;Ext.getCmp("cpwd").setReadOnly(true);
}if(Ext.getCmp("Passwordconfirmpassword")!=null&&Ext.getCmp("Passwordconfirmpassword")!=undefined){Ext.getCmp("Passwordconfirmpassword").setValue(S);Ext.getCmp("Passwordconfirmpassword").backupValue=S;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("eghlspublishedresources").destroy();var j=Ext.getCmp("componentType").getValue();var y=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(j)+"&componentType="+encodeURIComponent(j)+"&tName_HelpPage="+y+"&testName="+y,method:"POST"});
},updateEmailSets:function(c){var k="";var d="";var e=0;var f=inputsEmail;var m=new Array();for(var g=1;g<f;g++){if(Ext.getCmp("emailid"+g)==undefined){continue;}emailID=Ext.getCmp("emailid"+g).getValue();pass=Ext.getCmp("pass"+g).getValue();confpass=Ext.getCmp("confpass"+g).getValue();if(emailID!=null){var n=validateEmail(emailID);
e++;if(!checkblank(emailID)||(emailID=="$unconfigured")){Ext.Msg.show({title:ExchangeTitle,msg:mailRcv_valid,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("emailid"+g).focus(true,true);}});return;}else{if(!validateSingleByte(emailID)){Ext.Msg.show({title:ExchangeTitle,msg:mailIDDBL+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(j){Ext.getCmp("emailid"+g).focus(true,true);
}});return;}else{if(n==null||n==undefined||n==false){Ext.Msg.show({title:ExchangeTitle,msg:mailRcv_valid+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(j){Ext.getCmp("emailid"+g).focus(true,true);}});return;}else{if(emailID.indexOf(",")!=-1){Ext.Msg.show({title:ExchangeTitle,msg:mail_valid+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(j){Ext.getCmp("emailid"+g).focus(true,true);
}});return;}}}}var i=m.indexOf(emailID);if(i!=-1){Ext.Msg.show({title:ExchangeTitle,msg:duplicateMailId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("emailid"+g).focus(true,true);}});return;}m[g]=emailID;}if(pass!=null){if(pass==""){Ext.Msg.show({title:ExchangeTitle,msg:enterPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pass"+g).focus(true,true);
}});return;}else{if(pass.indexOf("$unconfigured")>-1){Ext.Msg.show({title:ExchangeTitle,msg:donotSpecifyKey,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("pass"+g).focus(true,true);}});return;}else{if(!checkForPassValidity(pass)){Ext.getCmp("pass"+g).focus();sub=false;return;}else{if(confpass==""){Ext.Msg.show({title:ExchangeTitle,msg:enterCnfPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpass"+g).focus(true,true);
}});return;}else{if(pass!=confpass){Ext.Msg.show({title:ExchangeTitle,msg:matchPwd,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("confpass"+g).focus(true,true);}});return;}}}}}}k+=emailID+"|";d+=pass+"#~#";}k=k.substring(0,k.length-1);d=d.substring(0,d.length-3);Ext.getCmp("Email_id").setValue(k);
Ext.getCmp("Email_password").setValue(d);Ext.getCmp("Email_password").backupValue=d;Ext.getCmp("egemailconfiguration").destroy();var h=Ext.getCmp("componentType").getValue();var a=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(h)+"&componentType="+encodeURIComponent(h)+"&tName_HelpPage="+a+"&testName="+a,method:"POST"});
},clearEmailFields:function(a){var c=Ext.getCmp("emailmorecontainer");c.removeAll();Ext.getCmp("addEmailBtn").setText("Add");Ext.getCmp("NoEmailContainer").show();if(Ext.getCmp("con_1")!=null||Ext.getCmp("con_1")!=undefined){ismulti="true";Ext.getCmp("con_1").removeAll();Ext.getCmp("con_1").hide();}Ext.getCmp("updateEmailBtn").disable();
Ext.getCmp("clearEmailBtn").disable();},addMainEmailContact:function(a){addEmailContactFields(a);},configEMailCredential:function(c){Ext.create("SpecificTestConfiguration.view.EgEMailConfiguration").show();ismulti="false";var a="";inputsEmail=2;Ext.suspendLayouts();var g=Ext.getCmp("Email_id").getValue();
var i=Ext.getCmp("Email_password").getValue();var e=g.split("|");var h=i.split("#~#");if(e!=null||e!=undefined){for(var d=0;d<e.length-1;d++){addEmailContactFields();}for(a=1;a<e.length+1;a++){if(Ext.getCmp("emailid"+a)==undefined){continue;}var j=e[a-1];var f=h[a-1];Ext.getCmp("emailid"+a).setValue(j);
Ext.getCmp("pass"+a).setValue(f);Ext.getCmp("confpass"+a).setValue(f);Ext.getCmp("pass"+a).backupValue=f;Ext.getCmp("confpass"+a).backupValue=f;}}Ext.resumeLayouts(true);Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=configurerules",method:"POST",async:false});},updateCustomSets:function(g){var s="";
var k="";var f=0;var w=inputsCust;var a=new Array();var e=new Array();var m=new Array();var c=new Array();var i=new Array();var v=new Array();var x=new Array();for(var p=1;p<w;p++){if(Ext.getCmp("rulename"+p)==undefined){continue;}var n=Ext.getCmp("rulename"+p).getValue();var u=Ext.getCmp("webname"+p).getValue();
var t=Ext.getCmp("appname"+p).getValue();var r=Ext.getCmp("custname"+p).getValue();if(n!=null){f++;if(!checkblank(n)||(n=="$unconfigured")){Ext.Msg.show({title:customNameTitle,msg:ruleNameMsg1,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("rulename"+p).focus(true,true);}});return;
}else{if(!validateSingleByte(n)){Ext.Msg.show({title:customNameTitle,msg:doubleByteMsg+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(j){Ext.getCmp("rulename"+p).focus(true,true);}});return;}else{if(!checkspecialExt(n,'*+=|:;"<>,/?@&$<>')){Ext.Msg.show({title:customNameTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("rulename"+p).focus(true,true);
}});return;}}}var q=c.indexOf(n);if(q!=-1){Ext.Msg.show({title:customNameTitle,msg:ruleNameMsg2,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("rulename"+p).focus(true,true);}});return;}c[p]=n;}if(u!=null){if(!checkblank(u)||(u=="$unconfigured")){Ext.Msg.show({title:customNameTitle,msg:webNameMsg1,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("webname"+p).focus(true,true);
}});return;}else{if(!validateSingleByte(u)){Ext.Msg.show({title:customNameTitle,msg:doubleByteMsg+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(j){Ext.getCmp("webname"+p).focus(true,true);}});return;}else{if(!checkspecialExt(u,'*+=|:;"<>,/?@&$<>')){Ext.Msg.show({title:customNameTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("webname"+p).focus(true,true);
}});return;}}}}if(t!=null){if(!checkblank(t)||(t=="$unconfigured")){Ext.Msg.show({title:customNameTitle,msg:appNameMsg1,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("appname"+p).focus(true,true);}});return;}else{if(!validateSingleByte(t)){Ext.Msg.show({title:customNameTitle,msg:doubleByteMsg+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(j){Ext.getCmp("appname"+p).focus(true,true);
}});return;}else{if(!checkspecialExt(t,'*+=|:;"<>,\\?@&$<>')){Ext.Msg.show({title:customNameTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("appname"+p).focus(true,true);}});return;}}}}if(u!=null&&t!=null){var q=m.indexOf(u+"~!~"+t);if(q!=-1){Ext.Msg.show({title:customNameTitle,msg:splCheckMsg1,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("appname"+p).focus(true,true);
}});return;}m[p]=u+"~!~"+t;}if(r!=null){if(!checkblank(r)||(r=="$unconfigured")){Ext.Msg.show({title:customNameTitle,msg:custNameMsg1,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("custname"+p).focus(true,true);}});return;}else{if(!validateSingleByte(r)){Ext.Msg.show({title:customNameTitle,msg:doubleByteMsg+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(j){Ext.getCmp("custname"+p).focus(true,true);
}});return;}else{if(!checkspecialExt(r,'*+=|:;"<>,/?@&$<>')){Ext.Msg.show({title:customNameTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("custname"+p).focus(true,true);}});return;}}}}if(u!=null&&t!=null&&r!=null){var q=a.indexOf(u+"~!~"+r);var h=e.indexOf(u+"~!~"+t+"~!~"+r);
if(q!=-1||h!=-1){Ext.Msg.show({title:customNameTitle,msg:splCheckMsg2,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("custname"+p).focus(true,true);}});return;}e[p]=u+"~!~"+t+"~!~"+r;a[p]=u+"~!~"+r;}s+=n+",";k+=n+"~#~"+u+"~#~"+t+"~#~"+r+"|";}s=s.substring(0,s.length-1);k=k.substring(0,k.length-1);
Ext.getCmp("rulename").setValue(s);Ext.getCmp("custom_name_for_application").setValue(k);Ext.getCmp("egcustomapplicationnaming").destroy();var d=Ext.getCmp("componentType").getValue();var o=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(d)+"&componentType="+encodeURIComponent(d)+"&tName_HelpPage="+o+"&testName="+o,method:"POST"});
},clearCustomFields:function(a){var c=Ext.getCmp("custommorecontainer");c.removeAll();Ext.getCmp("addMoreCustBtn").setText("Add");Ext.getCmp("NoCustomNameContainer").show();if(Ext.getCmp("con_1")!=null||Ext.getCmp("con_1")!=undefined){ismulti="true";Ext.getCmp("con_1").removeAll();Ext.getCmp("con_1").hide();
}Ext.getCmp("updateCustBtn").disable();Ext.getCmp("clearCustBtn").disable();},addMainCustomContact:function(a){addCustomContactFields(a);},configCustomConfigurations:function(d){Ext.create("SpecificTestConfiguration.view.EgCustomApplicationNaming").show();ismulti="false";var a=new Array();var c="";inputsCust=2;
Ext.suspendLayouts();var h=Ext.getCmp("custom_name_for_application").getValue();if(!Ext.isEmpty(h)){var a=h.split("|");for(var g=0;g<a.length-1;g++){addCustomContactFields();}for(c=1;c<a.length+1;c++){if(Ext.getCmp("rulename"+c)==undefined){continue;}var n=a[c-1];var j=n.split("~#~");var e=j[0];var f=j[1];
var i=j[2];var m=j[3];if(Ext.isEmpty(e)){e="none";}if(Ext.isEmpty(f)){f="none";}if(Ext.isEmpty(i)){i="none";}if(Ext.isEmpty(m)){m="none";}Ext.getCmp("rulename"+c).setValue(e);Ext.getCmp("webname"+c).setValue(f);Ext.getCmp("appname"+c).setValue(i);Ext.getCmp("custname"+c).setValue(m);}}Ext.resumeLayouts(true);
Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=customconfigure",method:"POST",async:false});},overrideFilterLogicForUpdate:function(o){var f=true;var m=o.id;var i=o.id;var q=i;var d=o.value;if(!Ext.isEmpty(d)){if(d.charAt(0)==" "||d.charAt(d.length-1)==" "){d=d.trim();
}}i=i.substring(i.lastIndexOf("c")+1);var j=new Array();var k=Ext.getCmp("includePatternContainer"+i);var a=k.items.length;var e=false;var r="";if(a>0){for(var s=0;s<a;s++){var u=Ext.getCmp("rulename"+i+"_outercont"+(s+1));if(!Ext.isEmpty(u)&&u.hasCls("disabled-mycomponent")){e=true;r=u.id;continue;}j.push((s+1).toString());
}}if(e){var t=r.length;var g=r.charAt((t-1));if(!Ext.isEmpty(d)&&d.indexOf(g)!=-1){f=false;return false;}else{f=filterLogicFromRemoveMsg(Ext.getCmp("filterlogic"+i),r);}}if(!Ext.isEmpty(j)){if(Ext.isEmpty(d)){f=false;return false;}else{if(!checkFilterLogicFormat(d)){f=false;return false;}}var w=new Array();
w=d.split(" ");var p=new Array();for(var n=0;n<w.length;n++){var c=w[n];if(!Ext.isEmpty(c)){if(c.indexOf("(")!=-1){c=c.replace(/\(/g,"");}if(c.indexOf(")")!=-1){c=c.replace(/\)/g,"");}if(c.toLowerCase().indexOf("and")!=-1||c.toLowerCase().indexOf("or")!=-1){continue;}else{p.push(c);}}}w=new Array();w=p;
delete p;if(j!=null&&j.length>0){var h="";j.forEach(function(x,v){if(!Ext.isEmpty(x)){if(w.indexOf(x.toString())==-1){h+=x+",";}}});if(!Ext.isEmpty(h)){f=false;return false;}}if(w!=null&&w.length>0){var h="";w.forEach(function(x,v){if(j.indexOf(x.toString())==-1){h+=x+",";}});if(!Ext.isEmpty(h)){f=false;
return false;}}}if(f){Ext.getCmp("errorState_"+i).update("");Ext.getCmp("flaccept_"+i).setDisabled(false);}return f;},overrideFilterLogic:function(o){var f=true;var m=o.id;var i=o.id;var q=i;var d=o.value;if(!Ext.isEmpty(d)){if(d.charAt(0)==" "||d.charAt(d.length-1)==" "){d=d.trim();}}i=i.substring(i.lastIndexOf("c")+1);
Ext.getCmp("flaccept_"+i).setDisabled(true);Ext.getCmp("flaccept_"+i).show();var j=new Array();var k=Ext.getCmp("includePatternContainer"+i);var a=k.items.length;var e=false;var r="";if(a>0){for(var t=0;t<a;t++){var w=Ext.getCmp("rulename"+i+"_outercont"+(t+1));if(!Ext.isEmpty(w)&&w.hasCls("disabled-mycomponent")){e=true;
r=w.id;continue;}j.push((t+1).toString());}}if(e){var u=r.length;var g=r.charAt((u-1));if(!Ext.isEmpty(d)&&d.indexOf(g)!=-1){var s='<table cellpadding="0px" cellspacing="0"><tr><td align="middle" valign="middle" style="margin:3px 0px 0px 5px;font-size:11px;color:red"> Error: '+deleteFilterMsg+"</td></tr></table>";
Ext.getCmp("errorState_"+i).update(s);f=false;return false;}else{f=filterLogicFromRemoveMsg(Ext.getCmp("filterlogic"+i),r);}}if(!Ext.isEmpty(j)){if(Ext.isEmpty(d)){var s='<table cellpadding="0px" cellspacing="0"><tr><td align="middle" valign="middle" style="margin:3px 0px 0px 5px;font-size:11px;color:red"> Error: '+_checkempty+"</td></tr></table>";
Ext.getCmp("errorState_"+i).update(s);f=false;return false;}else{if(!checkFilterLogicFormat(d)){var s='<table cellpadding="0px" cellspacing="0"><tr><td align="middle" valign="middle" style="margin:3px 0px 0px 5px;font-size:11px;color:red"> Error: '+filterLogicPatternMsg+"</td></tr></table>";Ext.getCmp("errorState_"+i).update(s);
f=false;return false;}}var x=new Array();x=d.split(" ");var p=new Array();for(var n=0;n<x.length;n++){var c=x[n];if(!Ext.isEmpty(c)){if(c.indexOf("(")!=-1){c=c.replace(/\(/g,"");}if(c.indexOf(")")!=-1){c=c.replace(/\)/g,"");}if(c.toLowerCase().indexOf("and")!=-1||c.toLowerCase().indexOf("or")!=-1){continue;
}else{p.push(c);}}}x=new Array();x=p;delete p;if(j!=null&&j.length>0){var h="";j.forEach(function(z,v){if(!Ext.isEmpty(z)){if(x.indexOf(z.toString())==-1){h+=z+",";}}});if(!Ext.isEmpty(h)){h=h.substring(0,h.length-1);var y="Filter condition "+h+" is defined but not referenced in your filter logic";if(!Ext.isEmpty(h)&&h.indexOf(",")!=-1){y="Filter conditions "+h+" are defined but not referenced in your filter logic";
}var s='<table cellpadding="0px" cellspacing="0"><tr><td align="middle" valign="middle" style="margin:3px 0px 0px 5px;font-size:11px;color:red"> Error: '+y+"</td></tr></table>";Ext.getCmp("errorState_"+i).update(s);f=false;return false;}}if(x!=null&&x.length>0){var h="";x.forEach(function(z,v){if(j.indexOf(z.toString())==-1){h+=z+",";
}});if(!Ext.isEmpty(h)){var c="The filter logic references an undefined filter";var s='<table cellpadding="0px" cellspacing="0"><tr><td align="middle" valign="middle" style="margin:3px 0px 0px 5px;font-size:11px;color:red"> Error: '+c+"</td></tr></table>";Ext.getCmp("errorState_"+i).update(s);f=false;
return false;}}}if(f){Ext.getCmp("errorState_"+i).update("");Ext.getCmp("flaccept_"+i).setDisabled(false);}return true;},buildFilterLogic:function(d){var e=d.id;var c=e;var a=d.value;if(Ext.isEmpty(a)){Ext.Msg.show({title:rulePageTitle,msg:_checkempty,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp(d.id).focus(true,true);
}});return;}},addMainContact:function(a){addRuleContact(a);},clearFilterRules:function(a){var c=Ext.getCmp("rulenamescontainer");c.removeAll();Ext.getCmp("addRuleNamebtn").setText("Add");Ext.getCmp("NoRuleNamePattern").show();if(Ext.getCmp("configrule_1")!=null||Ext.getCmp("configrule_1")!=undefined){ismulti="true";
Ext.getCmp("configrule_1").removeAll();Ext.getCmp("configrule_1").hide();}Ext.getCmp("updateRuleName").disable();Ext.getCmp("clearRuleName").disable();},createRulesForSyslog:function(j){var g=publicJson["testName"];Ext.create("SpecificTestConfiguration.view.EgConfigureRulenames").show();ismulti="false";
var h="";inputsRule=2;Ext.suspendLayouts();var s=Ext.getCmp("rule_name").getValue();var c=Ext.getCmp("facility").getValue();var t=Ext.getCmp("filter_host").getValue();var a=Ext.getCmp("level").getValue();var C=Ext.getCmp("filter_logic").getValue();var p=Ext.getCmp("exclude_Patterns").getValue();var v=s.split("^#^");
var f=c.split("^#^");var z=t.split("^#^");var r=a.split("^#^");var d=C.split("^#^");if(!Ext.isEmpty(d)&&(d=="$unconfigured"||d=="none")){d="1";}var q=p.split("^#^");if(v!=null||v!=undefined){for(var u=0;u<v.length-1;u++){addRuleContact();}for(h=1;h<v.length+1;h++){if(Ext.getCmp("rulename"+h)==undefined){continue;
}if(g=="DeviceSyslogMsgs"){Ext.getCmp("filterhost"+h).hide();}var x=v[h-1];var y=f[h-1];var w=z[h-1];var n=r[h-1];var B=d[h-1];var o=q[h-1];var A=x.substring(x.indexOf("=")+1);x=x.substring(0,x.indexOf("="));var e=A.split("|");y=y.substring(y.indexOf("=")+1);if(!Ext.isEmpty(y)&&y.indexOf("|")!=-1){y=y.replace(/\|/g,",");
}w=w.substring(w.indexOf("=")+1);if(!Ext.isEmpty(w)&&w.indexOf("|")!=-1){w=w.replace(/\|/g,",");}n=n.substring(n.indexOf("=")+1);if(!Ext.isEmpty(n)&&n.indexOf("|")!=-1){n=n.replace(/\|/g,",");}B=B.substring(B.indexOf("=")+1);if(!Ext.isEmpty(B)&&B.indexOf("|")!=-1){B=B.replace(/\|/g,",");}o=o.substring(o.indexOf("=")+1);
if(!Ext.isEmpty(o)&&o.indexOf("|")!=-1){o=o.replace(/\|/g,",");}Ext.getCmp("rulename"+h).setValue(x);Ext.getCmp("facility"+h).setValue(y);Ext.getCmp("filterhost"+h).setValue(w);Ext.getCmp("level"+h).setValue(n);if(e!=null&&e.length>0){for(var i=1;i<e.length;i++){addIncludePatternWithValue("multiPatternDiv"+h);
}for(var m=0;m<e.length;m++){Ext.getCmp("rulename"+h+"_incpatt"+(m+1)).setValue(e[m]);}}Ext.getCmp("filterlogic"+h).setRawValue(B);Ext.getCmp("excludepattern"+h).setValue(o);}}Ext.resumeLayouts(true);Ext.Ajax.request({url:"SpecificTestConfiguration/data/specifictesthelpJson.jsp?mode=configurerules",method:"POST",async:false});
},updateRuleFilters:function(m){var D="";var h="";var d="";var q="";var v="";var z="";var i=0;var J=inputsRule;var F=new Array();for(var A=1;A<J;A++){if(Ext.getCmp("rulename"+A)==undefined){continue;}ruleName=Ext.getCmp("rulename"+A).getValue();facility=Ext.getCmp("facility"+A).getValue();filterHost=Ext.getCmp("filterhost"+A).getValue();
level=Ext.getCmp("level"+A).getValue();filterLogic=Ext.getCmp("filterlogic"+A).getValue();excPattern=Ext.getCmp("excludepattern"+A).getValue();if(ruleName!=null){i++;if(!checkblank(ruleName)||(ruleName=="$unconfigured")){Ext.Msg.show({title:rulePageTitle,msg:enterRuleName,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("rulename"+A).focus(true,true);
}});return;}else{if(!checkspecialExt(ruleName,"$@*.+=|:;\"'<>/[]?,\\&")){Ext.Msg.show({title:rulePageTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("rulename"+A).focus(true,true);}});return;}}var C=F.indexOf(ruleName);if(C!=-1){Ext.Msg.show({title:rulePageTitle,msg:duplicateRuleName,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("rulename"+A).focus(true,true);
}});return;}F[A]=ruleName;}if(facility!=null){if(!checkblank(facility)||(facility=="$unconfigured")){Ext.Msg.show({title:rulePageTitle,msg:enterFacility,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("facility"+A).focus(true,true);}});return;}else{if(!checkspace(facility)){Ext.getCmp("facility"+A).focus(true,true);
return;}else{if(!checkspecialExt(facility,"$@*.+=|:;\"'<>/[]?\\&")){Ext.Msg.show({title:rulePageTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("facility"+A).focus(true,true);}});return;}else{if(facility.indexOf(",")>-1){if(facility.indexOf(",")==0||facility.lastIndexOf(",")==facility.length-1||facility.indexOf(",,")>-1){Ext.Msg.show({title:rulePageTitle,msg:validValue,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("facility"+A).focus(true,true);
}});return;}}}}}}if(filterHost!=null){if(!checkblank(filterHost)||(filterHost=="$unconfigured")){Ext.Msg.show({title:rulePageTitle,msg:enterFilterHost,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("filterhost"+A).focus(true,true);}});return;}else{if(!checkspace(filterHost)){Ext.getCmp("filterhost"+A).focus(true,true);
return;}else{if(!checkspecialExt(filterHost,"$@*+=|;\"'<>/[]?\\&")){Ext.Msg.show({title:rulePageTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("filterhost"+A).focus(true,true);}});return;}else{if(filterHost.indexOf(",")>-1){if(filterHost.indexOf(",")==0||filterHost.lastIndexOf(",")==filterHost.length-1||filterHost.indexOf(",,")>-1){Ext.Msg.show({title:rulePageTitle,msg:validValue,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("filterhost"+A).focus(true,true);
}});return;}}}}}}if(level!=null){if(!checkblank(level)||(level=="$unconfigured")){Ext.Msg.show({title:rulePageTitle,msg:enterLevel,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("level"+A).focus(true,true);}});return;}else{if(!checkspace(level)){Ext.getCmp("level"+A).focus(true,true);
return;}else{if(!checkspecialExt(level,"$@*.+=|:;\"'<>/[]?\\&")){Ext.Msg.show({title:rulePageTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("level"+A).focus(true,true);}});return;}else{if(level.indexOf(",")>-1){if(level.indexOf(",")==0||level.lastIndexOf(",")==level.length-1||level.indexOf(",,")>-1){Ext.Msg.show({title:rulePageTitle,msg:validValue,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("level"+A).focus(true,true);
}});return;}}}}}}var n=Ext.getCmp("includePatternContainer"+A);var c=n.items.length;var H=new Array();if(c>0){for(var B=0;B<c;B++){var k=Ext.getCmp("rulename"+A+"_incpatt"+(B+1)).getValue();if(!checkblank(k)||(k=="$unconfigured")){Ext.Msg.show({title:rulePageTitle,msg:enterIncPattern,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("rulename"+A+"_incpatt"+(B+1)).focus(true,true);
}});return;}else{if(!checkspecialExt(k,"$,@*.+=|:;\"'<>/[]?\\&")){Ext.Msg.show({title:rulePageTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("rulename"+A+"_incpatt"+(B+1)).focus(true,true);}});return;}else{func.buildFilterLogic(Ext.getCmp("rulename"+A+"_incpatt"+(B+1)));
}}H.push(k);}}if(filterLogic!=null){if(!checkblank(filterLogic)||(filterLogic=="$unconfigured")){Ext.Msg.show({title:rulePageTitle,msg:enterFilterLogic,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("filterlogic"+A).focus(true,true);}});return;}else{var x=func.overrideFilterLogicForUpdate(Ext.getCmp("filterlogic"+A));
if(!x){Ext.Msg.show({title:rulePageTitle,msg:filterLogicPatternMsg,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("filterlogic"+A).focus(true,true);}});return;}else{var L=filterLogic.split(" ");var p=(filterLogic.indexOf("(")!=-1);var y=new Array();var G=new Array();for(var E=0;E<L.length;
E++){var o=L[E];if(!Ext.isEmpty(o)&&o.toLowerCase()=="and"){y.push(o);}else{if(!Ext.isEmpty(o)&&o.toLowerCase()=="or"){G.push(o);}}}var u=Ext.Array.map(L,function(M,f){if(f!=(L.length-2)){if(!Ext.isEmpty(M)&&((M.toLowerCase()=="and"&&L[f+2].toLowerCase()=="or")||(M.toLowerCase()=="or"&&L[f+2].toLowerCase()=="and"))){var j=L[f+1];
if(j.indexOf(")")==-1&&j.indexOf("(")==-1){p=false;}}}});var I=((!Ext.isEmpty(y)&&y.length>0)&&(!Ext.isEmpty(G)&&G.length>0));if(!p&&I){Ext.Msg.show({title:rulePageTitle,msg:enterFilterLogicMsg1,minWidth:300,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("filterlogic"+A).focus(true,true);
}});return;}}}}if(excPattern!=null){if(Ext.isEmpty(excPattern)){excPattern="none";}if(!checkblank(excPattern)||(excPattern=="$unconfigured")){Ext.Msg.show({title:rulePageTitle,msg:enterExecPattern,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("excludepattern"+A).focus(true,true);
}});return;}else{if(!checkspace(excPattern)){Ext.getCmp("excludepattern"+A).focus(true,true);return;}else{if(!checkspecialExt(excPattern,"$@*.+=|:;\"'<>/[]?\\&")){Ext.Msg.show({title:rulePageTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("excludepattern"+A).focus(true,true);
}});return;}else{if(excPattern.indexOf(",")>-1){if(excPattern.indexOf(",")==0||excPattern.lastIndexOf(",")==excPattern.length-1||excPattern.indexOf(",,")>-1){Ext.Msg.show({title:rulePageTitle,msg:validValue,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("excludepattern"+A).focus(true,true);
}});return;}}}}}var r=false;H.forEach(function(f){if(excPattern.indexOf(",")!=-1){if(excPattern.indexOf(f+",")!=-1||excPattern.indexOf(","+f+",")!=-1||excPattern.indexOf(","+f)!=-1){r=true;}}else{if(f==excPattern){r=true;}}});if(r){Ext.Msg.show({title:rulePageTitle,msg:repeatedKeywords,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("excludepattern"+A).focus(true,true);
}});return;}}var s=Ext.getCmp("includePatternContainer"+A);var a=s.items.getCount();var K="";if(a>0){for(var g=0;g<a;g++){K+=Ext.getCmp("rulename"+A+"_incpatt"+(g+1)).getValue()+"|";}}if(!Ext.isEmpty(K)){K=K.substring(0,K.length-1);}var t=K;if(t.charAt(t.length-1)=="|"){t=t.substring(0,t.length-1);}facility=facility.replace(/,/g,"|");
level=level.replace(/,/g,"|");filterHost=filterHost.replace(/,/g,"|");excPattern=excPattern.replace(/,/g,"|");D+=ruleName+"="+t+"^#^";h+=ruleName+"="+facility+"^#^";d+=ruleName+"="+filterHost+"^#^";q+=ruleName+"="+level+"^#^";v+=ruleName+"="+filterLogic+"^#^";z+=ruleName+"="+excPattern+"^#^";}D=D.substring(0,D.length-3);
h=h.substring(0,h.length-3);d=d.substring(0,d.length-3);q=q.substring(0,q.length-3);v=v.substring(0,v.length-3);z=z.substring(0,z.length-3);Ext.getCmp("rule_name").setValue(D);Ext.getCmp("facility").setValue(h);Ext.getCmp("filter_host").setValue(d);Ext.getCmp("level").setValue(q);Ext.getCmp("filter_logic").setValue(v);
Ext.getCmp("exclude_Patterns").setValue(z);Ext.getCmp("egconfigurerulenames").destroy();var e=Ext.getCmp("componentType").getValue();var w=publicJson["testName"];Ext.Ajax.request({url:"SpecificTestConfiguration/data/EgConfigureComponentTestsJson.jsp?cType_HelpPage="+encodeURIComponent(e)+"&componentType="+encodeURIComponent(e)+"&tName_HelpPage="+w+"&testName="+w,method:"POST"});
}});function addSystemProperties(c){var d=false;if(!Ext.isEmpty(c)){d=true;}var a=Ext.getCmp("egsystemproperties");var g=Ext.getCmp("propetiesmorecontainer");var e="con_"+inputsEmail;var f={xtype:"fieldset",id:e,width:800,margin:"5 5 5 5",items:[{xtype:"container",layout:"column",defaults:{margin:10,labelSeparator:" ",labelAlign:"top"},items:[{xtype:"textfield",cls:"textbox",fieldLabel:"Property",style:{"white-space":"nowrap"},id:"syspropkey"+inputsEmail,name:"syspropkey"+inputsEmail,value:"none",margin:"2 5 2 2",columnWidth:0.48},{xtype:"textfield",cls:"textbox",fieldLabel:"Value",style:{"white-space":"nowrap"},id:"syspropval"+inputsEmail,name:"syspropval"+inputsEmail,value:"none",margin:"2 5 2 5",columnWidth:0.48},{xtype:"component",html:'<center><div class="iconMinus" style="cursor:pointer;" data-qtip="<b>Remove</b>" onclick="javascript:removeProperties('+e+')"></center>',columnWidth:0.04,margin:"24 0 0 2"}]}]};
g.add(f);g.doLayout();Ext.getCmp("addPropBtn").setText("Add More");Ext.getCmp("updatePropBtn").enable();Ext.getCmp("clearPropBtn").enable();Ext.getCmp("NoPropContainer").hide();if(d){Ext.getCmp("syspropkey"+inputsEmail).focus(true);}inputsEmail++;}function removeProperties(e){var c=e;if(!Ext.isEmpty(c)&&c instanceof Object){c=e.id;
}var d=Ext.getCmp("propetiesmorecontainer");d.remove(c);if(c=="con_1"){ismulti="true";Ext.getCmp("con_1").removeAll();Ext.getCmp("con_1").hide();}var a=d.items.length;if(a==0){if(ismulti=="true"){Ext.getCmp("addPropBtn").setText("Add");Ext.getCmp("NoPropContainer").show();Ext.getCmp("updatePropBtn").disable();
Ext.getCmp("clearPropBtn").disable();}}}function addCustomContactFields(c){var d=false;if(!Ext.isEmpty(c)){d=true;}var a=Ext.getCmp("egcustomapplicationnaming");var g=Ext.getCmp("custommorecontainer");var e="con_"+inputsCust;var f={xtype:"fieldset",id:e,height:124,flex:1,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(){removeCustomNameContact(e);
}}]},{xtype:"container",layout:"column",defaults:{margin:10,labelSeparator:" ",labelWidth:100},items:[{xtype:"textfield",cls:"textbox",fieldLabel:"Rule name",style:{"white-space":"nowrap"},id:"rulename"+inputsCust,name:"rulename"+inputsCust,value:"$unconfigured",columnWidth:0.5},{xtype:"textfield",cls:"textbox",fieldLabel:"Website name",style:{"white-space":"nowrap"},id:"webname"+inputsCust,name:"webname"+inputsCust,value:"$unconfigured",columnWidth:0.5},{xtype:"textfield",cls:"textbox",fieldLabel:"Application name",style:{"white-space":"nowrap"},id:"appname"+inputsCust,name:"appname"+inputsCust,value:"$unconfigured",columnWidth:0.5},{xtype:"textfield",cls:"textbox",fieldLabel:"Custom name",style:{"white-space":"nowrap"},id:"custname"+inputsCust,name:"custname"+inputsCust,value:"$unconfigured",columnWidth:0.5}]}]};
g.add(f);a.doLayout();Ext.getCmp("addMoreCustBtn").setText("Add More");Ext.getCmp("updateCustBtn").enable();Ext.getCmp("clearCustBtn").enable();Ext.getCmp("NoCustomNameContainer").hide();if(d){Ext.getCmp("rulename"+inputsCust).focus(true);}inputsCust++;}function removeCustomNameContact(c){var d=Ext.getCmp("custommorecontainer");
d.remove(c);if(c=="con_1"){ismulti="true";Ext.getCmp("con_1").removeAll();Ext.getCmp("con_1").hide();}var a=d.items.length;if(a==0){if(ismulti=="true"){Ext.getCmp("addMoreCustBtn").setText("Add");Ext.getCmp("NoCustomNameContainer").show();Ext.getCmp("updateCustBtn").disable();Ext.getCmp("clearCustBtn").disable();
}}}function addEmailContactFields(c){var d=false;if(!Ext.isEmpty(c)){d=true;}var a=Ext.getCmp("egemailconfiguration");var g=Ext.getCmp("emailmorecontainer");var e="con_"+inputsEmail;var f={xtype:"fieldset",id:e,width:800,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(){removeEmailNameContact(e);
}}]},{xtype:"container",layout:"column",defaults:{margin:10,labelSeparator:" ",labelAlign:"top"},items:[{xtype:"textfield",cls:"textbox",fieldLabel:"Email ID",style:{"white-space":"nowrap"},id:"emailid"+inputsEmail,name:"emailid"+inputsEmail,value:"$unconfigured",columnWidth:0.34},{xtype:"textfield",cls:"textbox",inputType:"password",fieldLabel:"Password",style:{"white-space":"nowrap"},id:"pass"+inputsEmail,name:"pass"+inputsEmail,columnWidth:0.33,backupValue:"$unconfigured",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var h=this.getValue();if(!Ext.isEmpty(h)){this.backupValue=h;}},blur:function(){var i=this;if(i.getValue()!==undefined||i.getValue()!=""){var h=this.backupValue;i.setValue(h);}},focus:function(){this.setValue("");}}},{xtype:"textfield",cls:"textbox",inputType:"password",fieldLabel:"Confirm Password",style:{"white-space":"nowrap"},id:"confpass"+inputsEmail,name:"confpass"+inputsEmail,columnWidth:0.33,backupValue:"$unconfigured",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var h=this.getValue();if(!Ext.isEmpty(h)){this.backupValue=h;}},blur:function(){var i=this;if(i.getValue()!==undefined||i.getValue()!=""){var h=this.backupValue;i.setValue(h);}},focus:function(){this.setValue("");}}}]}]};g.add(f);g.doLayout();Ext.getCmp("addEmailBtn").setText("Add More");
Ext.getCmp("updateEmailBtn").enable();Ext.getCmp("clearEmailBtn").enable();Ext.getCmp("NoEmailContainer").hide();if(d){Ext.getCmp("emailid"+inputsEmail).focus(true);}inputsEmail++;}function removeEmailNameContact(c){var d=Ext.getCmp("emailmorecontainer");d.remove(c);if(c=="con_1"){ismulti="true";Ext.getCmp("con_1").removeAll();
Ext.getCmp("con_1").hide();}var a=d.items.length;if(a==0){if(ismulti=="true"){Ext.getCmp("addEmailBtn").setText("Add");Ext.getCmp("NoEmailContainer").show();Ext.getCmp("updateEmailBtn").disable();Ext.getCmp("clearEmailBtn").disable();}}}function addRuleContact(c){var d=false;if(!Ext.isEmpty(c)){d=true;
}var a=Ext.getCmp("egconfigurerulenames");var f=Ext.getCmp("rulenamescontainer");var e="con_"+inputsRule;var g={xtype:"container",id:e,padding:4,margin:"5 5 5 5",border:true,style:"border: lightGrey 1px solid !important",layout:{type:"hbox",pack:"start"},items:[{xtype:"container",layout:{type:"vbox",pack:"start",align:"stretch"},flex:0.3,defaults:{labelSeparator:" ",labelAlign:"top",margin:5},items:[{xtype:"container",layout:{type:"hbox",pack:"start"},margin:"0 0 2 0",items:[{xtype:"button",iconCls:"img_removeShift",tooltip:"<b>Remove rule</b>",style:{background:"none",border:"0px"},margin:0,padding:0,handler:function(){removeRuleNameContact(e);
}}]},{xtype:"textfield",id:"rulename"+inputsRule,cls:"textbox",fieldLabel:ruleNameLbl,value:""},{xtype:"textfield",id:"facility"+inputsRule,cls:"textbox",fieldLabel:faceLbl,value:"all"},{xtype:"textfield",id:"filterhost"+inputsRule,cls:"textbox",fieldLabel:filterHostLbl,value:"all"},{xtype:"textfield",id:"level"+inputsRule,cls:"textbox",fieldLabel:levelLbl,value:"all"}]},{xtype:"container",layout:{type:"vbox",pack:"start",align:"stretch"},flex:1,margin:"0 0 0 5",items:[{xtype:"fieldset",title:incPattLbl,style:{background:"none",border:"1px solid lightGrey"},layout:{type:"vbox",pack:"start",align:"stretch"},margin:"0 0 5 0",items:[{xtype:"container",id:"includePatternContainer"+inputsRule,layout:"column",columnWidth:1,defaults:{labelSeparator:"",margin:"0 5 5 5",columnWidth:0.25},items:[{xtype:"container",id:"multiPatternDiv"+inputsRule,layout:"column",items:[{xtype:"textfield",id:"rulename"+inputsRule+"_incpatt1",name:"rulename"+inputsRule+"_incpatt1",fieldLabel:" 1",labelAlign:"top",labelSeparator:" ",cls:"textbox",value:"$unconfigured",columnWidth:0.9,listeners:{blur:function(){func.buildFilterLogic(this);
}}},{xtype:"component",id:"rulename"+inputsRule+"_icon1",html:'<center><div class="iconPlus" style="cursor:pointer;"  onclick="javascript:addIncludePattern(multiPatternDiv'+inputsRule+')"></center>',columnWidth:0.03,margin:"24 0 0 2"}]}]},{xtype:"fieldcontainer",id:"flfieldcontainer"+inputsRule,layout:"column",columnWidth:1,margin:"10 0 0 0",items:[{xtype:"textfield",id:"filterlogic"+inputsRule,cls:"textbox",margin:"5 0 5 5",fieldLabel:filterLogLbl,labelAlign:"top",columnWidth:0.9,labelSeparator:" ",enableKeyEvents:true,value:"1",listeners:{change:function(){func.overrideFilterLogic(this);
}}},{xtype:"button",ui:"newButtonSmall",id:"flaccept_"+inputsRule,name:"flaccept_"+inputsRule,hidden:true,text:"OK",margin:"26 0 0 10",columnWidth:0.1,handler:function(){allOKEvent(this);}}]},{xtype:"component",id:"errorState_"+inputsRule,anchor:"100%",margin:"0px 0px 0px 5px",bodyPadding:"0px"}]},{xtype:"fieldset",title:execPattLbl,style:{background:"none",border:"1px solid lightGrey"},layout:{type:"vbox",pack:"start",align:"stretch"},margin:0,items:[{xtype:"textfield",id:"excludepattern"+inputsRule,name:"excludepattern"+inputsRule,cls:"textbox",value:"none"}]}]}]};
f.add(g);a.doLayout();Ext.getCmp("addRuleNamebtn").setText("Add More");Ext.getCmp("updateRuleName").enable();Ext.getCmp("clearRuleName").enable();Ext.getCmp("NoRuleNamePattern").hide();if(d){Ext.getCmp("rulename"+inputsRule).focus(true);}if(testName=="DeviceSyslogMsgs"){Ext.getCmp("filterhost"+inputsRule).hide();
}inputs++;inputsRule++;}function removeRuleNameContact(c){var d=Ext.getCmp("rulenamescontainer");d.remove(c);if(c=="configrule_1"){ismulti="true";Ext.getCmp("configrule_1").removeAll();Ext.getCmp("configrule_1").hide();}var a=d.items.length;if(a==0){if(ismulti=="true"){Ext.getCmp("addRuleNamebtn").setText("Add");
Ext.getCmp("NoRuleNamePattern").show();Ext.getCmp("updateRuleName").disable();Ext.getCmp("clearRuleName").disable();}}}function checkFilterLogicFormat(t){var j="andorANDOR0123456789 ";var y="andorANDOR";var m="0123456789";var z=" ()";var e="false";var w=false;var E=false;for(var x=0;x<t.length;x++){var f=t.charAt(x);
if(z.indexOf(f)!=-1){continue;}if(j.indexOf(f)==-1){e="true";break;}if(y.indexOf(f)!=-1){w=true;}if(m.indexOf(f)!=-1){E=true;}}var B=new Array();B=t.split(" ");if(B!=null&&B.length>0){B.forEach(function(a){if(a.indexOf("(")!=-1){a=a.replace(/\(/g,"");}if(a.indexOf(")")!=-1){a=a.replace(/\)/g,"");}if(m.indexOf(a)==-1&&a.toLowerCase()!="and"&&a.toLowerCase()!="or"){e="true";
}});}var F=new Ext.util.HashMap();var q=0;var r=0;for(var p=0;p<B.length;p++){var A=B[p];var n=A;if(B[0].toLowerCase()=="and"||B[0].toLowerCase()=="or"||B[B.length-1].toLowerCase()=="and"||B[B.length-1].toLowerCase()=="or"){e="true";break;}if(p!=(B.length-1)){var h=A;var s=B[p+1];if(h.indexOf("(")!=-1){h=h.replace(/\(/g,"");
}if(h.indexOf(")")!=-1){h=h.replace(/\)/g,"");}if(s.indexOf("(")!=-1){s=s.replace(/\(/g,"");}if(s.indexOf(")")!=-1){s=s.replace(/\)/g,"");}if(m.indexOf(h)!=-1&&m.indexOf(s)!=-1){e="true";break;}else{if(y.indexOf(h)!=-1&&y.indexOf(s)!=-1){e="true";break;}}}for(var u=0;u<A.length;u++){if(A.charAt(u)=="("&&A.charAt(u+1)==")"){e="true";
break;}else{if((A.charAt(u)=="("&&y.indexOf(A.charAt(u+1))!=-1)||(A.charAt(u)==")"&&y.indexOf(A.charAt(u-1))!=-1)){e="true";break;}}}if(e=="true"){F=new Ext.util.HashMap();break;}while(A.indexOf("(")!=-1){if(A.indexOf("(")!=-1){F.add("(",++q);A=A.substring(A.indexOf("(")+1);}}while(n.indexOf(")")!=-1){if(n.indexOf(")")!=-1){F.add(")",++r);
n=n.substring(n.indexOf(")")+1);}}}if(e!="true"){var G=false;if(t.indexOf("(")!=-1&&t.indexOf(")")!=-1){G=true;}if(!Ext.isEmpty(F)){var g=F.get("(");var d=F.get(")");if(g!=d){e="true";}}if((t.indexOf("(")!=-1&&t.indexOf(")")==-1)||(t.indexOf(")")!=-1&&t.indexOf("(")==-1)){e="true";}if(w&&!E){e="true";
}else{if(w&&E){var C=t.charAt(0);var o=t.charAt(t.length-1);if(!G){if(m.indexOf(C)==-1||m.indexOf(o)==-1){e="true";}}for(var D=0;D<t.length;D++){var c=t.charAt(D);if(m.indexOf(c)!=-1){if(!G){if(D==t.length-1){if(t.charAt(D-1)!=" "){e="true";break;}continue;}if(t.charAt(D+1)!=" "){e="true";break;}}else{if((C=="("&&(D==0))&&(o==")"&&(D==t.length-2))){continue;
}if(o!=")"){if(D==t.length-1){continue;}}if(t.charAt(D+1)!=" "&&t.charAt(D+1)!="("&&t.charAt(D+1)!=")"){e="true";break;}}}}}}}if(e=="true"){return false;}else{return true;}}function checkspecialExt(d,c){if(typeof(d)=="object"){obj_val=d.value;}else{obj_val=d;}for(var a=0;a<obj_val.length;a++){check_char=c.indexOf(obj_val.charAt(a));
if(check_char>=0){return false;}}return true;}function allOKEvent(s){var p=s.id;if(!Ext.isEmpty(s)){p=p.substring(p.indexOf("_")+1);}var C=Ext.getCmp("errorState_"+p).html;if(Ext.isEmpty(C)){var k=Ext.getCmp("includePatternContainer"+p);var c=k.items.length;var F=false;var y="";if(c>0){inputsIncPatt=0;
var a=new Array();for(var D=0;D<=c;D++){var G=Ext.getCmp("rulename"+p+"_outercont"+(D+1));if(G==null||G==undefined){continue;}else{if(!Ext.isEmpty(G)&&G.hasCls("disabled-mycomponent")){F=true;y=G.id;k.remove(G);continue;}}var f=G.getId();var A=Ext.getCmp("rulename"+p+"_incpatt"+(D+1)).getValue();a[inputsIncPatt]=A;
inputsIncPatt++;k.remove(G);}if(a!=null&&a.length>0){for(var I=0;I<a.length;I++){var w=a[I];addIncludePatternWithValue("multiPatternDiv"+p,w);}}}var r=Ext.getCmp("filterlogic"+p).getValue();if(F){var L=y.length;var j=y.charAt((L-1));var B=r;var u=new Array();u=r.split(" ");var t=new Array();for(var q=0;
q<u.length;q++){var d=u[q];if(!Ext.isEmpty(d)){if(d.indexOf("(")!=-1){d=d.replace(/\(/g,"");}if(d.indexOf(")")!=-1){d=d.replace(/\)/g,"");}if(d.toLowerCase().indexOf("and")!=-1||d.toLowerCase().indexOf("or")!=-1){continue;}else{t.push(d);}}}u=new Array();u=t;delete t;var K=new Ext.util.HashMap();var J=parseInt(j);
if(u!=null){for(var o=J;o<=u.length;o++){K.add(o+1,o);}}if(!Ext.isEmpty(K)){var H=K.getKeys();for(var z=0;z<H.length;z++){var g=H[z];var x=K.get(z);if(!Ext.isEmpty(B)&&B.indexOf(g)!=-1){var E=K.get(g).toString();B=B.replace(new RegExp(g,"g"),E);}}if(!Ext.isEmpty(B)){if(B.charAt(0)==" "||B.charAt(B.length-1)==" "){B=B.trim();
}}Ext.getCmp("filterlogic"+p).setRawValue(B);}}else{if(!Ext.isEmpty(r)){if(r.charAt(0)==" "||r.charAt(r.length-1)==" "){r=r.trim();}}Ext.getCmp("filterlogic"+p).setRawValue(r);}if(!Ext.isEmpty(Ext.get("rulename"+p+"_icon1"))){Ext.get("rulename"+p+"_icon1").dom.innerHTML='<center><div class="iconPlus" style="cursor:pointer;" onclick="javascript:addIncludePattern(multiPatternDiv'+p+')"></center>';
var n=Ext.getCmp("includePatternContainer"+p);var h=n.items.length;if(h>1){for(var D=1;D<h;D++){var G=Ext.getCmp("rulename"+p+"_icon"+(D+1));if((G==null||G==undefined)||(!Ext.isEmpty(p)&&p==(D+1))){continue;}Ext.get("rulename"+p+"_icon"+(D+1)).dom.innerHTML='<center><div class="iconMinus" style="cursor:pointer;" onclick="javascript:removeIncludePattern(rulename'+p+"_outercont"+(D+1)+')"></center>';
}}}Ext.getCmp("flaccept_"+p).setDisabled(true);Ext.getCmp("flaccept_"+p).hide();}}function addIncludePattern(c){var m=Ext.get(c).id;if(Ext.isEmpty(m)){m=c;}m=m.substring(m.indexOf("Div")+3);var a=Ext.getCmp("egconfigurerulenames");var f=Ext.getCmp("includePatternContainer"+m);if((f.items.getCount())==totalIncPatt){Ext.Msg.show({title:rulePageTitle,msg:limitedIncludePatterns,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return;}var d=true;var k=Ext.getCmp("filterlogic"+m).getValue();d=func.overrideFilterLogic(Ext.getCmp("filterlogic"+m));if(d){var e=(f.items.getCount()+1);var h="rulename"+m+"_outercont"+(f.items.getCount()+1);var g={xtype:"container",id:h,layout:"column",items:[{xtype:"textfield",id:"rulename"+m+"_incpatt"+(f.items.getCount()+1),name:"rulename"+m+"_incpatt"+(f.items.getCount()+1),cls:"textbox",fieldLabel:" "+e,value:"$unconfigured",labelAlign:"top",labelSeparator:" ",columnWidth:0.9,listeners:{blur:function(){}}},{xtype:"component",id:"rulename"+m+"_icon"+(f.items.getCount()+1),html:'<center><div class="iconMinus" style="cursor:pointer;" onclick="javascript:removeIncludePattern('+h+')"></center>',columnWidth:0.03,margin:"24 0 0 2"}]};
f.add(g);a.doLayout();var j=Ext.getCmp("filterlogic"+m).isHidden();if(!j){var i=Ext.getCmp("filterlogic"+m).getValue();Ext.getCmp("filterlogic"+m).setRawValue(i+" and "+e);}Ext.getCmp("flaccept_"+m).setDisabled(true);Ext.getCmp("flaccept_"+m).hide();}}function removeIncludePattern(h){var m=h.id;var q=m;
q=q.substring(0,q.indexOf("_"));q=q.substring(q.lastIndexOf("e")+1);var u=m.length;var j=m.charAt((u-1));var d=Ext.getCmp("filterlogic"+q).isHidden();if(!d){var k=Ext.getCmp("includePatternContainer"+q);var o=Ext.getCmp(m);Ext.getCmp("rulename"+q+"_incpatt"+j).setReadOnly(true);o.addCls("disabled-mycomponent");
var p=Ext.getCmp("filterlogic"+q).getValue();if(!Ext.isEmpty(p)){if(p.charAt(0)==" "||p.charAt(p.length-1)==" "){p=p.trim();}}Ext.getCmp("flaccept_"+q).setDisabled(true);Ext.getCmp("flaccept_"+q).show();if(!Ext.isEmpty(Ext.get("rulename"+q+"_icon1"))){Ext.get("rulename"+q+"_icon1").dom.innerHTML='<center><div class="iconPlus" style="cursor:pointer;"></div></center>';
var n=Ext.getCmp("includePatternContainer"+q);var g=n.items.length;if(g>1){for(var v=1;v<g;v++){var w=Ext.getCmp("rulename"+q+"_icon"+(v+1));if((w==null||w==undefined)){continue;}else{if(!Ext.isEmpty(j)&&j==(v+1)){continue;}}Ext.get("rulename"+q+"_icon"+(v+1)).dom.innerHTML='<center><div class="iconMinus" style="cursor:pointer;"></div></center>';
}}}if(!Ext.isEmpty(p)){if(p.indexOf(j)!=-1){var t='<table cellpadding="0px" cellspacing="0"><tr><td align="middle" valign="middle" style="margin:3px 0px 0px 5px;font-size:11px;color:red"> Error: '+deleteFilterMsg+"</td></tr></table>";Ext.getCmp("errorState_"+q).update(t);}Ext.getCmp("filterlogic"+q).reset();
Ext.getCmp("filterlogic"+q).setValue(p);}Ext.getCmp("filterlogic"+q).focus();}else{var k=Ext.getCmp("includePatternContainer"+q);var c=k.items.length;if(!Ext.isEmpty(Ext.get("rulename"+q+"_icon1"))){Ext.get("rulename"+q+"_icon1").dom.innerHTML='<center><div class="iconPlus" style="cursor:pointer;" onclick="javascript:addIncludePattern(MultiPatternDiv'+q+')"></center>';
}if(c>0){inputsIncPatt=0;var a=new Array();for(var v=0;v<=c;v++){var w=Ext.getCmp("rulename"+q+"_outercont"+(v+1));if(w==null||w==undefined){continue;}else{if(!Ext.isEmpty(j)&&j==(v+1)){k.remove(w);continue;}}var f=w.getId();var s=Ext.getCmp("rulename"+q+"_incpatt"+(v+1)).getValue();a[inputsIncPatt]=s;
inputsIncPatt++;k.remove(w);}if(a!=null&&a.length>0){for(var x=0;x<a.length;x++){var r=a[x];addIncludePatternWithValue("MultiPatternDiv"+q,r);}}}}}function filterLogicFromRemoveMsg(e,f){var k=e.id;var j=f;var d=j.length;var c=j.charAt((d-1));var g=k;g=g.substring(g.lastIndexOf("c")+1);var i=e.value;if(!Ext.isEmpty(i)){if(i.charAt(0)==" "||i.charAt(i.length-1)==" "){i=i.trim();
}}if(Ext.isEmpty(i)){var h="You must enter a value";var a='<table cellpadding="0px" cellspacing="0"><tr><td align="middle" valign="middle" style="margin:3px 0px 0px 5px;font-size:11px;color:red"> Error: '+h+"</td></tr></table>";Ext.getCmp("errorState_"+g).update(a);return false;}else{if(!checkFilterLogicFormat(i)){var a='<table cellpadding="0px" cellspacing="0"><tr><td align="middle" valign="middle" style="margin:3px 0px 0px 5px;font-size:11px;color:red"> Error: '+filterLogicPatternMsg+"</td></tr></table>";
Ext.getCmp("errorState_"+g).update(a);return false;}}return true;}function addIncludePatternWithValue(e,f){var c=e;c=c.substring(c.indexOf("Div")+3);var a=Ext.getCmp("egconfigurerulenames");var d=Ext.getCmp("includePatternContainer"+c);if(!Ext.isEmpty(d.items)){if((d.items.getCount())==totalIncPatt){Ext.Msg.show({title:rulePageTitle,msg:limitedIncludePatterns,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return;}}var i=(d.items.getCount()+1);var g="rulename"+c+"_outercont"+(d.items.getCount()+1);var h={xtype:"container",id:g,layout:"column",items:[{xtype:"textfield",id:"rulename"+c+"_incpatt"+(d.items.getCount()+1),name:"rulename"+c+"_incpatt"+(d.items.getCount()+1),cls:"textbox",fieldLabel:" "+i,value:f,labelAlign:"top",labelSeparator:" ",columnWidth:0.9,listeners:{blur:function(){func.buildFilterLogic(this);
}}},{xtype:"component",id:"rulename"+c+"_icon"+(d.items.getCount()+1),html:'<center><div class="iconMinus" style="cursor:pointer;" onclick="javascript:removeIncludePattern('+g+')"></center>',columnWidth:0.03,margin:"24 0 0 2"}]};d.add(h);a.doLayout();}function addMultiHLSContact(){var a=Ext.getCmp("eghlspublishedresources");
var d=Ext.getCmp("backupmulticontainer");var e="con_"+inputsmultisrc;var c={xtype:"fieldset",id:e,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(){removeMultiHLSSet(e);
}}]},{xtype:"container",layout:"column",defaults:{margin:10,labelSeparator:" ",labelWidth:150},items:[{xtype:"textfield",cls:"textbox",fieldLabel:"Published resources",style:{"white-space":"nowrap"},id:"publisresource"+inputsmultisrc,value:"$unconfigured",columnWidth:1},{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 f=this.getValue();if(!Ext.isEmpty(f)){this.backupValue=f;}},blur:function(){var g=this;if(g.getValue()!==undefined||g.getValue()!=""){var f=this.backupValue;g.setValue(f);}},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 f=this.getValue();if(!Ext.isEmpty(f)){this.backupValue=f;}},blur:function(){var g=this;if(g.getValue()!==undefined||g.getValue()!=""){var f=this.backupValue;g.setValue(f);}},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(h,g){var g=this.getChecked()[0];
var f=this.getId().replace("twofact","twofacttoken");if(g.getGroupValue()=="false"){Ext.getCmp(f).setVisible(false);}else{Ext.getCmp(f).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 f=this.getValue();if(!Ext.isEmpty(f)){this.backupValue=f;}},blur:function(){var g=this;if(g.getValue()!==undefined||g.getValue()!=""){var f=this.backupValue;g.setValue(f);}},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}]}]}]};
d.add(c);a.doLayout();Ext.getCmp("publisresource"+inputsmultisrc).focus(true);Ext.getCmp("addMultiHLSbtn").setText("Add More");Ext.getCmp("updateMultiHLSbtn").enable();Ext.getCmp("clearMultiHLSbtn").enable();Ext.getCmp("NoMultiUsrPattern").hide();inputsmultisrc++;}function removeMultiHLSSet(c){var d=Ext.getCmp("backupmulticontainer");
d.remove(c);if(c=="conmulti_1"){ismultisrc="true";Ext.getCmp("conmulti_1").removeAll();Ext.getCmp("conmulti_1").hide();}var a=d.items.length;if(a==0){Ext.getCmp("addMultiHLSbtn").setText("Add");if(ismultisrc=="true"){Ext.getCmp("NoMultiUsrPattern").show();Ext.getCmp("clearMultiHLSbtn").disable();Ext.getCmp("updateMultiHLSbtn").disable();
}}}function addURLsConf(g){var f=Ext.getCmp("siteurlconfiguration");var d=Ext.getCmp("siteurlcontainer");var a="siteurl_conf"+inputsService;var e="$unconfigured";if(!Ext.isEmpty(g)&&g!=undefined&&g!="isTextFocus"){e=g;}var c={xtype:"fieldset",id:a,width:800,layout:{type:"vbox",pack:"start",align:"stretch"},padding:"5 0 5 10",margin:"10 10 5 10",items:[{xtype:"container",layout:"column",defaults:{labelSeparator:" ",labelWidth:40},items:[{xtype:"textfield",cls:"textbox",fieldLabel:"Name",id:"siteUsageUnam"+inputsService,name:"siteUsageUnam"+inputsService,value:"$unconfigured",columnWidth:0.26,margin:"5 0 5 0"},{xtype:"textfield",cls:"textbox",fieldLabel:"URL",id:"siteUsage"+inputsService,name:"siteUsage"+inputsService,value:e,columnWidth:0.7,margin:"5 0 5 20"},{xtype:"button",iconCls:"img_removeShift",tooltip:"<b>Remove</b>",style:{background:"none",border:"0px"},columnWidth:0.04,margin:"5 0 0 5",handler:function(){removeSiteurlContact(a);
}}]}]};d.add(c);if(g=="isTextFocus"){Ext.getCmp("siteUsageUnam"+inputsService).focus();Ext.getCmp("siteUsage"+inputsService).focus();}f.doLayout();inputsService++;Ext.getCmp("addURLsConfbtn").setText("Add More");Ext.getCmp("updateSitURLs").enable();Ext.getCmp("clearSitURLs").enable();Ext.getCmp("NoSiteurlConf").hide();
}function removeSiteurlContact(a){var d=Ext.getCmp("siteurlcontainer");d.remove(a);if(a=="siteurl_conf1"){noServiceConfig="true";Ext.getCmp("siteurl_conf1").removeAll();Ext.getCmp("siteurl_conf1").hide();}var c=d.items.length;if(c==0){Ext.getCmp("addURLsConfbtn").setText("Add");if(noServiceConfig=="true"){Ext.getCmp("NoSiteurlConf").show();
Ext.getCmp("updateSitURLs").disable();Ext.getCmp("clearSitURLs").disable();}}}function addResourceSetFields(a){var d=false;if(!Ext.isEmpty(a)){d=true;}var c=Ext.getCmp("backupmulticontainer");var e="con_"+inputsResourceSet;var f={xtype:"fieldset",id:e,width:800,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(){removeResourceSet(e);
}}]},{xtype:"container",layout:"column",defaults:{margin:10,labelSeparator:" ",labelWidth:150},items:[{xtype:"textfield",cls:"textbox",fieldLabel:"Published resources",style:{"white-space":"nowrap"},id:"publisresource"+inputsResourceSet,name:"publisresource"+inputsResourceSet,value:"$unconfigured",columnWidth:0.5},{xtype:"textfield",cls:"textbox",fieldLabel:User,style:{"white-space":"nowrap"},id:"username"+inputsResourceSet,name:"username"+inputsResourceSet,value:"$unconfigured",columnWidth:0.5},{xtype:"textfield",cls:"textbox",inputType:"password",fieldLabel:"Password",style:{"white-space":"nowrap"},id:"pwd"+inputsResourceSet,name:"pwd"+inputsResourceSet,columnWidth:0.5,backupValue:"$unconfigured",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var g=this.getValue();if(!Ext.isEmpty(g)){this.backupValue=g;}},blur:function(){var h=this;if(h.getValue()!==undefined||h.getValue()!=""){var g=this.backupValue;h.setValue(g);}},focus:function(){this.setValue("");}}},{xtype:"textfield",cls:"textbox",inputType:"password",fieldLabel:"Confirm Password",style:{"white-space":"nowrap"},id:"confpwd"+inputsResourceSet,name:"confpwd"+inputsResourceSet,columnWidth:0.5,backupValue:"$unconfigured",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var g=this.getValue();if(!Ext.isEmpty(g)){this.backupValue=g;}},blur:function(){var h=this;if(h.getValue()!==undefined||h.getValue()!=""){var g=this.backupValue;h.setValue(g);}},focus:function(){this.setValue("");}}},{xtype:"fieldcontainer",id:"twofaCont"+inputsResourceSet,fieldLabel:"Is 2FA enabled?",columnWidth:0.5,layout:"column",items:[{xtype:"radiogroup",columnWidth:0.6,cls:"radiobt",id:"twofact"+inputsResourceSet,vertical:false,columns:2,items:[{boxLabel:"Yes",name:"twofactlabel"+inputsResourceSet,id:"twofactlabel"+inputsResourceSet+"_1",inputValue:"true"},{boxLabel:"No",name:"twofactlabel"+inputsResourceSet,id:"twofactlabel"+inputsResourceSet+"_2",inputValue:"false",checked:true}],listeners:{"change":function(i,h){var h=this.getChecked()[0];
var g=this.getId().replace("twofact","twofacttoken");if(h.getGroupValue()=="false"){Ext.getCmp(g).setVisible(false);}else{Ext.getCmp(g).setVisible(true);}}}},{xtype:"textfield",cls:"textbox",style:{"white-space":"nowrap"},id:"twofacttoken"+inputsResourceSet,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 g=this.getValue();if(!Ext.isEmpty(g)){this.backupValue=g;}},blur:function(){var h=this;if(h.getValue()!==undefined||h.getValue()!=""){var g=this.backupValue;h.setValue(g);}},focus:function(){this.setValue("");}}}]},{xtype:"radiogroup",columnWidth:0.5,cls:"radiobt",id:"disclaimer_radioGrp"+inputsResourceSet,fieldLabel:"Is disclaimer enabled?",vertical:false,columns:2,items:[{boxLabel:"Yes",name:"disclaimermultiusr"+inputsResourceSet,id:"disclaimermultiusr"+inputsResourceSet+"_1",inputValue:"true"},{boxLabel:"No",name:"disclaimermultiusr"+inputsResourceSet,id:"disclaimermultiusr"+inputsResourceSet+"_2",inputValue:"false",checked:true}]}]}]};
c.add(f);c.doLayout();Ext.getCmp("addResourcebtn").setText("Add More");Ext.getCmp("updateResourceBtn").enable();Ext.getCmp("clearResourceBtn").enable();Ext.getCmp("NoResourcePattern").hide();if(d){Ext.getCmp("publisresource"+inputsResourceSet).focus(true);}inputsResourceSet++;}function removeResourceSet(c){var d=Ext.getCmp("backupmulticontainer");
d.remove(c);if(c=="con_1"){ismulti="true";Ext.getCmp("con_1").removeAll();Ext.getCmp("con_1").hide();}var a=d.items.length;if(a==0){if(ismulti=="true"){Ext.getCmp("addResourcebtn").setText("Add");Ext.getCmp("NoResourcePattern").show();Ext.getCmp("updateResourceBtn").disable();Ext.getCmp("clearResourceBtn").disable();
}}}function addAmazonResourceSetFields(a){var d=false;if(!Ext.isEmpty(a)){d=true;}var c=Ext.getCmp("backupamazonresrccontainer");var e="con_"+inputsResourceSet;var f={xtype:"fieldset",id:e,width:800,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(){removeAmazonResourceSet(e);
}}]},{xtype:"container",layout:"column",defaults:{margin:10,labelSeparator:" ",labelWidth:150},items:[{xtype:"textfield",cls:"textbox",fieldLabel:"Published resources",style:{"white-space":"nowrap"},id:"publisresource"+inputsResourceSet,name:"publisresource"+inputsResourceSet,value:"$unconfigured",columnWidth:0.5},{xtype:"textfield",cls:"textbox",fieldLabel:registrationCode,style:{"white-space":"nowrap"},inputType:"password",id:"regcode"+inputsResourceSet,name:"regcode"+inputsResourceSet,columnWidth:0.5,backupValue:"$unconfigured",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var g=this.getValue();if(!Ext.isEmpty(g)){this.backupValue=g;}},blur:function(){var h=this;if(h.getValue()!==undefined||h.getValue()!=""){var g=this.backupValue;h.setValue(g);}},focus:function(){this.setValue("");}}},{xtype:"textfield",cls:"textbox",fieldLabel:Domain,style:{"white-space":"nowrap"},id:"domain"+inputsResourceSet,name:"domain"+inputsResourceSet,value:"$unconfigured",columnWidth:0.5},{xtype:"textfield",cls:"textbox",fieldLabel:User,style:{"white-space":"nowrap"},id:"username"+inputsResourceSet,name:"username"+inputsResourceSet,value:"$unconfigured",columnWidth:0.5},{xtype:"textfield",cls:"textbox",inputType:"password",fieldLabel:"Password",style:{"white-space":"nowrap"},id:"pwd"+inputsResourceSet,name:"pwd"+inputsResourceSet,columnWidth:0.5,backupValue:"$unconfigured",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var g=this.getValue();if(!Ext.isEmpty(g)){this.backupValue=g;}},blur:function(){var h=this;if(h.getValue()!==undefined||h.getValue()!=""){var g=this.backupValue;h.setValue(g);}},focus:function(){this.setValue("");}}},{xtype:"textfield",cls:"textbox",inputType:"password",fieldLabel:"Confirm Password",style:{"white-space":"nowrap"},id:"confpwd"+inputsResourceSet,name:"confpwd"+inputsResourceSet,columnWidth:0.5,backupValue:"$unconfigured",listeners:{afterrender:function(){this.setValue(this.backupValue);
},change:function(){var g=this.getValue();if(!Ext.isEmpty(g)){this.backupValue=g;}},blur:function(){var h=this;if(h.getValue()!==undefined||h.getValue()!=""){var g=this.backupValue;h.setValue(g);}},focus:function(){this.setValue("");}}}]}]};c.add(f);c.doLayout();Ext.getCmp("addAmazonResourcebtn").setText("Add More");
Ext.getCmp("updateAmazonResourceBtn").enable();Ext.getCmp("clearAmazonResourceBtn").enable();Ext.getCmp("NoAmazonResourcePattern").hide();if(d){Ext.getCmp("publisresource"+inputsResourceSet).focus(true);}inputsResourceSet++;}function removeAmazonResourceSet(c){var d=Ext.getCmp("backupamazonresrccontainer");
d.remove(c);if(c=="con_1"){ismulti="true";Ext.getCmp("con_1").removeAll();Ext.getCmp("con_1").hide();}var a=d.items.length;if(a==0){if(ismulti=="true"){Ext.getCmp("addAmazonResourcebtn").setText("Add");Ext.getCmp("NoAmazonResourcePattern").show();Ext.getCmp("updateAmazonResourceBtn").disable();Ext.getCmp("clearAmazonResourceBtn").disable();
}}}function addHorizonMultiSet(){if(inputs==totalInputs){Ext.Msg.show({title:alertTitle,msg:limitedLevel,buttons:Ext.Msg.OK,icon:"iconExclamation"});return;}var a=Ext.getCmp("horizoncloudmultipleusers");var d=Ext.getCmp("backupmulticontainer");var e="con_"+inputsmulti;var c={xtype:"fieldset",id:e,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(){removeHorizonMultiSet(e);
}}]},{xtype:"container",layout:"column",defaults:{margin:10,labelSeparator:" ",labelWidth:120},items:[{xtype:"textfield",cls:"textbox",fieldLabel:serNameLbl,style:{"white-space":"nowrap"},id:"servnamemultiusr"+inputsmulti,value:"$unconfigured",labelWidth:150,columnWidth:1},{xtype:"textfield",cls:"textbox",fieldLabel:domNameLbl,style:{"white-space":"nowrap"},id:"domainmultiusr"+inputsmulti,value:"$unconfigured",columnWidth:0.5},{xtype:"textfield",cls:"textbox",fieldLabel:userNameLbl,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 f=this.getValue();if(!Ext.isEmpty(f)){this.backupValue=f;}},blur:function(){var g=this;if(g.getValue()!==undefined||g.getValue()!=""){var f=this.backupValue;g.setValue(f);}},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 f=this.getValue();if(!Ext.isEmpty(f)){this.backupValue=f;}},blur:function(){var g=this;if(g.getValue()!==undefined||g.getValue()!=""){var f=this.backupValue;g.setValue(f);}},focus:function(){this.setValue("");}}}]}]};d.add(c);a.doLayout();inputsmulti++;Ext.getCmp("addServersMultiSet").setText("Add More");
Ext.getCmp("updateServersMultiSet").enable();Ext.getCmp("clearServersMultiSet").enable();Ext.getCmp("NoServersPattern").hide();}function removeHorizonMultiSet(c){var d=Ext.getCmp("backupmulticontainer");d.remove(c);if(c=="conmulti_1"){ismulti="true";Ext.getCmp("conmulti_1").removeAll();Ext.getCmp("conmulti_1").hide();
}var a=d.items.length;if(a==0){Ext.getCmp("addServersMultiSet").setText("Add");if(ismulti=="true"){Ext.getCmp("NoServersPattern").show();Ext.getCmp("updateServersMultiSet").disable();Ext.getCmp("clearServersMultiSet").disable();}}}function postCustomFormSubmit(c){var d="/final/admin/SnmpGetSubtree/data/EgSnmpOutputSaveJson.jsp?download=true&com.eg.CSRF_NONCE="+csrfToken;
var e=document.createElement("form");e.setAttribute("method","post");e.setAttribute("action",d);var a=document.createElement("input");a.setAttribute("type","hidden");a.setAttribute("name","formdata");a.setAttribute("value",filterEncode(c));e.appendChild(a);document.body.appendChild(e);e.submit();}