Ext.define("UserLogonReports.controller.UserLogonReports",{extend:"Ext.app.Controller",gridColStateParam:"ASC",gridColIndexParam:-1,views:["Main","ErApplication"],refs:[{selector:"main",ref:"main"},{selector:"newUtilities",ref:"newUtilities"},{selector:"usertimeline",ref:"usertimeline"},{selector:"thinclientuserform",ref:"thinclientuserform"},{selector:"egcomponent",ref:"egcomponent"},{selector:"mainform",ref:"mainform"},{selector:"thinclientusersettings",ref:"thinclientusersettings"},{selector:"reporterdata",ref:"reporterdata"},{selector:"emptypanel",ref:"emptypanel"},{selector:"resultpanel",ref:"resultpanel"},{selector:"nomeasurepanel",ref:"nomeasurepanel"},{selector:"backGroundPanel",ref:"backGroundPanel"},{selector:"ReporterSettings",ref:"ReporterSettings"}],init:function(){this.control({"newUtilities":{"afterrender":this.loadTools},"main":{"afterrender":this.afterMainRender,"boxready":this.refreshReportData},"thinclientusersettings":{"afterrender":this.loadSettingsElements},"newUtilities > #printTool > button":{"click":this.printReport},"newUtilities > #saveTool > button":{"click":this.saveReportAsPDF},"newUtilities > #mailTool > button":{"click":this.sendMail},"newUtilities > #csvTool > button":{"click":this.saveCsv},"newUtilities > #favoriteTool > button":{"click":this.saveFavorite},"newUtilities > #scheduleTool > button":{"click":this.saveSchedule},'timeline combo[name="er_mode"]':{"select":this.changeEr_mode},'mainform combo[name="select_farm"]':{"select":this.zoneOnChange},'mainform combo[name="report_category"]':{"select":this.reportCatChange},'mainform combo[name="er_type"]':{"select":this.reportTypeOnChange},'egcomponent multiselectfield[name="er_server"]':{"change":this.serverOnChange},'mainform button[id="expandSelector"]':{"click":this.expandMe},'mainform button[id="er_poolType_expand"]':{"click":this.expandMe},'mainform button[id="expandSelectorUser"]':{"click":this.expandMe2},'geofilter button[id="expandSelectorActivity_geo"]':{"click":this.expandMeGeo},'mainform combo[name="er_compType"]':{"select":this.compTypeOnChange},'mainform combo[name="brokeringFrom"]':{"select":this.brokeringFromChange},'thinclientusersettings combo[name="reportGeneration"]':{"select":this.reportGenChange},'thinclientusersettings button[id="moreOptionCloseId"]':{"click":this.validateAndCloseSettings},'thinclientusersettings button[id="submitViaSetting"]':{"click":this.closeSettingAndSubmit},'mainform button[name="submit"]':{"click":this.showResult},'mainform button[name="save"]':{"click":this.goTo},'mainform trigger[id="compSearch"]':{"change":this.compMultiselect},'erapplication trigger[id="userSearch"]':{"change":this.filterMultiselect},'egdesktoppools trigger[id="er_poolType_Search"]':{"change":this.filterMultiselect},'geofilter trigger[id="compSearch_geo"]':{"change":this.filterMultiselect},'erapplication multiselectfield[name="er_application"]':{"change":this.UserOnChange},'mainform button[id="panelinsidetoggle"]':{"click":this.toggleForm},'main button[id="bckButton_1"]':{"click":this.backFun},'thinclientuserform combo[id="er_option"]':{"select":this.onSelectAnalysisBy},"thinclientuserform radiogroup[id=er_showDeliveryGroup]":{"change":this.showDeliveryGroup},});
},showDeliveryGroup:function(b){var c=b.getValue().deliveryGroupValue;var a="";if(c=="Yes"){Ext.getCmp("optionmultipane").hide();Ext.getCmp("er_poolType_container").show();}else{Ext.getCmp("optionmultipane").show();Ext.getCmp("er_poolType_container").hide();}},onSelectAnalysisBy:function(d){var e="";
var a=Ext.getCmp("report_category").getValue();var c="";initLdgMask.show();this.updateQStringActivity();e=appConstants.queryStringActivity;c="/final/reporter/ErUserLogonDetailsReportJson.jsp";e+="&onAnalysisChange=true";var b=this;Ext.Ajax.request({url:c,params:e,method:"POST",success:function(f){var g=Ext.decode(f.responseText);
if(!Ext.isEmpty(g)){b.fillFormFieldsForActivity(g);}if(Ext.getCmp("er_option").getValue()=="Component"){Ext.getCmp("select_farm").hide();}else{Ext.getCmp("select_farm").show();}Ext.getCmp("resultPanel").hide();if(g.isVm!=undefined&&g.isVm=="true"){if(g.enableBrokering!=undefined&&g.enableBrokering=="yes"){if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").show();
var h=g.enableBrokeringFor;Ext.getCmp("brokeringFrom").setValue(h);}}else{if(g.enableBrokering!=undefined&&g.enableBrokering=="No"){if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").hide();var h=g.enableBrokeringFor;Ext.getCmp("brokeringFrom").setValue(h);}}else{var h=g.enableBrokeringFor;
if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").setValue(h);}}}}else{if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").hide();}}if(g.selectedCompType=="Horizon_Pod"||g.selectedCompType=="VMware_View_server"){Ext.getCmp("brokeringFrom").hide();Ext.getCmp("er_priority").hide();
Ext.getCmp("optionmultipane").hide();Ext.getCmp("er_poolType_container").show();}else{Ext.getCmp("er_poolType_container").hide();}if(Ext.getCmp("inclReconnect")!=undefined){if(Ext.getCmp("er_compType").getValue()=="Citrix_XcXenApp_server"){Ext.getCmp("inclReconnect").show();}else{Ext.getCmp("inclReconnect").hide();
}}initLdgMask.hide();}});},goTo:function(a){appConstants.formButtonId=a.getId();var b=Ext.getCmp("report_category").getValue();var c=appConstants.publicjsonDataActivity.hiddenfields;if(b=="user_usage"){c=appConstants.publicjsonDataUsage.hiddenfields;}var d=c["fromScheduleModify"];if((d!=null&&d=="Yes")){this.saveSchedule();
}else{this.saveFavorite();}},changeEr_mode:function(d){var a="";var c="";var b=Ext.getCmp("report_category").getValue();a=appConstants.publicjsonDataActivity["hiddenfields"]["favorite_id"];c=appConstants.publicjsonDataActivity["hiddenfields"]["fromScheduleModify"];if(!(a=="undefined"||a==undefined)||!(c==null||c=="null")){return;
}Ext.get("configMod").animate({duration:250,to:{y:-530}});this.submitReport();},filterMultiselect:function(a){if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}a.toggleTriggger();if(a.id=="er_poolType_Search"){appConstants.erUtils.filterComboStore(a,Ext.getCmp("er_poolType"),appConstants.rawDataForPoolType);
}else{if(a.id=="compSearch_geo"){appConstants.erUtils.filterComboStore(a,Ext.getCmp("er_geoFilter"),appConstants.geoFilterCombo);}else{appConstants.erUtils.filterComboStore(a,Ext.getCmp("er_application"),appConstants.rawDataForUsers);}}},compMultiselect:function(a){if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");
}a.toggleTriggger();appConstants.erUtils.filterComboStore(a,Ext.getCmp("er_server"),appConstants.rawDataForComponents);},organizeOnChange:function(){Ext.getCmp("resultPanel").hide();this.disableTools();},brokeringFromChange:function(){initLdgMask.show();Ext.getCmp("resultPanel").hide();var b=Ext.getCmp("mainform").getForm();
var a=Ext.getCmp("brokeringFrom").getValue();var c="/final/reporter/ErUserLogonDetailsReportJson.jsp?select_farm="+b.findField("select_farm").getValue()+"&er_comptype="+b.findField("er_compType").getValue()+"&er_brokeringFrom="+a;this.updateQStringActivity();Ext.Ajax.request({url:c,params:appConstants.queryStringActivity,scope:this,method:"GET",success:function(e){var h=e.responseText;
var g=Ext.decode(h);var k=g.screenLabels;appConstants.publicjsonDataActivity=g;if(b.findField("er_type").getValue()=="No"){comboRawData=g.serverCombo;selectedComboOption=g.selectedServer;comboObject=Ext.getCmp("er_server");appConstants.rawDataForComponents=comboRawData;rawDataForUsers=g.userCombo;appConstants.rawDataForUsers=g.userCombo;
comboObject.setFieldLabel(k["reporter.common.Server"]);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);if(comboRawData[0].valueField!=-1){comboObject.setValue(comboRawData[0].valueField);
}else{comboObject.setValue(comboRawData[1].valueField);}}comboRawData=g.userCombo;appConstants.rawDataForUsers=g.userCombo;selectedComboOption=g.selectedUser;var f=g.disableUserCombo;var j=g.userTextFieldValue;if(f!=undefined&&f=="yes"){appConstants.isExceedUserLimit=true;}else{appConstants.isExceedUserLimit=false;
}if(appConstants.isExceedUserLimit){if(b.findField("er_type").getValue()=="No"){Ext.getCmp("er_user").show();Ext.getCmp("optionmultipane").hide();Ext.getCmp("er_user").setValue(j);}}else{if(b.findField("er_type").getValue()=="No"){appConstants.reportType=false;Ext.getCmp("optionmultipane").show();Ext.getCmp("er_user").hide();
}else{appConstants.reportType=true;Ext.getCmp("optionmultipane").hide();}comboObject=b.findField("er_application");comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);}comboObject.show();
}Ext.getCmp("serverMultiSelectLbl").show();}else{if(!isSettingsEnabled){this.showConfigDropdown();this.fillSettingFieldsForActivity(appConstants.publicjsonDataActivity);}var d=this.getThinclientusersettings().getForm();var i=g.selectedGraphType;comboRawData=g.graphTypeArray;selectedComboOption=g.selectedGraphType;
if(i=="timeline"){comboRawData=g.aggbasedOn;selectedComboOption=g.selectedAgg;comboObject=d.findField("er_perserver");comboObject.setFieldLabel(k["reporter.thin.Aggregate across servers"]);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);
}else{comboObject.setValue(comboRawData[0].valueField);}comboObject.show();comboRawData=g.userCombo;appConstants.rawDataForUsers=g.userCombo;selectedComboOption=g.selectedUser;}else{if(Ext.getCmp("er_perserver")!=undefined){Ext.getCmp("er_perserver").hide();}comboRawData=g.measureCombo;selectedComboOption=g.selectedMeasure;
}}initLdgMask.hide();},failure:function(){initLdgMask.hide();}});},compTypeOnChange:function(){Ext.getCmp("resultPanel").hide();var a=Ext.getCmp("mainform").getForm();var b=a.findField("report_category").getValue();var c="/final/reporter/ErUserLogonDetailsReportJson.jsp?select_farm="+a.findField("select_farm").getValue()+"&er_comptype="+a.findField("er_compType").getValue();
var d=a.findField("er_compType").getValue();if(Ext.getCmp("inclReconnect")!=undefined){if(d=="Citrix_XcXenApp_server"){Ext.getCmp("inclReconnect").show();}else{Ext.getCmp("inclReconnect").hide();}}if(Ext.getCmp("enableDetailedData")!=undefined&&a.findField("er_type").getValue()=="No"){if(d!=undefined&&d=="Citrix_XcXenApp_server"){Ext.getCmp("enableDetailedData").hide();
Ext.getCmp("enableDetailedDataSplitter").hide();}else{Ext.getCmp("enableDetailedData").show();Ext.getCmp("enableDetailedDataSplitter").show();}}this.updateQStringActivity();Ext.Ajax.request({url:c,params:appConstants.queryStringActivity,scope:this,method:"GET",success:function(i){var h=i.responseText;
var l=Ext.decode(h);var k=l.screenLabels;appConstants.publicjsonDataActivity=l;if(a.findField("er_type").getValue()=="No"){comboRawData=l.serverCombo;selectedComboOption=l.selectedServer;comboObject=Ext.getCmp("er_server");appConstants.rawDataForComponents=comboRawData;rawDataForUsers=l.userCombo;appConstants.rawDataForUsers=l.userCombo;
comboObject.setFieldLabel(k["reporter.common.Server"]);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);if(comboRawData[0].valueField!=-1){comboObject.setValue(comboRawData[0].valueField);
}else{comboObject.setValue(comboRawData[1].valueField);}}comboRawData=l.userCombo;appConstants.rawDataForUsers=l.userCombo;selectedComboOption=l.selectedUser;var m=l.disableUserCombo;var e=l.userTextFieldValue;if(m!=undefined&&m=="yes"){appConstants.isExceedUserLimit=true;}else{appConstants.isExceedUserLimit=false;
}comboObject=Ext.getCmp("er_showDeliveryGroup");selectedComboOption=l.selectedShowDeliveryGroup;comboObject.hide();if(selectedComboOption!=undefined){comboObject.show();comboObject.setFieldLabel(k["reporter.common.Show Delivery Groups"]);comboObject=Ext.getCmp("deliveryGroupNo");if(selectedComboOption=="Yes"){comboObject=Ext.getCmp("deliveryGroupYes");
}comboObject.setValue(true);}if(appConstants.isExceedUserLimit){if(a.findField("er_type").getValue()=="No"){Ext.getCmp("er_user").show();Ext.getCmp("optionmultipane").hide();Ext.getCmp("er_user").setValue(e);if(l.selectedCompType=="Horizon_Pod"||l.selectedCompType=="VMware_View_server"){Ext.getCmp("er_user").hide();
Ext.getCmp("er_poolType_container").show();}else{Ext.getCmp("er_poolType_container").hide();}}}else{if(a.findField("er_type").getValue()=="No"){appConstants.reportType=false;Ext.getCmp("optionmultipane").show();Ext.getCmp("er_user").hide();if(l.selectedCompType=="Horizon_Pod"||l.selectedCompType=="VMware_View_server"){Ext.getCmp("optionmultipane").hide();
Ext.getCmp("er_poolType_container").show();}else{Ext.getCmp("er_poolType_container").hide();}}else{appConstants.reportType=true;Ext.getCmp("optionmultipane").hide();}if(l.selectedCompType=="Citrix_XcXenDesktop_Site"||l.selectedCompType=="Citrix_XcXenDesktop_Director"){if(l.selectedShowDeliveryGroup!=undefined&&l.selectedShowDeliveryGroup=="Yes"){Ext.getCmp("optionmultipane").hide();
Ext.getCmp("er_user").hide();Ext.getCmp("er_poolType_container").show();}}comboObject=a.findField("er_application");comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);}comboObject.show();
}Ext.getCmp("serverMultiSelectLbl").show();}else{if(!isSettingsEnabled){this.showConfigDropdown();this.fillSettingFieldsForActivity(appConstants.publicjsonDataActivity);}var f=this.getThinclientusersettings().getForm();var j=l.selectedGraphType;comboRawData=l.graphTypeArray;selectedComboOption=l.selectedGraphType;
if(j=="timeline"){comboRawData=l.aggbasedOn;selectedComboOption=l.selectedAgg;comboObject=f.findField("er_perserver");comboObject.setFieldLabel(k["reporter.thin.Aggregate across servers"]);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);
}else{comboObject.setValue(comboRawData[0].valueField);}comboObject.show();comboRawData=l.userCombo;appConstants.rawDataForUsers=l.userCombo;selectedComboOption=l.selectedUser;}else{if(Ext.getCmp("er_perserver")!=undefined){Ext.getCmp("er_perserver").hide();}comboRawData=l.measureCombo;selectedComboOption=l.selectedMeasure;
}}if(l.isVm!=undefined&&l.isVm=="true"){if(l.enableBrokering!=undefined&&l.enableBrokering=="yes"){if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").show();var g=l.enableBrokeringFor;Ext.getCmp("brokeringFrom").setValue(g);}}else{if(l.enableBrokering!=undefined&&l.enableBrokering=="No"){if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").hide();
var g=l.enableBrokeringFor;Ext.getCmp("brokeringFrom").setValue(g);}}else{var g=l.enableBrokeringFor;if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").setValue(g);}}}}else{if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").hide();}}if(l.selectedCompType=="Horizon_Pod"||l.selectedCompType=="VMware_View_server"){Ext.getCmp("brokeringFrom").hide();
Ext.getCmp("er_priority").hide();Ext.getCmp("optionmultipane").hide();Ext.getCmp("er_poolType_container").show();}else{Ext.getCmp("er_poolType_container").hide();}}});},zoneOnChange:function(){Ext.getCmp("resultPanel").hide();var a=Ext.getCmp("mainform").getForm();var b=a.findField("report_category").getValue();
var c;var d="";if(b=="user_usage"){c="/final/reporter/ErCtxUserReportJson.jsp";this.updateQStringUsage();d=appConstants.queryStringUsage;}else{if(a.findField("er_type").getValue()=="No"){c="/final/reporter/ErUserLogonDetailsReportJson.jsp?select_farm="+a.findField("select_farm").getValue()+"&er_type="+a.findField("er_type").getValue();
}else{c="/final/reporter/ErUserLogonDetailsReportJson.jsp";this.updateQStringActivity();}d=appConstants.queryStringActivity;}Ext.Ajax.request({url:c,params:d,scope:this,method:"GET",success:function(e){var h=e.responseText;var f=Ext.decode(h);var i=f.screenLabels;if(b=="user_usage"){appConstants.publicjsonDataUsage=f;
comboRawData=f.compTypeCombo;selectedComboOption=f.selectedCompType;comboObject=a.findField("er_compType");comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);
}if(f.isVm!=undefined&&f.isVm=="true"){if(f.enableBrokering!=undefined&&f.enableBrokering=="yes"){if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").show();var g=f.enableBrokeringFor;Ext.getCmp("brokeringFrom").setValue(g);}}else{if(f.enableBrokering!=undefined&&f.enableBrokering=="No"){if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").hide();
var g=f.enableBrokeringFor;Ext.getCmp("brokeringFrom").setValue(g);}}else{var g=f.enableBrokeringFor;if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").setValue(g);}}}}else{if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").hide();}}if(f.selectedCompType=="Horizon_Pod"||f.selectedCompType=="VMware_View_server"){Ext.getCmp("brokeringFrom").hide();
Ext.getCmp("er_priority").hide();Ext.getCmp("optionmultipane").hide();Ext.getCmp("er_poolType_container").show();}else{Ext.getCmp("er_poolType_container").hide();}if(Ext.getCmp("inclReconnect")!=undefined){if(comboObject.getValue()=="Citrix_XcXenApp_server"){Ext.getCmp("inclReconnect").show();}else{Ext.getCmp("inclReconnect").hide();
}}comboRawData=f.ComponentServerArray;selectedComboOption=f.selectedComps;comboObject=Ext.getCmp("er_server");appConstants.rawDataForComponents=comboRawData;comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);
}}else{appConstants.publicjsonDataActivity=f;comboRawData=f.compTypeCombo;selectedComboOption=f.selectedCompType;comboObject=a.findField("er_compType");comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);
}else{comboObject.setValue(comboRawData[0].valueField);}if(f.isVm!=undefined&&f.isVm=="true"){if(f.enableBrokering!=undefined&&f.enableBrokering=="yes"){if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").show();var g=f.enableBrokeringFor;Ext.getCmp("brokeringFrom").setValue(g);}}else{if(f.enableBrokering!=undefined&&f.enableBrokering=="No"){if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").hide();
var g=f.enableBrokeringFor;Ext.getCmp("brokeringFrom").setValue(g);}}else{var g=f.enableBrokeringFor;if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").setValue(g);}}}}else{if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").hide();}}if(f.selectedCompType=="Horizon_Pod"||f.selectedCompType=="VMware_View_server"){Ext.getCmp("brokeringFrom").hide();
Ext.getCmp("er_priority").hide();Ext.getCmp("optionmultipane").hide();Ext.getCmp("er_poolType_container").show();}else{Ext.getCmp("er_poolType_container").hide();}if(Ext.getCmp("inclReconnect")!=undefined){if(comboObject.getValue()=="Citrix_XcXenApp_server"){Ext.getCmp("inclReconnect").show();}else{Ext.getCmp("inclReconnect").hide();
}}if(a.findField("er_type").getValue()=="No"){comboRawData=f.serverCombo;selectedComboOption=f.selectedServer;comboObject=Ext.getCmp("er_server");comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);
}Ext.getCmp("serverMultiSelectLbl").show();}}}});},expandMe:function(a){if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}if(a.id=="er_poolType_expand"){appConstants.erUtils.expandMultiComboButton(Ext.getCmp("er_poolType"),Ext.getCmp("er_poolType_container").getFieldLabel(),a);
}else{appConstants.erUtils.expandMultiComboButton(Ext.getCmp("er_server"),Ext.getCmp("compLbl").text,a);}},expandMeGeo:function(a){if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}appConstants.erUtils.expandMultiComboButton(Ext.getCmp("er_geoFilter"),Ext.getCmp("multiSelectLabel_geo").text,a);
},UserOnChange:function(c){var a=c.getValue();var b="All Users and Individual selection cannot be selected simultaneously";if((Ext.Array.contains(a,"--All--")||Ext.Array.contains(a,"--all--"))&&a.length>1){Ext.MessageBox.show({title:"User Logon Report",msg:b,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return;}},serverOnChange:function(g,c,a,i){if(Ext.isEmpty(c)||appConstants.isSubmit=="true"){return false;}var k=g.getValue();var h="All Components and Individual selection cannot be selected simultaneously";if((Ext.Array.contains(k,"All")||Ext.Array.contains(k,"all"))&&k.length>1){Ext.MessageBox.show({title:"User Logon Report",msg:h,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return;}myMask=new Ext.LoadMask(Ext.getBody(),{msg:"Loading..."});myMask.show();Ext.getCmp("resultPanel").hide();var b=Ext.getCmp("mainform").getForm();if(!isSettingsEnabled){this.showConfigDropdown();this.fillSettingFieldsForActivity(appConstants.publicjsonDataActivity);}var d=this.getThinclientusersettings().getForm();
var e=Ext.getCmp("er_server").getValue();var j=b.findField("er_type").getValue();if(j!=null&&j!=undefined&&j=="No"){this.updateQStringActivity();var f=Ext.getCmp("brokeringFrom").getValue();Ext.Ajax.request({url:"/final/reporter/ErUserLogonDetailsReportJson.jsp",params:appConstants.queryStringActivity+"&er_brokeringFrom="+f,scope:this,method:"POST",success:function(l){var o=l.responseText;
var n=Ext.decode(o);comboRawData=n.userCombo;appConstants.rawDataForUsers=n.userCombo;selectedComboOption=n.selectedUser;comboObject=b.findField("er_application");comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{if(comboRawData[0].valueField!=-1){comboObject.setValue(comboRawData[0].valueField);
}else{comboObject.setValue(comboRawData[1].valueField);}}comboRawData=n.poolTypeCombo;if(comboRawData!=undefined){appConstants.rawDataForPoolType=n.poolTypeCombo;selectedComboOption=n.poolTypeSelected;comboObject=b.findField("er_poolType");comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);
}else{if(comboRawData[0].valueField!=-1){comboObject.setValue(comboRawData[0].valueField);}else{comboObject.setValue(comboRawData[1].valueField);}}Ext.getCmp("er_poolType_container").setFieldLabel(n.screenLabels["reporter.thin.poolTypeLabel"]);}if(e!=null&&e!=undefined&&e.length>1){comboRawData=n.aggAcrossServer;
if(!Ext.isEmpty(comboRawData)){selectedComboOption=n.selectedAggServer;comboObject=d.findField("er_perserver");comboObject.setFieldLabel(n.screenLabels["reporter.thin.Aggregate across servers on"]);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);
}else{comboObject.setValue(comboRawData[0].valueField);}comboObject.show();}}var m=n.disableUserCombo;var p=n.userTextFieldValue;if(m!=undefined&&m=="yes"){appConstants.isExceedUserLimit=true;}else{appConstants.isExceedUserLimit=false;}if(appConstants.isExceedUserLimit){if(b.findField("er_type").getValue()=="No"){appConstants.reportType=false;
Ext.getCmp("er_user").show();Ext.getCmp("optionmultipane").hide();Ext.getCmp("er_user").setValue(p);if(n.selectedCompType=="Horizon_Pod"||n.selectedCompType=="VMware_View_server"){Ext.getCmp("er_user").hide();Ext.getCmp("er_poolType_container").show();}else{Ext.getCmp("er_poolType_container").hide();
}}else{appConstants.reportType=true;}}else{if(b.findField("er_type").getValue()=="No"){appConstants.reportType=false;Ext.getCmp("optionmultipane").show();Ext.getCmp("er_user").hide();if(n.selectedCompType=="Horizon_Pod"||n.selectedCompType=="VMware_View_server"){Ext.getCmp("optionmultipane").hide();Ext.getCmp("er_poolType_container").show();
}else{Ext.getCmp("er_poolType_container").hide();}}else{appConstants.reportType=true;Ext.getCmp("optionmultipane").hide();}}if((n.selectedCompType=="Citrix_XcXenDesktop_Director"||n.selectedCompType=="Citrix_XcXenDesktop_Site")&&n.selectedShowDeliveryGroup!=undefined&&n.selectedShowDeliveryGroup=="Yes"){Ext.getCmp("optionmultipane").hide();
Ext.getCmp("er_user").hide();Ext.getCmp("er_poolType_container").show();}}});}else{if(Ext.getCmp("er_perserver")!=undefined){Ext.getCmp("er_perserver").hide();}}myMask.hide();},expandMe2:function(a){if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}appConstants.erUtils.expandMultiComboButton(Ext.getCmp("er_application"),Ext.getCmp("compLbl").text,a);
},graphTypeOnChange:function(a){var b=a.getValue();Ext.getCmp("resultPanel").hide();this.updateQStringActivity();Ext.Ajax.request({url:"/final/reporter/ErUserLogonDetailsReportJson.jsp",params:appConstants.queryStringActivity,scope:this,method:"POST",success:function(e){var g=e.responseText;var f=Ext.decode(g);
var h=f.screenLabels;if(!isSettingsEnabled){this.showConfigDropdown();this.fillSettingFieldsForActivity(appConstants.publicjsonDataActivity);}var d=Ext.getCmp("mainform").getForm();var c=this.getThinclientusersettings().getForm();if(b=="timeline"){appConstants.publicjsonDataActivity=f;comboRawData=f.aggbasedOn;
selectedComboOption=f.selectedAgg;comboObject=c.findField("er_perserver");comboObject.setFieldLabel(h["reporter.thin.Aggregate across servers"]);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);
}comboObject.show();}else{Ext.getCmp("er_checkbox").hide();if(Ext.getCmp("er_perserver")!=undefined){Ext.getCmp("er_perserver").hide();}}}});},reportTypeOnChange:function(e){var b=Ext.getCmp("mainform").getForm();initLdgMask.show();Ext.getCmp("resultPanel").hide();Ext.getCmp("er_checkbox").hide();var g=e.getValue();
if(!isSettingsEnabled){this.showConfigDropdown();this.fillSettingFieldsForActivity(appConstants.publicjsonDataActivity);}if(b.findField("er_type").getValue()=="Yes"){appConstants.reportType=true;Ext.getCmp("er_user").hide();Ext.getCmp("optionmultipane").hide();}else{appConstants.reportType=false;}var b=Ext.getCmp("mainform").getForm();
var a=this.getThinclientusersettings().getForm();this.updateQStringActivity();var c="/final/reporter/ErUserLogonDetailsReportJson.jsp?";var f="er_type="+b.findField("er_type").getValue()+"&er_gtype=Citrix&er_rtype=UserLogon&option=Citrix&er_trgttype=UserLogon Report&er_RmDispName=User Logon Performance&isLegendEnabled=true";
var d=this;Ext.Ajax.request({url:c,params:f,scope:this,method:"POST",async:false,success:function(l){var i=l.responseText;var q=Ext.decode(i);var p=q.screenLabels;appConstants.publicjsonDataActivity=q;d.loadFormDataInfo(q);if(g=="No"){comboRawData=q.serverCombo;appConstants.rawDataForUsers=q.userCombo;
appConstants.rawDataForUsers=q.userCombo;selectedComboOption=q.selectedServer;if(selectedComboOption!=null&&selectedComboOption.indexOf("All ")>-1){a.findField("er_perserver").show();}comboRawData=q.userCombo;appConstants.rawDataForUsers=q.userCombo;selectedComboOption=q.selectedUser;var v=q.disableUserCombo;
var h=q.userTextFieldValue;if(v!=undefined&&v=="yes"){appConstants.isExceedUserLimit=true;}else{appConstants.isExceedUserLimit=false;}comboObject=Ext.getCmp("er_showDeliveryGroup");selectedComboOption=q.selectedShowDeliveryGroup;comboObject.hide();if(selectedComboOption!=undefined){comboObject.show();
comboObject.setFieldLabel(p["reporter.common.Show Delivery Groups"]);comboObject=Ext.getCmp("deliveryGroupNo");if(selectedComboOption=="Yes"){comboObject=Ext.getCmp("deliveryGroupYes");}comboObject.setValue(true);}if(appConstants.isExceedUserLimit){if(b.findField("er_type").getValue()=="No"){appConstants.reportType=false;
Ext.getCmp("er_user").show();Ext.getCmp("optionmultipane").hide();Ext.getCmp("er_user").setValue(h);if(q.selectedCompType=="Horizon_Pod"||q.selectedCompType=="VMware_View_server"){Ext.getCmp("er_user").hide();Ext.getCmp("er_poolType_container").show();}else{Ext.getCmp("er_poolType_container").hide();
}}else{appConstants.reportType=true;}}else{if(b.findField("er_type").getValue()=="No"){appConstants.reportType=false;Ext.getCmp("optionmultipane").show();Ext.getCmp("er_user").hide();if(q.selectedCompType=="Horizon_Pod"||q.selectedCompType=="VMware_View_server"){Ext.getCmp("optionmultipane").hide();Ext.getCmp("er_poolType_container").show();
}else{Ext.getCmp("er_poolType_container").hide();}}else{appConstants.reportType=true;Ext.getCmp("optionmultipane").hide();}comboObject=b.findField("er_application");comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{if(comboRawData!=undefined){comboObject.setValue(comboRawData[0].valueField);
}}comboObject.show();}Ext.getCmp("aggregateValue").show();Ext.getCmp("serverMultiSelectLbl").show();comboRawData=q.priorityCombo;selectedComboOption=q.selectedPriority;comboObject=b.findField("er_priority");comboObject.setFieldLabel(p["reporter.comparison.Show Top"]);comboObject.getStore().loadRawData(comboRawData);
if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[2].valueField);}comboObject.show();var n=appConstants.publicjsonDataActivity;var u=n["enableDetailedData"];Ext.getCmp("duraSelect").show();Ext.getCmp("glduration").show();Ext.getCmp("duration").show();
Ext.getCmp("enableAggregation").show();var r=b.findField("er_compType").getValue();if(u!="No"&&r!=undefined&&r!="Citrix_XcXenApp_server"){Ext.getCmp("enableDetailedData").show();Ext.getCmp("enableDetailedDataSplitter").show();}Ext.getCmp("aggressionSplitter").show();var w=Ext.getCmp("enableAggregation").checked;
if(w){Ext.getCmp("lowLimitLbl").show();}else{Ext.getCmp("lowLimitLbl").hide();}}else{Ext.getCmp("duraSelect").hide();Ext.getCmp("glduration").hide();Ext.getCmp("duration").hide();Ext.getCmp("aggressionSplitter").hide();Ext.getCmp("enableAggregation").hide();Ext.getCmp("enableDetailedData").hide();Ext.getCmp("enableDetailedDataSplitter").hide();
Ext.getCmp("lowLimitLbl").hide();Ext.getCmp("aggregateValue").hide();Ext.getCmp("er_priority").hide();Ext.getCmp("serverMultiSelectLbl").hide();Ext.getCmp("er_poolType_container").hide();a.findField("er_perserver").hide();var o=q.selectedGraphType;comboRawData=q.graphTypeArray;selectedComboOption=q.selectedGraphType;
if(o=="timeline"){comboRawData=q.aggbasedOn;selectedComboOption=q.selectedAgg;comboObject=a.findField("er_perserver");comboObject.setFieldLabel(p["reporter.thin.Aggregate across servers"]);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);
}else{comboObject.setValue(comboRawData[0].valueField);}comboObject.show();Ext.getCmp("serverMultiSelectLbl").show();}else{a.findField("er_perserver").hide();}}var t=q.reportGenerationCombo;var s=q.reportGeneration;var j=Ext.getCmp("reportGeneration");var k=t[0].valueField;var m=Ext.getCmp("bgReportName");
j.setFieldLabel(p["reporter.common.Report Generation"]);j.getStore().loadRawData(t);j.setValue(k);if(k!=undefined&&k!=null&&k=="foreground"){m.hide();}else{m.show();}initLdgMask.hide();}});},reportCatChange:function(b){initLdgMask.show();var a=b.getValue();if(a=="user_usage"){this.LoadFieldsForUsage();
}else{this.LoadFieldsForActivity();}Ext.getCmp("resultPanel").hide();},LoadFieldsForActivity:function(){var a="/final/reporter/ErUserLogonDetailsReportJson.jsp";Ext.Ajax.request({url:a,scope:this,method:"POST",success:function(c){var e=c.responseText;var d=Ext.decode(e);appConstants.publicjsonDataActivity=d;
this.getMain().setTitle(d.reportTitle);this.fillFormFieldsForActivity(d);var b=Ext.getCmp("mainform").getForm();b.findField("er_type").show();b.findField("er_compType").show();b.findField("er_mode").show();initLdgMask.hide();}});},LoadFieldsForUsage:function(){var a="/final/reporter/ErCtxUserReportJson.jsp";
Ext.Ajax.request({url:a,scope:this,method:"POST",success:function(b){var d=b.responseText;var c=Ext.decode(d);appConstants.publicjsonDataUsage=c;appConstants.isAdDiscoverEnabled=appConstants.publicjsonDataUsage.isAdDiscoverEnabled;this.getMain().setTitle(c.reportTitle);this.fillFormFieldsForUsage(c);
}});},fillFormFieldsForUsage:function(d){var p=Ext.getCmp("mainform").getForm();p.findField("er_type").hide();p.findField("er_mode").hide();p.findField("er_compType").show();var j=appConstants.publicjsonDataUsage.hiddenfields;var l=j["fromScheduleModify"];if(l!=null&&l=="Yes"){Ext.getCmp("submit").hide();
Ext.getCmp("save").show();}else{Ext.getCmp("submit").show();Ext.getCmp("save").hide();}var b=d.screenLabels;var e;var h;var n;e=d.reportForCombo;h=d.reportFor;n=p.findField("report_category");n.setFieldLabel(b["reporter.common.Report For"]);n.getStore().loadRawData(e);if(!Ext.isEmpty(h)){n.setValue(h);
}e=d.zoneCombo;h=d.selectedZone;n=p.findField("select_farm");n.getStore().clearFilter(true);n.getStore().loadRawData(e);if(!Ext.isEmpty(h)){n.setValue(h);}else{n.setValue(e[0].valueField);}e=d.compTypeCombo;h=d.selectedCompType;n=p.findField("er_compType");n.setFieldLabel(b["reporter.common.Component Type"]);
n.getStore().clearFilter(true);n.getStore().loadRawData(e);if(!Ext.isEmpty(h)){n.setValue(h);}else{n.setValue(e[0].valueField);}e=d.ComponentServerArray;h=d.selectedComps;n=Ext.getCmp("er_server");appConstants.rawDataForComponents=e;n.getStore().loadRawData(e);if(!Ext.isEmpty(h)){n.setValue(h);}else{n.setValue(e[0].valueField);
}if(appConstants.isAdDiscoverEnabled=="true"){e=d.organizeCombo;h=d.selectedOrganizeby;n.getStore().loadRawData(e);if(!Ext.isEmpty(h)){n.setValue(h);}else{n.setValue(e[0].valueField);}n.show();}var s=d.timelineCombo;var f=d.selectedTimeline;var o=p.findField("er_timeline");o.setFieldLabel(b["reporter.common.Timeline"]);
o.getStore().loadRawData(s);if(!Ext.isEmpty(s)){if(!Ext.isEmpty(f)){o.setValue(f);}else{o.setValue(s[0].valueField);}}var m=d.startHour;var i=d.endHour;var c=d.startDate;var a=d.endDate;var g=p.findField("er_stdate");g.setValue(d.startDateForDisplay);g.dataArray=c;var r=p.findField("er_sthr");r.setValue(d.startHourForDisplay);
r.dataArray=m;var k=p.findField("er_enddate");k.setValue(d.endDateForDisplay);k.dataArray=a;var q=p.findField("er_endhr");q.setValue(d.endHourForDisplay);q.dataArray=i;stmin=d.startMinForDisplay;enmin=d.endMinForDisplay;mgr_stmin=d.startmin;mgr_enmin=d.endmin;updatingAppSettings();initLdgMask.hide();
},fillSettingFieldsForUsage:function(f){var c;var d;var h;var e=f.screenLabels;var a=this.getThinclientusersettings().getForm();a.findField("er_perserver").hide();c=f.excludeWeekCombo;d=f.excludeWeek;h=a.findField("er_excwe");h.setFieldLabel(e["reporter.common.Exclude weekends"]);h.getStore().loadRawData(c);
if(!Ext.isEmpty(d)){h.setValue(d);}else{h.setValue(c[0].valueField);}Ext.getCmp("timeperiodLbl").setText(e["reporter.common.Time period"]);a.findField("timefrom").setValue(f.selectedTimeFrom);a.findField("minfrom").setValue(f.selectedMinsFrom);a.findField("timeto").setValue(f.selectedTimeTo);a.findField("minto").setValue(f.selectedMinsTo);
var i=f.reportGenerationCombo;var g=f.reportGeneration;var b=a.findField("reportGeneration");b.setFieldLabel(e["reporter.common.Report Generation"]);b.getStore().loadRawData(i);b.setValue(g);},saveReportAsPDF:function(){var f=appConstants.publicjsonDataActivity;var e=f["enableDetailedData"];if(isSettingsEnabled&&e=="Yes"){if(Ext.getCmp("enableDetailedData")!=undefined){e=Ext.getCmp("enableDetailedData").getValue().enableDetailedData1;
}}var d;var c=Ext.getCmp("report_category").getValue();if(c=="user_activity"){this.updateQStringActivity();d=appConstants.queryStringActivity;d+="&printGraph=yes&opt=chart";if(appConstants.publicjsonDataActivity.selectedreportType=="No"){d+="&er_view=PRINT";}}else{if(appConstants.report_for=="user_usage"){d=appConstants.publicjsonDataUsage.saveQString;
d+="&pageWidthProces=700&er_view=PRINT";}}var b="../reporter/ErHtmlToSavePdf.jsp?"+d+"&eDd="+e;var a=Ext.getCmp("showLegend").getValue();if(a!=null&&a!=undefined&&a!="undefined"){var g="&showLegend="+a;if(b.indexOf(g)==-1){if(b.indexOf("&showLegend=")>-1){if(a=="true"){b=b.replace("&showLegend=false",g);
}else{b=b.replace("&showLegend=true",g);}}else{b+=g;}}}if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}b=this.getGridColSortParam(b);appConstants.erUtils.savePDF(b);},bookletQuery:function(f){var d;var c=Ext.getCmp("report_category").getValue();if(c=="user_activity"){d=appConstants.publicjsonDataActivity.saveQString;
d+="&printGraph=yes&opt=chart";if(appConstants.publicjsonDataActivity.selectedreportType=="No"){d+="&er_view=PRINT";}}else{if(appConstants.report_for=="user_usage"){d=appConstants.publicjsonDataUsage.saveQString;d+="&pageWidthProces=700&er_view=PRINT";}}var b=d;var a=Ext.getCmp("showLegend").getValue();
if(a!=null&&a!=undefined&&a!="undefined"){var e="&showLegend="+a;if(b.indexOf(e)==-1){if(b.indexOf("&showLegend=")>-1){if(a=="true"){b=b.replace("&showLegend=false",e);}else{b=b.replace("&showLegend=true",e);}}else{b+=e;}}}return b;},bookletScheduleQuery:function(c){var a="";this.updateQStringActivity();
var b=Ext.getCmp("er_type").getValue();if(b=="Yes"){a=appConstants.queryStringActivity;a+="&er_server=-1&er_application=-1&er_sortby=-1&er_perserver=Yes&eDd="+enableDetailedData;}else{a=appConstants.queryStringActivity+"&eDd="+enableDetailedData;}return a;},bookletPreview:function(){this.printReport();
},getGridColSortParam:function(d){var a=d.indexOf("er_sortby");if(a>-1){var c;var b=d.substring(a+10,a+12);if(b=="-1"){c="er_sortby="+b;}else{c="er_sortby="+parseInt(b);}d=d.replace(c,"er_sortby="+this.gridColIndexParam);}else{d+="&er_sortby="+this.gridColIndexParam;}if(this.gridColStateParam=="ASC"){this.gridColStateParam="1";
}else{this.gridColStateParam="0";}return d+"&orderBy="+this.gridColStateParam;},printReport:function(){var c=appConstants.publicjsonDataActivity;var b=c["enableDetailedData"];if(isSettingsEnabled&&b=="Yes"){if(Ext.getCmp("enableDetailedData")!=undefined){b=Ext.getCmp("enableDetailedData").getValue().enableDetailedData1;
}}var a;this.updateQStringActivity();a="/final/reporter/ErUserLogonDetailsReportPrint.jsp?"+appConstants.queryStringActivity+"&pdfPrint=yes&pdfprint=yes&eDd="+b;parent.printWindowFn(a);},sendMail:function(){var d=appConstants.publicjsonDataActivity;var c=d["enableDetailedData"];if(isSettingsEnabled&&c=="Yes"){if(Ext.getCmp("enableDetailedData")!=undefined){c=Ext.getCmp("enableDetailedData").getValue().enableDetailedData1;
}}drillDownParams="&eDd="+c;var b=Ext.getCmp("showLegend").getValue();if(b!=null&&b!=undefined&&b!="undefined"){drillDownParams+="&showLegend="+b;}var a=Ext.widget("sendmail");a.show();},saveCsv:function(){window.location="../servlet/egurkha.reporter.SaveInCSVFormat";},saveSchedule:function(){var c=appConstants.publicjsonDataActivity;
var d=c["enableDetailedData"];if(isSettingsEnabled&&d=="Yes"){if(Ext.getCmp("enableDetailedData")!=undefined){d=Ext.getCmp("enableDetailedData").getValue().enableDetailedData1;}}var e=Ext.getCmp("report_category").getValue();var j=this.validateMainForm(false);if(j&&Ext.getCmp("er_timeline").getValue()=="Any"){Ext.MessageBox.show({title:"Thin Client Reports",msg:"Chosen timeline not allowed",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
j=false;}if(j){var h;this.updateQStringActivity();var i=Ext.getCmp("er_type").getValue();if(i=="Yes"){h="/final/reporter/ErSaveSchedule.jsp?"+appConstants.queryStringActivity;h+="&er_server=-1&er_application=-1&er_sortby=-1&er_perserver=Yes&eDd="+d;}else{h="/final/reporter/ErSaveSchedule.jsp?"+appConstants.queryStringActivity+"&eDd="+d;
}var g=h+"&com.eg.CSRF_NONCE="+csrfToken;if(appConstants.formButtonId=="save"){g+="&showSchWindow=no&eDd="+d;var b=g.substr(0,g.indexOf("?"));var a=g.substr(g.indexOf("?")+1,g.length-1);var f=Ext.create("Ext.form.Panel");f.submit({url:b,params:a,standardSubmit:true,method:"POST"});}else{parent.scheduleWindowFn(g);
}}else{return;}},saveFavorite:function(){var j=this.validateMainForm(false);var i="";if(j){var g;var d=Ext.getCmp("report_category").getValue();if(d=="user_activity"){var b=appConstants.publicjsonDataActivity.hiddenfields;i=b["favorite_id"];this.updateQStringActivity();var h=Ext.getCmp("er_type").getValue();
if(h=="Yes"){g="/final/reporter/ErSaveFavorite.jsp?"+appConstants.queryStringActivity+"&er_perserver=yes&er_sortby=-1&er_server=-1&er_application=-1&cmd=client";}else{g="/final/reporter/ErSaveFavorite.jsp?"+appConstants.queryStringActivity+"&cmd=client";}}else{if(d=="user_usage"){var b=appConstants.publicjsonDataUsage.hiddenfields;
i=b["favorite_id"];this.updateQStringUsage();g="../servlet/com.eg.ErFavoriteC?"+appConstants.queryStringUsage+"&er_view=GRAPH&cmd=client";}}var f=g+"&FavoriteId="+i+"&er_RmDispName="+appConstants.er_RmDispName+"&com.eg.CSRF_NONCE="+csrfToken;if(appConstants.formButtonId=="save"){f+="&showSchWindow=no";
var c=f.substr(0,f.indexOf("?"));var a=f.substr(f.indexOf("?")+1,f.length-1);var e=Ext.create("Ext.form.Panel");e.submit({url:c,params:a,standardSubmit:true,method:"POST"});}else{parent.favouriteWindowFn(f);}}else{return;}},validateMainForm:function(w){var m=Ext.getCmp("mainform").getForm();var d=null;
if(isSettingsEnabled){d=this.getThinclientusersettings().getForm();}var j=m.findField("select_farm");var H=m.findField("report_category").getValue();var A=m.findField("er_type").getValue();var K=m.findField("er_option").getValue();var D="";if(Ext.getCmp("optionmultipane").isHidden()){var e=m.findField("er_user").getValue();
D=e.split(",");}if((K!=null||K!=undefined)&&K!="Component"){if(j.getValue()=="-1"){Ext.MessageBox.show({title:"User Logon Report",msg:j.getStore().getAt(0).get("displayField"),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}}var s=m.findField("er_compType");if(s.getValue()=="-1"){Ext.MessageBox.show({title:"User Logon Report",msg:s.getStore().getAt(0).get("displayField"),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}if(A=="No"){var B=Ext.getCmp("er_server");if(B.getValue()=="-1"){Ext.MessageBox.show({title:"User Logon Report",msg:B.getStore().getAt(0).get("displayField"),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}var a=B.getValue();var b="All Components and Individual selection cannot be selected simultaneously";
if((Ext.Array.contains(a,"All")||Ext.Array.contains(a,"all"))&&a.length>1){Ext.MessageBox.show({title:"User Logon Report",msg:b,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return;}var n=Ext.getCmp("enableAggregation").checked;if(n){var P;var u;var q;P=Ext.getCmp("upperCritical").getValue();
if(Ext.isEmpty(P)||P.length==0){Ext.MessageBox.show({title:"User Logon settings",msg:"Invalid Critical Value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}q=Ext.getCmp("uppermajor").getValue();if(Ext.isEmpty(q)||q.length==0){Ext.MessageBox.show({title:"User Logon settings",msg:"Invalid Major Value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}u=Ext.getCmp("upperminor").getValue();if(Ext.isEmpty(u)||u.length==0){Ext.MessageBox.show({title:"User Logon settings",msg:"Invalid Minor Value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}if(P<=q||P<=u){Ext.MessageBox.show({title:"User Logon settings",msg:"Critical Value Should be greater than other values",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}if(q<=u){Ext.MessageBox.show({title:"User Logon settings",msg:"Major Value Should be greater than Minor value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}}var Q=false;var G=Ext.getCmp("er_application").getValue();if(G!=null&&G!="undefined"&&G.length>0){for(var I=0;
G.length>I;I++){var c=G[I];if(c=="-1"||c=="Not Applicable"){Q=true;}}}if((D.length>1&&D.indexOf("*")>-1)){Ext.MessageBox.show({title:"Alert",msg:"Individual and aggregate Users cannot be selected simultaneously",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}if(Ext.getCmp("optionmultipane").isVisible()&&Q){Ext.MessageBox.show({title:"User Logon Report",msg:"User not applicable",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}if(Ext.getCmp("er_poolType_container").isVisible()){var C=Ext.getCmp("er_poolType");var M=C.getValue();if(M==undefined||M.length==0||M[0]=="-1"){Ext.MessageBox.show({title:"User Logon Report",msg:"Please choose valid Desktop pools",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}else{if(M.length>1&&M.indexOf("all")>-1){Ext.MessageBox.show({title:"User Logon Report",msg:"All Desktop pools and Individual selection cannot be selected simultaneously",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}}}var b="All Users and Individual selection cannot be selected simultaneously";
if((Ext.Array.contains(G,"--All--")||Ext.Array.contains(G,"--all--"))&&G.length>1){Ext.MessageBox.show({title:"User Logon Report",msg:b,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return;}}var v=true;var L;L=appConstants.publicjsonDataActivity.hiddenfields;var N=L["getMaxDaysInMonth"];var o=this.getSettingsFieldValue(d,"reportGeneration",isSettingsEnabled,"reportGeneration");
if(isSettingsEnabled){var J=this.getSettingsFieldValue(d,"glduration",isSettingsEnabled,"glduration").toString();var x=this.getSettingsFieldValue(d,"duration",isSettingsEnabled,"duration").toString();var P=this.getSettingsFieldValue(d,"upperCritical",isSettingsEnabled,"upperCritical").toString();var q=this.getSettingsFieldValue(d,"uppermajor",isSettingsEnabled,"uppermajor").toString();
var u=this.getSettingsFieldValue(d,"upperminor",isSettingsEnabled,"upperminor").toString();if(!Ext.isEmpty(x)&&x.indexOf("-")>-1){Ext.MessageBox.show({title:"User Logon Report",msg:"Duration Value cannot be negative",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}if(!Ext.isEmpty(J)&&J=="l"&&!Ext.isEmpty(x)&&x==0){Ext.MessageBox.show({title:"User Logon Report",msg:"Duration Value cannot be equal to Zero When Duration is lesser than",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}if(!Ext.isEmpty(P)&&P.indexOf("-")>-1){Ext.MessageBox.show({title:"User Logon Report Report",msg:"Critacal Value cannot be negative",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}if(!Ext.isEmpty(q)&&q.indexOf("-")>-1){Ext.MessageBox.show({title:"User Logon Report",msg:"Major Value cannot be negative",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}if(!Ext.isEmpty(u)&&u.indexOf("-")>-1){Ext.MessageBox.show({title:"User Logon Report",msg:"Minor Value cannot be negative",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}}var r="";if(!Ext.isEmpty(L["userTimeline"])){r=L["userTimeline"];}var p=m.findField("er_timeline").getValue();
var l=m.findField("er_stdate").getValue();var F=m.findField("er_enddate").getValue();var E=m.findField("er_sthr").getValue();var R=m.findField("er_endhr").getValue();l.setHours(E);F.setHours(R);var i=this.getSettingsFieldValue(d,"timefrom",isSettingsEnabled,"selectedTimeFrom");var y=this.getSettingsFieldValue(d,"minfrom",isSettingsEnabled,"selectedMinsFrom");
var f=this.getSettingsFieldValue(d,"timeto",isSettingsEnabled,"selectedTimeTo");var t=this.getSettingsFieldValue(d,"minto",isSettingsEnabled,"selectedMinsTo");if(!checkTimePeriod(i,y,f,t)){v=false;}if(!checkDateTime(l,F)){v=false;}if(r!=null&&r!="-1"){var g=isUserTimelineLimitExceeded(r,N,l,F);if(!g){Ext.MessageBox.show({title:"User Logon settings",msg:_invalidUserTime,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
v=false;}}if(o!=null&&o=="foreground"){if(w){var h=L["limitforbg"];if(!Ext.isEmpty(h)){if(!checkTimeLineForBgLimit(h,N,l,F)){Ext.MessageBox.confirm("Confirm",appConstants.forGrdReportConfirmMsg,this.showConfirmResult,this);v=false;}}}}else{var O=this.getSettingsFieldValue(d,"bgReportName",isSettingsEnabled,"selectedMinsTo");
if(!validateTextBoxWithSpecialChars(O,"Attachment",true)){v=false;}}if(v){var z=Ext.getCmp("submit");z.setDisabled(false);return true;}},toggleForm:function(b){Ext.getCmp("panelinsidetoggle").show();var a=Ext.getCmp("mainform");if(a.isHidden()){a.show();Ext.getCmp("selectionDetails").hide();}else{a.hide();
Ext.getCmp("selectionDetails").show();}},showResult:function(){var d=Ext.getCmp("resultPanel");d.removeAll();var a=Ext.getCmp("mainform").getForm();var f=a.findField("er_stdate").getValue();var h=a.findField("er_sthr").getValue();f.setHours(h);var c=a.findField("er_enddate").getValue();var b=a.findField("er_endhr").getValue();
c.setHours(b);var i=checkDateTime(f,c);if(!i){return;}var e=Ext.getCmp("er_server");var g=this.validateMainForm(true);if(g){this.submitReport();}else{return;}},validateSettings:function(){var k=true;var d=Ext.getCmp("reportGeneration").getValue();if(d!=null&&(d=="background"||d=="background-csv")){var p=Ext.getCmp("bgReportName").getValue();
if(!validateTextBoxWithSpecialChars(p,"Attachment",true)){return false;}}var h=Ext.getCmp("enableAggregation").checked;if(h){var e;var f;var j;e=Ext.getCmp("upperCritical").getValue();if(Ext.isEmpty(e)||e.length==0){Ext.MessageBox.show({title:"User Logon settings",msg:"Invalid Critical Value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}j=Ext.getCmp("uppermajor").getValue();if(Ext.isEmpty(j)||j.length==0){Ext.MessageBox.show({title:"User Logon settings",msg:"Invalid Major Value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}f=Ext.getCmp("upperminor").getValue();if(Ext.isEmpty(f)||f.length==0){Ext.MessageBox.show({title:"User Logon settings",msg:"Invalid Minor Value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}if(e<=j||e<=f){Ext.MessageBox.show({title:"User Logon settings",msg:"Critical Value Should be greater than other values",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}if(j<=f){Ext.MessageBox.show({title:"User Logon settings",msg:"Major Value Should be greater than Minor value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}}var a=Ext.getCmp("mainform").getForm();var o=a.findField("er_type").getValue();var b=this.getThinclientusersettings().getForm();var c=this.getSettingsFieldValue(b,"glduration",isSettingsEnabled,"glduration").toString();var m=this.getSettingsFieldValue(b,"duration",isSettingsEnabled,"duration");
var e=this.getSettingsFieldValue(b,"upperCritical",isSettingsEnabled,"upperCritical").toString();var j=this.getSettingsFieldValue(b,"uppermajor",isSettingsEnabled,"uppermajor").toString();var f=this.getSettingsFieldValue(b,"upperminor",isSettingsEnabled,"upperminor").toString();if(m==null&&o=="No"){Ext.MessageBox.show({title:"User Logon Report",msg:"Duration Value cannot be empty",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}else{m=m.toString();}if(!Ext.isEmpty(m)&&m.indexOf("-")>-1&&o=="No"){Ext.MessageBox.show({title:"User Logon Report",msg:"Duration Value cannot be negative",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}if(!Ext.isEmpty(c)&&c=="l"&&!Ext.isEmpty(m)&&m==0){Ext.MessageBox.show({title:"User Logon Report",msg:"Duration Value cannot be equal to Zero When Duration is lesser than",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}if(!Ext.isEmpty(e)&&e.indexOf("-")>-1){Ext.MessageBox.show({title:"User Logon Report Report",msg:"Critacal Value cannot be negative",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}if(!Ext.isEmpty(j)&&j.indexOf("-")>-1){Ext.MessageBox.show({title:"User Logon Report",msg:"Major Value cannot be negative",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}if(!Ext.isEmpty(f)&&f.indexOf("-")>-1){Ext.MessageBox.show({title:"User Logon Report",msg:"Minor Value cannot be negative",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}var g=Ext.getCmp("geofilter");if(g!=undefined&&!g.isHidden()){var n=Ext.getCmp("er_geoFilter").getValue();
if(n==undefined||n.length==0){Ext.MessageBox.show({title:"Thin Client Application",msg:"Please choose "+Ext.getCmp("multiSelectLabel_geo").text,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});k=false;}else{if(n.length>1&&n.indexOf("all")>-1){Ext.MessageBox.show({title:"Thin Client Application",msg:"All and Individual selection should not be allowed",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
k=false;}}if(Ext.getCmp("er_poolType_container").isVisible()){var i=Ext.getCmp("er_poolType");var l=i.getValue();if(l==undefined||l.length==0||l[0]=="-1"){Ext.MessageBox.show({title:"User Logon Report",msg:"Please choose valid Desktop pools",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;
}else{if(l.length>1&&l.indexOf("all")>-1){Ext.MessageBox.show({title:"User Logon Report",msg:"All Desktop pools and Individual selection cannot be selected simultaneously",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}}}}return k;},showConfirmResult:function(d){if(d=="yes"){var c=Ext.getCmp("submit");
this.submitReport();}else{this.getReporterSettings().down("button").fireHandler();if(!isSettingsEnabled){this.fillSettingFieldsForActivity(appConstants.publicjsonDataActivity);}var b=this.getThinclientusersettings().getForm();var a=b.findField("reportGeneration");var e=b.findField("bgReportName");a.setValue("background");
e.setValue("");e.show();e.focus(false,1000);Ext.getCmp("submitViaSetting").show();Ext.getCmp("moreOptionCloseId").hide();this.showResult();}},getXmlForUrl:function(b){try{var a;var f=b.substr(0,b.indexOf("?")+1);var c=b.substr(b.indexOf("?")+1,b.length-1);Ext.Ajax.request({url:f,params:c,method:"POST",async:false,scope:this,success:function(e){var g=e.responseText;
a=Ext.decode(g);},failure:function(){alert("I am not loading..."+b);}});return a;}catch(d){alert("[Exception] "+d);}},loadGrid:function(aC){var ac=0;var aJ=this;var O=new Array();var d=new Array();var B=new Array();var aK=Ext.getCmp("er_type").getValue();var aR=Ext.getCmp("er_compType").getValue();var aL=Ext.getCmp("resultPanel");
var aH=Ext.getCmp("aggregateValue").getValue();var af=Ext.getCmp("thinclientuser").getWidth()-100;if(aL.getHeader()!=undefined&&aL.getHeader().show()){aL.getHeader().hide();}var P=aC.isTimeperiodQuery;var aQ=aC.isBreakDownQuery;aL.removeAll();var aX=new Array();if(!Ext.isEmpty(aQ)&&!Ext.isEmpty(P)){var aV;
var x;var A=false;var M=new Array();var aU=this.getXmlForUrl(P);if(!Ext.isEmpty(aU)){A=true;aX.push("fusion0");var au={xtype:"panel",data:aU,ui:"newGraphPanel",columnWidth:0.5,height:300,margin:"0 5 0 0",title:aU.chartTitle,autoScroll:false,scroll:false,id:"fusion0"};M.push(au);}aU=aQ;if(!Ext.isEmpty(aU)){A=true;
var au={xtype:"panel",ui:"newGraphPanel",title:aU.chartTitle,columnWidth:0.5,height:300,margin:"0 0 0 5",items:[{xtype:"container",id:"fusion_1",layout:"column",columnWidth:1,height:270,items:[{xtype:"container",id:"fusion1",columnWidth:0.6,height:270,listeners:{"boxready":function(a6){if(aU!=undefined){var i={};
i=jQuery.extend(true,{},getHighChartsBarInstance("fusion1",250,400),i);i.setData(aU,appConstants.currentDateFormat,"");i.drawChart();}else{Ext.get("fusion_1").update('<div style="text-align:center;vertical-align:middle;top:20%;position:relative;"><img src="/final/images/'+strSkin+'/nomeasures_custom.png"></img></div>');
}}}},{xtype:"container",columnWidth:0.4,id:"fus_legendId_1",height:250,listeners:{"boxready":function(ba){if(aU!=undefined){if(aU.pieColors!=undefined&&aU.pieLabels!=undefined&&aU.pieLabels.length==aU.pieColors.length){var i=aU.pieLabels;var bb=aU.pieColors;var a9='<div style="height:270px;display:table-cell;vertical-align:middle;"><table>';
for(var a7 in i){a9+='<tr><td valign="middle" style="padding-right: 5px;"><div style="height:7px;width:7px;-webkit-border-radius:4px;background-color:#'+bb[a7]+'"></div></td><td>'+i[a7]+"&nbsp;</td></tr>";}a9+="</table>";Ext.get("fus_legendId_1").update(a9);}var a8=aU.legendArray;if(a8!=undefined){var be="";
var a9='<div style="height:270px;display:table-cell;vertical-align:middle;padding-right:  15px;"><table width="100%">';for(var bd in a8){be=a8[bd];a9+='<tr><td valign="top" style="padding-right: 5px;padding-top:5px;"><div style="height:7px;width:7px;-webkit-border-radius:4px;background-color:'+be.color+'"></div></td><td>'+be.name+'</td><td style="padding-left: 15px;" valign="top">'+be.val+"</td></tr>";
if(be!=undefined&&be.innerArray!=undefined){var bc=be.innerArray;for(var a6 in bc){var bf=bc[a6];if(bf!=undefined){be=a8[bd];a9+="<tr><td>&nbsp;</td><td>&nbsp;&nbsp;"+bf.name+'</td><td valign="top" style="padding-left:15px;">'+bf.val+"</td></tr>";}}}}a9+="</table>";Ext.get("fus_legendId_1").update(a9);
}}}}}],}],};M.push(au);}if(A){O.push({xtype:"panel",margin:"0 10 10 10",border:true,layout:{type:"column",align:"stretch"},columnWidth:1,items:M});}}var aj="<span>User Logon Analysis (Secs)</span>";var s="";if(Ext.getCmp("enableAggregation")!=undefined){var K=Ext.getCmp("enableAggregation").checked;if(K){s+='<div style="margin:2px;float:right;"> <div style="background-color:#1fc1b7;float:left;width:10px;height:10px;margin-top:7px;"></div><div style="float:left;padding: 0px 10px 0px 5px;" class="newFont_normal10">Normal</div><div style="background-color:#d9af54;float:left;width:10px;height:10px;margin-top:7px;"></div><div style="float:left;padding: 0px 10px 0px 5px;" class="newFont_normal10">Low</div><div style="background-color:#fd9f53;float:left;width:10px;height:10px;margin-top:7px;"></div><div style="float:left;padding: 0px 10px 0px 5px;" class="newFont_normal10">Medium</div><div style="background-color:#f57e7e;float:left;width:10px;height:10px;margin-top:7px;"></div><div style="float:left;padding: 0px 10px 0px 5px;" class="newFont_normal10">High</div></div>';
}}aj+=s;if(aK!=undefined&&aK=="No"&&aR!=undefined&&(aR=="Citrix_XcXenDesktop_Director"||aR=="Citrix_XcXenDesktop_Site"||aR=="Citrix_Cloud_Site")&&aH.groupByValue!=null&&aH.groupByValue!=undefined){var I=1;if(aC.NewGridObj!=undefined){var Y=aC.NewGridObj.columns;var aq=aC.NewGridObj.dataArray;var an=new Array();
var az=0;var T=Ext.getCmp("thinclientuser").getWidth()-100;for(var ap in Y){mainColumn=Y[ap];var o=80;var E="center";if(mainColumn!=undefined&&(mainColumn=="session startup Time"||mainColumn=="Client ip address"||mainColumn=="Client name"||mainColumn=="Client version"||mainColumn=="Launched via ip address"||mainColumn=="Controller name"||mainColumn=="Server"||mainColumn=="user Name")){o=120;
E="left";}else{if(mainColumn!=undefined&&mainColumn==logonDurationLabel){o=100;az=ap;}}an.push({header:mainColumn,align:E,sortable:true,width:o,dataIndex:mainColumn,doSort:function(i){var c=this.up("grid").store;var a6=this.getSortParam();c.sort({property:a6,direction:i,sorterFn:function(bb,ba){bb=bb.get(a6);
ba=ba.get(a6);if(bb.indexOf("$$")>-1&&ba.indexOf("$$")>-1){bb=bb.substring(0,bb.indexOf("$$"));ba=ba.substring(0,ba.indexOf("$$"));}if(bb.indexOf(".")>-1&&bb.indexOf(" ")>-1){var a8=bb.substring(0,bb.lastIndexOf(" "));var a9=new Date(Ext.Date.parse(a8,mgrDateFormat));var a7=Ext.Date.dateFormat(a9,getExtjsDateFormat("MMM-dd-yyyy"));
bb=a7+bb.substring(bb.lastIndexOf(" "),bb.length);}if(ba.indexOf(".")>-1&&ba.indexOf(" ")>-1){var a8=ba.substring(0,ba.lastIndexOf(" "));var a9=new Date(Ext.Date.parse(a8,mgrDateFormat));var a7=Ext.Date.dateFormat(a9,getExtjsDateFormat("MMM-dd-yyyy"));ba=a7+ba.substring(ba.lastIndexOf(" "),ba.length);
}if(!isNaN(bb)&&!isNaN(ba)){bb=Ext.isNumber(bb)?bb:parseFloat(String(bb),10);ba=Ext.isNumber(ba)?ba:parseFloat(String(ba),10);if(i=="ASC"){bb=isNaN(bb)?999999:bb;ba=isNaN(ba)?999999:ba;}else{bb=isNaN(bb)?0:bb;ba=isNaN(ba)?0:ba;}}else{if(!isNaN(new Date(bb))&&!isNaN(new Date(ba))){ba=new Date(ba).getTime();
bb=new Date(bb).getTime();}}return bb>ba?1:(bb<ba?-1:0);}});},renderer:function(ba,i,a8,bc,a6,bb,c){if(ba.indexOf("$$")>-1){var a9="";var a7=ba.substring(ba.indexOf("$$")+2,ba.length);ba=ba.substring(0,ba.indexOf("$$"));if(a7=="critical"){a9="reporterUserLogonHigh";}else{if(a7=="major"){a9="reporterUserLogonMedium";
}else{if(a7=="minor"){a9="reporterUserLogonLow";}else{if(a7=="normal"){a9="reporterUserLogonNormal";}else{a9="reporterUserLogonDefault";}}}}i.tdAttr='data-qtip="'+ba+'"';i.tdCls="reportLogonGridColumnHighlight";ba=Ext.getCmp("mainGrid3").getDecimalAlignFormat(ba);ba="<div class="+a9+' align="center">'+ba+"</div>";
}else{i.tdAttr='data-qtip="'+ba+'"';ba=Ext.getCmp("mainGrid3").getDecimalAlignFormat(ba);}return ba;}});}var H=false;for(var aY in aq){var ag=aq[aY];var aP=ag.dirtData;if(aP!=undefined){if(!H){H=true;}var ar=aP.clinetServerData;var ao='<div style="margin:15px;width:'+T+'px;" class="userLogonInnerTableOuter">';
ao+='<table width="100%" cellpadding="0" cellspacing="0" border="0px"><tbody><tr><td width="100%" style="padding:10px 0px 10px 0px;"><div class="reporterHtmlFieldsetBody"><div class="reporterLogonFieldsetHeader" nowrap="">'+ar.title+"</div>";var ae=ar.mainHeader;var S=ar.serverHeader;var R=ar.clientHeader;
var Q=ar.commnData;var aZ=ar.serverData;var aw=ar.clientData;ao+='<table width="100%" cellpadding="0" cellspacing="0">';if(ae!=undefined){ao+='<tr><td colspan="3" style="padding:6px;height:30px" align="center"><div class="reporterLogonSessionStartupBox" style="width:350px;height:24px;margin:20px auto 10px  auto;"><table border="0" style="margin:3px auto;"><tbody><tr><td class="reporterLogonSessionStartup">'+ae.key+'(secs) :</td><td class="reporterLogonSessionStartupValue">'+ae.value+"</td></tr></tbody></table></div></td></tr>";
}ao+="<tr>";ao+='<td style="padding:0px 5px 20px 20px"><table border="0px" style="width:100%" class="reporterLogonServerStartUpTable"><tbody>';if(S!=undefined){ao+="<tr>";if(Q!=undefined){ao+='<td valign="middle" rowspan="2"><table border="0px" style="width:150px;float:left;margin-top:7px"><tbody>';for(var W in Q){var m=Q[W];
ao+='<tr><td><div class="reporterLoginSessionLabel" style="text-align:center;">'+m.key+'</div><div class="reporterLoginPopupVal" style="text-align:center;">'+m.value+"</div></td></tr>";}ao+="</tbody></table></td>";}ao+='<td  valign="top" class="newLineLeft2" style="padding-left:10px;padding-right:20px"><table border="0px" style="width:100%;float:left" ><tbody><tr><td class="reporterLogonPanelHead" style="text-align:left;width:90%">'+S.key+' (secs) </td><td style="align:right;" class="reporterLogonPanelHead"><div style="float:right;width:80px;text-align:right;">'+S.value+"</div></td></tr></tbody></table></td></tr>";
}ao+="<tr>";if(aZ!=undefined){ao+='<td valign="top" style="padding-left:10px;padding-right:0px"><div style="height:150px;overflow:auto;width:100%;padding:right:10px"><table border="0px" style="float:left;" class="reporterLogonPanelBody"><tbody>';for(var aF in aZ){var al=aZ[aF];ao+='<tr><td style="width:90%">'+al.key+'</td><td style="align:right;"><div class="valueDiv">'+al.value+"</div></td></tr>";
}ao+="</tbody></table></div></td>";}ao+="</tr></tbody></table></td>";ao+='<td style="padding:0px 20px 20px 5px"><table border="0" style="width:100%;float:left" class="reporterLogonServerStartUpTable"><tbody>';if(R!=undefined){ao+='<tr><td style="padding-left:10px;padding-right:20px"><table width="100%"><tbody><tr><td class="reporterLogonPanelHead" style="text-align:left;width:90%">'+R.key+' (secs)</td><td style="align:right;" class="reporterLogonPanelHead"><div style="float:right;width:80px;text-align:right;">'+R.value+"</div></td></tr></tbody></table></td></tr>";
}ao+='<tr><td style="padding-left:10px;"><div style="height:150px;overflow:auto;width:100%"><table class="reporterLogonPanelBody" width="100%"><tbody>';if(aw!=undefined){for(var aI in aw){var aA=aw[aI];ao+='<tr><td style="width:80%">'+aA.key+'</td><td style="align:right;"><div class="valueDiv">'+aA.value+"</div></td></tr>";
}}ao+="</tbody></table></div></td></tr>";ao+="</tbody></table></td>";ao+="</tr></tbody>";ao+="</table>";ao+="</div></td></tr></tbody></table>";var L=aP.gpDatas;if(L!=undefined){ao+=' <div class="userLogonInnerTableOuter bg2" style="position:relative;margin:10px 0px 5px 0px;"><div class="reportLog  onGridColumnHighlightArrow" style="left:100px;top:-10px"></div><p class="font_bold12">Details of client side extensions</p><div style="margin-top:10px;" class="newTable"><table width="100%"><thead><tr>';
var l=L.gpHeader;var v=L.gpDataArr;if(l!=undefined){for(var a0 in l){ao+="<th>"+l[a0]+"</th>";}}ao+="</tr></thead><tbody>";if(v!=undefined){for(var ak in v){ao+="<tr>";var a4=v[ak];for(var aW in l){var e=l[aW];ao+="<td>"+a4[e]+"</td>";}ao+="</tr>";}}ao+="</tbody></table></div></div>";}ao+="</div>";aq[aY]["app"]=ao;
}}var ai=[];for(var ap in aq[0]){ai.push(ap);}if(H){ai.push("app");}var ah=Ext.create("Ext.data.Store",{fields:ai,proxy:{type:"pagingmemory",reader:{type:"json",root:"data",totalProperty:"total"},},pageSize:aC.NewGridObj.gridRowSize,autoLoad:true,data:aq,});var aG=[];var ay={};if(H){aG=[{ptype:"rowexpander",selectRowOnExpand:true,expandOnDblClick:false,expandOnEnter:false,collapsible:true,animCollapse:false,rowBodyTpl:['<div style="padding:0px 0px 0px 0px;display:inline-block;position:relative;width:100%;">{app}</div>',]}];
ay={stripeRows:true,getRowClass:function(c,a7,a6,i){if(c.data.app.length>0){return;}else{return"hidePlus";}}};}var ax=true;if(aH.groupByValue!=null&&aH.groupByValue!=undefined&&aH.groupByValue=="Details"){ax=false;}var a5;if(aq.length<aC.NewGridObj.gridRowSize){a5=true;}else{a5=false;}O.push({xtype:"panel",ui:"newGraphPanel",columnWidth:1,margin:"0 10 10 10",needtoFixColumn:true,title:"User Logon Analysis (Secs)",items:[{xtype:"customgrid",store:ah,sortableColumns:false,ui:"newGridPanel noHoverColor headerTextWrap",id:"mainGrid3",margin:"0 10 10 10",activePage:1,border:true,scroll:true,autoScroll:true,columns:an,bodyPadding:"0 0 0 0",plugins:aG,forceFit:ax,viewConfig:ay,listeners:{sortchange:function(a6,a7,a8,i,c){aJ.gridColIndexParam=a7.getIndex();
aJ.gridColStateParam=a7.sortState;this.getStore().loadPage(I);},render:function(c){c.columns[az].doSort("ASC");}},dockedItems:[{xtype:"pagingtoolbar",dock:"bottom",cls:"newPagination",displayInfo:true,store:ah,hidden:a5,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No topics to display",listeners:{change:function(c,i){if(!Ext.isEmpty(i)&&!a5){Ext.getCmp("mainGrid3").activePage=i.currentPage;
}else{Ext.getCmp("mainGrid3").activePage=1;}}}}]}]});}}else{if(!Ext.isEmpty(aC)){if(aC.NewGridObj!=undefined){var Y=aC.NewGridObj.columns;var Z;if(aH.groupByValue!=undefined&&aH.groupByValue=="Summary"){Z=4;}else{Z=aC.NewGridObj.sortIndex;}if(Z==undefined||Z=="undefined"){Z=aC.sortIndex;}var aq=aC.NewGridObj.dataArray;
var an=new Array();var ab=false;var ad=true;var h=0;if(Y.length<=9){ab=true;ad=false;}var U=0;var aB="";for(var ap in Y){var am=170;mainColumn=Y[ap];var t=mainColumn;if(U==0){am=150;}else{am=120;}mainColumn=mainColumn.trim();var aT="center";if(mainColumn=="User Name"||mainColumn=="Server"||mainColumn=="session startup Time"||mainColumn=="Client ip address"||mainColumn=="Client name"){aT="left";
}if(mainColumn!=undefined&&mainColumn=="Session start-up duration"){h=ap;}var aa=mainColumn;an.push({header:aa,sortable:true,align:aT,dataIndex:t,renderer:function(a8,a9,c,bb,a6,i){if(a8.indexOf("$$")>-1){var a7="";var ba=a8.substring(a8.indexOf("$$")+2,a8.length);a8=a8.substring(0,a8.indexOf("$$"));
if(ba=="critical"){a7="reporterUserLogonHigh";}else{if(ba=="major"){a7="reporterUserLogonMedium";}else{if(ba=="minor"){a7="reporterUserLogonLow";}else{if(ba=="normal"){a7="reporterUserLogonNormal";}else{a7="reporterUserLogonDefault";}}}}a9.tdAttr='data-qtip="'+a8+'"';a9.tdCls="reportLogonGridColumnHighlight";
a8=Ext.getCmp("mainGrid").getDecimalAlignFormat(a8);a8="<div class="+a7+' align="center" style="width:60%;">'+a8+"</div>";}else{a9.tdAttr='data-qtip="'+a8+'"';a8=Ext.getCmp("mainGrid").getDecimalAlignFormat(a8);}return a8;},doSort:function(i){var c=this.up("grid").store;var a6=this.getSortParam();c.sort({property:a6,direction:i,sorterFn:function(bb,ba){bb=bb.get(a6);
ba=ba.get(a6);if(bb.indexOf("$$")>-1){bb=bb.substring(0,bb.indexOf("$$"));}if(ba.indexOf("$$")>-1){ba=ba.substring(0,ba.indexOf("$$"));}if(bb.indexOf(".")>-1&&bb.indexOf(" ")>-1){var a8=bb.substring(0,bb.lastIndexOf(" "));var a9=new Date(Ext.Date.parse(a8,mgrDateFormat));var a7=Ext.Date.dateFormat(a9,getExtjsDateFormat("MMM-dd-yyyy"));
bb=a7+bb.substring(bb.lastIndexOf(" "),bb.length);}if(ba.indexOf(".")>-1&&ba.indexOf(" ")>-1){var a8=ba.substring(0,ba.lastIndexOf(" "));var a9=new Date(Ext.Date.parse(a8,mgrDateFormat));var a7=Ext.Date.dateFormat(a9,getExtjsDateFormat("MMM-dd-yyyy"));ba=a7+ba.substring(ba.lastIndexOf(" "),ba.length);
}if(!isNaN(bb)&&!isNaN(ba)){bb=Ext.isNumber(bb)?bb:parseFloat(String(bb),10);ba=Ext.isNumber(ba)?ba:parseFloat(String(ba),10);if(i=="ASC"){bb=isNaN(bb)?999999:bb;ba=isNaN(ba)?999999:ba;}else{bb=isNaN(bb)?0:bb;ba=isNaN(ba)?0:ba;}}else{if(!isNaN(new Date(bb))&&!isNaN(new Date(ba))){ba=new Date(ba).getTime();
bb=new Date(bb).getTime();}}return bb>ba?1:(bb<ba?-1:0);}});}});U++;}for(var aY in aq){var ag=aq[aY];var aP=ag.additionalDatas;var k=ag.additionalDatasforVDI;var z=ag.GPDetails;if(aP!=undefined){var aZ=aP.Server;var aw=aP.Client;var ao='<div style="margin:5px;"><table width="100%" border="0px" >';ao+="<tr>";
if(aZ!=undefined){ao+='<td width="50%"><div style="margin:0px 10px 10px 0px;" class="newPlainTable"><div class="font_bold12">Server Start up (secs)</div><div ><table>';for(var J in aZ){var a3=aZ[J];ao+="<tr><td>"+a3.key+"</td><td>"+a3.value+"</td></tr>";}ao+="</table></div></div></td>";}if(aw!=undefined){ao+='<td width="50%"><div style="margin:0px 10px 10px 0px;" class="newPlainTable"><div class="font_bold12">Client Start up (secs)</div><div><table>';
for(var J in aw){var at=aw[J];ao+="<tr><td>"+at.key+"</td><td>"+at.value+"</td></tr>";}ao+="</table></div></div></td>";}ao+="</tr>";ao+="</table></div>";}if(k!=undefined){var D=k.logonBreakup;var g=k.gpBreakup;var ao='<div style="margin:5px;"><table width="100%" border="0px" >';ao+="<tr>";if(D!=undefined){ao+='<td width="50%"><div style="margin:0px 10px 10px 0px;" class="newPlainTable"><div class="font_bold12">logon Time Break-up (secs)</div><div style="height:140px;"><table>';
for(var J in D){var a3=D[J];ao+="<tr><td>"+a3.key+"</td><td>"+a3.value+"</td></tr>";}ao+="</table></div></div></td>";}if(g!=undefined){ao+='<td width="50%"><div style="margin:0px 10px 10px 0px;" class="newPlainTable"><div class="font_bold12">Group policy Time Break-up (secs)</div><div style="height:140px;"><table>';
for(var J in g){var at=g[J];ao+="<tr><td>"+at.key+"</td><td>"+at.value+"</td></tr>";}ao+="</table></div></div></td>";}ao+="</tr>";ao+="</table></div>";}if(z!=undefined){var aE=z.Header;var L=z.Datas;ao+='<div style="margin:5px;" class="newTable"><div class="font_bold12">Details of client side extensions</div><table width="100%" border="0px" >';
ao+="<thead><tr>";for(var aW in aE){ao+="<th>"+aE[aW]+"</th>";}ao+="</tr></thead><tbody>";for(var p in L){var a4=L[p];ao+="<tr>";for(var aW in aE){var e=aE[aW];ao+="<td>"+a4[e]+"</td>";}ao+="</tr>";}ao+="</tbody></table></div>";}aq[aY]["app"]=ao;}var a=function(){this.data=null;this.total=0;};var a5;
if(aq.length<aC.NewGridObj.gridRowSize){a5=true;}else{a5=false;}var ai=[];var a2=Object.keys(aq[0]).length;for(var ap in aq[0]){ai.push(ap);}ai.push("app");var ah=Ext.create("Ext.data.Store",{fields:ai,proxy:{type:"pagingmemory",reader:{type:"json",root:"data",totalProperty:"total"},},pageSize:aC.NewGridObj.gridRowSize,autoLoad:true,data:aq,});
var I=1;var q="User Logon Analysis (Secs)";if(aR!=undefined&&aR=="Citrix_XcXenApp_server"){q="Session Startup Analysis (Secs)";}aj="<span>"+q+"</span>"+s;O.push({xtype:"panel",ui:"newGraphPanel",columnWidth:1,margin:"0 10 10 10",title:aj,items:[{xtype:"customgrid",store:ah,ui:"newGridPanel headerTextWrap noHoverColor",sortableColumns:true,margin:"10 10 10 10",id:"mainGrid",columns:an,bodyPadding:"0 0 0 0",scroll:true,border:true,forceFit:true,popUpData:"noTooltip",plugins:[{ptype:"rowexpander",selectRowOnExpand:true,expandOnDblClick:false,expandOnEnter:false,collapsible:true,animCollapse:false,rowBodyTpl:['<div style="padding:0px 0px 0px 0px;display:inline-block;position:relative;width:100%;">{app}</div>',]}],viewConfig:{stripeRows:true,getRowClass:function(c,a7,a6,i){if(c.data.app.length>0){return;
}else{return"hidePlus";}}},listeners:{sortchange:function(a6,a7,a8,i,c){aJ.gridColIndexParam=a7.getIndex();aJ.gridColStateParam=a7.sortState;this.getStore().loadPage(I);},render:function(c){Ext.defer(function(){c.columns[Z].setSortState("ASC",true,false);},100);}},dockedItems:[{xtype:"pagingtoolbar",cls:"newPagination",dock:"bottom",displayInfo:true,store:ah,hidden:a5,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No topics to display",listeners:{change:function(c,i){if(!Ext.isEmpty(i)&&!a5){I=i.currentPage;
}else{I=1;}}}}]}]});}}if(aH.groupByValue=="Summary"){Ext.getCmp("bckButton_1").hide();if(appConstants.enableBack!=undefined&&appConstants.enableBack=="yes"){Ext.getCmp("bckButton").show();}}}Ext.getCmp("csvTool").setDisabled(false);var j=aC.LogonDetails;var G='<div style="margin:10px;"><table width="100%" border="0px"><tr width="100%">';
var o="25%";var b=aC.sessionReconnectGraph;if(b!=undefined){o="20%";}for(var ap in j){var n=j[ap];var C="";if(n.name!=undefined&&n.name=="Users"&&n.value!=undefined&&n.value>0){C=' style="cursor:pointer" onclick="javascript:openDrillDownWin(\'/final/reporter/ErSlowLogonDetailsReportDrillDown.jsp?frm=userlogon&reqFrom=userLogon\');"';
}G+='<td align="center" width="'+o+'"><table '+C+'><tr><td align="right" style="padding-right:5px"><div class="'+n.iconclass+'"></div></td><td style="text-align:left;padding-left:5px" class="newFont_bold28">'+n.value+'</td></tr><tr><td style="text-align:center;padding: 5px;" colspan="2"><span class="newFont_normal13" >'+n.name+"</span></td></tr></table></td>";
}if(b!=undefined){var N=b.DataSet;var w=N[0].data;var aO=w[0].y;var u=w[1].y;G+='<td  width="'+o+'"><table width="100%"><tr><td width="60%"><div id="reconn_1"></div></td><td width="40%"><table align="center"><tr><td><div style="height:7px;width:7px;-webkit-border-radius:4px;background-color:#ffc76b"></div></td><td>&nbsp;Connect&nbsp;</td><td>&nbsp;('+u+')</td></tr><tr><td><div style="height:7px;width:7px;-webkit-border-radius:4px;background-color:#00aaa0"></div></td><td>&nbsp;Reconnect</td><td>&nbsp;('+aO+")</td></tr></table></td></tr></table></td>";
}G+="</tr></table></div>";var F=aC.LogonDetailsTitle;if(F==undefined){F="Overview";}aL.add({xtype:"panel",ui:"newGraphPanel",title:F,margin:"10 10 10 10",columnWidth:1,html:G},{xtype:"panel",columnWidth:1,layout:"column",margin:"0 10 0 10",items:[{xtype:"panel",ui:"newGraphPanel",title:"Logon Performance Distribution",margin:"0 5 10 0",height:300,columnWidth:0.5,items:[{xtype:"container",id:"Logon_Id",layout:"column",columnWidth:1,height:270,items:[{xtype:"container",id:"graph_1",columnWidth:0.6,height:270,listeners:{"boxready":function(a7){var a6=aC.logOnDistributionGraph;
if(a6!=undefined){var i={};i=jQuery.extend(true,{},getHighChartsBarInstance("graph_1",250,400),i);i.setData(a6,appConstants.currentDateFormat,"");i.drawChart();}else{Ext.get("Logon_Id").update('<div style="text-align:center;vertical-align:middle;top:20%;position:relative;"><img src="/final/images/'+strSkin+'/nomeasures_custom.png"></img></div>');
}}}},{xtype:"container",columnWidth:0.4,id:"legendId_1",height:250,listeners:{"boxready":function(ba){var a9=aC.logOnDistributionGraph;if(a9!=undefined){var a7=a9["legendArray"];var a8="";var i='<div style="height:270px;display:table-cell;vertical-align:middle;"><table>';for(var a6 in a7){a8=a7[a6];i+='<tr><td valign="middle" style="padding-right: 5px;"><div style="height:7px;width:7px;-webkit-border-radius:4px;background-color:'+a8.color+'"></div></td><td>'+a8.name+'</td><td style="padding-left: 10px;">'+a8.percent+"%</td></tr>";
}i+="</table>";Ext.get("legendId_1").update(i);}}}}],}]},{xtype:"panel",margin:"0 0 0 5",columnWidth:0.5,title:"Total Logons vs Avg Logon Duration",ui:"newGraphPanel",height:300,items:[{xtype:"container",id:"logon_2",margin:"0 5 0 0 ",listeners:{"boxready":function(a7){var a6=aC.DistributionGraph;if(a6!=undefined){var i={};
i=jQuery.extend(true,{},getHighChartsBarInstance_combine("logon_2",270,380),i);i.setData(a6,appConstants.currentDateFormat,"");i.drawChart();}else{Ext.get("logon_2").update('<div style="text-align:center;vertical-align:middle;top:20%;position:relative;"><img src="/final/images/'+strSkin+'/nomeasures_custom.png"></img></div>');
}}}}]}]});aL.add(O);aL.show();aL.doLayout();if(b!=undefined){var av={};av=jQuery.extend(true,{},getHighChartsBarInstance("reconn_1",100,100),av);av.setData(b,"<%=currentDateFormat%>","");av.drawChart();}else{var aD=Ext.get("reconn_1");if(aD!=undefined){Ext.get("reconn_1").update('<div style="text-align:center;vertical-align:middle;top:20%;position:relative;"><img src="/final/images/'+strSkin+'/nomeasures_custom.png"></img></div>');
}}if(!Ext.isEmpty(aX)){if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}for(var X=0;X<aX.length;X++){var V=aX[X];var aM=Ext.getCmp(V);if(!Ext.isEmpty(aM)){var w=aM.data;var y=w.chartType;var f=w.DataSet;if(!Ext.isEmpty(w)&&!Ext.isEmpty(f)){var a1=w.chartWidth;if(y!="pie"){if(!Ext.isEmpty(aL)){var r=aL.getBox();
var aN=r.width;aN=aN*50/100;if(a1>aN){a1=aN;}}this.updateBarCharts("highchart","",w.XML,w.swfpath,w,w.chartHeight-30,a1,aM);}else{var aS=Ext.get(V);this.updatePieChart(w,"pieColors","urlLinks","pieLabels",aS);}}else{Ext.get(V).update('<table width="100%" height="100%"><tr><td align="center" valign="middle"><img   src="/final/images/'+strSkin+'/nomeasures_custom.png" /></td></tr></table>');
}}}}},updateBarCharts:function(h,d,e,j,i,f,b,c){var g;g='<div style="align:center"><div style="margin:10px 0px 0px 0px;"><div class="font_normal12" style="text-align:center;">'+d+'</div><div id="topgraphdiv"></div></div></div>';c.update(g);var a={};a=jQuery.extend(true,{},getHighChartsBarInstance("topgraphdiv",f,b),a);
a.setData(i,"<%=currentDateFormat%>","");a.drawChart();},updatePieChart:function(e,n,l,o,m){var f=e.chartHeight;var g=0;var k='<table cellpadding="0" cellspacing="0" border="0" style="margin:5px;valign:top" valign="top">';k+="<tr>";var v="piegraphdiv";if(!Ext.isEmpty(v)){v+="_"+m.id;}if(!$.isArray(e)){var d=e[o];
var p=e[n];var t=e[l];for(var u in d){var h=d[u];var c=p[u];var b=t[u];if(!Ext.isEmpty(b)&&b.indexOf("openInNewWin")>-1){b=b.substring(b.indexOf("(")+1,b.length-1);}k+='<td style="valign:top;padding:4px 0px 4px 0px" valign="top"><div style="background-color:#'+c+';width:6px;height:6px;border-radius:3px;">&nbsp;</div></td>';
k+='<td valign="top" style="padding:0px 5px 5px 5px;white-space:nowrap;word-wrap:break-word;valign:top" WRAP class="font_normal10">'+stringDivider(h,35,"</br>")+"</td>";if(g==1){k+="</tr><tr>";g=0;}else{g++;}}}else{for(var r=0;r<e.length;r++){var a=e[r][n];if(a.indexOf("#")<0){a="#"+a;}var s=e[r][o];
k+='<td style="valign:top;padding:4px 0px 4px 0px" valign="top"><div style="background-color:'+a+';width:6px;height:6px;border-radius:3px;">&nbsp;</div></td>';k+='<td valign="top" style="padding:0px 5px 5px 5px;white-space:nowrap;word-wrap:break-word;valign:top" WRAP class="font_normal10">'+stringDivider(s,35,"</br>")+"</td>";
if(g==1){k+="</tr><tr>";g=0;}else{g++;}}}k+="</tr>";k+="</table>";var q;q='<div style="margin:20px 0px 0px 0px;" align="center"><div align="center" id="'+v+'" ></div><div>'+k+"</div></div>";m.update(q);var j={};j=jQuery.extend(true,{},getHighChartsBarInstance(v,f,highChartPieWidth),j);j.setData(e,"<%=currentDateFormat%>","");
j.drawChart();},loadReportData:function(g){var s=Ext.getCmp("er_compType").getValue();var z="User Logon Analysis (Secs)";if(s!=undefined&&s=="Citrix_XcXenApp_server"){z="Session Startup Analysis (Secs)";}var k=new Array();var v=Ext.getCmp("selectionDetails");var p=false;var l=Ext.getCmp("resultPanel");
var u=g;l.removeAll();appConstants.publicjsonDataActivity=g;var j=g["chartType"];reportType=g.selectedreportType;if(appConstants.reportType==true){try{Ext.getCmp("csvTool").setDisabled(true);this.getNomeasurepanel().hide();l.show();if(l.getHeader()!=undefined&&l.getHeader().hide()){l.getHeader().show();
}var d=false;var c=g;var m=c["DISTRIBUTION_CHART_RESULTS"];var f=c["TOP_CHART_RESULTS"];if(!Ext.isEmpty(m)&&!Ext.isEmpty(f)){l.add({xtype:"panel",ui:"multiGraphPanel",columnWidth:1,title:z,layout:{type:"hbox",align:"stretch"},margin:"10 10 10 10",items:[{xtype:"panel",ui:"newGraphPanel",title:m.TITLE,flex:0.65,id:"leftChartContainer",margin:"5 10 10 10"},{xtype:"panel",ui:"newGraphPanel",flex:1,title:f.TITLE,id:"rightChartContainer",margin:"5 10 10 0",}]});
l.show();}if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}if(!Ext.isEmpty(m)){var b=m["TITLE"];var y=m["SWF_PATH"];var n=m["XMLDATA"];if(n!=undefined&&!Ext.isEmpty(n)){appConstants.erUtils.updatePieChart(appConstants.chartType,m.LEGENDS.LEGEND_LINKS,"COLOR","LINK","LABEL","",n,y,m,Ext.getCmp("leftChartContainer"));
Ext.getCmp("selectionDetails").setSelectionDetailsData(g.selectionDetails);}else{l.hide();d=true;this.getNomeasurepanel().show();}}if(!Ext.isEmpty(c["TOP_CHART_RESULTS"])){var f=c["TOP_CHART_RESULTS"];var r=f["TITLE"];var o=f["HEIGHT"];var i=f["SWF_PATH"];var t=f["XMLDATA"];var w=f["topGraph"];var h=w["xAxisLabel"];
if(!Ext.isEmpty(h)&&h.length>0){appConstants.erUtils.updateBarChart(appConstants.chartType,"",t,i,w,w.chartHeight,w.chartWidth,Ext.getCmp("rightChartContainer"));Ext.getCmp("bookletTool").setDisabled(false);Ext.getCmp("saveTool").setDisabled(false);Ext.getCmp("printTool").setDisabled(false);Ext.getCmp("mailTool").setDisabled(false);
d=false;}else{d=true;}}if(d){l.hide();this.getNomeasurepanel().doLayout();this.getNomeasurepanel().show();Ext.getCmp("bookletTool").setDisabled(true);Ext.getCmp("saveTool").setDisabled(true);Ext.getCmp("printTool").setDisabled(true);Ext.getCmp("mailTool").setDisabled(true);}}catch(x){Ext.getCmp("bookletTool").setDisabled(true);
Ext.getCmp("saveTool").setDisabled(true);Ext.getCmp("printTool").setDisabled(true);Ext.getCmp("mailTool").setDisabled(true);}}else{l.removeCls("containerShadow");Ext.getCmp("csvTool").setDisabled(false);Ext.getCmp("bookletTool").setDisabled(false);Ext.getCmp("saveTool").setDisabled(false);Ext.getCmp("printTool").setDisabled(false);
Ext.getCmp("mailTool").setDisabled(false);var s=u.compType;if(s!=undefined&&(s=="Horizon_Pod"||s=="VMware_View_server")){if(u.NO_DATA!=undefined&&!u.NO_DATA){this.getNomeasurepanel().hide();Ext.getCmp("selectionDetails").setSelectionDetailsData(g.selectionDetails);var q=Ext.getCmp("resultPanel");q.removeAll();
q.add({xtype:"podresultview",data:u});q.show();}else{this.disableTools();l.hide();this.getNomeasurepanel().doLayout();this.getNomeasurepanel().show();Ext.getCmp("bookletTool").setDisabled(true);Ext.getCmp("saveTool").setDisabled(true);Ext.getCmp("printTool").setDisabled(true);Ext.getCmp("mailTool").setDisabled(true);
}}else{var a=u.GridObj;if(a!=undefined){this.getNomeasurepanel().hide();this.loadGrid(a);Ext.getCmp("selectionDetails").setSelectionDetailsData(g.selectionDetails);}else{this.disableTools();l.hide();this.getNomeasurepanel().doLayout();this.getNomeasurepanel().show();Ext.getCmp("bookletTool").setDisabled(true);
Ext.getCmp("saveTool").setDisabled(true);Ext.getCmp("printTool").setDisabled(true);Ext.getCmp("mailTool").setDisabled(true);initLdgMask.hide();}}}initLdgMask.hide();},submitReport:function(){Ext.getCmp("panelinsidetoggle").setDisabled(false);initLdgMask.show();var n=true;if(Ext.getCmp("optionmultipane").isHidden()&&!Ext.getCmp("er_user").isHidden()){var h=Ext.getCmp("er_user").getValue();
h=h.split(",");if(h!=null&&h!="undefined"&&h.length>0){for(var j=0;h.length>j;j++){if(h[j].trim()!=""&&h[j].trim().length>0){n=false;}}}}if(Ext.getCmp("optionmultipane").isHidden()&&!Ext.getCmp("er_user").isHidden()&&n){initLdgMask.hide();Ext.MessageBox.show({title:"Alert",msg:"User value cannot be empty",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}var d;var c;var p;var r=false;var q="../servlet/com.eg.ErStartBackGroundReportC?isSubmit=true&SaveFormat=CSV";var b=Ext.getCmp("mainform").getForm();if(!isSettingsEnabled){this.showConfigDropdown();this.fillSettingFieldsForActivity(appConstants.publicjsonDataActivity);}var e=this.getThinclientusersettings().getForm();
var m=b.findField("report_category").getValue();appConstants.report_for=m;this.updateQStringActivity();p="er_type="+b.findField("er_type").getValue();d="../servlet/com.eg.ErUserLogonDetailsReportC?isSubmit=true&responseType=json";c="/final/servlet/com.eg.ErStartBackGroundReportC";var g=Ext.getCmp("resultPanel");
var i=Ext.getCmp("selectionDetails");var f=Ext.getCmp("backGroundPanel");var a=Ext.getCmp("reportGeneration").getValue();var o="";this.getEmptypanel().hide();if(a=="foreground"){f.hide();Ext.Ajax.request({url:d,params:p+"&"+appConstants.queryStringActivity,scope:this,timout:320000,success:function(k){var s=Ext.decode(k.responseText);
this.loadReportData(s);}});}else{if(a=="background"){g.hide();this.getNomeasurepanel().hide();Ext.getCmp("csvTool").setDisabled(true);myMask=new Ext.LoadMask(Ext.getBody(),{msg:"Loading..."});myMask.show();var l=Ext.getCmp("bgReportName").getValue();Ext.Ajax.request({url:c,params:p+"&bg_reportname="+l+"&"+appConstants.queryStringActivity,scope:this,method:"POST",success:function(k){var w=k.responseText;
var u=Ext.decode(w);var v=u.backgroundReportStatus;if(v!="undefined"){if(v=="success"){var s=u.bgroundResponseTxt;var y=u.bgroundReportsURL;var t=u.backgroundAnchor;var x="";f.update('<table border="0px" width="100%" height="100%"><tr><td align="center" valign="middle"><table style="width:480px;"border="0px"><tr><td><div style="margin:0px 10px 0px 0px;display:block;width:32px;height:32px;float:right;" class="iconSuccess"></div></td><td><div style="line-height:1.5em" class="font_bold11">'+s+".</br>"+'<a class="backgroundMsgLink" href='+y+">"+t+"</a></div></td></tr></table></td></tr></table>");
}else{if(v=="duplicate"){var s=u.bgroundResponseTxt;var y=u.bgroundReportsURL;var t=u.backgroundAnchor;f.update('<table border="0px" width="100%" height="100%"><tr><td align="center" valign="middle"><table style="width:480px;"border="0px"><tr><td><div style="margin:0px 10px 0px 0px;display:block;width:32px;height:32px;float:right;" class="iconExclamation"></div></td><td><div style="line-height:1.5em" class="font_bold11">'+s+".</br>"+'<a class="backgroundMsgLink" href='+y+">"+t+"</a></div></td></tr></table></td></tr></table>");
}else{var s=u.bgroundResponseTxt;f.update('<table border="0px" width="100%" height="100%"><tr><td align="center" valign="middle"><table style="width:480px;"border="0px"><tr><td><div style="margin:0px 10px 0px 0px;display:block;width:32px;height:32px;float:right;" class="iconExclamation"></div></td><td><div style="line-height:1.5em" class="font_bold11">'+s+"</div></td></tr></table></td></tr></table>");
}}}else{f.update('<table border="0px" width="100%" height="100%"><tr><td align="center" valign="middle"><table style="width:480px;"border="0px"><tr><td><div style="margin:0px 10px 0px 0px;display:block;width:32px;height:32px;float:right;" class="iconExclamation"></div></td><td><div style="line-height:1.5em" class="font_bold11">ErroR In BackGround Generation</div></td></tr></table></td></tr></table>');
}f.show();myMask.hide();}});}else{if(a=="background-csv"){g.hide();myMask=new Ext.LoadMask(Ext.getBody(),{msg:"Loading..."});myMask.show();var l=Ext.getCmp("bgReportName").getValue();Ext.Ajax.request({url:q,params:p+"&bg_reportname="+l+"&"+appConstants.queryStringActivity,scope:this,method:"POST",success:function(k){var w=k.responseText;
var u=Ext.decode(w);var v=u.backgroundReportStatus;if(v!="undefined"){if(v=="success"){var s=u.bgroundResponseTxt;var x=u.bgroundReportsURL;var t=u.backgroundAnchor;f.update('<table border="0px" width="100%" height="100%"><tr><td align="center" valign="middle"><table style="width:480px;"border="0px"><tr><td><div style="margin:0px 10px 0px 0px;display:block;width:32px;height:32px;float:right;" class="iconSuccess"></div></td><td><div style="line-height:1.5em" class="font_bold11">'+s+".</br>"+'<a class="backgroundMsgLink" href='+x+">"+t+"</a></div></td></tr></table></td></tr></table>");
}else{if(v=="duplicate"){var s=u.bgroundResponseTxt;var x=u.bgroundReportsURL;var t=u.backgroundAnchor;f.update('<table border="0px" width="100%" height="100%"><tr><td align="center" valign="middle"><table style="width:480px;"border="0px"><tr><td><div style="margin:0px 10px 0px 0px;display:block;width:32px;height:32px;float:right;" class="iconExclamation"></div></td><td><div style="line-height:1.5em" class="font_bold11">'+s+".</br>"+'<a class="backgroundMsgLink" href='+x+">"+t+"</a></div></td></tr></table></td></tr></table>");
}else{var s=u.bgroundResponseTxt;f.update('<table border="0px" width="100%" height="100%"><tr><td align="center" valign="middle"><table style="width:480px;"border="0px"><tr><td><div style="margin:0px 10px 0px 0px;display:block;width:32px;height:32px;float:right;" class="iconExclamation"></div></td><td><div style="line-height:1.5em" class="font_bold11">'+s+"</div></td></tr></table></td></tr></table>");
}}}else{f.update('<table border="0px" width="100%" height="100%"><tr><td align="center" valign="middle"><table style="width:480px;"border="0px"><tr><td><div style="margin:0px 10px 0px 0px;display:block;width:32px;height:32px;float:right;" class="iconExclamation"></div></td><td><div style="line-height:1.5em" class="font_bold11">ErroR In BackGround Generation</div></td></tr></table></td></tr></table>');
}f.show();myMask.hide();}});}}}},reportGenChange:function(){Ext.getCmp("resultPanel").hide();this.disableTools();var a=Ext.getCmp("reportGeneration").getValue();Ext.getCmp("submitViaSetting").show();Ext.getCmp("moreOptionCloseId").hide();if(a=="background"){Ext.getCmp("bgReportName").setValue("");Ext.getCmp("bgReportName").show();
}else{if(a=="background-csv"){Ext.getCmp("bgReportName").setValue("");Ext.getCmp("bgReportName").show();}else{Ext.getCmp("bgReportName").hide();Ext.getCmp("submitViaSetting").hide();Ext.getCmp("moreOptionCloseId").show();}}},loadTools:function(){this.getNewUtilities().loadIcon(true,true,true,false,true,true,true,false,false,false,true);
Ext.getCmp("favoriteTool").setDisabled(false);Ext.getCmp("scheduleTool").setDisabled(false);},disableTools:function(){Ext.getCmp("bookletTool").setDisabled(true);Ext.getCmp("saveTool").setDisabled(true);Ext.getCmp("printTool").setDisabled(true);Ext.getCmp("mailTool").setDisabled(true);Ext.getCmp("csvTool").setDisabled(true);
},updateQStringActivity:function(){var w;var x="";var y;var a;var u=Ext.getCmp("mainform").getForm();var g=null;if(isSettingsEnabled){g=this.getThinclientusersettings().getForm();}var z=u.findField("er_type").getValue();var p=u.findField("er_compType").getValue();w="select_farm="+u.findField("select_farm").getValue()+"&er_comptype="+u.findField("er_compType").getValue()+"&er_type="+z+"&er_excwe="+this.getSettingsFieldValue(g,"er_excwe",isSettingsEnabled,"excludeWeek")+"&er_brokeringFrom="+u.findField("brokeringFrom").getValue()+"&er_inclReconnect="+this.getSettingsFieldValue(g,"inclReconnect",isSettingsEnabled,"includeReconnects")+"&er_reportgenration="+this.getSettingsFieldValue(g,"reportGeneration",isSettingsEnabled,"reportGeneration");
w+="&er_componentType="+p+"&select_groupName="+u.findField("select_farm").getValue()+"&ervm_type=UserLogon";if(Ext.get("showLegend")!=null){w=w+"&showLegend="+u.findField("showLegend").getValue();}var j=Ext.getCmp("geofilter");if(j!=undefined&&!j.isHidden()){var f=Ext.getCmp("er_geoFilter").getValue();
if(!isSettingsEnabled){f=appConstants.publicjsonDataActivity.selectedgeoFilter;}if(f!=null&&f!="undefined"&&f.length>0){for(var t=0;f.length>t;t++){w+="&filterValue="+f[t];}}else{w+="&filterValue=All";}w+="&searchBasedOn="+Ext.getCmp("geofilter").geoFilterScreachStr;}if(z=="Yes"){w+="&er_mode="+u.findField("er_mode").getValue();
var c=this.getSettingsFieldValue(g,"er_perserver",isSettingsEnabled,"selectedAggServer");if(c!=null){w+="&er_perserver="+c;}w+="&eruserid="+appConstants.userId;}else{var s=Ext.getCmp("er_server").getValue();if(s!=null&&s!="undefined"&&s.length>0){for(var t=0;s.length>t;t++){w+="&er_component="+encodeURIComponent(s[t]);
}}if(Ext.getCmp("er_poolType_container").isVisible()){var b=Ext.getCmp("er_poolType").getValue();if(b!=undefined){for(var t=0;b.length>t;t++){w+="&er_poolType="+b[t];}}}if(s==undefined||s=="-1"||(s!=null&&s!=undefined&&s.length>1)){var c=this.getSettingsFieldValue(g,"er_perserver",isSettingsEnabled,"selectedAggServer");
if(c!=null){w+="&er_perserver="+c;}}if(appConstants.isExceedUserLimit){w+="&er_user="+encodeURIComponent(Ext.getCmp("er_user").getValue());}else{var n=Ext.getCmp("er_application").getValue();if(n!=null&&n!="undefined"&&n.length>0){for(var t=0;n.length>t;t++){var v=n[t];if(v.indexOf("+")>-1){v=v.substring(v.indexOf("+")+1);
}w+="&er_user="+encodeURIComponent(v);}}}w+="&eruserid="+appConstants.userId;if(isSettingsEnabled){w+="&glduration="+encodeURIComponent(Ext.getCmp("glduration").getValue());w+="&duration="+Ext.getCmp("duration").getValue();w+="&duraSelect="+Ext.getCmp("duraSelect").getValue();}else{w+="&glduration="+encodeURIComponent(appConstants.publicjsonDataActivity.selectedDuration);
w+="&duration="+appConstants.publicjsonDataActivity.durationValue;w+="&duraSelect="+appConstants.publicjsonDataActivity.selectedUnit;}}var d=this.getSettingsFieldValue(g,"timefrom",isSettingsEnabled,"selectedTimeFrom");var r=this.getSettingsFieldValue(g,"minfrom",isSettingsEnabled,"selectedMinsFrom");
var m=this.getSettingsFieldValue(g,"timeto",isSettingsEnabled,"selectedTimeTo");var l=this.getSettingsFieldValue(g,"minto",isSettingsEnabled,"selectedMinsTo");var y="&er_timeline="+u.findField("er_timeline").getValue()+"&startdate="+u.findField("er_stdate").dataArray+"&enddate="+u.findField("er_enddate").dataArray+"&starthr="+u.findField("er_sthr").dataArray+"&endhr="+u.findField("er_endhr").dataArray+"&startmin="+mgr_stmin+"&endmin="+mgr_enmin+"&er_secs=00";
var h="&timefrom="+d+"&minfrom="+r+"&timeto="+m+"&minto="+l;var q=Ext.getCmp("er_option").getValue();if(!Ext.isEmpty(q)){w+="&er_option="+q;}if(!Ext.isEmpty(Ext.getCmp("uppermajor"))){q=Ext.getCmp("uppermajor").getValue();if(!Ext.isEmpty(q)){w+="&uppermajor="+q;}q=Ext.getCmp("upperminor").getValue();
if(!Ext.isEmpty(q)){w+="&upperminor="+q;}q=Ext.getCmp("upperCritical").getValue();if(!Ext.isEmpty(q)){w+="&upperCritical="+q;}var o=Ext.getCmp("enableAggregation").checked;w+="&enableAggregation="+o;}if(z!="Yes"){q=Ext.getCmp("aggregateValue").getValue();if(!Ext.isEmpty(q)){w+="&er_aggregateValue="+q.groupByValue;
}w+="&er_priority="+u.findField("er_priority").getValue();}else{w+="&er_aggregateValue=Details";}if(appConstants.publicjsonDataActivity.hasOwnProperty("hiddenfields")){var i=appConstants.publicjsonDataActivity.hiddenfields;for(var e in i){x+="&"+e+"="+i[e];}}appConstants.queryStringActivity=w+y+x+h;},afterMainRender:function(){var a=this;
if(appConstants.er_RmDispName!=null&&appConstants.er_RmDispName!="null"&&appConstants.er_RmDispName!="undefined"){this.getMain().setTitle(appConstants.er_RmDispName);}else{this.getMain().setTitle(appConstants.publicjsonDataActivity.reportTitle);}this.fillFormFieldsForActivity(appConstants.publicjsonDataActivity);
if(!hideBackButton){Ext.getCmp("thinclientuserform").add({xtype:"hidden",id:"ID",name:"ID",value:appConstants.publicjsonDataActivity["ID"]});}},loadSettingsElements:function(){var c=appConstants.publicjsonDataActivity.hiddenfields;var a=c["favorite_id"];if(!Ext.isEmpty(a)&&!((appConstants.executeFavorite!="null"&&appConstants.executeFavorite=="true")||(appConstants.fromScheduleView!="null"&&appConstants.fromScheduleView=="true"))){Ext.getCmp("reportGeneration").setDisabled(true);
}Ext.getCmp("moreOptionCloseId").show();var b=this;this.fillSettingFieldsForActivity(appConstants.publicjsonDataActivity);Ext.EventManager.onWindowResize(function(){Ext.get("configMod").setStyle("left","");});Ext.get("closeSettings").on("click",function(){b.validateAndCloseSettings();});},closeSettingAndSubmit:function(){if(this.validateAndCloseSettings()){this.showResult();
}},validateAndCloseSettings:function(){var b=this.validateSettings();var a=Ext.getCmp("submit");a.setDisabled(true);if(b){a.setDisabled(false);Ext.get("configMod").animate({duration:500,to:{y:-500}});return true;}return false;},refreshReportData:function(){var a;a=appConstants.publicjsonDataActivity;
if(appConstants.isSubmit!=null&&appConstants.isSubmit=="true"){initLdgMask.show();this.submitReport();appConstants.isSubmit="false";}else{if(appConstants.isForceSubmit=="true"){appConstants.isForceSubmit="false";this.showResult();}}},fillFormFieldsForActivity:function(f){var g;var i;var o;var c="false";
if(f.hasOwnProperty("isSubmit")){var c=f.isSubmit;}var k=appConstants.publicjsonDataActivity.hiddenfields;var m=k["fromScheduleModify"];var a=k["fromFavoriteModify"];if((m!=null&&m=="Yes")||(a!=null&&a=="Yes")){Ext.getCmp("submit").hide();Ext.getCmp("save").show();}else{Ext.getCmp("submit").show();Ext.getCmp("save").hide();
}var p=Ext.getCmp("mainform").getForm();var d=f.screenLabels;var n=f.startHour;var j=f.endHour;var e=f.startDate;var b=f.endDate;var h=p.findField("er_stdate");h.setValue(f.startDateForDisplay);h.dataArray=e;var r=p.findField("er_sthr");r.setValue(f.startHourForDisplay);r.dataArray=n;var l=p.findField("er_enddate");
l.setValue(f.endDateForDisplay);l.dataArray=b;var q=p.findField("er_endhr");q.setValue(f.endHourForDisplay);q.dataArray=j;stmin=f.startMinForDisplay;enmin=f.endMinForDisplay;mgr_stmin=f.startmin;mgr_enmin=f.endmin;this.loadFormDataInfo(f);},loadFormDataInfo:function(i){var c=Ext.getCmp("mainform").getForm();
var h=i.screenLabels;var f;var g;var k;f=i.analysisByCombo;if(!Ext.isEmpty(f)){g=i.selectedAnalysisByCombo;k=c.findField("er_option");k.getStore().loadRawData(f);if(!Ext.isEmpty(g)){k.setValue(g);}else{k.setValue(f[0].valueField);}}k=Ext.getCmp("aggregateValue");k.setFieldLabel(h["reporter.common.AggregateValue"]);
g=i.selectedAggregateSessionValue;k=Ext.getCmp("groupByDetails");if(!Ext.isEmpty(g)){if(g=="Summary"){k=Ext.getCmp("groupBySummary");}}k.setValue(true);f=i.priorityCombo;g=i.selectedPriority;k=c.findField("er_priority");k.setFieldLabel(h["reporter.comparison.Show Top"]);k.getStore().loadRawData(f);if(!Ext.isEmpty(g)){k.setValue(g);
}else{k.setValue(f[2].valueField);}f=i.zoneCombo;g=i.selectedZone;k=c.findField("select_farm");k.setFieldLabel(h["reporter.consolidated.Zone"]);k.getStore().clearFilter(true);k.getStore().loadRawData(f);if(!Ext.isEmpty(g)){k.setValue(g);}else{k.setValue(f[0].valueField);}f=i.compTypeCombo;g=i.selectedCompType;
k=c.findField("er_compType");k.setFieldLabel(h["reporter.thin.Component Type"]);k.getStore().clearFilter(true);k.getStore().loadRawData(f);if(!Ext.isEmpty(g)){k.setValue(g);}else{k.setValue(f[0].valueField);}var b=Ext.getCmp("inclReconnect");if(b!=undefined){if(k.getValue()=="Citrix_XcXenApp_server"){Ext.getCmp("inclReconnect").show();
}else{Ext.getCmp("inclReconnect").hide();}}if(i.isVm!=undefined&&i.isVm=="true"){if(i.enableBrokering!=undefined&&i.enableBrokering=="yes"){if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").show();var e=i.enableBrokeringFor;Ext.getCmp("brokeringFrom").setValue(e);}}else{if(i.enableBrokering!=undefined&&i.enableBrokering=="No"){if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").hide();
var e=i.enableBrokeringFor;Ext.getCmp("brokeringFrom").setValue(e);}}else{var e=i.enableBrokeringFor;if(Ext.getCmp("brokeringFrom")!=undefined){Ext.getCmp("brokeringFrom").setValue(e);}}}}combObj=Ext.getCmp("er_showDeliveryGroup");g=i.selectedShowDeliveryGroup;combObj.hide();if(g!=undefined){combObj.setFieldLabel(h["reporter.common.Show Delivery Groups"]);
combObj=Ext.getCmp("deliveryGroupNo");if(g=="Yes"){combObj=Ext.getCmp("deliveryGroupYes");}combObj.setValue(true);combObj.show();}if(i.selectedCompType=="Horizon_Pod"||i.selectedCompType=="VMware_View_server"){Ext.getCmp("brokeringFrom").hide();Ext.getCmp("er_priority").hide();Ext.getCmp("optionmultipane").hide();
Ext.getCmp("er_poolType_container").show();}else{if((i.selectedCompType=="Citrix_XcXenDesktop_Director"||i.selectedCompType=="Citrix_XcXenDesktop_Site")&&i.selectedShowDeliveryGroup!=undefined&&i.selectedShowDeliveryGroup=="Yes"){Ext.getCmp("optionmultipane").hide();Ext.getCmp("er_poolType_container").show();
}else{Ext.getCmp("er_poolType_container").hide();}}f=i.reportForCombo;g=i.reportFor;k=c.findField("report_category");k.setFieldLabel(h["reporter.common.Report For"]);k.getStore().loadRawData(f);if(!Ext.isEmpty(g)){k.setValue(g);}else{k.setValue(f[0].valueField);}f=i.reportTypeCombo;g=i.selectedreportType;
k=c.findField("er_type");k.setFieldLabel(h["reporter.thin.Report Type"]);k.getStore().loadRawData(f);var n="";if(!Ext.isEmpty(g)){n=g;k.setValue(g);}else{n=f[0].valueField;k.setValue(f[0].valueField);}if(Ext.getCmp("enableDetailedData")!=undefined&&n=="No"){if(k.getValue()=="Citrix_XcXenApp_server"){Ext.getCmp("enableDetailedData").hide();
Ext.getCmp("enableDetailedDataSplitter").hide();}else{Ext.getCmp("enableDetailedData").show();Ext.getCmp("enableDetailedDataSplitter").show();}}if(n=="Yes"){c.findField("er_priority").hide();Ext.getCmp("aggregateValue").hide();}if(i.selectedreportType=="no"||i.selectedreportType=="No"){appConstants.reportType=false;
f=i.userCombo;appConstants.rawDataForUsers=i.userCombo;g=i.selectedUser;var l=i.disableUserCombo;var a=i.userTextFieldValue;if(l!=undefined&&l=="yes"){appConstants.isExceedUserLimit=true;}else{appConstants.isExceedUserLimit=false;}if(appConstants.isExceedUserLimit){if(c.findField("er_type").getValue()=="No"){appConstants.reportType=false;
Ext.getCmp("er_user").show();Ext.getCmp("optionmultipane").hide();Ext.getCmp("er_user").setValue(a);if(i.selectedCompType=="Horizon_Pod"||i.selectedCompType=="VMware_View_server"){Ext.getCmp("er_user").hide();Ext.getCmp("er_poolType_container").show();}else{Ext.getCmp("er_poolType_container").hide();
}}else{appConstants.reportType=true;}}else{if(c.findField("er_type").getValue()=="No"){appConstants.reportType=false;Ext.getCmp("optionmultipane").show();Ext.getCmp("er_user").hide();if(i.selectedCompType=="Horizon_Pod"||i.selectedCompType=="VMware_View_server"){Ext.getCmp("optionmultipane").hide();Ext.getCmp("er_poolType_container").show();
}else{Ext.getCmp("er_poolType_container").hide();}}else{appConstants.reportType=true;Ext.getCmp("optionmultipane").hide();}k=c.findField("er_application");k.getStore().loadRawData(f);if(!Ext.isEmpty(g)){k.setValue(g);}else{if(f!=undefined){k.setValue(f[0].valueField);}}k.show();}}if(!appConstants.reportType){c.findField("er_mode").hide();
f=i.serverCombo;g=i.selectedServer;k=Ext.getCmp("er_server");appConstants.rawDataForComponents=f;k.setFieldLabel(h["reporter.common.Server"]);k.getStore().loadRawData(f);if(!Ext.isEmpty(g)){k.setValue(g);}else{k.setValue(f[0].valueField);}k.show();if(g!=null&&g.indexOf("All ")>-1){if(Ext.getCmp("er_perserver")!=undefined){Ext.getCmp("er_perserver").show();
}}}else{f=i.graphTypeArray;g=i.selectedGraphType;if(g=="distribution"){f=i.measureCombo;g=i.selectedMeasure;k.show();}else{f=i.userCombo;appConstants.rawDataForUsers=i.userCombo;g=i.selectedUser;k=c.findField("er_application");k.getStore().loadRawData(f);if(!Ext.isEmpty(g)){k.setValue(g);}else{k.setValue(f[0].valueField);
}k.show();}Ext.getCmp("serverMultiSelectLbl").hide();}var j=i.timelineCombo;var m=i.selectedTimeline;var d=c.findField("er_timeline");d.setFieldLabel(h["reporter.common.Timeline"]);d.getStore().loadRawData(j);if(!Ext.isEmpty(j)){if(!Ext.isEmpty(m)){d.setValue(m);}else{d.setValue(j[0].valueField);}}if(appConstants.reportType!=true){f=i.userCombo;
appConstants.rawDataForUsers=i.userCombo;g=i.selectedUser;k=c.findField("er_application");k.getStore().loadRawData(f);if(!Ext.isEmpty(g)){k.setValue(g);}else{k.setValue(f[0].valueField);}k.show();}if(Ext.getCmp("er_option").getValue()=="Component"){Ext.getCmp("select_farm").hide();}else{Ext.getCmp("select_farm").show();
}},fillSettingFieldsForActivity:function(j){var e;var f;var m;var g="false";var c=this.getThinclientusersettings().getForm();var i=j.screenLabels;e=j.excludeWeekCombo;f=j.excludeWeek;m=c.findField("er_excwe");m.setFieldLabel(i["reporter.common.Exclude weekends"]);m.getStore().loadRawData(e);if(!Ext.isEmpty(f)){m.setValue(f);
}else{m.setValue(e[0].valueField);}f=j.includeReconnects;m=c.findField("inclReconnect");if(!Ext.isEmpty(f)){m.setValue(f);}else{m.setValue("Yes");}e=j.durationCombo;f=j.selectedDuration;m=c.findField("glduration");m.getStore().loadRawData(e);if(!Ext.isEmpty(f)){m.setValue(f);}else{m.setValue(e[0].valueField);
}e=j.unitCombo;f=j.selectedUnit;m=c.findField("duraSelect");m.getStore().loadRawData(e);if(!Ext.isEmpty(f)){m.setValue(f);}else{m.setValue(e[0].valueField);}var k=j.durationValue;m=c.findField("duration");if(!Ext.isEmpty(k)){m.setValue(k);}var p=Ext.getCmp("er_type").getValue();if(p=="No"){Ext.getCmp("enableAggregation").show();
Ext.getCmp("aggressionSplitter").show();var b=j.enableAggregationValue;if(!Ext.isEmpty(b)){if(b=="true"){Ext.getCmp("enableAggregation").setValue(true);Ext.getCmp("lowLimitLbl").show();}else{Ext.getCmp("enableAggregation").setValue(false);Ext.getCmp("lowLimitLbl").hide();}}else{var o=Ext.getCmp("enableAggregation").checked();
if(o){Ext.getCmp("lowLimitLbl").show();}else{Ext.getCmp("lowLimitLbl").hide();}}Ext.getCmp("duraSelect").show();Ext.getCmp("glduration").show();Ext.getCmp("duration").show();}else{Ext.getCmp("enableAggregation").hide();Ext.getCmp("aggressionSplitter").hide();Ext.getCmp("lowLimitLbl").hide();Ext.getCmp("duraSelect").hide();
Ext.getCmp("glduration").hide();Ext.getCmp("duration").hide();}if(!Ext.isEmpty(j.majorValue)){Ext.getCmp("uppermajor").setValue(j.majorValue);}Ext.getCmp("uppermajor").setFieldLabel(i["reporter.common.Major"]);if(!Ext.isEmpty(j.minorValue)){Ext.getCmp("upperminor").setValue(j.minorValue);}Ext.getCmp("upperminor").setFieldLabel(i["reporter.common.Minor"]);
if(!Ext.isEmpty(j.criticalValue)){Ext.getCmp("upperCritical").setValue(j.criticalValue);}Ext.getCmp("upperCritical").setFieldLabel(i["reporter.common.Critical"]);Ext.getCmp("timeperiodLbl").setText(i["reporter.common.Time period"]);c.findField("timefrom").setValue(j.selectedTimeFrom);c.findField("minfrom").setValue(j.selectedMinsFrom);
c.findField("timeto").setValue(j.selectedTimeTo);c.findField("minto").setValue(j.selectedMinsTo);var n=j.reportGenerationCombo;var l=j.reportGeneration;var d=c.findField("reportGeneration");d.setFieldLabel(i["reporter.common.Report Generation"]);d.getStore().loadRawData(n);d.setValue(l);var a=Ext.getCmp("inclReconnect");
if(a!=undefined){if(Ext.getCmp("er_compType").getValue()=="Citrix_XcXenApp_server"){Ext.getCmp("inclReconnect").show();}else{Ext.getCmp("inclReconnect").hide();}}if(Ext.getCmp("enableDetailedData")!=undefined&&p!=undefined&&p=="No"){if(Ext.getCmp("er_compType").getValue()=="Citrix_XcXenApp_server"){Ext.getCmp("enableDetailedData").hide();
Ext.getCmp("enableDetailedDataSplitter").hide();}else{Ext.getCmp("enableDetailedData").show();Ext.getCmp("enableDetailedDataSplitter").show();}}e=j.geoFilterCombo;if(e!=undefined){appConstants.geoFilterCombo=e;var h=Ext.getCmp("er_geoFilter");h.getStore().loadRawData(e);f=j.selectedgeoFilter;Ext.getCmp("multiSelectLabel_geo").setText(i["geoFilterLabel"]);
if(!Ext.isEmpty(f)){h.setValue(f);}else{h.setValue(e[0].valueField);}Ext.getCmp("geofilter").show();Ext.getCmp("geofilter").geoFilterScreachStr=j.geoFilterScreachStr;}},showConfigDropdown:function(){isSettingsEnabled=true;var b=new Ext.XTemplate('<div style="float:left;margin:0px 0px 0px 0px">More Options</div><div style="text-align:right;float:right;"><div class="iconCloseNew" id="closeSettings"></div></div>');
Ext.create("Ext.container.Container",{width:585,id:"configMod",ui:"settingsWindowContainer",items:[{xtype:"container",cls:"configMode_popupArrow",style:{"top":"-14px","left":"375px"}},{xtype:"container",html:b.apply(),cls:"containerHeader",style:{"top":"0px","margin":"0px"}},{xtype:"thinclientusersettings",parent:this}],renderTo:"thinclientuser"});
var d=appConstants.publicjsonDataActivity;var c=d["enableDetailedData"];var a=Ext.getCmp("mainform").getForm();if(c=="No"||a.findField("er_type").getValue()=="Yes"){Ext.getCmp("enableDetailedData").hide();Ext.getCmp("enableDetailedDataSplitter").hide();}},LoadDrillDownData:function(d){initLdgMask.show();
var b=this;var c=d.substring(d.indexOf("?")+1);var a=d.substring(0,d.indexOf("?"));var e=Ext.getCmp("resultPanel");Ext.Ajax.request({url:a,params:c+"&responseType=json",method:"POST",scope:this,success:function(n){var h=n.responseText;var r=Ext.decode(h);appConstants.publicjsonDataUsage=r;if(r.hasOwnProperty("drillDownData")){e.removeAll();
var m=r["drillDownData"];for(var o in m){var q=m[o];var g=q["columns"];var t=q["data"];if(!Ext.isEmpty(t)){var s='<div class="x-table" >'+'<table cellspacing="0" cellpadding="0" border="0" class="x-grid-table x-grid-table-resizer">'+"<thead>"+'<tr class="x-grid-row">';for(var o in g){s+='<th class=" x-grid-cell">'+'<div class="x-grid-cell-inner">'+g[o]+"</div>"+"</th>";
}s+="</tr>"+"</thead>"+"<tbody>"+'<tpl for=".">';for(var p in t){var f=t[p];s+='<tr class="x-grid-row">';for(var i in f){s+='<td class=" x-grid-cell x-grid-cell-first">'+'<div class="x-grid-cell-inner" >'+f[i]+"</div>"+"</td>";}s+="</tr>";}s+="</tpl>"+"</tbody>"+"</table>"+"</div>";if(o==1){e.add({xtype:"panel",margin:"0 0 10 0",ui:"newGraphPanel",layout:{columns:2,align:"center"},cls:"datapanel",tools:[{xtype:"button",text:backText,cls:"backbutton",iconCls:"iconBack",id:"thiClientbckButton",name:"thiClientbckButton",listeners:{"click":function(){b.submitReport();
}}}],bodyPadding:"0 0 0 0",padding:0,title:'<span class="font_bold">'+q.tableTitle+"</span>",width:"100%",html:s});}else{e.add({xtype:"panel",margin:"0 0 10 0",layout:{columns:2,align:"center"},cls:"datapanel",bodyPadding:"0 0 0 0",title:'<span class="font_bold">'+q.tableTitle+"</span>",width:"100%",padding:0,html:s});
}}}}else{this.disableTools();e.show();e.removeAll();e.add({xtype:"container",height:250,cls:"block1",margin:10,width:"100%",html:'<table width="100%" height="100%"><tr><td align="center" valign="middle"><div class="iconExclamation" ></div><div class="commonErrorMsgText">No Measures Available </div></td></tr></table>'});
}initLdgMask.hide();}});},getSettingsFieldValue:function(a,g,d,e){var b=null;b=appConstants.publicjsonDataActivity;var f="";if(d){var c=a.findField(g);if(!Ext.isEmpty(c)){f=c.getValue();}}else{if(b!=null){f=b[e];}}return f;},fromGridDetailData:function(c,e){Ext.getCmp("bckButton").hide();Ext.getCmp("bckButton_1").show();
initLdgMask.show();var b=this;var d="/final/reporter/ErUserLogonDetailsReportJson.jsp";var a=Ext.getCmp("resultPanel");a.removeAll();Ext.Ajax.request({url:d,params:c+"&responseType=json",method:"POST",scope:this,success:function(f){var k=f.responseText;var i=Ext.decode(k);appConstants.publicjsonDataUsage=i;
var j="";if(!Ext.isEmpty(i)){j=Ext.getCmp("aggregateValue");var h=i.selectedAggregateSessionValue;j=Ext.getCmp("groupByDetails");if(!Ext.isEmpty(h)){if(h=="Details"){j=Ext.getCmp("groupByDetails");}}j.setValue(true);g=i.priorityCombo;comboObject=Ext.getCmp("er_priority");comboObject.getStore().loadRawData(g);
if(!Ext.isEmpty(g)){comboObject.setValue(g[3].valueField);}else{comboObject.setValue(g[2].valueField);}var g=i.userCombo;j=Ext.getCmp("er_application");j.getStore().loadRawData(g);if(!Ext.isEmpty(e)){j.setValue(decodeURIComponent(e));}else{j.setValue(g[0].valueField);}}b.submitReport();}});initLdgMask.hide();
},backFun:function(){initLdgMask.show();var c=this;var a="";this.updateQStringActivity();var d="/final/reporter/ErUserLogonDetailsReportJson.jsp";var b=Ext.getCmp("resultPanel");b.removeAll();a+="&"+appConstants.queryStringActivity,a+="er_type=No";Ext.Ajax.request({url:d,params:a+"&responseType=json",method:"POST",scope:this,success:function(e){var j=e.responseText;
var h=Ext.decode(j);appConstants.publicjsonDataUsage=h;var i="";if(!Ext.isEmpty(h)){i=Ext.getCmp("aggregateValue");var g=h.selectedAggregateSessionValue;i=Ext.getCmp("groupBySummary");if(!Ext.isEmpty(g)){if(g=="Summary"){i=Ext.getCmp("groupBySummary");}}i.setValue(true);f=h.priorityCombo;g=h.selectedPriority;
comboObject=Ext.getCmp("er_priority");comboObject.getStore().loadRawData(f);if(!Ext.isEmpty(appConstants.DummyPriority)){comboObject.setValue(appConstants.DummyPriority);}else{comboObject.setValue(f[2].valueField);}var f=h.userCombo;i=Ext.getCmp("er_application");i.getStore().loadRawData(f);g=h.selectedUser;
if(!Ext.isEmpty(appConstants.DummyUsr)){i.setValue(appConstants.DummyUsr);}else{i.setValue(f[0].valueField);}}c.submitReport();}});initLdgMask.hide();}});