Ext.define("thinclientuserreports.controller.ThinclientUserReports",{extend:"Ext.app.Controller",gridColStateParam:"ASC",gridColIndexParam:-1,views:["Main"],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:"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},'mainform combo[name="er_graphType"]':{"select":this.graphTypeOnChange},'mainform multiselect[name="er_server"]':{"change":this.serverOnChange},'mainform button[id="expandSelector"]':{"click":this.expandMe},'mainform combo[name="er_compType"]':{"select":this.compTypeOnChange},'mainform combo[name="er_wrkrGrp"]':{"select":this.workerGroupOnChange},'thinclientusersettings combo[name="reportGeneration"]':{"select":this.reportGenChange},'thinclientusersettings combo[id="ShowResourceDetails"]':{"select":this.changeResourceDetails},'thinclientusersettings button[id="moreOptionCloseId"]':{"click":this.validateAndCloseSettings},'thinclientusersettings button[id="submitViaSetting"]':{"click":this.closeSettingAndSubmit},'thinclientusersettings radiogroup[id="adGroupFns"]':{"change":this.adGroupChange},'thinclientusersettings radiogroup[id="clientIpRadio"]':{"change":this.onShowDetailsClientVersion},'mainform button[itemId="submit"]':{"click":this.showResult},'mainform button[itemId="save"]':{"click":this.goTo},'mainform combo[name="er_organize"]':{"select":this.organizeOnChange},'mainform button[id="panelinsidetoggle"]':{"click":this.toggleForm},'mainform trigger[id="compSearch"]':{"change":this.filterMultiselect},'mainform combo[name="er_application"]':{"select":this.applicationOnChange},'main button[id="bckButtonForDrillDown"]':{"click":this.loadDrillDownBack},'mainform combo[id="er_option"]':{"select":this.onSelectAnalysisBy},'mainform combo[id="er_organize"]':{"select":this.onOraganizeBy},'mainform radiogroup[id="aggregateValue"]':{"change":this.onShowDetails},'adgroup button[id="adgroupExpand"]':{"click":this.expandMe},'adgroup trigger[id="adgroupSearch"]':{"change":this.filterMultiselect},'adgroup multiselect[id="er_adGroup"]':{"change":this.selectGroup},'aduserinfo button[id="adUserExpand"]':{"click":this.expandMe},'aduserinfo trigger[id="aduserSearch"]':{"change":this.filterMultiselect},'egdesktoppools button[id="er_poolType_expand"]':{"click":this.expandMe},'egdesktoppools trigger[id="er_poolType_Search"]':{"change":this.filterMultiselect},'aduserinfo multiselect[id="er_aduser"]':{"change":this.selectAdGroupUsers}});
},onOraganizeBy:function(){if(targetType=="User Session Report"){if(isSettingsEnabled){var d=Ext.getCmp("clientIpRadio");var b=Ext.getCmp("er_organize").getValue();if(b=="User"){var e=Ext.getCmp("adgrouppane");if(e!=undefined){e.hide();}var f=Ext.getCmp("aduserinfopane");if(f!=undefined){f.hide();}var i=Ext.getCmp("adGroupFns");
if(i!=undefined){i.hide();}if(appConstants.userState!=undefined&&appConstants.userState=="dropdown"){Ext.getCmp("er_application").show();}else{if(appConstants.userState!=undefined&&appConstants.userState=="textbox"){Ext.getCmp("er_application_text_box").show();}}Ext.getCmp("aggregateValue").show();if(appConstants.publicjsonDataUsage!=null&&appConstants.publicjsonDataUsage!=undefined&&appConstants.publicjsonDataUsage!="undefined"){if(appConstants.publicjsonDataUsage.hasOwnProperty("clientDetailsCompType")){if(d!=undefined){d.show();
}}else{if(d!=undefined){d.hide();}}}}else{var e=Ext.getCmp("adgrouppane");if(e!=undefined){e.show();}var f=Ext.getCmp("aduserinfopane");if(f!=undefined){f.show();}var i=Ext.getCmp("adGroupFns");if(i!=undefined){i.show();}var h=Ext.getCmp("er_application");var c=Ext.getCmp("er_application_text_box");appConstants.userState;
if(appConstants.userState!=undefined&&appConstants.userState=="dropdown"){Ext.getCmp("er_application").hide();}else{if(appConstants.userState!=undefined&&appConstants.userState=="textbox"){Ext.getCmp("er_application_text_box").hide();}else{if(h.isVisible()){appConstants.userState="dropdown";Ext.getCmp("er_application").hide();
}else{if(c.isVisible()){appConstants.userState="textbox";Ext.getCmp("er_application_text_box").hide();}}}}Ext.getCmp("aggregateValue").hide();if(i!=undefined){var g=i.getValue().adGroupByValue;if(g=="Details"){if(appConstants.publicjsonDataUsage!=null&&appConstants.publicjsonDataUsage!=undefined&&appConstants.publicjsonDataUsage!="undefined"){if(appConstants.publicjsonDataUsage.hasOwnProperty("clientDetailsCompType")){if(d!=undefined){d.show();
}}else{if(d!=undefined){d.hide();}}}}else{if(d!=undefined){d.hide();}}}}}else{var b=Ext.getCmp("er_organize").getValue();var a=Ext.getCmp("aggregateValue");var d=Ext.getCmp("clientIpRadio");var e=Ext.getCmp("adgrouppane");var f=Ext.getCmp("aduserinfopane");var i=Ext.getCmp("adGroupFns");if(b=="User"){if(e!=undefined){e.hide();
}if(f!=undefined){f.hide();}if(i!=undefined){i.hide();}if(appConstants.userState!=undefined&&appConstants.userState=="dropdown"){Ext.getCmp("er_application").show();}else{if(appConstants.userState!=undefined&&appConstants.userState=="textbox"){Ext.getCmp("er_application_text_box").show();}}if(a!=undefined){a.show();
}if(appConstants.publicjsonDataUsage!=null&&appConstants.publicjsonDataUsage!=undefined&&appConstants.publicjsonDataUsage!="undefined"){if(appConstants.publicjsonDataUsage.hasOwnProperty("clientDetailsCompType")){if(d!=undefined){d.show();}}else{if(d!=undefined){d.hide();}}}}else{if(e!=undefined){e.show();
}if(f!=undefined){f.show();}if(i!=undefined){i.show();}var h=Ext.getCmp("er_application");var c=Ext.getCmp("er_application_text_box");appConstants.userState;if(appConstants.userState!=undefined&&appConstants.userState=="dropdown"){Ext.getCmp("er_application").hide();}else{if(appConstants.userState!=undefined&&appConstants.userState=="textbox"){Ext.getCmp("er_application_text_box").hide();
}else{if(h.isVisible()){appConstants.userState="dropdown";Ext.getCmp("er_application").hide();}else{if(c.isVisible()){appConstants.userState="textbox";Ext.getCmp("er_application_text_box").hide();}}}}if(a!=undefined){a.hide();}if(d!=undefined){d.hide();}}}}},selectGroup:function(h,f,a,c){if(a==undefined||a=="undefined"){return;
}if(f=="-1"||f==""){return;}else{var d=Ext.getCmp("er_adGroup");var g="";if(d!=undefined){var e=d.getValue();if(!this.multiSelectAllvalidation(d.getValue(),"All")){Ext.MessageBox.show({title:"ALERT",msg:"All and Individual Groups cannot be selected simultaneously!",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}for(var b in e){g+="&er_adGroup="+encodeURIComponent(e[b]);}}initLdgMask.show();Ext.Ajax.request({url:"/final/reporter/ErCtxUserReportJson.jsp",params:g,method:"POST",scope:this,success:function(i){if(i.status==200&&!Ext.isEmpty(i.responseText)){var o=i.responseText;var l=Ext.decode(o);
appConstants.AdData=l;var m=Ext.getCmp("er_aduser");var k=l["adGroupUserCombo"];var j=l["selectedAdGroupUser"];if(!Ext.isEmpty(k)){m.suspendEvents(true);m.getStore().loadRawData(k);if(!Ext.isEmpty(j)){m.setValue(j);}else{var n=k[0].valueField;if(k.length>1){n=k[1].valueField;}m.setValue(n);}}}initLdgMask.hide();
},failure:function(){initLdgMask.hide();}});}},selectAdGroupUsers:function(e,d,a,c){if(a==undefined||a=="undefined"){return;}if(d=="-1"||d==""){return;}else{var b=Ext.getCmp("er_aduser");if(b!=undefined){if(!this.multiSelectAllvalidation(b.getValue(),"All")){Ext.MessageBox.show({title:"ALERT",msg:"All and Individual Users cannot be selected simultaneously!",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}}}},onShowDetailsClientVersion:function(){var a=Ext.getCmp("clientIpRadio");if(a!=undefined&&a.getValue().clientIp=="Yes"&&!isVm){if(wildcardSearch){Ext.getCmp("wildcardSearch").show();}}else{if(wildcardSearch){Ext.getCmp("wildcardSearch").hide();}}},onShowDetails:function(){var b=Ext.getCmp("clientIpRadio");
var a=Ext.getCmp("er_organize").getValue();if(a!=undefined&&(a!="User")){if(b!=undefined){Ext.getCmp("clientIpRadio").hide();return;}}var d=Ext.getCmp("aggregateValue").getValue();if(!Ext.isEmpty(d)){if(d.groupByValue=="Details"){if(appConstants.publicjsonDataUsage!=null&&appConstants.publicjsonDataUsage!=undefined&&appConstants.publicjsonDataUsage!="undefined"){if(appConstants.publicjsonDataUsage.hasOwnProperty("clientDetailsCompType")){if(b!=undefined){Ext.getCmp("clientIpRadio").show();
var c=Ext.getCmp("clientIpRadio").getValue().clientIp;if(c!=undefined&&c=="Yes"){if(wildcardSearch){Ext.getCmp("wildcardSearch").show();}}else{if(wildcardSearch){Ext.getCmp("wildcardSearch").hide();}}}}else{if(b!=undefined){Ext.getCmp("clientIpRadio").hide();}if(wildcardSearch){Ext.getCmp("wildcardSearch").hide();
}}}else{if(b!=undefined){Ext.getCmp("clientIpRadio").hide();}if(wildcardSearch){Ext.getCmp("wildcardSearch").hide();}}}else{if(b!=undefined){b.setValue({clientIp:"No"});Ext.getCmp("clientIpRadio").hide();}if(wildcardSearch){Ext.getCmp("wildcardSearch").hide();}}}},onSelectAnalysisBy:function(d){var e="";
var a=Ext.getCmp("report_category").getValue();var c="";initLdgMask.show();if(targetType=="User Session Report"){this.updateQStringUsage(false);e=appConstants.queryStringUsage;c="/final/reporter/ErCtxUserReportJson.jsp";}else{this.updateQStringActivity();e=appConstants.queryStringActivity;if(targetType=="User Channel Report"){c="/final/reporter/ErCtxChannelReportJson.jsp";
}else{c="/final/reporter/ErCtxUserActivityReportJson.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)){if(targetType=="User Session Report"){b.fillFormFieldsForUsage(g);}else{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();initLdgMask.hide();}});},goTo:function(a){var b=Ext.getCmp("report_category").getValue();var c;if(b=="user_usage"){c=appConstants.publicjsonDataUsage.hiddenfields;
}else{c=appConstants.publicjsonDataActivity.hiddenfields;}var d=c["fromScheduleModify"];if((d!=null&&d=="Yes")){this.saveSchedule(a);}else{this.saveFavorite(a);}},applicationOnChange:function(){var g=this;var a=Ext.getCmp("mainform").getForm();var f=Ext.getCmp("er_application").getValue();if(f=="-- All --"){appConstants.isAllUserSelected="true";
if(appConstants.isAdDiscoverEnabled=="true"&&appConstants.isAllUserSelected=="true"){var d=appConstants.publicjsonDataUsage.organizeCombo;var e=appConstants.publicjsonDataUsage.selectedOrganizeby;var i=a.findField("er_organize");i.getStore().loadRawData(d);if(!Ext.isEmpty(e)){i.setValue(e);}else{i.setValue(d[0].valueField);
}i.show();g.onOraganizeBy();}}else{a.findField("er_organize").hide();a.findField("er_priority").setValue("ALL");var b=Ext.getCmp("adgrouppane");if(b!=undefined){b.hide();}var c=Ext.getCmp("aduserinfopane");if(c!=undefined){c.hide();}var h=Ext.getCmp("adGroupFns");if(h!=undefined){h.hide();}}},changeEr_mode:function(d){var a="";
var c="";var b=Ext.getCmp("report_category").getValue();if(b=="user_usage"){a=appConstants.publicjsonDataUsage["hiddens"]["favorite_id"];c=appConstants.publicjsonDataUsage["hiddens"]["fromScheduleModify"];}else{a=appConstants.publicjsonDataActivity["hiddens"]["favorite_id"];c=appConstants.publicjsonDataActivity["hiddens"]["fromScheduleModify"];
}if(!(a=="undefined"||a==undefined)||!(c==null||c=="null")){return;}Ext.get("configMod").animate({duration:250,to:{y:-530}});this.showResult();},filterMultiselect:function(a){if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}a.toggleTriggger();if(a.getId()=="compSearch"){appConstants.erUtils.filterComboStore(a,Ext.getCmp("er_server"),appConstants.rawDataForComponents);
}else{if(a.getId()=="er_poolType_Search"){appConstants.erUtils.filterComboStore(a,Ext.getCmp("er_poolType"),appConstants.rawDataForPoolType);}else{if(a.getId()=="adgroupSearch"){appConstants.erUtils.filterComboStore(a,Ext.getCmp("er_adGroup"),appConstants.publicjsonDataUsage.adGroupCombo);}else{if(a.getId()=="aduserSearch"){if(appConstants.AdData!=undefined){appConstants.erUtils.filterComboStore(a,Ext.getCmp("er_aduser"),appConstants.AdData.adGroupUserCombo);
}else{appConstants.erUtils.filterComboStore(a,Ext.getCmp("er_aduser"),appConstants.publicjsonDataUsage.adGroupUserCombo);}}}}}},organizeOnChange:function(){Ext.getCmp("resultPanel").hide();this.disableTools();},compTypeOnChange:function(e){initLdgMask.show();Ext.getCmp("resultPanel").hide();var b=Ext.getCmp("mainform").getForm();
var c=b.findField("report_category").getValue();var d;if(c=="user_usage"){d="/final/reporter/ErCtxUserReportJson.jsp";if(!isSettingsEnabled){this.showConfigDropdown();}var a=this.getThinclientusersettings().getForm();this.updateQStringUsage(false);Ext.Ajax.request({url:"/final/reporter/ErCtxUserReportJson.jsp",params:appConstants.queryStringUsage+"&triggeredfrom=CompType",scope:this,method:"POST",success:function(k){var i=k.responseText;
var o=Ext.decode(i);appConstants.publicjsonDataUsage=o;if(!o.hasVMs&&o.isVm&&needDesktopSearch){Ext.getCmp("er_server_text_box").setValue(o.er_guestname);Ext.getCmp("er_server_text_box").show();}else{Ext.getCmp("er_server_text_box").hide();}var n=o.screenLabels;comboRawData=o.WorkerGroupArray;selectedComboOption=o.selectedWorkerGroup;
r=b.findField("er_wrkrGrp");r.setFieldLabel(n["reporter.thin.Worker Group"]);r.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){r.setValue(selectedComboOption);}else{r.setValue(comboRawData[0].valueField);}if(comboRawData.length>1||comboRawData[0].valueField!="notapplicable"){r.show();
}else{r.hide();}comboRawData=o.ComponentServerArray;selectedComboOption=o.selectedComps;r=Ext.getCmp("er_server");appConstants.rawDataForComponents=comboRawData;r.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){r.setValue(selectedComboOption);}else{r.setValue(comboRawData[0].valueField);
}comboRawData=o.userCombo;selectedComboOption=o.selectedUser;r=b.findField("er_application");var g=o.showFromCombo;var f=o.selectedShowFromCombo;var m=b.findField("showFrom");m.getStore().loadRawData(g);if(!Ext.isEmpty(g)){if(!Ext.isEmpty(f)){m.setValue(f);}else{m.setValue(g[0].valueField);}}if(o.isVm){isVm=true;
if(wildcardSearch){Ext.getCmp("wildcardSearch").hide();}var l=Ext.getCmp("ShowResourceDetails");if((l!=undefined&&l=="No")||appConstants.publicjsonDataUsage.er_showResourceUsage=="No"||appConstants.menuForVM=="true"){Ext.getCmp("showFrom").hide();}else{Ext.getCmp("showFrom").show();}}else{if(wildcardSearch){Ext.getCmp("wildcardSearch").show();
}isVm=false;Ext.getCmp("showFrom").hide();}if(comboRawData!=null&&comboRawData!=undefined&&comboRawData!="undefined"){Ext.getCmp("er_application_text_box").hide();r.getStore().clearFilter(true);r.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){r.setValue(selectedComboOption);
}else{var p=comboRawData[0].valueField;if(comboRawData.length>1){p=comboRawData[1].valueField;}r.setValue(p);}r.show();}else{Ext.getCmp("aggregateValue").show();Ext.getCmp("er_application").hide();var j=b.findField("er_application_text_box");j.show();}var r=b.findField("er_organize");if(r!=undefined){var h=b.findField("er_organize").getValue();
if(h!=undefined&&h!=null&&(h=="AD")){var q=a.findField("adGroupFns");if(q!=undefined&&q.isVisible()){if(appConstants.userState!=undefined&&appConstants.userState=="dropdown"){Ext.getCmp("er_application").hide();}else{if(appConstants.userState!=undefined&&appConstants.userState=="textbox"){Ext.getCmp("er_application_text_box").hide();
}}}}}initLdgMask.hide();}});}else{if(targetType=="User Activity Report"){d="/final/reporter/ErCtxUserActivityReportJson.jsp?select_farm="+encodeURIComponent(b.findField("select_farm").getValue())+"&er_comptype="+b.findField("er_compType").getValue();}else{d="/final/reporter/ErCtxChannelReportJson.jsp?select_farm="+encodeURIComponent(b.findField("select_farm").getValue())+"&er_comptype="+b.findField("er_compType").getValue();
}this.updateQStringActivity();Ext.Ajax.request({url:d,params:appConstants.queryStringActivity,scope:this,method:"POST",success:function(j){var g=j.responseText;var o=Ext.decode(g);var n=o.screenLabels;appConstants.publicjsonDataActivity=o;if(isSettingsEnabled){var i=o.enableDesktop;if(i=="true"){Ext.getCmp("dsktp_searchTxt").show();
Ext.getCmp("dsktp_searchSpl").show();}else{Ext.getCmp("dsktp_searchTxt").hide();Ext.getCmp("dsktp_searchSpl").hide();}}if(b.findField("er_type").getValue()=="No"){comboRawData=o.serverCombo;selectedComboOption=o.selectedServer;comboObject=Ext.getCmp("er_server");appConstants.rawDataForComponents=comboRawData;
comboObject.setFieldLabel(n["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);
}}var k=o.sortbycombo;if(!Ext.isEmpty(k)){var l=o.selectedSortbyCombo;comboObject=b.findField("er_sortby");comboObject.getStore().loadRawData(k);if(!Ext.isEmpty(l)){comboObject.setValue(l);}else{comboObject.setValue(k[0].valueField);}}comboRawData=o.userCombo;selectedComboOption=o.selectedUser;comboObject=b.findField("er_application");
if(comboRawData!=null&&comboRawData!=undefined&&comboRawData!="undefined"){Ext.getCmp("er_application_text_box").hide();comboObject.setFieldLabel(n["reporter.thin.User"]);comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);
}else{if(comboRawData[0].valueField!=-1){comboObject.setValue(comboRawData[0].valueField);}else{var p=comboRawData[0].valueField;if(comboRawData.length>1){p=comboRawData[1].valueField;}comboObject.setValue(p);}}comboObject.show();}else{Ext.getCmp("er_application").hide();var h=b.findField("er_application_text_box");
h.show();Ext.getCmp("aggregateValue").hide();}Ext.getCmp("serverMultiSelectLbl").show();}else{if(!isSettingsEnabled){this.showConfigDropdown();}var f=this.getThinclientusersettings().getForm();var m=o.selectedGraphType;comboRawData=o.graphTypeArray;selectedComboOption=o.selectedGraphType;comboObject=b.findField("er_graphType");
comboObject.setFieldLabel(n["reporter.thin.Graph Type"]);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);}comboObject.show();if(m=="timeline"){comboRawData=o.aggbasedOn;
selectedComboOption=o.selectedAgg;comboObject=f.findField("er_perserver");comboObject.setFieldLabel(n["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=o.userCombo;selectedComboOption=o.selectedUser;comboObject=b.findField("er_application");if(comboRawData!=null&&comboRawData!=undefined&&comboRawData!="undefined"){Ext.getCmp("er_application_text_box").hide();comboObject.setFieldLabel(n["reporter.thin.User"]);comboObject.getStore().clearFilter(true);
comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{var p=comboRawData[0].valueField;if(comboRawData.length>1){p=comboRawData[1].valueField;}comboObject.setValue(p);}comboObject.show();}else{Ext.getCmp("er_application").hide();
var h=b.findField("er_application_text_box");h.show();Ext.getCmp("aggregateValue").hide();}}else{if(Ext.getCmp("er_perserver")!=undefined){Ext.getCmp("er_perserver").hide();}Ext.getCmp("er_application").hide();comboRawData=o.measureCombo;selectedComboOption=o.selectedMeasure;comboObject=b.findField("select_testmes");
comboObject.setFieldLabel(n["reporter.thin.Criteria"]);comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{if(comboRawData.length>1&&comboRawData[0].valueField!="notapplicable"){comboObject.setValue(comboRawData[1].valueField);
}else{var p=comboRawData[0].valueField;if(comboRawData.length>1){p=comboRawData[1].valueField;}comboObject.setValue(p);}}comboObject.show();}}initLdgMask.hide();}});}},workerGroupOnChange:function(){Ext.getCmp("resultPanel").hide();var a=Ext.getCmp("mainform").getForm();var b=a.findField("report_category").getValue();
var c;if(b=="user_usage"){c="/final/reporter/ErCtxUserReportJson.jsp";this.updateQStringUsage(false);Ext.Ajax.request({url:"/final/reporter/ErCtxUserReportJson.jsp",params:appConstants.queryStringUsage,scope:this,method:"POST",success:function(d){var g=d.responseText;var e=Ext.decode(g);appConstants.publicjsonDataUsage=e;
var i=e.screenLabels;comboRawData=e.ComponentServerArray;selectedComboOption=e.selectedComps;comboObject=Ext.getCmp("er_server");comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);
}comboRawData=e.userCombo;selectedComboOption=e.selectedUser;comboObject=a.findField("er_application");if(comboRawData!=null&&comboRawData!=undefined&&comboRawData!="undefined"){Ext.getCmp("er_application_text_box").hide();comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);
if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{var f=comboRawData[0].valueField;if(comboRawData.length>1){f=comboRawData[1].valueField;}comboObject.setValue(f);}comboObject.show();}else{Ext.getCmp("er_application").hide();var h=a.findField("er_application_text_box");
h.show();Ext.getCmp("aggregateValue").show();}}});}},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(false);
d=appConstants.queryStringUsage;}else{if(b=="user_Channel"){if(a.findField("er_type").getValue()=="No"){c="/final/reporter/ErCtxChannelReportJson.jsp?select_farm="+encodeURIComponent(a.findField("select_farm").getValue())+"&er_type="+a.findField("er_type").getValue();}else{c="/final/reporter/ErCtxChannelReportJson.jsp";
this.updateQStringActivity();d=appConstants.queryStringActivity;}}else{if(a.findField("er_type").getValue()=="No"){c="/final/reporter/ErCtxUserActivityReportJson.jsp?select_farm="+encodeURIComponent(a.findField("select_farm").getValue())+"&er_type="+a.findField("er_type").getValue();}else{c="/final/reporter/ErCtxUserActivityReportJson.jsp";
this.updateQStringActivity();d=appConstants.queryStringActivity;}}}Ext.Ajax.request({url:c,params:d,scope:this,method:"POST",success:function(h){var e=h.responseText;var l=Ext.decode(e);var k=l.screenLabels;if(b=="user_usage"){appConstants.publicjsonDataUsage=l;if(!l.hasVMs&&l.isVm&&needDesktopSearch){Ext.getCmp("er_server_text_box").setValue(l.er_guestname);
Ext.getCmp("er_server_text_box").show();}else{Ext.getCmp("er_server_text_box").hide();}comboRawData=l.ComponentServerArray;if(!Ext.isEmpty(comboRawData)){selectedComboOption=l.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);}}comboRawData=l.compTypeCombo;if(!Ext.isEmpty(comboRawData)){selectedComboOption=l.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);}}comboRawData=l.userCombo;selectedComboOption=l.selectedUser;comboObject=a.findField("er_application");if(comboRawData!=null&&comboRawData!=undefined&&comboRawData!="undefined"){Ext.getCmp("er_application_text_box").hide();
comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);if(appConstants.isForceSubmit!="true"){if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{var m=comboRawData[0].valueField;if(comboRawData.length>1){m=comboRawData[1].valueField;
}comboObject.setValue(m);}}else{comboObject.setValue(comboRawData[1].valueField);appConstants.isForceSubmit="false";}comboObject.show();}else{Ext.getCmp("er_application").hide();var f=a.findField("er_application_text_box");f.show();Ext.getCmp("aggregateValue").show();}Ext.getCmp("aggregateValue").show();
}else{appConstants.publicjsonDataActivity=l;if(isSettingsEnabled){var g=l.enableDesktop;if(g=="true"){Ext.getCmp("dsktp_searchTxt").show();Ext.getCmp("dsktp_searchSpl").show();}else{Ext.getCmp("dsktp_searchTxt").hide();Ext.getCmp("dsktp_searchSpl").hide();}}comboRawData=l.compTypeCombo;selectedComboOption=l.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(a.findField("er_type").getValue()=="No"){comboRawData=l.serverCombo;
selectedComboOption=l.selectedServer;appConstants.rawDataForComponents=l.serverCombo;comboObject=Ext.getCmp("er_server");comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);
}var i=l.sortbycombo;if(!Ext.isEmpty(i)){var j=l.selectedSortbyCombo;comboObject=a.findField("er_sortby");comboObject.getStore().loadRawData(i);if(!Ext.isEmpty(j)){comboObject.setValue(j);}else{comboObject.setValue(i[0].valueField);}}comboRawData=l.userCombo;selectedComboOption=l.selectedUser;comboObject=a.findField("er_application");
if(comboRawData!=null&&comboRawData!=undefined&&comboRawData!="undefined"){Ext.getCmp("er_application_text_box").hide();comboObject.setFieldLabel(k["reporter.thin.User"]);comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);
}else{var m=comboRawData[0].valueField;if(comboRawData.length>1){m=comboRawData[1].valueField;}comboObject.setValue(m);}comboObject.show();}else{Ext.getCmp("er_application").hide();var f=a.findField("er_application_text_box");f.show();}Ext.getCmp("serverMultiSelectLbl").show();if(!l.hasVMs&&l.isVm&&needDesktopSearch){Ext.getCmp("er_server_text_box").setValue(l.er_guestname);
Ext.getCmp("er_server_text_box").show();}else{Ext.getCmp("er_server_text_box").hide();}}if(a.findField("er_type").getValue()=="Yes"&&a.findField("er_graphType").getValue()=="distribution"){comboRawData=l.measureCombo;selectedComboOption=l.selectedMeasure;comboObject=a.findField("select_testmes");comboObject.setFieldLabel(k["reporter.thin.Criteria"]);
comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);}}}}});},expandMe:function(a){if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");
}if(a.getId()=="expandSelector"){appConstants.erUtils.expandMultiComboButton(Ext.getCmp("er_server"),Ext.getCmp("compLbl").text,a);}else{if(a.getId()=="adgroupExpand"){appConstants.erUtils.expandMultiComboButton(Ext.getCmp("er_adGroup"),"Ad Group",a);}else{if(a.getId()=="adUserExpand"){appConstants.erUtils.expandMultiComboButton(Ext.getCmp("er_aduser"),"Ad Users",a);
}else{if(a.getId()=="er_poolType_expand"){appConstants.erUtils.expandMultiComboButton(Ext.getCmp("er_poolType"),Ext.getCmp("er_poolType_container").getFieldLabel(),a);}}}}},serverOnChange:function(h,e,a,i){if(a==undefined||a=="undefined"){return;}var j=this;var l;var g;if(Ext.isEmpty(e)){return;}var b=Ext.getCmp("mainform").getForm();
var f=Ext.getCmp("er_server").getValue();var k=b.findField("er_type").getValue();if(k!=null&&k!=undefined&&k=="No"){if(!isSettingsEnabled){this.showConfigDropdown();}var d=this.getThinclientusersettings().getForm();this.updateQStringActivity(h);var c="";if(targetType=="User Channel Report"){c="/final/reporter/ErCtxChannelReportJson.jsp";
}else{c="/final/reporter/ErCtxUserActivityReportJson.jsp";}Ext.Ajax.request({url:c,params:appConstants.queryStringActivity,scope:this,method:"POST",success:function(m){var o=m.responseText;var n=Ext.decode(o);if(appConstants.publicjsonDataActivity!=undefined){appConstants.publicjsonDataActivity.hiddenfields=n["hiddenfields"];
}if(appConstants.publicjsonDataUsage!=undefined){appConstants.publicjsonDataUsage.hiddenfields=n["hiddenfields"];}g=n.userCombo;selectedComboOption=n.selectedUser;l=b.findField("er_application");if(Ext.isEmpty(n.sortbycombo)){Ext.getCmp("er_sortby").hide();}else{Ext.getCmp("er_sortby").getStore().loadRawData(n.sortbycombo);
Ext.getCmp("er_sortby").setValue(n.selectedSortbyCombo);Ext.getCmp("er_sortby").show();}if(g!=null&&g!=undefined&&g!="undefined"){Ext.getCmp("er_application_text_box").hide();l.setFieldLabel(n.screenLabels["reporter.thin.User"]);l.getStore().clearFilter(true);l.getStore().loadRawData(g);if(!Ext.isEmpty(selectedComboOption)){l.setValue(selectedComboOption);
}else{if(g[0].valueField!=-1){l.setValue(g[0].valueField);}else{l.setValue(g[1].valueField);}}l.show();}else{Ext.getCmp("er_application").hide();var p=b.findField("er_application_text_box");p.show();}if(f!=null&&f!=undefined&&f.length>1){g=n.aggAcrossServer;selectedComboOption=n.selectedAggServer;l=d.findField("er_perserver");
l.setFieldLabel(n.screenLabels["reporter.thin.Aggregate across servers on"]);l.getStore().loadRawData(g);if(!Ext.isEmpty(selectedComboOption)){l.setValue(selectedComboOption);}else{l.setValue(g[0].valueField);}l.show();}else{l=d.findField("er_perserver");l.hide();}}});}else{if(Ext.getCmp("er_perserver")!=undefined){Ext.getCmp("er_perserver").hide();
}c="/final/reporter/ErCtxUserReportJson.jsp";this.updateQStringUsage(true);Ext.Ajax.request({url:c,params:appConstants.queryStringUsage,method:"POST",success:function(p){var s=Ext.decode(p.responseText);appConstants.publicjsonDataUsage=s;g=s.userCombo;r=s.selectedUser;l=b.findField("er_application");
appConstants.isAdDiscoverEnabled=s.isAdDiscoverEnabled;if(g!=null&&g!=undefined&&g!="undefined"){Ext.getCmp("er_application_text_box").hide();l.getStore().clearFilter(true);l.getStore().loadRawData(g);if(!Ext.isEmpty(r)){l.setValue(r);}else{if(g[0].valueField!=-1){l.setValue(g[0].valueField);}else{var u=g[0].valueField;
if(g.length>1){u=g[1].valueField;}l.setValue(u);}}l.show();}else{Ext.getCmp("er_application").hide();var n=b.findField("er_application_text_box");n.show();Ext.getCmp("aggregateValue").show();}var t;var u="";if(s!=null&&s!=undefined&&s!="undefined"){t=s.userCombo;if(t!=null&&t!=undefined&&t!="undefined"){var u=t[0].valueField;
if(t.length>1){u=t[1].valueField;}var q=s.selectedUser;if(!Ext.isEmpty(q)){u=q;}}else{u="-- All --";}}if(u!=undefined&&u=="-- All --"){appConstants.isAllUserSelected="true";if(appConstants.isAdDiscoverEnabled=="true"&&appConstants.isAllUserSelected=="true"){g=s.organizeCombo;var r=s.selectedOrganizeby;
l=b.findField("er_organize");l.getStore().loadRawData(g);if(!Ext.isEmpty(r)){l.setValue(r);}else{l.setValue(g[0].valueField);}l.show();j.onOraganizeBy();}}else{b.findField("er_organize").hide();b.findField("er_priority").setValue("ALL");var o=Ext.getCmp("adgrouppane");if(o!=undefined){o.hide();}var m=Ext.getCmp("aduserinfopane");
if(m!=undefined){m.hide();}var v=Ext.getCmp("adGroupFns");if(v!=undefined){v.hide();}}g=s.poolTypeCombo;console.log("comboRawData  ",g);if(g!=undefined){appConstants.rawDataForPoolType=s.poolTypeCombo;r=s.poolTypeSelected;l=b.findField("er_poolType");l.getStore().loadRawData(g);if(!Ext.isEmpty(r)){l.setValue(r);
}else{if(g[0].valueField!=-1){l.setValue(g[0].valueField);}else{l.setValue(g[1].valueField);}}Ext.getCmp("er_poolType_container").setFieldLabel(s.screenLabels["reporter.thin.poolTypeLabel"]);Ext.getCmp("er_poolType_container").show();Ext.getCmp("er_application").hide();}else{Ext.getCmp("er_poolType_container").hide();
g=s.userCombo;if(g!=null&&g!=undefined&&g!="undefined"){Ext.getCmp("er_application_text_box").hide();Ext.getCmp("er_application").show();}}if(isSettingsEnabled){j.onShowDetails();}}});}},graphTypeOnChange:function(b){var c=b.getValue();Ext.getCmp("er_application_text_box").hide();if(c=="timeline"){Ext.getCmp("showLegend").show();
}else{Ext.getCmp("showLegend").show();}Ext.getCmp("resultPanel").hide();var a="";if(targetType=="User Channel Report"){a="/final/reporter/ErCtxChannelReportJson.jsp";}else{a="/final/reporter/ErCtxUserActivityReportJson.jsp";}this.updateQStringActivity();Ext.Ajax.request({url:a,params:appConstants.queryStringActivity,scope:this,method:"POST",success:function(f){var i=f.responseText;
var g=Ext.decode(i);var j=g.screenLabels;if(!isSettingsEnabled){this.showConfigDropdown();}var e=Ext.getCmp("mainform").getForm();var d=this.getThinclientusersettings().getForm();if(c=="timeline"){Ext.getCmp("select_testmes").hide();appConstants.publicjsonDataActivity=g;comboRawData=g.aggbasedOn;selectedComboOption=g.selectedAgg;
comboObject=d.findField("er_perserver");comboObject.setFieldLabel(j["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;selectedComboOption=g.selectedUser;comboObject=e.findField("er_application");comboObject.setFieldLabel(j["reporter.thin.User"]);comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);
}else{var h=comboRawData[0].valueField;if(comboRawData.length>1){h=comboRawData[1].valueField;}comboObject.setValue(h);}comboObject.show();}else{e.findField("select_testmes").setFieldLabel(j["reporter.thin.Criteria"]);Ext.getCmp("select_testmes").show();comboRawData=g.measureCombo;selectedComboOption=g.selectedMeasure;
comboObject=e.findField("select_testmes");comboObject.setFieldLabel(j["reporter.thin.Criteria"]);comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);
}Ext.getCmp("showLegend").hide();if(Ext.getCmp("er_perserver")!=undefined){Ext.getCmp("er_perserver").hide();}Ext.getCmp("er_application").hide();}}});},reportTypeOnChange:function(d){initLdgMask.show();Ext.getCmp("resultPanel").hide();Ext.getCmp("showLegend").hide();var e=d.getValue();if(!isSettingsEnabled){this.showConfigDropdown();
}var b=Ext.getCmp("mainform").getForm();var a=this.getThinclientusersettings().getForm();this.updateQStringActivity();var c="";if(targetType=="User Channel Report"){c="/final/reporter/ErCtxChannelReportJson.jsp?select_farm="+encodeURIComponent(b.findField("select_farm").getValue())+"&er_type="+b.findField("er_type").getValue();
}else{c="/final/reporter/ErCtxUserActivityReportJson.jsp?select_farm="+encodeURIComponent(b.findField("select_farm").getValue())+"&er_type="+b.findField("er_type").getValue();}if(e=="Yes"){c+="&graphViewtype="+b.findField("er_graphType").getValue();Ext.getCmp("er_application_text_box").hide();}else{c+="&er_comptype="+b.findField("er_compType").getValue();
}Ext.Ajax.request({url:c,params:appConstants.queryStringActivity,scope:this,method:"POST",success:function(i){var f=i.responseText;var o=Ext.decode(f);var n=o.screenLabels;appConstants.publicjsonDataActivity=o;var r=o.reportGenerationCombo;var q=r[0].valueField;var h=a.findField("reportGeneration");h.setFieldLabel(n["reporter.common.Report Generation"]);
h.getStore().loadRawData(r);h.setValue(q);var j=Ext.getCmp("bgReportName");if(q!=undefined&&q!=null&&q=="foreground"){j.hide();}else{j.show();}if(e=="No"){b.findField("select_testmes").hide();b.findField("er_mode").hide();b.findField("er_graphType").hide();comboRawData=o.serverCombo;selectedComboOption=o.selectedServer;
comboObject=Ext.getCmp("er_server");multiServerObject=Ext.getCmp("expandSelector");appConstants.rawDataForComponents=comboRawData;comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);
}multiServerObject.show();comboObject.show();if(selectedComboOption!=null&&selectedComboOption.indexOf("All ")>-1){a.findField("er_perserver").show();}comboRawData=o.userCombo;selectedComboOption=o.selectedUser;comboObject=b.findField("er_application");if(comboRawData!=null&&comboRawData!=undefined&&comboRawData!="undefined"){Ext.getCmp("er_application_text_box").hide();
comboObject.setFieldLabel(n["reporter.thin.User"]);comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{var p=comboRawData[0].valueField;if(comboRawData.length>1){p=comboRawData[1].valueField;
}comboObject.setValue(p);}comboObject.show();var k=o.sortbycombo;var l=o.selectedSortbyCombo;comboObject=b.findField("er_sortby");comboObject.getStore().loadRawData(k);if(k!=null&&k!=undefined&&k!="undefined"){if(!Ext.isEmpty(l)){comboObject.setValue(l);}else{comboObject.setValue(k[0].valueField);}}Ext.getCmp("er_sortby").show();
comboObject.show();}else{Ext.getCmp("er_application").hide();var g=b.findField("er_application_text_box");g.show();}Ext.getCmp("serverMultiSelectLbl").show();comboRawData=o.priorityCombo;selectedComboOption=o.selectedPriority;comboObject=b.findField("er_priority");comboObject.setFieldLabel(n["reporter.comparison.Show Top"]);
comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[2].valueField);}comboObject.show();}else{Ext.getCmp("serverMultiSelectLbl").hide();b.findField("er_priority").hide();b.findField("er_application").hide();
a.findField("er_perserver").hide();b.findField("er_mode").hide();Ext.getCmp("er_sortby").hide();b.findField("er_graphType").show();b.findField("select_testmes").show();var m=o.selectedGraphType;comboRawData=o.graphTypeArray;selectedComboOption=o.selectedGraphType;comboObject=b.findField("er_graphType");
comboObject.setFieldLabel(n["reporter.thin.Graph Type"]);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);}comboObject.show();if(m=="timeline"){comboObject=b.findField("select_testmes");
comboObject.hide();comboRawData=o.aggbasedOn;selectedComboOption=o.selectedAgg;comboObject=a.findField("er_perserver");comboObject.setFieldLabel(n["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=o.userCombo;selectedComboOption=o.selectedUser;comboObject=b.findField("er_application");if(comboRawData!=null&&comboRawData!=undefined&&comboRawData!="undefined"){Ext.getCmp("er_application_text_box").hide();comboObject.setFieldLabel(n["reporter.thin.User"]);
comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{var p=comboRawData[0].valueField;if(comboRawData.length>1){p=comboRawData[1].valueField;}comboObject.setValue(p);}comboObject.show();
}else{Ext.getCmp("er_application").hide();var g=b.findField("er_application_text_box");g.show();Ext.getCmp("aggregateValue").show();}Ext.getCmp("serverMultiSelectLbl").show();}else{a.findField("er_perserver").hide();b.findField("er_application").hide();}if(b.findField("er_type").getValue()=="Yes"&&b.findField("er_graphType").getValue()=="distribution"){comboRawData=o.measureCombo;
selectedComboOption=o.selectedMeasure;comboObject=b.findField("select_testmes");comboObject.setFieldLabel(n["reporter.thin.Criteria"]);comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);
}else{comboObject.setValue(comboRawData[0].valueField);}}}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/ErCtxUserActivityReportJson.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("select_testmes").show();
b.findField("er_compType").show();b.findField("er_mode").show();if(Ext.getCmp("sh_timeinuse")!=undefined){Ext.getCmp("sh_timeinuse").show();}b.findField("er_wrkrGrp").hide();b.findField("er_application").hide();b.findField("er_organize").hide();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 x=Ext.getCmp("mainform").getForm();x.findField("er_type").hide();x.findField("select_testmes").hide();x.findField("er_mode").hide();x.findField("er_graphType").hide();x.findField("er_compType").show();x.findField("er_application").show();x.findField("er_wrkrGrp").show();
var o=appConstants.publicjsonDataUsage.hiddenfields;var r=o["fromScheduleModify"];if(r!=null&&r=="Yes"){Ext.getCmp("favoriteTool").setDisabled(true);Ext.getCmp("scheduleTool").setDisabled(true);}var b=d.screenLabels;var e;var n;var v;e=d.reportForCombo;n=d.reportFor;v=x.findField("report_category");v.setFieldLabel(b["reporter.common.Report For"]);
v.getStore().loadRawData(e);if(!Ext.isEmpty(n)){v.setValue(n);}e=d.analysisByCombo;if(!Ext.isEmpty(e)){n=d.selectedAnalysisByCombo;v=x.findField("er_option");v.getStore().loadRawData(e);if(!Ext.isEmpty(n)){v.setValue(n);}else{v.setValue(e[0].valueField);}}v=Ext.getCmp("groupByDetails");if(!Ext.isEmpty(n)){if(n=="Summary"){v=Ext.getCmp("groupBySummary");
}}v.setValue(true);e=d.zoneCombo;if(!Ext.isEmpty(e)){n=d.selectedZone;v=x.findField("select_farm");v.setFieldLabel(b["reporter.consolidated.Zone"]);v.getStore().clearFilter(true);v.getStore().loadRawData(e);if(!Ext.isEmpty(n)){v.setValue(n);}else{v.setValue(e[0].valueField);}}e=d.compTypeCombo;if(!Ext.isEmpty(e)){n=d.selectedCompType;
v=x.findField("er_compType");v.setFieldLabel(b["reporter.common.Component Type"]);v.getStore().clearFilter(true);v.getStore().loadRawData(e);if(!Ext.isEmpty(n)){v.setValue(n);}else{v.setValue(e[0].valueField);}if(!d.hasVMs&&d.isVm&&needDesktopSearch){Ext.getCmp("er_server_text_box").setValue(d.er_guestname);
Ext.getCmp("er_server_text_box").show();}else{Ext.getCmp("er_server_text_box").hide();}}var l=d.showFromCombo;var t=d.selectedShowFromCombo;var C=x.findField("showFrom");C.getStore().loadRawData(l);if(!Ext.isEmpty(l)){if(!Ext.isEmpty(t)){C.setValue(t);}else{C.setValue(l[0].valueField);}}if(d.isVm){if(d.hasVMs){Ext.getCmp("compLbl").setText(vm_desktopTxt);
}isVm=true;var k=Ext.getCmp("ShowResourceDetails");if((k!=undefined&&k=="No")||appConstants.publicjsonDataUsage.er_showResourceUsage=="No"||appConstants.menuForVM=="true"){Ext.getCmp("showFrom").hide();}else{Ext.getCmp("showFrom").show();}}else{isVm=false;Ext.getCmp("showFrom").hide();}e=d.WorkerGroupArray;
if(!Ext.isEmpty(e)){n=d.selectedWorkerGroup;v=x.findField("er_wrkrGrp");v.setFieldLabel(b["reporter.thin.Worker Group"]);v.getStore().loadRawData(e);if(!Ext.isEmpty(n)){v.setValue(n);}else{v.setValue(e[0].valueField);}if(e.length>1&&e[0].valueField!="notapplicable"){v.show();}else{v.hide();}}e=d.userCombo;
n=d.selectedUser;v=x.findField("er_application");if(e!=null&&e!=undefined&&e!="undefined"){Ext.getCmp("er_application_text_box").hide();v.setFieldLabel(b["reporter.common.User"]);v.getStore().clearFilter(true);v.getStore().loadRawData(e);if(!Ext.isEmpty(n)){v.setValue(n);if(n.indexOf("All")>-1){appConstants.isAllUserSelected="true";
}}else{var w=e[0].valueField;if(e.length>1){w=e[1].valueField;}v.setValue(w);}v.show();Ext.getCmp("aggregateValue").show();}else{Ext.getCmp("er_application").hide();var f=x.findField("er_application_text_box");if(n!=undefined&&n!=null){f.setValue(n);}f.show();Ext.getCmp("aggregateValue").show();}appConstants.isAdDiscoverEnabled=d.isAdDiscoverEnabled;
var j;var w="";if(d!=null&&d!=undefined&&d!="undefined"){j=d.userCombo;if(j!=null&&j!=undefined&&j!="undefined"){var w=j[0].valueField;if(j.length>1){w=j[1].valueField;}var A=d.selectedUser;if(!Ext.isEmpty(A)){w=A;}}else{w="-- All --";}}if(w!=undefined&&w=="-- All --"){appConstants.isAllUserSelected="true";
if(appConstants.isAdDiscoverEnabled=="true"&&appConstants.isAllUserSelected=="true"){e=d.organizeCombo;n=d.selectedOrganizeby;v=x.findField("er_organize");v.getStore().loadRawData(e);if(!Ext.isEmpty(n)){v.setValue(n);}else{v.setValue(e[0].valueField);}v.show();this.onOraganizeBy();}}if(wildcardSearch){if(!isSettingsEnabled){this.showConfigDropdown();
}if(d.isVm){Ext.getCmp("wildcardSearch").setValue("*");Ext.getCmp("wildcardSearch").hide();}else{Ext.getCmp("wildcardSearch").show();if(d.selectedClientVersion!=undefined){Ext.getCmp("wildcardSearch").setValue(d.selectedClientVersion);}else{Ext.getCmp("wildcardSearch").setValue("*");}}}e=d.ComponentServerArray;
if(!Ext.isEmpty(e)){n=d.selectedComps;v=Ext.getCmp("er_server");Ext.getCmp("compLbl").setText(b["reporter.thin.Components"]);appConstants.rawDataForComponents=e;v.getStore().loadRawData(e);if(!Ext.isEmpty(n)){v.setValue(n);}else{v.setValue(e[0].valueField);}}e=d.poolTypeCombo;if(e!=undefined){appConstants.rawDataForPoolType=d.poolTypeCombo;
n=d.poolTypeSelected;v=x.findField("er_poolType");v.getStore().loadRawData(e);if(!Ext.isEmpty(n)){v.setValue(n);}else{if(e[0].valueField!=-1){v.setValue(e[0].valueField);}else{v.setValue(e[1].valueField);}}Ext.getCmp("er_poolType_container").setFieldLabel(d.screenLabels["reporter.thin.poolTypeLabel"]);
Ext.getCmp("er_poolType_container").show();Ext.getCmp("er_application").hide();Ext.getCmp("er_application_text_box").hide();}else{Ext.getCmp("er_poolType_container").hide();e=d.userCombo;if(e!=null&&e!=undefined&&e!="undefined"){Ext.getCmp("er_application_text_box").hide();Ext.getCmp("er_application").show();
}}var B=d.timelineCombo;var i=d.selectedTimeline;var u=x.findField("er_timeline");u.setFieldLabel(b["reporter.common.Timeline"]);u.getStore().loadRawData(B);if(!Ext.isEmpty(B)){if(!Ext.isEmpty(i)){u.setValue(i);}else{u.setValue(B[0].valueField);}}var s=d.startHour;var m=d.endHour;var c=d.startDate;var a=d.endDate;
var h=x.findField("er_stdate");h.setValue(d.startDateForDisplay);h.dataArray=c;var z=x.findField("er_sthr");z.setValue(d.startHourForDisplay);z.dataArray=s;var q=x.findField("er_enddate");q.setValue(d.endDateForDisplay);q.dataArray=a;var y=x.findField("er_endhr");y.setValue(d.endHourForDisplay);y.dataArray=m;
stmin=d.startMinForDisplay;enmin=d.endMinForDisplay;mgr_stmin=d.startmin;mgr_enmin=d.endmin;if(Ext.getCmp("er_option").getValue()=="Component"){Ext.getCmp("select_farm").hide();}else{Ext.getCmp("select_farm").show();}var p=o["er_aggregateVaalue"];if(!Ext.isEmpty(p)){var g=Ext.getCmp("aggregateValue");
g.setValue({groupByValue:p});}updatingAppSettings();initLdgMask.hide();},fillSettingFieldsForUsage:function(f){var g;var m;var q;var e=f.screenLabels;var j=this.getThinclientusersettings().getForm();j.findField("sh_timeinuse").hide();j.findField("er_perserver").hide();var n=f.hiddenfields;var r=n["clientIp"];
if(!Ext.isEmpty(r)){var h=Ext.getCmp("clientIpRadio");if(r=="Yes"){h.setValue({clientIp:"Yes"});}else{if(r=="No"){h.setValue({clientIp:"No"});}}}g=f.excludeWeekCombo;if(!Ext.isEmpty(g)){m=f.excludeWeek;q=j.findField("er_excwe");q.setFieldLabel(e["reporter.common.Exclude weekends"]);q.getStore().loadRawData(g);
if(!Ext.isEmpty(m)){q.setValue(m);}else{q.setValue(g[0].valueField);}}Ext.getCmp("timeperiodLbl").setText(e["reporter.common.Time period"]);j.findField("timefrom").setValue(f.selectedTimeFrom);j.findField("minfrom").setValue(f.selectedMinsFrom);j.findField("timeto").setValue(f.selectedTimeTo);j.findField("minto").setValue(f.selectedMinsTo);
var p=f.reportGenerationCombo;var i=f.reportGeneration;var c=j.findField("reportGeneration");c.setFieldLabel(e["reporter.common.Report Generation"]);c.getStore().loadRawData(p);c.setValue(i);var k=f.adGroupCombo;var s=f.selectedAdGroup;var d=f.adGroupLabel;if(!Ext.isEmpty(k)){var u=j.findField("er_adGroup");
u.getStore().loadRawData(k);if(!Ext.isEmpty(s)){u.setValue(s);}else{var t=k[0].valueField;if(k.length>1){t=k[1].valueField;}u.setValue(t);}}var b=f.adGroupUserCombo;var a=f.selectedAdGroupUser;var d=f.adGroupLabel;if(!Ext.isEmpty(b)){var v=j.findField("er_aduser");v.getStore().loadRawData(b);if(!Ext.isEmpty(a)){v.setValue(a);
}else{var t=b[0].valueField;if(b.length>1){t=b[1].valueField;}v.setValue(t);}}var l=f.selectedAdGroupFns;if(l!=undefined&&l!=null&&l=="Details"){var o=Ext.getCmp("adGroupFns");if(!Ext.isEmpty(o)){o.setValue({adGroupByValue:"Details"});}}else{var o=Ext.getCmp("adGroupFns");if(!Ext.isEmpty(o)){o.setValue({adGroupByValue:"Summary"});
}}},saveReportAsPDF:function(){var d;var c=Ext.getCmp("report_category").getValue();if(c=="user_activity"||c=="user_Channel"){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+="&er_view=PRINT";}else{d=appConstants.publicjsonDataUsage.saveQString;d+="&er_view=PRINT";}}var b="../reporter/ErHtmlToSavePdf.jsp?"+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;}}}if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}b=this.getGridColSortParam(b);if(appConstants.fromOverviewReport=="true"&&targetType=="User Session Report"){b="../reporter/ErHtmlToSavePdf.jsp?&index=0&pdf=yes&drillSes=yes&er_Duration="+appConstants.er_durationValue;
}appConstants.erUtils.savePDF(b);},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;},bookletQuery:function(f){var d;var c=Ext.getCmp("report_category").getValue();if(c=="user_activity"||c=="user_Channel"){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+="&er_view=PRINT";}else{d=appConstants.publicjsonDataUsage.saveQString;d+="&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;}}}b=this.getGridColSortParam(b);if(appConstants.fromOverviewReport=="true"&&targetType=="User Session Report"){b="/final/reporter/ErUsersessionReportPrint.jsp?&er_view=PRINT&index=0&er_Duration="+appConstants.er_durationValue;
}return b;},bookletScheduleQuery:function(d){var b="";var a=Ext.getCmp("report_category").getValue();if(a=="user_activity"||a=="user_Channel"){this.updateQStringActivity(true);var c=Ext.getCmp("er_type").getValue();if(c=="Yes"){b=appConstants.queryStringActivity;b+="&er_server=-1&er_application=-1&er_sortby=-1";
}else{b=appConstants.queryStringActivity;}}else{if(a=="user_usage"){this.updateQStringUsage(false);b=appConstants.queryStringUsage;}}if(appConstants.fromOverviewReport=="true"&&targetType=="User Session Report"){b="/final/reporter/ErUsersessionReportPrint.jsp?&er_view=PRINT&index=0&er_Duration="+appConstants.er_durationValue;
}return b;},bookletPreview:function(){this.printReport();},printReport:function(){var c;var b=Ext.getCmp("report_category").getValue();if(b=="user_activity"||b=="user_Channel"){var d=appConstants.publicjsonDataActivity.saveQString;c="../servlet/com.eg.ErCtxServerReportC?"+d+"&printGraph=yes&pdfPrint=yes";
if(appConstants.publicjsonDataActivity.selectedreportType=="No"){c+="&er_view=PRINT";}}else{if(b=="user_usage"){var d=appConstants.publicjsonDataUsage.saveQString;c="../servlet/com.eg.ErCtxServerReportC?"+d+"&printGraph=yes&pdfPrint=yes&er_view=PRINT";}}var a=Ext.getCmp("showLegend").getValue();if(a!=null&&a!=undefined&&a!="undefined"){var e="&showLegend="+a;
if(c.indexOf(e)==-1){if(c.indexOf("&showLegend=")>-1){if(a=="true"){c=c.replace("&showLegend=false",e);}else{c=c.replace("&showLegend=true",e);}}else{c+=e;}}}c=this.getGridColSortParam(c);if(appConstants.fromOverviewReport=="true"&&targetType=="User Session Report"){c="/final/reporter/ErUsersessionReportPrint.jsp?&er_view=PRINT&index=0&pdfPrint=yes&er_Duration="+appConstants.er_durationValue;
}if(appConstants.menuForVM=="true"){printWindowFn(c);}else{parent.printWindowFn(c);}},sendMail:function(){var b=Ext.getCmp("showLegend").getValue();if(b!=null&&b!=undefined&&b!="undefined"){drillDownParams="&showLegend="+b;}if(appConstants.fromOverviewReport=="true"&&targetType=="User Session Report"){drillDownParams="&DrillDown=yes";
}var a=Ext.widget("sendmail");a.show();},saveCsv:function(){window.location="../servlet/egurkha.reporter.SaveInCSVFormat";},saveSchedule:function(c){var e=Ext.getCmp("report_category").getValue();var h="";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 g="";if(e=="user_activity"||e=="user_Channel"){this.updateQStringActivity(true);var i=Ext.getCmp("er_type").getValue();var b=appConstants.publicjsonDataActivity.hiddenfields;h=b["schedule_id"];if(i=="Yes"){g="/final/reporter/ErSaveSchedule.jsp?"+appConstants.queryStringActivity+"&com.eg.CSRF_NONCE="+csrfToken;
g+="&er_server=-1&er_application=-1&er_sortby=-1";}else{g="/final/reporter/ErSaveSchedule.jsp?"+appConstants.queryStringActivity+"&com.eg.CSRF_NONCE="+csrfToken;}}else{if(e=="user_usage"){this.updateQStringUsage(false);g="/final/reporter/ErSaveSchedule.jsp?"+appConstants.queryStringUsage+"&com.eg.CSRF_NONCE="+csrfToken;
}}if(appConstants.menuForVM=="true"){g+="&menuForVM=true";}if(c.getItemId()=="save"){if((Ext.isEmpty(h)||h=="null"||h=="undefined"||h==undefined)&&appConstants.schedule_id!="null"){h=appConstants.schedule_id;}g+="&showSchWindow=no&schedule_id="+h;var d=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:d,params:a,standardSubmit:true,method:"POST"});}else{if(appConstants.menuForVM=="true"){scheduleWindowFn(g);}else{parent.scheduleWindowFn(g);}}}},saveFavorite:function(c){var k=this.validateMainForm(false);var j="";if(k){var h;var e=Ext.getCmp("report_category").getValue();
if(e=="user_activity"||e=="user_Channel"){var b=appConstants.publicjsonDataActivity.hiddenfields;j=b["favorite_id"];this.updateQStringActivity();var i=Ext.getCmp("er_type").getValue();if(i=="Yes"){h="/final/reporter/ErSaveFavorite.jsp?"+appConstants.queryStringActivity+"&er_sortby=-1&er_server=-1&er_application=-1&cmd=client";
}else{h="/final/reporter/ErSaveFavorite.jsp?"+appConstants.queryStringActivity+"&cmd=client";}}else{if(e=="user_usage"){var b=appConstants.publicjsonDataUsage.hiddenfields;j=b["favorite_id"];this.updateQStringUsage(false);h="../servlet/com.eg.ErFavoriteC?"+appConstants.queryStringUsage+"&er_view=GRAPH&cmd=client";
}}var g=h+"&er_RmDispName="+appConstants.er_RmDispName+"&com.eg.CSRF_NONCE="+csrfToken;if(appConstants.menuForVM=="true"){g+="&menuForVM=true";}if(c.getItemId()=="save"){if((Ext.isEmpty(j)||j=="null"||j=="undefined"||j==undefined)&&appConstants.favorite_id!="null"){j=appConstants.favorite_id;}g+="&showSchWindow=no"+"&FavoriteId="+j;
var d=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:d,params:a,standardSubmit:true,method:"POST"});}else{if(appConstants.menuForVM=="true"){favouriteWindowFn(g);}else{parent.favouriteWindowFn(g);}}}},validateMainForm:function(t){var s=Ext.getCmp("mainform").getForm();
var g=null;if(isSettingsEnabled){g=this.getThinclientusersettings().getForm();}var z=s.findField("select_farm");var r=s.findField("report_category").getValue();var D=s.findField("er_type").getValue();var A=s.findField("er_option").getValue();if((A!=null||A!=undefined)&&A!="Component"){if(z.getValue()=="-1"){Ext.MessageBox.show({title:"Thin Client User",msg:z.getStore().getAt(0).get("displayField"),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}}if(r=="user_activity"||r=="user_Channel"){var q=s.findField("er_compType");if(q.getValue()=="-1"){Ext.MessageBox.show({title:"Thin Client User",msg:q.getStore().getAt(0).get("displayField"),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}if(D=="No"){var o=Ext.getCmp("er_server");
var f=s.findField("er_application");var k=s.findField("er_application_text_box");if(o.getValue()=="-1"){Ext.MessageBox.show({title:"Thin Client User",msg:o.getStore().getAt(0).get("displayField"),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}if(f.isVisible()&&f.getValue()=="Not Applicable"){Ext.MessageBox.show({title:"Thin Client User",msg:f.getStore().getAt(0).get("displayField"),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}if(k.isVisible()&&k.getValue().length<=0){Ext.MessageBox.show({title:"Thin Client User",msg:" User can't be empty",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}}else{if(s.findField("er_graphType").getValue()=="distribution"){var b=s.findField("select_testmes");if(b.getValue()=="-1"){Ext.MessageBox.show({title:"Thin Client User",msg:"Please Choose Criteria",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}}}}else{var q=s.findField("er_compType");var f=s.findField("er_application");var k=s.findField("er_application_text_box");var p=Ext.getCmp("er_server");if(q.getValue()=="-1"){Ext.MessageBox.show({title:"Thin Client User",msg:q.getStore().getAt(0).get("displayField"),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}if(p.isVisible()&&p.getValue()=="-1"){Ext.MessageBox.show({title:"Alert",msg:p.getStore().getAt(0).get("displayField"),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}if(appConstants.isForceSubmit!="true"){if(f.isVisible()&&f.getValue()=="-1"){Ext.MessageBox.show({title:"Thin Client User",msg:f.getStore().getAt(0).get("displayField"),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}}if(k.isVisible()&&k.getValue().length<=0){Ext.MessageBox.show({title:"Thin Client User",msg:" User can't be empty",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}}var v=true;var i;if(targetType=="User Session Report"){i=appConstants.publicjsonDataUsage.hiddenfields;
}else{i=appConstants.publicjsonDataActivity.hiddenfields;}var n=i["getMaxDaysInMonth"];var w=this.getSettingsFieldValue(g,"reportGeneration",isSettingsEnabled,"reportGeneration");var C="";if(!Ext.isEmpty(i["userTimeline"])){C=i["userTimeline"];}var m=s.findField("er_timeline").getValue();var x=s.findField("er_stdate").getValue();
var e=s.findField("er_enddate").getValue();var l=s.findField("er_sthr").getValue();var a=s.findField("er_endhr").getValue();x.setHours(l);e.setHours(a);var j=this.getSettingsFieldValue(g,"timefrom",isSettingsEnabled,"selectedTimeFrom");var B=this.getSettingsFieldValue(g,"minfrom",isSettingsEnabled,"selectedMinsFrom");
var d=this.getSettingsFieldValue(g,"timeto",isSettingsEnabled,"selectedTimeTo");var y=this.getSettingsFieldValue(g,"minto",isSettingsEnabled,"selectedMinsTo");if(!checkTimePeriod(j,B,d,y)){v=false;}if(!checkDateTime(x,e)){v=false;}if(C!=null&&C!="-1"){var h=isUserTimelineLimitExceeded(C,n,x,e);if(!h){Ext.MessageBox.show({title:"Thin Client User settings",msg:_invalidUserTime,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
v=false;}}if(w!=null&&w=="foreground"){if(appConstants.isFromDrillDown==null||appConstants.isFromDrillDown=="null"||appConstants.isFromDrillDown==undefined||appConstants.isFromDrillDown=="undefined"||!appConstants.isFromDrillDown){if(t){var c=i["limitforbg"];if(!Ext.isEmpty(c)){if(!checkTimeLineForBgLimit(c,n,x,e)){Ext.MessageBox.confirm("Confirm",appConstants.forGrdReportConfirmMsg,this.showConfirmResult,this);
v=false;}}}}}else{var u=this.getSettingsFieldValue(g,"bgReportName",isSettingsEnabled,"selectedMinsTo");if(!validateTextBoxWithSpecialChars(u,"Attachment",true)){v=false;}}return v;},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 g=a.findField("er_stdate").getValue();var i=a.findField("er_sthr").getValue();g.setHours(i);var c=a.findField("er_enddate").getValue();
var b=a.findField("er_endhr").getValue();c.setHours(b);var j=checkDateTime(g,c);if(!j){return;}var e=Ext.getCmp("er_server");var f=a.findField("er_application");var h=this.validateMainForm(true);if(h){this.submitReport();}},validateSettings:function(){var a=true;var b=Ext.getCmp("reportGeneration").getValue();
if(b!=null&&b=="background"){var c=Ext.getCmp("bgReportName").getValue();if(!validateTextBoxWithSpecialChars(c,"Attachment",true)){a=false;}}return a;},showConfirmResult:function(c){if(c=="yes"){this.submitReport();}else{this.getReporterSettings().down("button").fireHandler();var b=this.getThinclientusersettings().getForm();
var a=b.findField("reportGeneration");var d=b.findField("bgReportName");a.setValue("background");d.setValue("");d.show();d.focus(false,1000);Ext.getCmp("submitViaSetting").show();Ext.getCmp("moreOptionCloseId").hide();this.showResult();}},getXmlForUrl:function(b){try{var a;Ext.Ajax.request({url:b,method:"GET",async:false,success:function(d){var e=d.responseText;
a=Ext.decode(e);},failure:function(){alert("I am not loading..."+b);}});return a;}catch(c){alert("[Exception] "+c);}},loadGrid:function(q){appConstants.queryStringActivityForUserDetails=appConstants.queryStringActivity;var i=this;var t=Ext.getCmp("resultPanel");var z=new Array();if(!Ext.isEmpty(q)){var g=q;
var p=g.columns;var R=0;if(p!=undefined){R=Object.keys(p).length;}var A=g.dataArray;var P=g.TOTAL_COLUMN_COUNT;var d=g.SINGLE_SUBCOLUMN_COUNT;var G=this.getMain().getWidth();var M=55;var Q=80;var x=120;var I=0;P++;var f=P-d;var e=150+(f*M)+(d*Q);var s={};var m=0;var S=new Array();var h=0;if(G>e){h=(G-(x))/P;
}else{h=M;}for(var l in p){var D=l;var v=new Array();var b=new Array();v=p[l];if(v!=undefined&&!Ext.isEmpty(v)){var F=v.length;var B=h;if(F==1){if(h<Q){B=Q;}}for(var O in v){var K=v[O];s[m]=D+"_"+K;b.push({header:K,sortable:true,dataIndex:m,align:"center",minWidth:B,doSort:function(T){var j=this.up("grid").store;
var U=this.getSortParam();j.sort({property:U,direction:T,sorterFn:function(W,V){W=W.get(U);V=V.get(U);if(W!=undefined&&W.indexOf("~")>-1){W=W.substring(0,W.indexOf("~"));}if(V!=undefined&&V.indexOf("~")>-1){V=V.substring(0,V.indexOf("~"));}if(!isNaN(W)&&!isNaN(V)){W=Ext.isNumber(W)?W:parseFloat(String(W),10);
V=Ext.isNumber(V)?V:parseFloat(String(V),10);if(T=="ASC"){W=isNaN(W)?999999:W;V=isNaN(V)?999999:V;}else{W=isNaN(W)?0:W;V=isNaN(V)?0:V;}}else{if(!isNaN(new Date(W))&&!isNaN(new Date(V))){V=new Date(V).getTime();W=new Date(W).getTime();}}return W>V?1:(W<V?-1:0);}});},renderer:function(Y,U,X,ab,V,Z,j){if(Y!=undefined&&Y.indexOf("$")>-1){U.tdCls=Y.substring(Y.indexOf("$")+1);
Y=Y.substring(0,Y.indexOf("$"));}if(Y!=undefined&&Y.indexOf("~")>-1){var aa=Y.substring(0,Y.indexOf("~"));var T=Y.substring(Y.indexOf("~")+1);var W=aa;if(aa!=null&&aa=="top.gif"){aa='<img src="/final/reporter/images/top.gif">';W="Details";}Y='<a href="javascript:void(0);" onClick="javascript:openInNewWin(\''+T+"');\" >"+aa+"</a>";
U.tdAttr='data-qtip="'+W+'"';}else{U.tdAttr='data-qtip="'+Y+'"';Y=i.getDecimalAlignFormat(Y);}return Y;}});m++;}S.push({header:D,columns:b,});if(R>10){S[S.length-1].locked=false;}}else{var C=true;if(R<=8){C=false;}if(I==0){var E=h;if(D==""){E=40;}s[m]=D;S.push({header:D,sortable:true,needModify:"no",maxWidth:E,dataIndex:m,align:"left",flex:1,doSort:function(T){var j=this.up("grid").store;
var U=this.getSortParam();j.sort({property:U,direction:T,sorterFn:function(W,V){W=W.get(U);V=V.get(U);if(W!=undefined&&W.indexOf("~")>-1){W=W.substring(0,W.indexOf("~"));}if(V!=undefined&&V.indexOf("~")>-1){V=V.substring(0,V.indexOf("~"));}if(!isNaN(W)&&!isNaN(V)){W=Ext.isNumber(W)?W:parseFloat(String(W),10);
V=Ext.isNumber(V)?V:parseFloat(String(V),10);if(T=="ASC"){W=isNaN(W)?999999:W;V=isNaN(V)?999999:V;}else{W=isNaN(W)?0:W;V=isNaN(V)?0:V;}}else{if(!isNaN(new Date(W))&&!isNaN(new Date(V))){V=new Date(V).getTime();W=new Date(W).getTime();}}return W>V?1:(W<V?-1:0);}});},renderer:function(Y,U,W,ab,V,Z,j){var X=Y;
if(Y.indexOf("~")>-1){var aa=Y.substring(0,Y.indexOf("~"));var T=Y.substring(Y.indexOf("~")+1);U.tdAttr='style="width:40px;"';if(aa!=null&&aa=="top.gif"){X="Details";aa='<img src="/final/reporter/images/top.gif">';U.tdAttr='data-qtip="'+X+'"';}if(aa!=null&&aa=="ss"){X="Graph";aa='<img src="/final/images/spacer.gif" class="iconLineChart">';
U.tdAttr='data-qtip="'+X+'"';}Y='<a href="javascript:void(0);" onClick="window.location.href=\''+T+"'\" >"+aa+"</a>";}else{U.tdAttr='data-qtip="'+Y+'"';}return Y;}});if(R>10){S[S.length-1].locked=true;}m++;}else{s[m]=D;S.push({header:D,sortable:true,minWidth:x,dataIndex:m,align:"left",doSort:function(T){var j=this.up("grid").store;
var U=this.getSortParam();j.sort({property:U,direction:T,sorterFn:function(W,V){W=W.get(U);V=V.get(U);if(W!=undefined&&W.indexOf("~")>-1){W=W.substring(0,W.indexOf("~"));}if(V!=undefined&&V.indexOf("~")>-1){V=V.substring(0,V.indexOf("~"));}if(!isNaN(W)&&!isNaN(V)){W=Ext.isNumber(W)?W:parseFloat(String(W),10);
V=Ext.isNumber(V)?V:parseFloat(String(V),10);if(T=="ASC"){W=isNaN(W)?999999:W;V=isNaN(V)?999999:V;}else{W=isNaN(W)?0:W;V=isNaN(V)?0:V;}}else{if(!isNaN(new Date(W))&&!isNaN(new Date(V))){V=new Date(V).getTime();W=new Date(W).getTime();}}return W>V?1:(W<V?-1:0);}});},renderer:function(Y,U,X,ab,V,Z,j){if(Y.indexOf("~")>-1){var aa=Y.substring(0,Y.indexOf("~"));
var T=Y.substring(Y.indexOf("~")+1);var W=aa;if(aa!=null&&aa=="top.gif"){aa='<img src="/final/reporter/images/top.gif">';W="Details";}Y='<a href="javascript:void(0);" onClick="javascript:openInNewWin(\''+T+"');\" >"+aa+"</a>";U.tdAttr='data-qtip="'+W+'"';}else{U.tdAttr='data-qtip="'+Y+'"';}return Y;}});
m++;if(R>10){S[S.length-1].locked=true;}}}I++;}var r=function(){this.data=null;this.total=0;};var n=false;if(isSettingsEnabled){var y=Ext.getCmp("er_perserver");if(y.getValue()=="No"){n=true;}}else{if(publicGridData["selectedAggServer"]=="No"){n=true;}}var o;if(A.length<gridPageSize){o=true;}else{o=false;
}var a=[];var c=Object.keys(A[0]).length;for(var l in A[0]){a.push(l);}var u=Ext.create("Ext.data.Store",{fields:a,proxy:{type:"pagingmemory",reader:{type:"json",root:"data",totalProperty:"total"},data:A,},sorters:{property:a[1],direction:"ASC"},pageSize:gridPageSize,autoLoad:true,});if(q.haveSummary){var H=q.summaryObj;
var N=q.highlightedBlock;var k=new Array();for(var J in H){var w="";if(N!=undefined&&N==J){w="#d3d3d3";}k.push({xtype:"container",align:"center",columnWidth:0.2,margin:"10 0 10 0",autoSize:true,layout:{type:"table",columns:1,align:"center",tableAttrs:{style:{align:"center",margin:"auto auto",background:w}},tdAttrs:{style:{textAlign:"center"}}},defaults:{bodyStyle:"padding:10px 5px 5px 5px",align:"center",},items:[{html:'<table align="center" ><tr><td align="right" style="padding-right:5px"><div class="" ></div></td><td style="text-align:left;padding-left:5px" class="newFont_bold28" >'+H[J]+"</td></tr></table>",width:"100%",style:{textAlign:"center",width:"50px"}},{html:'<span class="newFont_normal13">'+J+"</span>",}]});
}z.push({xtype:"panel",ui:"newGraphPanel",margin:"10 10 10 10",title:"Summary",columnWidth:1,layout:"column",items:k});}var L=1;z.push({xtype:"panel",ui:"newGraphPanel",margin:"10 10 10 10",title:g.gridTitle,items:[{xtype:"customgrid",store:u,sortableColumns:true,needtoFixColumn:true,ui:"newGridPanel",id:"vengat",columns:S,rowspan:n,border:true,margin:"5 10 10 10",forceFit:true,listeners:{sortchange:function(U,V,W,T,j){i.gridColIndexParam=V.getIndex();
i.gridColStateParam=V.sortState;this.getStore().loadPage(L);},render:function(W){var T=Ext.getCmp("er_sortby");var U=T.getValue();var j=T.findRecord(T.valueField||T.displayField,U);var V=T.store.indexOf(j)+1;}},dockedItems:[{xtype:"pagingtoolbar",cls:"newPagination",dock:"bottom",displayInfo:true,store:u,hidden:o,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No topics to display",listeners:{change:function(j,T){if(!Ext.isEmpty(T)){L=T.currentPage;
}else{L=1;}}}}]}]});Ext.getCmp("csvTool").setDisabled(false);t.removeAll();t.add(z);t.show();}},loadUsageGridandTable:function(aA,ae){var aq=this;var at=Ext.getCmp("resultPanel");var a=Ext.getCmp("er_compType").getValue();var D=new Array();var K=aA.isVmComponent;var al=aA.includeDetails;if(!Ext.isEmpty(aA)){var I=aA["summarytableData"];
var r=appConstants.publicjsonDataUsage.ShowAppNames;var s="";var x=false;if(!Ext.isEmpty(I)){var v=0;for(var Q in I){v++;}var V="100%";if(v<=3){V="50%";}s='<div class="newTable" style="margin:0px 10px 10px 10px" align="center">'+'<table cellspacing="0" cellpadding="0" border="0" width="'+V+'%">'+"<tbody>";
var ak=0;var H=0;for(var Q in I){x=true;if(ak==0){s+="<tr>";}var w=I[Q];var q=w;if(w.hasOwnProperty("hrefUrl")){var ay=w["dispVal"];var p=w["hrefUrl"];if(ay!=null&&ay=="top.gif"){ay="iconArrowUp";}q='<div align="left"><a href="javascript:void(0);" onClick="javascript:showDrillDownData(\''+p+'\');" ><div class="'+ay+'"></div></a></div>';
}s+="<td>"+"<div>"+Q+"</div>"+"</td><td>"+"<div>"+q+"</div>"+"</td>";ak++;if(ak==2){s+="</tr>";ak=0;}if(v<=3){s+="</tr>";ak=0;}H++;}if(H%2!=0&&v>3){s+="<td></td><td></td></tr>";}s+="</tbody></table></div>";var L="10px 10px 10px 10px";if(H==1){L="10px 250px 10px 250px";}if(x){D.push({xtype:"panel",ui:"newGraphPanel",border:false,padding:0,bodyPadding:0,margin:L,title:aA.summary_title,html:s});
}}var ac=aA["measureGrid"];var z=false;var u=Ext.getCmp("ShowResourceDetails");var S=Ext.getCmp("aggregateValue").getValue().groupByValue;var g;if(u!=undefined){g=u.getValue();if(g!=undefined&&g=="No"){z=true;}}if(g==undefined||g=="undefined"){g=appConstants.publicjsonDataUsage.er_showResourceUsage;}if(ac!=undefined&&ac.hasOwnProperty("groupField")){var c=ac.fieldStore;
var i=new Array();var aF;var R=ac.gridDisplayColumns;var l=ac.units;if(R.length>7){z=false;}for(var ah in R){if(R[ah] instanceof Object){var t=R[ah];var E=new Array();for(var P in t){aF=P;var aG=t[P];var aO=l[aF];for(var M in aG){if(!Ext.isEmpty(aO)){aO=aG[M]+" ( "+aO+" ) ";}else{aO=aF;}E.push({header:aO,sortable:true,align:"center",dataIndex:P+"_"+aG[M],renderer:function(aU,m,aT,aX,y,aV,j){if(aU.indexOf("~")>-1){var aW=aU.substring(0,aU.indexOf("~"));
var k=aU.substring(aU.indexOf("~")+1);if(aW!=null&&aW=="top.gif"){aW='<img src="/final/reporter/images/top.gif">';}aU='<a href="javascript:void(0);" onClick="javascript:loadUrlInDrillDown(\''+k+"');\" >"+aW+"</a>";}return aU;},doSort:function(k){var j=this.up("grid").store;var m=this.getSortParam();j.sort({property:m,direction:k,sorterFn:function(aT,y){if(aT.raw!=undefined&&aT.raw.User!=undefined&&aT.raw.User=="Summary"){return;
}if(y.raw!=undefined&&y.raw.User!=undefined&&y.raw.User=="Summary"){return;}aT=aT.get(m);y=y.get(m);if(aT!=undefined&&aT.indexOf("~")>-1){aT=aT.substring(0,aT.indexOf("~"));}if(y!=undefined&&y.indexOf("~")>-1){y=y.substring(0,y.indexOf("~"));}if(!isNaN(aT)&&!isNaN(y)){aT=Ext.isNumber(aT)?aT:parseFloat(String(aT),10);
y=Ext.isNumber(y)?y:parseFloat(String(y),10);if(k=="ASC"){aT=isNaN(aT)?999999:aT;y=isNaN(y)?999999:y;}else{aT=isNaN(aT)?0:aT;y=isNaN(y)?0:y;}}else{if(!isNaN(new Date(aT))&&!isNaN(new Date(y))){y=new Date(y).getTime();aT=new Date(aT).getTime();}}return aT>y?1:(aT<y?-1:0);}});}});}i.push({header:aF,sortable:true,columns:E});
}}else{aF=R[ah];var aO=l[aF];if(!Ext.isEmpty(aO)){aO=aF+"<div>"+aO+"</div>";}else{aO=aF;}i.push({header:aO,sortable:true,dataIndex:aF,align:"center",renderer:function(aU,m,aT,aX,y,aV,j){if(aU.indexOf("~")>-1){var aW=aU.substring(0,aU.indexOf("~"));var k=aU.substring(aU.indexOf("~")+1);if(aW=="DD"){m.tdCls="iconColumn";
aW='<img src="/final/images/spacer.gif" class="iconDiagnosis" />';aU='<a href="javascript:void(0);" onClick="javascript:openDDWin(\''+k+"');\" >"+aW+"</a>";}else{if(aW!=null&&aW=="top.gif"){m.tdCls="iconColumn";aW='<img src="/final/reporter/images/top.gif">';}aU='<a href="javascript:void(0);" onClick="javascript:loadUrlInDrillDown(\''+k+"');\" >"+aW+"</a>";
}}return aU;},doSort:function(k){var j=this.up("grid").store;var m=this.getSortParam();j.sort({property:m,direction:k,sorterFn:function(aT,y){if(aT.raw!=undefined&&aT.raw.User!=undefined&&aT.raw.User=="Summary"){return;}if(y.raw!=undefined&&y.raw.User!=undefined&&y.raw.User=="Summary"){return;}aT=aT.get(m);
y=y.get(m);if(aT!=undefined&&aT.indexOf("~")>-1){aT=aT.substring(0,aT.indexOf("~"));}if(y!=undefined&&y.indexOf("~")>-1){y=y.substring(0,y.indexOf("~"));}if(!isNaN(aT)&&!isNaN(y)){aT=Ext.isNumber(aT)?aT:parseFloat(String(aT),10);y=Ext.isNumber(y)?y:parseFloat(String(y),10);if(k=="ASC"){aT=isNaN(aT)?999999:aT;
y=isNaN(y)?999999:y;}else{aT=isNaN(aT)?0:aT;y=isNaN(y)?0:y;}}else{if(!isNaN(new Date(aT))&&!isNaN(new Date(y))){y=new Date(y).getTime();aT=new Date(aT).getTime();}}return aT>y?1:(aT<y?-1:0);}});}});}}var Z=Ext.create("Ext.data.ArrayStore",{fields:c,data:ac.dataRowArray,groupField:ac.groupField,proxy:{type:"memory",reader:{type:"json"}}});
D.push({xtype:"panel",ui:"newGraphPanel",margin:"10 10 10 10",title:ac.gridTitleNew,items:[{xtype:"customgrid",store:Z,ui:"newGridPanel",sortableColumns:true,needtoFixColumn:true,border:true,forceFit:z,columnLines:true,columns:i,margin:"5 10 10 10",viewConfig:{forceFit:true},features:[{ftype:"grouping",groupHeaderTpl:Ext.create("Ext.XTemplate","{name} ","({rows:this.formatName})",{formatName:function(j){if(appConstants.selectedAdGroupFns!=undefined&&appConstants.selectedAdGroupFns=="Details"){return j.length;
}else{if((appConstants.selectdUserForAdGroupTable!=undefined&&appConstants.selectdUserForAdGroupTable=="-- All --")||(ac.gridTitle!=undefined&&ac.gridTitle.indexOf("*")>-1)){if(j.length>1){return j.length-1;}else{return j.length;}}else{return j.length;}}}}),startCollapsed:false}],listeners:{sortchange:function(m,y,aT,k,j){aq.gridColIndexParam=y.getIndex();
aq.gridColStateParam=y.sortState;},render:function(j){Ext.defer(function(){var k=j.columns[1].items.items[0];if(!Ext.isEmpty(k)){k.setSortState("DESC",true,true);}else{k=j.columns[0];k.setSortState("ASC",true,true);}},100);}}}]});}else{if(g!=undefined&&g=="No"){var B=ac.columns;var au=ac.dataArray;var l=ac.units;
var aJ=ac.TOTAL_COLUMN_COUNT;var X=ac.SINGLE_SUBCOLUMN_COUNT;var ab=this.getMain().getWidth();var aw=55;var f=120;var d=120;var o=0;var T=aJ-X;var an=d+(T*aw)+(X*f);var G={};var N=0;var aM=new Array();var aL=0;if(ab>an){aL=(ab-(d))/aJ;}else{aL=aw;}for(var ah in B){var aF=ah;var ag=new Array();var aP=new Array();
ag=B[ah];if(!Ext.isEmpty(ag)){var aj=ag.length;var ap=aL;if(aj==1){if(aL<f){ap=f;}}for(var Q in ag){var h=ag[Q];G[N]=aF+"_"+h;var aS=l[aF];if(aS!=undefined&&aS!="-"){aS=" ("+aS+")";}else{aS="&nbsp";}var aE=" ("+l[aF]+")";ap=140;aP.push({header:h+aS,sortable:true,dataIndex:N,align:"center",width:ap,doSort:function(k){var j=this.up("grid").store;
var m=this.getSortParam();j.sort({property:m,direction:k,sorterFn:function(aT,y){aT=aT.get(m);y=y.get(m);if(aT!=undefined&&aT.indexOf("~")>-1){aT=aT.substring(0,aT.indexOf("~"));}if(y!=undefined&&y.indexOf("~")>-1){y=y.substring(0,y.indexOf("~"));}if(!isNaN(aT)&&!isNaN(y)){aT=Ext.isNumber(aT)?aT:parseFloat(String(aT),10);
y=Ext.isNumber(y)?y:parseFloat(String(y),10);if(k=="ASC"){aT=isNaN(aT)?999999:aT;y=isNaN(y)?999999:y;}else{aT=isNaN(aT)?0:aT;y=isNaN(y)?0:y;}}else{if(!isNaN(new Date(aT))&&!isNaN(new Date(y))){y=new Date(y).getTime();aT=new Date(aT).getTime();}}return aT>y?1:(aT<y?-1:0);}});}});N++;}var am=new Array();
var aS=l[aF];var aE=" ("+l[aF]+")";aM.push({header:aF,locked:false,columns:aP});}else{var aK="center";if(aF=="User"||aF==" Session Start Time"||aF=="Logout / Disconnect Time"||aF=="Server"){aK="left";}var ap=aL;if(aL<f){ap=f;}G[N]=aF;var U=false;var b="yes";if(aF=="User"){U=true;ap=115;}else{ap=140;}if(aF==""){b="no";
U=true;ap=50;}var am=new Array();var aS=l[aF];var ax=false;var aE=" ("+l[aF]+")";if(Ext.isEmpty(aF)){if(!al){ax=true;}}aM.push({header:aF,dataIndex:N,locked:U,needModify:b,hidden:ax,width:ap,renderer:function(aY,m,aU,a2,y,aZ,j){var aW=aY;if(aY.indexOf("~")>-1){var a1=aY.substring(0,aY.indexOf("~"));var aV=a1;
if(a1!=null&&a1=="top.gif"){a1="iconArrowUp";}if(a1=="DD"){if(r!=null&&r=="Yes"){var aX=aY.substring(aY.indexOf("~")+1);if(aX!=null&&aX!="-"){a1="<ul>";var aT=aX.split(",");for(var a0=0;a0<aT.length;a0++){a1+="<li style='height:20px;'><div style='float:left;'>"+aT[a0]+"</div></li>";}a1+="</ul>";}}else{m.tdCls="iconColumn";
a1='<div align="center"><div class="iconDiagnosis"></div></div>';}}if(a1=="Details"){m.tdCls="iconColumn";a1='<div align="center"><div class="iconReportDetails"></div></div>';}var k=aY.substring(aY.indexOf("~")+1);if(aV=="DD"){aW="DD";if(r!=null&&r=="Yes"){aY=a1;}else{aY='<div align="center"><a href="javascript:void(0);" class="anchorLinkDefault" onClick="javascript:openDDWin(\''+k+"')\">"+a1+"</a></div>";
}}else{if(aV=="iconArrowUp"||aV=="top.gif"){aW="Graph";aY='<div align="center"><a href="javascript:void(0);" onClick="window.location.href=\''+k+'\'" ><div class="iconReportDetails"></div></a></div>';}else{if(aV=="Details"){aW="Details";aY='<div align="center"><a href="javascript:void(0);" class="anchorLinkDefault" onClick="javascript:loadUsersSessionView(\''+aU.data.indx+"')\">"+a1+"</a></div>";
}else{aY='<div align="left"><a href="javascript:void(0);" class="anchorLinkDefault" onClick="window.location.href=\''+k+"'\" >"+a1+"</a></div>";}}}}m.tdAttr='data-qtip="'+aW+'"';return aY;}});N++;}o++;}var aB=40;if(S!=null&&S=="Summary"){aB=160;}var aQ;gridPageSize=15;if(au.length<gridPageSize){aQ=true;
}else{aQ=false;}var aa=[];var aR=Object.keys(au[0]).length;for(var ah in au[0]){aa.push(ah);}var Z=Ext.create("Ext.data.Store",{fields:aa,proxy:{type:"pagingmemory",reader:{type:"json",root:"data",totalProperty:"total"},data:au,},remoteSort:true,pageSize:gridPageSize,autoLoad:true,});var F=1;D.push({xtype:"panel",ui:"newGraphPanel",margin:"10 10 10 10",title:ac.gridTitle,items:[{xtype:"customgrid",store:Z,sortableColumns:true,needtoFixColumn:true,forceFit:true,border:true,ui:"newGridPanel",columns:aM,padding:0,margin:"5 10 10 10",listeners:{sortchange:function(m,y,aT,k,j){aq.gridColIndexParam=y.getIndex();
aq.gridColStateParam=y.sortState;this.getStore().loadPage(F);},render:function(j){Ext.defer(function(){},100);}},dockedItems:[{xtype:"pagingtoolbar",cls:"newPagination",dock:"bottom",displayInfo:true,store:Z,hidden:aQ,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No topics to display",listeners:{change:function(j,k){if(!Ext.isEmpty(k)){F=k.currentPage;
}else{F=1;}}}}]}]});}else{if(ac!=undefined){var B=ac.columns;var au=ac.dataArray;var l=ac.units;var aJ=ac.TOTAL_COLUMN_COUNT;var X=ac.SINGLE_SUBCOLUMN_COUNT;var ab=this.getMain().getWidth();var aw=55;var f=120;var d=120;var o=0;var T=aJ-X;var an=d+(T*aw)+(X*f);var aN=0;if(ae!=undefined&&ae=="yes"){aN=1;
}var G={};var N=0;var aM=new Array();var aL=0;if(ab>an){aL=(ab-(d))/aJ;}else{aL=aw;}for(var ah in B){var aF=ah;var ag=new Array();var aP=new Array();ag=B[ah];if(!Ext.isEmpty(ag)){var aj=ag.length;var ap=aL;if(aj==1){if(aL<f){ap=f;}}for(var Q in ag){var h=ag[Q];G[N]=aF+"_"+h;var aS=l[aF];if(aS!=undefined){aS=" ("+aS+")";
}else{aS="&nbsp";}var aE=" ("+l[aF]+")";ap=140;aP.push({header:h+aS,sortable:true,dataIndex:N,align:"center",width:ap,doSort:function(k){var j=this.up("grid").store;var m=this.getSortParam();j.sort({property:m,direction:k,sorterFn:function(aW,aV){aW=aW.get(m);aV=aV.get(m);if(aW!=undefined&&aW.indexOf("~")>-1){aW=aW.substring(0,aW.indexOf("~"));
}if(aV!=undefined&&aV.indexOf("~")>-1){aV=aV.substring(0,aV.indexOf("~"));}if(aW.indexOf(".")>-1&&aW.indexOf(" ")>-1){var aT=aW.substring(0,aW.lastIndexOf(" "));var aU=new Date(Ext.Date.parse(aT,mgrDateFormat));var y=Ext.Date.dateFormat(aU,getExtjsDateFormat("MMM-dd-yyyy"));aW=y+aW.substring(aW.lastIndexOf(" "),aW.length);
}if(aV.indexOf(".")>-1&&aV.indexOf(" ")>-1){var aT=aV.substring(0,aV.lastIndexOf(" "));var aU=new Date(Ext.Date.parse(aT,mgrDateFormat));var y=Ext.Date.dateFormat(aU,getExtjsDateFormat("MMM-dd-yyyy"));aV=y+aV.substring(aV.lastIndexOf(" "),aV.length);}if(!isNaN(aW)&&!isNaN(aV)){aW=Ext.isNumber(aW)?aW:parseFloat(String(aW),10);
aV=Ext.isNumber(aV)?aV:parseFloat(String(aV),10);if(k=="ASC"){aW=isNaN(aW)?999999:aW;aV=isNaN(aV)?999999:aV;}else{aW=isNaN(aW)?0:aW;aV=isNaN(aV)?0:aV;}}else{if(!isNaN(new Date(aW))&&!isNaN(new Date(aV))){aV=new Date(aV).getTime();aW=new Date(aW).getTime();}}return aW>aV?1:(aW<aV?-1:0);}});},renderer:function(aW,m,aU,aZ,y,aX,j){var aV=aW;
if(aW!=undefined&&aW.indexOf("~")>-1){var aY=aW.substring(0,aW.indexOf("~"));var k=aW.substring(aW.indexOf("~")+1);var aT='class="anchorLinkDefault"';if(aY!=null&&aY=="top.gif"){aT="";aV="Graph";aY='<img src="/final/reporter/images/top.gif">';}else{aV=aY;}aW='<a href="javascript:void(0);" onClick="javascript:loadUrlInDrillDown(\''+k+"');\" >"+Ext.getCmp("girdTable_1").getDecimalAlignFormat(aY,true)+"</a>";
}else{aW=Ext.getCmp("girdTable_1").getDecimalAlignFormat(aW);}m.tdAttr='data-qtip="'+aV+'"';return aW;}});N++;}var am=new Array();var aS=l[aF];var aE=" ("+l[aF]+")";aM.push({header:aF,columns:aP});}else{var aK="center";if(aF=="User"||aF==" Session Start Time"||aF=="Logout / Disconnect Time"||aF=="Server"){aK="left";
}var ap=aL;if(aL<f){ap=f;}G[N]=aF;if(N==1){ap=115;}else{if(N==0){ap=90;}}if(N==0&&Ext.getCmp("aggregateValue").getValue().groupByValue=="Details"){ap=70;}var ax=false;var U=false;var C;var J;if(aF=="Applications"){ax=true;C=N;}if(aF=="More Details"){ax=true;J=N;}if(aF==""||aF=="User"){U=true;}var b="yes";
if(aF==""){b="no";}aM.push({header:aF,sortable:true,dataIndex:N,align:aK,hidden:ax,needModify:b,width:ap,doSort:function(k){var j=this.up("grid").store;var m=this.getSortParam();j.sort({property:m,direction:k,sorterFn:function(aT,y){aT=aT.get(m);y=y.get(m);if(aT!=undefined&&aT.indexOf("~")>-1){aT=aT.substring(0,aT.indexOf("~"));
}if(y!=undefined&&y.indexOf("~")>-1){y=y.substring(0,y.indexOf("~"));}if(!isNaN(aT)&&!isNaN(y)){aT=Ext.isNumber(aT)?aT:parseFloat(String(aT),10);y=Ext.isNumber(y)?y:parseFloat(String(y),10);if(k=="ASC"){aT=isNaN(aT)?999999:aT;y=isNaN(y)?999999:y;}else{aT=isNaN(aT)?0:aT;y=isNaN(y)?0:y;}}else{if(!isNaN(new Date(aT))&&!isNaN(new Date(y))){y=new Date(y).getTime();
aT=new Date(aT).getTime();}}return aT>y?1:(aT<y?-1:0);}});},renderer:function(a1,a2,m,aV,aT,aU,aX){var a4=a1;if(a1!=undefined&&a1.indexOf("~")>-1){var aZ=a1.substring(0,a1.indexOf("~"));var k=aZ;if(aZ!=null&&aZ=="top.gif"){aZ="iconArrowUp";}if(aZ=="DD"){if(r!=null&&r=="Yes"){var a5=a1.substring(a1.indexOf("~")+1);
if(a5!=null&&a5!="-"){aZ="<ul>";var a3=a5.split(",");for(var aY=0;aY<a3.length;aY++){aZ+="<li style='height:20px;'><div style='float:left;'>"+a3[aY]+"</div></li>";}aZ+="</ul>";}}else{aZ='<div align="center"><div class="iconDiagnosis"></div></div>';}}if(aZ=="Details"){aZ='<div align="center"><div class="iconReportDetails"></div></div>';
}var y=a1.substring(a1.indexOf("~")+1);if(k=="DD"){a4="DD";if(r!=null&&r=="Yes"){a1=aZ;}else{a1='<div align="center"><a class="anchorLinkDefault" href="javascript:void(0);" onClick="javascript:openDDWin(\''+y+"')\">"+aZ+"</a></div>";}}else{if(k=="iconArrowUp"||k=="top.gif"){a4="Graph";a1='<div align="center"><a class="anchorLinkDefault" href="javascript:void(0);" onClick="window.location.href=\''+y+'\'" ><div class="iconArrowUp"></div></a></div>';
}else{if(k=="Details"){a4="Details";a1='<div align="center"><a class="anchorLinkDefault" href="javascript:void(0);" onClick="javascript:loadUsersSessionView(\''+m.data.indx+"')\">"+aZ+"</a></div>";}else{a4=aZ;a1='<div align="center"><a class="anchorLinkDefault" href="javascript:void(0);" onClick="window.location.href=\''+y+"'\" >"+aZ+"</a></div>";
}}}if(aT==0+aN){var aW=m.data[C];var a6=m.data[J];if(!al){a1="";if(a6!=undefined&&a6!="undefined"){var a7=a6.substring(0,a6.indexOf("~"));var a0=a6.substring(a6.indexOf("~")+1);a1='<table ><tr><td><div align="center"><a href="javascript:void(0);" onClick="window.location.href=\''+a0+'\'" ><div class="iconArrowUp"></div></a></div></td></tr></table>';
}}if(aW!=undefined&&aW!="undefined"){var a7=aW.substring(0,aW.indexOf("~"));var a0=aW.substring(aW.indexOf("~")+1);if(a7!=null&&a7=="DD"){if(r!=null&&r=="Yes"){var a5=aW.substring(aW.indexOf("~")+1);if(a5!=null&&a5!="-"){a7="<ul>";var a3=a5.split(",");for(var aY=0;aY<a3.length;aY++){a7+="<li style='height:20px;'><div style='float:left;'>"+a3[aY]+"</div></li>";
}a7+="</ul>";}}else{a7='<div align="center"><div class="iconDiagnosis"></div></div>';}aW='<div align="center"><a href="javascript:void(0);" onClick="javascript:openDDWin(\''+a0+"')\">"+a7+"</a></div>";}else{aW='<div align="center">-</div>';}if(K){var j="";if(a6!=undefined&&a6!="undefined"){var a0=a6.substring(a6.indexOf("~")+1);
j='<table ><tr><td><div align="center"><a href="javascript:void(0);" onClick="window.location.href=\''+a0+'\'" ><div class="iconArrowUp"></div></a></div></td></tr></table>';}if(j==a1){j="";}a1='<table width="75px" style="width:50px"><tr><td width="25px">'+a1+'</td><td width="25px">'+j+'</td><td width="25px">'+aW+"</td></tr></table>";
}else{a1='<table width="50px" style="width:50px"><tr><td width="25px">'+a1+'</td><td width="25px">'+aW+"</td></tr></table>";}a2.tdCls="iconColumn";}else{if(a6!=undefined&&a6!="undefined"&&al){if(K){var j="";if(a6!=undefined&&a6!="undefined"){var a0=a6.substring(a6.indexOf("~")+1);j='<table ><tr><td><div align="center"><a href="javascript:void(0);" onClick="window.location.href=\''+a0+'\'" ><div class="iconArrowUp"></div></a></div></td></tr></table>';
}a1='<table width="50px" style="width:50px"><tr><td width="25px">'+a1+'</td><td width="25px">'+j+"</td></tr></table>";}}}}}a2.tdAttr='data-qtip="'+a4+'"';return a1;}});var am=new Array();var aS=l[aF];var aE=" ("+l[aF]+")";N++;}o++;}var aQ;gridPageSize=15;if(au.length<gridPageSize){aQ=true;}else{aQ=false;
}var aa=[];var aR=Object.keys(au[0]).length;for(var ah in au[0]){aa.push(ah);}var ar=Ext.getCmp("thinclientuser").getWidth()-100;if(ae!=undefined&&ae=="yes"){if(!aa.includes("splitUpDetails")){aa.push("splitUpDetails");}for(var aI in au){var Y=au[aI];var aC=Y.splitUpDetails;var ad='<div style="margin:5px;width:'+ar+'px;">';
ad+='<table width="100%" cellpadding="0" cellspacing="0" border="0px"><tbody><tr>';if(aC!=undefined){for(var az in aC){var af=aC[az];ad+='<td width="50%"><div style="margin:0px 10px 10px 0px;" class="newPlainTable"><div class="font_bold12">'+az+"</div>";ad+='<div><table width="100%" cellpadding="0" cellspacing="0">';
if(af!=undefined){for(var av in af){ad+="<tr><td>"+av+"</td><td>"+af[av]+"</td></tr>";}}ad+="</table></div></td>";}ad+="</tr></tbody></table></div>";au[aI]["splitUpDetails"]=ad;}else{au[aI].splitUpDetails="";}}}var n=80;var aD=appConstants.publicjsonDataUsage.selectedCompType;if(aD!=null&&aD=="Xen_desktop_server"){n=50;
}if(S!=null&&S=="Summary"){n=170;}var Z=Ext.create("Ext.data.Store",{fields:aa,proxy:{type:"pagingmemory",reader:{type:"json",root:"data",totalProperty:"total"},data:au,},pageSize:gridPageSize,autoLoad:true,remoteSort:true,sorters:{property:aa[1],direction:"ASC"}});if(ae!=undefined&&ae=="yes"){var ao=[];
var ai={};ao=[{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%">{splitUpDetails}</div>',]}];ai={stripeRows:true,getRowClass:function(j,y,m,k){if(j.data.splitUpDetails!=undefined&&j.data.splitUpDetails.length>0){return"";
}else{return"hidePlus";}}};}var F=1;D.push({xtype:"panel",ui:"newGraphPanel",margin:"10 10 10 10",title:ac.gridTitle,items:[{xtype:"customgrid",store:Z,ui:"newGridPanel",sortableColumns:true,needtoFixColumn:true,border:true,id:"girdTable_1",columns:aM,plugins:ao,viewConfig:ai,margin:"0 10 10 10",listeners:{sortchange:function(m,y,aT,k,j){aq.gridColIndexParam=y.getIndex();
aq.gridColStateParam=y.sortState;this.getStore().loadPage(F);},render:function(j){Ext.defer(function(){j.columns[1+aN].setSortState("DESC",true,true);j.columns[0+aN].setWidth(n);if(aN==1){j.columns[0].setWidth(35);}},100);}},dockedItems:[{xtype:"pagingtoolbar",dock:"bottom",cls:"newPagination",displayInfo:true,store:Z,hidden:aQ,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No topics to display",listeners:{change:function(j,k){if(!Ext.isEmpty(k)){F=k.currentPage;
}else{F=1;}}}}]}]});}}}var O=aA["disconnectUserTable"];if(!Ext.isEmpty(O)&&O["columnDetails"].length>0){var aa=new Array();var W=O.tableData;var B=O["columnDetails"];for(var ah in W[0]){aa.push(ah);}var aH=Ext.create("Ext.data.Store",{fields:aa,proxy:{type:"pagingmemory",reader:{type:"json"},data:W,},pageSize:gridPageSize,autoLoad:true,remoteSort:true,sorters:{property:aa[0],direction:"DESC"}});
var e=new Array();var A="left";for(var P in B){if(P==2){A="center";}e.push({header:B[P],dataIndex:P,align:A,doSort:function(k){var j=this.up("grid").store;var m=this.getSortParam();j.sort({property:m,direction:k,sorterFn:function(aT,y){aT=aT.get(m);y=y.get(m);if(!isNaN(aT)&&!isNaN(y)){aT=Ext.isNumber(aT)?aT:parseFloat(String(aT),10);
y=Ext.isNumber(y)?y:parseFloat(String(y),10);if(k=="ASC"){aT=isNaN(aT)?999999:aT;y=isNaN(y)?999999:y;}else{aT=isNaN(aT)?0:aT;y=isNaN(y)?0:y;}}else{if(!isNaN(new Date(aT))&&!isNaN(new Date(y))){y=new Date(y).getTime();aT=new Date(aT).getTime();}}return aT>y?1:(aT<y?-1:0);}});}});}if(W.length<gridPageSize){aQ=true;
}else{aQ=false;}D.push({xtype:"panel",ui:"newGraphPanel",margin:"10 10 10 10",title:O.title,items:[{xtype:"customgrid",store:aH,ui:"newGridPanel",forceFit:true,border:true,id:"disconnectUserTable",columns:e,margin:"0 10 10 10",dockedItems:[{xtype:"pagingtoolbar",dock:"bottom",cls:"newPagination",store:aH,hidden:aQ,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No topics to display"}]}]});
}Ext.getCmp("csvTool").setDisabled(false);at.removeAll();at.add(D);at.show();}},loadReportData:function(E){var I=new Array();var t=this;var T=Ext.getCmp("report_category").getValue();var d=false;var D=Ext.getCmp("resultPanel");if(E.hasOwnProperty("reportData")){var G=E.reportData;var h=E.needLogonSplitUp;
var z=G.compType;var C=G.NO_DATA;if(z!=undefined&&z=="Horizon_Pod"){if(C==undefined||C=="Yes"){this.disableTools();D.hide();this.getNomeasurepanel().show();initLdgMask.hide();Ext.getCmp("panelinsidetoggle").setDisabled(true);return;}}Ext.getCmp("panelinsidetoggle").setDisabled(false);if(T=="user_activity"||T=="user_Channel"){D.removeAll();
appConstants.publicjsonDataActivity=E;var A=E["chartType"];reportType=E.selectedreportType;if(reportType=="Yes"){var x=new Array();x=G.chartUrls;noOfchart=x.length;var n=E.selectedGraphType;Ext.getCmp("csvTool").setDisabled(true);if(n=="distribution"){Ext.getCmp("bookletTool").setDisabled(false);Ext.getCmp("saveTool").setDisabled(false);
Ext.getCmp("printTool").setDisabled(false);Ext.getCmp("mailTool").setDisabled(false);for(var P=0;noOfchart>P;P++){var e=x[P];var M=this.getXmlForUrl(e);if(!Ext.isEmpty(M)&&M.hasOwnProperty("XML")){d=true;var g;var f;if(P==0){g="0 10 10 10";f=0.65;}else{g="0 10 10 0";f=1;}var J={xtype:"panel",ui:"newGraphPanel",data:M,flex:f,title:M.chartTitle,margin:g,header:{style:{"padding":"10px 5px 5px 10px"}},id:"fusion"+P};
I.push(J);}}if(d){D.add({xtype:"panel",title:G.title,margin:"10 10 10 10",ui:"multiGraphPanel",layout:{type:"hbox",align:"stretch"},height:400,columnWidth:1,items:I});D.show();if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}for(var P=0;P<noOfchart;P++){var U="";var F=Ext.getCmp("fusion"+P);
if(F!=undefined){U=F.data;}if(!Ext.isEmpty(U)&&U.hasOwnProperty("XML")){var W=U.innerHtml;var V=U.chartFor;var S=U.chartHight;if(V=="Top"){appConstants.erUtils.updateBarChart(appConstants.chartType,"",U.XML,U.swfpath,U,U.chartHeight-20,U.chartWidth,F);}else{if(V=="distribution"){appConstants.erUtils.updatePieChart(appConstants.chartType,U,"pieColors","urlLinks","pieLabels","",U.XML,U.swfpath,U,F);
}}}else{if(F!=undefined){F.update('<div><img src="/final/reporter/images/nographformeasure.gif" width="100%" /></div>');}else{this.getNomeasurepanel();}}}Ext.getCmp("selectionDetails").setSelectionDetailsData(E.selectionDetails);initLdgMask.hide();}else{this.disableTools();D.hide();this.getNomeasurepanel().show();
initLdgMask.hide();Ext.getCmp("panelinsidetoggle").setDisabled(true);}}else{if(n=="timeline"){var B=E.showLegend;Ext.getCmp("showLegend").show();var K=Ext.getCmp("showLegend");K.setValue(B);var D=Ext.getCmp("resultPanel");I=new Array();D.removeAll();Ext.getCmp("bookletTool").setDisabled(false);Ext.getCmp("saveTool").setDisabled(false);
Ext.getCmp("printTool").setDisabled(false);Ext.getCmp("mailTool").setDisabled(false);Ext.getCmp("upbutton").setDisabled(false);var q=new Array();var r=new Array();var p=new Array();var b=new Array();var m=new Array();var l='<div  style="width:100%"><table width="100%" border="0" class="htmlGraphTable"><col width="50%"><col width="50%"><tr>';
var j=0;for(var P=0;noOfchart>P;P++){var w=false;var O=300;var k=x[P];var e=k.queryString;var R=parseInt(k.chartHeight);var s=parseInt(k.chartWidth);var a=k.drillDownQstring;var N=k.drillDownQstring1;var X=k.chartTitle;var v=k.ddQstring;var o=k.isddEnabled;var L=N+"&option=Citrix&drillDown=yes";var Q=Ext.getCmp("er_sthr").getValue();
var y=Ext.getCmp("er_endhr").getValue();if(O<R){O=R;}var H=L+="&calculatedHeight="+O+"&dpSh="+Q+"&dpEh="+y;b.push(e);if(j==2){j=0;l+="</tr>";l+="<tr>";}if(P==0){if(noOfchart>2){l+='<td style="padding:0px 5px 5px 10px">';}else{if(noOfchart==2){l+='<td style="padding:10px 5px 10px 10px">';}else{l+='<td style="padding:10px 10px 10px 10px">';
}}}else{if(P==1){if(noOfchart>2){l+='<td style="padding:0px 10px 5px 5px">';}else{l+='<td style="padding:10px 10px 10px 5px">';}}else{if((P%2)==0){if(P==noOfchart-1){w=true;l+='<td style="padding:5px 5px 10px 10px">';}else{if(P==noOfchart-2){l+='<td style="padding:5px 5px 5px 10px">';}else{l+='<td style="padding:5px 5px 5px 10px">';
}}}else{if((P%2)!=0){if(P==noOfchart-1){l+='<td style="padding:5px 10px 5px 5px">';}else{l+='<td style="padding:5px 10px 5px 5px">';}}}}}l+='<div width="100%" class="graphMainDiv">';l+='<div class="htmlGraphTableHeader"><div style="float:left;width:75%" class="infoText" data-qtip="'+X+'">';l+=X;l+="</div>";
l+='<div style="float:right;margin:3px 0px 4px 5px;">';l+='<div style="float:right;cursor:pointer;margin:0px 0px 0px 5px;" class="iconMaximize" onclick="javascript:loadUrlInDrillDown(\''+H+"');\"></div>";l+='<div style="float:right;cursor:pointer;margin:0px 5px 0px 5px;" class="iconCsv" onclick="javascript:loadCSVWindow(\''+a+"&option=CSV"+"');\"></div>";
l+='<div style="float:right;cursor:pointer;margin:0px 5px 0px 5px;" class="iconData" onclick="javascript:loadDataWindow(\''+a+"&option=data"+"');\"></div>";if(appConstants.isFromDrillDown!=null&&appConstants.isFromDrillDown!="null"&&appConstants.isFromDrillDown!=undefined&&appConstants.isFromDrillDown!="undefined"&&appConstants.isFromDrillDown){if(o!=undefined&&o=="true"){l+='<div style="float:right;cursor:pointer;margin:0px 5px 0px 5px;" class="iconDiagnosis" onclick="javascript:openDDWindow(\''+v+"');\"></div>";
}}l+="</div></div>";l+='<div class="headerBottomBorder" style="padding:0px;margin:0px"></div>';var c="img_"+P;m.push(c);l+='<div id="'+c+'" style="height:225px;width:100%;" class="htmlGraphTableBody showDiv">';if(A!="highchart"){l+='<img src="'+e+'"></img>';}l+="</div>";l+='<div style="height:60px;margin-right: 10px;" id="commonLeg_'+c+'" class="showDiv commonLeg">';
l+='<div id="'+c+'_legend" style="height:55px;width:100%;overflow:hidden;display:inline-block; vertical-align: middle;" class="showDiv">';l+="</div></div>";l+="</div></td>";if(w){l+='<td style="padding:5px 10px 10px 5px;">&nbsp;</td>';}j++;}if(j==2){l+="</tr>";}l+="</table></div>";D.removeAll();D.add({xtype:"panel",title:G.title,ui:"multiGraphPanel",cls:"newChk",margin:"10 10 10 10",columnWidth:1,html:l,listeners:{resize:function(Y,Z,i){$(".graphMainDiv").each(function(aa){if(m.length>1){$(this).width((Z-32)/2);
}});},boxready:function(){var Y=Ext.getCmp("showLegend").getValue();if(Y=="false"||Y==false){var ac=document.getElementsByClassName("commonLeg");for(var ab=0;ab<ac.length;ab++){var aa=ac[ab].id;var Z=document.getElementById(aa);if(Z!=null&&Z!=undefined){Z.className=Z.className.replace("showDiv","hideDiv");
}}}}}});D.show();D.doLayout();if(A=="highchart"){for(var u in b){reportHighStockChart(b[u]+"&chartType="+A,m[u],"","","");}}Ext.getCmp("selectionDetails").setSelectionDetailsData(E.selectionDetails);initLdgMask.hide();}}}else{if(reportType=="No"){Ext.getCmp("bookletTool").setDisabled(false);Ext.getCmp("saveTool").setDisabled(false);
Ext.getCmp("printTool").setDisabled(false);Ext.getCmp("mailTool").setDisabled(false);Ext.getCmp("csvTool").setDisabled(false);publicGridData=G.GridObj;this.loadGrid(publicGridData);Ext.getCmp("selectionDetails").setSelectionDetailsData(E.selectionDetails);initLdgMask.hide();}}}else{if(T=="user_usage"){Ext.getCmp("bookletTool").setDisabled(false);
Ext.getCmp("saveTool").setDisabled(false);Ext.getCmp("printTool").setDisabled(false);Ext.getCmp("mailTool").setDisabled(false);Ext.getCmp("upbutton").setDisabled(false);appConstants.publicjsonDataUsage=E;appConstants.selectdUserForAdGroupTable=E.selectedUser;appConstants.selectedAdGroupFns=E.selectedAdGroupFns;
if(z!=undefined&&z=="Horizon_Pod"){D.removeAll();D.add({xtype:"podresultview",data:G});D.show();Ext.getCmp("csvTool").setDisabled(false);}else{this.loadUsageGridandTable(G,h);}Ext.getCmp("selectionDetails").setSelectionDetailsData(E.selectionDetails);initLdgMask.hide();}}}else{this.disableTools();D.hide();
this.getNomeasurepanel().show();initLdgMask.hide();Ext.getCmp("panelinsidetoggle").setDisabled(true);}},submitReport:function(){initLdgMask.show();var e;var h;var c;var m;var j=false;var l=Ext.getCmp("mainform").getForm();if(!isSettingsEnabled){this.showConfigDropdown();}var g=this.getThinclientusersettings().getForm();
var o=l.findField("report_category").getValue();appConstants.report_for=o;if(o=="user_activity"||o=="user_Channel"){var i=l.findField("er_type").getValue();var b=l.findField("er_graphType").getValue();if(i=="Yes"){if(b=="timeline"){Ext.getCmp("showLegend").show();}var p=Ext.getCmp("er_application").getValue();
if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}p=appConstants.erUtils.specialCharEncode(p);if(p=="Not Applicable"||p=="null"||p==null){p="-1";}if(b=="distribution"){p="-1";}if(appConstants.isFromDrillDown==null||appConstants.isFromDrillDown=="null"||appConstants.isFromDrillDown==undefined||appConstants.isFromDrillDown=="undefined"||!appConstants.isFromDrillDown){e="../servlet/com.eg.ErCtxServerReportC?isSubmit=true&er_server=-1&er_sortby=-1&responseType=json"+"&er_application="+p+"&main_search=true";
}else{e="../servlet/com.eg.ErCtxServerReportC?isSubmit=true&er_server=-1&er_sortby=-1&responseType=json"+"&er_application="+p;}h="../servlet/com.eg.ErStartBackGroundReportC?isSubmit=true&er_server=-1&er_sortby=-1&responseType=json";}else{Ext.getCmp("showLegend").hide();e="../servlet/com.eg.ErCtxServerReportC?isSubmit=true&responseType=json";
h="../servlet/com.eg.ErStartBackGroundReportC?isSubmit=true&responseType=json";c="../servlet/com.eg.ErStartBackGroundReportC?isSubmit=true&SaveFormat=CSV";}this.updateQStringActivity();m=appConstants.queryStringActivity;}else{this.updateQStringUsage(false);m=appConstants.queryStringUsage;var a=Ext.getCmp("er_server_text_box");
if(!Ext.isEmpty(a)&&a.isVisible()){m+="&er_guestname="+a.getValue();}e="../servlet/com.eg.ErCtxServerReportC?isSubmit=true&responseType=json";h="../servlet/com.eg.ErStartBackGroundReportC?isSubmit=true&responseType=json";c="../servlet/com.eg.ErStartBackGroundReportC?isSubmit=true&SaveFormat=CSV";}m+="&er_RmDispName="+appConstants.er_RmDispName;
if(appConstants.menuForVM=="true"){m+="&menuForVM=true";}var k=Ext.getCmp("resultPanel");var n=Ext.getCmp("selectionDetails");var d=Ext.getCmp("reportGeneration").getValue();var s="";this.getNomeasurepanel().hide();this.getBackGroundPanel().hide();if(d=="foreground"){Ext.Ajax.request({url:e,params:m,method:"POST",scope:this,timout:320000,success:function(t){initLdgMask.hide();
var v=t.responseText;if(v!=undefined){var u=Ext.decode(v);this.loadReportData(u);}}});}else{if(d=="background"){k.hide();var q=this;var f="";initLdgMask.show();var r=Ext.getCmp("bgReportName").getValue();r=checkFileName(r);Ext.Ajax.request({url:h,params:m+"&bg_reportname="+r,success:function(t){var y=t.responseText;
var w=Ext.decode(y);var x=w.backgroundReportStatus;if(x!="undefined"){if(x=="success"){var u=w.bgroundResponseTxt;var z=w.bgroundReportsURL;var v=w.backgroundAnchor;f='<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">'+u+".</br>"+'<a class="backgroundMsgLink" href='+z+">"+v+"</a></div></td></tr></table></td></tr></table>";
}else{if(x=="duplicate"){var u=w.bgroundResponseTxt;var z=w.bgroundReportsURL;var v=w.backgroundAnchor;f='<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">'+u+".</br>"+'<a class="backgroundMsgLink" href='+z+">"+v+"</a></div></td></tr></table></td></tr></table>";
}else{var u=w.bgroundResponseTxt;f='<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">'+u+"</div></td></tr></table></td></tr></table>";
}}}else{f='<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 </a></div></td></tr></table></td></tr></table>';
}q.getBackGroundPanel().update(f);q.getBackGroundPanel().show();initLdgMask.hide();}});}else{if(d=="background-csv"){k.hide();var q=this;var f="";initLdgMask.show();var r=Ext.getCmp("bgReportName").getValue();r=checkFileName(r);Ext.Ajax.request({url:c,params:m+"&bg_reportname="+r,success:function(t){var y=t.responseText;
var w=Ext.decode(y);var x=w.backgroundReportStatus;if(x!="undefined"){if(x=="success"){var u=w.bgroundResponseTxt;var z=w.bgroundReportsURL;var v=w.backgroundAnchor;f='<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">'+u+".</br>"+'<a class="backgroundMsgLink" href='+z+">"+v+"</a></div></td></tr></table></td></tr></table>";
}else{if(x=="duplicate"){var u=w.bgroundResponseTxt;var z=w.bgroundReportsURL;var v=w.backgroundAnchor;f='<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">'+u+".</br>"+'<a class="backgroundMsgLink" href='+z+">"+v+"</a></div></td></tr></table></td></tr></table>";
}else{var u=w.bgroundResponseTxt;f='<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">'+u+"</div></td></tr></table></td></tr></table>";
}}}else{f='<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 </a></div></td></tr></table></td></tr></table>';
}q.getBackGroundPanel().update(f);q.getBackGroundPanel().show();initLdgMask.hide();}});}}}},adGroupChange:function(){var a=Ext.getCmp("clientIpRadio");var b=Ext.getCmp("adGroupFns");if(b!=undefined){var c=b.getValue().adGroupByValue;if(c=="Details"){if(a!=undefined){a.show();}}else{if(a!=undefined){a.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();}}},changeResourceDetails:function(a){var b=Ext.getCmp("ShowResourceDetails").getValue();
if(b!=undefined&&b=="Yes"&&isVm&&appConstants.menuForVM!="true"){Ext.getCmp("showFrom").show();}else{Ext.getCmp("showFrom").hide();}},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(q,C){var B;var E="";var G;var a;var A=Ext.getCmp("mainform").getForm();
var j=null;if(isSettingsEnabled){j=this.getThinclientusersettings().getForm();}var H=A.findField("er_type").getValue();var w=A.findField("er_compType").getValue();B="select_farm="+encodeURIComponent(A.findField("select_farm").getValue())+"&er_comptype="+A.findField("er_compType").getValue()+"&er_type="+H+"&er_excwe="+this.getSettingsFieldValue(j,"er_excwe",isSettingsEnabled,"excludeWeek")+"&er_reportgenration="+this.getSettingsFieldValue(j,"reportGeneration",isSettingsEnabled,"reportGeneration");
if(Ext.get("showLegend")!=null){B=B+"&showLegend="+A.findField("showLegend").getValue();}var e=A.findField("showFrom");if(e.isVisible()||appConstants.menuForVM=="true"){B+="&showFrom="+e.getValue();}if(H=="Yes"){var t=A.findField("er_graphType").getValue();B+="&graphViewtype="+t+"&select_testmes="+A.findField("select_testmes").getValue()+"&er_mode="+A.findField("er_mode").getValue()+"&sh_timeinuse=No";
if(t=="timeline"||H=="No"){var i=A.findField("er_application");var c=this.getSettingsFieldValue(j,"er_perserver",isSettingsEnabled,"selectedAggServer");if(c!=null){B+="&er_perserver="+c;}}else{if(t=="distribution"){B+="&er_perserver=Yes";}}}else{var y=Ext.getCmp("er_server").getValue();if(y!=null&&y!="undefined"&&y.length>0){for(var z=0;
y.length>z;z++){B+="&er_workgroupserver="+y[z];B+="&er_server="+y[z];}}var F=Ext.getCmp("er_sortby").getValue();var u=Ext.getCmp("er_sortby");var p=u.getValue();var b=u.findRecord(u.valueField||u.displayField,p);var h=u.store.indexOf(b)+1;B+="&er_sortby="+F+"&er_sort_index="+h;B+="&er_priority="+A.findField("er_priority").getValue()+"&sh_timeinuse="+this.getSettingsFieldValue(j,"sh_timeinuse",isSettingsEnabled,"weightedAvg");
if(y==undefined||y=="-1"||(y!=null&&y!=undefined&&y.length>1)){var c=this.getSettingsFieldValue(j,"er_perserver",isSettingsEnabled,"selectedAggServer");if(c!=null){B+="&er_perserver="+c;}}}if(isSettingsEnabled){var d=Ext.getCmp("dsktp_searchTxt");if(d.isVisible()){B+="&dsktp_searchTxt="+d.getValue();
}}if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}var f=this.getSettingsFieldValue(j,"timefrom",isSettingsEnabled,"selectedTimeFrom");var x=this.getSettingsFieldValue(j,"minfrom",isSettingsEnabled,"selectedMinsFrom");var s=this.getSettingsFieldValue(j,"timeto",isSettingsEnabled,"selectedTimeTo");
var r=this.getSettingsFieldValue(j,"minto",isSettingsEnabled,"selectedMinsTo");var G="&er_timeline="+A.findField("er_timeline").getValue()+"&startdate="+A.findField("er_stdate").dataArray+"&enddate="+A.findField("er_enddate").dataArray+"&starthr="+A.findField("er_sthr").dataArray+"&endhr="+A.findField("er_endhr").dataArray+"&startmin="+mgr_stmin+"&endmin="+mgr_enmin+"&er_secs=00";
var n="&timefrom="+f+"&minfrom="+x+"&timeto="+s+"&minto="+r;var l=Ext.getCmp("er_application").getValue();if(appConstants.publicjsonDataActivity.hasOwnProperty("hiddenfields")){var o=appConstants.publicjsonDataActivity.hiddenfields;for(var g in o){if(C){if(g!="schedule_id"){E+="&"+g+"="+o[g];}}else{E+="&"+g+"="+o[g];
}}}var m=A.findField("er_application_text_box");if(m.isHidden()){if(!Ext.getCmp("er_application").isHidden()){B+="&er_application="+appConstants.erUtils.specialCharEncode(Ext.getCmp("er_application").getValue());}else{B+="&er_application="+appConstants.erUtils.specialCharEncode(appConstants.er_application);
}}else{B+="&er_tapplication="+encodeURIComponent(m.getValue());}var D=Ext.getCmp("er_option").getValue();B+="&er_option="+D;appConstants.queryStringActivity=B+G+E+n;if(appConstants.isFromDrillDown!=null&&appConstants.isFromDrillDown!="null"&&appConstants.isFromDrillDown!=undefined&&appConstants.isFromDrillDown!="undefined"&&appConstants.isFromDrillDown){appConstants.queryStringActivity+="&select_testmes="+appConstants.select_testmes+"&isFromDrillDown=true&user_name="+appConstants.erUtils.specialCharEncode(Ext.getCmp("er_application").getValue())+"&er_test="+appConstants.us_er_test;
}},updateQStringUsage:function(D){var C;var G="";var H;var b;var m=new Array();var B=Ext.getCmp("mainform").getForm();var o=null;if(!isSettingsEnabled){this.showConfigDropdown();}if(isSettingsEnabled){o=this.getThinclientusersettings().getForm();}var n=B.findField("er_application");var r=B.findField("er_application_text_box");
C="select_farm="+encodeURIComponent(B.findField("select_farm").getValue())+"&er_compType="+B.findField("er_compType").getValue()+"&er_excwe="+this.getSettingsFieldValue(o,"er_excwe",isSettingsEnabled,"excludeWeek")+"&er_reportgenration="+this.getSettingsFieldValue(o,"reportGeneration",isSettingsEnabled,"reportGeneration");
var i=B.findField("showFrom");if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}if(i.isVisible()||appConstants.menuForVM=="true"){C+="&showFrom="+i.getValue();}if(n.isVisible()){C+="&er_user="+appConstants.erUtils.specialCharEncode(Ext.getCmp("er_application").getValue());
}else{if(r.isVisible()){C+="&er_tuser="+encodeURIComponent(Ext.getCmp("er_application_text_box").getValue());}else{if(appConstants.userState!=undefined&&appConstants.userState=="textbox"){C+="&er_tuser="+encodeURIComponent("*");}else{if(appConstants.userState!=undefined&&appConstants.userState=="dropdown"){C+="&er_user="+encodeURIComponent("-- All --");
}}}}if(Ext.getCmp("er_wrkrGrp").getValue()!="notapplicable"){C+="&er_workgrpname="+Ext.getCmp("er_wrkrGrp").getValue();}if(Ext.getCmp("er_poolType_container").isVisible()){var f=Ext.getCmp("er_poolType").getValue();if(f!=undefined){for(var A=0;f.length>A;A++){C+="&er_poolType="+f[A];}}}var y=Ext.getCmp("er_server").getValue();
if(y!=null&&y!="undefined"&&y.length>0){for(var A=0;y.length>A;A++){C+="&er_componentserver="+y[A];}}if(y!=null&&y!="undefined"&&y.length>0){for(var A=0;y.length>A;A++){C+="&select_server1="+y[A];}}if(appConstants.isAdDiscoverEnabled){C+="&er_organize="+B.findField("er_organize").getValue();}var j=this.getSettingsFieldValue(o,"timefrom",isSettingsEnabled,"selectedTimeFrom");
var z=this.getSettingsFieldValue(o,"minfrom",isSettingsEnabled,"selectedMinsFrom");var t=this.getSettingsFieldValue(o,"timeto",isSettingsEnabled,"selectedTimeTo");var s=this.getSettingsFieldValue(o,"minto",isSettingsEnabled,"selectedMinsTo");var H="";if(!D){H="&er_timeline="+B.findField("er_timeline").getValue()+"&startdate="+B.findField("er_stdate").dataArray+"&enddate="+B.findField("er_enddate").dataArray+"&starthr="+B.findField("er_sthr").dataArray+"&endhr="+B.findField("er_endhr").dataArray+"&startmin="+mgr_stmin+"&endmin="+mgr_enmin;
}var p="&timefrom="+j+"&minfrom="+z+"&timeto="+t+"&minto="+s;if(appConstants.publicjsonDataUsage.hasOwnProperty("hiddenfields")){var q=appConstants.publicjsonDataUsage.hiddenfields;for(var l in q){if(l!=null&&l=="clientIp"&&(Ext.getCmp("clientIpRadio").getValue.clientIp!=null||Ext.getCmp("clientIpRadio").getValue.clientIp!="undefined")&&!Ext.getCmp("clientIpRadio").isHidden()){continue;
}else{G+="&"+l+"="+q[l];}}}var x=Ext.getCmp("er_adGroup");var v=Ext.getCmp("adgrouppane");var g="";if(v!=undefined&&!v.isHidden()){if(x!=undefined){var c=x.getValue();for(var I in c){C+="&er_adGroup="+encodeURIComponent(c[I]);g+=c[I];}}}if(g.length>0){if(g.length>20){g=g.substring(0,19)+"...";}C+="&adGroupForPrint="+encodeURIComponent(g);
}var F=Ext.getCmp("er_aduser");var a=Ext.getCmp("aduserinfopane");if(a!=undefined&&!a.isHidden()){if(F!=undefined){var c=F.getValue();for(var I in c){C+="&er_aduser="+encodeURIComponent(c[I]);}}}var u=Ext.getCmp("adGroupFns");if(!Ext.isEmpty(u)){if(u!=undefined&&!u.isHidden()){C+="&adGroupFns="+u.getValue().adGroupByValue;
}}if(n.isVisible()){var e=Ext.getCmp("er_organize").getValue();if(e=="AD"){Ext.getCmp("aggregateValue").hide();}else{var w=Ext.getCmp("aggregateValue").getValue();if(!Ext.isEmpty(w)){C+="&er_aggregateValue="+w.groupByValue;}}}else{var w=Ext.getCmp("aggregateValue").getValue();if(!Ext.isEmpty(w)){C+="&er_aggregateValue="+w.groupByValue;
}}var E=Ext.getCmp("er_option").getValue();C+="&er_option="+E;if(isSettingsEnabled){var h=Ext.getCmp("clientIpRadio");if(!h.isHidden()&&(h!=null||h!="undefined"||h!="undefined")){C+="&clientIp="+h.getValue().clientIp;}}var d=this.getSettingsFieldValue(o,"ShowResourceDetails",isSettingsEnabled,"ShowResourceDetails");
C+="&er_showResourceUsage="+d;if(wildcardSearch&&!isVm){var h=Ext.getCmp("clientIpRadio");if(!h.isHidden()&&h.getValue().clientIp=="Yes"){C+="&client_Version="+Ext.getCmp("wildcardSearch").getValue();}}appConstants.queryStringUsage=C+H+G+p;},afterMainRender:function(){var a=this;if(targetType=="User Session Report"){if(appConstants.er_RmDispName!=null&&appConstants.er_RmDispName!="null"&&appConstants.er_RmDispName!="undefined"){this.getMain().setTitle(appConstants.er_RmDispName);
}else{this.getMain().setTitle(appConstants.publicjsonDataUsage.reportTitle);}this.fillFormFieldsForUsage(appConstants.publicjsonDataUsage);if(!hideBackButton){Ext.getCmp("thinclientuserform").add({xtype:"hidden",id:"ID",name:"ID",value:appConstants.publicjsonDataUsage["ID"]});}}else{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 g=Ext.getCmp("report_category").getValue();
if(g=="user_usage"){var a=appConstants.publicjsonDataUsage.hiddenfields;var j=a["favorite_id"];if(!Ext.isEmpty(j)){Ext.getCmp("reportGeneration").setDisabled(true);}}else{var a=appConstants.publicjsonDataActivity.hiddenfields;var j=a["favorite_id"];if(!Ext.isEmpty(j)){Ext.getCmp("reportGeneration").setDisabled(true);
}}Ext.getCmp("moreOptionCloseId").show();var i=this;if(targetType=="User Session Report"){this.fillSettingFieldsForUsage(appConstants.publicjsonDataUsage);Ext.getCmp("ShowResourceDetails").show();var c=Ext.getCmp("clientIpRadio");if(appConstants.publicjsonDataUsage!=null&&appConstants.publicjsonDataUsage!=undefined&&appConstants.publicjsonDataUsage!="undefined"){if(appConstants.publicjsonDataUsage.hasOwnProperty("clientDetailsCompType")){if(c!=undefined){c.show();
}}else{if(c!=undefined){c.hide();}}}else{if(c!=undefined){c.hide();}}if(appConstants.publicjsonDataUsage!=null&&appConstants.publicjsonDataUsage!=undefined&&appConstants.publicjsonDataUsage!="undefined"){if(appConstants.publicjsonDataUsage.hasOwnProperty("er_showResourceUsage")){var l=appConstants.publicjsonDataUsage.er_showResourceUsage;
var f=Ext.getCmp("ShowResourceDetails");if(f!=undefined){if(l!=undefined){if(l=="Yes"){Ext.getCmp("ShowResourceDetails").setValue("Yes");}else{if(l=="No"){Ext.getCmp("ShowResourceDetails").setValue("No");}}}}}}var b=Ext.getCmp("er_organize");if(b!=undefined){b=b.getValue();if(b==null||b=="User"){var e=Ext.getCmp("adgrouppane");
if(e!=undefined){e.hide();}var d=Ext.getCmp("aduserinfopane");if(d!=undefined){d.hide();}var m=Ext.getCmp("adGroupFns");if(m!=undefined){Ext.getCmp("adGroupFnsSpl").hide();m.hide();}var k=Ext.getCmp("aggregateValue").getValue();if(!Ext.isEmpty(k)){if(k.groupByValue=="Details"){if(c!=undefined){c.show();
}}else{if(c!=undefined){c.hide();}}}}else{var e=Ext.getCmp("adgrouppane");if(e!=undefined){e.show();}var d=Ext.getCmp("aduserinfopane");if(d!=undefined){d.show();}var m=Ext.getCmp("adGroupFns");if(m!=undefined){Ext.getCmp("adGroupFnsSpl").show();m.show();}var h=m.getValue().adGroupByValue;if(h!=undefined&&h=="Details"){if(c!=undefined){c.show();
}}else{if(c!=undefined){c.hide();}}}}}else{this.fillSettingFieldsForActivity(appConstants.publicjsonDataActivity);Ext.getCmp("ShowResourceDetails").hide();var e=Ext.getCmp("adgrouppane");if(e!=undefined){e.hide();}var d=Ext.getCmp("aduserinfopane");if(d!=undefined){d.hide();}var m=Ext.getCmp("adGroupFns");
if(m!=undefined){m.hide();}}Ext.EventManager.onWindowResize(function(){Ext.get("configMod").setStyle("left","");});Ext.get("closeSettings").on("click",function(){i.validateAndCloseSettings();});if(appConstants.fromOverviewReport=="true"&&targetType=="User Session Report"){if(Ext.getCmp("ShowResourceDetails")!=undefined){Ext.getCmp("ShowResourceDetails").hide();
}if(Ext.getCmp("clientIpRadio")!=undefined){Ext.getCmp("clientIpRadio").hide();}}},validateAndCloseSettings:function(){var a=this.validateSettings();if(a){Ext.get("configMod").animate({duration:500,to:{y:-500}});return true;}return false;},closeSettingAndSubmit:function(){if(this.validateAndCloseSettings()){this.showResult();
}},refreshReportData:function(){if(appConstants.isFromDrillDown!=null&&appConstants.isFromDrillDown!="null"&&appConstants.isFromDrillDown!=undefined&&appConstants.isFromDrillDown!="undefined"&&appConstants.isFromDrillDown){this.loadDrillDown();return;}var e;if(targetType=="User Session Report"){e=appConstants.publicjsonDataUsage;
var a=Ext.getCmp("mainform").getForm();var b=a.findField("select_farm").getValue();if(e.hasOwnProperty("er_showResourceUsage")){var c=e.er_showResourceUsage;var g=Ext.getCmp("ShowResourceDetails");if(g!=undefined){if(c!=undefined){if(c=="Yes"){Ext.getCmp("ShowResourceDetails").setValue("Yes");}else{if(c=="No"){Ext.getCmp("ShowResourceDetails").setValue("No");
}}}}}if(b=="-1"){comboRawData=e.zoneCombo;selectedComboOption=e.selectedZone;comboObject=a.findField("select_farm");comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{var f;if(comboRawData.length>1){f=comboRawData[1];
}else{f=comboRawData[0];}comboObject.setValue(f.valueField);}}}else{e=appConstants.publicjsonDataActivity;}if(appConstants.isSubmit!=null&&appConstants.isSubmit=="true"){target="/final/reporter/ErSessionAppView.jsp?index=0&fromOverviewReportDrilldown=true&er_Duration="+appConstants.er_durationValue;if(appConstants.fromOverviewReport=="true"&&targetType=="User Session Report"){if(Ext.getCmp("mainform")!=undefined){Ext.getCmp("mainform").hide();
}if(Ext.getCmp("ShowResourceDetails")!=undefined){Ext.getCmp("ShowResourceDetails").hide();}if(Ext.getCmp("clientIpRadio")!=undefined){Ext.getCmp("clientIpRadio").hide();}Ext.getCmp("bookletTool").setDisabled(false);Ext.getCmp("saveTool").setDisabled(false);Ext.getCmp("printTool").setDisabled(false);
Ext.getCmp("mailTool").setDisabled(false);Ext.getCmp("csvTool").setDisabled(true);Ext.getCmp("favoriteTool").setDisabled(true);Ext.getCmp("scheduleTool").setDisabled(true);this.updateQStringUsage(false);var d=Ext.getCmp("resultPanel");if(d!=undefined){d.removeAll();d.show();d.add({xtype:"container",id:"dsfsdf",height:Ext.getBody().getViewSize().height-70,columnWidth:1,layout:"column",items:[{xtype:"component",autoEl:{tag:"iframe",frameborder:"0",height:Ext.getBody().getViewSize().height-90,width:"100%",src:target},listeners:{load:{fn:function(){this.parent().unmask();
}}}},{xtype:"button",text:'<span style="color:#30a1da;"><u>Show All Server Details</u></span>',height:20,margin:"5 20 10 0",style:{"float":"right",color:"blue",background:"none",border:"none",},listeners:{"click":function(){var h="/final/reporter/ErThinClientUserReport.jsp?fro=true&enableBack=true&isSubmit=true";
var i=Ext.getCmp("er_application");if(i.isVisible()){h+="&er_user="+encodeURIComponent("-- All --");}else{h+="&er_tuser="+encodeURIComponent("*");}h+="&"+appConstants.queryStringUsage;window.location.href=h;}}}]});}}else{initLdgMask.show();this.loadReportData(e);}}else{if(appConstants.isForceSubmit=="true"){this.showResult();
}}},fillFormFieldsForActivity:function(f){var g;var m;var t;var b="false";if(f.hasOwnProperty("isSubmit")){var b=f.isSubmit;}var w=Ext.getCmp("mainform").getForm();var c=f.screenLabels;var A=f.timelineCombo;var i=f.selectedTimeline;var u=w.findField("er_timeline");u.setFieldLabel(c["reporter.common.Timeline"]);
u.getStore().loadRawData(A);if(!Ext.isEmpty(A)){if(!Ext.isEmpty(i)){u.setValue(i);}else{u.setValue(A[0].valueField);}}var q=f.startHour;var n=f.endHour;var d=f.startDate;var a=f.endDate;var j=w.findField("er_stdate");j.setValue(f.startDateForDisplay);j.dataArray=d;var y=w.findField("er_sthr");y.setValue(f.startHourForDisplay);
y.dataArray=q;var p=w.findField("er_enddate");p.setValue(f.endDateForDisplay);p.dataArray=a;var x=w.findField("er_endhr");x.setValue(f.endHourForDisplay);x.dataArray=n;stmin=f.startMinForDisplay;enmin=f.endMinForDisplay;mgr_stmin=f.startmin;mgr_enmin=f.endmin;g=f.analysisByCombo;if(!Ext.isEmpty(g)){m=f.selectedAnalysisByCombo;
t=w.findField("er_option");t.getStore().loadRawData(g);if(!Ext.isEmpty(m)){t.setValue(m);}else{t.setValue(g[0].valueField);}}g=f.zoneCombo;m=f.selectedZone;t=w.findField("select_farm");t.setFieldLabel(c["reporter.consolidated.Zone"]);t.getStore().loadRawData(g);if(!Ext.isEmpty(m)){t.setValue(m);}else{t.setValue(g[0].valueField);
}g=f.compTypeCombo;m=f.selectedCompType;t=w.findField("er_compType");t.setFieldLabel(c["reporter.thin.Component Type"]);t.getStore().clearFilter(true);t.getStore().loadRawData(g);if(!Ext.isEmpty(m)){t.setValue(m);}else{t.setValue(g[0].valueField);}var l=f.showFromCombo;var s=f.selectedShowFromCombo;var z=w.findField("showFrom");
z.getStore().loadRawData(l);if(!Ext.isEmpty(l)){if(!Ext.isEmpty(s)){z.setValue(s);}else{z.setValue(l[0].valueField);}}if(f.isVm){isVm=true;var h=Ext.getCmp("ShowResourceDetails");if((h!=undefined&&h=="No")||appConstants.publicjsonDataUsage.er_showResourceUsage=="No"||appConstants.menuForVM=="true"){Ext.getCmp("showFrom").hide();
}else{Ext.getCmp("showFrom").show();}}else{isVm=false;Ext.getCmp("showFrom").hide();}g=f.reportForCombo;m=f.reportFor;t=w.findField("report_category");t.setFieldLabel(c["reporter.common.Report For"]);t.getStore().loadRawData(g);if(!Ext.isEmpty(m)){t.setValue(m);}else{t.setValue(g[0].valueField);}g=f.reportTypeCombo;
m=f.selectedreportType;t=w.findField("er_type");t.setFieldLabel(c["reporter.thin.Report Type"]);t.getStore().loadRawData(g);if(!Ext.isEmpty(m)){t.setValue(m);}else{t.setValue(g[0].valueField);}if(m=="No"){var r=f.sortbycombo;if(!Ext.isEmpty(r)){var o=f.selectedSortbyCombo;t=w.findField("er_sortby");t.getStore().loadRawData(r);
if(!Ext.isEmpty(o)){t.setValue(o);}else{t.setValue(r[0].valueField);}t.show();}w.findField("select_testmes").hide();w.findField("er_mode").hide();g=f.serverCombo;m=f.selectedServer;t=Ext.getCmp("er_server");appConstants.rawDataForComponents=g;t.setFieldLabel(c["reporter.common.Server"]);t.getStore().loadRawData(g);
if(!Ext.isEmpty(m)){t.setValue(m);}else{t.setValue(g[0].valueField);}t.show();if(!isSettingsEnabled){this.showConfigDropdown();}var k=this.getThinclientusersettings().getForm();if(m!=null&&m!=undefined&&m.length>1){g=f.aggAcrossServer;m=f.selectedAggServer;t=k.findField("er_perserver");if(t!=undefined){t.setFieldLabel(f.screenLabels["reporter.thin.Aggregate across servers on"]);
t.getStore().loadRawData(g);if(!Ext.isEmpty(m)){t.setValue(m);}else{t.setValue(g[0].valueField);}t.show();}}else{t=k.findField("er_perserver");if(t!=undefined){t.hide();}}g=f.userCombo;m=f.selectedUser;t=w.findField("er_application");if(g!=null&&g!=undefined&&g!="undefined"){Ext.getCmp("er_application_text_box").hide();
t.setFieldLabel(c["reporter.thin.User"]);t.getStore().clearFilter(true);t.getStore().loadRawData(g);if(!Ext.isEmpty(m)){t.setValue(m);}else{var v=g[0].valueField;if(g.length>1){v=g[1].valueField;}t.setValue(v);}t.show();}else{Ext.getCmp("er_application").hide();var e=w.findField("er_application_text_box");
e.show();}g=f.priorityCombo;m=f.selectedPriority;t=w.findField("er_priority");t.setFieldLabel(c["reporter.comparison.Show Top"]);t.getStore().loadRawData(g);if(!Ext.isEmpty(m)){t.setValue(m);}else{t.setValue(g[2].valueField);}t.show();}else{g=f.graphTypeArray;m=f.selectedGraphType;t=w.findField("er_graphType");
t.setFieldLabel(c["reporter.thin.Graph Type"]);t.getStore().loadRawData(g);if(!Ext.isEmpty(m)){t.setValue(m);}else{t.setValue(g[0].valueField);}t.show();if(m=="distribution"){g=f.measureCombo;m=f.selectedMeasure;t=w.findField("select_testmes");t.setFieldLabel(c["reporter.thin.Criteria"]);t.getStore().clearFilter(true);
t.getStore().loadRawData(g);if(!Ext.isEmpty(m)){t.setValue(m);}else{var v=g[0].valueField;if(g.length>1){v=g[1].valueField;}t.setValue(v);}t.show();}else{w.findField("select_testmes").hide();g=f.userCombo;m=f.selectedUser;t=w.findField("er_application");if(g!=null&&g!=undefined&&g!="undefined"){Ext.getCmp("er_application_text_box").hide();
t.setFieldLabel(c["reporter.thin.User"]);t.getStore().clearFilter(true);t.getStore().loadRawData(g);if(!Ext.isEmpty(m)){t.setValue(m);}else{var v=g[0].valueField;if(g.length>1){v=g[1].valueField;}t.setValue(v);}t.show();}else{Ext.getCmp("er_application").hide();var e=w.findField("er_application_text_box");
e.show();}}Ext.getCmp("serverMultiSelectLbl").hide();}updatingAppSettings();if(Ext.getCmp("er_option").getValue()=="Component"){Ext.getCmp("select_farm").hide();}else{Ext.getCmp("select_farm").show();}if(Ext.getCmp("showLegend")!=undefined){if(appConstants.isshowLegend=="true"||appConstants.isshowLegend==true){Ext.getCmp("showLegend").setValue(true);
}}},fillSettingFieldsForActivity:function(j){var e;var f;var m;var h="false";var a=this.getThinclientusersettings().getForm();var g=Ext.getCmp("report_category").getValue();if(g=="user_activity"||g=="user_Channel"){var k=Ext.getCmp("er_type").getValue();var d=j.enableDesktop;var c=j.dsktp_searchTxt;if(d=="true"){Ext.getCmp("dsktp_searchTxt").show();
Ext.getCmp("dsktp_searchSpl").show();if(!Ext.isEmpty(c)){Ext.getCmp("dsktp_searchTxt").setValue(c);}}}var i=j.screenLabels;e=j.excludeWeekCombo;f=j.excludeWeek;m=a.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);}e=j.weightedAvgCombo;f=j.weightedAvg;m=a.findField("sh_timeinuse");m.setFieldLabel(i["reporter.comparison.Weighted Average"]);m.getStore().loadRawData(e);if(!Ext.isEmpty(f)){m.setValue(f);}else{m.setValue(e[0].valueField);}Ext.getCmp("timeperiodLbl").setText(i["reporter.common.Time period"]);
a.findField("timefrom").setValue(j.selectedTimeFrom);a.findField("minfrom").setValue(j.selectedMinsFrom);a.findField("timeto").setValue(j.selectedTimeTo);a.findField("minto").setValue(j.selectedMinsTo);var n=j.reportGenerationCombo;var l=j.reportGeneration;var b=a.findField("reportGeneration");b.setFieldLabel(i["reporter.common.Report Generation"]);
b.getStore().loadRawData(n);b.setValue(l);},showConfigDropdown:function(){isSettingsEnabled=true;var a=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:565,id:"configMod",ui:"settingsWindowContainer",items:[{xtype:"container",cls:"configMode_popupArrow",style:{"top":"-14px","left":"355px"}},{xtype:"container",html:a.apply(),cls:"containerHeader",style:{"top":"0px","margin":"0px"}},{xtype:"thinclientusersettings",parent:this}],renderTo:"thinclientuser"});
},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 t=Ext.decode(h);
appConstants.publicjsonDataUsage=t;if(t.hasOwnProperty("drillDownData")){e.removeAll();var m=t["drillDownData"];for(var o in m){var q=m[o];var g=q["columns"];var v=q["data"];if(!Ext.isEmpty(v)){var u='<div class="newTable" style="margin:0px 10px 10px 10px">'+'<table cellspacing="0" cellpadding="0" border="0" width="100%">'+"<thead>"+"<tr>";
var w="left";for(var o in g){if(o==g.length-1){w="center";}u+="<th>"+'<div align="'+w+'">'+g[o]+"</div>"+"</th>";}u+="</tr>"+"</thead>"+"<tbody>"+'<tpl for=".">';for(var p in v){var f=v[p];u+="<tr>";for(var i in f){var s=f[i];var r="left";if(i==g.length-1){r="center";}u+="<td>"+'<div style="text-align:'+r+'">'+f[i]+"</div>"+"</td>";
}u+="</tr>";}u+="</tpl>"+"</tbody>"+"</table>"+"</div>";if(o==1){e.add({xtype:"panel",ui:"newGraphPanel",title:q.tableTitle,margin:"10 10 5 10",layout:{columns:2,align:"center"},tools:[{xtype:"button",text:backText,margin:"0 5 0 0",cls:"backbutton",iconCls:"iconBack",id:"thiClientbckButton",name:"thiClientbckButton",listeners:{"click":function(){b.submitReport();
}}}],html:u});}else{e.add({xtype:"panel",ui:"newGraphPanel",margin:"10 10 10 10",layout:{columns:2,align:"center"},title:q.tableTitle,html:u});}}}}else{this.disableTools();e.show();e.removeAll();e.add({xtype:"container",height:250,cls:"containerShadow",margin:"5 10 10 10",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();}});},getDecimalAlignFormat:function(a){if(!isNaN(a)&&!isNaN(parseFloat(a))){if(a!=null&&a.indexOf(".")>-1){strDecimal=a.substring(a.indexOf("."));str=a.substring(0,a.indexOf("."));a='<span class="decimal-align">'+str+'</span><span class="decimal-align2">'+strDecimal+"</span>";}else{a='<span class="decimal-align">'+a+"</span>";
}}else{if(a!=undefined&&a=="-"){a='<div style="text-align:center;">'+a+"</div>";}}return a;},getSettingsFieldValue:function(a,g,d,e){var b=null;if(targetType=="User Session Report"){b=appConstants.publicjsonDataUsage;}else{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;},loadDrillDown:function(){var a=Ext.getCmp("mainform").getForm();a.findField("er_graphType").setValue("timeline");a.findField("er_compType").setValue(appConstants.us_er_comptype);a.findField("select_farm").setValue(appConstants.us_select_farm);a.findField("showFrom").setValue(appConstants.us_showFrom);
a.findField("er_timeline").setValue(appConstants.us_er_timeline);a.findField("er_compType").setReadOnly(true);a.findField("er_graphType").setReadOnly(true);a.findField("select_farm").setReadOnly(true);a.findField("er_type").setReadOnly(true);var b=appConstants.us_user_name;if(b.includes("|slash|")){b=b.replace("|slash|","\\");
}this.graphTypeOnChangeTemp(a.findField("er_graphType"),b);this.showResult();},graphTypeOnChangeTemp:function(c,b){var d=c.getValue();Ext.getCmp("er_application_text_box").hide();if(d=="timeline"){Ext.getCmp("showLegend").show();}else{Ext.getCmp("showLegend").show();}Ext.getCmp("resultPanel").hide();
this.updateQStringActivity();var a;if(targetType=="User Activity Report"){a="/final/reporter/ErCtxUserActivityReportJson.jsp";}else{a="/final/reporter/ErCtxChannelReportJson.jsp";}Ext.Ajax.request({url:a,params:appConstants.queryStringActivity,scope:this,method:"POST",async:false,success:function(g){var i=g.responseText;
var h=Ext.decode(i);var j=h.screenLabels;if(!isSettingsEnabled){this.showConfigDropdown();}var f=Ext.getCmp("mainform").getForm();var e=this.getThinclientusersettings().getForm();if(d=="timeline"){Ext.getCmp("select_testmes").hide();appConstants.publicjsonDataActivity=h;comboRawData=h.aggbasedOn;selectedComboOption=h.selectedAgg;
comboObject=e.findField("er_perserver");comboObject.setFieldLabel(j["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=h.userCombo;comboObject=f.findField("er_application");comboObject.setFieldLabel(j["reporter.thin.User"]);comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);comboObject.setValue(b);comboObject.show();}}});},loadDrillDownBack:function(){appConstants.isFromDrillDown=false;
drillDownBackButton=true;Ext.getCmp("select_testmes").show();Ext.getCmp("er_application").hide();Ext.getCmp("bckButtonForDrillDown").hide();Ext.getCmp("showLegend").hide();var a=Ext.getCmp("mainform").getForm();a.findField("er_graphType").setValue("distribution");a.findField("er_compType").setReadOnly(false);
a.findField("er_graphType").setReadOnly(false);a.findField("select_farm").setReadOnly(false);a.findField("er_type").setReadOnly(false);Ext.Ajax.request({url:"/final/servlet/com.eg.ErCtxServerReportC?isFromDrillDownBack=true",scope:this,method:"POST",success:function(b){var d=b.responseText;var c=Ext.decode(d);
initLdgMask.show();this.loadReportData(c);}});},multiSelectAllvalidation:function(d,e){var a=true;var c=false;if(d!=null&&d!="undefined"&&d.length>0){for(var b=0;d.length>b;b++){if(d[b]==e){c=true;}}}if(c&&d.length>1){a=false;}return a;}});