Ext.Msg.bodyPadding="10 0";Ext.Msg.cls="adminAlert";var mgrModel="";Ext.define("ManagerSettings.controller.Main",{extend:"Ext.app.Controller",views:["TTManager","General","ManagerNotification","TestConfiguration","CommandExecution","ThresholdConfiguration","LogSettings","AdvancedSettings","CapacityPlanning","VirtualTopology","Auditing","Viewport","FileUpload","FileUploadForm","SettingList","AccountLockOut","SingleSignOn","PasswordPolicy","SecurityFilter","TwoFactorAuth","ListView","TTManagerSnmp","EgManagerModel","DeleteUsers","Supermanager"],refs:[{selector:"settinglist",ref:"settinglist"},{selector:"ttmanager",ref:"ttmanager"},{selector:"TTlistview",ref:"TTlistview"},{selector:"ttmanagermailsnmp",ref:"ttmanagermailsnmp"},{selector:"ttmanagersnmp",ref:"ttmanagersnmp"},{selector:"ttcommonsettings",ref:"ttcommonsettings"},{selector:"ttmanagerwebservice",ref:"ttmanagerwebservice"},{selector:"ttmanagercli",ref:"ttmanagercli"},{selector:"general",ref:"general"},{selector:"managerNotification",ref:"managerNotification"},{selector:"testconfiguration",ref:"testconfiguration"},{selector:"commandexecution",ref:"commandexecution"},{selector:"thresholdconfiguration",ref:"thresholdconfiguration"},{selector:"logsettings",ref:"logsettings"},{selector:"advancedsettings",ref:"advancedsettings"},{selector:"capacityplanning",ref:"capacityplanning"},{selector:"virtualtopology",ref:"virtualtopology"},{selector:"auditing",ref:"auditing"},{selector:"viewport",ref:"viewport"},{selector:"fileupload",ref:"fileupload"},{selector:"fileuploadform",ref:"fileuploadform"},{selector:"acklockout",ref:"acklockout"},{selector:"singlesignon",ref:"singlesignon"},{selector:"pwdpolicy",ref:"pwdpolicy"},{selector:"securityfilter",ref:"securityfilter"},{selector:"twofactorauth",ref:"twofactorauth"},{selector:"egmgrmodel",ref:"egmgrmodel"},{selector:"deleteusers",ref:"deleteusers"},{selector:"supermanager",ref:"supermanager"}],init:function(){thisController=this;
archeiveFile="";archeiveFileUpload="";fileName="";ttWrapper="";TTSysForRemove="";ttWrapperClass="Default";isAcmeUploaded="no";selectedIntegrationName="";this.control({"settinglist":{"select":this.onSelectData},"viewport #btnBack":{"click":this.forwardToRequestedURI},"viewport":{"afterrender":this.afterMainRender},'managerNotification button[id="notificationUpdate"]':{"click":this.notificationUpdate},'testconfiguration button[id="testConfigUpdateBtn"]':{"click":this.testConfigUpdate},'thresholdconfiguration combo[id="threshIntervalForDisplay"]':{"select":this.threshIntervalChange},'thresholdconfiguration button[id="threshUpdateBtn"]':{"click":this.thresholdConfigUpdate},'commandexecution button[id="commandExecUpdateBtn"]':{"click":this.commandExecUpdate},'ttmanager combo[id="TT_sys"]':{"select":this.ttManagerSystemComboChange},'ttmanager button[id="UpdateBtn"]':{"click":this.ttManagerUpdate},'ttmanager radio[id="TTIntegrationEnable"]':{"change":this.radioChange},'ttmanager radio[name="ttWrapperClassNeeded"]':{"change":this.wrapperClassRadioChange},'ttmanager radio[id="TTIntegrationDisable"]':{"change":this.radioChange},'ttmanager button[id="uploadFile"]':{"click":this.uploadAcmeFile},'ttcommonsettings button[id="UpdateCommonBtn"]':{"click":this.submitTTFilterElements},'ttcommonsettings combo[id="filter"]':{"select":this.popFilterDetails},'ttcommonsettings combo[id="CompTypes"]':{"select":this.popCompTypes},'ttcommonsettings combo[id="compTypesIn"]':{"select":this.viewByCriteria},'ttcommonsettings combo[id="serseg"]':{"select":this.changeByServer},'ttcommonsettings combo[id="Test"]':{"select":this.changeByTest},'ttcommonsettings multiselectSi[id="compName"]':{"change":this.changeByComponentName},'ttcommonsettings button[id="includeMore"]':{"click":this.assignAndAddMoreFilters},'ttcommonsettings button[id="btnViewFilters"]':{"click":this.viewFilteredElements},'ttmanagercli button[id="UpdateCliBtn"]':{"click":this.ttCliUpdate},'ttmanagermailsnmp button[id="UpdateMailBtn"]':{"click":this.ttMailUpdate},'ttmanagersnmp button[id="UpdateSnmpBtn"]':{"click":this.ttSnmpUpdate},'ttmanagerwebservice button[id="UpdateWebserviceBtn"]':{"click":this.ttWebserviceUpdate},'ttmanagerwebservice combo[id="TT_sys"]':{"select":this.ttWebserviceSysCombo},'ttmanagerwebservice combo[id="authType"]':{"select":this.ttWebserviceAuthtypeCombo},'ttmanagerwebservice radio[name="ttWrapperClassNeeded"]':{"change":this.wrapperClassRadioChange},'ttmanagerwebservice button[id="uploadFile"]':{"click":this.uploadAcmeFile},'logsettings button[id="logUpdateBtn"]':{"click":this.logUpdate},'auditing radio[name="EnableAuditlog"]':{"change":this.auditingRadioChange},'auditing button[id="auditingUpdateBtn"]':{"click":this.auditingUpdate},'advancedsettings button[id="advSetUpdateBtn"]':{"click":this.advSetUpdate},'capacityplanning button[id="capUpdateBtn"]':{"click":this.capacityPlanningUpdate},'virtualtopology button[id="virtualTopoUpdateBtn"]':{"click":this.virtualTopoUpdate},'fileuploadform button[id="fileUploadBtn"]':{"click":this.fileUpload},'general button[id="UpdateBtn"]':{"click":this.generalSettingsUpdate},'general radio[id="yesLoginAuthentication"]':{"change":this.checkAutoLoginFeature},'acklockout radio[name="lckTypeRadio"]':{"change":this.acklckoutRadioChange},'acklockout radio[name="lckStrategyRadio"]':{"change":this.lckStrategyRadioChange},'acklockout button[id="UpdateBtn"]':{"click":this.acklockoutUpdate},'singlesignon button[id="UpdateBtn"]':{"click":this.ssoLoginUpdate},'pwdpolicy radiogroup[id="minHistoryEnable"]':{"change":this.enablePasswordHistory},'pwdpolicy button[id="UpdateBtn"]':{"click":this.pwdpolicyUpdate},'securityfilter button[id="secureFilterUpdate"]':{"click":this.secureFilterUpdate},'twofactorauth radio[id="enable2FAYesFlag"]':{change:this.show2FACnt},'twofactorauth radio[id="compulsoryFlag"]':{change:this.showVerificationModePanel},'twofactorauth button[id="twofa_submit_btn"]':{click:this.updateTFAAuthConfigDetails},'egmgrmodel radio[id="mgrModelEnterprise"]':{change:this.mgrModelRadioChange},'egmgrmodel radio[id="selfRegYes"]':{change:this.selfRegChange},'egmgrmodel button[id="mgrModelUpdate"]':{click:this.updateMgrModel},'deleteusers button[id="deleteUsersUpdateBtn"]':{"click":this.deleteUsersUpdate},'supermanager button[id="supermanagerUpdateBtn"]':{"click":this.supermanagerUpdate}});
},idpLogoutFunc:function(b){if(b.id.toLowerCase()=="yesssologin"){var a=ssoLoginJson.loginAuthentication;if(!Ext.isEmpty(a)&&!a){Ext.Msg.confirm(SSOTitleLbl,autoLoginAlertMsg1+". "+autoLoginAlertMsg5,function(c){if(c==="yes"){thisController.turnOffAutoLogin();Ext.getCmp("idpLogout").show();}else{Ext.getCmp("nossoLogin").setValue(true);
Ext.getCmp("idpLogout").hide();}});}else{Ext.getCmp("idpLogout").show();}if(ssoLoginJson.isIdpLogout){Ext.getCmp("yesidpLogout").setValue(true);}else{Ext.getCmp("noidpLogout").setValue(true);}}else{Ext.getCmp("idpLogout").hide();}},afterMainRender:function(){var g=Ext.getCmp("mainViewId");var k=Ext.getCmp("innerPanel");
var p=Ext.getCmp("yesAvgSumTrends");var s=Ext.getCmp("noAvgSumTrends");var a=Ext.getCmp("TrendMgrThreads");var l=Ext.getCmp("ThresholdMgrThreads");var q=Ext.getCmp("ThresholdRunDuration");var r=Ext.getCmp("ThresholdAdjustPeriod");var j=Ext.getCmp("timeFrom");var n=Ext.getCmp("timeTo");var t=Ext.getCmp("yesAutoIpNameCheck");
var d=Ext.getCmp("noAutoIpNameCheck");var f=Ext.getCmp("yesNickIpCheck");var m=Ext.getCmp("noNickIpCheck");var o=Ext.getCmp("yesLoginAuthentication");var h=Ext.getCmp("noLoginAuthentication");var e="";Ext.getCmp("innerPanel").setTitle("GENERAL SETTINGS");var c="/final/admin/ManagerSettings/data/generalSettingsJSON.jsp";
Ext.Ajax.request({url:c,scope:this,method:"POST",success:function(y){var w=y.responseText;var C=Ext.decode(w);var B=C.eGMgrModel;if(!Ext.isEmpty(B)&&B.toLowerCase()=="msp"){Ext.getCmp("AutoIpNameCheckID").disable();Ext.getCmp("NickIpCheck").disable();}else{Ext.getCmp("authModeForLogin").show();var u=C.authModeForLogin;
if(u=="SAML"){Ext.getCmp("idpAuthMode").setValue(true);}else{if(u=="Domain"){Ext.getCmp("domainAuthMode").setValue(true);}else{Ext.getCmp("eGAuthMode").setValue(true);}}}e=C.relativeThresholdHours;var F=C.avgSumTrends;if(F=="Yes"){p.setValue(true);}else{s.setValue(true);}a.setValue(C.trendMgrThreads);
l.setValue(C.thresholdMgrThreads);q.setValue(C.thresholdRunDuration);r.setValue(C.thresholdAdjustPeriod);j.setValue(C.fromTime.fromStr);var z=C.toTime.toStr;if(z=="24:00"){n.setValue("23:59");}else{n.setValue(z);}var G=C.autoIpNameCheck;if(G=="Yes"){t.setValue(true);}else{d.setValue(true);}var E=C.nickIpCheck;
if(E=="Yes"){f.setValue(true);}else{m.setValue(true);}var x=C.loginAuthentication;if(x){o.setValue(true);}else{h.setValue(true);}var H=C.isDisableTrend;if(!Ext.isEmpty(H)&&H.toLowerCase()=="no"){var v=Ext.getCmp("managerSetTreePanel");var A=v.getStore().getNodeById(selectedNodeID);v.getSelectionModel().select(A);
if(selectedNodeID=="capacityPlanningNode"){var D=Ext.getCmp("innerPanel");D.removeAll();D.add({xtype:"capacityplanning"});Ext.getCmp("innerPanel").setTitle("CAPACITY PLANNING");Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/capacityPlanningJSON.jsp",method:"POST",success:function(L){if(L.status==200&&!Ext.isEmpty(L.responseText)){var I=L.responseText;
var Q=Ext.decode(I);var N=Ext.getCmp("yesCapacityTrend");var K=Ext.getCmp("noCapacityTrend");var M=Ext.getCmp("yesCapcityreport");var J=Ext.getCmp("noCapcityreport");var O=Q.capacitytrendenable;var P=Q.capacityreportenable;if(O=="true"){N.setValue("true");}if(O=="false"){K.setValue("false");}if(P=="true"){M.setValue("true");
}if(P=="false"){J.setValue("false");}}}});}else{if(selectedNodeID=="twofa"){var D=Ext.getCmp("innerPanel");Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");D.removeAll();D.add({xtype:"twofactorauth"});
thisController.get2FAConfigDetails();}else{if(selectedNodeID=="egmgrmodel"){Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");thisController.getMgrModelDetails();}}}}else{var v=Ext.getCmp("managerSetTreePanel");
var A=v.getStore().getNodeById("capacityPlanningNode");A.parentNode.removeChild(A);}if(isCallToEnableCPFromReporter.toLowerCase()=="true"){Ext.getCmp("btnBack").show();}}});if(isMsp){var b=Ext.getCmp("managerSetTreePanel").getStore().getNodeById("ssoNode");b.remove(true);Ext.getCmp("managerSetTreePanel").getStore().sync();
}},forwardToRequestedURI:function(){if(fromPage=="home"){window.location.href="/final/admin/EgAdminOperations.jsp";}else{var a=window;while(a.parent!=a||a.opener!=null){mainWindow=a;a=(a.parent==a?a.opener:a.parent);}if(a.location.pathname!="/"){mainWindow=a;}mainWindow.location.href="/final/egIndex.jsp?entry=reporter&displayTab=all&integritycheckviolated=false";
mainWindow.focus();}},onSelectData:function(t,R,E,K,Y,T){var Q=Ext.getCmp("mainViewId");var F=Ext.getCmp("innerPanel");if(!Ext.isEmpty(F.getDockedComponent("dockTool"))){F.removeDocked(F.getDockedComponent("dockTool"));}if(R.data.text==gerneralTitle){sessionStorage.setItem("lastSelectedEvent","generalId");
Ext.getCmp("innerPanel").setTitle(gerneralTitle.toUpperCase());var f="/final/admin/ManagerSettings/data/generalSettingsJSON.jsp";Ext.Ajax.request({url:f,scope:this,method:"POST",success:function(e){F.removeAll();F.add({xtype:"general"});var aw=Ext.getCmp("yesAvgSumTrends");var az=Ext.getCmp("noAvgSumTrends");
var ac=Ext.getCmp("TrendMgrThreads");var ao=Ext.getCmp("ThresholdMgrThreads");var ax=Ext.getCmp("ThresholdRunDuration");var ay=Ext.getCmp("ThresholdAdjustPeriod");var al=Ext.getCmp("timeFrom");var aq=Ext.getCmp("timeTo");var aA=Ext.getCmp("yesAutoIpNameCheck");var ag=Ext.getCmp("noAutoIpNameCheck");var aj=Ext.getCmp("yesNickIpCheck");
var ap=Ext.getCmp("noNickIpCheck");var at=Ext.getCmp("yesLoginAuthentication");var ak=Ext.getCmp("noLoginAuthentication");var ah="";var au=e.responseText;var ae=Ext.decode(au);var ar=ae.eGMgrModel;if(!Ext.isEmpty(ar)&&ar.toLowerCase()=="msp"){Ext.getCmp("AutoIpNameCheckID").disable();Ext.getCmp("NickIpCheck").disable();
}else{Ext.getCmp("authModeForLogin").show();var ai=ae.authModeForLogin;if(ai=="SAML"){Ext.getCmp("idpAuthMode").setValue(true);}else{if(ai=="Domain"){Ext.getCmp("domainAuthMode").setValue(true);}else{Ext.getCmp("eGAuthMode").setValue(true);}}}ah=ae.relativeThresholdHours;var av=ae.avgSumTrends;if(av=="Yes"){aw.setValue(true);
}else{az.setValue(true);}ac.setValue(ae.trendMgrThreads);ao.setValue(ae.thresholdMgrThreads);ax.setValue(ae.thresholdRunDuration);ay.setValue(ae.thresholdAdjustPeriod);al.setValue(ae.fromTime.fromStr);var ad=ae.toTime.toStr;if(ad=="24:00"){aq.setValue("23:59");}else{aq.setValue(ad);}var am=ae.autoIpNameCheck;
if(am=="Yes"){aA.setValue(true);}else{ag.setValue(true);}var af=ae.nickIpCheck;if(af=="Yes"){aj.setValue(true);}else{ap.setValue(true);}var an=ae.loginAuthentication;if(an){at.setValue(true);}else{ak.setValue(true);}}});}if(R.data.text==notificationTitle){sessionStorage.setItem("lastSelectedEvent","notificationId");
Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");Ext.getCmp("innerPanel").setTitle(notificationTitle.toUpperCase());var f="/final/admin/ManagerSettings/data/managerNotificationJSON.jsp";
Ext.Ajax.request({url:f,scope:this,method:"POST",success:function(ae){F.removeAll();F.add({xtype:"managerNotification"});var ad=ae.responseText;var ah=Ext.decode(ad);var aj=ah.enableLicenseExpiry;var e=ah.licenseCountExpiryAlert;var af=ah.popupDiscComps;var ai=ah.alertForAgentsNotRun;var ac=ah.alertForUnconfigAgents;
var ag=ah.alertForUpgradeTests;if(!Ext.isEmpty(aj)&&(aj.toLowerCase()=="true"||aj.toLowerCase()=="yes")){Ext.getCmp("yesExpiryAlert").setValue(true);}else{Ext.getCmp("noExpiryAlert").setValue(true);}if(!Ext.isEmpty(e)&&(e.toLowerCase()=="true"||e.toLowerCase()=="yes")){Ext.getCmp("yesAgentExhaustedAlert").setValue(true);
}else{Ext.getCmp("noAgentExhaustedAlert").setValue(true);}if(!Ext.isEmpty(af)&&(af.toLowerCase()=="true"||af.toLowerCase()=="yes")){Ext.getCmp("yesDiscCompsFlag").setValue(true);}else{Ext.getCmp("noDiscCompsFlag").setValue(true);}if(!Ext.isEmpty(ai)&&(ai.toLowerCase()=="true"||ai.toLowerCase()=="yes")){Ext.getCmp("yesNotRunningAgents").setValue(true);
}else{Ext.getCmp("noNotRunningAgents").setValue(true);}if(!Ext.isEmpty(ac)&&(ac.toLowerCase()=="true"||ac.toLowerCase()=="yes")){Ext.getCmp("yesUnConfigAgentsList").setValue(true);}else{Ext.getCmp("noUnConfigAgentsList").setValue(true);}if(!Ext.isEmpty(ag)&&(ag.toLowerCase()=="true"||ag.toLowerCase()=="yes")){Ext.getCmp("yesUpgradeTests").setValue(true);
}else{Ext.getCmp("noUpgradeTests").setValue(true);}}});}if(R.data.text==testConfigTitle){sessionStorage.setItem("lastSelectedEvent","testConfigId");Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");
var f="/final/admin/ManagerSettings/data/testConfigurationJSON.jsp";Ext.Ajax.request({url:f,scope:this,method:"POST",success:function(e){F.removeAll();F.add({xtype:"testconfiguration"});Ext.getCmp("innerPanel").setTitle(testConfigTitle.toUpperCase());var ae=Ext.getCmp("yesEditHost");var ag=Ext.getCmp("noEditHost");
var af=e.responseText;var ad=Ext.decode(af);var ac=ad.editHost;if(ac.toLowerCase()=="true"||ac.toLowerCase()=="yes"){ae.setValue(true);}else{ag.setValue(true);}}});}if(R.data.text==threshConfigTitle){sessionStorage.setItem("lastSelectedEvent","threshConfigId");Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");
var f="/final/admin/ManagerSettings/data/thresholdConfigurationJSON.jsp";Ext.Ajax.request({url:f,scope:this,method:"POST",success:function(af){F.removeAll();F.add({xtype:"thresholdconfiguration"});Ext.getCmp("innerPanel").setTitle(threshConfigTitle.toUpperCase());var ac=Ext.getCmp("threshIntervalForDisplay");
var ag=Ext.getCmp("thresholdCheckPeriodID");var ae=Ext.getCmp("checkPeriodID");var ak=Ext.getCmp("daysId");ac.setValue("Daily");var ad=af.responseText;var ai=Ext.decode(ad);var ah=ai.thresholdChkVal;var aj=ai.thresholdChkInterval;var e="";ag.setValue(ah);if(aj=="day"){thresholdChkIntervaltoDisplay="Daily";
e="day"+"(s)";}else{if(aj=="week"){thresholdChkIntervaltoDisplay="Weekly";e="week"+"(s)";}else{if(aj=="month"){thresholdChkIntervaltoDisplay="Monthly";e="month"+"(s)";}}}ac.setValue(thresholdChkIntervaltoDisplay);ak.setText(e);}});}if(R.data.text==commandExecTitle){sessionStorage.setItem("lastSelectedEvent","commandExecId");
Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");var f="/final/admin/ManagerSettings/data/commandExecutionJSON.jsp";Ext.Ajax.request({url:f,scope:this,method:"POST",success:function(ac){F.removeAll();
F.add({xtype:"commandexecution"});Ext.getCmp("innerPanel").setTitle(commandExecTitle.toUpperCase());var af=Ext.getCmp("yesEnable_mail");var al=Ext.getCmp("noEnable_mail");var ah=Ext.getCmp("Log_maxsizeID");var ao=Ext.getCmp("yesLogEntries");var ap=Ext.getCmp("noLogEntries");var ak=Ext.getCmp("yesSeparate_exec");
var ae=Ext.getCmp("noSeparate_exec");var ag=Ext.getCmp("Command_lengthID");var an=Ext.getCmp("allowed_formatID");var e=ac.responseText;var aj=Ext.decode(e);var ad=aj.enableCommandExec;if(ad.toLowerCase()=="true"||ad.toLowerCase()=="yes"){af.setValue(true);}else{al.setValue(true);}ah.setValue(aj.logSize);
var ai=aj.logForStdoutAlso;if(ai.toLowerCase()=="true"||ai.toLowerCase()=="yes"){ao.setValue(true);}else{ap.setValue(true);}var am=aj.SeparateExec;if(am.toLowerCase()=="true"||am.toLowerCase()=="yes"){ak.setValue(true);}else{ae.setValue(true);}ag.setValue(aj.cmdLength);an.setValue(aj.allowed_format);
},});}if(R.data.text=="Common Settings"){Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");F.removeAll();F.add({xtype:"ttcommonsettings"});Ext.getCmp("innerPanel").setTitle("TROUBLE TICKET INTEGRATION");
var m=Ext.getCmp("AllowedAlarmsC");var q=Ext.getCmp("AllowedAlarmsM");var o=Ext.getCmp("AllowedAlarmsMi");var P=Ext.getCmp("LogFileMaxSize");var c=Ext.getCmp("yesLogEntriesForStdoutAlso");var I=Ext.getCmp("noLogEntriesForStdoutAlso");var A=Ext.getCmp("yesEnableDD");var r=Ext.getCmp("noEnableDD");var J="";
var O="";var B="";var S="";var f="/final/admin/ManagerSettings/data/commonSettingsTTI_JSON.jsp";Ext.Ajax.request({url:f,scope:this,method:"POST",success:function(ad){var e=ad.responseText;var ai=Ext.decode(e);var ac=ai.sendNormailMail;if(!Ext.isEmpty(ac)&&ac.toLowerCase()=="yes"){Ext.getCmp("yesSendNormalMail").setValue(true);
}else{Ext.getCmp("noSendNormalMail").setValue(true);}var ah=ai.alarmsArray.length;for(var ae=0;ae<ah;ae++){var af=ai.alarmsArray[ae].alarms;if(af.toLowerCase()=="critical"){J="true";}if(af.toLowerCase()=="major"){O="true";}if(af.toLowerCase()=="minor"){B="true";}if(af.toLowerCase()=="normal"){S="true";
}}if(J=="true"){m.setValue(true);}else{m.setValue(false);}if(O=="true"){q.setValue(true);}else{q.setValue(false);}if(B=="true"){o.setValue(true);}else{o.setValue(false);}var aj=ai.enableDDStr;if(!Ext.isEmpty(aj)&&aj.toLowerCase()=="yes"){A.setValue(true);}else{r.setValue(true);}var ag=ai.enableLogging;
if(ag=="Yes"){c.setValue(true);}else{I.setValue(true);}P.setValue(ai.logFileMaxSize);}});}if(R.data.text=="Mail / SNMP"){Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");F.removeAll();
F.add({xtype:"ttmanagermailsnmp"});Ext.getCmp("innerPanel").setTitle("TROUBLE TICKET INTEGRATION");var G=Ext.getCmp("TTMailEnable");var M=Ext.getCmp("TTMailDisable");var k=Ext.getCmp("yesIncludeAllCompUser");var V=Ext.getCmp("noIncludeAllCompUser");var H=Ext.getCmp("yesUseUniqueId");var v=Ext.getCmp("noUseUniqueId");
var X=Ext.getCmp("yesPriorityAsNumeric");var u=Ext.getCmp("noPriorityAsNumeric");var D=Ext.getCmp("yesApplyPriorityForAllTTMails");var N=Ext.getCmp("noApplyPriorityForAllTTMails");var x=Ext.getCmp("yesEnableTTIntegrationForSNMPTraps");var W=Ext.getCmp("noEnableTTIntegrationForSNMPTraps");var f="/final/admin/ManagerSettings/data/mailSnmpTTI_JSON.jsp";
Ext.Ajax.request({url:f,scope:this,method:"POST",success:function(ae){var ad=ae.responseText;var ak=Ext.decode(ad);var ah=ak.strEnableMail;if(!Ext.isEmpty(ah)&&ah.toLowerCase()=="yes"){G.setValue(true);}else{M.setValue(true);}if(!Ext.isEmpty(ah)&&ah.toLowerCase()=="yes"){Ext.getCmp("mailSettings").show();
Ext.getCmp("MailSubject").setDisabled(false);Ext.getCmp("MailTo").setDisabled(false);Ext.getCmp("OutputFormat").setDisabled(false);var ac=ak.mailSubject;var al=ak.mailTo;var aj=ak.outputFormat;var ag=ak.includeAllCompUser;var am=ak.useUniqueId;var ai=ak.priorityAsNumeric;var e=ak.applyPriorityForAllTTMails;
if(!Ext.isEmpty(ac)){Ext.getCmp("MailSubject").setValue(ac);}if(!Ext.isEmpty(al)){Ext.getCmp("MailTo").setValue(al);}if(!Ext.isEmpty(aj)){Ext.getCmp("OutputFormat").setValue(aj);}if(ag){k.setValue(true);}else{V.setValue(true);}if(am){H.setValue(true);}else{v.setValue(true);}if(ai){X.setValue(true);}else{u.setValue(true);
}if(e){D.setValue(true);}else{N.setValue(true);}}else{Ext.getCmp("mailSettings").hide();Ext.getCmp("MailSubject").setDisabled(true);Ext.getCmp("MailTo").setDisabled(true);Ext.getCmp("OutputFormat").setDisabled(true);}var af=ak.enableTTIntegrationForSNMPTraps;if(af){x.setValue(true);}else{W.setValue(true);
}}});}if(R.data.text=="CLI"){Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");F.removeAll();F.add({xtype:"ttmanagercli"});Ext.getCmp("innerPanel").setTitle("TROUBLE TICKET INTEGRATION");
var aa=Ext.getCmp("yesEnableExecForTT");var b=Ext.getCmp("noEnableExecForTT");var l=Ext.getCmp("Command2");var z=Ext.getCmp("Command");var n=Ext.getCmp("DateFormat");var y=Ext.getCmp("CommandLength");var C=Ext.getCmp("ProbDescLength");var f="/final/admin/ManagerSettings/data/cliTTI_JSON.jsp";Ext.Ajax.request({url:f,scope:this,method:"POST",success:function(ad){var af=ad.responseText;
var ae=Ext.decode(af);var ac=ae.enableExecForTT;var e=ae.command;if(ac=="Yes"){aa.setValue("Yes");}else{aa.setValue("No");}l.setValue(ae.command);z.setValue(ae.execOutFormat);n.getStore().loadRawData(ae.formatForDateArray);n.setValue(ae.dateFormat);y.setValue(ae.commandLength);C.setValue(ae.probDescLength);
}});}if(R.data.text==itsmTitle){sessionStorage.setItem("lastSelectedEvent","ttManager");Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");F.removeAll();var f="/final/admin/ManagerSettings/data/TTintegrationListViewJSON.jsp";
Ext.Ajax.request({url:f,scope:this,method:"POST",success:function(e){var ad=e.responseText;var ac=Ext.decode(ad);F.add({xtype:"TTlistview",dataforView:ac["integrationList"]});Ext.getCmp("innerPanel").setTitle(ttListPageTitle);},failure:function(e){Ext.Msg.show({title:ttSettings,msg:"Failed to load TT Integration List Page",width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});
}});}if(R.data.text=="Web services"){Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");F.removeAll();F.add({xtype:"ttmanagerwebservice"});Ext.getCmp("innerPanel").setTitle("TROUBLE TICKET INTEGRATION");
isAcmeUploaded="no";var p=Ext.getCmp("TTIntegrationEnable");var ab=Ext.getCmp("TTIntegrationDisable");var L=Ext.getCmp("TT_sys");var j=Ext.getCmp("TT_Other");var g=Ext.getCmp("TT_Url");var w=Ext.getCmp("TT_User_Name");var d=Ext.getCmp("TT_Password");var a=Ext.getCmp("TT_Output");var Z=Ext.getCmp("TT_Api_Key");
var h=Ext.getCmp("yesttWrapperClassNeeded");var U=Ext.getCmp("nottWrapperClassNeeded");var f="/final/admin/ManagerSettings/data/webServicesTTI_JSON.jsp";Ext.Ajax.request({url:f,scope:this,method:"POST",success:function(ae){var ac=ae.responseText;var ag=Ext.decode(ac);var ad=ag.TTIntegrationEnable;var af=ag.displayTTIntegrationArchive;
archeiveFile=ag.ArchieveFile;var aj="<b>"+archeiveFile+"</b>";if(Ext.isEmpty(archeiveFile)||archeiveFile==""){Ext.getCmp("uploadLabel").hide();Ext.getCmp("removeLink").hide();}else{Ext.getCmp("uploadLabel").show();Ext.getCmp("removeLink").show();isAcmeUploaded="yes";if(archeiveFile!=null&&archeiveFile.toLowerCase()!="none"){if(archeiveFile.indexOf(".")==-1){Ext.getCmp("uploadLabel").setText(archeiveFile+"."+onlyJar,true);
}else{Ext.getCmp("uploadLabel").setText(archeiveFile,true);}}else{Ext.getCmp("uploadLabel").hide();Ext.getCmp("removeLink").hide();}}if(ad.toLowerCase()=="yes"||ad.toLowerCase()=="true"){p.setValue(true);}else{ab.setValue(true);}L.getStore().loadRawData(ag.ttIntegrationSystemArray);if(!Ext.isEmpty(ag.TTSys)&&ag.TTSys=="OTHERS"){L.setValue(ag.ttIntegrationSystemArray[0].valueField);
}else{L.setValue(ag.TTSys);}var e=ag.ttIntegrationSystemArray[0].displayField;var ah=ag.TTSys;TTSysForRemove=ah;var ai=ag.TTOtherDispName;if(p.getValue()){Ext.suspendLayouts();Ext.getCmp("integrationSystem").show();Ext.getCmp("integrationSystemc").removeAll();Ext.getCmp("integrationSystemc").add(createFilters(ag));
Ext.getCmp("integrationSystemc").doLayout();Ext.resumeLayouts(true);if(af=="block"&&Ext.isEmpty(ag.TTWrapper)){h.setValue(true);}else{U.setValue(true);}}if(ab.getValue()){Ext.suspendLayouts();Ext.getCmp("integrationSystem").hide();Ext.getCmp("integrationSystemc").removeAll();Ext.resumeLayouts(true);}}});
Ext.Ajax.request({url:"ManagerSettings/data/uploadWrapperJSONp.jsp?",method:"POST",});}if(R.data.text==logSettingsPageTitle){sessionStorage.setItem("lastSelectedEvent","logSettingsPage");Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");
Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/logSettingsJSON.jsp",method:"POST",success:function(aj){F.removeAll();F.add({xtype:"logsettings"});Ext.getCmp("innerPanel").setTitle(logSettingsPageTitle.toUpperCase());var al=Ext.getCmp("yesLogDbCleanup");var ao=Ext.getCmp("noLogDbCleanup");var ag=Ext.getCmp("yesLogScheduleReports");
var am=Ext.getCmp("noLogScheduleReports");var ac=Ext.getCmp("yesTrendLog");var ai=Ext.getCmp("noTrendLog");var af=Ext.getCmp("yesThresholdLog");var ak=Ext.getCmp("noThresholdLog");if(aj.status==200&&!Ext.isEmpty(aj.responseText)){var ah=aj.responseText;publicJSON=Ext.decode(ah);var e=publicJSON.logDbCleanup;
var an=publicJSON.logScheduleReports;var ae=publicJSON.trendLog;var ad=publicJSON.thresholdLog;if(e.toLowerCase()=="true"||e.toLowerCase()=="yes"){al.setValue("Yes");}else{ao.setValue("No");}if(an.toLowerCase()=="true"||an.toLowerCase()=="yes"){ag.setValue("Yes");}else{am.setValue("No");}if(ae.toLowerCase()=="true"||ae.toLowerCase()=="yes"){ac.setValue("Yes");
}else{ai.setValue("No");}if(ad.toLowerCase()=="true"||ad.toLowerCase()=="yes"){af.setValue("Yes");}else{ak.setValue("No");}}}});}if(R.data.text==auditSetTitle){sessionStorage.setItem("lastSelectedEvent","auditSetId");Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");
Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/auditingJSON.jsp",method:"POST",success:function(ah){F.removeAll();F.add({xtype:"auditing"});Ext.getCmp("innerPanel").setTitle(auditSetTitle.toUpperCase());var e=Ext.getCmp("yesEnableAuditlog");var ad=Ext.getCmp("noEnableAuditlog");var ai=Ext.getCmp("yesAuditlogForCLI");
var ag=Ext.getCmp("noAuditlogForCLI");if(ah.status==200&&!Ext.isEmpty(ah.responseText)){var ae=ah.responseText;var aj=Ext.decode(ae);var af=aj.auditLogJson.EnableAuditlog;var ac=aj.auditLogJson.auditlogForCLI;if(af=="yes"){e.setValue("yes");}if(af=="no"){ad.setValue("no");}if(ac=="true"){ai.setValue("true");
}if(ac=="false"){ag.setValue("false");}}}});}if(R.data.text==advSetTitle){sessionStorage.setItem("lastSelectedEvent","advancedSettingsId");Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");
Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/advanceSettingsJSON.jsp",method:"POST",success:function(e){F.removeAll();F.add({xtype:"advancedsettings"});Ext.getCmp("innerPanel").setTitle(advSetTitle.toUpperCase());var ag=Ext.getCmp("yesStlnMgrRestart");var ak=Ext.getCmp("noStlnMgrRestart");
var ao=Ext.getCmp("stlnMgrRestart");var ai=Ext.getCmp("stlnMgrRestart_pri");var au=Ext.getCmp("stlnMgrRestart_sec");var aj=Ext.getCmp("yesMgrOutput");var af=Ext.getCmp("noMgrOutput");var al=Ext.getCmp("yesMgrOutputOverWirte");var ae=Ext.getCmp("noMgrOutputOverWirte");var ap=Ext.getCmp("yesManConfig");
var am=Ext.getCmp("noManConfig");var ay=Ext.getCmp("yesExtAgent");var ac=Ext.getCmp("noExtAgent");if(e.status==200&&!Ext.isEmpty(e.responseText)){var ar=e.responseText;var ax=Ext.decode(ar);var ah=ax.managerOutput;var aw=ax.mgrOutputOverWirte;var ad=ax.updateManConfig;var an=ax.nowExtAgent;var at=ax.managerDebug;
if(at=="yes"){var av=Ext.getCmp("mgrOutput");av.setDisabled(true);av.setFieldLabel(" * "+av.getFieldLabel());var aq=Ext.create("Ext.form.field.Display",{value:"* Manager output and error has been manually enabled."});Ext.getCmp("display").show();Ext.getCmp("display").setTitle("<b>Note</b>");Ext.getCmp("display").add(aq);
}ak.setValue(true);if(ax.isClusterManager){ao.setVisible(false);ai.setVisible(true);au.setVisible(true);}else{ao.setVisible(true);ai.setVisible(false);au.setVisible(false);}if(ah=="yes"){aj.setValue("Yes");Ext.getCmp("mgrOutputOverWirte").show();}if(ah=="no"){af.setValue("No");}if(aw=="yes"){al.setValue("Yes");
}if(aw=="no"){ae.setValue("No");}if(an=="yes"){ay.setValue("yes");}else{if(an=="no"){ac.setValue("no");}}if(ax.aggregateLicenseSupported){Ext.getCmp("extAgent").show();}else{Ext.getCmp("extAgent").hide();}am.setValue("no");}}});}if(R.data.text==capPlanTitle){sessionStorage.setItem("lastSelectedEvent","capacityPlanningNode");
Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/capacityPlanningJSON.jsp",method:"POST",success:function(ae){F.removeAll();
F.add({xtype:"capacityplanning"});Ext.getCmp("innerPanel").setTitle(capPlanTitle.toUpperCase());if(ae.status==200&&!Ext.isEmpty(ae.responseText)){var e=ae.responseText;var aj=Ext.decode(e);var ag=Ext.getCmp("yesCapacityTrend");var ad=Ext.getCmp("noCapacityTrend");var af=Ext.getCmp("yesCapcityreport");
var ac=Ext.getCmp("noCapcityreport");var ah=aj.capacitytrendenable;var ai=aj.capacityreportenable;if(ah=="true"){ag.setValue("true");}if(ah=="false"){ad.setValue("false");}if(ai=="true"){af.setValue("true");}if(ai=="false"){ac.setValue("false");}}}});}if(R.data.text==virtualTopoTitle){sessionStorage.setItem("lastSelectedEvent","virtualTopoID");
Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/virtualTopologyJSON.jsp",method:"POST",success:function(ac){F.removeAll();
F.add({xtype:"virtualtopology"});Ext.getCmp("innerPanel").setTitle(virtualTopoTitle.toUpperCase());var ae=Ext.getCmp("yesVirtualmapping");var ad=Ext.getCmp("noVirtualmapping");if(ac.status==200&&!Ext.isEmpty(ac.responseText)){var af=ac.responseText;var e=Ext.decode(af);var ag=e.strVirtualMapping;if(ag=="true"){ae.setValue("Auto");
}if(ag=="false"){ad.setValue("Manual");}}}});}if(R.data.text==lockoutTitle){sessionStorage.setItem("lastSelectedEvent","lockoutId");Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");
Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/accountLockoutJSON.jsp",method:"POST",success:function(ag){F.removeAll();F.add({xtype:"acklockout"});Ext.getCmp("innerPanel").setTitle(lockoutTitle.toUpperCase());var al=Ext.getCmp("generic");var aj=Ext.getCmp("specific");var e=Ext.getCmp("yesLock");
var an=Ext.getCmp("noLock");var ap=Ext.getCmp("rlckStrategy");var ai=Ext.getCmp("tlckStrategy");if(ag.status==200&&!Ext.isEmpty(ag.responseText)){var ad=ag.responseText;var ao=Ext.decode(ad);var ac=ao.InvalidLoginMsg;var ah=ao.userAL;var af=ao.userNA;var ae=ao.userLS;var ak=ao.userTP;if(ac=="G"){al.setValue(true);
}else{aj.setValue(true);}var am=ah.toLowerCase();Ext.getCmp("nofAttmpt").setValue(ao["userNA"]);Ext.getCmp("timeperiod").setValue(ao["userTP"]);if(am=="true"||am=="yes"){am="yes";}else{am="no";}if(am=="yes"&&ae=="R"){e.setValue(true);ap.setValue(true);Ext.getCmp("nofAttmpt").show();Ext.getCmp("timeperiod").hide();
}else{if(am=="yes"&&ae=="T"){e.setValue(true);ai.setValue(true);Ext.getCmp("nofAttmpt").show();Ext.getCmp("timeperiod").show();}else{if(am=="no"&&ae=="T"){an.setValue(true);ai.setValue(true);Ext.getCmp("nofAttmpt").hide();Ext.getCmp("lckStrategy").hide();Ext.getCmp("timeperiod").hide();}else{if(am=="no"&&ae=="R"){an.setValue(true);
ap.setValue(true);Ext.getCmp("nofAttmpt").hide();Ext.getCmp("lckStrategy").hide();Ext.getCmp("timeperiod").hide();}}}}}}});}if(R.data.text==SSOTitleLbl){sessionStorage.setItem("lastSelectedEvent","ssoNode");Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");
Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/EgSamlSsoJson.jsp",method:"POST",timeout:120000,success:function(e){F.removeAll();F.add({xtype:"singlesignon"});Ext.getCmp("innerPanel").setTitle(SSOTitleLbl.toUpperCase());var ac=Ext.getCmp("yesssoLogin");var ae=Ext.getCmp("nossoLogin");if(e.status==200&&!Ext.isEmpty(e.responseText)){var ad=e.responseText;
ssoLoginJson=Ext.decode(ad);if(ssoLoginJson.isLogin){ac.setValue(true);Ext.getCmp("idpLogout").show();if(ssoLoginJson.isIdpLogout){Ext.getCmp("yesidpLogout").setValue(true);}else{Ext.getCmp("noidpLogout").setValue(true);}}else{ae.setValue(true);if(!Ext.isEmpty(Ext.getCmp("idpLogout"))&&Ext.getCmp("idpLogout").isVisible()){Ext.getCmp("idpLogout").hide();
}}}}});}if(R.data.text==pwdpolicyTitle){sessionStorage.setItem("lastSelectedEvent","pwdPolicyId");var s=this;Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/passwordPolicyJSON.jsp",method:"POST",success:function(e){F.removeAll();
F.add({xtype:"pwdpolicy"});Ext.getCmp("innerPanel").setTitle(pwdpolicyTitle.toUpperCase());if(e.status==200&&!Ext.isEmpty(e.responseText)){var ac=e.responseText;var ad=Ext.decode(ac);Ext.getCmp("minLen").setValue(ad["pwdMinLength"]);if(ad["pwdMinHistoryEnable"]=="true"||ad["pwdMinHistoryEnable"]=="yes"){Ext.getCmp("minHistoryEnableYes").setValue(true);
Ext.getCmp("minHistoryEnableNo").setValue(false);Ext.getCmp("minHistory").show();}else{Ext.getCmp("minHistoryEnableYes").setValue(false);Ext.getCmp("minHistoryEnableNo").setValue(true);Ext.getCmp("minHistory").hide();}Ext.getCmp("minHistory1").setValue(ad["pwdMinHistory"]);s.setPasswordComplexity(ad["pwdComplexity"]);
}}});}if(R.data.text==secureFilterTitle){sessionStorage.setItem("lastSelectedEvent","secureFilterId");Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/EgSecurityFilterJson.jsp",method:"POST",success:function(e){F.removeAll();
F.add({xtype:"securityfilter"});Ext.getCmp("innerPanel").setTitle(secureFilterTitle.toUpperCase());var ag=Ext.getCmp("yesSecurityfilter");var ae=Ext.getCmp("noSecurityfilter");if(e.status==200&&!Ext.isEmpty(e.responseText)){var ad=e.responseText;var af=Ext.decode(ad);var ac=af.isEnableSecurityFilters;
if(ac){ag.setValue(true);}else{ae.setValue(true);}}}});}if(R.data.text==TFATitle2){Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");thisController.get2FAConfigDetails();}if(R.data.text==ipPolicyTitle){thisController.interConfigMultiIPPolicy();
}if(R.data.text==mgrModelTitle){sessionStorage.setItem("lastSelectedEvent","egmgrmodel");Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+generalSettingsDesc+"</center>");thisController.getMgrModelDetails();
}if(R.data.text==deleteUseresSetTitle){sessionStorage.setItem("lastSelectedEvent","deleteUseresSetId");Ext.getCmp("innerPanel").setTitle("DELETE USER ACCOUNTS");Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/deleteUsersJSON.jsp",method:"POST",success:function(ad){F.removeAll();F.add({xtype:"deleteusers"});
if(ad.status==200&&!Ext.isEmpty(ad.responseText)){var ag=Ext.decode(ad.responseText);var af=true;if(ag.deleteUsersJson.eGMgrModel=="msp"){if(ag.deleteUsersJson.allowDeleteOrg){var ac=Ext.getCmp("allowDeleteOrg");ac.items.items[0].setValue(true);ac.show();var e=Ext.getCmp("deleteOrg");if(ag.deleteUsersJson.deleteOrg=="true"){e.items.items[0].setValue(true);
Ext.getCmp("deletecontents").show();}else{e.items.items[1].setValue(true);Ext.getCmp("deletecontents").show();}Ext.getCmp("deleteOrg").show();Ext.getCmp("deleteSubOU").hide();}else{var ac=Ext.getCmp("allowDeleteOrg");ac.items.items[1].setValue(true);ac.show();Ext.getCmp("deleteOrg").hide();Ext.getCmp("deleteSubOU").hide();
Ext.getCmp("deletecontents").hide();var ai=Ext.getCmp("immediateDeleteType");ai.items.items[0].setValue(true);ai.hide();Ext.getCmp("daysNotReporting").hide();Ext.getCmp("daysNotReportingContainer").hide();Ext.getCmp("daysId").hide();}}else{Ext.getCmp("allowDeleteOrg").hide();Ext.getCmp("deleteOrg").hide();
Ext.getCmp("deleteSubOU").show();var ah=Ext.getCmp("deleteSubOU");if(ag.deleteUsersJson.deleteSubOU){ah.items.items[0].setValue(true);Ext.getCmp("deletecontents").show();}else{ah.items.items[1].setValue(true);Ext.getCmp("deletecontents").hide();af=false;var ai=Ext.getCmp("immediateDeleteType");ai.items.items[0].setValue(true);
ai.hide();Ext.getCmp("daysNotReporting").hide();Ext.getCmp("daysNotReportingContainer").hide();Ext.getCmp("daysId").hide();}}Ext.getCmp("zones").setValue(ag.deleteUsersJson.zones);Ext.getCmp("servicegroups").setValue(ag.deleteUsersJson.servicegroups);Ext.getCmp("services").setValue(ag.deleteUsersJson.services);
Ext.getCmp("segments").setValue(ag.deleteUsersJson.segments);Ext.getCmp("groups").setValue(ag.deleteUsersJson.groups);Ext.getCmp("components").setValue(ag.deleteUsersJson.components);Ext.getCmp("exremote").setValue(ag.deleteUsersJson.exremote);Ext.getCmp("daysAfter").setValue(ag.deleteUsersJson.autoDeleteDays);
if(ag.deleteUsersJson.components||ag.deleteUsersJson.exremote){Ext.getCmp("immediateDeleteType").show();Ext.getCmp("daysNotReporting").setValue(ag.deleteUsersJson.compsNotReportingDays);var ai=Ext.getCmp("immediateDeleteType");if(ag.deleteUsersJson.deleteImmediately=="yes"){ai.items.items[0].setValue(true);
Ext.getCmp("daysNotReporting").hide();Ext.getCmp("daysNotReportingContainer").hide();Ext.getCmp("daysId").hide();}else{ai.items.items[1].setValue(true);Ext.getCmp("daysNotReporting").show();Ext.getCmp("daysNotReportingContainer").show();Ext.getCmp("daysId").show();}}else{Ext.getCmp("immediateDeleteType").hide();
Ext.getCmp("daysNotReporting").hide();Ext.getCmp("daysNotReportingContainer").hide();Ext.getCmp("daysId").hide();Ext.getCmp("daysNotReporting").setValue(ag.deleteUsersJson.compsNotReportingDays);var ai=Ext.getCmp("immediateDeleteType");if(ag.deleteUsersJson.deleteImmediately=="yes"){ai.items.items[0].setValue(true);
}else{ai.items.items[1].setValue(true);}}var ae=Ext.getCmp("autoDeleteExpUsers");if(ag.deleteUsersJson.autoDeleteExpUsers=="yes"){ae.items.items[0].setValue(true);Ext.getCmp("daysAfter").show();Ext.getCmp("daysNotReportingContainer_auto").show();Ext.getCmp("daysId_auto").show();}else{ae.items.items[1].setValue(true);
Ext.getCmp("daysAfter").hide();Ext.getCmp("daysNotReportingContainer_auto").hide();Ext.getCmp("daysId_auto").hide();}}},failure:function(e){alert("Error in delete user settings of manager settings");}});}if(R.data.text==supermanagerSetTitle){sessionStorage.setItem("lastSelectedEvent","supermanagerSetId");
Ext.getCmp("innerPanel").setTitle("SUPERMANAGER");Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/supermanager.jsp",method:"POST",success:function(e){F.removeAll();F.add({xtype:"supermanager"});if(e.status==200&&!Ext.isEmpty(e.responseText)){var ac=Ext.decode(e.responseText);var ad=Ext.getCmp("autoRegisterSm");
if(ac.SuperManager.autoRegisterSm=="yes"){ad.items.items[0].setValue(true);}else{ad.items.items[1].setValue(true);}}},failure:function(e){alert("Error in supermanager settings of manager settings");}});}},getMgrModelDetails:function(){Ext.Ajax.request({url:"ManagerSettings/data/EgManagerModelJson.jsp",method:"POST",params:{"comeFrom":"getMgrModel"},success:function(c){Ext.getCmp("innerPanel").setTitle(mgrModelTitle.toUpperCase());
var j=Ext.getCmp("innerPanel");j.removeAll();j.add({xtype:"egmgrmodel"});var a=c.responseText;var d=Ext.decode(a);var e=d["eGMgrModel"];mgrModel=e;var b=d["issueUUID"];if(!Ext.isEmpty(e)&&e.toLowerCase()=="msp"){Ext.getCmp("selfReg").show();Ext.getCmp("mgrModelMsp").setValue(true);var f=d["enableCloudRegistration"];
if(!Ext.isEmpty(f)&&(f.toLowerCase()=="false"||f.toLowerCase()=="no")){Ext.getCmp("selfRegNo").setValue(true);}else{Ext.getCmp("selfRegYes").setValue(true);}var g=Ext.getCmp("selfRegYes").getGroupValue();if(!Ext.isEmpty(g)&&g.toLowerCase()=="no"){Ext.getCmp("selfRegMailId").hide();}else{Ext.getCmp("selfRegMailId").show();
var h=d["selfRegistrationMailID"];if(!Ext.isEmpty(h)){Ext.getCmp("selfRegMailId").setValue(h);}}}else{Ext.getCmp("selfReg").hide();Ext.getCmp("selfRegMailId").hide();Ext.getCmp("mgrModelEnterprise").setValue(true);}if(!Ext.isEmpty(b)&&(b.toLowerCase()=="yes"||b.toLowerCase()=="true")){Ext.getCmp("issueuuidyes").setValue(true);
}else{Ext.getCmp("issueuuidno").setValue(true);}},failure:function(){}});},mgrModelRadioChange:function(){var a=Ext.getCmp("mgrModelEnterprise").getGroupValue();if(!Ext.isEmpty(a)&&a.toLowerCase()=="enterprise"){Ext.getCmp("issueuuidno").setValue(true);var b=Ext.getCmp("configureMailServerSettings");
if(b!=null&&b!=undefined){mgrModelFieldSet=Ext.getCmp("mgrModelFieldSet");mgrModelFieldSet.remove(b);mgrModelFieldSet.doLayout();}Ext.getCmp("mgrModelUpdate").enable();Ext.getCmp("selfReg").hide();Ext.getCmp("selfRegMailId").hide();}else{if(!Ext.isEmpty(isMailSettingsConfiguredForMSP)&&!isMailSettingsConfiguredForMSP){var c=Ext.widget("grid",{modal:true,id:"configureMailServerSettings",layout:"fit",ui:"newGridPanel",border:true,flex:1,margin:5,hideHeaders:true,emptyText:"No data found",viewConfig:{deferEmptyText:false},store:new Ext.data.Store({fields:["Message"],data:{"Message":'<table align="center"><tr><td><div class="iconExclamation"></div></td><td><div style="padding:10px">Before enabling this flag, please configure </div></td><td><div style="cursor:pointer;text-decoration:underline;padding:2px" onClick="javascript:thisController.goToconfigureMailServerSettings()">Mail Server Settings!</div></td></tr></table>'},}),columns:{items:[{dataIndex:"Message",flex:1,renderer:function(l,f,e,k,h,g,j){l='<div style="cursor:pointer;">'+l+"</div>";
if(l!=null||l!=""){return l;}}}]}});mgrModelFieldSet=Ext.getCmp("mgrModelFieldSet");mgrModelFieldSet.add(c);mgrModelFieldSet.doLayout();Ext.getCmp("mgrModelUpdate").disable();}else{Ext.getCmp("mgrModelUpdate").enable();}Ext.getCmp("selfReg").show();var d=Ext.getCmp("selfRegYes").getGroupValue();if(!Ext.isEmpty(d)&&d.toLowerCase()=="no"){Ext.getCmp("selfRegMailId").hide();
}else{Ext.getCmp("selfRegMailId").show();}}},selfRegChange:function(){var a=Ext.getCmp("selfRegYes").getGroupValue();if(!Ext.isEmpty(a)&&a.toLowerCase()=="no"){Ext.getCmp("selfRegMailId").hide();}else{Ext.getCmp("selfRegMailId").show();}},goToconfigureMailServerSettings:function(){window.location.href="EgMailServerSettings.jsp?reqfrom=egmgrmodel";
sessionStorage.removeItem("lastSelectedEvent");},callMgrModelUpdate:function(b,c){var e=Ext.getCmp("selfRegYes").getGroupValue();var d=Ext.getCmp("selfRegMailId").getValue();var a=new Ext.LoadMask(Ext.getBody(),{msg:"Updating..."});a.show();Ext.Ajax.request({url:"ManagerSettings/data/EgManagerModelJson.jsp",method:"POST",params:{"comeFrom":"updateMgrModel","eGMgrModel":b,"issueUUID":c,"selfRegYes":e,"selfRegMailId":d},success:function(g){a.hide();
var j=g.responseText;var f=Ext.decode(j);if(f["success"]==true){var h=mgrUpdateSuccessMsg+".";if(mgrModel.toLowerCase()!=b.toLowerCase()){h=mgrUpdateSuccessMsg+". "+mgrUpdateSuccessRestartMsg+".";}Ext.Msg.show({title:mgrModelTitle,msg:h,icon:"iconInformation",buttons:Ext.Msg.OK,fn:function(k){window.location.href="/final/admin/EgManagerSettingsTree.jsp?select=egmgrmodel";
}});}else{Ext.Msg.show({title:mgrModelTitle,msg:mgrUpdateErrorMsg+".",icon:"iconExclamation",buttons:Ext.Msg.OK});}},failure:function(){a.hide();}});},updateMgrModel:function(){var g=this;var e=Ext.getCmp("mgrModelEnterprise").getGroupValue();var a=Ext.getCmp("issueuuidyes").getGroupValue();var f=Ext.getCmp("selfRegYes").getGroupValue();
var j=Ext.getCmp("selfRegMailId").getValue();var b=/(((([\+]?([0-9]){4,15})|([\_\#]?([a-zA-Z0-9]+[\ \_\.\-\&\#]?)*[a-zA-Z0-9])+)\@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z])|((\+\d\d)?[0-9]+))/g;var h=validateEmail(j);var d=j.match(b);if(h==null||h==undefined){h=false;}if(!Ext.isEmpty(j)&&h==false&&d!=j){Ext.Msg.show({title:mgrModelTitle,msg:notValidMailId,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(k){Ext.getCmp("selfRegMailId").focus(true);
}});return;}if(!validateSingleByte(j)){Ext.Msg.show({title:mgrModelTitle,msg:mailIDDBL,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(k){Ext.getCmp("selfRegMailId").focus(true);}});return;}var c=false;if(!Ext.isEmpty(e)&&e.toLowerCase()=="msp"){a="yes";if(mgrModel!=null&&mgrModel!=e&&isIpBasedInstallation){Ext.Msg.show({title:mgrModelTitle,msg:switchtoMspMsg,icon:"iconConfirmation",buttons:Ext.Msg.YESNO,fn:function(k){if(k=="yes"){g.callMgrModelUpdate(e,a);
}else{Ext.getCmp("mgrModelEnterprise").setValue(true);}}});}else{g.callMgrModelUpdate(e,a);}}else{g.callMgrModelUpdate(e,a);}},interConfigMultiIPPolicy:function(){sessionStorage.setItem("lastSelectedEvent","ipPolicyId");inputs=1;Ext.Ajax.request({url:"ManagerSettings/data/IPAddressValidatorJson.jsp?comeFrom=getIPPolicy",method:"POST",success:function(e){Ext.getCmp("pageDesc").update('<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+ipPolicyDesc+"</center>");
var f=Ext.getCmp("innerPanel");f.removeAll();f.add({xtype:"fieldset",title:"<b>"+ipPolicyTitle+"</b>",layout:{type:"vbox",pack:"center",align:"center"},defaults:{labelSeparator:" ",labelWidth:200},margin:20,id:"egippolicy",items:[{xtype:"label",id:"adminPolicyLabel",hidden:true,width:"100%",html:"<center>Restrict admin activities to the below IP addresses/range.</center>",style:{fontSize:"10px"},height:25,margin:"5 5 10 5"},{xtype:"container",id:"backupmultiipcontainer",width:"50%",layout:{type:"vbox",pack:"center",align:"stretch"}},{xtype:"container",id:"NoMultiIPPattern",width:400,margin:"0 0 20 0",hidden:true,layout:{type:"hbox",pack:"center",align:"center"},border:true,flex:1,columnWidth:1,items:[{xtype:"label",html:'<table border="0px"><tr><td align="center"><table><tr><td align="center"><div class="iconInformation"></div><div class="commonErrorMsgText">'+noIPPolicyMsg+"!</div></td></tr></table></td></tr></table>"}]}]});
f.addDocked({xtype:"toolbar",dock:"bottom",padding:10,layout:{type:"hbox",pack:"center"},id:"dockTool",ui:"toolbarBgWithTopBorder",items:[{xtype:"button",ui:"newButtonSmall",id:"addMultiIP",width:110,text:addMorePolicyMsg,listeners:{"click":function(){addMultiIPPolicy();}}},{xtype:"button",ui:"newButtonSmall",text:updateBtnText,width:110,id:"updateMultiIP",name:"updateMultiIP",margin:"0 0 0 10",listeners:{"click":function(){thisController.updateMultiIPPolicy();
}}},{xtype:"button",ui:"newButtonSmall",text:deleteAllMsg,width:110,id:"clearMultiIP",name:"clearMultiIP",margin:"0 0 0 10",listeners:{"click":function(){thisController.clearMultiIPPolicy();}}}]});Ext.getCmp("innerPanel").setTitle(ipPolicyTitle.toUpperCase());var g=e.responseText;var b=Ext.decode(g);
var d=b["screenLabels"]["configuredIp"];if(d=="*"){Ext.getCmp("addMultiIP").disable();}if(d!=null&&d!="undefined"){var a=d.split(",");}Ext.suspendLayouts();if(d!=null||d!=undefined){Ext.getCmp("adminPolicyLabel").setVisible(true);Ext.getCmp("clearMultiIP").enable();for(var c=0;c<a.length;c++){addMultiIPPolicy();
}for(multidom=1;multidom<a.length+1;multidom++){Ext.getCmp("ip"+multidom).setValue(a[multidom-1]);}}else{Ext.getCmp("NoMultiIPPattern").show();Ext.getCmp("updateMultiIP").disable();Ext.getCmp("clearMultiIP").disable();Ext.getCmp("addMultiIP").setText(addPolicyMsg);Ext.getCmp("adminPolicyLabel").setVisible(false);
}Ext.resumeLayouts(true);},failure:function(){}});},clearMultiIPPolicy:function(){var a=Ext.getCmp("backupmultiipcontainer");Ext.Msg.show({title:ipPolicyTitle,msg:deleteAllIPMsg+"?",icon:"iconConfirmation",buttons:Ext.Msg.YESNO,fn:function(b){if(b=="yes"){Ext.Ajax.request({url:"ManagerSettings/data/IPAddressValidatorJson.jsp?comeFrom=deleteAllIPPolicy",method:"POST",success:function(c){var e=Ext.decode(c.responseText);
var d=e["screenLabels"]["success"];if(d=="true"){a.removeAll();inputs=1;Ext.getCmp("NoMultiIPPattern").show();Ext.getCmp("updateMultiIP").disable();Ext.getCmp("clearMultiIP").disable();Ext.getCmp("addMultiIP").setText(addPolicyMsg);Ext.getCmp("adminPolicyLabel").setVisible(false);Ext.Msg.show({title:ipPolicyTitle,msg:deleteAllIPMsgSuccess+".",icon:"iconInformation",buttons:Ext.Msg.OK});
}else{Ext.Msg.show({title:ipPolicyTitle,msg:deleteAllIPMsgFailure+".",icon:"iconExclamation",buttons:Ext.Msg.OK});}},failure:function(){}});}}});},updateMultiIPPolicy:function(){var a=inputs;var b="";for(var c=1;c<=a-1;c++){if(Ext.getCmp("ip"+c)==undefined){continue;}var d=Ext.getCmp("ip"+c).getValue();
if(a>2){if(d=="*"){Ext.Msg.show({title:ipPolicyTitle,msg:allowAllErrMsg+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(e){Ext.getCmp("ip"+c).focus(true);}});return false;}}if(!checkblank(d)){Ext.Msg.show({title:ipPolicyTitle,msg:ipFieldBlankMsg+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(e){Ext.getCmp("ip"+c).focus(true);
}});return false;}else{if(d.indexOf(" ")>-1){Ext.Msg.show({title:ipPolicyTitle,msg:ipFieldSpaceMsg,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp("ip"+c).focus(true);}});return;}else{if(!checkspecialnomess(d,"GHIJKLMNOPQRSTUVWXYZghijklmnopqrstuvwxyz~!@#$%^&()'<>")){Ext.Msg.show({title:ipPolicyTitle,msg:invalidIPMsg+".",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(e){Ext.getCmp("ip"+c).focus(true);
}});return false;}else{if(d.length>0&&(d.indexOf("..")>-1||d.charAt(0)=="-"||d.charAt(d.length-1)=="-"||d.indexOf("--")>-1)){Ext.Msg.show({title:ipPolicyTitle,msg:invalidIPRangeMsg+".",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(e){Ext.getCmp("ip"+c).focus(true);}});return false;}else{if(d.indexOf(".,")>-1||d.indexOf(",.")>-1||d.indexOf(",")>-1||d.charAt(0)==","){Ext.Msg.show({title:ipPolicyTitle,msg:commaRestrictionMsg+".",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(e){Ext.getCmp("ip"+c).focus(true);
}});return false;}else{if(!validateSingleByte(d)){Ext.Msg.show({title:ipPolicyTitle,msg:dblIPRangeMsg+".",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(e){Ext.getCmp("ip"+c).focus(true);}});return false;}else{if(d.indexOf("-")>-1&&d.indexOf("*")>-1){Ext.Msg.show({title:ipPolicyTitle,msg:rangeAndPatternErrMsg+".",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(e){Ext.getCmp("ip"+c).focus(true);
}});return false;}}}}}}}if(d!=null){if(b.indexOf(d)==-1){b+=d+",";}else{Ext.Msg.show({title:ipPolicyTitle,msg:duplicateIPMsg+".",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(e){Ext.getCmp("ip"+c).focus(true);}});return false;}}}b=b.substring(0,b.length-1);if(b.length>0){Ext.Ajax.request({url:"ManagerSettings/data/IPAddressValidatorJson.jsp?iprange="+encodeURIComponent(b)+"&comeFrom=validate",method:"POST",async:false,success:function(f){var h=Ext.decode(f.responseText);
var g=h["screenLabels"]["isValid"];if(g=="false"){var e=h["screenLabels"]["ErrorIn"];Ext.Msg.show({title:ipPolicyTitle,msg:h["screenLabels"]["admin.common.Error"]+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(j){Ext.getCmp("ip"+e).focus(true);}});}else{Ext.Ajax.request({url:"ManagerSettings/data/IPAddressValidatorJson.jsp?iprange="+encodeURIComponent(b)+"&comeFrom=update",method:"POST",async:false,success:function(j){var l=Ext.decode(j.responseText);
var k=l["screenLabels"]["success"];if(k=="true"){Ext.Msg.show({title:ipPolicyTitle,msg:successMsg+".",icon:"iconInformation",buttons:Ext.Msg.OK,fn:function(m){Ext.getCmp("clearMultiIP").enable();}});}else{Ext.Msg.show({title:ipPolicyTitle,msg:errorMsg+".",icon:"iconExclamation",buttons:Ext.Msg.OK});}},failure:function(){}});
}},failure:function(){}});}},changeTTIntegration:function(){var f=Ext.getCmp("TTIntegrationEnable");var k=Ext.getCmp("TTIntegrationDisable");var e=Ext.getCmp("TT_sys");var c=Ext.getCmp("TT_Other");var g=Ext.getCmp("TT_Url");var m=Ext.getCmp("TT_User_Name");var b=Ext.getCmp("TT_Password");var j=Ext.getCmp("TT_Output");
var l=Ext.getCmp("yesttWrapperClassNeeded");var h=Ext.getCmp("nottWrapperClassNeeded");var d=Ext.getCmp("TT_Api_Key");var a="/final/admin/ManagerSettings/data/webServicesTTI_JSON.jsp";Ext.Ajax.request({url:a,scope:this,method:"POST",success:function(p){var n=p.responseText;var s=Ext.decode(n);var t=s.TTSys;
var u=s.TTOtherDispName;var o=s.TTIntegrationEnable;var r=s.displayTTIntegrationArchive;var q=Ext.getCmp("TT_sys");if(!Ext.isEmpty(s.ttIntegrationSystemArray)){q.getStore().removeAll();q.getStore().loadRawData(s.ttIntegrationSystemArray);if(!Ext.isEmpty(s.TTSys)&&s.TTSys=="OTHERS"){q.setValue(s.ttIntegrationSystemArray[0].valueField);
}else{q.setValue(s.TTSys);}}h.setValue(true);if(f.getValue()){Ext.suspendLayouts();Ext.getCmp("integrationSystem").show();Ext.getCmp("integrationSystemc").removeAll();Ext.getCmp("integrationSystemc").add(createFilters(s));Ext.getCmp("integrationSystemc").doLayout();Ext.resumeLayouts(true);}archeiveFile=s.ArchieveFile;
var v="<b>"+archeiveFile+"</b>";if(Ext.isEmpty(archeiveFile)||archeiveFile==""||archeiveFile.toLowerCase()=="none"){Ext.suspendLayouts();Ext.getCmp("uploadLabel").hide();Ext.getCmp("removeLink").hide();Ext.resumeLayouts(true);}else{Ext.suspendLayouts();Ext.getCmp("uploadLabel").show();Ext.getCmp("removeLink").show();
if(archeiveFile!=null&&archeiveFile.toLowerCase()!="none"){if(archeiveFile.indexOf(".")==-1){Ext.getCmp("uploadLabel").setText(archeiveFile+"."+onlyJar,true);}else{Ext.getCmp("uploadLabel").setText(archeiveFile,true);}}else{Ext.getCmp("uploadLabel").hide();Ext.getCmp("removeLink").hide();}Ext.resumeLayouts(true);
}if(k.getValue()){Ext.suspendLayouts();Ext.getCmp("integrationSystem").hide();Ext.getCmp("integrationSystemc").removeAll();Ext.resumeLayouts(true);}}});},changeRadioField:function(b,c){Ext.suspendLayouts();for(var a in b){if(c){if(typeof b[a]!="undefined"&&b[a].indexOf("_radioGrp")>-1){Ext.getCmp(b[a]).enable();
var e=b[a].substr(0,b[a].indexOf("_radioGrp"));var d=Ext.getCmp(e).getValue();if(d&&b[a]=="isProxyAuthenticated_radioGrp"){Ext.getCmp("proxyUserName").enable();Ext.getCmp("proxyPassword").enable();}}else{Ext.getCmp(b[a]).enable();Ext.getCmp("$_"+b[a]).show();}}else{if(typeof b[a]!="undefined"&&b[a].indexOf("_radioGrp")>-1){Ext.getCmp(b[a]).disable();
}else{Ext.getCmp(b[a]).disable();Ext.getCmp("$_"+b[a]).hide();}}}Ext.resumeLayouts(true);},changeMail:function(){var h=Ext.getCmp("TTMailEnable");var j=Ext.getCmp("TTMailDisable");var l=Ext.getCmp("yesIncludeAllCompUser");var d=Ext.getCmp("noIncludeAllCompUser");var m=Ext.getCmp("yesUseUniqueId");var c=Ext.getCmp("noUseUniqueId");
var a=Ext.getCmp("yesPriorityAsNumeric");var n=Ext.getCmp("noPriorityAsNumeric");var e=Ext.getCmp("yesApplyPriorityForAllTTMails");var k=Ext.getCmp("noApplyPriorityForAllTTMails");var g=Ext.getCmp("yesEnableTTIntegrationForSNMPTraps");var f=Ext.getCmp("noEnableTTIntegrationForSNMPTraps");var b="/final/admin/ManagerSettings/data/mailSnmpTTI_JSON.jsp";
Ext.Ajax.request({url:b,scope:this,method:"POST",success:function(r){var q=r.responseText;var x=Ext.decode(q);var u=x.strEnableMail;if(h.getValue()){Ext.getCmp("mailSettings").show();Ext.getCmp("MailSubject").setDisabled(false);Ext.getCmp("MailTo").setDisabled(false);Ext.getCmp("OutputFormat").setDisabled(false);
var p=x.mailSubject;var y=x.mailTo;var w=x.outputFormat;var t=x.includeAllCompUser;var z=x.useUniqueId;var v=x.priorityAsNumeric;var o=x.applyPriorityForAllTTMails;if(!Ext.isEmpty(p)){Ext.getCmp("MailSubject").setValue(p);}if(!Ext.isEmpty(y)){Ext.getCmp("MailTo").setValue(y);}if(!Ext.isEmpty(w)){Ext.getCmp("OutputFormat").setValue(w);
}if(t){l.setValue(true);}else{d.setValue(true);}if(z){m.setValue(true);}else{c.setValue(true);}if(v){a.setValue(true);}else{n.setValue(true);}if(o){e.setValue(true);}else{k.setValue(true);}}else{if(j.getValue()){Ext.getCmp("mailSettings").hide();Ext.getCmp("MailSubject").setDisabled(true);Ext.getCmp("MailTo").setDisabled(true);
Ext.getCmp("OutputFormat").setDisabled(true);}}var s=x.enableTTIntegrationForSNMPTraps;if(s){g.setValue(true);}else{f.setValue(true);}}});},radioChange:function(){var h=Ext.getCmp("TTIntegrationEnable");var s=Ext.getCmp("TTIntegrationDisable");var p=Ext.getCmp("TT_sys");var c=Ext.getCmp("TT_Other");var t=Ext.getCmp("TT_Url");
var l=Ext.getCmp("TT_User_Name");var m=Ext.getCmp("TT_Password");var b=Ext.getCmp("TT_Output");var a=Ext.getCmp("yesttWrapperClassNeeded");var o=Ext.getCmp("nottWrapperClassNeeded");var g=Ext.getCmp("TT_Api_Key");var n=Ext.getCmp("criticalAlarms");var u=Ext.getCmp("majorAlarms");var q=Ext.getCmp("minorAlarms");
var d=Ext.getCmp("normalAlarms");var j="";var r="";var f="";var k="";var e="/final/admin/ManagerSettings/data/webServicesTTI_JSON.jsp";Ext.Ajax.request({url:e,scope:this,method:"POST",success:function(z){var v=z.responseText;var D=Ext.decode(v);var E=D.TTSys;var G=D.TTOtherDispName;var w=D.TTIntegrationEnable;
var C=D.displayTTIntegrationArchive;var B=Ext.getCmp("TT_sys");B.setValue(E);if(h.getValue()){Ext.suspendLayouts();Ext.getCmp("integrationSystem").show();Ext.getCmp("integrationSystemc").removeAll();Ext.getCmp("integrationSystemc").add(createFilters(D));Ext.getCmp("integrationSystemc").doLayout();Ext.getCmp("allowedAlarms").show();
Ext.resumeLayouts(true);if(C=="block"){a.setValue(true);}else{o.setValue(true);}var y=D.criticalAlarms;var x=D.majorAlarms;var A=D.minorAlarms;var F=D.normalAlarms;if(y=="checked"){n.setValue(true);}else{n.setValue(false);}if(x=="checked"){u.setValue(true);}else{u.setValue(false);}if(A=="checked"){q.setValue(true);
}else{q.setValue(false);}if(F=="checked"){d.setValue(true);}else{d.setValue(false);}}archeiveFile=D.ArchieveFile;var H="<b>"+archeiveFile+"</b>";if(Ext.isEmpty(archeiveFile)||archeiveFile==""){Ext.suspendLayouts();Ext.getCmp("uploadLabel").hide();Ext.getCmp("removeLink").hide();Ext.resumeLayouts(true);
}else{Ext.suspendLayouts();Ext.getCmp("uploadLabel").show();Ext.getCmp("removeLink").show();Ext.resumeLayouts(true);}if(s.getValue()){Ext.suspendLayouts();Ext.getCmp("integrationSystem").hide();Ext.getCmp("integrationSystemc").removeAll();Ext.getCmp("allowedAlarms").hide();Ext.resumeLayouts(true);}}});
},radioRestartChange:function(){var b=Ext.getCmp("yesStlnMgrRestart");var c=Ext.getCmp("noStlnMgrRestart");if(b.getSubmitValue()=="Yes"){var a=Ext.MessageBox.confirm("Advanced Settings","Are you sure you want to restart the eG Manager",this.confirmFunc,this);}},confirmFunc:function(c){var b=Ext.getCmp("stlnMgrRestart");
var a=Ext.getCmp("noStlnMgrRestart");if(c=="no"){a.reset();}},radioRestartChange_pri:function(){var c=Ext.getCmp("yesStlnMgrRestart_pri");var a=Ext.getCmp("noStlnMgrRestart_pri");if(c.getSubmitValue()=="Yes"){var b=Ext.MessageBox.confirm("Advanced Settings","Are you sure you want to restart the primary eG Manager",this.confirmFunc_pri,this);
}},confirmFunc_pri:function(c){var b=Ext.getCmp("stlnMgrRestart_pri");var a=Ext.getCmp("noStlnMgrRestart_pri");if(c=="no"){a.reset();}},radioRestartChange_sec:function(){var c=Ext.getCmp("yesStlnMgrRestart_sec");var a=Ext.getCmp("noStlnMgrRestart_sec");if(c.getSubmitValue()=="Yes"){var b=Ext.MessageBox.confirm("Advanced Settings","Are you sure you want to restart the secondary eG Manager",this.confirmFunc_sec,this);
}},confirmFunc_sec:function(c){var a=Ext.getCmp("stlnMgrRestart_sec");var b=Ext.getCmp("noStlnMgrRestart_sec");if(c=="no"){b.reset();}},ttWebserviceAuthtypeCombo:function(){var a=Ext.getCmp("authType").getValue();if(a=="No Auth"){Ext.getCmp("user").hide();Ext.getCmp("password").hide();Ext.getCmp("apiKey").hide();
Ext.getCmp("addTo").hide();}else{if(a=="Basic Auth"||a=="basic"){Ext.getCmp("user").show();Ext.getCmp("password").show();if(selectedIntegrationName!=null&&(selectedIntegrationName=="SERVICE NOW"||selectedIntegrationName=="SNOWITOM")){Ext.getCmp("client_id").hide();Ext.getCmp("client_secret").hide();Ext.getCmp("$_client_id").hide();
Ext.getCmp("$_client_secret").hide();}else{Ext.getCmp("apiKey").hide();Ext.getCmp("addTo").hide();}}else{if(a=="API Key"){Ext.getCmp("apiKey").show();Ext.getCmp("addTo").show();Ext.getCmp("user").hide();Ext.getCmp("password").hide();}else{if(a=="oauth2.0"&&(selectedIntegrationName!=null&&(selectedIntegrationName=="SERVICE NOW"||selectedIntegrationName=="SNOWITOM"))){Ext.getCmp("client_id").show();
Ext.getCmp("client_secret").show();Ext.getCmp("$_client_id").show();Ext.getCmp("$_client_secret").show();}}}}},ttWebserviceSysCombo:function(){var e=Ext.getCmp("TT_sys").getValue();var g=Ext.getCmp("TTIntegrationEnable");var l=Ext.getCmp("TTIntegrationDisable");var f=Ext.getCmp("TT_sys");var c=Ext.getCmp("TT_Other");
var h=Ext.getCmp("TT_Url");var n=Ext.getCmp("TT_User_Name");var b=Ext.getCmp("TT_Password");var k=Ext.getCmp("TT_Output");var m=Ext.getCmp("yesttWrapperClassNeeded");var j=Ext.getCmp("nottWrapperClassNeeded");var d=Ext.getCmp("TT_Api_Key");var a="/final/admin/ManagerSettings/data/webServicesTTI_JSON.jsp?selectSysName="+e;
Ext.Ajax.request({url:a,scope:this,method:"POST",success:function(r){var p=r.responseText;var t=Ext.decode(p);var q=t.TTIntegrationEnable;var s=t.displayTTIntegrationArchive;archeiveFile=t.ArchieveFile;var w="<b>"+archeiveFile+"</b>";if(Ext.isEmpty(archeiveFile)||archeiveFile==""){Ext.getCmp("uploadLabel").hide();
Ext.getCmp("removeLink").hide();}else{Ext.getCmp("uploadLabel").show();Ext.getCmp("removeLink").show();if(archeiveFile!=null&&archeiveFile.toLowerCase()!="none"){if(archeiveFile.indexOf(".")==-1){Ext.getCmp("uploadLabel").setText(archeiveFile+"."+onlyJar,true);}else{Ext.getCmp("uploadLabel").setText(archeiveFile,true);
}}else{Ext.getCmp("uploadLabel").hide();Ext.getCmp("removeLink").hide();}}if(q){g.setValue(true);}else{l.setValue(true);}f.getStore().loadRawData(t.ttIntegrationSystemArray);f.setValue(t.TTSys);var o=t.ttIntegrationSystemArray[0].displayField;var u=t.TTSys;TTSysForRemove=u;var v=t.TTOtherDispName;if(g.getValue()){Ext.getCmp("integrationSystem").show();
Ext.getCmp("integrationSystemc").removeAll();Ext.getCmp("integrationSystemc").add(createFilters(t));Ext.getCmp("integrationSystemc").doLayout();}if(l.getValue()){Ext.getCmp("integrationSystem").hide();Ext.getCmp("integrationSystemc").removeAll();}if(s=="block"&&Ext.isEmpty(t.TTWrapper)){m.setValue(true);
}else{j.setValue(true);}}});},ttManagerSystemComboChange:function(){var F=Ext.getCmp("TT_sys").getValue();var m="";var J=Ext.getCmp("yesEnableExecForTT");var b=Ext.getCmp("noEnableExecForTT");var k=Ext.getCmp("Command2");var u=Ext.getCmp("Command");var j=Ext.getCmp("AllowedAlarmsC");var r=Ext.getCmp("AllowedAlarmsM");
var n=Ext.getCmp("AllowedAlarmsMi");var C=Ext.getCmp("AllowedAlarmsN");var B=Ext.getCmp("LogFileMaxSize");var c=Ext.getCmp("yesLogEntriesForStdoutAlso");var x=Ext.getCmp("noLogEntriesForStdoutAlso");var l=Ext.getCmp("DateFormat");var t=Ext.getCmp("CommandLength");var w=Ext.getCmp("ProbDescLength");var q=Ext.getCmp("TTIntegrationEnable");
var K=Ext.getCmp("TTIntegrationDisable");var z=Ext.getCmp("TT_sys");var h=Ext.getCmp("TT_Other");var f=Ext.getCmp("TT_Url");var s=Ext.getCmp("TT_User_Name");var d=Ext.getCmp("TT_Password");var a=Ext.getCmp("TT_Output");var g=Ext.getCmp("yesttWrapperClassNeeded");var G=Ext.getCmp("nottWrapperClassNeeded");
var I=Ext.getCmp("TT_Api_Key");var D=Ext.getCmp("criticalAlarms");var H=Ext.getCmp("majorAlarms");var o=Ext.getCmp("minorAlarms");var p=Ext.getCmp("normalAlarms");var y="";var A="";var v="";var E="";var e="/final/admin/ManagerSettings/data/webServicesTTI_JSON.jsp?selectSysName="+F;Ext.Ajax.request({url:e,scope:this,method:"POST",success:function(L){var aa=L.responseText;
var O=Ext.decode(aa);var V=O.enableExecForTT;var T=O.command;var U=O.alarmsArray.length;var R=O.enableLogging;var Q=O.TTIntegrationEnable;var M=O.displayTTIntegrationArchive;var N=O.criticalAlarms;var W=O.majorAlarms;var Z=O.minorAlarms;var Y=O.normalAlarms;archeiveFile=O.ArchieveFile;var ac="<b>"+archeiveFile+"</b>";
if(Ext.isEmpty(archeiveFile)||archeiveFile==""){Ext.getCmp("uploadLabel").hide();Ext.getCmp("removeLink").hide();}else{Ext.getCmp("uploadLabel").show();Ext.getCmp("removeLink").show();if(archeiveFile!=null&&archeiveFile.toLowerCase()!="none"){if(archeiveFile.indexOf(".")==-1){Ext.getCmp("uploadLabel").setText(archeiveFile+"."+onlyJar,true);
}else{Ext.getCmp("uploadLabel").setText(archeiveFile,true);}}else{Ext.getCmp("uploadLabel").hide();Ext.getCmp("removeLink").hide();}}if(V=="Yes"){J.setValue("Yes");}else{J.setValue("No");}k.setValue(O.command);u.setValue(O.execOutFormat);for(var ab=0;ab<U;ab++){var P=O.alarmsArray[ab].alarms;if(P=="critical"){y="true";
}if(P=="major"){A="true";}if(P=="minor"){v="true";}if(P=="normal"){E="true";}}if(y=="true"){j.setValue(true);}else{j.setValue(false);}if(A=="true"){r.setValue(true);}else{r.setValue(false);}if(v=="true"){n.setValue(true);}else{n.setValue(false);}if(E=="true"){C.setValue(true);}else{C.setValue(false);
}B.setValue(O.logFileMaxSize);if(R=="Yes"){c.setValue(true);}else{x.setValue(true);}l.getStore().loadRawData(O.formatForDateArray);l.setValue(O.dateFormat);t.setValue(O.commandLength);w.setValue(O.probDescLength);if(Q=="Yes"||Q=="yes"){q.setValue(true);}else{K.setValue(true);}z.getStore().loadRawData(O.ttIntegrationSystemArray);
z.setValue(O.TTSys);var X=O.ttIntegrationSystemArray[0].displayField;var ad=O.TTSys;TTSysForRemove=ad;var S=O.TTOtherDispName;if(q.getValue()){Ext.getCmp("integrationSystem").show();Ext.getCmp("integrationSystemc").removeAll();Ext.getCmp("integrationSystemc").add(createFilters(O));Ext.getCmp("integrationSystemc").doLayout();
Ext.getCmp("allowedAlarms").show();}if(K.getValue()){Ext.getCmp("integrationSystem").hide();Ext.getCmp("integrationSystemc").removeAll();Ext.getCmp("allowedAlarms").hide();}if(M=="block"){g.setValue(true);}else{G.setValue(true);}D.setValue(true);if(W=="checked"){H.checked=true;}else{H.setValue(false);
}if(Z=="checked"){o.setValue(true);}else{o.setValue(false);}if(Y=="checked"){p.setValue(true);}else{p.setValue(false);}}});},ttCommonSettingsUpdate:function(f,s){var l="";var g="";var r="";var k="";var a="";var p="";var n="";var b="";var h="";var t="";var c="";var j="";var d="/final/admin/ManagerSettings/data/commonSettingsTTI_JSON.jsp";
var o=Ext.getCmp("LogFileMaxSize");var e=Ext.getCmp("logMaxFiles");var u=Ext.getCmp("enableGraph");if(o){var m=o.getRawValue();if(!checkblank(m)){Ext.Msg.show({title:ttSettings,msg:alertForNocommon+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(v){Ext.getCmp("LogFileMaxSize").focus(true);}});
return false;}}if(e){var q=e.getRawValue();if(!checkblank(q)){Ext.Msg.show({title:ttSettings,msg:alertForNocommon+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(v){Ext.getCmp("logMaxFiles").focus(true);}});return false;}}Ext.Ajax.request({url:d,scope:this,method:"POST",success:function(v){var J=v.responseText;
var x=Ext.decode(J);var D=x.alarmsArray.length;var A=x.enableLogging;var B=x.enableDDStr;var F=x.sendNormailMail;var G=x.enableTTFilter;var C="";var M="Allowed alarms";for(var K=0;K<D;K++){var z=x.alarmsArray[K].alarms;if(C==""){C+="$"+z;}else{C+=","+z;}if(z=="critical"){h="true";}if(z=="major"){t="true";
}if(z=="minor"){c="true";}if(z=="normal"){j="true";}}M=M+C;if(h=="true"){g="Allowed alarms$critical";}if(t=="true"){g="Allowed alarms$major";}if(c=="true"){g="Allowed alarms$minor";}if(j=="true"){g="Allowed alarms$normal";}if(A=="Yes"){p="Log entries for stdout also -  TT Manager CLI$Yes";}else{p="Log entries for stdout also -  TT Manager CLI$No";
}if(G=="Yes"){enableTTFilterStr="Trouble ticket Filter$Yes";}else{enableTTFilterStr="Trouble ticket Filter$No";}if(B.toLowerCase()=="yes"){n="Enable DD -  TT Manager$Yes";}else{n="Enable DD -  TT Manager$No";}if(F.toLowerCase()=="yes"){b="send Normal TT Mails for -  TT Manager$Yes";}else{b="send Normal TT Mails for -  TT Manager$No";
}r="Log file maximum size MB$"+x.logFileMaxSize;k="Maximum number of log files$"+x.logMaxFiles;a="Enable Graph$"+x.enableGraph;Ext.getCmp("$_AllowedAlarms").setValue(M);Ext.getCmp("$_SendNormalAlarms").setValue(b);Ext.getCmp("$_EnableDD").setValue(n);Ext.getCmp("$_LogFileMaxSize").setValue(r);Ext.getCmp("$_logMaxFiles").setValue(k);
Ext.getCmp("$_enableGraph").setValue(a);Ext.getCmp("$_enableLogging").setValue(p);Ext.getCmp("$_EnableTTFilter").setValue(enableTTFilterStr);var H="/final/admin/ManagerSettings/data/commonSettingsTTI_JSONp.jsp";var E=Ext.getCmp("AllowedAlarmsC").getValue();var w=Ext.getCmp("AllowedAlarmsM").getValue();
var N=Ext.getCmp("AllowedAlarmsMi").getValue();var L=false;var I="";if(E!=null&&E==true){L=true;I=I+"Critical";}if(w!=null&&w==true){L=true;if(I==""){I="Major";}else{I=I+"$Major";}}if(N!=null&&N==true){L=true;if(I==""){I="Minor";}else{I=I+"$Minor";}}if(!L){Ext.Msg.show({title:ttSettings,msg:alert6,width:alert6.length*7,buttons:Ext.MessageBox.OK,icon:"iconExclamation",});
return;}if(!f||!s){var y=this.getTtcommonsettings().getForm();if(y.isValid()){y.submit({url:H,method:"POST",success:function(O,P){Ext.Msg.show({title:ttSettings,msg:settingsSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconInformation",});},failure:function(O,P){Ext.Msg.show({title:ttSettings,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});
}});}else{Ext.Msg.show({title:ttSettings,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}}}});},ttCliUpdate:function(){var n="";var k="";var m="";var e="";var a="";var j="";var o="";var s=this;var d=Ext.getCmp("yesEnableExecForTT");var c=Ext.getCmp("Command2");var h=Ext.getCmp("Command");
var v=Ext.getCmp("DateFormat");var r=Ext.getCmp("CommandLength");var b=Ext.getCmp("ProbDescLength");var f="";var q="";if(h){var p=h.getValue();f=p;q=s.filterEncode(f);}if(d&&d.getValue()===true){if(h){if(!checkblank(p)){Ext.Msg.show({title:ttManagerCLI,msg:alertForNocommon+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(w){Ext.getCmp("Command").focus(true);
}});return false;}}if(c){var g=c.getValue();if(!checkblank(g)){Ext.Msg.show({title:ttManagerCLI,msg:alertForNocommon+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(w){Ext.getCmp("Command2").focus(true);}});return false;}}if(r){var t=r.getRawValue();if(!checkblank(t)){Ext.Msg.show({title:ttManagerCLI,msg:alertForNocommon+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(w){Ext.getCmp("CommandLength").focus(true);
}});return false;}}if(b){var u=b.getRawValue();if(!checkblank(u)){Ext.Msg.show({title:ttManagerCLI,msg:alertForNocommon+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(w){Ext.getCmp("ProbDescLength").focus(true);}});return false;}}}var l="/final/admin/ManagerSettings/data/cliTTI_JSON.jsp";Ext.Ajax.request({url:l,scope:this,method:"POST",success:function(y){var A=y.responseText;
var z=Ext.decode(A);var x=z.enableExecForTT;var w=z.command;if(Ext.getCmp("yesEnableExecForTT").getValue()){Ext.getCmp("EnableExecForTT").setValue("Yes");}else{Ext.getCmp("EnableExecForTT").setValue("No");}if(d&&!d.getValue()&&x.toLowerCase()=="no"){Ext.Msg.show({title:ttIntegrationTitle,msg:ttEnableCLIMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return;}if(x=="Yes"){n="Enable CLI$Yes";}else{n="Enable CLI$No";}k="Command$"+z.command;m="Command Arguments$"+z.execOutFormat;e="Date format to be used$"+z.dateFormat+" "+"HH:mm:ss";a="Command length  (chars) for TT Manager CLI$"+z.commandLength;j="Problem description length (chars)$"+z.probDescLength;
Ext.getCmp("$_EnableExecForTT").setValue(n);Ext.getCmp("$_Command2").setValue(k);Ext.getCmp("$_Command").setValue(s.filterEncode(m));Ext.getCmp("$_DateFormat").setValue(e);Ext.getCmp("$_CommandLength").setValue(s.filterEncode(a));Ext.getCmp("$_ProbDescLength").setValue(s.filterEncode(j));h.setValue(q);
o="/final/admin/ManagerSettings/data/cliTTI_JSONp.jsp?";var B=this.getTtmanagercli().getForm();if(B.isValid()){B.submit({url:o,method:"POST",success:function(C,D){h.setValue(f);Ext.Msg.show({title:ttManagerCLI,msg:settingsSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){thisController.reloadIntegrationPage();
}});},failure:function(C,D){Ext.Msg.show({title:ttManagerCLI,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}});}else{Ext.Msg.show({title:ttManagerCLI,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}}});},filterEncode:function(j){var d=["[","]","(",")","=","&","%","'",";","\\"];
var c=["|lsbr|","|rsbr|","|lbr|","|rbr|","|eq|","|ampsnd|","|per|","|squot|","|scol|","|slash|"];try{if(j!=null&&j!=undefined&&!Ext.isEmpty(j)){for(var b in d){var f=d[b];var g=c[b];do{j=j.replace(f,g);}while(j.indexOf(f)>-1);}}}catch(h){}return j;},ttMailUpdate:function(){var I="";var C="";var P="";
var D="";var j="";var e="";var E="";var Q="";var b="";var J="";var h="";var A="";var O="";var x="";var v="";var o="";var r="";var k="";var z="";var F=this;var t=Ext.getCmp("TTMailEnable");var f=Ext.getCmp("yesIncludeAllCompUser");var H=Ext.getCmp("noIncludeAllCompUser");var u=Ext.getCmp("yesUseUniqueId");
var n=Ext.getCmp("noUseUniqueId");var M=Ext.getCmp("yesPriorityAsNumeric");var l=Ext.getCmp("noPriorityAsNumeric");var s=Ext.getCmp("yesApplyPriorityForAllTTMails");var w=Ext.getCmp("noApplyPriorityForAllTTMails");var p=Ext.getCmp("yesEnableTTIntegrationForSNMPTraps");var K=Ext.getCmp("noEnableTTIntegrationForSNMPTraps");
var d="/final/admin/ManagerSettings/data/mailSnmpTTI_JSON.jsp?integrationType=MAIL";var q="";var N="";var g=Ext.getCmp("OutputFormat").getValue();N=g;q=F.filterEncode(g);if(!Ext.isEmpty(t)&&t.getValue()){var a=Ext.getCmp("MailSubject").getValue();var B=Ext.getCmp("MailTo").getValue();var m=true;if(B.length>0&&B.indexOf(",")!=-1){var c=B.split(",");
for(var L=0;L<c.length&&c[L]!="";L++){var y=trim(c[L]);var G=validateEmail(y);if(!validateSingleByte(c[L])){Ext.Msg.show({title:ttManagerMail,msg:mailIDDBL,icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(R){Ext.getCmp("MailTo").focus(true);}});return;}else{if(G==null||G==undefined||G==false){m=false;
break;}}}}else{if(B.length>0){var y=trim(B);var G=validateEmail(y);if(G==null||G==undefined||G==false){m=false;}}}if(!checkblank(a)){Ext.Msg.show({title:ttManagerMail,msg:mailSubjectBnk+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(R){Ext.getCmp("MailSubject").focus(true);}});return false;
}else{if(a=="$unconfigured"){Ext.Msg.show({title:ttManagerMail,msg:mailSubjectValid+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(R){Ext.getCmp("MailSubject").focus(true);}});return false;}else{if(!checkblank(B)){Ext.Msg.show({title:ttManagerMail,msg:mailValid+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(R){Ext.getCmp("MailTo").focus(true);
}});return false;}else{if(!m){Ext.Msg.show({title:ttManagerMail,msg:mailValid+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(R){Ext.getCmp("MailTo").focus(true);}});return false;}else{if(!validateSingleByte(B)){Ext.Msg.show({title:ttManagerMail,msg:mailIDDBL+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(R){Ext.getCmp("MailTo").focus(true);
}});return false;}else{if(!checkblank(g)){Ext.Msg.show({title:ttManagerMail,msg:alertForNocommon+".",icon:"iconExclamation",buttons:Ext.Msg.OK,fn:function(R){Ext.getCmp("OutputFormat").focus(true);}});return false;}}}}}}}Ext.Ajax.request({url:d,scope:this,method:"POST",success:function(W){var U=W.responseText;
var ac=Ext.decode(U);var ae=ac.strEnableMail;var ab=ac.mailSubject;var S=ac.mailTo;var Z=ac.outputFormat;var R=ac.includeAllCompUser;var ad=ac.useUniqueId;var Y=ac.priorityAsNumeric;var T=ac.applyPriorityForAllTTMails;var X=ac.enableTTIntegrationForSNMPTraps;if(!Ext.isEmpty(t)&&!t.getValue()&&ae!=null&&(ae.toLowerCase()=="no"||ae.toLowerCase()=="false")){Ext.Msg.show({title:ttIntegrationTitle,msg:ttEnableMailMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return;}if(ae!=null&&(ae.toLowerCase()=="yes"||ae.toLowerCase()=="true")){ae="Enable mail alert$Yes";}else{ae="Enable mail alert$No";}if(ab!=null&&ab.length>0){ab="Subject$"+ab;}if(S!=null&&S.length>0){S="Mail ID$"+S;}if(Z!=null&&Z.length>0){Z="Mail output format$"+Z;}if(R!=null&&R==true){R="Include user details in mail$Yes";
}else{R="Include user details in mail$No";}if(ad!=null&&ad==true){ad="Use unique ID$Yes";}else{ad="Use unique ID$No";}if(Y!=null&&Y==true){Y="Priority as numeric$Yes";}else{Y="Priority as numeric$No";}if(T!=null&&T==true){T="Apply priority for all TT mails$Yes";}else{T="Apply priority for all TT mails$No";
}if(X!=null&&X==true){X="Enable TT integration over SNMP trap$Yes";}else{X="Enable TT integration over SNMP trap$No";}var V=F.filterEncode(Z);Ext.getCmp("$_EnableMail").setValue(ae);Ext.getCmp("$_MailSubject").setValue(ab);Ext.getCmp("$_MailTo").setValue(S);Ext.getCmp("$_OutputFormat").setValue(V);Ext.getCmp("$_IncludeAllCompUser").setValue(R);
Ext.getCmp("$_UseUniqueId").setValue(ad);Ext.getCmp("$_PriorityAsNumeric").setValue(Y);Ext.getCmp("$_ApplyPriorityForAllTTMails").setValue(T);Ext.getCmp("OutputFormat").setValue(q);z="/final/admin/ManagerSettings/data/mailSnmpTTI_JSONp.jsp?integrationType=MAIL";var aa=this.getTtmanagermailsnmp().getForm();
if(aa.isValid()){aa.submit({url:z,method:"POST",success:function(af,ag){Ext.getCmp("OutputFormat").setValue(N);Ext.Msg.show({title:ttManagerMail,msg:settingsSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){thisController.reloadIntegrationPage();}});},failure:function(af,ag){Ext.Msg.show({title:ttManagerMail,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});
}});}else{Ext.Msg.show({title:ttManagerMail,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}}});},ttSnmpUpdate:function(){var c="";var d=Ext.getCmp("yesEnableTTIntegrationForSNMPTraps");var b=Ext.getCmp("noEnableTTIntegrationForSNMPTraps");var a="/final/admin/ManagerSettings/data/mailSnmpTTI_JSON.jsp?integrationType=SNMP";
Ext.Ajax.request({url:a,scope:this,method:"POST",success:function(f){var j=f.responseText;var g=Ext.decode(j);var e=g.enableTTIntegrationForSNMPTraps;if(!d.getValue()&&e!=null&&e==false){Ext.Msg.show({title:ttIntegrationTitle,msg:ttEnableSNMPMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});return;
}if(e!=null&&e==true){e="Enable TT integration over SNMP trap$Yes";}else{e="Enable TT integration over SNMP trap$No";}Ext.getCmp("$_EnableTTIntegrationForSNMPTraps").setValue(e);c="/final/admin/ManagerSettings/data/mailSnmpTTI_JSONp.jsp?integrationType=SNMP";var h=this.getTtmanagersnmp().getForm();if(h.isValid()){h.submit({url:c,method:"POST",success:function(k,l){Ext.Msg.show({title:ttManagerSnmp,msg:settingsSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){thisController.reloadIntegrationPage();
}});},failure:function(k,l){Ext.Msg.show({title:ttManagerSnmp,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}});}}});},ttWebserviceUpdate:function(){var m="";var u="";var c="";var q="";var s="";var f="";var e="";var h="";var w="";var n="";var v=/^((http|https):\/\/)/;
var o=Ext.getCmp("url");var x=Ext.getCmp("webhookURL");var j=Ext.getCmp("wsdl_url");var t=Ext.getCmp("rest_url");var g=Ext.getCmp("TTIntegrationEnable");var y=Ext.getCmp("TTIntegrationDisable");var b=g.getValue();var p=Ext.getCmp("TT_sys");var a=Ext.getCmp("yesttWrapperClassNeeded");var k=Ext.getCmp("nottWrapperClassNeeded");
archeiveFile=fileName;Ext.getCmp("ArchieveFile").setValue(archeiveFile);Ext.getCmp("mainWrapperClass").setValue(ttWrapper);var l=Ext.getCmp("payload");if(l){var r=l.getValue();if(r){r=r.trim();}if(!this.isValidJSONPayload(r)){return false;}}if(o){var d=o.getValue();if(!v.test(d)){Ext.Msg.show({title:ttIntegrationTitle,msg:urlAlertMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return false;}}else{if(x){var d=x.getValue();if(!v.test(d)){Ext.Msg.show({title:ttIntegrationTitle,msg:urlAlertMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});return false;}}else{if(j){var d=j.getValue();if(!v.test(d)){Ext.Msg.show({title:ttIntegrationTitle,msg:urlAlertMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return false;}}else{if(t){var d=t.getValue();if(!v.test(d)){Ext.Msg.show({title:ttIntegrationTitle,msg:urlAlertMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});return false;}}}}}var d="/final/admin/ManagerSettings/data/webServicesTTI_JSON.jsp?selectSysName="+selectedIntegrationName;Ext.Ajax.request({url:d,scope:this,method:"POST",success:function(A){var Y=this;
var S=A.responseText;var F=Ext.decode(S);var N=selectedIntegrationName;var Q=F.OldTTSys;var G=F.TTIntegrationEnable;var E=F.displayTTIntegrationArchive;var Z=F.TTWrapper;archeiveFile=F.ArchieveFile;Ext.getCmp("integrationSys").setValue(Q);Ext.getCmp("integrationFlagOld").setValue(G);if(G!=null&&G.toLowerCase()=="no"){if(!b&&Q==N){Ext.Msg.show({title:ttIntegrationTitle,msg:ttEnableWebservicsMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return;}}if(!b&&Q!=N){Ext.Msg.show({title:ttIntegrationTitle,msg:ttEnableWebservicsMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});return;}if(b){if(N=="SERVICE NOW"){var V=F.TTServiceNow;var B=V.split(",");for(var T=0;T<B.length;T++){if(B[T]=="ttIntegratorClass"||B[T]=="supportingJar"){continue;
}Ext.getCmp("$_"+B[T]).setValue(F[B[T]]);}}else{if(N=="MANAGE ENGINE"){var X=F.TTManageEngine;var K=X.split(",");for(var T=0;T<K.length;T++){if(K[T]=="ttIntegratorClass"||K[T]=="supportingJar"){continue;}Ext.getCmp("$_"+K[T]).setValue(F[K[T]]);}}else{if(N=="AUTO TASK"){var P=F.TTAutoTask;var H=P.split(",");
for(var T=0;T<H.length;T++){if(H[T]=="ttIntegratorClass"||H[T]=="supportingJar"){continue;}Ext.getCmp("$_"+H[T]).setValue(F[H[T]]);}}else{if(N=="REMEDY FORCE"){var I=F.TTRemedyForce;var U=I.split(",");for(var T=0;T<U.length;T++){if(U[T]=="ttIntegratorClass"||U[T]=="supportingJar"){continue;}Ext.getCmp("$_"+U[T]).setValue(F[U[T]]);
}}else{if(N=="PAGER DUTY"){var D=F.TTPagerDuty;var z=D.split(",");for(var T=0;T<z.length;T++){if(z[T]=="ttIntegratorClass"||z[T]=="supportingJar"){continue;}Ext.getCmp("$_"+z[T]).setValue(F[z[T]]);}}}}}}var W="<b>"+archeiveFile+"</b>";if((Ext.isEmpty(archeiveFile)||archeiveFile=="")&&(Ext.isEmpty(archeiveFileUpload)||archeiveFileUpload=="")){Ext.getCmp("uploadLabel").hide();
Ext.getCmp("removeLink").hide();}else{if(archeiveFile!="None"){Ext.getCmp("uploadLabel").show();Ext.getCmp("removeLink").show();}}}if(Ext.getCmp("TTIntegrationEnable").getValue()||Ext.getCmp("TTIntegrationEnable").getValue()=="Yes"){var R="";for(var T=0;T<F.filters.length;T++){var L=F.filters[T];var M=Ext.getCmp(L.id).getValue();
if(L.id=="authType"){R=M;}if(L.type=="Textfield"||L.type=="TextArea"){if(M){M=M.trim();}if(Ext.isEmpty(M)){Ext.Msg.show({title:ttIntegrationTitle,msg:alertForNocommon,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp(L.id).focus(true);}});return;}if(N=="SERVICE NOW"||N=="SNOWITOM"){if(L.id=="proxyHostName"||L.id=="proxyPort"||L.id=="proxyUserName"||L.id=="proxyPassword"){var J=Ext.getCmp("isProxyEnabled").getValue();
var O=Ext.getCmp("isProxyAuthenticated").getValue();if(O&&J){if(M==="$unconfigured"){Ext.Msg.show({title:ttIntegrationTitle,msg:ttConfigureDetailsMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp(L.id).focus(true);}});return;}}else{if(J){if(L.id=="proxyHostName"||L.id=="proxyPort"){if(M==="$unconfigured"){Ext.Msg.show({title:ttIntegrationTitle,msg:ttConfigureDetailsMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp(L.id).focus(true);
}});return;}}}}}else{if(R=="basic"){if(L.id=="client_id"||L.id=="client_secret"||L.id=="grant_type"){continue;}else{if(L.id=="user"||L.id=="password"){if(M==="$unconfigured"){Ext.Msg.show({title:ttIntegrationTitle,msg:ttConfigureDetailsMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp(L.id).focus(true);
}});return;}}}}else{if(M==="$unconfigured"){Ext.Msg.show({title:ttIntegrationTitle,msg:ttConfigureDetailsMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp(L.id).focus(true);}});return;}}}}else{if(N=="CUSTOM WEBHOOKS"){if(R=="No Auth"){if(L.id=="user"||L.id=="password"||L.id=="apiKey"){continue;
}}else{if(R=="Basic Auth"){if(L.id=="apiKey"){continue;}else{if(L.id=="user"||L.id=="password"){if(M==="$unconfigured"){Ext.Msg.show({title:ttIntegrationTitle,msg:ttConfigureDetailsMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp(L.id).focus(true);}});return;}}}}else{if(R=="API Key"){if(L.id=="user"||L.id=="password"){continue;
}else{if(L.id=="apiKey"){if(M==="$unconfigured"){Ext.Msg.show({title:ttIntegrationTitle,msg:ttConfigureDetailsMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp(L.id).focus(true);}});return;}}}}else{if(M==="$unconfigured"){Ext.Msg.show({title:ttIntegrationTitle,msg:ttConfigureDetailsMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp(L.id).focus(true);
}});return;}}}}}else{if(M==="$unconfigured"){Ext.Msg.show({title:ttIntegrationTitle,msg:ttConfigureDetailsMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(){Ext.getCmp(L.id).focus(true);}});return;}}}if(L.id=="payload"){if(!this.isValidJSONPayload(M)){return false;}}}}var C=Ext.getCmp("yesttWrapperClassNeeded");
}if(ttWrapper=="None"){n="/final/admin/ManagerSettings/data/webServicesTTI_JSONp.jsp?mainWrapperClass=None&ttIntegrationEnabled="+b+"&TT_sys="+selectedIntegrationName;}else{n="/final/admin/ManagerSettings/data/webServicesTTI_JSONp.jsp?ttIntegrationEnabled="+b+"&TT_sys="+selectedIntegrationName;}if(G!=null&&G.toLowerCase()=="yes"&&b&&Q!=N){Ext.Msg.confirm("Confirmation","Do you want to change "+capitalizeFirstLetter(Q.toLowerCase())+" to "+capitalizeFirstLetter(N.toLowerCase())+" Integration",function(aa){if(aa==="yes"){Y.ttWebserviceFormSubmit(n,Y);
}else{return false;}});}else{Y.ttWebserviceFormSubmit(n,Y);}}});},ttWebserviceFormSubmit:function(e,c){var d=this;var g=c.getTtmanagerwebservice().getForm();if(g.isValid()){var b=d.encodeFieldParams(g);var a=e;if(e!=null&&e.indexOf("?")>-1){a=e.substring(0,e.indexOf("?"));var f=e.substring(e.indexOf("?")+1);
b=f+b;}g.url=a;g.submit({url:a,method:"POST",params:b,success:function(h,j){Ext.Msg.show({title:ttIntegrationTitle,msg:settingsSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(){thisController.reloadIntegrationPage();}});},failure:function(h,j){Ext.Msg.show({title:ttIntegrationTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});
}});}else{Ext.Msg.show({title:ttIntegrationTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}},isValidJSONPayload:function(b){if(b&&b!="$unconfigured"&&b!="none"){try{JSON.parse(b);}catch(a){Ext.Msg.show({title:ttIntegrationTitle,msg:ttJSONPayloadMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation",});
return false;}}return true;},ttManagerUpdate:function(){var m="";var R="";var M="";var Z="";var N="";var q="";var g="";var O="";var aa="";var c="";var S="";var l="";var J="";var Y="";var F="";var B="";var u="";var z="";var s="";var H="";var m="";var V=Ext.getCmp("yesEnableExecForTT");var a=Ext.getCmp("noEnableExecForTT");
var j=Ext.getCmp("Command2");var w=Ext.getCmp("Command");var h=Ext.getCmp("AllowedAlarmsC");var t=Ext.getCmp("AllowedAlarmsM");var n=Ext.getCmp("AllowedAlarmsMi");var I=Ext.getCmp("AllowedAlarmsN");var G=Ext.getCmp("LogFileMaxSize");var b=Ext.getCmp("yesLogEntriesForStdoutAlso");var A=Ext.getCmp("noLogEntriesForStdoutAlso");
var k=Ext.getCmp("DateFormat");var v=Ext.getCmp("CommandLength");var y=Ext.getCmp("ProbDescLength");var r=Ext.getCmp("TTIntegrationEnable");var X=Ext.getCmp("TTIntegrationDisable");var D=Ext.getCmp("TT_sys");var f=Ext.getCmp("yesttWrapperClassNeeded");var P=Ext.getCmp("nottWrapperClassNeeded");var K=Ext.getCmp("criticalAlarms");
var Q=Ext.getCmp("majorAlarms");var p=Ext.getCmp("minorAlarms");var o=Ext.getCmp("normalAlarms");var d=Ext.getCmp("criticalAlarms").getValue();var W=Ext.getCmp("majorAlarms").getValue();var T=Ext.getCmp("minorAlarms").getValue();var U=Ext.getCmp("normalAlarms").getValue();archeiveFile=fileName;Ext.getCmp("ArchieveFile").setValue(archeiveFile);
Ext.getCmp("mainWrapperClass").setValue(ttWrapper);var C="";var E="";var x="";var L="";var e="/final/admin/ManagerSettings/data/webServicesTTI_JSON.jsp?selectSysName="+D.getValue();Ext.Ajax.request({url:e,scope:this,method:"POST",success:function(ab){var ax=ab.responseText;var af=Ext.decode(ax);var an=af.enableExecForTT;
var aj=af.command;var al=af.alarmsArray.length;var ai=af.enableLogging;var ah=af.TTIntegrationEnable;var ad=af.displayTTIntegrationArchive;var ae=af.criticalAlarms;var ap=af.majorAlarms;var av=af.minorAlarms;var au=af.normalAlarms;var aC=af.TTWrapper;archeiveFile=af.ArchieveFile;var aA="<b>"+archeiveFile+"</b>";
if((Ext.isEmpty(archeiveFile)||archeiveFile=="")&&(Ext.isEmpty(archeiveFileUpload)||archeiveFileUpload=="")){Ext.getCmp("uploadLabel").hide();Ext.getCmp("removeLink").hide();}else{Ext.getCmp("uploadLabel").show();Ext.getCmp("removeLink").show();}if(Ext.getCmp("yesEnableExecForTT").getValue()){Ext.getCmp("EnableExecForTT").setValue("Yes");
}if(Ext.getCmp("noEnableExecForTT").getValue()){Ext.getCmp("EnableExecForTT").setValue("No");}if(Ext.getCmp("TTIntegrationEnable").getValue()||Ext.getCmp("TTIntegrationEnable").getValue()=="Yes"){var aD=Ext.getCmp("criticalAlarms").getValue();var az=Ext.getCmp("majorAlarms").getValue();var ar=Ext.getCmp("minorAlarms").getValue();
var aw=Ext.getCmp("normalAlarms").getValue();for(var ay=0;ay<af.filters.length;ay++){var ao=af.filters[ay];var aq=Ext.getCmp(ao.id).getValue();if(ao.type=="Textfield"||ao.type=="TextArea"){if(Ext.isEmpty(aq)){Ext.Msg.show({title:ttIntegration,msg:alertForNocommon,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return;}}}var ac=Ext.getCmp("yesttWrapperClassNeeded");if(!aD&&!az&&!ar&&!aw){Ext.Msg.show({title:ttIntegration,msg:alertForNoAlarm,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});return;}}if(an=="Yes"){R="Enable CLI$Yes";}else{R="Enable CLI$No";}M="Command$"+af.command;Z="Command Arguments$"+af.execOutFormat;
var ak="";var aB="Allowed alarms";for(var ay=0;ay<al;ay++){var at="$";var ag=af.alarmsArray[ay].alarms;ak+=at+ag;if(ag=="critical"){C="true";}if(ag=="major"){E="true";}if(ag=="minor"){x="true";}if(ag=="normal"){L="true";}}aB=aB+ak;if(C=="true"){N="Allowed alarms$critical";}if(E=="true"){N="Allowed alarms$major";
}if(x=="true"){N="Allowed alarms$minor";}if(L=="true"){N="Allowed alarms$normal";}if(ai=="Yes"){g="Log entries for stdout also -  TT Manager CLI$Yes";}else{g="Log entries for stdout also -  TT Manager CLI$No";}O="Date format to be used$"+af.dateFormat+" "+"HH:mm:ss";aa="Command length  (chars) for TT Manager CLI$"+af.commandLength;
c="Problem description length (chars)$"+af.probDescLength;q="Log file maximum size MB$"+af.logFileMaxSize;enableGraphStr="Enable Graph$"+af.enableGraph;Ext.getCmp("$_EnableExecForTT").setValue(R);Ext.getCmp("$_Command2").setValue(M);Ext.getCmp("Command").setValue(Z);Ext.getCmp("$_AllowedAlarms").setValue(aB);
Ext.getCmp("$_LogFileMaxSize").setValue(q);Ext.getCmp("$_LogEntriesForStdoutAlso").setValue(g);Ext.getCmp("$_DateFormat").setValue(O);Ext.getCmp("$_CommandLength").setValue(aa);Ext.getCmp("$_ProbDescLength").setValue(c);Ext.getCmp("process").setValue("ttmanagercli");Ext.getCmp("from").setValue("mgrstree");
if(ttWrapper=="None"){H="/final/admin/ManagerSettings/data/managerSettingsJSONp.jsp?mainWrapperClass=None&index=ttmanager";}else{H="/final/admin/ManagerSettings/data/managerSettingsJSONp.jsp?index=ttmanager";}var am=this.getTtmanager().getForm();if(am.isValid()){am.submit({url:H,method:"POST",success:function(aE,aF){Ext.Msg.show({title:pageTitle,msg:settingsSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconInformation"});
},failure:function(aE,aF){Ext.Msg.show({title:pageTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}});}else{Ext.Msg.show({title:pageTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}}});},generalSettingsUpdate:function(){var a="";
var b="/final/admin/ManagerSettings/data/generalSettingsJSON.jsp";Ext.Ajax.request({url:b,scope:this,method:"POST",success:function(k){var q=k.responseText;var I=Ext.decode(q);var e=I.authModeForLogin;e="Authentication mode for login$"+e;var ai=I.avgSumTrends;a=I.relativeThresholdHours;var R=I.trendMgrThreads;
var l=I.thresholdMgrThreads;var t=I.thresholdRunDuration;var y=I.thresholdAdjustPeriod;var Z=I.fromTime.fromStr;var n=I.toTime.toStr;var w=I.autoIpNameCheck;var L=I.nickIpCheck;var ad=I.loginAuthentication;var X=Ext.getCmp("TrendMgrThreads").getValue();var H=Ext.getCmp("ThresholdMgrThreads").getValue();
var x=Ext.getCmp("ThresholdRunDuration").getValue();var U=Ext.getCmp("ThresholdAdjustPeriod").getValue();var W=validateTextBoxes("general","trendComp",X);var r=validateTextBoxes("general","threshComp",H);var h=validateTextBoxes("general","freqThresh",x);var G=validateTextBoxes("general","dataPeriod",U);
var ac="";var aa="";var Q="";var v="";var N="";var F="";var s="";var E="";var ae="";var P="";var f=Ext.getCmp("yesAvgSumTrends").getValue();var Y=Ext.getCmp("noAvgSumTrends").getValue();var af=Ext.getCmp("yesAutoIpNameCheck").getValue();var p=Ext.getCmp("noAutoIpNameCheck").getValue();var M=Ext.getCmp("yesNickIpCheck").getValue();
var B=Ext.getCmp("noNickIpCheck").getValue();if(ai=="Yes"||ai=="yes"){ac="Compute average/sum of metrics while trending$Yes";}else{ac="Compute average/sum of metrics while trending$No";}aa="Number of threads for trend computation$"+R;Q="Number of threads for threshold computation$"+l;v="How frequently thresholds are computed in mins$"+t;
N="Data period that is used for sliding-window thresholds$"+y;F=new String(a);var ab=F.substring(0,F.indexOf("-"));var K=F.substring(F.indexOf("-")+1);timeForAuditStr=new String(ab);var T=timeForAuditStr.substring(0,timeForAuditStr.indexOf(":"));var j=timeForAuditStr.substring(timeForAuditStr.indexOf(":"));
timeToAuditStr=new String(K);var D=timeToAuditStr.substring(0,timeToAuditStr.indexOf(":"));var z=timeToAuditStr.substring(timeToAuditStr.indexOf(":"));var c=T+j+"-"+D+z;var S="Hours for which relative thresholds are computed$From : "+T+" Hrs "+j+" Mins  To : "+D+" Hrs "+z+" Mins";var m=Ext.getCmp("timeFrom").getValue();
m=Ext.Date.format(m,"H:i");timeFromStr=new String(m);var V=timeFromStr.substring(0,timeFromStr.indexOf(":"));minFromStr=new String(m);var A=minFromStr.substring(minFromStr.indexOf(":"));var J=Ext.getCmp("timeTo").getValue();J=Ext.Date.format(J,"H:i");if(J!=null&&J!=""&&J=="23:59"){J="24:00";}timeToStr=new String(J);
var C=timeToStr.substring(0,timeToStr.indexOf(":"));minToStr=new String(J);var ah=minToStr.substring(minToStr.indexOf(":"));var o=V+A+"-"+C+ah;Ext.getCmp("timefrom").setValue(V);Ext.getCmp("minfrom").setValue(A);Ext.getCmp("timeto").setValue(C);Ext.getCmp("minto").setValue(ah);P="Hours for which relative thresholds are computed$From : "+V+" Hrs "+A+" Mins  To : "+C+" Hrs "+ah+ +" Mins";
if(w=="Yes"||w=="yes"){s="Identify agents only using nick names$Yes";}else{s="Identify agents only using nick names$No";}if(L=="Yes"||L=="yes"){E="Verify if agent is reporting from configured IP$Yes";}else{E="Verify if agent is reporting from configured IP$No";}if(ad){ae="Authenticate users for login$Yes";
}else{ae="Authenticate users for login$No";}Ext.getCmp("$_AvgSumTrends").setValue(ac);Ext.getCmp("$_TrendMgrThreads").setValue(aa);Ext.getCmp("$_ThresholdMgrThreads").setValue(Q);Ext.getCmp("$_ThresholdRunDuration").setValue(v);Ext.getCmp("$_ThresholdAdjustPeriod").setValue(N);Ext.getCmp("RelativeThresholdHours").setValue(o);
Ext.getCmp("$_AutoIpNameCheck").setValue(s);Ext.getCmp("$_NickIpCheck").setValue(E);Ext.getCmp("$_LoginAuthentication").setValue(ae);Ext.getCmp("$_relativeThresholdTime").setValue(S);Ext.getCmp("$_AuthenticationModeForLogin").setValue(e);Ext.getCmp("process").setValue("general");Ext.getCmp("from").setValue("mgrstree");
var ag="general";var u="mgrstree";var d="";var g='<egui:intnl text="admin.generalsettings.General Settings"/>';var O=this.getGeneral().getForm();if(W=="false"){Ext.Msg.show({title:generalPageTitle,msg:alertForTrendComp,width:500,buttons:Ext.Msg.OK,icon:"iconExclamation"});}if(r=="false"){Ext.Msg.show({title:generalPageTitle,msg:alertForThreshComp,width:500,buttons:Ext.Msg.OK,icon:"iconExclamation"});
}if(h=="false"){Ext.Msg.show({title:generalPageTitle,msg:alertForFreqThresh,buttons:Ext.Msg.OK,icon:"iconExclamation"});}if(G=="false"){Ext.Msg.show({title:generalPageTitle,msg:alertForDataPeriod,buttons:Ext.Msg.OK,icon:"iconExclamation"});}if(W=="true"&&r=="true"&&h=="true"&&G=="true"){if(O.isValid()){O.submit({url:"/final/admin/ManagerSettings/data/generalSettingsJSONp.jsp",params:"requestFrom=updateGeneralSettings",method:"POST",success:function(aj,ak){Ext.Msg.show({title:generalPageTitle,msg:settingsSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconInformation"});
},failure:function(aj,ak){Ext.Msg.show({title:generalPageTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}});}else{Ext.Msg.show({title:generalPageTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}}}});},notificationUpdate:function(){var a="/final/admin/ManagerSettings/data/managerNotificationJSON.jsp";
Ext.Ajax.request({url:a,scope:this,method:"POST",success:function(g){var e=g.responseText;var n=Ext.decode(e);var r=n.enableLicenseExpiry;var b=n.licenseCountExpiryAlert;var j=n.popupDiscComps;var q=n.alertForAgentsNotRun;var c=n.alertForUnconfigAgents;var m=n.alertForUpgradeTests;var d="";var h="";var k="";
var p="";var l="";var f="";if(!Ext.isEmpty(r)&&r=="True"){d="Alert when license expires$Yes";}else{d="Alert when license expires$No";}Ext.getCmp("$_LICENSE_EXPIRY_ALERT$enableID").setValue(d);if(!Ext.isEmpty(b)&&b=="True"){h="Alert when agent licenses are exhausted$Yes";}else{h="Alert when agent licenses are exhausted$No";
}Ext.getCmp("$_MISC_ARGS$LICENSE_COUNT_EXHAUSTED_ALERT_ID").setValue(h);if(!Ext.isEmpty(j)&&j=="Yes"){k="Notify newly discovered components$Yes";}else{k="Notify newly discovered components$No";}Ext.getCmp("$_DiscCompsFlag").setValue(k);if(!Ext.isEmpty(q)&&q=="Yes"){p="Alert if agents are not running$Yes";
}else{p="Alert if agents are not running$No";}Ext.getCmp("$_MISC_ARGS$UIAlertForAgentsNotRunningID").setValue(p);if(!Ext.isEmpty(c)&&c=="Yes"){l="Alert when agents are not mapped to components$Yes";}else{l="Alert when agents are not mapped to components$No";}Ext.getCmp("$_MISC_ARGS$UIAlertForUnconfiguredAgentsID").setValue(l);
if(!Ext.isEmpty(m)&&m=="Yes"){f="Notify new/deprecated tests are available after upgrade$Yes";}else{f="Notify new/deprecated tests are available after upgrade$No";}Ext.getCmp("$_MISC_ARGS$UIAlertForUpgradeTests").setValue(f);Ext.getCmp("process").setValue("managerNotification");Ext.getCmp("from").setValue("mgrstree");
var o=this.getManagerNotification().getForm();if(o.isValid()){o.submit({url:"/final/admin/ManagerSettings/data/managerNotificationJSONp.jsp",method:"POST",success:function(s,t){Ext.Msg.show({title:notificationSuccessTitle,msg:settingsSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconInformation"});
},failure:function(s,t){Ext.Msg.show({title:notificationSuccessTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}});}else{Ext.Msg.show({title:notificationSuccessTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}}});},acklockoutUpdate:function(){var g="";
var d="";var b="";var f="";var h="";var e=Ext.getCmp("nofAttmpt").getValue();var a=Ext.getCmp("timeperiod").getValue();var c="/final/admin/ManagerSettings/data/accountLockoutJSON.jsp";Ext.Ajax.request({url:c,scope:this,method:"POST",success:function(m){var k=m.responseText;var n=Ext.decode(k);var q=n.InvalidLoginMsg;
var r=n.userAL;var j=n.userLS;var p=n.userNA;var o=n.userTP;if(q=="G"){g="MessageType$Generic";}if(q=="S"){g="MessageType$Specific";}if(r=="yes"){d="Enable account lockout$yes";}if(r=="no"){d="Enable account lockout$no";}if(j=="R"){b="Lockout Strategy$Reset";}if(j=="T"){b="Lockout Strategy$Time";}f="Allowed login failure attempts$"+p;
h="Time period$"+o;Ext.getCmp("$_msgTypeRadio").setValue(g);Ext.getCmp("$_lckTypeRadio").setValue(d);Ext.getCmp("$_lckStrategyRadio").setValue(b);Ext.getCmp("$_nofAttmpt").setValue(f);Ext.getCmp("$_timeperiod").setValue(h);Ext.getCmp("process").setValue("acklockout");Ext.getCmp("from").setValue("mgrstree");
var l=this.getAcklockout().getForm();if(l.isValid()){l.submit({url:"/final/admin/ManagerSettings/data/accountLockoutJSONp.jsp?timeperiod="+a+"&nofAttmpt="+e,method:"POST",success:function(s,t){Ext.Msg.show({title:lockoutTitle,msg:settingsSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconInformation"});
},failure:function(s,t){Ext.Msg.show({title:lockoutTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}});}else{Ext.Msg.show({title:lockoutTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}}});},getPasswordComplexity:function(){var c=Ext.getCmp("lowercase").getValue();
var d=Ext.getCmp("uppercase").getValue();var e=Ext.getCmp("number").getValue();var b=Ext.getCmp("specialchar").getValue();var a="";if(c){a+="LC";}if(d){a+=","+"UC";}if(e){a+=","+"DG";}if(b){a+=","+"SP";}if(a.indexOf(",")==0){a=a.substring(1);}return a;},setPasswordComplexity:function(d){var c;if(d.indexOf(",")>-1){c=d.split(",");
for(var b=0;b<c.length;b++){var a=c[b].toLowerCase();if(a=="lc"){Ext.getCmp("lowercase").setValue(true);}else{if(a=="uc"){Ext.getCmp("uppercase").setValue(true);}else{if(a=="dg"){Ext.getCmp("number").setValue(true);}else{if(a=="sp"){Ext.getCmp("specialchar").setValue(true);}}}}}}else{c=d.toString().toLowerCase();
if(c=="uc"){Ext.getCmp("uppercase").setValue(true);}else{if(c=="dg"){Ext.getCmp("number").setValue(true);}else{if(c=="sp"){Ext.getCmp("specialchar").setValue(true);}else{Ext.getCmp("lowercase").setValue(true);}}}}},enablePasswordHistory:function(b){var a=b.getValue().minHisEnable;if(a.toLowerCase()=="yes"||a.toLowerCase()=="true"){Ext.getCmp("minHistory").show();
}else{Ext.getCmp("minHistory").hide();}},pwdpolicyUpdate:function(){var e=Ext.getCmp("minLen");var b=e.getValue();var g=this.getPasswordComplexity();var a=Ext.getCmp("minHistoryEnableYes").getValue();var f=Ext.getCmp("minHistory1").getValue();var c="true";if(b==null||b<2){Ext.Msg.show({title:pwdpolicyTitle,msg:defMinLenAlert,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(h){e.focus();
}});return;}if(g==""){Ext.Msg.show({title:pwdpolicyTitle,msg:pwdCompAlert,buttons:Ext.Msg.OK,icon:"iconExclamation",});return;}var d="/final/admin/ManagerSettings/data/passwordPolicyJSON.jsp";Ext.Ajax.request({url:d,scope:this,method:"POST",success:function(l){var o=l.responseText;var n=Ext.decode(o);
minLenPrevious=n.pwdMinLength;passComplexity=n.pwdComplexity;minHisEnablePrevious=n.pwdMinHistoryEnable;minLenPreviousStr="Minimum length of a password$"+minLenPrevious;minPassComplexStr="Password complexity$"+passComplexity;Ext.getCmp("$_minLen").setValue(minLenPreviousStr);Ext.getCmp("$_pwdComplexity").setValue(minPassComplexStr);
Ext.getCmp("process").setValue("pwdpolicy");Ext.getCmp("from").setValue("mgrstree");var k="&$_minLen="+minLenPreviousStr+"&$_pwdComplexity="+minPassComplexStr+"&process=pwdpolicy&from=mgrstree";if(minHisEnablePrevious){minHisPrevious=n.pwdMinHistory;minHisEnablePreviousStr="Minimum History Enable$"+minHisEnablePrevious;
minHisPreviousStr="Minimum History of a password$"+minHisPrevious;Ext.getCmp("$_minHisEnable").setValue(minHisEnablePreviousStr);Ext.getCmp("$_minHis").setValue(minHisPreviousStr);k+="&$_minHisEnable="+minHisEnablePreviousStr+"&$_minHis="+minHisPreviousStr;}var j=this.checkpwdpolicy();if(j!="true"){if(j=="1"){Ext.Msg.show({title:pwdpolicyTitle,msg:noLenAlert,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(q){e.focus();
}});}else{if(j=="2"){Ext.Msg.show({title:pwdpolicyTitle,msg:defMinLenAlert,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(q){e.focus();}});}else{if(j=="3"){Ext.Msg.show({title:pwdpolicyTitle,msg:maxLenAlert,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(q){e.focus();}});}}}Ext.getCmp("minLen").focus();
c="false";return;}var p=this.pwdComplexityCheck();if(p!="true"){c="false";return;}if(a!=null&&a==true){var m=this.checkpwdhistory();if(m!="true"){if(f==null){Ext.Msg.show({title:pwdpolicyTitle,msg:noHistoryAlert,buttons:Ext.Msg.OK,icon:"iconExclamation"});}else{if(m=="1"){Ext.Msg.show({title:pwdpolicyTitle,msg:minHistoryAlert,buttons:Ext.Msg.OK,icon:"iconExclamation"});
}else{if(m=="2"){Ext.Msg.show({title:pwdpolicyTitle,msg:maxHistoryAlert,buttons:Ext.Msg.OK,icon:"iconExclamation"});}}}Ext.getCmp("minHistory1").focus();c="false";}}var h=this.getPwdpolicy().getForm();if(c=="true"){Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/passwordPolicyJSONp.jsp?minLen="+b+"&pwdComplexity="+g+"&minHistoryEnable="+a+"&minHistory="+f+k,method:"POST",success:function(q){Ext.Msg.show({title:pwdpolicyTitle,msg:settingsSuccessUpdate,buttons:Ext.Msg.OK,icon:"iconInformation"});
},failure:function(q,r){Ext.Msg.show({title:pwdpolicyTitle,msg:settingsNoSuccessUpdate,buttons:Ext.Msg.OK,icon:"iconExclamation"});}});}}});},secureFilterUpdate:function(){var c=Ext.getCmp("yesSecurityfilter").getValue();var a="No";if(!Ext.isEmpty(c)){if(c){a="Yes";}else{a="No";}}var b="/final/admin/ManagerSettings/data/EgSecurityFilterJson.jsp";
Ext.Ajax.request({url:b,scope:this,method:"POST",success:function(d){var g=d.responseText;var f=Ext.decode(g);isEnableSecurityFiltersPrevious=f.isEnableSecurityFilters;if(!Ext.isEmpty(isEnableSecurityFiltersPrevious)){if(isEnableSecurityFiltersPrevious){isEnableSecurityFiltersPrevious="Yes";}if(!isEnableSecurityFiltersPrevious){isEnableSecurityFiltersPrevious="No";
}}secureFilterPrevStr="Enable Security Filters$"+isEnableSecurityFiltersPrevious;Ext.getCmp("$_enableSecureFilter").setValue(secureFilterPrevStr);Ext.getCmp("process").setValue("securityfilter");Ext.getCmp("from").setValue("mgrstree");var e=this.getSecurityfilter().getForm();if(e.isValid()){var h=settingsSuccessUpdate;
if(c){h=enableMsg;}else{h=disableMsg;}e.submit({url:"/final/admin/ManagerSettings/data/EgSecurityFilterJsonp.jsp?enableSecureFilter="+a,method:"POST",success:function(j,k){Ext.Msg.show({title:secureFilterTitle,msg:h,buttons:Ext.Msg.OK,icon:"iconInformation"});},failure:function(j,k){Ext.Msg.show({title:secureFilterTitle,msg:settingsNoSuccessUpdate,buttons:Ext.Msg.OK,icon:"iconExclamation"});
}});}}});},ssoLoginUpdate:function(){var a=Ext.getCmp("yesidpLogout").getValue();var b="/final/admin/ManagerSettings/data/EgSamlSsoJson.jsp";Ext.Ajax.request({url:b,scope:this,method:"POST",success:function(g){var e=g.responseText;var k=Ext.decode(e);var f=k.isLogin;var j=k.isIdpLogout;var n="false";
if(!Ext.isEmpty(f)&&f){n="true";}var h="Enable single sign-on SSO$"+f;var l="Allow the user to logout from the Identity Provider IdP$"+j;Ext.getCmp("$_ssoLogin").setValue(h);Ext.getCmp("$_idpLogout").setValue(l);Ext.getCmp("process").setValue("ssologinsetting");Ext.getCmp("from").setValue("mgrstree");
var d=this.getSinglesignon().getForm();if(d.isValid()){var m=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});m.show();var c=updateLogoutUrlMsg;if(!a){c=successMsgSSOLbl;}d.submit({url:"/final/admin/ManagerSettings/data/EgSamlSsoJsonp.jsp?",method:"POST",success:function(o,p){m.hide();Ext.Msg.show({title:SSOTitleLbl,msg:c,buttons:Ext.Msg.OK,icon:"iconInformation"});
},failure:function(o,p){m.hide();switch(p.failureType){case Ext.form.action.Action.CLIENT_INVALID:Ext.Msg.show({title:SSOTitleLbl,msg:"Form fields may not be submitted with invalid values. "+p.response.statusText,buttons:Ext.Msg.OK,icon:"iconExclamation"});break;case Ext.form.action.Action.CONNECT_FAILURE:Ext.Msg.show({title:SSOTitleLbl,msg:"Ajax communication failed. "+p.response.statusText,buttons:Ext.Msg.OK,icon:"iconExclamation"});
case Ext.form.action.Action.SERVER_INVALID:Ext.Msg.show({title:SSOTitleLbl,msg:p.response.statusText,buttons:Ext.Msg.OK,icon:"iconExclamation"});}}});}}});},checkpwdpolicy:function(){var a=Ext.getCmp("minLen").getValue();if(a==null){return"1";}else{if(a<2){return"2";}else{if(a>16){return"3";}else{return"true";
}}}},pwdComplexityCheck:function(){var d=Ext.getCmp("minLen");var f=d.getValue();var b=Ext.getCmp("lowercase").getValue();var a=Ext.getCmp("uppercase").getValue();var e=Ext.getCmp("number").getValue();var c=Ext.getCmp("specialchar").getValue();var g=0;if(b){g++;}if(a){g++;}if(e){g++;}if(c){g++;}if(f<g){Ext.Msg.show({title:pwdpolicyTitle,msg:minLenAlert,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(h){d.focus();
}});}else{return"true";}},checkpwdhistory:function(){var a=Ext.getCmp("minHistory1").getValue();if(a<1){return"1";}else{if(a>20){return"2";}else{return"true";}}},testConfigUpdate:function(){var b=Ext.getCmp("yesEditHost").getValue();var d=Ext.getCmp("noEditHost").getValue();var c="";var a="/final/admin/ManagerSettings/data/testConfigurationJSON.jsp";
Ext.Ajax.request({url:a,scope:this,method:"POST",success:function(f){var j=f.responseText;var h=Ext.decode(j);var g=h.editHost;if(g.toLowerCase()=="true"||g.toLowerCase()=="yes"){c="Is host editable$Yes";}else{c="Is host editable$No";}Ext.getCmp("$_EditHost").setValue(c);Ext.getCmp("process").setValue("testconfig");
Ext.getCmp("from").setValue("mgrstree");var e=this.getTestconfiguration().getForm();if(e.isValid()){e.submit({url:"/final/admin/ManagerSettings/data/testConfigurationJSONp.jsp",method:"POST",success:function(k,l){Ext.Msg.show({title:testConfigPageTitle,msg:settingsSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconInformation"});
},failure:function(k,l){Ext.Msg.show({title:testConfigPageTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}});}}});},thresholdConfigUpdate:function(){var c=Ext.getCmp("threshIntervalForDisplay").getValue();var h=Ext.getCmp("thresholdCheckPeriodID").getValue();var f=Ext.getCmp("threshInterval");
var g="";var a="";var e="";var d="true";if(c=="Daily"){e="day"+"(s)";f.setValue("day");}else{if(c=="Weekly"){e="week"+"(s)";f.setValue("week");}else{if(c=="Monthly"){e="month"+"(s)";f.setValue("month");}}}var b="/final/admin/ManagerSettings/data/thresholdConfigurationJSON.jsp";Ext.Ajax.request({url:b,scope:this,method:"POST",success:function(k){var n=k.responseText;
var m=Ext.decode(n);var p=m.thresholdChkVal;var q=m.thresholdChkInterval;g="Automatic threshold computation policy$"+q;a="Lookback period to compute automatic thresholds$"+p;Ext.getCmp("$_threshInterval").setValue(g);Ext.getCmp("$_thresholdCheckPeriod").setValue(a);Ext.getCmp("process").setValue("thresholdconfig");
Ext.getCmp("from").setValue("mgrstree");var j=this.getThresholdconfiguration().getForm();var o=isAValidNumber(h);var l=parseInt(h)<=0;if(l=="true"||l==true){Ext.Msg.show({title:threshConfigPageTitle,msg:alertForNotGreaterThanZero,width:530,buttons:Ext.Msg.OK,icon:"iconExclamation"});d="false";}if(o=="false"){Ext.Msg.show({title:threshConfigPageTitle,msg:alertForNoLookBackPeriod,width:530,buttons:Ext.Msg.OK,icon:"iconExclamation"});
d="false";}if(d=="true"){if(j.isValid()){j.submit({url:"/final/admin/ManagerSettings/data/thresholdConfigurationJSONp.jsp",method:"POST",success:function(r,s){Ext.Msg.show({title:threshConfigPageTitle,msg:settingsSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconInformation"});},failure:function(r,s){Ext.Msg.show({title:threshConfigPageTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});
}});}else{Ext.Msg.show({title:threshConfigPageTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}}}});},threshIntervalChange:function(){var b=Ext.getCmp("threshIntervalForDisplay").getValue();var a=Ext.getCmp("daysId");if(b=="Daily"){tempShowText="day"+"(s)";a.setText(tempShowText);
}else{if(b=="Weekly"){tempShowText="week"+"(s)";a.setText(tempShowText);}else{if(b=="Monthly"){tempShowText="month"+"(s)";a.setText(tempShowText);}}}},commandExecUpdate:function(){var j="";var e="";var d="";var l="";var r="";var o="";var k="true";var p=Ext.getCmp("yesEnable_mail").getValue();var b=Ext.getCmp("noEnable_mail").getValue();
var f=Ext.getCmp("Log_maxsizeID").getValue();var h=Ext.getCmp("yesLogEntries").getValue();var q=Ext.getCmp("noLogEntries").getValue();var m=Ext.getCmp("yesSeparate_exec").getValue();var n=Ext.getCmp("noSeparate_exec").getValue();var g=Ext.getCmp("Command_lengthID").getValue();var c=Ext.getCmp("allowed_formatID").getValue();
var a="/final/admin/ManagerSettings/data/commandExecutionJSON.jsp";Ext.Ajax.request({url:a,scope:this,method:"POST",success:function(w){var u=w.responseText;var A=Ext.decode(u);var y=A.enableCommandExec;if(y=="Yes"){j="Enable Command Execution$Yes";}else{j="Enable Command Execution$No";}var z=A.logForStdoutAlso;
if(z=="Yes"){d="Log entries for stdout also - Command Execution$Yes";}else{d="Log entries for stdout also - Command Execution$No";}var B=A.SeparateExec;if(B=="Yes"){l="Separate Execution$Yes";}else{l="Separate Execution$No";}var C=A.cmdLength;var x=A.allowed_format;r="Command length in chars for Command Execution$"+C;
o="Allowed script types for Command Execution$"+x;Ext.getCmp("$_Enable_mail").setValue(j);Ext.getCmp("$_Log_maxsize").setValue(e);Ext.getCmp("$_LogEntries").setValue(d);Ext.getCmp("$_Separate_exec").setValue(l);Ext.getCmp("$_Command_length").setValue(r);Ext.getCmp("$_allowed_format").setValue(o);Ext.getCmp("process").setValue("commandexecution");
Ext.getCmp("from").setValue("mgrstree");var t=validateTextBoxes("commandexecution","logMaxSize",f);var s=validateTextBoxes("commandexecution","commandLength",g);if(t=="false"){Ext.Msg.show({title:commandExecPageTitle,msg:alertForLogMaximumSize,buttons:Ext.Msg.OK,icon:"iconExclamation"});k="false";}if(s=="false"){Ext.Msg.show({title:commandExecPageTitle,msg:alertForCommandLength,buttons:Ext.Msg.OK,icon:"iconExclamation"});
k="false";}var v=this.getCommandexecution().getForm();if(k=="true"){if(v.isValid()){v.submit({url:"/final/admin/ManagerSettings/data/commandExecutionJSONp.jsp",method:"POST",success:function(D,E){Ext.Msg.show({title:commandExecPageTitle,msg:settingsSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconInformation"});
},failure:function(D,E){Ext.Msg.show({title:commandExecPageTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}});}else{Ext.Msg.show({title:commandExecPageTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}}},});},logUpdate:function(){var k="";
var l="";var g="";var s="";var r=Ext.getCmp("generalPanel");var c=Ext.getCmp("yesLogDbCleanup");var n=Ext.getCmp("noLogDbCleanup");var e=Ext.getCmp("logCleanUp");var a=Ext.getCmp("yesLogScheduleReports");var q=Ext.getCmp("noLogScheduleReports");var j=Ext.getCmp("logScheduleReports");var m=Ext.getCmp("yesTrendLog");
var h=Ext.getCmp("noTrendLog");var b=Ext.getCmp("logTrendActivity");var o=Ext.getCmp("yesThresholdLog");var f=Ext.getCmp("noThresholdLog");var p=Ext.getCmp("logThreshComputeActivity");var d="/final/admin/ManagerSettings/data/logSettingsJSON.jsp";Ext.Ajax.request({url:d,scope:this,method:"POST",success:function(y){var x=y.responseText;
var E=Ext.decode(x);var t=E.logDbCleanup;var D=E.logScheduleReports;var w=E.trendLog;var u=E.thresholdLog;if(t.toLowerCase()=="true"||t.toLowerCase()=="yes"){k="Log eG database cleanup operations$Yes";}else{k="Log eG database cleanup operations$No";}if(D.toLowerCase()=="true"||D.toLowerCase()=="yes"){l="Log the scheduling of reports$Yes";
}else{l="Log the scheduling of reports$No";}if(w.toLowerCase()=="true"||w.toLowerCase()=="yes"){g="Log data trending activity$Yes";}else{g="Log data trending activity$No";}if(u.toLowerCase()=="true"||u.toLowerCase()=="yes"){s="Log threshold computation activity$Yes";}else{s="Log threshold computation activity$No";
}var z=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"$_LogDbCleanup",name:"$_LogDbCleanup",value:k,});e.add(z);var C=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"$_LogScheduleReports",name:"$_LogScheduleReports",value:l,});j.add(C);var F=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"$_TrendLog",name:"$_TrendLog",value:g,});
j.add(F);var B=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"$_ThresholdLog",name:"$_ThresholdLog",value:s,});j.add(B);var v=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"process",name:"process",value:"logsettings",});r.add(v);var A=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"from",name:"from",value:"mgrstree",});
r.add(A);var G=this.getLogsettings().getForm();if(G.isValid()){G.submit({url:"/final/admin/ManagerSettings/data/logSettingsJSONp.jsp",method:"POST",success:function(H,I){Ext.Msg.show({title:logSettingsPageTitle,msg:settingsSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconInformation"});},failure:function(H,I){Ext.Msg.show({title:logSettingsPageTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});
}});}}});},auditingRadioChange:function(){var a=Ext.getCmp("yesEnableAuditlog");var b=Ext.getCmp("noEnableAuditlog");if(a.getValue()){Ext.getCmp("commandLineActivity").show();}if(b.getValue()){Ext.getCmp("commandLineActivity").hide();}},acklckoutRadioChange:function(){var c=Ext.getCmp("yesLock");var a=Ext.getCmp("noLock");
var b=Ext.getCmp("rlckStrategy");var d=Ext.getCmp("tlckStrategy");if(c.getValue()){Ext.getCmp("nofAttmpt").show();Ext.getCmp("lckStrategy").show();if(b.getValue()){Ext.getCmp("timeperiod").hide();}if(d.getValue()){Ext.getCmp("timeperiod").show();}}if(a.getValue()){Ext.getCmp("nofAttmpt").hide();Ext.getCmp("lckStrategy").hide();
Ext.getCmp("timeperiod").hide();}},lckStrategyRadioChange:function(){var a=Ext.getCmp("rlckStrategy");var b=Ext.getCmp("tlckStrategy");if(a.getValue()){Ext.getCmp("timeperiod").hide();}if(b.getValue()){Ext.getCmp("timeperiod").show();}},auditingUpdate:function(){var l="";var c="";var e="";var g="";var m=Ext.getCmp("generalPanel");
var a=Ext.getCmp("yesEnableAuditlog");var d=Ext.getCmp("noEnableAuditlog");var k=Ext.getCmp("enableAuditing");var h=Ext.getCmp("yesAuditlogForCLI");var f=Ext.getCmp("noAuditlogForCLI");var j=Ext.getCmp("commandLineActivity");var b="/final/admin/ManagerSettings/data/auditingJSON.jsp";Ext.Ajax.request({url:b,scope:this,method:"POST",success:function(p){var t=p.responseText;
var s=Ext.decode(t);var r=s.auditLogJson.EnableAuditlog;var n=s.auditLogJson.auditlogForCLI;if(r=="yes"||r=="Yes"){c="AuditlogEnabled$true";}if(r=="no"||r=="No"){c="AuditlogEnabled$false";}if(n=="true"){l="Display command line interface in auditlog$true";}if(n=="false"){l="Display command line interface in auditlog$false";
}var u=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"$_AuditlogForCLI",name:"$_AuditlogForCLI",value:l,});m.add(u);var o=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"$_EnableAuditlog",name:"$_EnableAuditlog",value:c,});m.add(o);var q=this.getAuditing().getForm();if(q.isValid()){q.submit({url:"/final/admin/ManagerSettings/data/auditingJSONp.jsp",method:"POST",success:function(v,w){Ext.Msg.show({title:auditingPageTitle,msg:settingsSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconInformation"});
},failure:function(v,w){Ext.Msg.show({title:auditingPageTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}});}}});},advSetUpdate:function(){var s="";var g="";var a="";var p="";var q="";var v=Ext.getCmp("generalPanel");var f=Ext.getCmp("yesStlnMgrRestart");var k=Ext.getCmp("noStlnMgrRestart");
var o=Ext.getCmp("stlnMgrRestart");var j=Ext.getCmp("yesMgrOutput");var e=Ext.getCmp("noMgrOutput");var c=Ext.getCmp("mgrOutput");var m=Ext.getCmp("yesMgrOutputOverWirte");var d=Ext.getCmp("noMgrOutputOverWirte");var t=Ext.getCmp("mgrOutputOverWirte");var r=Ext.getCmp("yesManConfig");var n=Ext.getCmp("noManConfig");
var h=Ext.getCmp("manConfig");var w=Ext.getCmp("yesExtAgent");var b=Ext.getCmp("noExtAgent");var l=Ext.getCmp("extAgent");var u=this;Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/advanceSettingsJSON.jsp",method:"POST",success:function(D){if(D.status==200&&!Ext.isEmpty(D.responseText)){var z=D.responseText;
var K=Ext.decode(z);var I=K.managerOutput;var M=K.mgrOutputOverWirte;var B=K.updateManConfig;var C=K.nowExtAgent;var A="Restart the manager now ?$No";if(I=="Yes"||I=="yes"){g="Manager Output and Error$Yes";}if(I=="No"||I=="no"){g="Manager Output and Error$No";}if(M=="Yes"||M=="yes"){a="Output mode$Yes";
}if(M=="No"||M=="no"){a="Output mode$No";}if(B=="Yes"||B=="yes"){p="Update Manual Config Files$Yes";}if(B=="No"||B=="no"){p="Update Manual Config Files$No";}if(C=="Yes"||C=="yes"){q="External agents for aggregate components$Yes";}if(C=="No"||C=="no"){q="External agents for aggregate components$No";}var L=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"$_stlnMgrRestart",name:"$_stlnMgrRestart",value:A,});
o.add(L);var y=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"$_mgrOutput",name:"$_mgrOutput",value:g,});c.add(y);var H=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"$_mgrOutputOverWirte",name:"$_mgrOutputOverWirte",value:a,});t.add(H);var F=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"$_manConfig",name:"$_manConfig",value:p,});
h.add(F);var G=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"$_extAgent",name:"$_extAgent",value:q,});l.add(G);var x=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"process",name:"process",value:"advancedmgrsettings",});v.add(x);var J=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"from",name:"from",value:"mgrstree",});
v.add(J);var E=u.getAdvancedsettings().getForm();if(E.isValid()){E.submit({url:"/final/admin/ManagerSettings/data/advanceSettingsJSONp.jsp",method:"POST",success:function(O,P){var Q=true;if(P.response.status==200&&!Ext.isEmpty(P.response.responseText)){var N=Ext.decode(P.response.responseText);if(N.errorMessageFound){Q=false;
n.setValue("no");Ext.Msg.show({title:"Advanced Settings",msg:N.aggregateErrorMsg,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}}if(Q){n.setValue("no");Ext.Msg.show({title:"Advanced Settings",msg:settingsSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconInformation"});}if(!Ext.getCmp("stlnMgrRestart_sec").isHidden()){Ext.getCmp("stlnMgrRestart_sec").items.items[1].setValue(true);
}},failure:function(N,O){if(!Ext.getCmp("stlnMgrRestart_sec").isHidden()){Ext.getCmp("stlnMgrRestart_sec").items.items[1].setValue(true);}Ext.Msg.show({title:"Advanced Settings",msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}});}}}});},capacityPlanningUpdate:function(){var a="";
var k="";var h=Ext.getCmp("generalPanel");var e=Ext.getCmp("yesCapacityTrend");var c=Ext.getCmp("noCapacityTrend");var j=Ext.getCmp("capacitytrend");var d=Ext.getCmp("yesCapcityreport");var b=Ext.getCmp("noCapcityreport");var f=Ext.getCmp("capcityreport");var g=this;Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/capacityPlanningJSON.jsp",method:"POST",success:function(o){if(o.status==200&&!Ext.isEmpty(o.responseText)){var m=o.responseText;
var u=Ext.decode(m);var r=u.capacitytrendenable;var t=u.capacityreportenable;if(r=="true"){a="Enable capacity computation by the manager$true";}if(r=="false"){a="Enable capacity computation by the manager$false";}if(t=="true"){k="Enable capacity reports$true";}if(t=="false"){k="Enable capacity reports$false";
}var p=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"$_capacitytrend",name:"$_capacitytrend",value:a,});j.add(p);var s=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"$_capcityreport",name:"$_capcityreport",value:k,});f.add(s);var l=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"process",name:"process",value:"capacityplanning",});
h.add(l);var q=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"from",name:"from",value:"mgrstree",});h.add(q);var n=g.getCapacityplanning().getForm();if(n.isValid()){n.submit({url:"/final/admin/ManagerSettings/data/capacityPlanningJSONp.jsp",method:"POST",success:function(v,w){Ext.Msg.show({title:capacityPlanPageTitle,msg:settingsSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconInformation"});
},failure:function(v,w){Ext.Msg.show({title:capacityPlanPageTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}});}}}});},wrapperClassRadioChange:function(){if(Ext.getCmp("yesttWrapperClassNeeded").getValue()){Ext.getCmp("uploadFile").setDisabled(false);Ext.getCmp("archiveUpload").hide();
}if(Ext.getCmp("nottWrapperClassNeeded").getValue()){Ext.getCmp("uploadFile").setDisabled(true);}if(Ext.getCmp("yesttWrapperClassNeeded").getValue()&&(archeiveFile!=""||archeiveFileUpload!="")){}if(fileName=="None"){}},virtualTopoUpdate:function(){var b="";var c=Ext.getCmp("generalPanel");var f=Ext.getCmp("yesVirtualmapping");
var d=Ext.getCmp("noVirtualmapping");var a=Ext.getCmp("virtualMapping");var e=this;Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/virtualTopologyJSON.jsp",method:"POST",success:function(j){if(j.status==200&&!Ext.isEmpty(j.responseText)){var l=j.responseText;var k=Ext.decode(l);var n=k.strVirtualMapping;
if(n=="true"){b="Virtual topology mapping$Auto";}if(n=="false"){b="Virtual topology mapping$Manual";}var o=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"$_virtualmapping",name:"$_virtualmapping",value:b,});a.add(o);var h=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"process",name:"process",value:"virtualtopology",});
c.add(h);var m=new Ext.form.field.Hidden({xtype:"hiddenfield",id:"from",name:"from",value:"mgrstree",});c.add(m);var g=e.getVirtualtopology().getForm();if(g.isValid()){g.submit({url:"/final/admin/ManagerSettings/data/virtualTopologyJSONp.jsp",method:"POST",success:function(p,q){Ext.Msg.show({title:virtualTopoPageTitle,msg:settingsSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconInformation"});
},failure:function(p,q){Ext.Msg.show({title:virtualTopoPageTitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});}});}}}});},uploadAcmeFile:function(){Ext.widget("fileupload").show();},fileUpload:function(){var k="jar";var e="";var d="class";var g="";Ext.getCmp("uploadtypeID").setValue("main");
var j=Ext.getCmp("mainClassName").getValue();var c=new String(j);var h=c.substring(c.lastIndexOf("\\")+1,c.indexOf("."));if(!Ext.isEmpty(j)){g=j.substring(j.indexOf(".")+1,j.length);}if(g!=d){Ext.Msg.show({title:"File Upload",msg:alertForFileExtension+".class File",width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return;}var b=Ext.getCmp("mainClassName").getValue();var f=Ext.getCmp("TT_Wrapper").getValue();fileDetailsStr=new String(f);fileName=fileDetailsStr.substring(fileDetailsStr.lastIndexOf("\\")+1,fileDetailsStr.indexOf("."));ttWrapper=b;if(!Ext.isEmpty(f)){e=f.substring(f.indexOf(".")+1,f.length);}if(!Ext.isEmpty(f)&&e!=k){Ext.Msg.show({title:"File Upload",msg:alertForFileExtension+".jar File",width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});
return;}var a="/final/admin/ManagerSettings/data/managerSettingsJSON.jsp";Ext.Ajax.request({url:a,scope:this,method:"POST",success:function(m){var p=m.responseText;var o=Ext.decode(p);var n="../servlet/com.eg.TTManagerWrapperUpload";var l=this.getFileuploadform().getForm();if(l.isValid()){l.submit({url:n,method:"POST",success:function(q,r){isAcmeUploaded="yes";
archeiveFileUpload=fileName;if(!Ext.isEmpty(fileName)){Ext.getCmp("uploadLabel").show();Ext.getCmp("removeLink").show();}Ext.getCmp("fileUpload").destroy();Ext.Msg.show({title:pageTitle,msg:uploadSuccessMessage,width:300,buttons:Ext.Msg.OK,icon:"iconInformation"});if(!Ext.isEmpty(b)&&Ext.isEmpty(fileName)){Ext.getCmp("nottWrapperClassNeeded").setValue(true);
}else{if(fileName!=null&&fileName.toLowerCase()!="none"){if(fileName.indexOf(".")==-1){Ext.getCmp("uploadLabel").setText(fileName+"."+onlyJar,true);}else{Ext.getCmp("uploadLabel").setText(fileName,true);}}else{Ext.getCmp("uploadLabel").hide();Ext.getCmp("removeLink").hide();}}},failure:function(q,r){Ext.Msg.show({title:pageTitle,msg:uploadFailureMessage,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});
Ext.getCmp("fileUpload").destroy();}});}}});},radioMgrOutChange:function(){if(Ext.getCmp("yesMgrOutput").getSubmitValue()=="Yes"){var a=Ext.MessageBox.confirm(advSettingsPageTitle,enableOutputErrorAlert,this.enableConfirmFunc,this);}},radioMgrOutDisableChange:function(){if(Ext.getCmp("noMgrOutput").getSubmitValue()=="No"){var a=Ext.MessageBox.confirm(advSettingsPageTitle,disableOutputErrorAlert,this.disableConfirmFunc,this);
}},enableConfirmFunc:function(a){if(a=="no"){Ext.getCmp("noMgrOutput").setValue(true);}else{Ext.getCmp("mgrOutputOverWirte").show();}},disableConfirmFunc:function(a){if(a=="no"){Ext.getCmp("yesMgrOutput").setValue(true);}else{Ext.getCmp("mgrOutputOverWirte").hide();}},checkAutoLoginFeature:function(){var a=Ext.getCmp("yesLoginAuthentication").getGroupValue();
if(!Ext.isEmpty(a)&&a.toLowerCase()=="no"){Ext.Ajax.request({url:"ManagerSettings/data/generalSettingsJSON.jsp",scope:this,asyn:false,method:"POST",success:function(b){if(b.status==200&&!Ext.isEmpty(b.responseText)){var e=b.responseText;var c=Ext.decode(e);var d=c.isSSO2FAEnabled;if(!Ext.isEmpty(d)&&d.toLowerCase()=="yes"){Ext.Msg.confirm(generalPageTitle,autoLoginAlertMsg3+". "+autoLoginAlertMsg4,function(f){if(f==="yes"){thisController.turnOff2FASSO();
}else{Ext.getCmp("yesLoginAuthentication").setValue(true);}});}}}});}},turnOff2FASSO:function(){Ext.Ajax.request({url:"ManagerSettings/data/generalSettingsJSONp.jsp",params:"requestFrom=turnoff2fasso",scope:this,asyn:false,method:"POST"});},get2FAConfigDetails:function(){sessionStorage.setItem("lastSelectedEvent","twofa");
Ext.Ajax.request({url:"ManagerSettings/data/twoFactorAuthenticationJson.jsp",scope:this,method:"POST",success:function(d){var f=Ext.getCmp("innerPanel");f.removeAll();Ext.getCmp("innerPanel").setTitle(TFATitle2.toUpperCase());f.add({xtype:"twofactorauth"});if(d.status==200&&!Ext.isEmpty(d.responseText)){var g=d.responseText;
tfaJsonData=Ext.decode(g);var e=tfaJsonData.is2FAEnabled;var c=tfaJsonData.twoFAOptionFlag;var b=tfaJsonData.twoFAOTPModeFlag;if(!Ext.isEmpty(e)&&(e.toLowerCase()=="true"||e.toLowerCase()=="yes")){Ext.getCmp("enable2FAYesFlag").setValue(true);}else{Ext.getCmp("enable2FANoFlag").setValue(true);}var a=Ext.getCmp("enable2FAYesFlag").getGroupValue();
if(!Ext.isEmpty(a)&&a.toLowerCase()=="yes"){Ext.getCmp("twoFAOptionFlag").show();if(!Ext.isEmpty(c)&&c.toLowerCase()=="c"){Ext.getCmp("compulsoryFlag").setValue(true);}else{Ext.getCmp("optionalFlag").setValue(true);}if(!Ext.isEmpty(b)&&b.toLowerCase()=="mail"){Ext.getCmp("mail").setValue(true);}else{if(!Ext.isEmpty(b)&&b.toLowerCase()=="sms"){Ext.getCmp("sms").setValue(true);
}else{if(!Ext.isEmpty(b)&&b.toLowerCase()=="ga"){Ext.getCmp("ga").setValue(true);}}}}else{Ext.getCmp("twoFAOptionFlag").hide();}}}});},show2FACnt:function(){var b=Ext.getCmp("enable2FAYesFlag").getGroupValue();if(!Ext.isEmpty(b)&&b.toLowerCase()=="yes"){var c=tfaJsonData.loginAuthentication;var a=tfaJsonData.isMailSettingsConfigured;
if(!Ext.isEmpty(c)&&!c){Ext.Msg.confirm(TFATitle,autoLoginAlertMsg1+". "+autoLoginAlertMsg2,function(f){if(f==="yes"){thisController.turnOffAutoLogin();Ext.getCmp("twoFAOptionFlag").show();if(!Ext.isEmpty(a)&&!a){var g=Ext.widget("grid",{modal:true,id:"unConfMailServerSettings",layout:"fit",ui:"newGridPanel",border:true,flex:1,margin:5,hideHeaders:true,emptyText:"No data found",viewConfig:{deferEmptyText:false},store:new Ext.data.Store({fields:["Message"],data:{"Message":'<table align="center"><tr><td><div class="iconExclamation"></div></td><td><div style="padding:10px">Before enabling this flag, please configure </div></td><td><div style="cursor:pointer;text-decoration:underline;padding:2px" onClick="javascript:thisController.goToMailServerSettings()">Mail Server Settings!</div></td></tr></table>'},}),columns:{items:[{dataIndex:"Message",flex:1,renderer:function(p,k,j,o,m,l,n){p='<div style="cursor:pointer;">'+p+"</div>";
if(p!=null||p!=""){return p;}}}]}});twofactorauth=Ext.getCmp("twofafieldset");twofactorauth.add(g);twofactorauth.doLayout();Ext.getCmp("twoFAOptionFlag").show();Ext.getCmp("twofa_submit_btn").disable();}else{Ext.getCmp("twofa_submit_btn").enable();var h=Ext.getCmp("unConfMailServerSettings");if(h!=null&&h!=undefined){twofactorauth=Ext.getCmp("twofafieldset");
twofactorauth.remove(h);twofactorauth.doLayout();}Ext.getCmp("twoFAOptionFlag").show();}}else{Ext.getCmp("enable2FANoFlag").setValue(true);Ext.getCmp("twoFAOptionFlag").hide();}});}else{if(!Ext.isEmpty(a)&&!a){var d=Ext.widget("grid",{modal:true,id:"unConfMailServerSettings",layout:"fit",ui:"newGridPanel",border:true,flex:1,margin:5,hideHeaders:true,emptyText:"No data found",viewConfig:{deferEmptyText:false},store:new Ext.data.Store({fields:["Message"],data:{"Message":'<table align="center"><tr><td><div class="iconExclamation"></div></td><td><div style="padding:10px">Before enabling this flag, please configure </div></td><td><div style="cursor:pointer;text-decoration:underline;padding:2px" onClick="javascript:thisController.goToMailServerSettings()">Mail Server Settings!</div></td></tr></table>'},}),columns:{items:[{dataIndex:"Message",flex:1,renderer:function(m,g,f,l,j,h,k){m='<div style="cursor:pointer;">'+m+"</div>";
if(m!=null||m!=""){return m;}}}]}});twofactorauth=Ext.getCmp("twofafieldset");twofactorauth.add(d);twofactorauth.doLayout();Ext.getCmp("twoFAOptionFlag").show();Ext.getCmp("twofa_submit_btn").disable();}else{Ext.getCmp("twofa_submit_btn").enable();var e=Ext.getCmp("unConfMailServerSettings");if(e!=null&&e!=undefined){twofactorauth=Ext.getCmp("twofafieldset");
twofactorauth.remove(e);twofactorauth.doLayout();}Ext.getCmp("twoFAOptionFlag").show();}}}else{Ext.getCmp("twofa_submit_btn").enable();var e=Ext.getCmp("unConfMailServerSettings");if(e!=null&&e!=undefined){twofactorauth=Ext.getCmp("twofafieldset");twofactorauth.remove(e);twofactorauth.doLayout();}Ext.getCmp("twoFAOptionFlag").hide();
}Ext.getCmp("optionalFlag").setValue(true);thisController.showVerificationModePanel();},goToMailServerSettings:function(){window.location.href="EgMailServerSettings.jsp?reqfrom=enabletwofa";},turnOffAutoLogin:function(){Ext.Ajax.request({url:"ManagerSettings/data/twoFactorAuthenticationJsonp.jsp",params:"requestFrom=turnoffautologin",scope:this,asyn:false,method:"POST"});
},showVerificationModePanel:function(){var e=Ext.getCmp("compulsoryFlag").getGroupValue();if(!Ext.isEmpty(e)&&e.toLowerCase()=="c"){var b=tfaJsonData.isMailIDConfig;var c=tfaJsonData.loginAuthentication;if(!Ext.isEmpty(b)&&b.toLowerCase()=="false"){Ext.getCmp("twofa_submit_btn").disable();thisController.showUnConfiguredMailUsers();
return;}else{Ext.getCmp("twofa_submit_btn").enable();Ext.getCmp("twoFAOTPMode").show();var d=Ext.getCmp("unConfMailUsersGrid");if(d!=null&&d!=undefined){twofactorauth=Ext.getCmp("twofafieldset");twofactorauth.remove(d);twofactorauth.doLayout();}}}else{if(!Ext.isEmpty(e)&&e.toLowerCase()=="o"){Ext.getCmp("twofa_submit_btn").enable();
Ext.getCmp("twoFAOTPMode").hide();var d=Ext.getCmp("unConfMailUsersGrid");if(d!=null&&d!=undefined){twofactorauth=Ext.getCmp("twofafieldset");twofactorauth.remove(d);twofactorauth.doLayout();}}}var a=tfaJsonData.isMailSettingsConfigured;if(!Ext.isEmpty(a)&&!a){Ext.getCmp("twofa_submit_btn").disable();
}},updateTFAAuthConfigDetails:function(){var d=Ext.getCmp("enable2FAYesFlag").getGroupValue();var f=Ext.getCmp("compulsoryFlag").getGroupValue();var a=Ext.getCmp("mail").getGroupValue();var e="";if(!Ext.isEmpty(d)&&d.toLowerCase()=="yes"){e="yes";}else{e="no";}var c="requestFrom=update2faConfig&twofaEnableFlagVal="+e+"&twofaOptionFlagVal="+f+"&twofaOTPModeFlagVal="+a;
var b=new Ext.LoadMask(Ext.getBody(),{msg:"Updating..."});b.show();Ext.Ajax.request({url:"ManagerSettings/data/twoFactorAuthenticationJsonp.jsp",params:c,scope:this,asyn:false,method:"POST",success:function(h){if(h.status==200&&!Ext.isEmpty(h.responseText)){b.hide();var k=h.responseText;var j=Ext.decode(k);
var g=j.success;if(!Ext.isEmpty(g)&&g.toLowerCase()=="true"){Ext.Msg.show({title:TFATitle,msg:TFAUpdateMsg,width:480,buttons:Ext.Msg.OK,icon:"iconInformation"});}}},failure:function(g){b.hide();Ext.Msg.show({title:TFATitle,msg:settingsNoSuccessUpdate,width:300,buttons:Ext.Msg.OK,icon:"iconExclamation"});
}});},showUnConfiguredMailUsers:function(){var a=Ext.widget("grid",{title:"Users not assigned with mail IDs",modal:true,id:"unConfMailUsersGrid",layout:"fit",ui:"newGridPanel whiteHeader",flex:1,margin:5,scroll:true,border:true,autoScroll:true,height:250,store:new Ext.data.Store({fields:["userID1","userID2"],data:tfaJsonData.MailUnConfiguredUsrsList}),viewConfig:{deferEmptyText:true},header:{margin:0,padding:0},dockedItems:[{xtype:"toolbar",dock:"top",ui:"topToolbarBorder",padding:"10 10",margin:"0",cls:"borderbottom_alt",items:[{xtype:"label",width:"100%",id:"Expand",scope:this,html:'<div style="float:left;font-size:9px;" id="exx">* Ensure all the users are configured with mail IDs to enforce this feauture across the Enterprise.<br>* Click on a user to configure the mail ID.</div>'}]}],listeners:{"cellclick":function(b,c,j,d,h,m,f,g){var l=b.getSelectionModel().getCurrentPosition();
d=b.store.getAt(l.row);colname=b.getHeaderCt().getHeaderAtIndex(j).dataIndex;cellvalue=d.data[colname];if(!Ext.isEmpty(cellvalue)&&(cellvalue=="admin"||cellvalue=="supermonitor"||cellvalue.toLowerCase()=="egenterprise")){Ext.Msg.show({title:TFATitle,msg:"Please login as "+cellvalue+" to configure mail ID.",buttons:Ext.Msg.OK,icon:"iconExclamation"});
return;}else{if(cellvalue.indexOf("(Group)")!=-1){var p=cellvalue.indexOf("/");var k=cellvalue.indexOf("(Group)");var o=cellvalue.substring(0,p);o=o+"/Grp/";var n=cellvalue.substring(p+1,k);cellvalue=o+n;cellvalue=cellvalue.trim();}window.location.href="EgChangeUserProfile.jsp?username="+encodeURIComponent(cellvalue)+"&qctr=1&reqfrom=twofa";
}}},hideHeaders:true,selModel:{selType:"cellmodel",mode:"SINGLE"},emptyText:"No data found",columns:{defaults:{sortable:true,hideable:false,menuDisabled:true,draggable:false,resizable:false},items:[{dataIndex:"userID1",flex:1,renderer:function(h,c,b,g,e,d,f){c.tdAttr='data-qtip="'+h+'"';h='<div style="cursor:pointer;">'+h+"</div>";
if(h!=null||h!=""){return h;}}},{dataIndex:"userID2",flex:1,renderer:function(h,c,b,g,e,d,f){c.tdAttr='data-qtip="'+h+'"';h='<div style="cursor:pointer;">'+h+"</div>";if(h!=null||h!=""){return h;}}}]}});twofactorauth=Ext.getCmp("twofafieldset");twofactorauth.add(a);twofactorauth.doLayout();},reloadIntegrationPage:function(){var c=Ext.getCmp("innerPanel");
c.removeAll();var b="/final/admin/ManagerSettings/data/TTintegrationListViewJSON.jsp";var a=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});a.show();Ext.Ajax.request({url:b,scope:this,method:"POST",success:function(d){a.hide();var f=d.responseText;var e=Ext.decode(f);c.add({xtype:"TTlistview",dataforView:e["integrationList"]});
},failure:function(d){a.hide();}});},loadTTFilterOption:function(){var c=Ext.getCmp("yesEnableTTFilter").getValue();var a=Ext.getCmp("filterOptionContainer");a.show();if(c){me=this;var b="ManagerSettings/data/EgTTFilterSuppressJson.jsp?selectedTab=4&userID="+encodeURIComponent(selectedUserID)+"&mailFilterOption="+mailFilterOption+"&reqfrom="+reqFrom+"&date="+new Date().getTime();
me.updateUserMailSuppressList(b);me.updateFilterComponents();me.initUserMailConfigs();if(mailFilterOption=="Descriptors_Only"){if(Ext.getCmp("egmailalertsuppress")!=undefined){Ext.getCmp("filter").hide();Ext.getCmp("filterLabelID").show();me.showFilterDetails();Ext.getCmp("btnViewFilters").setText(pageIntnl97);
}}else{if(Ext.getCmp("egmailalertsuppress")!=undefined){Ext.getCmp("filter").show();Ext.getCmp("filterLabelID").hide();Ext.getCmp("btnViewFilters").setText(pageIntnl87);}}}else{}},updateUserMailSuppressList:function(a){Ext.Ajax.request({url:a,method:"POST",async:false,success:function(b){var c=b.responseText;
userMailJSON=Ext.decode(c);},failure:function(b){alert("updateUserMailSuppressList");},});},initUserMailConfigs:function(){var b=this;var f=userMailJSON.requestStatus;if(f=="success"){var a=userMailJSON.filters;var e=userMailJSON.isComponentsAssociated;if(e==true){var d=Ext.getCmp("filter");d.getStore().loadRawData(a);
d.setValue("-1");Ext.getCmp("CompTypes").hide();var c=Ext.getCmp("exclude");if(c.fromField.store.getCount()>0){c.fromField.store.removeAll();}if(c.toField.store.getCount()>0){c.toField.store.removeAll();}}else{}}else{}},popFilterDetails:function(e){var b=this;updateSettings=false;var c="ManagerSettings/data/EgTTFilterSuppressJson.jsp?selectedTab=4&userID="+encodeURIComponent(selectedUserID)+"&mailFilterOption="+mailFilterOption+"&reqfrom="+reqFrom;
var a=e.getValue();if(a!="-1"){c=c+"&filterBy="+a;if(a=="filterByCName"||a=="filterByDescriptor"){c=c+"&serverType=-1";}else{if(a=="filterByLayer"||a=="filterByTest"){c=c+"&serverType=filterByAll";}}c=c+"&date="+new Date().getTime();Ext.Ajax.request({url:c,method:"POST",success:function(j){userMailJSON=Ext.decode(j.responseText);
var h=Ext.getCmp("exclude");var n=userMailJSON["includedAlerts"];var p=userMailJSON["excludedAlerts"];h.getStore().removeAll();if(h.fromField.store.getCount()>0){h.fromField.store.removeAll();}if(h.toField.store.getCount()>0){h.toField.store.removeAll();}if(!Ext.isEmpty(p)){h.fromField.store.add(p);}if(!Ext.isEmpty(n)){h.toField.store.add(n);
}var q=Ext.getCmp("CompTypes");var k=Ext.getCmp("compTypesIn");var o=Ext.getCmp("serverTestsOuterCt");var g=Ext.getCmp("Test");var f=Ext.getCmp("serverTestsCt");q.hide();k.hide();o.hide();g.hide();f.hide();Ext.getCmp("serseg").hide();if(a=="filterByCName"||a=="filterByLayer"||a=="filterByTest"||a=="filterByDescriptor"){var m=Ext.getCmp("CompTypes");
var l=userMailJSON["compopnentTypes"];m.getStore().loadRawData(l);if(a=="filterByCName"||a=="filterByDescriptor"){m.setValue("-1");}else{m.setValue("filterByAll");}if(userMailJSON.isOtherGroupsFound){k.getStore().loadRawData(userMailJSON.viewBy);k.setValue(userMailJSON.displayText);k.show();if(k.getValue()!="cType"){Ext.getCmp("serseg").show();
}}else{k.hide();}o.show();q.show();if(a=="filterByDescriptor"){Ext.getCmp("compName").getStore().removeAll();Ext.getCmp("searchbox").setDisabled(true);Ext.getCmp("searchbox").setValue("");g.show();f.show();g.getStore().removeAll();g.getStore().loadRawData(userMailJSON.testArray);g.setValue("-1");}}h.fromField.getComponent(0).setTitle(userMailJSON["itemTitle1"]);
h.toField.getComponent(0).setTitle(userMailJSON["itemTitle2"]);}});}else{Ext.suspendLayouts();var d=Ext.getCmp("exclude");d.fromField.getComponent(0).setTitle(excludedAlertsMsg);d.toField.getComponent(0).setTitle(includedAlertsMsg);Ext.getCmp("CompTypes").hide();Ext.getCmp("compTypesIn").hide();Ext.getCmp("serseg").hide();
Ext.getCmp("serverTestsOuterCt").hide();Ext.resumeLayouts(true);}},popCompTypes:function(e){updateSettings=false;var a=Ext.getCmp("filter").getValue();var b=e.getValue();var c=Ext.getCmp("compTypesIn").getValue();var f=Ext.getCmp("serseg").getValue();var d="";if(mailFilterOption=="Descriptors_Only"){d="ManagerSettings/data/EgTTFilterIncludeSuppressJson.jsp?selectedTab=4&userID="+encodeURIComponent(selectedUserID)+"&mailFilterOption="+mailFilterOption+"&reqfrom="+reqFrom;
d=d+"&filterBy=filterByDescriptor&serverType="+encodeURIComponent(b)+"&date="+new Date().getTime()+"&compTypesIn="+encodeURIComponent(c)+"&serseg="+encodeURIComponent(f);Ext.Ajax.request({url:d,method:"POST",success:function(g){userMailJSON=Ext.decode(g.responseText);var l=Ext.getCmp("exclude");var h=userMailJSON["includedAlerts"];
var k=userMailJSON["excludedAlerts"];l.getStore().removeAll();if(l.fromField.store.getCount()>0){l.fromField.store.removeAll();}if(l.toField.store.getCount()>0){l.toField.store.removeAll();}if(!Ext.isEmpty(k)){l.fromField.store.add(k);}if(!Ext.isEmpty(h)){l.toField.store.add(h);}var m=Ext.getCmp("serverTestsOuterCt");
var j=Ext.getCmp("Test");Ext.getCmp("searchbox").setDisabled(true);Ext.getCmp("searchbox").setValue("");j.getStore().removeAll();Ext.getCmp("compName").getStore().removeAll();j.getStore().loadRawData(userMailJSON.testArray);j.setValue(userMailJSON.selectedDescriptorText);if(mailFilterOption=="Descriptors_Only"){l.fromField.getComponent(0).setTitle(pageIntnl95);
l.toField.getComponent(0).setTitle(pageIntnl96);}}});}else{d="ManagerSettings/data/EgTTFilterSuppressJson.jsp?selectedTab=4&userID="+encodeURIComponent(selectedUserID)+"&mailFilterOption="+mailFilterOption+"&reqfrom="+reqFrom;d=d+"&filterBy="+a+"&serverType="+encodeURIComponent(b)+"&compTypesIn="+encodeURIComponent(c)+"&serseg="+encodeURIComponent(f)+"&date="+new Date().getTime();
Ext.Ajax.request({url:d,method:"POST",success:function(g){userMailJSON=Ext.decode(g.responseText);var l=Ext.getCmp("exclude");var h=userMailJSON["includedAlerts"];var k=userMailJSON["excludedAlerts"];l.getStore().removeAll();if(l.fromField.store.getCount()>0){l.fromField.store.removeAll();}if(l.toField.store.getCount()>0){l.toField.store.removeAll();
}if(!Ext.isEmpty(k)){l.fromField.store.add(k);}if(!Ext.isEmpty(h)){l.toField.store.add(h);}var m=Ext.getCmp("serverTestsOuterCt");var j=Ext.getCmp("Test");if(a=="filterByDescriptor"){j.getStore().removeAll();j.getStore().loadRawData(userMailJSON.testArray);j.setValue(userMailJSON.selectedDescriptorText);
m.show();Ext.getCmp("compName").getStore().removeAll();Ext.getCmp("searchbox").setDisabled(true);Ext.getCmp("searchbox").setValue("");j.show();}else{j.hide();}if(mailFilterOption=="Descriptors_Only"){l.fromField.getComponent(0).setTitle(pageIntnl95);l.toField.getComponent(0).setTitle(pageIntnl96);}}});
}},viewByCriteria:function(d){updateSettings=false;var b=d.getValue();var c=Ext.getCmp("filter");var j=c.getValue();var e=Ext.getCmp("serseg");var h=Ext.getCmp("CompTypes");var a=Ext.getCmp("Test");var f="";var g=this;if(mailFilterOption=="Descriptors_Only"){f="ManagerSettings/data/EgTTFilterIncludeSuppressJson.jsp?selectedTab=4&userID="+encodeURIComponent(selectedUserID)+"&mailFilterOption="+mailFilterOption+"&reqfrom="+reqFrom;
f=f+"&filterBy=filterByDescriptor&compTypesIn="+encodeURIComponent(b)+"&date="+new Date().getTime();Ext.Ajax.request({url:f,method:"POST",success:function(k){userMailJSON=Ext.decode(k.responseText);var n=Ext.getCmp("exclude");var l=userMailJSON["includedAlerts"];var m=userMailJSON["excludedAlerts"];n.getStore().removeAll();
if(n.fromField.store.getCount()>0){n.fromField.store.removeAll();}if(n.toField.store.getCount()>0){n.toField.store.removeAll();}if(b!="cType"){e.setFieldLabel(userMailJSON.trDisplayText);e.getStore().loadRawData(userMailJSON.viewByType);e.setValue(userMailJSON.selectedGrpText);e.show();h.getStore().removeAll();
h.getStore().loadData([{"displayField":notApplicableMsg,"valueField":"-1"}]);a.getStore().removeAll();a.getStore().loadData([{"displayField":notApplicableMsg,"valueField":"-1"}]);Ext.getCmp("compName").getStore().removeAll();Ext.getCmp("searchbox").setDisabled(true);Ext.getCmp("searchbox").setValue("");
}else{g.popFilterDetails(c);e.hide();}if(h.getStore().getCount()>0){h.setValue(h.getStore().getAt(0));}if(a.getStore().getCount()>0){a.setValue(a.getStore().getAt(0));}if(mailFilterOption=="Descriptors_Only"){n.fromField.getComponent(0).setTitle(pageIntnl95);n.toField.getComponent(0).setTitle(pageIntnl96);
}}});}else{f="ManagerSettings/data/EgTTFilterSuppressJson.jsp?selectedTab=4&userID="+encodeURIComponent(selectedUserID)+"&mailFilterOption="+mailFilterOption+"&reqfrom="+reqFrom;f=f+"&filterBy="+j+"&compTypesIn="+encodeURIComponent(b)+"&date="+new Date().getTime();Ext.Ajax.request({url:f,method:"POST",success:function(k){userMailJSON=Ext.decode(k.responseText);
var n=Ext.getCmp("exclude");var l=userMailJSON["includedAlerts"];var m=userMailJSON["excludedAlerts"];n.getStore().removeAll();if(n.fromField.store.getCount()>0){n.fromField.store.removeAll();}if(n.toField.store.getCount()>0){n.toField.store.removeAll();}if(b!="cType"){e.setFieldLabel(userMailJSON.trDisplayText);
e.getStore().loadRawData(userMailJSON.viewByType);e.setValue(userMailJSON.selectedGrpText);e.show();h.getStore().removeAll();h.getStore().loadData([{"displayField":notApplicableMsg,"valueField":"-1"}]);a.getStore().removeAll();a.getStore().loadData([{"displayField":notApplicableMsg,"valueField":"-1"}]);
Ext.getCmp("compName").getStore().removeAll();Ext.getCmp("searchbox").setDisabled(true);Ext.getCmp("searchbox").setValue("");}else{g.popFilterDetails(c);e.hide();}if(h.getStore().getCount()>0){h.setValue(h.getStore().getAt(0));}if(a.getStore().getCount()>0){a.setValue(a.getStore().getAt(0));}if(mailFilterOption=="Descriptors_Only"){n.fromField.getComponent(0).setTitle(pageIntnl95);
n.toField.getComponent(0).setTitle(pageIntnl96);}}});}},changeByServer:function(f){updateSettings=false;var d=f.getValue();var a=Ext.getCmp("filter").getValue();var c=Ext.getCmp("compTypesIn").getValue();var b=Ext.getCmp("CompTypes");var g=Ext.getCmp("Test");var e="";if(mailFilterOption=="Descriptors_Only"){e="ManagerSettings/data/EgTTFilterIncludeSuppressJson.jsp?selectedTab=4&userID="+encodeURIComponent(selectedUserID)+"&mailFilterOption="+mailFilterOption+"&reqfrom="+reqFrom;
e=e+"&filterBy=filterByDescriptor&compTypesIn="+encodeURIComponent(c)+"&serseg="+encodeURIComponent(d)+"&date="+new Date().getTime();}else{e="ManagerSettings/data/EgTTFilterSuppressJson.jsp?selectedTab=4&userID="+encodeURIComponent(selectedUserID)+"&mailFilterOption="+mailFilterOption+"&reqfrom="+reqFrom;
e=e+"&filterBy="+a+"&compTypesIn="+encodeURIComponent(c)+"&serseg="+encodeURIComponent(d)+"&date="+new Date().getTime();}Ext.Ajax.request({url:e,method:"POST",success:function(h){userMailJSON=Ext.decode(h.responseText);var j=Ext.getCmp("exclude");j.getStore().removeAll();if(j.fromField.store.getCount()>0){j.fromField.store.removeAll();
}if(j.toField.store.getCount()>0){j.toField.store.removeAll();}b.getStore().loadRawData(userMailJSON.compopnentTypes);if(d=="-1"){b.getStore().removeAll();b.getStore().loadData([{"displayField":notApplicableMsg,"valueField":"-1"}]);}g.getStore().removeAll();g.getStore().loadData([{"displayField":notApplicableMsg,"valueField":"-1"}]);
Ext.getCmp("compName").getStore().removeAll();Ext.getCmp("searchbox").setDisabled(true);Ext.getCmp("searchbox").setValue("");if(b.getStore().getCount()>0){b.setValue(b.getStore().getAt(0));}if(g.getStore().getCount()>0){g.setValue(g.getStore().getAt(0));}if(mailFilterOption=="Descriptors_Only"){j.fromField.getComponent(0).setTitle(pageIntnl95);
j.toField.getComponent(0).setTitle(pageIntnl96);}}});},changeByTest:function(f){updateSettings=false;var c=f.getValue();var b=Ext.getCmp("filter").getValue();var d=Ext.getCmp("compTypesIn").getValue();var a=Ext.getCmp("CompTypes").getValue();var g=Ext.getCmp("serseg").getValue();var e="";if(mailFilterOption=="Descriptors_Only"){e="ManagerSettings/data/EgTTFilterIncludeSuppressJson.jsp?selectedTab=4&userID="+encodeURIComponent(selectedUserID)+"&mailFilterOption="+mailFilterOption+"&reqfrom="+reqFrom;
e=e+"&filterBy=filterByDescriptor&compTypesIn="+encodeURIComponent(d)+"&serseg="+encodeURIComponent(g)+"&serverType="+encodeURIComponent(a)+"&Test="+encodeURIComponent(c)+"&date="+new Date().getTime();}else{e="ManagerSettings/data/EgTTFilterSuppressJson.jsp?selectedTab=4&userID="+encodeURIComponent(selectedUserID)+"&mailFilterOption="+mailFilterOption+"&reqfrom="+reqFrom;
e=e+"&filterBy="+b+"&compTypesIn="+encodeURIComponent(d)+"&serseg="+encodeURIComponent(g)+"&serverType="+encodeURIComponent(a)+"&Test="+encodeURIComponent(c)+"&date="+new Date().getTime();}if(!Ext.isEmpty(c)&&c=="-1"){Ext.getCmp("searchbox").setDisabled(true);Ext.getCmp("searchbox").setValue("");}else{Ext.getCmp("searchbox").setDisabled(false);
Ext.getCmp("searchbox").setValue("");}Ext.Ajax.request({url:e,method:"POST",success:function(j){userMailJSON=Ext.decode(j.responseText);var k=Ext.getCmp("exclude");k.getStore().removeAll();if(k.fromField.store.getCount()>0){k.fromField.store.removeAll();}if(k.toField.store.getCount()>0){k.toField.store.removeAll();
}var h=Ext.getCmp("compName");h.getStore().loadRawData(userMailJSON.compNameArr);compNameArrTemp=userMailJSON.compNameArr;if(mailFilterOption=="Descriptors_Only"){k.fromField.getComponent(0).setTitle(pageIntnl95);k.toField.getComponent(0).setTitle(pageIntnl96);}}});},changeByComponentName:function(e){var j=e.getValue();
if(j==""||j=="-1"){var a=Ext.getCmp("exclude");a.getStore().removeAll();if(a.fromField.store.getCount()>0){a.fromField.store.removeAll();}if(a.toField.store.getCount()>0){a.toField.store.removeAll();}return;}var h=Ext.getCmp("filter").getValue();var k=Ext.getCmp("Test").getValue();var g=Ext.getCmp("CompTypes").getValue();
var b=Ext.getCmp("compTypesIn");var f="";if(mailFilterOption=="Descriptors_Only"){f="ManagerSettings/data/EgTTFilterIncludeSuppressJson.jsp?selectedTab=4&userID="+encodeURIComponent(selectedUserID)+"&mailFilterOption="+mailFilterOption+"&reqfrom="+reqFrom;f=f+"&filterBy=filterByDescriptor&compNames="+encodeURIComponent(j)+"&serverType="+encodeURIComponent(g)+"&Test="+encodeURIComponent(k);
if(userMailJSON.isOtherGroupsFound==true){var d=b.getValue();f=f+"&compTypesIn="+d;if(b.getValue()!="cType"){var c=Ext.getCmp("serseg");f=f+"&serseg="+d;}}Ext.Ajax.request({url:f,method:"POST",success:function(l){userMailJSON=Ext.decode(l.responseText);var o=Ext.getCmp("exclude");o.getStore().removeAll();
if(o.fromField.store.getCount()>0){o.fromField.store.removeAll();}if(o.toField.store.getCount()>0){o.toField.store.removeAll();}var m=userMailJSON["includedAlerts"];var n=userMailJSON["excludedAlerts"];if(!Ext.isEmpty(m)){o.fromField.store.add(m);}if(!Ext.isEmpty(n)){o.toField.store.add(n);}if(mailFilterOption=="Descriptors_Only"){o.fromField.getComponent(0).setTitle(pageIntnl95);
o.toField.getComponent(0).setTitle(pageIntnl96);}}});}else{f="ManagerSettings/data/EgTTFilterSuppressJson.jsp?selectedTab=4&userID="+encodeURIComponent(selectedUserID)+"&mailFilterOption="+mailFilterOption+"&reqfrom="+reqFrom;f=f+"&filterBy="+h+"&compNames="+encodeURIComponent(j)+"&serverType="+encodeURIComponent(g)+"&Test="+encodeURIComponent(k);
if(userMailJSON.isOtherGroupsFound==true){var d=b.getValue();f=f+"&compTypesIn="+d;if(b.getValue()!="cType"){var c=Ext.getCmp("serseg");f=f+"&serseg="+d;}}Ext.Ajax.request({url:f,method:"POST",success:function(l){userMailJSON=Ext.decode(l.responseText);var o=Ext.getCmp("exclude");o.getStore().removeAll();
if(o.fromField.store.getCount()>0){o.fromField.store.removeAll();}if(o.toField.store.getCount()>0){o.toField.store.removeAll();}var m=userMailJSON["includedAlerts"];var n=userMailJSON["excludedAlerts"];if(!Ext.isEmpty(n)){o.fromField.store.add(n);}if(!Ext.isEmpty(m)){o.toField.store.add(m);}if(mailFilterOption=="Descriptors_Only"){o.fromField.getComponent(0).setTitle(pageIntnl95);
o.toField.getComponent(0).setTitle(pageIntnl96);}}});}},assignAndAddMoreFilters:function(h){var m=this;h.setDisabled(true);if(mailFilterOption=="Descriptors_Only"){var n=Ext.getCmp("filter").getValue();var j="ManagerSettings/data/EgTTFilterIncludeSuppresspJson.jsp?reqfrom="+reqFrom+"&userID="+encodeURIComponent(selectedUserID);
var o=Ext.getCmp("compName").getValue();j=j+"&compNames="+encodeURIComponent(o);var d=Ext.getCmp("exclude");var p=new Array();var c=new Array();var a=d.fromField.store;var k=d.toField.store;for(var l=0;l<a.getCount();l++){var b=a.getAt(l).get("valueField");c.push(b);}for(var l=0;l<k.getCount();l++){var b=k.getAt(l).get("valueField");
p.push(b);}if(c.length==0&&p.length==0){Ext.Msg.alert(pageIntnl82,"Please select the required parameters to Exclude/Include");h.setDisabled(false);return;}m.setFilterValues("addMore");var g=userMailJSON["hiddenFields"];m.setHiddenFiledsForFilters(g);var f=m.getEgmailalertsuppress().getForm();var e=new Ext.LoadMask(Ext.getBody(),{msg:"Updating..."});
e.show();if(f.isValid()){this.getEgmailalertsuppress().submit({url:j,method:"POST",success:function(q,r){e.hide();m.showResultText();},failure:function(q,r){e.hide();}});}}else{var n=Ext.getCmp("filter").getValue();var j="ManagerSettings/data/EgTTFilterSuppresspJson.jsp?reqfrom="+reqFrom+"&userID="+encodeURIComponent(selectedUserID);
if(n=="-1"){Ext.MessageBox.alert(pageIntnl82,pageIntnl90);h.setDisabled(false);return;}m.setFilterValues("addMore");var g=userMailJSON["hiddenFields"];var o="";if(n=="filterByDescriptor"){o=Ext.getCmp("compName").getValue();}m.setHiddenFiledsForFilters(g,o);var f=m.getTtcommonsettings().getForm();var e=new Ext.LoadMask(Ext.getBody(),{msg:"Updating..."});
e.show();if(f.isValid()){this.getTtcommonsettings().submit({url:j,method:"POST",success:function(q,r){e.hide();m.showResultText();},failure:function(q,r){e.hide();}});}}h.setDisabled(false);},showResultText:function(){if(Ext.getCmp("resultCt")==null||Ext.getCmp("resultCt")==undefined){var a=Ext.create("Ext.container.Container",{floatable:true,floating:true,id:"resultCt",width:380,items:[{xtype:"component",padding:0,margin:5,cls:"popupAlertUser",html:'<table border="0" width="100%"><tr><td><div class="iconRight" style="margin:4px;float:left"></div><div style="margin:4px;float:left">'+addNassignMsg+'</div><div class="iconClosePopup" style="float:right;margin:4px"></div><td></tr></table>',}]});
var c=Ext.Element.getViewportWidth();a.showAt(c-410,85);Ext.select(".iconClosePopup").on("click",function(){a.destroy();},this);var b=new Ext.util.DelayedTask(function(){a.destroy();});b.delay(2000);}},setFilterValues:function(d){if(typeof userMailJSON=="undefined"){return;}var h=userMailJSON["hiddenFields"];
var k=Ext.getCmp("hiddenFieldsContainer");var g=Ext.getCmp("exclude");var j=new Array();var b=new Array();var a=g.fromField.store;var m=g.toField.store;for(var n=0;n<a.getCount();n++){var c=a.getAt(n).get("valueField");b.push(c);}for(var n=0;n<m.getCount();n++){var c=m.getAt(n).get("valueField");j.push(c);
}if(userMailJSON["excludedBoxHostVal"]&&userMailJSON["excludedBoxHostVal"]!=undefined){var l=userMailJSON["excludedBoxHostVal"];if(l!=null&&l!=""){b[b.length]=l;}}if(mailFilterOption=="Descriptors_Only"){var p={xtype:"hiddenfield",name:"excludedBoxVal",value:j};var f={xtype:"hiddenfield",name:"includedBoxVal",value:b};
var o={xtype:"hiddenfield",name:"control",value:d};}else{var p={xtype:"hiddenfield",name:"includedBoxVal",value:j};var f={xtype:"hiddenfield",name:"excludedBoxVal",value:b};var o={xtype:"hiddenfield",name:"control",value:d};}k.removeAll();k.add(p);k.add(f);k.add(o);var e={xtype:"hiddenfield",name:"previousExcVal",value:h.previousExcVal};
k.add(e);},setHiddenFiledsForFilters:function(c,b){var a=Ext.getCmp("hiddenFieldsContainer");for(key in c){if(key=="vsTypes"){continue;}var d=c[key];a.add({xtype:"hiddenfield",name:key,value:d});}a.add({xtype:"hiddenfield",name:"compNames",value:b});},viewFilteredElements:function(){var a=this;Ext.widget("window",{extend:"Ext.panel.Panel",id:"userFilterWindow",width:"95%",height:450,border:false,modal:true,autoScroll:true,closeAction:"destory",doClose:function(){this.destroy();
},listeners:{afterrender:function(){if(mailFilterOption=="Descriptors_Only"){var c=filterMessage2+": "+selectedUserID;Ext.getCmp("userFilterWindow").setTitle(c);var b="ManagerSettings/data/EgTTFilterIncludeSuppress.jsp?showAssociatedData=yes&selectedTab=4&userID="+encodeURIComponent(selectedUserID)+"&mailFilterOption="+mailFilterOption+"&reqfrom="+reqFrom+"&date="+new Date().getTime();
a.updateDescriptorHTMLFiltePanel(b);}else{var c=filterMessage;Ext.getCmp("userFilterWindow").setTitle(c);var b="ManagerSettings/data/EgTTFilterSuppress.jsp?showAssociatedData=yes&selectedTab=4&userID="+encodeURIComponent(selectedUserID)+"&mailFilterOption="+mailFilterOption+"&reqfrom="+reqFrom+"&date="+new Date().getTime();
a.updateHTMLFilterResultPanel(b);}}},items:[{xtype:"container",id:"userFilterContainer",layout:{type:"vbox",pack:"center",align:"center"},defaults:{margin:8}}]}).show();},updateHTMLFilterResultPanel:function(b){var a=this;Ext.Ajax.request({url:b,method:"POST",success:function(c){var e=c.responseText;
var d=Ext.getCmp("userFilterContainer");d.update(e);Ext.getCmp("userFilterWindow").doLayout();delete e;delete d;}});},submitTTFilterElements:function(l){var r=this;var d=false;var b=Ext.getCmp("yesEnableTTFilter");if(b.getValue()){d=true;}if(d==true){var p=userMailJSON.isComponentsAssociated;r.ttCommonSettingsUpdate(d,p);
}else{r.ttCommonSettingsUpdate(d,false);}if(d&&p){l.setDisabled(true);if(mailFilterOption=="Descriptors_Only"){var k="ManagerSettings/data/EgTTFilterIncludeSuppresspJson.jsp?reqfrom="+reqFrom+"&userID="+encodeURIComponent(selectedUserID);r.setFilterValues("finish");var o=Ext.getCmp("exclude");var h=new Array();
var g=new Array();var c=o.fromField.store;var n=o.toField.store;for(var f=0;f<c.getCount();f++){var j=c.getAt(f).get("valueField");g.push(j);}for(var f=0;f<n.getCount();f++){var j=n.getAt(f).get("valueField");h.push(j);}if(g.length==0&&h.length==0){Ext.Msg.alert(pageIntnl82,"Please select the required parameters to Exclude/Include");
l.setDisabled(false);return;}var m=Ext.getCmp("compName").getValue();var e=userMailJSON["hiddenFields"];r.setHiddenFiledsForFilters(e,m);var q=r.getTtcommonsettings().getForm();var a=new Ext.LoadMask(Ext.getBody(),{msg:"Updating..."});a.show();if(q.isValid()){this.getTtcommonsettings().submit({url:k,method:"POST",success:function(t,u){a.hide();
Ext.Msg.show({title:pageTitle,msg:settingsSuccessUpdate,buttons:Ext.Msg.OK,width:300,icon:"iconInformation",fn:function(){}});},failure:function(t,u){a.hide();}});}}else{var s=Ext.getCmp("filter").getValue();var k="ManagerSettings/data/EgTTFilterSuppresspJson.jsp?reqfrom="+reqFrom+"&userID="+encodeURIComponent(selectedUserID)+"&update=all";
r.setFilterValues("finish");var m="";if(s=="filterByDescriptor"){m=Ext.getCmp("compName").getValue();}var b=Ext.getCmp("yesEnableTTFilter");var e=userMailJSON["hiddenFields"];r.setHiddenFiledsForFilters(e,m);var q=r.getTtcommonsettings().getForm();var a=new Ext.LoadMask(Ext.getBody(),{msg:"Updating..."});
a.show();if(q.isValid()){this.getTtcommonsettings().submit({url:k,method:"POST",success:function(t,u){a.hide();Ext.Msg.show({title:pageTitle,msg:settingsSuccessUpdate,buttons:Ext.Msg.OK,width:300,icon:"iconInformation",fn:function(){}});},failure:function(t,u){a.hide();}});}}l.setDisabled(false);}},updateResultPanel:function(){var c=userElementJSON.isElementsAssociated;
var a=Ext.getCmp("userAssociationContainer");var b=Ext.getCmp("elementassociationcontainer");a.removeAll();if(c==true){a.add({xtype:"componentgroupedsummarygrid",store:new Ext.data.Store({fields:["col_1","category","col_2","col_3"],groupField:"category",data:userElementJSON.userTableData,})});a.doLayout();
Ext.getCmp("Expand").show();}else{Ext.getCmp("Expand").hide();var d='<div class = "iconInformation" style="margin:12% auto auto auto"></div><div>'+intnlLabel5+".</div>";var e={xtype:"component",width:"100%",border:false,style:{"text-align":"center"},html:d};a.add(e);}},updateFilterComponents:function(){var d=this;
var b=Ext.getCmp("filterOptionContainer");var e=userMailJSON.isComponentsAssociated;if(e!=true){var a=selectedUserID;var c='<div class = "iconInformation" style="margin:0 auto"></div><div>No components have been managed.</b></div>';b.removeAll();b.add({xtype:"panel",border:false,padding:160,style:{"text-align":"center"},html:c});
}},deleteUsersUpdate:function(){var d="";if(Ext.getCmp("zones").getValue()){d="$zones";}if(Ext.getCmp("servicegroups").getValue()){d+="$servicegroups";}if(Ext.getCmp("services").getValue()){d+="$services";}if(Ext.getCmp("segments").getValue()){d+="$segments";}if(Ext.getCmp("groups").getValue()){d+="$groups";
}if(Ext.getCmp("components").getValue()){d+="$components";}if(Ext.getCmp("exremote").getValue()){d+="$exremote";}if(d.length>0){d=d.substring(1);}var j=Ext.getCmp("allowDeleteOrg").getValue().allowDeleteOrg;var g=Ext.getCmp("autoDeleteExpUsers").getValue().autoDeleteExpUsers;var a=Ext.getCmp("daysAfter").getValue();
var l=Ext.getCmp("components").getValue()?"true":"false";var h=Ext.getCmp("exremote").getValue()?"true":"false";var c=Ext.getCmp("daysNotReporting").getValue();var f=Ext.getCmp("yesImmediateDelete").getValue()?"true":"false";var k="no";if(Ext.getCmp("yesallowDeleteOrg").getValue()){k="yes";}else{k="no";
}var b="no";if(Ext.getCmp("yesdeleteOrg").getValue()){b="yes";}else{b="no";}var e=Ext.getCmp("yesdeleteSubOU").getValue()?"true":"false";if(d.length==0&&((isMsp&&k=="yes")||(!isMsp&&Ext.getCmp("deleteSubOU").getValue().deleteSubOU=="yes"))){Ext.Msg.show({title:deleteUseresSetTitle,msg:elementSelectionAlert,width:elementSelectionAlert.length*7,buttons:Ext.MessageBox.OK,icon:"iconExclamation",});
}else{if(f=="false"&&(c==null||c.length==0||c<1||c>measurement_cleanup_period)){Ext.Msg.show({title:deleteUseresSetTitle,msg:comp_not_reporting_days_alert,width:comp_not_reporting_days_alert.length*7,buttons:Ext.MessageBox.OK,icon:"iconExclamation",});}else{if(g=="yes"&&(a==null||a.length==0||a<1)){Ext.Msg.show({title:deleteUseresSetTitle,msg:auto_delete_user_after_days_alert,width:auto_delete_user_after_days_alert.length*7,buttons:Ext.MessageBox.OK,icon:"iconExclamation",});
}else{Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/deleteUsersJSONp.jsp?autoDelete="+g+"&autoDeleteDays="+a+"&delete_components="+l+"&delete_agents="+h+"&delete_comps_after_x_days="+c+"&delete_immediately="+f+"&selected_elements="+d+"&delete_org="+b+"&delete_subou="+e+"&allowDeleteOrg="+k,scope:this,method:"POST",success:function(m){Ext.Msg.show({title:deleteUseresSetTitle,msg:result_message,width:300,buttons:Ext.Msg.OK,icon:"iconInformation"});
}});}}}},supermanagerUpdate:function(){var a="no";if(Ext.getCmp("yesautoRegisterSm").getValue()){a="yes";}else{a="no";}Ext.Ajax.request({url:"/final/admin/ManagerSettings/data/supermanagerp.jsp?autoRegisterSm="+a,scope:this,method:"POST",success:function(b){Ext.Msg.show({title:smtitle,msg:updatedMsg,width:300,buttons:Ext.Msg.OK,icon:"iconInformation"});
},failure:function(b){}});},encodeFieldParams:function(d){var f=this;var g="";var b=d.getFields().items;for(var c in b){var e=b[c].name;var a=b[c].value;Ext.getCmp(b[c].id).submitValue=false;g+="&"+e+"="+encodeURIComponent(f.filterEncode(a));}return g;}});function loadTree(){var c="/final/admin/ManagerSettings/data/webServicesTTI_JSON.jsp";
var a="";var b=Ext.getCmp("uploadLabel").text;if(Ext.isEmpty(fileName)){if(b.indexOf(".class")>-1){a=ttDeleteAcmeFile+" "+b+"?";}else{a=ttDeleteAcmeFile+" "+jarFile+"?";}}else{a=ttDeleteAcmeFile+" "+jarFile+"?";}Ext.MessageBox.confirm(ttIntegration,a,function(d){if(d=="yes"){Ext.Ajax.request({url:c,scope:this,method:"POST",success:function(e){var h=e.responseText;
var g=Ext.decode(h);var j=g.ArchieveFile;var f="/final/admin/ManagerSettings/data/uploadWrapperJSONp.jsp?action=remove&ArchieveFile=None&file="+j+"&cacheCur="+new Date().getTime();Ext.Ajax.request({url:f,scope:this,method:"POST",success:function(k){var m=k.responseText;var l=Ext.decode(m);fileName="None";
ttWrapper="None";isAcmeUploaded="no";Ext.getCmp("nottWrapperClassNeeded").setValue(true);Ext.getCmp("uploadFile").setDisabled(true);}});}});}});}function removeTTSys(){var a="/final/admin/ManagerSettings/data/managerSettingsJSONp.jsp?action=removeTTIntegrationConfiguration"+"&TT_sys="+TTSysForRemove;
Ext.MessageBox.confirm(ttIntegration,ttDeleteConfiguration,function(b){if(b=="yes"){Ext.Ajax.request({url:a,scope:this,method:"POST",success:function(e){var B=e.responseText;var k=Ext.decode(B);Ext.Msg.show({title:ttIntegration,msg:ttDeletedSuccess,width:300,buttons:Ext.Msg.OK,icon:"iconInformation"});
Ext.getCmp("innerPanel").setTitle("TT MANAGER");var t="";var h=Ext.getCmp("yesEnableExecForTT");var u=Ext.getCmp("noEnableExecForTT");var d=Ext.getCmp("Command2");var j=Ext.getCmp("Command");var C=Ext.getCmp("AllowedAlarmsC");var o=Ext.getCmp("AllowedAlarmsM");var n=Ext.getCmp("AllowedAlarmsMi");var r=Ext.getCmp("AllowedAlarmsN");
var y=Ext.getCmp("LogFileMaxSize");var G=Ext.getCmp("yesLogEntriesForStdoutAlso");var w=Ext.getCmp("noLogEntriesForStdoutAlso");var I=Ext.getCmp("DateFormat");var E=Ext.getCmp("CommandLength");var c=Ext.getCmp("ProbDescLength");var q=Ext.getCmp("TTIntegrationEnable");var F=Ext.getCmp("TTIntegrationDisable");
var z=Ext.getCmp("TT_sys");var f=Ext.getCmp("yesttWrapperClassNeeded");var x=Ext.getCmp("nottWrapperClassNeeded");var v=Ext.getCmp("criticalAlarms");var H=Ext.getCmp("majorAlarms");var A=Ext.getCmp("minorAlarms");var g=Ext.getCmp("normalAlarms");var p="";var D="";var m="";var s="";var l="/final/admin/ManagerSettings/data/managerSettingsJSON.jsp?selectSysName=OTHERS&index=ttmanager";
Ext.Ajax.request({url:l,scope:this,method:"POST",success:function(J){var Y=J.responseText;var M=Ext.decode(Y);var T=M.enableExecForTT;var R=M.command;var S=M.alarmsArray.length;var P=M.enableLogging;var O=M.TTIntegrationEnable;var K=M.displayTTIntegrationArchive;var L=M.criticalAlarms;var U=M.majorAlarms;
var X=M.minorAlarms;var W=M.normalAlarms;archeiveFile=M.ArchieveFile;var aa="<b>"+archeiveFile+"</b>";if(Ext.isEmpty(archeiveFile)||archeiveFile==""){Ext.getCmp("uploadLabel").hide();Ext.getCmp("removeLink").hide();}else{Ext.getCmp("uploadLabel").show();Ext.getCmp("removeLink").show();}if(T=="Yes"||T=="yes"){h.setValue("Yes");
}else{h.setValue("No");}d.setValue(M.command);j.setValue(M.execOutFormat);for(var Z=0;Z<S;Z++){var N=M.alarmsArray[Z].alarms;if(N=="critical"){p="true";}if(N=="major"){D="true";}if(N=="minor"){m="true";}if(N=="normal"){s="true";}}if(p=="true"){C.setValue(true);}else{C.setValue(false);}if(D=="true"){o.setValue(true);
}else{o.setValue(false);}if(m=="true"){n.setValue(true);}else{n.setValue(false);}if(s=="true"){r.setValue(true);}else{r.setValue(false);}y.setValue(M.logFileMaxSize);if(P=="Yes"){G.setValue(true);}else{w.setValue(true);}I.getStore().loadRawData(M.formatForDateArray);I.setValue(M.dateFormat);E.setValue(M.commandLength);
c.setValue(M.probDescLength);if(O=="Yes"||O=="yes"){q.setValue(true);}else{F.setValue(true);}if(q.getValue()){Ext.getCmp("integrationSystem").show();Ext.getCmp("integrationSystemc").removeAll();Ext.getCmp("integrationSystemc").add(createFilters(M));Ext.getCmp("integrationSystemc").doLayout();Ext.getCmp("allowedAlarms").show();
}if(F.getValue()){Ext.getCmp("integrationSystem").hide();Ext.getCmp("integrationSystemc").removeAll();Ext.getCmp("allowedAlarms").hide();}z.getStore().loadRawData(M.ttIntegrationSystemArray);z.setValue(M.TTSys);var V=M.ttIntegrationSystemArray[0].displayField;var ab=M.TTSys;TTSysForRemove=ab;var Q=M.TTOtherDispName;
if(ab!="OTHERS"){Ext.getCmp("removeBtn").show();}else{Ext.getCmp("removeBtn").hide();}if(K=="block"){f.setValue(true);}else{x.setValue(true);}v.setValue(true);if(U=="checked"){H.setValue(true);}else{H.setValue(false);}if(X=="checked"){A.setValue(true);}else{A.setValue(false);}if(W=="checked"){g.setValue(true);
}else{g.setValue(false);}}});}});}},this);}function isAValidNumber(a){validFigures="0123456789";if(a.length>1&&a.indexOf("0")==0){return"false";}if(a.length==0){return"false";}for(i=0;i<a.length;i++){if(validFigures.indexOf(a.charAt(i),0)==-1){return"false";}}return"true";}function validateTextBoxes(f,e,c){var d=f;
var b="true";var a="";if(d==""||d=="general"){if(e=="trendComp"&&isAValidNumber(c)=="false"){b="false";}if(e=="threshComp"&&isAValidNumber(c)=="false"){b="false";return b;}if(e=="freqThresh"&&isAValidNumber(c)=="false"){b="false";return b;}if(e=="dataPeriod"&&isAValidNumber(c)=="false"){b="false";return b;
}}else{if(d=="commandexecution"){if(e=="logMaxSize"&&isAValidNumber(c)=="false"){b="false";}else{if(e=="commandLength"&&isAValidNumber(c)=="false"){b="false";}}}}return b;}function createHiddenfield(b){var a={xtype:"hidden",margin:"0 0 0 0",cls:"x-hidden",name:"$_"+b.id,id:"$_"+b.id,};return a;}function createTextfield(a){var b={xtype:"textfield",name:a.id,id:a.id,value:a.selectedValue,fieldLabel:a.lable,cls:"textbox",};
if(a.id=="password"||a.id=="proxyPassword"){b.inputType="password";}return b;}function createTextareafield(d){var a=new String(d.selectedValue);a=d.selectedValue.toString();var c="";if(typeof d.selectedValue=="object"){c=JSON.stringify(d.selectedValue,null,"\t");}else{c=d.selectedValue;}var b={xtype:"textarea",name:d.id,id:d.id,value:c,fieldLabel:d.lable,cls:"text-area"};
return b;}function createCombo(b){var c=Ext.create("Ext.data.Store",{fields:["value","name"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:b});var a={xtype:"scrollcombo",editable:false,store:c,cls:"dropdown",displayField:"name",valueField:"value",trigerAction:"all",fieldLabel:b.lable,value:b.selectedValue,itemId:b.id,queryMode:"local",id:b.id,name:b.id,};
return a;}function createRadioButton(b){var a=b.checked?false:true;var c={xtype:"radiogroup",cls:"radiobt",fieldLabel:b.lable,columns:2,vertical:false,id:b.id+"_radioGrp",items:[{boxLabel:yesRadioOption,name:b.id,inputValue:"yes",id:b.id,checked:b.checked,listeners:{click:{element:"el",fn:function(d){Ext.getCmp(b.id+"_2").setValue(false);
Ext.getCmp(b.id).setValue(true);thisController.changeRadioField(b.yesCtrlFields,true);}}}},{boxLabel:noRadioOption,name:b.id,inputValue:"no",id:b.id+"_2",checked:a,listeners:{afterrender:function(d){if(this.checked){thisController.changeRadioField(b.noCtrlFields,false);}},click:{element:"el",fn:function(e){Ext.getCmp(b.id).setValue(false);
Ext.getCmp(b.id+"_2").setValue(true);var d=Ext.getCmp(b.id).getValue();thisController.changeRadioField(b.noCtrlFields,false);}}}}]};return c;}function createFilters(d){var b=new Array();for(var a=0;a<d.filters.length;a++){var c=d.filters[a];var e=this.createFilterItem(c);var f=this.createHiddenfield(c);
if(!Ext.isEmpty(e)){b.push(e);b.push(f);}}return b;}function createFilterItem(a){var b=null;switch(a.type){case"Textfield":b=this.createTextfield(a);break;case"Combo":b=this.createCombo(a);break;case"TextArea":b=this.createTextareafield(a);break;case"radioButton":b=this.createRadioButton(a);break;}return b;
}function trim(a){return a.replace(/^\s+|\s+$/g,"");}function loadIntegrationPage(B,S,N){var M=Ext.getCmp("mainViewId");var D=Ext.getCmp("innerPanel");Ext.getCmp("innerPanel").setTitle(ttListPageTitle);Ext.getCmp("TTlistviewID").hide();if(S=="Settings"){D.add({xtype:"ttcommonsettings",title:'<span style="display:inline-block; vertical-align:middle;"><img src="../images/clear.png" class="'+N.data["iconClsName"]+'_white" /></span><span style="display:inline-block; vertical-align:middle;"><span style="display:inline-block;font-size:15px;">'+N.data["displayName"]+"</span></span>",header:{height:60,}});
var j=Ext.getCmp("AllowedAlarmsC");var o=Ext.getCmp("AllowedAlarmsM");var m=Ext.getCmp("AllowedAlarmsMi");var L=Ext.getCmp("LogFileMaxSize");var P=Ext.getCmp("logMaxFiles");var X=Ext.getCmp("enableGraph");var b=Ext.getCmp("yesLogEntriesForStdoutAlso");var w=Ext.getCmp("yesEnableDD");var y=Ext.getCmp("enableTTFilter");
var x=Ext.getCmp("yesEnableTTFilter");var p=Ext.getCmp("noEnableTTFilter");var G="";var K="";var z="";var O="";var d="/final/admin/ManagerSettings/data/commonSettingsTTI_JSON.jsp";Ext.Ajax.request({url:d,scope:this,method:"POST",success:function(ab){var Y=ab.responseText;var ag=Ext.decode(Y);var Z=ag.sendNormailMail;
if(!Ext.isEmpty(Z)&&Z.toLowerCase()=="yes"){Ext.getCmp("yesSendNormalMail").setValue(true);}var af=ag.alarmsArray.length;for(var ac=0;ac<af;ac++){var ad=ag.alarmsArray[ac].alarms;if(ad.toLowerCase()=="critical"){G="true";}if(ad.toLowerCase()=="major"){K="true";}if(ad.toLowerCase()=="minor"){z="true";
}if(ad.toLowerCase()=="normal"){O="true";}}if(G=="true"){j.setValue(true);}else{j.setValue(false);}if(K=="true"){o.setValue(true);}else{o.setValue(false);}if(z=="true"){m.setValue(true);}else{m.setValue(false);}var ah=ag.enableDDStr;if(!Ext.isEmpty(ah)&&ah.toLowerCase()=="yes"){w.setValue(true);}var ae=ag.enableLogging;
var ai=ag.enableGraph;if(ae=="Yes"){b.setValue(true);}if(!Ext.isEmpty(ai)&&ai.toLowerCase()=="yes"){X.setValue(true);}L.setValue(ag.logFileMaxSize);P.setValue(ag.logMaxFiles);var aa=ag.enableTTFilter;if(!Ext.isEmpty(aa)&&aa.toLowerCase()=="yes"){x.setValue(true);thisController.loadTTFilterOption();}else{p.setValue(true);
}}});}else{if(B=="Mail"){D.add({xtype:"ttmanagermailsnmp",title:'<span style="padding:9px 0px;display:inline-block;"><span style="display:inline-block; vertical-align:middle; "><img src="../images/clear.png" class="'+N.data["iconClsName"]+'_white" /></span><span style="display:inline-block; vertical-align:middle;line-height: 14px"><span style="display:inline-block; font-size:15px;">'+N.data["displayName"]+'</span><span style="display:block;font-size:12px;font-weight:400">'+N.data["tagline"]+"</span></span></span>",header:{height:60,}});
var E=Ext.getCmp("TTMailEnable");var I=Ext.getCmp("TTMailDisable");var h=Ext.getCmp("yesIncludeAllCompUser");var R=Ext.getCmp("noIncludeAllCompUser");var F=Ext.getCmp("yesUseUniqueId");var r=Ext.getCmp("noUseUniqueId");var T=Ext.getCmp("yesPriorityAsNumeric");var q=Ext.getCmp("noPriorityAsNumeric");var C=Ext.getCmp("yesApplyPriorityForAllTTMails");
var J=Ext.getCmp("noApplyPriorityForAllTTMails");var d="/final/admin/ManagerSettings/data/mailSnmpTTI_JSON.jsp?integrationType="+B;Ext.Ajax.request({url:d,scope:this,method:"POST",success:function(ab){var aa=ab.responseText;var ag=Ext.decode(aa);var ad=ag.strEnableMail;if(!Ext.isEmpty(ad)&&ad.toLowerCase()=="yes"){E.setValue(true);
}Ext.getCmp("mailSettings").show();Ext.getCmp("MailSubject").setDisabled(false);Ext.getCmp("MailTo").setDisabled(false);Ext.getCmp("OutputFormat").setDisabled(false);var Z=ag.mailSubject;var ah=ag.mailTo;var af=ag.outputFormat;var ac=ag.includeAllCompUser;var ai=ag.useUniqueId;var ae=ag.priorityAsNumeric;
var Y=ag.applyPriorityForAllTTMails;if(!Ext.isEmpty(Z)){Ext.getCmp("MailSubject").setValue(Z);}if(!Ext.isEmpty(ah)){Ext.getCmp("MailTo").setValue(ah);}if(!Ext.isEmpty(af)){Ext.getCmp("OutputFormat").setValue(af);}if(ac){h.setValue(true);}if(ai){F.setValue(true);}if(ae){T.setValue(true);}if(Y){C.setValue(true);
}}});}else{if(B=="SNMP"){D.add({xtype:"ttmanagersnmp",title:'<span style="padding:9px 0px;display:inline-block;"><span style="display:inline-block; vertical-align:middle;"><img src="../images/clear.png" class="'+N.data["iconClsName"]+'_white" /></span><span style="display:inline-block; vertical-align:middle;line-height:14px;"><span style="display:inline-block;font-size:15px;">'+N.data["displayName"]+'</span><span style="display:block;font-size:12px;font-weight:400">'+N.data["tagline"]+"</span></span></span>",header:{height:60,}});
var t=Ext.getCmp("yesEnableTTIntegrationForSNMPTraps");var d="/final/admin/ManagerSettings/data/mailSnmpTTI_JSON.jsp?integrationType="+B;Ext.Ajax.request({url:d,scope:this,method:"POST",success:function(Z){var ab=Z.responseText;var aa=Ext.decode(ab);var Y=aa.enableTTIntegrationForSNMPTraps;if(Y){t.setValue(true);
}}});}else{if(B=="CLI"){D.add({xtype:"ttmanagercli",title:'<span style="padding:9px 0px;display:inline-block;"><span style="display:inline-block; vertical-align:middle;"><img src="../images/clear.png" class="'+N.data["iconClsName"]+'_white" /></span><span style="display:inline-block; vertical-align:middle;line-height:14px;"><span style="display:inline-block;font-size:15px;">'+N.data["displayName"]+'</span><span style="display:block;font-size:12px;font-weight:400">'+N.data["tagline"]+"</span></span>",header:{height:60,}});
var V=Ext.getCmp("yesEnableExecForTT");var k=Ext.getCmp("Command2");var v=Ext.getCmp("Command");var l=Ext.getCmp("DateFormat");var u=Ext.getCmp("CommandLength");var A=Ext.getCmp("ProbDescLength");var d="/final/admin/ManagerSettings/data/cliTTI_JSON.jsp";Ext.Ajax.request({url:d,scope:this,method:"POST",success:function(aa){var ac=aa.responseText;
var ab=Ext.decode(ac);var Z=ab.enableExecForTT;var Y=ab.command;if(Z=="Yes"){V.setValue(true);}else{V.setValue(false);}k.setValue(ab.command);v.setValue(ab.execOutFormat);l.getStore().loadRawData(ab.formatForDateArray);l.setValue(ab.dateFormat);u.setValue(ab.commandLength);A.setValue(ab.probDescLength);
}});}else{if(B=="Web_Services"){D.add({xtype:"ttmanagerwebservice",listeners:{afterrender:function(){Ext.create("utilities.Toggleswitch",{id:"TTIntegrationEnable",renderTo:"header_checkbox_holder",listeners:{change:function(){var Y=Ext.getCmp("TTIntegrationEnable").getValue();if(Y){Ext.get("TTIntegrationEnable").set({"data-qtip":disablewebservTooltipMsg});
}else{Ext.get("TTIntegrationEnable").set({"data-qtip":enablewebservTooltipMsg});}}},});},close:function(){thisController.reloadIntegrationPage();}},id:"ttmanagerwebserviceID",integrationNames:S,title:'<span style="padding:9px 0px;display:inline-block;"><span style="display:inline-block; vertical-align:middle;"><img src="../images/clear.png" class="'+N.data["iconClsName"]+'_white" /></span><span style="display:inline-block; vertical-align:middle;line-height:16px;"><span style="display:inline-block;font-size:15px;">'+N.data["displayName"]+'</span><div id="header_checkbox_holder" data-qtip="" class="listviewpop" style="position:absolute; display:inline-block; top:10px; margin-left:-5px;"></div><span style="display:block;font-size:12px;font-weight:400">'+N.data["tagline"]+"</span></span></span>",header:{height:60,}});
isAcmeUploaded="no";var n=Ext.getCmp("TTIntegrationEnable");var W=Ext.getCmp("TTIntegrationDisable");var H=Ext.getCmp("TT_sys");var g=Ext.getCmp("TT_Other");var e=Ext.getCmp("TT_Url");var s=Ext.getCmp("TT_User_Name");var c=Ext.getCmp("TT_Password");var a=Ext.getCmp("TT_Output");var U=Ext.getCmp("TT_Api_Key");
var f=Ext.getCmp("yesttWrapperClassNeeded");var Q=Ext.getCmp("nottWrapperClassNeeded");selectedIntegrationName=S;var d="/final/admin/ManagerSettings/data/webServicesTTI_JSON.jsp?selectSysName="+S;Ext.Ajax.request({url:d,scope:this,method:"POST",success:function(ac){var Y=ac.responseText;var ae=Ext.decode(Y);
var Z=ae.TTIntegrationEnable;var ad=ae.displayTTIntegrationArchive;var aa=ae.OldTTSys;if(Z.toLowerCase()=="yes"||Z.toLowerCase()=="true"){n.setValue(true);}else{n.setValue(false);}if(!Ext.isEmpty(aa)&&aa!=S){n.setValue(false);}var af=ae.TTSys;TTSysForRemove=af;var ai=createFilters(ae);var ab=ai.length;
var ah=ai.length/2;var ag=ai.splice(0,ah);Ext.suspendLayouts();Ext.getCmp("integrationSystemc").removeAll();Ext.getCmp("integrationSystemc").add(ag);Ext.getCmp("integrationSystemc").doLayout();Ext.getCmp("integrationSystemc_2").removeAll();Ext.getCmp("integrationSystemc_2").add(ai);Ext.getCmp("integrationSystemc_2").doLayout();
Ext.resumeLayouts(true);thisController.ttWebserviceAuthtypeCombo();if(ad=="block"&&Ext.isEmpty(ae.TTWrapper)){f.setValue(true);}else{Q.setValue(true);}}});Ext.Ajax.request({url:"ManagerSettings/data/uploadWrapperJSONp.jsp?",method:"POST",});}}}}}}function addMultiIPPolicy(){var a=Ext.getCmp("egippolicy");
var d=Ext.getCmp("backupmultiipcontainer");var c="conIP_"+inputs;var b={xtype:"container",id:c,flex:1,layout:{type:"hbox",pack:"center",align:"center"},margin:2,width:"100%",defaults:{labelSeparator:" "},items:[{xtype:"textfield",cls:"textbox",style:{"white-space":"nowrap"},id:"ip"+inputs,emptyText:"IP range/IP address/IP address pattern",width:350,flex:1,margin:"5 0 5 0"},{xtype:"button",iconCls:"iconMinus",tooltip:"<b>Remove</b>",style:{background:"none",border:"0px"},handler:function(){removeMultiIP(c);
},columnWidth:0.07,margin:"6 0 5 0"}]};d.add(b);a.doLayout();Ext.getCmp("addMultiIP").setText(addMorePolicyMsg);Ext.getCmp("updateMultiIP").enable();Ext.getCmp("NoMultiIPPattern").hide();Ext.getCmp("adminPolicyLabel").setVisible(true);inputs++;}function removeMultiIP(b){var c=Ext.getCmp("backupmultiipcontainer");
var a=c.items.length;if(a==1){Ext.Ajax.request({url:"ManagerSettings/data/IPAddressValidatorJson.jsp?comeFrom=deleteAllIPPolicy",method:"POST",success:function(d){var f=Ext.decode(d.responseText);var e=f["screenLabels"]["success"];if(e=="true"){c.removeAll();inputs=1;Ext.getCmp("NoMultiIPPattern").show();
Ext.getCmp("updateMultiIP").disable();Ext.getCmp("clearMultiIP").disable();Ext.getCmp("addMultiIP").setText(addPolicyMsg);Ext.getCmp("adminPolicyLabel").setVisible(false);}}});}else{c.remove(b);}}function capitalizeFirstLetter(a){return a.charAt(0).toUpperCase()+a.slice(1);}function showTests(a){if(a=="yes"){Ext.getCmp("daysNotReportingContainer_auto").show();
Ext.getCmp("daysId_auto").show();Ext.getCmp("daysAfter").show();}else{Ext.getCmp("daysNotReportingContainer_auto").hide();Ext.getCmp("daysId_auto").hide();Ext.getCmp("daysAfter").hide();}}