Ext.define("UserProfile.controller.Main",{extend:"Ext.app.Controller",views:["Main"],refs:[{selector:"main",ref:"main"},{selector:"userdetails",ref:"userdetails"},{selector:"alarmssettings",ref:"alarmssettings"},{selector:"monitorsettings",ref:"monitorsettings"},{selector:"dailyemailsettings",ref:"dailyemailsettings"}],init:function(){thisCtrl=this;
this.control({"main":{"afterrender":this.userProfileDefaultLoad},"alarmssettings button[action=view]":{click:this.viewData},"monitorsettings button[action=daily_mail]":{click:this.openDailyMail},"monitorsettings button[action=save]":{click:this.saveData},"monitorsettings button[action=mailFilter]":{click:this.showMailFilter},"monitorsettings combo[id=loginpage]":{select:this.loginLogo},"monitorsettings combo[id=monitorpage]":{select:this.monitorLogo},"monitorsettings combo[id=reporter]":{select:this.reporterLogo},"monitorsettings combo[id=configuration]":{select:this.configLogo},'monitorsettings button[action="loginFile"]':{click:this.showuploadlogin},'monitorsettings button[action="monitorFile"]':{click:this.showuploadmon},'monitorsettings button[action="reportFile"]':{click:this.showuploadreport},'monitorsettings button[action="configFile"]':{click:this.showuploadconfig},'monitorsettings checkbox[id="apply"]':{change:this.applyToModule},'alarmssettings radio[id="htmode"]':{change:this.setMeasureInMailMode},'userdetails textfield[id="newPwd"]':{"change":this.passStrength},'alarmssettings radio[id="isnew"]':{change:this.setDDInMailMode},'dailyemailsettings scrollcombo[id="applied_by"]':{"change":this.loadDmsDetails},'dailyemailsettings scrollcombo[id="temp_name"]':{"select":this.loadEmailTypes},'dailyemailsettings button[id="sm_button"]':{"click":this.insertDmdDeatils},'dailyemailsettings multiselectfield[id="el_component"]':{"change":this.loadDmsCompDetails},'monitorsettings radio[id="enable2FAYesFlag"]':{change:this.show2FAOTPModeCnt},'monitorsettings checkbox[id="defaulttimeZone"]':{"change":this.setDefaulttimeZone},});
},setDefaulttimeZone:function(a){var c=Ext.getCmp("timeZone");c.getStore().loadRawData("");c.getStore().loadRawData(publicJsonData["timeZone"]);if(a!=null&&a!=undefined&&a!="undefined"&&a.checked){var b=publicJsonData["managerTimeZone"];if(b!=""&&b!=null&&b!=undefined&&b!="undefined"){c.setValue(publicJsonData["managerTimeZone"]);
c.setDisabled(true);}}else{if(!a.checked){c.setValue(publicJsonData["selectedTimeZone"]);c.setDisabled(false);}}},insertDmdDeatils:function(){var q=Ext.getCmp("schedName").getValue();if(q==null||q==undefined||q==""){Ext.MessageBox.show({title:pageTitle,msg:"Enter a report Name",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING,});
return;}var g=Ext.getCmp("appliesTo").getValue();if(g==null||g==undefined||g==""||g=="-1"){Ext.MessageBox.show({title:pageTitle,msg:"Select valid Applies To ",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING,});return;}if(g=="Components"){var l=Ext.getCmp("el_component").getValue();if(l==null||l==undefined||l==""||l.length==0){Ext.MessageBox.show({title:pageTitle,msg:"Select valid "+g,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING,});
return;}}else{var f=Ext.getCmp("applied_by").getValue();if(f==null||f==undefined||f==""||f.indexOf("All")!=-1||f.indexOf("Select")!=-1){Ext.MessageBox.show({title:pageTitle,msg:"Select valid "+g,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING,});return;}}var e=Ext.getCmp("temp_name").getValue();
if(e==null||e==undefined||e==""||e.toLowerCase().indexOf("select a template")!=-1){Ext.MessageBox.show({title:pageTitle,msg:"Select valid Template Name",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING,});return;}var n=Ext.getCmp("email_type").getValue();if(n==null||n==undefined||n==""||n.toLowerCase().indexOf("select a email type")!=-1){Ext.MessageBox.show({title:pageTitle,msg:"Select valid Email Type",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING,});
return;}var m=Ext.getCmp("mailId").getValue();if(m==null||m==undefined||m==""){Ext.MessageBox.show({title:pageTitle,msg:"Enter a valid Mail ID",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING,});return;}if(!mailIdValidate(m)){Ext.MessageBox.show({title:pageTitle,msg:"Enter a valid Mail ID",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING,});
return;}var d=Ext.getCmp("mail_type").getValue();var h=g+":"+f;if(g=="Components"){var l=Ext.getCmp("el_component").getValue();var p="";for(var o in l){p+=","+l[o];}if(p.indexOf(",")==0){p=p.substring(1);}h=g+":"+p;}var k=Ext.getCmp("sc_hr").getValue()+":"+Ext.getCmp("sc_min").getValue();var j="add";
var b=Ext.getCmp("sm_button").getText();if(b.indexOf("Update")!=-1){j="edit";}var c="/final/admin/UserProfile/data/userProfileDailyMail.jsp?insertDms=true&op="+j+"&schedName="+encodeURI(q)+"&temp_name="+encodeURI(e)+"&app_value="+encodeURI(h)+"&mailIdVal="+encodeURI(m)+"&email_type="+n+"&timeval="+encodeURI(k)+"&mail_type="+encodeURI(d);
Ext.Ajax.request({url:c,scope:this,success:function(r){if(r.status==200&&!Ext.isEmpty(r.responseText)){var w=r.responseText;var v=Ext.decode(w);if(v.status=="success"){Ext.MessageBox.show({title:pageTitle,msg:"Schedule Updated Successfully..",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING,});var u=Ext.getCmp("listGrid");
var t=v.grid;var x=Ext.create("Ext.data.Store",{fields:t.fields,autoDestroy:true,proxy:{type:"memory",reader:{type:"json",root:"items"}},data:t.data});u.reconfigure(x,t.columns);Ext.getCmp("sm_button").setText('<span class="font_bold"> Add </span>');Ext.getCmp("schedName").reset();var s=Ext.getCmp("appliesTo");
s.reset();Ext.getCmp("applied_by").reset();Ext.getCmp("el_component").reset();Ext.getCmp("temp_name").reset();Ext.getCmp("email_type").reset();Ext.getCmp("sc_hr").reset();Ext.getCmp("sc_min").reset();Ext.getCmp("mailId").reset();Ext.getCmp("sc_hr").setValue("00");Ext.getCmp("sc_min").setValue("00");var a=s.getStore().getAt(1).get("valueField");
s.setValue(a);}else{Ext.MessageBox.show({title:pageTitle,msg:v.status,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING,});return;}}editSuspend=false;if(editGridName!=null&&editGridName!=undefined&&editGridName!=""&&v.state!=undefined&&v.state=="true"){deleteGridRow(editGridName);editGridName=undefined;
}}});},loadEmailTypes:function(d){var f=d.getValue();if(f!=undefined&&f!=null&&f!=-1){var b=d.getValue();var a=Ext.getCmp("appliesTo").getValue();var c=Ext.getCmp("applied_by").getValue();var e="&appliesTo="+a+"&applied_by="+c;Ext.Ajax.request({url:"/final/admin/UserProfile/data/userProfileDailyMail.jsp?loadEmailTemplateTypes=true&template="+b+e,scope:this,success:function(h){if(h.status==200&&!Ext.isEmpty(h.responseText)){var l=h.responseText;
var k=Ext.decode(l);if(k!=undefined&&k.elements!=undefined&&k.elements.length>0){var j=k.elements;Ext.getCmp("email_type").getStore().loadRawData(j);var g=Ext.getCmp("email_type").getStore().getAt(0).get("valueField");Ext.getCmp("email_type").setValue(g);if(j.length==1){Ext.getCmp("email_type").setDisabled(true);
}else{Ext.getCmp("email_type").setDisabled(false);}}}}});}},loadDmsCompDetails:function(g){if(editValueSuspend){return;}try{var h=Ext.getCmp("el_component").getValue();var b=Ext.getCmp("appliesTo").getValue();if(!Ext.isEmpty(h)){var d=h[0];var a=d.substring(0,d.indexOf(":"));Ext.getCmp("email_type").setValue(a);
Ext.getCmp("email_type").setDisabled(true);Ext.getCmp("email_type").setVisible(false);Ext.getCmp("dms_container_in").updateLayout();var c=document.getElementById("view_temp_id");Ext.Ajax.request({url:"/final/admin/UserProfile/data/userProfileDailyMail.jsp?loadTemplates=true&appliesTo="+b+"&value="+d,scope:this,success:function(j){if(j.status==200&&!Ext.isEmpty(j.responseText)){var m=j.responseText;
var k=Ext.decode(m);if(k!=undefined&&k.elements!=undefined){var l=k.elements;Ext.getCmp("temp_name").getStore().loadRawData(l);var e=Ext.getCmp("temp_name").getStore().getAt(0).get("valueField");Ext.getCmp("temp_name").setValue(e);this.loadEmailTypes(Ext.getCmp("temp_name"));}else{Ext.getCmp("temp_name").getStore().loadRawData("");
Ext.getCmp("temp_name").setRawValue("Select a template");Ext.getCmp("email_type").getStore().loadRawData("");Ext.getCmp("email_type").setRawValue("Select a email type");Ext.getCmp("email_type").setDisabled(false);}}},failure:function(){}});}}catch(f){}},loadDmsDetails:function(e){if(editValueSuspend){return;
}var f=e.getValue();if(f!=undefined&&f!=null&&f!=-1){var d=e.getValue();if(d=="All"){return;}var a=e.getRawValue();var b=Ext.getCmp("appliesTo").getValue();if(b!=null&&b!=undefined&&b=="ComponentType"){Ext.getCmp("email_type").setValue(d);Ext.getCmp("email_type").setDisabled(true);Ext.getCmp("email_type").setVisible(false);
Ext.getCmp("dms_container_in").updateLayout();}else{Ext.getCmp("email_type").setVisible(true);Ext.getCmp("dms_container_in").updateLayout();}var c=document.getElementById("view_temp_id");Ext.Ajax.request({url:"/final/admin/UserProfile/data/userProfileDailyMail.jsp?loadTemplates=true&appliesTo="+b+"&value="+d,scope:this,success:function(h){if(h.status==200&&!Ext.isEmpty(h.responseText)){var l=h.responseText;
var j=Ext.decode(l);if(j!=undefined&&j.elements!=undefined){var k=j.elements;Ext.getCmp("temp_name").getStore().loadRawData(k);var g=Ext.getCmp("temp_name").getStore().getAt(0).get("valueField");Ext.getCmp("temp_name").setValue(g);this.loadEmailTypes(Ext.getCmp("temp_name"));}else{Ext.getCmp("temp_name").getStore().loadRawData("");
Ext.getCmp("temp_name").setRawValue("Select a template");Ext.getCmp("email_type").getStore().loadRawData("");Ext.getCmp("email_type").setRawValue("Select a email type");Ext.getCmp("email_type").setDisabled(false);}}},failure:function(){}});}},openDailyMail:function(c){var a=Ext.getCmp("dailyEmailWin");
if(a==null||a==undefined){try{Ext.Ajax.request({url:"/final/admin/UserProfile/data/userProfileDailyMail.jsp?loadAll=true",scope:this,success:function(k){if(k.status==200&&!Ext.isEmpty(k.responseText)){var h=k.responseText;var n=Ext.decode(h);Ext.create("UserProfile.view.dailyEmailWin").show();Ext.getCmp("applied_by").reset();
Ext.getCmp("temp_name").reset();Ext.getCmp("email_type").reset();if(n!=undefined&&n.data!=undefined){Ext.getCmp("dailyemailsettings").data=n;var l=n.data;var p=n.allInfo;if(p.hr!=null&&p.hr!=undefined){Ext.getCmp("sc_hr").getStore().loadRawData(p.hr);}if(p.min!=null&&p.min!=undefined){Ext.getCmp("sc_min").getStore().loadRawData(p.min);
}Ext.getCmp("sc_hr").setValue("00");Ext.getCmp("sc_min").setValue("00");var g=l["final"];if(g!=null&&g!=undefined&&g.length>0){var j=Ext.getCmp("appliesTo");if(j!=null&&j!=undefined){j.getStore().loadRawData(g);var o=j.getStore().getAt(1).get("valueField");j.setValue(o);}}var f=Ext.getCmp("mail_type");
if(f!=null&&j!=undefined){f.getStore().loadRawData(n.type);var o=f.getStore().getAt(0).get("valueField");f.setValue(o);}var e=Ext.getCmp("listGrid");var d=n.grid;var m=Ext.create("Ext.data.Store",{fields:d.fields,autoDestroy:true,proxy:{type:"memory",reader:{type:"json",root:"items"}},data:d.data});e.reconfigure(m,d.columns);
}}}});}catch(b){}}},setDDInMailMode:function(){var a=Ext.getCmp("isnew").getValue();if(a==true||a=="true"){Ext.getCmp("ddmail").setVisible(true);}else{Ext.getCmp("ddmail").setVisible(false);}},showMailFilter:function(){var d=publicJsonData["hiddenParams"]["uname"];var c=publicJsonData["userName"];var b=publicJsonData["isMailConfigured"];
var a=publicJsonData["showMailFilterBtn"];window.location.href="EgMailAlertFilter.jsp?qctr=1&dispUserName="+encodeURIComponent(filterEncode(d))+"&showAlert="+b+"&username="+encodeURIComponent(filterEncode(c));},passStrength:function(){var a=publicJsonData.pwdLength;var d=publicJsonData.pwdComplexityCount;
if(a==""||a<2){a=8;}else{if(a!=""&&a<d){a=d;}}var b=Ext.getCmp("newPwd").getValue();var c=/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^\da-zA-Z]).+$/;var f=/^(?=.*\d)(?=.*[a-zA-Z])(?=.*[^\da-zA-Z]).+$/;var e=/^(?=.*\d)(?=.*[a-zA-Z]).+$/;if(b.length>=a&&c.test(b)){Ext.getCmp("passScore").setText(passStr+": "+Strong);
}else{if(b.length>=a&&b.match(f)){Ext.getCmp("passScore").setText(passStr+": "+Good);}else{if(b.length>=a&&b.match(e)){Ext.getCmp("passScore").setText(passStr+": "+Fair);}else{if(b.length==0){Ext.getCmp("passScore").setText(passLabel1+" "+a+" "+passLabel2);}else{Ext.getCmp("passScore").setText(passStr+": "+Weak);
}}}}},pwdComplexityCheck:function(e){var c="^";var a="";var f=".+$";var n="";var b=".";var m="<br/>";var g=publicJsonData.pwdComplexity;if(g!=null&&g!=undefined){if(g.indexOf(",")>-1){n="false#";var j=g.split(",");for(var d=0;d<j.length;d++){var l=j[d].toLowerCase().trim();if(l=="lc"){a+="(?=.*[a-z])";
n+=m+(d+1)+b+" "+alertForPwdComplexity1;}else{if(l=="uc"){a+="(?=.*[A-Z])";n+=m+(d+1)+b+" "+alertForPwdComplexity2;}else{if(l=="dg"){a+="(?=.*[0-9])";n+=m+(d+1)+b+" "+alertForPwdComplexity3;}else{if(l=="sp"){a+="(?=.*[^0-9a-zA-Z])";n+=m+(d+1)+b+" "+alertForPwdComplexity4;}}}}}}else{n="false#";var l=g.toString().toLowerCase().trim();
if(l=="lc"){a+="(?=.*[a-z])";n+=alertForPwdComplexity1;}else{if(l=="uc"){a+="(?=.*[A-Z])";n+=alertForPwdComplexity2;}else{if(l=="dg"){a+="(?=.*[0-9])";n+=alertForPwdComplexity3;}else{if(l=="sp"){a+="(?=.*[^0-9a-zA-Z])";n+=alertForPwdComplexity4;}}}}}var h=new RegExp(c+a+f);if(h.test(e)){n="true";}}return n;
},userProfileDefaultLoad:function(){this.getUserdetails().loadDefaultData();this.getAlarmssettings().loadalrmData();this.getMonitorsettings().loadmonitorData();this.hideCustomLogo();this.applyToModule();var b=publicJsonData.pwdLength;var c=publicJsonData.pwdComplexityCount;if(b==""||b<2){b=8;}else{if(b!=""&&b<c){b=c;
}}Ext.getCmp("passScore").setText(passLabel1+" "+b+" "+passLabel2);if(publicJsonData.showMailFilterBtn){Ext.getCmp("mailFilterBtn").show();}else{Ext.getCmp("mailFilterBtn").hide();}try{var a=publicJsonData.dmsSchedules;var f=Ext.getCmp("emailType");if(f!=null&&f!=undefined&&a!=null&&a!=undefined&&a.length>0){f.getStore().loadRawData(a);
f.setValue("-1");}}catch(d){}},checkAlarmType:function(a){var c=Ext.getCmp("high").pressed;var b=Ext.getCmp("medium").pressed;var d=Ext.getCmp("low").pressed;if(c==false&&b==false&&d==false){Ext.getCmp("isnew").setValue(false);Ext.getCmp("iscomp").setValue(false);Ext.getCmp("htmode").setValue(false);
Ext.getCmp("txtmode").setValue(false);}},checkAlarms:function(){if(Ext.getCmp("high").pressed!=null&&Ext.getCmp("medium").pressed!=null&&Ext.getCmp("low").pressed!=null&&Ext.getCmp("isnew").checked!=null&&Ext.getCmp("iscomp").checked!=null){if(!Ext.getCmp("high").pressed&&!Ext.getCmp("medium").pressed&&!Ext.getCmp("low").pressed){Ext.getCmp("isnew").setValue(true);
Ext.getCmp("htmode").setValue(true);}}},setMeasureInMailMode:function(){var a=Ext.getCmp("htmode").getValue();var b=Ext.getCmp("measuremode");if(a==true){b.getStore().loadRawData(publicJsonData["reportOptionsht"]);}else{b.getStore().loadRawData(publicJsonData["reportOptionstxt"]);b.setValue("No");}},hideCustomLogo:function(){var b=publicJsonData["loginChk"];
var f=publicJsonData["monLo"];var h=publicJsonData["reportLo"];var c=publicJsonData["configLo"];if(b=="d"){var d=Ext.getCmp("loginFile");d.hide();}if(f=="d"){var g=Ext.getCmp("monitorFile");g.hide();}if(h=="d"){var a=Ext.getCmp("reportFile");a.hide();}if(c=="d"){var e=Ext.getCmp("configFile");e.hide();
}},applyToModule:function(){var d=Ext.getCmp("apply").checked;if(d==true&&(publicJsonData["hasAdminTab"]==true||publicJsonData["hasMonitorTab"]==true)){var b=Ext.getCmp("reporter");b.hide();var a=Ext.getCmp("reportFile");a.hide();var g=Ext.getCmp("configuration");g.hide();var e=Ext.getCmp("configFile");
e.hide();}else{Ext.getCmp("reporter_container").show();if(publicJsonData["hasReporterTab"]==true){var b=Ext.getCmp("reporter");b.show();var f=publicJsonData["reportLo"];if(f!="d"){Ext.getCmp("reportFile").show();}}if(publicJsonData["hasConfigTab"]==true){var g=Ext.getCmp("configuration");g.show();var c=publicJsonData["configLo"];
if(c!="d"){Ext.getCmp("configFile").show();}}}},loginLogo:function(a){var a=Ext.getCmp("loginpage").getValue();if(a=="Default"){Ext.getCmp("loginFile").hide();}else{Ext.getCmp("loginFile").show();}},monitorLogo:function(a){var a=Ext.getCmp("monitorpage").getValue();if(a=="Default"){Ext.getCmp("monitorFile").hide();
}else{Ext.getCmp("monitorFile").show();}},reporterLogo:function(a){var a=Ext.getCmp("reporter").getValue();if(a=="Default"){Ext.getCmp("reportFile").hide();}else{Ext.getCmp("reportFile").show();}},configLogo:function(a){var a=Ext.getCmp("configuration").getValue();if(a=="Default"){Ext.getCmp("configFile").hide();
}else{Ext.getCmp("configFile").show();}},viewData:function(){var b=Ext.getCmp("Cmd").getValue();if(b==""){Ext.Msg.show({title:pageTitle,msg:"command field is empty",buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});}else{var a=this;Ext.widget("window",{closeAction:"destroy",width:400,height:300,padding:"5 10 10 10",id:"ecmd",name:"ecmd",title:"command",resizable:"false",buttonAlign:"center",modal:true,listeners:{show:function(d){if(this.modal){var e=Ext.dom.Query.select(".x-mask");
var c=Ext.fly(e[0]);c.addCls("windowModal");}},hide:function(d){if(this.modal){var e=Ext.dom.Query.select(".x-mask");var c=Ext.fly(e[0]);c.removeCls("windowModal");}},afterrender:function(){Ext.EventManager.onWindowResize(function(){var c=this;c.center();},this);}},items:[{labelSeparator:"",xtype:"textareafield",width:"100%",height:234,id:"commd",margin:0,name:"commd",labelAlign:"top",cls:"text-area",}],buttons:[{xtype:"button",text:"Apply",id:"app",name:"app",action:"app",cls:"quickMenuWhiteButton",align:"center",handler:function(f,g){var d=Ext.getCmp("commd").getValue();
var c=Ext.getCmp("Cmd");c.setValue(d);f.up(".window").close();}}]}).show();Ext.getCmp("commd").setValue(b);}},showuploadlogin:function(a){var b=this;Ext.widget("window",{title:"Files to be uploaded",id:"file",name:"file",width:350,height:200,padding:"5 10 10 10",resizable:"false",modal:true,listeners:{show:function(d){if(this.modal){var e=Ext.dom.Query.select(".x-mask");
var c=Ext.fly(e[0]);c.addCls("windowModal");}},hide:function(d){if(this.modal){var e=Ext.dom.Query.select(".x-mask");var c=Ext.fly(e[0]);c.removeCls("windowModal");}},afterrender:function(){Ext.EventManager.onWindowResize(function(){var c=this;c.center();},this);}},items:[{xtype:"form",id:"uploadform",name:"uploadform",margin:10,items:[{xtype:"fileuploadfield",cls:"fileupload",id:"FILE_0",name:"FILE_0",labelSeparator:"",emptyText:"Select a image to upload...",fieldLabel:"Custom Logo",labelAlign:"top",width:290,buttonText:"Browse",},{xtype:"container",margin:"15 0 0 0",html:"<b>Specifications:</b> Type:GIF, JPEG, PNG, JPG;  Size:200KB;  Resolution:115x36pixels",},{xtype:"hiddenfield",id:"fileUploadURL"},{xtype:"container",id:"hiddenFieldsContainer"},{xtype:"button",text:"Upload",id:"upload",name:"upload",action:"upload",cls:"button20",align:"center",margin:"15 0 0 140",handler:function(c,x){var d=Ext.getCmp("uploadform").getForm().findField("FILE_0").getValue();
var q="yes";var v=d.substring((d.indexOf("."))+1,d.length);var r="gif/jpg/jpeg/png";var l=false;var y="EgConfigLogoMsg.jsp";var u="login";var z=publicJsonData["caption_array"];var w=publicJsonData["test"];var k=publicJsonData["installDir"];var o=publicJsonData["isDouble"];for(i=0;i<=(d.length)-1;i++){if(o=="false"){if(!validateSingleByte(d)){Ext.Msg.show({title:pageTitle,msg:fileDBL,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
return false;}}if(d[i].length>0){l=true;}if(v!="gif"&&v!="jpg"&&v!="jpeg"&&v!="png"){if(z.length>1){Ext.Msg.show({title:pageTitle,msg:fileexten,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});return false;}else{Ext.Msg.show({title:pageTitle,msg:fileNotWithReqExt+": '"+r+"'",buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
return false;}}}var t="manager/tomcat/webapps/final/admin/eg_images/logologin."+v;var h="../servlet/com.eg.EgFileUpload?title=Uploading Logo Files&dispCaption=Custom Logo&requestFrom=EgConfigLogoMsg.jsp&uploadFor=login&uploadDir="+t+"&fileExt="+v+"&fileUpload="+q;logoPath="manager/tomcat/webapps/final/admin/eg_images/";
var u="login";var g=tempJsonData["UserId"];if(g!=""&&g!=undefined){var m=g+"_"+u+"."+v;if(g.indexOf("/")>-1||g.indexOf("(")>-1){var n=g.substring(0,g.indexOf("/"));var p=g.substring(g.indexOf("/")+1,g.length);if(p.indexOf("(")>-1){p=p.substring(0,p.indexOf("(")-1);}if(n==null||n==""){m=p+"_"+u+"."+v;
}else{m=n.toLowerCase()+"_"+p+"_"+u+"."+v;}}}logoPath=logoPath+m;var s=Ext.getCmp("hiddenFieldsContainer");s.removeAll();var j={xtype:"hiddenfield",name:"FILE_0_dstFile",value:logoPath};s.add(j);if(l){var f=Ext.getCmp("uploadform");f.submit({url:h,method:"POST",success:function(e,A){Ext.Msg.alert("Status","Request has been processed successfully");
tempJsonData.hiddenParams["loginImageStatus"]="Uploaded";tempJsonData.hiddenParams["loginImageUploadStatusForAudit"]="yes";c.up(".window").close();},failure:function(e,A){Ext.Msg.alert("Failed","failure");}});}else{Ext.Msg.show({title:pageTitle,msg:nofileselect,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
return false;}}}],listeners:{afterrender:function(){b.windowupload();},}}]}).show();},showuploadmon:function(a){var b=this;Ext.widget("window",{title:"Files to be uploaded",id:"file1",name:"file1",width:350,height:200,padding:"5 10 10 10",resizable:"false",modal:true,listeners:{show:function(d){if(this.modal){var e=Ext.dom.Query.select(".x-mask");
var c=Ext.fly(e[0]);c.addCls("windowModal");}},hide:function(d){if(this.modal){var e=Ext.dom.Query.select(".x-mask");var c=Ext.fly(e[0]);c.removeCls("windowModal");}},afterrender:function(){Ext.EventManager.onWindowResize(function(){var c=this;c.center();},this);}},items:[{xtype:"form",id:"uploadform",name:"uploadform",margin:10,items:[{xtype:"fileuploadfield",cls:"fileupload",id:"FILE_0",name:"FILE_0",labelSeparator:"",emptyText:"Select a image to upload...",fieldLabel:"Custom Logo",labelAlign:"top",width:290,buttonText:"Browse",},{xtype:"container",margin:"15 0 0 0",html:"<b>Specifications:</b> Type:GIF, JPEG, PNG, JPG;  Size:200KB;  Resolution:115x36pixels",},{xtype:"hiddenfield",id:"fileUploadURL"},{xtype:"container",id:"hiddenFieldsContainer"},{xtype:"button",text:"Upload",id:"upload",name:"upload",action:"upload",cls:"button20",align:"center",margin:"15 0 0 140",handler:function(c,x){var d=Ext.getCmp("uploadform").getForm().findField("FILE_0").getValue();
var v=d.substring((d.indexOf("."))+1,d.length);var q="yes";var r="gif/jpg/jpeg/png";var l=false;var y="EgConfigLogoMsg.jsp";var u="monitor";var z=publicJsonData["caption_array"];var w=publicJsonData["test"];var k=publicJsonData["installDir"];var o=publicJsonData["isDouble"];for(i=0;i<=(d.length)-1;i++){if(o=="false"){if(!validateSingleByte(d)){Ext.Msg.show({title:pageTitle,msg:fileDBL,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
return false;}}if(d[i].length>0){l=true;}if(v!="gif"&&v!="jpg"&&v!="jpeg"&&v!="png"){if(z.length>1){Ext.Msg.show({title:pageTitle,msg:fileexten,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});return false;}else{Ext.Msg.show({title:pageTitle,msg:fileNotWithReqExt+": '"+r+"'",buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
return false;}}}var t="manager/tomcat/webapps/final/monitor/eg_images/logomonitor."+v;var h="../servlet/com.eg.EgFileUpload?title=Uploading Logo Files&dispCaption=Custom Logo&requestFrom=EgConfigLogoMsg.jsp&uploadFor=monitor&uploadDir="+t+"&fileExt="+v+"&fileUpload="+q;logoPath="manager/tomcat/webapps/final/monitor/eg_images/";
var u="monitor";var g=tempJsonData["UserId"];if(g!=""&&g!=undefined){var m=g+"_"+u+"."+v;if(g.indexOf("/")>-1||g.indexOf("(")>-1){var n=g.substring(0,g.indexOf("/"));var p=g.substring(g.indexOf("/")+1,g.length);if(p.indexOf("(")>-1){p=p.substring(0,p.indexOf("(")-1);}if(n==null||n==""){m=p+"_"+u+"."+v;
}else{m=n.toLowerCase()+"_"+p+"_"+u+"."+v;}}}logoPath=logoPath+m;var s=Ext.getCmp("hiddenFieldsContainer");s.removeAll();var j={xtype:"hiddenfield",name:"FILE_0_dstFile",value:logoPath};s.add(j);if(l){var f=Ext.getCmp("uploadform");f.submit({url:h,method:"POST",success:function(e,A){Ext.Msg.alert("Status","Request has been processed successfully");
tempJsonData.hiddenParams["monitorImageStatus"]="Uploaded";tempJsonData.hiddenParams["monitorImageUploadStatusForAudit"]="yes";c.up(".window").close();},failure:function(e,A){Ext.Msg.alert("Failed","failure");}});}else{Ext.Msg.show({title:pageTitle,msg:nofileselect,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
return false;}}}],listeners:{afterrender:function(){b.windowupload();},}}]}).show();},showuploadreport:function(a){var b=this;Ext.widget("window",{title:"Files to be uploaded",id:"file1",name:"file1",width:350,height:200,padding:"5 10 10 10",resizable:"false",modal:true,listeners:{show:function(d){if(this.modal){var e=Ext.dom.Query.select(".x-mask");
var c=Ext.fly(e[0]);c.addCls("windowModal");}},hide:function(d){if(this.modal){var e=Ext.dom.Query.select(".x-mask");var c=Ext.fly(e[0]);c.removeCls("windowModal");}},afterrender:function(){Ext.EventManager.onWindowResize(function(){var c=this;c.center();},this);}},items:[{xtype:"form",id:"uploadform",name:"uploadform",margin:10,items:[{xtype:"fileuploadfield",cls:"fileupload",id:"FILE_0",name:"FILE_0",labelSeparator:"",emptyText:"Select a image to upload...",fieldLabel:"Custom Logo",labelAlign:"top",width:290,buttonText:"Browse",},{xtype:"container",margin:"15 0 0 0",html:"<b>Specifications:</b> Type:GIF, JPEG, PNG, JPG;  Size:200KB;  Resolution:115x36pixels",},{xtype:"hiddenfield",id:"fileUploadURL"},{xtype:"container",id:"hiddenFieldsContainer"},{xtype:"button",text:"Upload",id:"upload",name:"upload",action:"upload",cls:"button20",align:"center",margin:"15 0 0 140",handler:function(c,y){var d=Ext.getCmp("uploadform").getForm().findField("FILE_0").getValue();
var w=d.substring((d.indexOf("."))+1,d.length);var q="yes";var s="gif/jpg/jpeg/png";var l=false;var z="EgConfigLogoMsg.jsp";var v="reporter";var A=publicJsonData["caption_array"];var x=publicJsonData["test"];var k=publicJsonData["installDir"];var o=publicJsonData["isDouble"];var r=publicJsonData["isDomainUser"];
for(i=0;i<=(d.length)-1;i++){if(!r&&o=="false"){if(!validateSingleByte(d)){Ext.Msg.show({title:pageTitle,msg:fileDBL,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});return false;}}if(d[i].length>0){l=true;}if(w!="gif"&&w!="jpg"&&w!="jpeg"&&w!="png"){if(A.length>1){Ext.Msg.show({title:pageTitle,msg:fileexten,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
return false;}else{Ext.Msg.show({title:pageTitle,msg:fileNotWithReqExt+": '"+s+"'",buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});return false;}}}var u="manager/tomcat/webapps/final/reporter/images/logoreporter."+w;var h="../servlet/com.eg.EgFileUpload?title=Uploading Logo Files&dispCaption=Custom Logo&requestFrom=EgConfigLogoMsg.jsp&uploadFor=reporter&uploadDir="+u+"&fileExt="+w+"&fileUpload="+q;
logoPath="manager/tomcat/webapps/final/reporter/images/";var v="reporter";var g=tempJsonData["UserId"];if(g!=""&&g!=undefined){var m=g+"_"+v+"."+w;if(g.indexOf("/")>-1||g.indexOf("(")>-1){var n=g.substring(0,g.indexOf("/"));var p=g.substring(g.indexOf("/")+1,g.length);if(p.indexOf("(")>-1){p=p.substring(0,p.indexOf("(")-1);
}if(n==null||n==""){m=p+"_"+v+"."+w;}else{m=n.toLowerCase()+"_"+p+"_"+v+"."+w;}}}logoPath=logoPath+m;var t=Ext.getCmp("hiddenFieldsContainer");t.removeAll();var j={xtype:"hiddenfield",name:"FILE_0_dstFile",value:logoPath};t.add(j);if(l){var f=Ext.getCmp("uploadform");f.submit({url:h,method:"POST",success:function(e,B){Ext.Msg.alert("Status","Request has been processed successfully");
tempJsonData.hiddenParams["reporterImageStatus"]="Uploaded";tempJsonData.hiddenParams["reporterImageUploadStatusForAudit"]="yes";c.up(".window").close();},failure:function(e,B){Ext.Msg.alert("Failed","failure");}});}else{Ext.Msg.show({title:pageTitle,msg:nofileselect,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
return false;}}}],listeners:{afterrender:function(){b.windowupload();},}}]}).show();},showuploadconfig:function(a){var b=this;Ext.widget("window",{title:"Files to be uploaded",id:"file1",name:"file1",width:350,height:200,padding:"5 10 10 10",resizable:"false",modal:true,listeners:{show:function(d){if(this.modal){var e=Ext.dom.Query.select(".x-mask");
var c=Ext.fly(e[0]);c.addCls("windowModal");}},hide:function(d){if(this.modal){var e=Ext.dom.Query.select(".x-mask");var c=Ext.fly(e[0]);c.removeCls("windowModal");}},afterrender:function(){Ext.EventManager.onWindowResize(function(){var c=this;c.center();},this);}},items:[{xtype:"form",id:"uploadform",name:"uploadform",margin:10,items:[{xtype:"fileuploadfield",cls:"fileupload",id:"FILE_0",name:"FILE_0",labelSeparator:"",emptyText:"Select a image to upload...",fieldLabel:"Custom Logo",labelAlign:"top",width:290,buttonText:"Browse",},{xtype:"container",margin:"15 0 0 0",html:"<b>Specifications:</b> Type:GIF, JPEG, PNG, JPG;  Size:200KB;  Resolution:115x36pixels",},{xtype:"hiddenfield",id:"fileUploadURL"},{xtype:"container",id:"hiddenFieldsContainer"},{xtype:"button",text:"Upload",id:"upload",name:"upload",action:"upload",cls:"button20",align:"center",margin:"15 0 0 140",handler:function(c,y){var d=Ext.getCmp("uploadform").getForm().findField("FILE_0").getValue();
var w=d.substring((d.indexOf("."))+1,d.length);var q="yes";var s="gif/jpg/jpeg/png";var l=false;var z="EgConfigLogoMsg.jsp";var v="config";var A=publicJsonData["caption_array"];var x=publicJsonData["test"];var k=publicJsonData["installDir"];var o=publicJsonData["isDouble"];var r=publicJsonData["isDomainUser"];
for(i=0;i<=(d.length)-1;i++){if(!r&&o=="false"){if(!validateSingleByte(d)){Ext.Msg.show({title:pageTitle,msg:fileDBL,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});return false;}}if(d[i].length>0){l=true;}if(w!="gif"&&w!="jpg"&&w!="jpeg"&&w!="png"){if(A.length>1){Ext.Msg.show({title:pageTitle,msg:fileexten,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
return false;}else{Ext.Msg.show({title:pageTitle,msg:fileNotWithReqExt+": '"+s+"'",buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});return false;}}}var u="manager/tomcat/webapps/final/config/images/logoconfig."+w;var h="../servlet/com.eg.EgFileUpload?title=Uploading Logo Files&dispCaption=Custom Logo&requestFrom=EgConfigLogoMsg.jsp&uploadFor=config&uploadDir="+u+"&fileExt="+w+"&fileUpload="+q;
logoPath="manager/tomcat/webapps/final/config/images/";var v="config";var g=tempJsonData["UserId"];if(g!=""&&g!=undefined){var m=g+"_"+v+"."+w;if(g.indexOf("/")>-1||g.indexOf("(")>-1){var n=g.substring(0,g.indexOf("/"));var p=g.substring(g.indexOf("/")+1,g.length);if(p.indexOf("(")>-1){p=p.substring(0,p.indexOf("(")-1);
}if(n==null||n==""){m=p+"_"+v+"."+w;}else{m=n.toLowerCase()+"_"+p+"_"+v+"."+w;}}}logoPath=logoPath+m;var t=Ext.getCmp("hiddenFieldsContainer");t.removeAll();var j={xtype:"hiddenfield",name:"FILE_0_dstFile",value:logoPath};t.add(j);if(l){var f=Ext.getCmp("uploadform");f.submit({url:h,method:"POST",success:function(e,B){Ext.Msg.alert("Status","Request has been processed successfully");
tempJsonData.hiddenParams["configMgmtImageStatus"]="Uploaded";tempJsonData.hiddenParams["configMgmtImageUploadStatusForAudit"]="yes";c.up(".window").close();},failure:function(e,B){Ext.Msg.alert("Failed","failure");}});}else{Ext.Msg.show({title:pageTitle,msg:nofileselect,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
return false;}}}],listeners:{afterrender:function(){b.windowupload();},}}]}).show();},windowupload:function(){var e=Ext.getCmp("uploadform");var c=e.getForm();var d=publicJsonData.hiddenParams;for(var b in d){if(!c.findField("'"+b+"'")){e.add({xtype:"hidden",name:b,value:d[b]});}else{c.findField("'"+b+"'").setValue(d[b]);
}}},saveData:function(c){var a0=this;var O=Ext.getCmp("oldPwd").getValue();O=Ext.String.trim(O);var o=Ext.getCmp("newPwd").getValue();o=Ext.String.trim(o);var x=Ext.getCmp("confPwd").getValue();x=Ext.String.trim(x);var bi=Ext.getCmp("To").getValue();var H=Ext.getCmp("CC").getValue();var n=Ext.getCmp("BCC").getValue();
var ar=Ext.getCmp("Cmd").getValue();var b=Ext.getCmp("measuremode").getValue();var Q=Ext.getCmp("timeOpt").getValue();var aM=Ext.getCmp("monhomepage").getValue();var a=Ext.getCmp("oldPwd");var r=Ext.getCmp("newPwd");var bv=Ext.getCmp("confPwd");var ba=Ext.getCmp("To");var bk=Ext.getCmp("CC");var ao=Ext.getCmp("BCC");
var Y=Ext.getCmp("Cmd");var a3=Ext.getCmp("timeZone").getValue();var aY=Ext.getCmp("userDateFormat").getValue();var bu=tempJsonData.hiddenParams["$_eGTVModesupportedscreens"];if(publicJsonData["isAlarmViewerUser"]=="true"){if(aM!="Current Alarms"){Ext.Msg.show({title:pageTitle,msg:monhomepageAlrt,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
Ext.getCmp("monhomepage").focus();return;}}var l=Ext.getCmp("frequency").getValue();var bq=Ext.get("flagID").getValue();var aK=Ext.getCmp("adminskin-themeLight").getText();var a9=Ext.getCmp("monitorskin-themeLight").getText();var h=Ext.getCmp("reportskin-themeLight").getText();var a2=Ext.getCmp("configskin-themeLight").getText();
if(aK=="Light"){aK="Light";}else{aK="Dark";}if(a9=="Light"){a9="Light";}else{a9="Dark";}if(h=="Light"){h="Light";}else{h="Dark";}if(h=="Light"){h="Light";}else{h="Dark";}if(a2=="Light"){a2="Light";}else{a2="Dark";}var v=Ext.getCmp("high").pressed;if(v==true){v="H";}else{v="null";}var aU=Ext.getCmp("medium").pressed;
if(aU==true){aU="I";}else{aU="null";}var bt=Ext.getCmp("low").pressed;if(bt==true){bt="L";}else{bt="null";}var bo=Ext.getCmp("ddmailyes").pressed;if(bo==true){bo="Yes";}else{bo="No";}var at=Ext.getCmp("alarmdelyes").pressed;if(at==true){at="true";}else{at="false";}var bx=Ext.getCmp("alarmackyes").pressed;
if(bx==true){bx="true";}else{bx="false";}var aG=Ext.getCmp("apply").checked;if(aG==true){aG="yes";}else{aG=null;}var a1=Ext.getCmp("isnew").checked;if(a1==true){a1="N";}else{a1=Ext.getCmp("iscomp").checked;if(a1==true){a1="C";}}var aR=Ext.getCmp("htmode").checked;if(aR==true){aR="HTML";}else{aR=Ext.getCmp("txtmode").checked;
if(aR==true){aR="T";}}var bf=true;var N="";var bc=true;var az=/^(\+\d\d)?[0-9]+$/g;var a5=/(((([\+]?([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 s=publicJsonData["isDouble"];if(s=="false"){bc=validateSingleByte(o);
}if(bi!=null&&bi!="undefined"){N=Ext.getCmp("To").getValue();if(N==null){N="";}}var z="";if(H!=null&&H!="undefined"){z=Ext.getCmp("CC").getValue();}var aT="";if(n!=null&&n!="undefined"){aT=Ext.getCmp("BCC").getValue();}if(l!=null&&l!="undefined"){checkRefFreq=Ext.getCmp("frequency").getValue();}var f="";
if(ar!=null&&ar!="undefined"){f=Ext.getCmp("Cmd").getValue();}var aF=true;var L=publicJsonData["isDomainUser"];var J=publicJsonData["pwdLength"];var a8="true";var E=publicJsonData["pwdComplexityCount"];var w=publicJsonData["userName"];if(L!=null&&L=="false"){a8=a0.pwdComplexityCheck(o);}if(J==""||J<2){J=8;
}else{if(J!=""&&J<E){J=E;}}var al=false;if(L!=null&&L=="true"){al=true;}if(!al&&Ext.isEmpty(O)&&Ext.isEmpty(o)&&Ext.isEmpty(x)){bf=true;}else{if(!al&&Ext.isEmpty(O)){Ext.Msg.show({title:pageTitle,msg:oldpwd,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});a.focus();bf=false;return;}else{if(!al&&Ext.isEmpty(o)){Ext.Msg.show({title:pageTitle,msg:password,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
r.focus();bf=false;return;}else{if(!al&&Ext.String.trim(O.toLowerCase())==Ext.String.trim(o.toLowerCase())){Ext.Msg.show({title:pageTitle,msg:existingpassMsg,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});r.focus();bf=false;return;}else{if(!al&&Ext.String.trim(w.toLowerCase())==Ext.String.trim(o.toLowerCase())){Ext.Msg.show({title:pageTitle,msg:userpassMsg,buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(m){r.focus(true);
}});return false;}else{if(!al&&Ext.isEmpty(x)){Ext.Msg.show({title:pageTitle,msg:cpwd,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});bv.focus();bf=false;return;}else{if(!al&&(!Ext.isEmpty(o)&&!Ext.isEmpty(x)&&o!=x)){Ext.Msg.show({title:pageTitle,msg:pwdmatch,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});bv.focus();
bf=false;return;}else{if(!checkloginpass(o)){r.focus();bf=false;return;}else{if(!al&&(!Ext.isEmpty(o)&&(o).length<J)){Ext.Msg.show({title:pageTitle,msg:passLabel1+" "+J+" "+passLabel2,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});r.focus();bf=false;return;}else{if(!al&&(!Ext.isEmpty(o)&&a8.indexOf("false")>-1)){var t=a8.substring(a8.indexOf("false#")+6);
Ext.Msg.show({title:pageTitle,msg:alertForPwdComplexity5+". "+passLabel1+" "+t+".",width:400,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING,fn:function(m){r.focus();}});bf=false;return;}else{if(!al&&!bc){Ext.Msg.show({title:pageTitle,msg:pwdbyte,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});r.focus();bf=false;return;
}}}}}}}}}}}var ac=validateEmail(bi);var aI=validateEmail(H);var p=validateEmail(n);var bh=(bi).match(az);var aX=(H).match(az);var I=(n).match(az);var F=(bi).match(a5);var ak=(H).match(a5);var ai=(n).match(a5);if((N!="")&&(ac==false&&bh==null)&&(F!=bi)){Ext.Msg.show({title:pageTitle,msg:tomailid,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
ba.focus();return;}if(!checkspecial(ar,"@*+=[]|;\"'<>?`")){Y.focus();bf=false;return;}if(!validateSingleByte(bi)){Ext.Msg.show({title:pageTitle,msg:tomailiddbl,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});ba.focus();return;}if((z!="")&&(aI==null||aI==false)&&aX==null&&(ak!=H)){Ext.Msg.show({title:pageTitle,msg:ccmailid,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
bk.focus();return;}if((z!="")&&!validateSingleByte(H)){Ext.Msg.show({title:pageTitle,msg:ccmailiddbl,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});bk.focus();return;}if((aT!="")&&(p==null||p==false)&&I==null&&ai!=n){Ext.Msg.show({title:pageTitle,msg:bccmailid,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});ao.focus();
return;}if((aT!="")&&!validateSingleByte(n)){Ext.Msg.show({title:pageTitle,msg:bccmailiddbl,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});ao.focus();return;}if(!bf||f!=""){if(Ext.getCmp("high").pressed==false&&Ext.getCmp("medium").pressed==false&&Ext.getCmp("low").pressed==false){Ext.Msg.show({title:pageTitle,msg:typealarm,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
bf=false;return;}else{if(Ext.getCmp("isnew").checked==false&&Ext.getCmp("iscomp").checked==false){Ext.Msg.show({title:pageTitle,msg:notification,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});bf=false;return;}else{if(Ext.getCmp("htmode").checked==false&&Ext.getCmp("txtmode").checked==false){Ext.Msg.show({title:pageTitle,msg:messagemode,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
bf=false;return;}}}}if(checkRefFreq!=null&&checkRefFreq!="undefined"&&Ext.getCmp("frequency").isHidden()==false){if(bf&&this.isAValidNumber(checkRefFreq)){bf=true;}else{Ext.getCmp("frequency").focus();bf=false;return;}}if(bf){if((N==""&&N.length==0)&&(z!=""&&z.length>0)){Ext.Msg.show({title:pageTitle,msg:tomailid,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
ba.focus();bf=false;return;}if((N==""&&N.length==0)&&(aT!=""&&aT.length>0)){Ext.Msg.show({title:pageTitle,msg:tomailid,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});ba.focus();bf=false;return;}if((Ext.getCmp("high")!=null&&Ext.getCmp("high")!=""&&Ext.getCmp("high").pressed)||(Ext.getCmp("medium")!=null&&Ext.getCmp("medium")!=""&&Ext.getCmp("medium").pressed)||(Ext.getCmp("low")!=null&&Ext.getCmp("low")!=""&&Ext.getCmp("low").pressed)){var d=" or ";
var V="'";var by=userIDValidationMsg43+V+userIDValidationMsg44+V+d+V+userIDValidationMsg45+V+".";if(!Ext.isEmpty(enableCommand)&&enableCommand.toLowerCase()=="no"){by=tomailid;}if((N==""&&N.length==0)&&(f==""&&f.length==0)){Ext.Msg.show({title:pageTitle,msg:by,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
ba.focus();bf=false;return;}}}var P=tempJsonData.hiddenParams["$_pwd"];var bl=tempJsonData.hiddenParams["$_high"];var aH=tempJsonData.hiddenParams["$_medium"];var aO=tempJsonData.hiddenParams["$_low"];var T=tempJsonData.hiddenParams["$_tomailid"];var aD=tempJsonData.hiddenParams["$_ccmailid"];var ab=tempJsonData.hiddenParams["$_bccmailid"];
var aS=tempJsonData.hiddenParams["$_measure_in_mail_mode"];var bn=tempJsonData.hiddenParams["$chgTimeOptSeleted"];var u=tempJsonData.hiddenParams["$_dd_in_mail_mode"];var aQ=tempJsonData.hiddenParams["$_notify"];var be=tempJsonData.hiddenParams["$_msgmode"];var D=tempJsonData.hiddenParams["$_alarm_delete"];
var k=tempJsonData.hiddenParams["$_alarm_ack"];var bp=tempJsonData.hiddenParams["$_adminSkin"];var A=tempJsonData.hiddenParams["$_monitorSkin"];var B=tempJsonData.hiddenParams["$_reporterSkin"];var aJ=tempJsonData.hiddenParams["$_configurationSkin"];var ap=tempJsonData.hiddenParams["loginImageStatus"];
var aC=tempJsonData.hiddenParams["monitorImageStatus"];var g=tempJsonData.hiddenParams["reporterImageStatus"];var aW=tempJsonData.hiddenParams["configMgmtImageStatus"];var q=tempJsonData.hiddenParams["loginImageUploadStatusForAudit"];var j=tempJsonData.hiddenParams["monitorImageUploadStatusForAudit"];
var aq=tempJsonData.hiddenParams["reporterImageUploadStatusForAudit"];var aV=tempJsonData.hiddenParams["configMgmtImageUploadStatusForAudit"];var aA=tempJsonData.hiddenParams["$_languageName"];var av=tempJsonData.hiddenParams["$_refreshFreq"];var aP=tempJsonData.hiddenParams["$_monitorHomePage"];var bd=tempJsonData.hiddenParams["escmailid"];
var ah=tempJsonData.hiddenParams["escmailid2"];var af=tempJsonData.hiddenParams["escmailid3"];var ae=tempJsonData.hiddenParams["escmailid4"];var ad=tempJsonData.hiddenParams["escmailid5"];var U=tempJsonData.hiddenParams["size"];var aB=tempJsonData.hiddenParams["name"];var bw=tempJsonData.hiddenParams["val"];
var e=tempJsonData.hiddenParams["entry"];var aN=Ext.getCmp("loginpage").getValue();var am=Ext.getCmp("monitorpage").getValue();var ay=Ext.getCmp("reporter").getValue();var X=Ext.getCmp("configuration").getValue();if(aN=="Default"){ap="";q="no";}if(am=="Default"){aC="";j="no";}if(ay=="Default"){g="";aq="no";
}if(X=="Default"){aW="";aV="no";}if(Ext.getCmp("apply").checked&&(publicJsonData["hasAdminTab"]==true||publicJsonData["hasMonitorTab"]==true)){g="";aq="no";aW="";aV="no";}var ax=Ext.getCmp("userProf_monitorHomeOpt");var G="";if(!Ext.isEmpty(ax)){var bg=ax.getChecked();if(!Ext.isEmpty(bg)){G=bg[0].inputValue;
}}var bs="$_ccmailid=Mail ID / Mobile No  Cc$"+encodeURIComponent(aD)+"&$_alarm_ack=Allow alarm acknowledgement$"+k+"&$_adminSkin=Admin Skin$"+bp+"&monitorImageStatus="+aC+"&configMgmtImageStatus="+aW+"&$_pwd=Password$"+encodeURIComponent(filterEncode(P))+"&oldpwd="+encodeURIComponent(filterEncode(O))+"&$_bccmailid=Mail ID / Mobile No  Bcc$"+encodeURIComponent(ab)+"&$_alarm_delete=Allow delete alarms$"+D+"&$_tomailid=Mail ID / Mobile No To$"+encodeURIComponent(T)+"&$_languageName=Language$"+aA+"&alarm_ack="+bx+"&reporterImageUploadStatusForAudit="+aq+"&escmailid="+encodeURIComponent(bd)+"&escmailid2="+encodeURIComponent(ah)+"&escmailid3="+encodeURIComponent(af)+"&escmailid4="+encodeURIComponent(ae)+"&escmailid5="+encodeURIComponent(ad)+"&msgmode="+aR+"&$_medium="+aH+"&alarm_delete="+at+"&loginImageStatus="+ap+"&adminSkin="+aK+"&configurationSkin="+a2+"&ccmailid="+encodeURIComponent(H)+"&$_monitorHomePage=Monitor Home Page$"+aP+"&configMgmtImageUploadStatusForAudit="+aV+"&languageName="+bq+"&size="+encodeURIComponent(U)+"&$_reporterSkin=Reporter Skin$"+B+"&$_monitorSkin=Monitor Skin$"+A+"&logoCheck="+aG+"&$_refreshFreq=Refresh Frequency$"+av+"&$_msgmode="+be+"&$_low="+aO+"&low="+bt+"&$_measure_in_mail_mode=Include measure details in mail alert$"+encodeURIComponent(aS)+"&monitorImageUploadStatusForAudit="+j+"&measure_in_mail_mode="+b+"&$_chgTimeOpt=Maximum timeline for reports$"+encodeURIComponent(bn)+"&chgTimeOpt="+Q+"&reporterImageStatus="+g+"&$_high="+bl+"&monitorSkin="+a9+"&notify="+a1+"&cpwd="+encodeURIComponent(filterEncode(x))+"&bccmailid="+encodeURIComponent(n)+"&reporterSkin="+h+"&monitorHomePage="+aM+"&monitorHomePageOption="+G+"&medium="+aU+"&$_dd_in_mail_mode=Include detailed diagnosis in mail alerts$"+encodeURIComponent(u)+"&$_configurationSkin=Configuration Management Skin$"+aJ+"&pwd="+encodeURIComponent(filterEncode(o))+"&dd_in_mail_mode="+encodeURIComponent(bo)+"&$_notify="+aQ+"&customScript="+ar+"&entry="+e+"&entry="+e+"&tomailid="+encodeURIComponent(bi)+"&high="+v+"&refreshFreq="+l+"&loginImageUploadStatusForAudit="+q+"&timeZone="+a3+"&userDateFormat="+aY;
var an=publicJsonData.isAdminEnabled2FA;if(!Ext.isEmpty(an)&&(an.toLowerCase()=="true"||an.toLowerCase()=="yes")){var bj=Ext.getCmp("enable2FAYesFlag").getGroupValue();var M=Ext.getCmp("mail").getGroupValue();var R="";if(!Ext.isEmpty(bj)&&bj.toLowerCase()=="yes"){R="yes";var bm=Ext.getCmp("To").getValue();
if(Ext.isEmpty(bm)||Ext.String.trim(bm).length==0){Ext.Msg.show({title:pageTitle,msg:toMailIDAlertMsg+".",buttons:Ext.Msg.OK,icon:"iconExclamation",fn:function(m){Ext.getCmp("To").focus();}});return;}bs+="&tomailVal="+bm;}else{R="no";M="mail";}bs+="&twofaEnableFlagVal="+R+"&twofaOTPModeFlagVal="+M;}var aZ=false;
if(G!=null&&G=="dynamic"){var C=Ext.getCmp("monhomepage").previousSelectedOption;if(aM!=null&&aM!=C){aZ=true;}}else{if(aM!=null&&aM!=aP){aZ=true;}}var a6=publicJsonData.cloudModel;var y=publicJsonData.isSuperOrg;var a7=publicJsonData.isEligibleUser;if((!Ext.isEmpty(a6)&&a6.toLowerCase()=="phoenix"&&y)||(!Ext.isEmpty(a7)&&a7)){var aj="";
if(!Ext.isEmpty(Ext.getCmp("useParentProxyNo"))){aj=Ext.getCmp("useParentProxyNo").getGroupValue();}var S=Ext.getCmp("useProxyYes").getGroupValue();var br="";var K="";var au="";var aL="";var ag="";var bb="";if(!Ext.isEmpty(S)&&S=="yes"&&(Ext.isEmpty(aj)||(!Ext.isEmpty(aj)&&aj=="no"))){br=Ext.getCmp("proxyHost").getValue();
K=Ext.getCmp("proxyPort").getValue();if(Ext.isEmpty(br)){Ext.Msg.show({title:pageTitle,msg:enterProxyHostMsg,icon:"gen-warning size32 color-warning",buttons:Ext.Msg.OK,fn:function(m){Ext.getCmp("proxyHost").focus(true,true);}});return false;}var a4="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
var W="";var aw=false;for(var aa=0;aa<br.length;aa++){W=a4.indexOf(br.charAt(aa));if(W>=0){aw=true;break;}}if(aw){if(checkspaceExtjs(br)!="0"){Ext.Msg.show({title:pageTitle,msg:_checkblank,buttons:Ext.Msg.OK,icon:"gen-warning size32 color-warning",fn:function(m){Ext.getCmp("proxyHost").focus(true,true);
}});return false;}else{if(this.isCheckEgKeywords(br)){Ext.Msg.show({title:pageTitle,msg:_tcKeyword,buttons:Ext.Msg.OK,icon:"gen-warning size32 color-warning",fn:function(m){Ext.getCmp("proxyHost").focus(true,true);}});return false;}}if(!checkDots(br)){Ext.Msg.show({title:pageTitle,msg:_checkHost,buttons:Ext.Msg.OK,icon:"gen-warning size32 color-warning",fn:function(m){Ext.getCmp("proxyHost").focus(true,true);
}});return false;}if(!checkspecialnomess(br,"`~!@#%^&*()+={}[]|\\;\"'<>,?")){Ext.Msg.show({title:pageTitle,msg:_checkspecial,buttons:Ext.Msg.OK,icon:"gen-warning size32 color-warning",fn:function(m){Ext.getCmp("proxyHost").focus(true,true);}});return false;}}else{var aE=validateIpWithMsg(br);if(!Ext.isEmpty(aE)){Ext.Msg.show({title:pageTitle,msg:aE,buttons:Ext.Msg.OK,icon:"gen-warning size32 color-warning",fn:function(m){Ext.getCmp("proxyHost").focus(true,true);
}});return false;}}if(Ext.isEmpty(K)){Ext.Msg.show({title:pageTitle,msg:enterProxyPortMsg,icon:"gen-warning size32 color-warning",buttons:Ext.Msg.OK,fn:function(m){Ext.getCmp("proxyPort").focus(true,true);}});return false;}else{if((!checknumber("+",K)||K==0)&&(K!="none")){Ext.Msg.show({title:pageTitle,msg:_checkproxy,buttons:Ext.Msg.OK,icon:"gen-warning size32 color-warning",fn:function(m){Ext.getCmp("proxyPort").focus(true,true);
}});return false;}}var aE=checkDecimalExtJs(K);if(!Ext.isEmpty(aE)){Ext.Msg.show({title:pageTitle,msg:aE,buttons:Ext.Msg.OK,icon:"gen-warning size32 color-warning",fn:function(m){Ext.getCmp("proxyPort").focus(true,true);}});return false;}au=Ext.getCmp("isAuthenticationYes").getGroupValue();if(!Ext.isEmpty(au)&&au=="yes"){aL=Ext.getCmp("proxyUsername").getValue();
ag=Ext.getCmp("proxyPassword").getValue();bb=Ext.getCmp("proxyCnfPassword").getValue();if(Ext.isEmpty(aL)){Ext.Msg.show({title:pageTitle,msg:enterProxyUsernameMsg,icon:"gen-warning size32 color-warning",buttons:Ext.Msg.OK,fn:function(m){Ext.getCmp("proxyUsername").focus(true,true);}});return false;}var Z="|:;\"'<>,/[]?";
if(this.isCheckEgKeywords(aL)){Ext.Msg.show({title:pageTitle,msg:_tcKeyword,icon:"gen-warning size32 color-warning",buttons:Ext.Msg.OK,fn:function(m){Ext.getCmp("proxyUsername").focus(true,true);}});return false;}else{if(checkSpecialExtjs(aL,Z)!="0"){Ext.Msg.show({title:pageTitle,msg:validationMsg13,icon:"gen-warning size32 color-warning",buttons:Ext.Msg.OK,fn:function(m){Ext.getCmp("proxyUsername").focus(true,true);
}});return false;}else{if(aL.indexOf("..")>-1){Ext.Msg.show({title:pageTitle,msg:_checkdots,icon:"gen-warning size32 color-warning",buttons:Ext.Msg.OK,fn:function(m){Ext.getCmp("proxyUsername").focus(true,true);}});return false;}else{if(aL.indexOf("  ")>-1){Ext.Msg.show({title:pageTitle,msg:_checkSpaces,icon:"gen-warning size32 color-warning",buttons:Ext.Msg.OK,fn:function(m){Ext.getCmp("proxyUsername").focus(true,true);
}});return false;}}}}if(Ext.isEmpty(ag)){Ext.Msg.show({title:pageTitle,msg:enterProxyPwdMsg,icon:"gen-warning size32 color-warning",buttons:Ext.Msg.OK,fn:function(m){Ext.getCmp("proxyPassword").focus(true,true);}});return false;}else{if(checkspaceExtjs(ag)!="0"){Ext.Msg.show({title:pageTitle,msg:_checkblank,icon:"gen-warning size32 color-warning",buttons:Ext.Msg.OK,fn:function(m){Ext.getCmp("proxyPassword").focus(true,true);
}});return false;}else{if(this.isCheckEgKeywords(ag)){Ext.Msg.show({title:pageTitle,msg:_tcKeyword,icon:"gen-warning size32 color-warning",buttons:Ext.Msg.OK,fn:function(m){Ext.getCmp("proxyPassword").focus(true,true);}});return false;}else{if(Ext.isEmpty(bb)){Ext.Msg.show({title:pageTitle,msg:enterProxyCnfPwdMsg,icon:"gen-warning size32 color-warning",buttons:Ext.Msg.OK,fn:function(m){Ext.getCmp("proxyCnfPassword").focus(true,true);
}});return false;}else{if(ag!=bb){Ext.Msg.show({title:pageTitle,msg:pwdMatchMsg,icon:"gen-warning size32 color-warning",buttons:Ext.Msg.OK,fn:function(m){Ext.getCmp("proxyCnfPassword").focus(true,true);}});return false;}}}}}}}bs+="&useParentProxyNo="+encodeURIComponent(aj)+"&useProxyYes="+encodeURIComponent(S)+"&proxyHost="+encodeURIComponent(br)+"&proxyPort="+encodeURIComponent(K)+"&isAuthenticationYes="+encodeURIComponent(au)+"&proxyUsername="+encodeURIComponent(aL)+"&proxyPassword="+encodeURIComponent(ag);
}alarmLoadMask1.show();Ext.Ajax.request({url:"/final/admin/UserProfile/data/userProfilep.jsp",params:bs,method:"POST",timeout:120000,scope:this,success:function(bz){var bA=bz.responseText;var m=Ext.decode(bA);if(m["Msg"]=="User profile settings updated successfully"){Ext.Msg.show({title:m["Title"],msg:m["Msg"],buttons:Ext.Msg.OK,icon:"iconInformation",fn:function(bB){if(bB=="ok"){if(isLSPortalUser!=null&&isLSPortalUser==true&&sendUserDataToCMS!=null&&sendUserDataToCMS=="true"&&O!=o){jQuery.ajax({type:"POST",url:"https://www.eginnovations.com/solutions/product_pw_change.php",data:{"Email":userID,"New_Password":o},cache:false,success:function(bC){if((publicJsonData["selectedTimeZone"]!=a3)||(publicJsonData["selectedDateFormat"]!=aY)||(publicJsonData["userLanguage"]!=bq)||(publicJsonData["userAdminSkin"]!=aK)||(publicJsonData["userMonitorSkin"]!=a9)||(publicJsonData["userReporterSkin"]!=h)||(publicJsonData["userConfigSkin"]!=a2)){if(fromSm=="yes"){window.parent.location.href=smIndexPage+"&comeFrom=profile"+"&newwindow=yes";
return;}else{if(aZ){window.parent.location.href="/final/egIndex.jsp?entry=monitor&displayTab=all&uname=&integritycheckviolated=false";return;}else{window.parent.refreshEgIndexPage("userprofile_monitor_homepage");}}}else{if(aZ){window.parent.location.href="/final/egIndex.jsp?entry=monitor&displayTab=all&uname=&integritycheckviolated=false";
return;}else{window.parent.refreshEgIndexPage("userprofile_monitor_homepage");}}},error:function(bC){if(aZ){window.parent.location.href="/final/egIndex.jsp?entry=monitor&displayTab=all&uname=&integritycheckviolated=false";return;}console.log(bC);}});}else{if((publicJsonData["selectedTimeZone"]!=a3)||(publicJsonData["selectedDateFormat"]!=aY)||(publicJsonData["userLanguage"]!=bq)||(publicJsonData["userAdminSkin"]!=aK)||(publicJsonData["userMonitorSkin"]!=a9)||(publicJsonData["userReporterSkin"]!=h)||(publicJsonData["userConfigSkin"]!=a2)){if(fromSm=="yes"){window.parent.location.href=smIndexPage+"&comeFrom=profile"+"&newwindow=yes";
return;}else{if(aZ){window.parent.location.href="/final/egIndex.jsp?entry=monitor&displayTab=all&uname=&integritycheckviolated=false";return;}else{window.parent.refreshEgIndexPage("userprofile_monitor_homepage");}}}else{if(aZ){window.parent.location.href="/final/egIndex.jsp?entry=monitor&displayTab=all&uname=&integritycheckviolated=false";
return;}else{window.parent.refreshEgIndexPage("userprofile_monitor_homepage");}}}}}});}else{Ext.Msg.show({title:m["Title"],msg:m["Msg"],buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING,});}alarmLoadMask1.hide();}});},isCheckEgKeywords:function(f){var e=f.toString().toLowerCase();var j="";var a=false;var c=["$unconfigured","$pattern","$adminport","$unconfig","$delay","$domain","$fromid","$homedir","$processname:$pattern","$processname:$processpattern","$hostname","$user","$remotefile","$rootpath","$servername","$servicename","$community","$toid","$name:$url","$url","$username","$webserverportno","$webserverport","$password","$passwd","$dbhost","$dbport","$database","$name:$pattern","(EG_RUNTIME)","$hostIp:$portNo"];
for(var d=0;d<c.length;d++){j=c[d].toLowerCase();if(e==j){a=true;break;}if(j.indexOf(":")!=-1){var h=j.split(":");var g="";for(var b=0;b<h.length;b++){g=h[b]+"";if(e==g){a=true;}}if(a){break;}}}return a;},isAValidNumber:function(a){validFigures="0123456789";if(a==""){Ext.Msg.show({title:pageTitle,msg:frequency,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
return false;}for(i=0;i<a.length;i++){if(validFigures.indexOf(a.charAt(i),0)==-1){Ext.Msg.show({title:pageTitle,msg:frequency,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});return false;}}if(parseInt(a)>=30){return true;}else{Ext.Msg.show({title:pageTitle,msg:frequency,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});
return false;}},show2FAOTPModeCnt:function(){var a=Ext.getCmp("enable2FAYesFlag").getGroupValue();if(!Ext.isEmpty(a)&&a.toLowerCase()=="yes"){Ext.getCmp("twoFAOTPMode").show();}else{Ext.getCmp("twoFAOTPMode").hide();}},setDefaultProxyData:function(){var j=publicJsonData.useProxy;var g=publicJsonData.useParentProxy;
if(!Ext.isEmpty(j)&&j.toLowerCase()=="y"){Ext.getCmp("useProxyYes").setValue(true);var b=publicJsonData.isSuperOrg;var a=publicJsonData.isSuperUserSuperOrg;var e=publicJsonData.isProxySet;var g=publicJsonData.useParentProxy;var d=publicJsonData.parentproxyEnabled;if(!b&&(g||(!Ext.isEmpty(d)&&d=="y"))){Ext.getCmp("useParentProxy").show();
if(g||!e){Ext.getCmp("useParentProxyYes").setValue(true);}else{Ext.getCmp("useParentProxyNo").setValue(true);}}else{Ext.getCmp("useParentProxy").hide();Ext.getCmp("useParentProxyNo").setValue(true);}var f=publicJsonData.isProxyAvailable;if(!Ext.isEmpty(f)&&f){Ext.getCmp("noProxy").hide();var l=publicJsonData.proxyHost;
var m=publicJsonData.proxyPort;Ext.getCmp("proxyHost").setValue(l);Ext.getCmp("proxyPort").setValue(m);Ext.getCmp("proxyHost").show();Ext.getCmp("proxyPort").show();Ext.getCmp("isAuthentication").show();var h=publicJsonData.setAuthentication;if(!Ext.isEmpty(h)&&h.toLowerCase()=="y"){Ext.getCmp("isAuthenticationYes").setValue(true);
var c=publicJsonData.proxyUsername;var k=publicJsonData.proxyPassword;pass=k;confPass=k;Ext.getCmp("proxyUsername").setValue(c);Ext.getCmp("proxyPassword").setValue(k);Ext.getCmp("proxyCnfPassword").setValue(k);Ext.getCmp("proxyUsername").show();Ext.getCmp("proxyPassword").show();Ext.getCmp("proxyCnfPassword").show();
}else{Ext.getCmp("isAuthenticationNo").setValue(true);}if(g){Ext.getCmp("proxyHost").setDisabled(true);Ext.getCmp("proxyPort").setDisabled(true);Ext.getCmp("isAuthentication").setDisabled(true);if(!Ext.isEmpty(h)&&h.toLowerCase()=="y"){Ext.getCmp("proxyUsername").setDisabled(true);Ext.getCmp("proxyPassword").setDisabled(true);
Ext.getCmp("proxyCnfPassword").setDisabled(true);}}}else{Ext.getCmp("noProxy").show();Ext.getCmp("proxyHost").hide();Ext.getCmp("proxyPort").hide();Ext.getCmp("isAuthenticationNo").setValue(true);Ext.getCmp("isAuthentication").hide();Ext.getCmp("proxyUsername").hide();Ext.getCmp("proxyPassword").hide();
Ext.getCmp("proxyCnfPassword").hide();}}else{Ext.getCmp("useProxyNo").setValue(true);}},setDefaultProxyDataAlone:function(){var d=publicJsonData.isProxyAvailable;if(!Ext.isEmpty(d)&&d){var c=publicJsonData.proxyHost;var f=publicJsonData.proxyPort;Ext.getCmp("proxyHost").setValue(c);Ext.getCmp("proxyPort").setValue(f);
Ext.getCmp("proxyHost").show();Ext.getCmp("proxyPort").show();Ext.getCmp("isAuthentication").show();var a=publicJsonData.setAuthentication;if(!Ext.isEmpty(a)&&a.toLowerCase()=="y"){Ext.getCmp("isAuthenticationYes").setValue(true);var b=publicJsonData.proxyUsername;var e=publicJsonData.proxyPassword;pass=e;
confPass=e;Ext.getCmp("proxyUsername").setValue(b);Ext.getCmp("proxyPassword").setValue(e);Ext.getCmp("proxyCnfPassword").setValue(e);Ext.getCmp("proxyUsername").show();Ext.getCmp("proxyPassword").show();Ext.getCmp("proxyCnfPassword").show();}else{Ext.getCmp("isAuthenticationNo").setValue(true);}}},setParentProxyData:function(){var c=publicJsonData.isSuperOrg;
var a=publicJsonData.isSuperUserSuperOrg;var f=publicJsonData.isProxySet;var e=publicJsonData.parentproxyEnabled;var h=publicJsonData.useParentProxy;if(!c&&(h||!Ext.isEmpty(e)&&e=="y")){Ext.getCmp("useParentProxy").show();if(!Ext.isEmpty(e)&&e=="y"||!f){Ext.getCmp("useParentProxyYes").setValue(true);
}else{Ext.getCmp("useParentProxyNo").setValue(true);}}else{Ext.getCmp("useParentProxy").hide();Ext.getCmp("useParentProxyNo").setValue(true);}var e=publicJsonData.parentproxyEnabled;if(!Ext.isEmpty(e)&&e=="y"){Ext.getCmp("noProxy").hide();var g=publicJsonData.parentproxyHost;var k=publicJsonData.parentproxyPort;
Ext.getCmp("proxyHost").setValue(g);Ext.getCmp("proxyPort").setValue(k);Ext.getCmp("proxyHost").show();Ext.getCmp("proxyPort").show();Ext.getCmp("proxyHost").setDisabled(true);Ext.getCmp("proxyPort").setDisabled(true);var l=publicJsonData.parentsetAuthentication;Ext.getCmp("isAuthentication").show();
if(!Ext.isEmpty(l)&&l=="y"){Ext.getCmp("isAuthenticationYes").setValue(true);var b=publicJsonData.parentproxyUsername;var j=publicJsonData.parentproxyPassword;Ext.getCmp("proxyUsername").setValue(b);Ext.getCmp("proxyPassword").setValue(j);Ext.getCmp("proxyCnfPassword").setValue(j);Ext.getCmp("proxyUsername").show();
Ext.getCmp("proxyPassword").show();Ext.getCmp("proxyCnfPassword").show();Ext.getCmp("proxyUsername").setDisabled(true);Ext.getCmp("proxyPassword").setDisabled(true);Ext.getCmp("proxyCnfPassword").setDisabled(true);}else{Ext.getCmp("isAuthenticationNo").setValue(true);Ext.getCmp("proxyUsername").hide();
Ext.getCmp("proxyPassword").hide();Ext.getCmp("proxyCnfPassword").hide();}Ext.getCmp("isAuthentication").setDisabled(true);}else{var d=Ext.getCmp("useParentProxyYes").getGroupValue();if(!Ext.isEmpty(d)&&d=="yes"){Ext.getCmp("noProxy").show();Ext.getCmp("proxyHost").hide();Ext.getCmp("proxyPort").hide();
Ext.getCmp("isAuthenticationNo").setValue(true);Ext.getCmp("isAuthentication").hide();Ext.getCmp("proxyUsername").hide();Ext.getCmp("proxyPassword").hide();Ext.getCmp("proxyCnfPassword").hide();}else{Ext.getCmp("proxyHost").show();Ext.getCmp("proxyPort").show();Ext.getCmp("isAuthentication").show();}}}});
function validateIpWithMsg(h){var p=h;var a=0;var f="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";var b=false;var r=false;if(p.indexOf(":")>-1){b=true;}if(b){r=checkIPv6(p);return r;}else{for(var c=0;c<p.length;c++){check_char=f.indexOf(p.charAt(c));if(check_char>=0){return _checkAlpha;}}for(var g=0;
g<p.length;g++){if(p.charAt(g)=="."&&p.charAt(g+1)=="."){return _checkIp;}else{continue;}}for(var o=0;o<p.length;o++){if(p.charAt(o)=="."){a=a+1;}else{continue;}}if(a!=3){return _valIp;}if(p.charAt(0)=="."||p.charAt(p.length-1)=="."){return _validateIp;}for(var n=0;n<p.length;n++){if(p.charAt(n)==" "){return _checkSpaceIp;
}}var q="`~!@#$%^&*()-_+={}[]|\\:;\"'<>,?/";for(var g=0;g<p.length;g++){check_char=q.indexOf(p.charAt(g));if(check_char!=-1){return _checkspecial;}}if(p.indexOf(".")>-1&&a>2){var e=p.split(".");for(var d=0;d<e.length;d++){if(e[d]<0||e[d]>255){return _checknum;}}}return"";}}function checkIPv6(c){if(!checkspecialnomess(c,"`~!@#%^&*()+={}[]|\\;\"'<>,?")){return _checkspecial;
}if(!checkspace(c)){return false;}var k=/[\.]{2,}/;var h=/(^(\.){1,})|((\.){1,}$)/gi;var f=/(\.\:){1,}|(\:\.){1,}/;if(c.match(k)!=null||c.match(f)!=null){return _checkIpv6;}if(c.match(h)!=null){return _validateIp;}var v=/[\:]{2,}/g;var r=c.match(v);if(r!=null&&r!="::"){return _doubleColon;}var o=c.split(":");
var s=o.length;s--;var m,g;g=c;if(o.length<=7&&c.indexOf(".")!=-1){var j=c.split(".");var e=j.length;e--;m=c.substring((c.lastIndexOf(":")+1));g=c.substring(0,(c.lastIndexOf(":")));var b=/[0-9]{1,3}(\.){1}[0-9]{1,3}(\.){1}[0-9]{1,3}(\.){1}[0-9]{1,3}((\/){1}[0-9]{1,3})*$/gi;regIp4Res=c.match(b);if(regIp4Res==null||regIp4Res!=m){return _valiIp;
}if(g.indexOf(".")!=-1){return _checkIp;}if((e>3)||(e!=3)){return _valIp;}var a=m.split("/");m=a[0];var u=m.split(".");for(var t=0;t<u.length;t++){if(u[t]<0||u[t]>255){return _checknum;}}}else{if(s>7){return _grpIpv6;}}var a=g.split("/");g=a[0];var p="";var w=/^(([a-z0-9(::)]{0,4}(\:){1,2}[a-z0-9]{0,4}){1}((\:){1,2}[a-z0-9]{0,4}){1,})|(([a-z0-9(::)]{0,4}(\:){1,2}[a-z0-9]{0,4}){1})$/gi;
var q=g.match(w);w=/^[a-f0-9]{0,4}$/gi;if(g.indexOf(":")==-1){p=g.match(w);}if(((q==null)||(q!=g))&&(p!=g)){return _digitIpv6;}var n=/(::){0,1}([a-f0-9(::)(\.)]*[\:]{1})+[a-f(::)(\.)0-9]*((\/){0,1}[0-9]{1,3})*/ig;var d=c.match(n);if(d==null||d!=c){return _validateIpv6;}return"";}function checkDecimalExtJs(b){var a="";
if(typeof(b)=="object"){a=b.value;}else{a=b;}if(a.indexOf(".")>-1){return _checkfordecimal;}return"";}