var pass,confPass;Ext.define("UserProfile.view.MonitorSettings",{extend:"Ext.panel.Panel",alias:"widget.monitorsettings",id:"monitorsettings",requires:["Ext.ux.form.MultiSelect","Ext.ux.form.ItemSelector","UserProfile.view.toggleButton","UserProfile.view.SecuritySettings"],layout:"column",columnWidth:1,initComponent:function(){this.buttonAlign="center";
this.callParent();},items:[{xtype:"panel",columnWidth:0.42,cls:"userProfileOuter",bodyPadding:10,height:210,margin:"5 10 5 10",layout:"column",hidden:hideUserSettings,items:[{xtype:"container",margin:"0 0 0 10",columnWidth:0.6,defaults:{anchor:"90%"},layout:"anchor",items:[{xtype:"fieldset",columnWidth:1,title:setMonHomeTitle,id:"monHomeField",collapsible:false,style:{"box-shadow":"none","background":"none"},margin:"0 0 0 0",defaults:{anchor:"100%"},layout:"anchor",items:[{xtype:"radiogroup",column:2,labelAlign:"left",id:"userProf_monitorHomeOpt",name:"userProf_monitorHomeOpt",items:[{boxLabel:defaultTitle,name:"selectedMonHomeOpt",inputValue:"default",cls:"radiobt",width:80,},{boxLabel:domDashbTitle,name:"selectedMonHomeOpt",inputValue:"dynamic",cls:"radiobt",width:150,}]},{xtype:"scrollcombo",labelAlign:"top",labelSeparator:"",margin:"0 0 0 0",cls:"dropdown24",id:"monhomepage",forceSelection:false,editable:false,name:"monhomepage",vertical:true,hidden:(!hasMonitorTab),store:Ext.data.Store({fields:["displayField","valueField"],data:[]}),displayField:"displayField",valueField:"valueField",queryMode:"local",listeners:{"afterrender":function(a){a.previousSelectedOption=a.getValue();
}}}]},{xtype:"container",layout:{type:"hbox",align:"stretch"},defaults:{margin:"12 10 10 2",},items:[{xtype:"slider",fieldLabel:'<span class="font_bold"> '+refFreqTitle+' </span><span><div id="refquency" style="display: inline ; float:right ; font-size:12px"></div></span>',labelSeparator:"",labelAlign:"top",animate:false,minValue:30,id:"frequency",name:"frequency",value:20,useTips:false,maxValue:300,width:200,plugins:["fillslider"],listeners:{change:function(a,b,d,c){Ext.get("refquency").update(d.value+" Secs");
}}}]}]},{xtype:"container",layout:"vbox",columnWidth:0.4,items:[{xtype:"container",layout:{type:"hbox"},items:[{html:timeZoneTitle},{xtype:"checkbox",cls:"checkbt",id:"defaulttimeZone",name:"defaulttimeZone",labelSeparator:"",labelAlign:"top",margin:"0 0 4 40",width:60,boxLabel:defaultTitle}]},{xtype:"scrollcombo",id:"timeZone",name:"timeZone",labelSeparator:"",labelAlign:"top",margin:"0 0 0 0",width:170,editable:true,fieldLabel:"",store:new Ext.data.Store({fields:["displayField","valueField"],data:[]}),displayField:"displayField",valueField:"valueField",queryMode:"local",disabled:false},{xtype:"scrollcombo",id:"userDateFormat",name:"userDateFormat",labelSeparator:"",labelAlign:"top",margin:"15 0 0 0",width:170,editable:false,fieldLabel:dateFromatTitle,store:new Ext.data.Store({fields:["displayField","valueField"],data:[]}),displayField:"displayField",valueField:"valueField",queryMode:"local",disabled:false},{xtype:"combo",cls:"dropdown24 flag",width:170,margin:"10 0 0 0",typeAhead:false,labelAlign:"top",fieldLabel:'<span class="font_bold"> '+langTitle+"</span>",id:"language",name:"language",labelSeparator:"",displayField:"displayField",valueField:"valueField",queryMode:"local",store:new Ext.data.Store({fields:["displayField","valueField"],data:[]}),displayTpl:Ext.create("Ext.XTemplate",['<tpl for=".">',"<div>",'<img src="/final/images/flag/{valueField}.png" align="top" />','<span>{displayField} <input type="text" id="flagID" style="display:none" value={valueField} /><span>',"</div>","</tpl>"]),listConfig:{getInnerTpl:function(){return"<div >"+'<img src="/final/images/flag/{valueField}.png" align="top"  />'+"<span>{displayField}<span>"+"</div>";
}},fieldSubTpl:['<div class="{hiddenDataCls}" role="presentation"></div>','<li id="{id}" type="{type}" ','<tpl if="size">size="{size}" </tpl>','<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>','<div class="{fieldCls} {typeCls}" autocomplete="off"></div>','<div class="{clearCls}" role="presentation"></div>',"</li>",{compiled:true,disableFormats:true}],setRawValue:function(b){var a=this;
b=Ext.value(b,"");a.rawValue=b;if(a.inputEl){a.inputEl.dom.innerHTML=b;}return b;}}]}]},{xtype:"panel",columnWidth:0.58,margin:"5 10 10 0",bodyPadding:20,height:210,cls:"userProfileOuter",id:"skin_id",layout:{align:"stretch",type:"vbox",pack:"start"},hidden:hideThemes,items:[{xtype:"label",html:'<span class="font_bold">'+themeTitle+"</span>",style:{"font-size":"14px",}},{xtype:"container",margin:"10 0 0 0",layout:"column",defaults:{columnWidth:0.24,},items:[{xtype:"container",items:[{xtype:"label",text:adminLogo,margin:"0 0 10 0",id:"textadmin"},{xtype:"container",cls:"skinAdminDark",margin:"10px 0px 8px 0px",id:"skinadminimage"},{xtype:"container",margin:"0 0 0 3",layout:{type:"hbox",align:"stretch"},id:"adminskinCon",items:[{border:false,flex:1,style:{},buttons:[{xtype:"tooglebutton",id:"adminskin-themeLight",config:{light:"LIGHT",Dark:"DARK"},chkPress:function(a){var b=Ext.get(a.id).select(".switchMe");
if(!Ext.isEmpty(b)){if(a.pressed==false){b.animate({duration:150,to:{left:a.getWidth()-23}});a.setText(this.getLight());a.setTextAlign("left");$("#skinadminimage").animate({"background-position":"0px 0px"},250,"linear");Ext.getCmp("skinadminimage").removeCls("skinAdminDark");Ext.getCmp("skinadminimage").addCls("skinAdminLight");
}else{b.animate({duration:150,to:{left:0}});a.setText(this.getDark());a.setTextAlign("right");$("#skinadminimage").animate({backgroundPosition:"-120px 0px"},250,"linear");Ext.getCmp("skinadminimage").removeCls("skinAdminLight");Ext.getCmp("skinadminimage").addCls("skinAdminDark");}}}}]}]}]},{xtype:"container",items:[{xtype:"label",text:monitorLogo,margin:"0 0 10 0",id:"textmonitor"},{xtype:"container",cls:"skinMonitorDark",margin:"10px 0px 8px 0px",id:"skinmonitorimage"},{xtype:"container",margin:"0 0 0 3",layout:{type:"hbox",align:"stretch"},id:"monitorskinCon",items:[{border:false,flex:1,style:{},buttons:[{xtype:"tooglebutton",id:"monitorskin-themeLight",config:{light:"LIGHT",Dark:"DARK"},chkPress:function(a){var b=Ext.get(a.id).select(".switchMe");
if(!Ext.isEmpty(b)){if(a.pressed==false){b.animate({duration:150,to:{left:a.getWidth()-23}});a.setText(this.getLight());a.setTextAlign("left");$("#skinmonitorimage").animate({"background-position":"-240px 0px"},250,"linear");Ext.getCmp("skinmonitorimage").removeCls("skinMonitorDark");Ext.getCmp("skinmonitorimage").addCls("skinMonitorLight");
}else{b.animate({duration:150,to:{left:0}});a.setText(this.getDark());a.setTextAlign("right");$("#skinmonitorimage").animate({"background-position":"-360px 0px"},250,"linear");Ext.getCmp("skinmonitorimage").removeCls("lightTheme");Ext.getCmp("skinmonitorimage").addCls("skinMonitorDark");}}}}]}]}]},{xtype:"container",hidden:hideInSuperManager,items:[{xtype:"label",text:reporterLogo,id:"textreport"},{xtype:"container",cls:"skinReporterDark",id:"skinreportimage",margin:"10px 0px 8px 0px"},{xtype:"container",margin:"0 0 0 3",layout:{type:"hbox",align:"stretch"},id:"reportskinCon",items:[{border:false,flex:1,style:{},buttons:[{xtype:"tooglebutton",id:"reportskin-themeLight",config:{light:"LIGHT",Dark:"DARK"},chkPress:function(a){var b=Ext.get(a.id).select(".switchMe");
if(!Ext.isEmpty(b)){if(a.pressed==false){b.animate({duration:150,to:{left:a.getWidth()-23}});a.setText(this.getLight());a.setTextAlign("left");$("#skinreportimage").animate({"background-position":"-480px 0px"},250,"linear");Ext.getCmp("skinreportimage").removeCls("skinReporterDark");Ext.getCmp("skinreportimage").addCls("skinReporterLight");
}else{b.animate({duration:150,to:{left:0}});a.setText(this.getDark());a.setTextAlign("right");$("#skinreportimage").animate({"background-position":"-600px 0px"},250,"linear");Ext.getCmp("skinreportimage").removeCls("skinReporterLight");Ext.getCmp("skinreportimage").addCls("skinReporterDark");}}}}]}]}]},{xtype:"container",hidden:hideInSuperManager,items:[{xtype:"label",text:configLogo,margin:"0px 0px 10px 0px",id:"textconfig"},{xtype:"container",cls:"skinConfigDark",margin:"10px 0px 8px 0px",id:"skinconfigimage"},{xtype:"container",margin:"0 0 0 3",layout:{type:"hbox",align:"stretch"},id:"configskinCon",items:[{border:false,flex:1,style:{},buttons:[{xtype:"tooglebutton",id:"configskin-themeLight",config:{light:"LIGHT",Dark:"DARK"},chkPress:function(a){var b=Ext.get(a.id).select(".switchMe");
if(!Ext.isEmpty(b)){if(a.pressed==false){b.animate({duration:150,to:{left:a.getWidth()-23}});a.setText(this.getLight());a.setTextAlign("left");$("#skinconfigimage").animate({"background-position":"-720px 0px"},250,"linear");Ext.getCmp("skinconfigimage").removeCls("skinConfigDark");Ext.getCmp("skinconfigimage").addCls("skinConfigLight");
}else{b.animate({duration:150,to:{left:0}});a.setText(this.getDark());a.setTextAlign("right");$("#skinconfigimage").animate({"background-position":"-840px 0px"},250,"linear");Ext.getCmp("skinconfigimage").removeCls("skinConfigLight");Ext.getCmp("skinconfigimage").addCls("skinConfigDark");}}}}]}]}]}]}]},{xtype:"panel",layout:"column",columnWidth:1,margin:"0 10 0 10",bodyPadding:20,cls:"userProfileOuter",id:"admin_monitorcontainer",items:[{xtype:"container",columnWidth:1,style:{"margin-bottom":"10px"},html:'<span class="font_bold12">'+personalLogoLbl+"</span>",},{xtype:"container",columnWidth:0.3,layout:"hbox",hidden:hideLoginPgLogoSettings,items:[{xtype:"scrollcombo",labelAlign:"top",fieldLabel:'<span class="font_bold11">'+loginPageLogo+"</span>",cls:"dropdown",id:"loginpage",name:"loginpage",labelSeparator:"",width:120,displayField:"displayField",valueField:"valueField",queryMode:"local",store:new Ext.data.Store({fields:["displayField","valueField"],data:[]})},{xtype:"button",margin:"20 20 0 10",id:"loginFile",action:"loginFile",padding:"0 0 0 0",cls:"button20",text:"Upload"}]},{xtype:"container",columnWidth:0.5,layout:"hbox",items:[{xtype:"scrollcombo",labelAlign:"top",fieldLabel:'<span class="font_bold11">'+adminMonLbl+"</span>",cls:"dropdown",id:"monitorpage",name:"monitorpage",labelSeparator:"",width:120,displayField:"displayField",valueField:"valueField",queryMode:"local",store:new Ext.data.Store({fields:["displayField","valueField"],data:[]})},{xtype:"button",margin:"21 10 0 10",padding:"0 0 0 0",text:"Upload",cls:"button20",id:"monitorFile",action:"monitorFile"},{xtype:"container",width:150,columnWidth:0.3,id:"apply_container",layout:"hbox",margin:"20 10 0 10",hidden:hideInSuperManager,items:[{xtype:"checkbox",labelSeparator:"",id:"apply",name:"apply",cls:"checkbt",handler:function(){var a=Ext.getCmp("apply");
if(a.checked==true){Ext.getCmp("reporter_container").hide();}else{if(publicJsonData["hasReporterTab"]==true){Ext.getCmp("reporterContainer").show();}if(publicJsonData["hasConfigTab"]==true){Ext.getCmp("configContainer").show();}}}},{xtype:"label",text:applyModLbl,id:"applytoother",width:160,margin:0}]}]},{xtype:"container",layout:"column",columnWidth:1,id:"reporter_container",items:[{columnWidth:0.3,margin:"10 10 0 0",xtype:"container",id:"reporterContainer",items:[{xtype:"scrollcombo",labelAlign:"top",fieldLabel:"Reporter",cls:"dropdown fontnormal_css",id:"reporter",name:"reporter",width:120,labelSeparator:"",style:{"float":"left"},displayField:"displayField",valueField:"valueField",queryMode:"local",store:new Ext.data.Store({fields:["displayField","valueField"],data:[]})},{xtype:"button",margin:"21 10 0 10",id:"reportFile",action:"reportFile",cls:"button20",text:"Upload"}]},{columnWidth:0.5,margin:"10 10 0 0",xtype:"container",id:"configContainer",items:[{xtype:"scrollcombo",labelAlign:"top",fieldLabel:"Configuration",cls:"dropdown fontnormal_css",id:"configuration",name:"configuration",style:{"float":"left",},labelSeparator:"",width:120,displayField:"displayField",valueField:"valueField",queryMode:"local",store:new Ext.data.Store({fields:["displayField","valueField"],data:[]})},{xtype:"button",margin:"21 10 0 10",cls:"button20",text:"Upload",id:"configFile",action:"configFile"}]}]}]},{xtype:"securitysettings"},{xtype:"panel",id:"proxyDetails",name:"proxyDetails",layout:"column",columnWidth:1,bodyPadding:20,margin:"10 10 0 10",cls:"userProfileOuter",defaults:{labelSeparator:"",margin:"10 0 10 0",width:870,labelWidth:620,},items:[{xtype:"label",html:'<span class="font_bold12">'+proxyDetailsTitle+"</span>",},{xtype:"radiogroup",columns:2,vertical:true,style:{"white-space":"nowrap"},id:"useProxy",name:"useProxy",fieldLabel:useProxyLabel+"?",items:[{boxLabel:"Yes",name:"useProxy",id:"useProxyYes",inputValue:"yes",cls:"radiobt fontnormal_css",listeners:{change:function(){var a=Ext.getCmp("useProxyYes").getGroupValue();
if(!Ext.isEmpty(a)&&a=="yes"){if(!publicJsonData.isSuperOrg){if(publicJsonData.isProxySet){thisCtrl.setDefaultProxyData();}else{thisCtrl.setParentProxyData();}}else{if(publicJsonData.isProxySet){thisCtrl.setDefaultProxyData();}else{Ext.getCmp("useParentProxyNo").setValue(true);Ext.getCmp("useParentProxy").hide();
Ext.getCmp("proxyHost").show();Ext.getCmp("proxyPort").show();Ext.getCmp("isAuthentication").show();}}}else{Ext.getCmp("useParentProxyNo").setValue(true);Ext.getCmp("useParentProxy").hide();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();}}}},{boxLabel:"No",name:"useProxy",id:"useProxyNo",checked:true,cls:"radiobt fontnormal_css",inputValue:"no"}]},{xtype:"radiogroup",columns:2,vertical:true,style:{"white-space":"nowrap"},id:"useParentProxy",name:"useParentProxy",fieldLabel:useParentOrgProxyLabel+"?",hidden:true,items:[{boxLabel:"Yes",name:"useParentProxy",id:"useParentProxyYes",inputValue:"yes",cls:"radiobt fontnormal_css",listeners:{change:function(){var a=Ext.getCmp("useParentProxyYes").getGroupValue();
if(!Ext.isEmpty(a)&&a=="yes"){if(publicJsonData.isProxySet&&publicJsonData.useParentProxy){thisCtrl.setDefaultProxyData();}else{thisCtrl.setParentProxyData();}}else{Ext.getCmp("noProxy").hide();if(publicJsonData.isProxySet&&!publicJsonData.useParentProxy){thisCtrl.setDefaultProxyDataAlone();}else{Ext.getCmp("proxyHost").setValue("");
Ext.getCmp("proxyPort").setValue("");Ext.getCmp("isAuthenticationNo").setValue(true);Ext.getCmp("proxyUsername").setValue("");Ext.getCmp("proxyPassword").setValue("");Ext.getCmp("proxyCnfPassword").setValue("");Ext.getCmp("proxyHost").show();Ext.getCmp("proxyPort").show();Ext.getCmp("isAuthentication").show();
Ext.getCmp("proxyUsername").hide();Ext.getCmp("proxyPassword").hide();Ext.getCmp("proxyCnfPassword").hide();}Ext.getCmp("proxyHost").setDisabled(false);Ext.getCmp("proxyPort").setDisabled(false);Ext.getCmp("isAuthentication").setDisabled(false);Ext.getCmp("proxyUsername").setDisabled(false);Ext.getCmp("proxyPassword").setDisabled(false);
Ext.getCmp("proxyCnfPassword").setDisabled(false);}}}},{boxLabel:"No",name:"useParentProxy",id:"useParentProxyNo",inputValue:"no",cls:"radiobt fontnormal_css"}]},{xtype:"label",id:"noProxy",name:"noProxy",hidden:true,margin:"10 0 20 0",html:"*Currently proxy server is not enabled for your Organization/Organizational unit"},{xtype:"textfield",id:"proxyHost",name:"proxyHost",cls:"textbox",fieldLabel:proxyHostLabel,hidden:true},{xtype:"textfield",id:"proxyPort",name:"proxyPort",cls:"textbox",fieldLabel:proxyPortLabel,hidden:true},{xtype:"radiogroup",columns:2,vertical:true,id:"isAuthentication",name:"isAuthentication",style:{"white-space":"nowrap"},fieldLabel:isAuthLabel+"?",hidden:true,items:[{boxLabel:"Yes",name:"isAuthentication",id:"isAuthenticationYes",inputValue:"yes",cls:"radiobt fontnormal_css",listeners:{change:function(){var a=Ext.getCmp("isAuthenticationYes").getGroupValue();
if(!Ext.isEmpty(a)&&a=="yes"){Ext.getCmp("proxyUsername").show();Ext.getCmp("proxyPassword").show();Ext.getCmp("proxyCnfPassword").show();}else{Ext.getCmp("proxyUsername").hide();Ext.getCmp("proxyPassword").hide();Ext.getCmp("proxyCnfPassword").hide();}}}},{boxLabel:"No",name:"isAuthentication",id:"isAuthenticationNo",checked:true,cls:"radiobt fontnormal_css",inputValue:"no"}]},{xtype:"textfield",id:"proxyUsername",name:"proxyUsername",cls:"textbox",fieldLabel:proxyUnameLabel,hidden:true},{xtype:"textfield",id:"proxyPassword",name:"proxyPassword",cls:"textbox",fieldLabel:proxyPwdLabel,inputType:"password",hidden:true,listeners:{blur:function(){var a=Ext.getCmp("proxyPassword");
if(a.getValue()!==undefined||a.getValue()!=""){a.setValue(pass);}},focus:function(){Ext.getCmp("proxyPassword").setValue("");},change:function(){var a=Ext.getCmp("proxyPassword").getValue();if(!Ext.isEmpty(a)){pass=a;}}}},{xtype:"textfield",id:"proxyCnfPassword",name:"proxyCnfPassword",cls:"textbox",fieldLabel:proxyCnfPwdLabel,inputType:"password",hidden:true,margin:"10 0 15 0",listeners:{blur:function(){var a=Ext.getCmp("proxyCnfPassword");
if(a.getValue()!==undefined||a.getValue()!=""){a.setValue(confPass);}},focus:function(){Ext.getCmp("proxyCnfPassword").setValue("");},change:function(){var a=Ext.getCmp("proxyCnfPassword").getValue();if(!Ext.isEmpty(a)){confPass=a;}}}},{xtype:"label",id:"notestext",name:"notestext",html:"* <i>"+notestext1+" "+notestext2+"</i>"}]}],buttons:[{xtype:"button",action:"save",text:savLbl,cls:"button20",id:"save",name:"save",margin:"0px 0px 25px 0px"},{xtype:"container",width:10,margin:"0 5 0 0",cls:"userProfileSeparator",padding:0,height:"auto"},{xtype:"button",action:"daily_mail",text:configDMLbl,cls:"button20",id:"daily_mail",name:"daily_mail",margin:"0px 0px 25px 0px"},{xtype:"button",action:"mailFilter",text:"Mail/SMS Filters",cls:"button20",id:"mailFilterBtn",name:"mailFilterBtn",hidden:true,margin:"0px 0px 25px 10px"}],loadmonitorData:function(){if(publicJsonData["reportOptions1"]==null){Ext.getCmp("adminskin-themeLight").setText("Light");
Ext.getCmp("adminskin-themeLight").setTextAlign("left");Ext.get("adminskin-themeLight").select(".switchMe").animate({duration:150,to:{left:Ext.get("adminskin-themeLight").getWidth()-23}});$("#skinadminimage").animate({"background-position":"0px 0px"},250,"linear");Ext.getCmp("skinadminimage").disable();
Ext.getCmp("adminskin-themeLight").disable();}else{if(publicJsonData["userAdminSkin"]=="Light"){Ext.getCmp("adminskin-themeLight").setText("Light");Ext.getCmp("adminskin-themeLight").setTextAlign("left");Ext.get("adminskin-themeLight").select(".switchMe").animate({duration:150,to:{left:Ext.get("adminskin-themeLight").getWidth()-23}});
$("#skinadminimage").animate({"background-position":"0px 0px"},250,"linear");}else{Ext.getCmp("adminskin-themeLight").setText("Dark");Ext.getCmp("adminskin-themeLight").setTextAlign("right");Ext.get("adminskin-themeLight").select(".switchMe").animate({duration:150,to:{left:0}});$("#skinadminimage").animate({backgroundPosition:"-120px 0px"},250,"linear");
Ext.getCmp("adminskin-themeLight").toggle(true);}}if(publicJsonData["reportOptions2"]==null){Ext.getCmp("monitorskin-themeLight").setText("Light");Ext.getCmp("monitorskin-themeLight").setTextAlign("left");Ext.get("monitorskin-themeLight").select(".switchMe").animate({duration:150,to:{left:Ext.get("monitorskin-themeLight").getWidth()-23}});
$("#skinmonitorimage").animate({"background-position":"-240px 0px"},250,"linear");Ext.getCmp("skinmonitorimage").disable();Ext.getCmp("monitorskin-themeLight").disable();}else{if(publicJsonData["userMonitorSkin"]=="Light"){Ext.getCmp("monitorskin-themeLight").setText("Light");Ext.getCmp("monitorskin-themeLight").setTextAlign("left");
Ext.get("monitorskin-themeLight").select(".switchMe").animate({duration:150,to:{left:Ext.get("monitorskin-themeLight").getWidth()-23}});$("#skinmonitorimage").animate({"background-position":"-240px 0px"},250,"linear");}else{Ext.getCmp("monitorskin-themeLight").setText("Dark");Ext.getCmp("monitorskin-themeLight").setTextAlign("right");
Ext.get("monitorskin-themeLight").select(".switchMe").animate({duration:150,to:{left:0}});$("#skinmonitorimage").animate({"background-position":"-360px 0px"},250,"linear");Ext.getCmp("monitorskin-themeLight").toggle(true);}}if(publicJsonData["reportOptions3"]==null){Ext.getCmp("reportskin-themeLight").setText("Light");
Ext.getCmp("reportskin-themeLight").setTextAlign("left");Ext.get("reportskin-themeLight").select(".switchMe").animate({duration:150,to:{left:Ext.get("reportskin-themeLight").getWidth()-23}});Ext.getCmp("skinreportimage").disable();Ext.getCmp("reportskin-themeLight").disable();}else{if(publicJsonData["userReporterSkin"]=="Light"){Ext.getCmp("reportskin-themeLight").setText("Light");
Ext.getCmp("reportskin-themeLight").setTextAlign("left");Ext.get("reportskin-themeLight").select(".switchMe").animate({duration:150,to:{left:Ext.get("reportskin-themeLight").getWidth()-23}});$("#skinreportimage").animate({"background-position":"-480px 0px"},250,"linear");}else{Ext.getCmp("reportskin-themeLight").setText("Dark");
Ext.getCmp("reportskin-themeLight").setTextAlign("right");Ext.get("reportskin-themeLight").select(".switchMe").animate({duration:150,to:{left:0}});$("#skinreportimage").animate({"background-position":"-600px 0px"},250,"linear");Ext.getCmp("reportskin-themeLight").toggle(true);}}if(publicJsonData["reportOptions4"]==null){Ext.getCmp("skinconfigimage").disable();
Ext.getCmp("configskin-themeLight").setText("Light");Ext.getCmp("configskin-themeLight").setTextAlign("left");Ext.get("configskin-themeLight").select(".switchMe").animate({duration:150,to:{left:Ext.get("configskin-themeLight").getWidth()-23}});Ext.getCmp("configskin-themeLight").disable();}else{if(publicJsonData["userConfigSkin"]=="Light"){Ext.getCmp("configskin-themeLight").setText("Light");
Ext.getCmp("configskin-themeLight").setTextAlign("left");Ext.get("configskin-themeLight").select(".switchMe").animate({duration:150,to:{left:Ext.get("configskin-themeLight").getWidth()-23}});$("#skinconfigimage").animate({"background-position":"-720px 0px"},250,"linear");}else{Ext.getCmp("configskin-themeLight").setText("Dark");
Ext.getCmp("configskin-themeLight").setTextAlign("right");Ext.get("configskin-themeLight").select(".switchMe").animate({duration:150,to:{left:0}});$("#skinconfigimage").animate({"background-position":"-840px 0px"},250,"linear");Ext.getCmp("configskin-themeLight").toggle(true);}}var m=publicJsonData["disableSkinAndLogoSettings"];
var v=false;if(m!=null&&(m==true||m=="true")){v=true;}if(v==true){var a=Ext.getCmp("skinadminimage");if(!Ext.isEmpty(a)){a.disable();}var E=Ext.getCmp("adminskin-themeLight");if(!Ext.isEmpty(E)){E.disable();}var q=Ext.getCmp("skinmonitorimage");if(!Ext.isEmpty(q)){q.disable();}var G=Ext.getCmp("monitorskin-themeLight");
if(!Ext.isEmpty(G)){G.disable();}var x=Ext.getCmp("skinreportimage");if(!Ext.isEmpty(x)){x.disable();}var b=Ext.getCmp("reportskin-themeLight");if(!Ext.isEmpty(b)){b.disable();}var I=Ext.getCmp("skinconfigimage");if(!Ext.isEmpty(I)){I.disable();}var D=Ext.getCmp("configskin-themeLight");if(!Ext.isEmpty(D)){D.disable();
}}var g=publicJsonData["disableLogoSettings"];var F=false;if(g!=null&&(g==true||g=="true")){F=true;}var o=Ext.getCmp("loginpage");if(F==true||v==true){if(!Ext.isEmpty(o)){o.disable();}}o.getStore().loadRawData(publicJsonData["reportOptions5"]);var J=publicJsonData["loginChk"];if(J=="d"){o.setValue("Default");
}else{o.setValue("Custom");}if(publicJsonData["disableLogoforOtherModule"]==true){Ext.getCmp("apply_container").hide();}o.setEditable(false);var z=Ext.getCmp("monitorpage");if(publicJsonData["hasAdminTab"]==true||publicJsonData["hasMonitorTab"]==true){if(publicJsonData["hasAdminTab"]=="false"||publicJsonData["hasAdminTab"]==false){z.setFieldLabel('<span class="font_bold11">'+monitorLogo+"</span>");
}else{if(publicJsonData["hasMonitorTab"]=="false"||publicJsonData["hasMonitorTab"]==false){z.setFieldLabel('<span class="font_bold11">'+adminLogo+"</span>");}}z.getStore().loadRawData(publicJsonData["reportOptions6"]);var A=publicJsonData["monLo"];if(A=="d"){z.setValue("Default");}else{z.setValue("Custom");
}z.setEditable(false);}else{z.hide();Ext.getCmp("apply_container").hide();if(publicJsonData["hasReporterTab"]==true){Ext.getCmp("reporterContainer").show();}if(publicJsonData["hasConfigTab"]==true){Ext.getCmp("configContainer").show();}}if(F==true||v==true){if(!Ext.isEmpty(z)){z.disable();}var R=Ext.getCmp("monitorFile");
if(!Ext.isEmpty(R)){R.disable();}}var W=Ext.getCmp("reporter");if(publicJsonData["hasReporterTab"]==true){W.getStore().loadRawData(publicJsonData["reporterOptions"]);var Z=publicJsonData["reportLo"];if(Z=="d"){W.setValue("Default");}else{W.setValue("Custom");}W.setEditable(false);}else{W.hide();Ext.getCmp("reportFile").hide();
}if(F==true||v==true){if(!Ext.isEmpty(W)){W.disable();}var u=Ext.getCmp("reportFile");if(!Ext.isEmpty(u)){u.disable();}var T=Ext.getCmp("apply_container");if(!Ext.isEmpty(T)){T.disable();T.hide();}}var L=Ext.getCmp("configuration");if(publicJsonData["hasConfigTab"]==true){L.getStore().loadRawData(publicJsonData["configOptions"]);
var i=publicJsonData["configLo"];if(i=="d"){L.setValue("Default");}else{L.setValue("Custom");}L.setEditable(false);}else{L.hide();Ext.getCmp("configFile").hide();}if(F==true||v==true){if(!Ext.isEmpty(L)){L.disable();}var ab=Ext.getCmp("configFile");if(!Ext.isEmpty(ab)){ab.disable();}}var Q=Ext.getCmp("language");
Q.getStore().loadRawData(publicJsonData["reportOptions7"]);Q.setValue(publicJsonData["userLanguage"]);Q.setEditable(false);var k=Ext.getCmp("monhomepage");var M=publicJsonData["monitorHomePageSelection"];var N=Ext.getCmp("userProf_monitorHomeOpt");if(!Ext.isEmpty(N)){N.suspendEvents(false);N.setValue({selectedMonHomeOpt:M});
N.resumeEvents();N.on("change",function(){var ac=N.getChecked();var e=ac[0].inputValue;if(e!=null&&e=="dynamic"){k.getStore().removeAll();k.getStore().loadRawData(publicJsonData["monitoringDomains"]);k.setValue(publicJsonData["selectedMonitorDomain"]);k.previousSelectedOption=publicJsonData["selectedMonitorDomain"];
}else{k.getStore().removeAll();k.getStore().loadRawData(publicJsonData["monhomearray"]);k.setValue(publicJsonData["monHomePage"]);k.previousSelectedOption="";}});}var d=publicJsonData["selectedMonitorDomain"];if(M!=null&&M=="dynamic"){k.getStore().removeAll();k.getStore().loadRawData(publicJsonData["monitoringDomains"]);
k.setValue(publicJsonData["selectedMonitorDomain"]);k.previousSelectedOption=publicJsonData["selectedMonitorDomain"];}else{k.getStore().removeAll();k.getStore().loadRawData(publicJsonData["monhomearray"]);k.setValue(publicJsonData["monHomePage"]);k.previousSelectedOption="";}try{if(!Ext.isEmpty(publicJsonData.isonlyVM)&&(publicJsonData.isonlyVM=="true"||publicJsonData.isonlyVM==true)){Ext.getCmp("monHomeField").hide();
}}catch(U){}var y=publicJsonData["logoCheck"];if(y=="difference"){Ext.getCmp("apply").setValue(false);}else{Ext.getCmp("apply").setValue(true);}var Y=publicJsonData["refreshFreq"];var l=Ext.getCmp("frequency");l.reset();l.setValue(Y);if(hasMonitorTab==false){k.hide();l.hide();}var w=Ext.getCmp("timeZone");
w.getStore().loadRawData(publicJsonData["timeZone"]);w.setValue(publicJsonData["selectedTimeZone"]);var X=Ext.getCmp("userDateFormat");X.getStore().loadRawData(publicJsonData["userDateFormat"]);X.setValue(publicJsonData["selectedDateFormat"]);var S=publicJsonData.MonitorScreensForTvMode;var C=publicJsonData.ListOfScreens;
var P=publicJsonData.isAdminEnabled2FA;var t=publicJsonData.isUsrEnabled2FA;var f=publicJsonData.tfaUserOTPMode;var h=publicJsonData.disable2FAFlag;var B=publicJsonData.disable2FAOTPOptionFlag;if(!Ext.isEmpty(P)&&(P.toLowerCase()=="true"||P.toLowerCase()=="yes")){Ext.getCmp("securitysettings").show();
if(!Ext.isEmpty(h)&&h.toLowerCase()=="yes"){Ext.getCmp("is2FAEnabled").setDisabled(true);Ext.getCmp("enable2FAYesFlag").setValue(true);}else{Ext.getCmp("is2FAEnabled").setDisabled(false);if(!Ext.isEmpty(t)&&(t.toLowerCase()=="true"||t.toLowerCase()=="yes")){Ext.getCmp("enable2FAYesFlag").setValue(true);
}else{Ext.getCmp("enable2FAYesFlag").setValue(false);}}var r=Ext.getCmp("enable2FAYesFlag").getGroupValue();if(!Ext.isEmpty(r)&&r.toLowerCase()=="yes"){Ext.getCmp("twoFAOTPMode").show();if(!Ext.isEmpty(h)&&h.toLowerCase()=="yes"&&!Ext.isEmpty(B)&&B.toLowerCase()=="yes"){Ext.getCmp("twoFAOTPMode").setDisabled(true);
}else{Ext.getCmp("twoFAOTPMode").setDisabled(false);}if(!Ext.isEmpty(f)&&f.toLowerCase()=="mail"){Ext.getCmp("mail").setValue(true);}else{if(!Ext.isEmpty(f)&&f.toLowerCase()=="sms"){Ext.getCmp("sms").setValue(true);}else{if(!Ext.isEmpty(f)&&f.toLowerCase()=="ga"){Ext.getCmp("ga").setValue(true);}}}}else{Ext.getCmp("twoFAOTPMode").hide();
}}else{Ext.getCmp("securitysettings").hide();Ext.getCmp("enable2FAYesFlag").setValue(false);}var V=publicJsonData.cloudModel;var j=publicJsonData.isSuperOrg;if(!Ext.isEmpty(V)&&V.toLowerCase()=="phoenix"&&j){Ext.getCmp("proxyDetails").show();var n=publicJsonData.useProxy;if(!Ext.isEmpty(n)&&n.toLowerCase()=="y"){Ext.getCmp("useProxyYes").setValue(true);
var H=publicJsonData.proxyHost;var s=publicJsonData.proxyPort;Ext.getCmp("proxyHost").setValue(H);Ext.getCmp("proxyPort").setValue(s);var K=publicJsonData.setAuthentication;if(!Ext.isEmpty(K)&&K.toLowerCase()=="y"){Ext.getCmp("isAuthenticationYes").setValue(true);var c=publicJsonData.proxyUsername;var aa=publicJsonData.proxyPassword;
pass=aa;confPass=aa;Ext.getCmp("proxyUsername").setValue(c);Ext.getCmp("proxyPassword").setValue(aa);Ext.getCmp("proxyCnfPassword").setValue(aa);}else{Ext.getCmp("isAuthenticationNo").setValue(true);}}else{Ext.getCmp("useProxyNo").setValue(true);}}else{var p=publicJsonData.isEligibleUser;var O=publicJsonData.superUserNameForProxy;
if(p){Ext.getCmp("proxyDetails").show();if(publicJsonData.isSuperUserSuperOrg){Ext.getCmp("useParentProxy").setFieldLabel(useParentOrgProxyLabel+" ("+O+")?");Ext.getCmp("noProxy").update("<i>"+noproxyForOrg+" ("+O+") "+noproxyPart2+".</i>");}else{Ext.getCmp("useParentProxy").setFieldLabel(useParentOrgUnitProxyLabel+" ("+O+")?");
Ext.getCmp("noProxy").update("<i>"+noproxyForOrgUnit+" ("+O+") "+noproxyPart2+".</i>");}thisCtrl.setDefaultProxyData();}else{Ext.getCmp("proxyDetails").hide();}}}});