Ext.define("ReportBuilder.controller.ReportBuilderController",{extend:"ReportBuilder.controller.BuilderController",refs:[{selector:"main",ref:"main"},{selector:"buildersettings",ref:"buildersettings"},{selector:"templateformalias",ref:"templateformalias"},{selector:"templateformitemsalias",ref:"templateformitemsalias"},{selector:"newUtilities",ref:"newUtilities"},{selector:"gridster",ref:"gridster"},{selector:"#widgetLayoutPane",ref:"widgetLayoutPane"},{selector:"timeline",ref:"timeline"},{selector:"ReporterSettings",ref:"ReporterSettings"}],method:appConstants.method,reqFromCompChange:"no",init:function(){this.control({"templateformalias":{"render":this.invokeSettings,"afterrender":this.onAjaxSuccess},"templateformalias combo[id=er_option]":{"select":this.ajaxQueryMaker},"templateformalias combo[id=er_site]":{"select":this.ajaxQueryMaker},"templateformalias combo[id=er_compType]":{"select":this.ajaxQueryMaker},"egcomponent multiselectfield[id=er_component]":{"change":this.ajaxQueryMaker},"egcomponenttype multiselectfield[id=er_mutiSelComp]":{"change":this.ajaxQueryMaker},"templateformalias combo[id=er_test]":{"select":this.ajaxQueryMaker},"templateformalias combo[id=er_measure]":{"select":this.ajaxQueryMaker},"templateformalias combo[id=er_subZone]":{"select":this.ajaxQueryMaker},"templateformalias multiselectfield[id=er_measure]":{},"templateformalias multiselectfield[id=er_groupBy]":{"select":this.ajaxQueryMaker},"templateformalias button[id=submit]":{"click":this.beforeSubmit},"templateformalias button[id=saveReport]":{"click":this.goTo},"newUtilities > #printTool > button":{"click":this.printReport},"newUtilities > #saveTool > button":{"click":this.saveFile},"newUtilities > #csvTool > button":{"click":this.getCsv},"newUtilities > #favoriteTool > button":{"click":this.saveFavorite},"newUtilities > #scheduleTool > button":{"click":this.saveSchedule},"newUtilities > #mailTool > button":{"click":this.sendMail},"timeline combo[id=er_timeline]":{"select":this.ajaxQueryMaker},"timeline datepicker[id=er_stdate]":{"select":this.ajaxQueryMaker},"timeline combo[id=er_sthr]":{"select":this.ajaxQueryMaker},"timeline datepicker[id=er_enddate]":{"select":this.ajaxQueryMaker},"timeline combo[id=er_endhr]":{"select":this.ajaxQueryMaker},'buildersettings combo[name="reportGeneration"]':{"select":this.reportGenChange},'buildersettings button[id="moreOptionCloseId"]':{"click":this.validateAndCloseSettings},'buildersettings button[id="submitViaSetting"]':{"click":this.closeSettingAndSubmit},'templateformitemsalias button[id="panelinsidetoggle"]':{"click":this.toggleForm},'egcomponent button[id="expandSelectorComponent"]':{"click":this.expandMe},'eginfo button[id="expandSelectorInfo"]':{"click":this.expandMe},'egcomponent trigger[id="compSearch"]':{"change":this.filterMultiselect},'egcomponenttype trigger[id="compTypeSearch"]':{"change":this.filterMultiselect},'egcomponenttype button[id="expandSelectorCompType"]':{"click":this.expandMe},'eginfo trigger[id="infoSearch"]':{"change":this.filterMultiselect},});
},filterMultiselect:function(c){var d=null,b=null;var a=c.getId();if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}if(a=="compSearch"){appConstants.erUtils.filterComboStore(c,Ext.getCmp("er_component"),appConstants.compRawData);}else{if(a=="infoSearch"){appConstants.erUtils.filterComboStore(c,Ext.getCmp("er_info"),appConstants.infoRawData);
}else{if(a=="compTypeSearch"){appConstants.erUtils.filterComboStore(c,Ext.getCmp("er_mutiSelComp"),appConstants.compTypeRawData);}}}},saveFile:function(){if(customPaging||appConstants.blockPdfRelatedOptions=="yes"){this.exportDataAlert();return"";}var a=this.getQueryString(false);var b=appConstants.tempName;
a="/final/reporter/ErHtmlToSavePdf.jsp?"+a+"&savereport=save&isSubmit=true&drilldownReport=no&titleDisp="+b;if(b!=undefined&&b!=null){if(b=="Site+Traffic+Analysis"||b=="Site Traffic Analysis"){a+="&pageWidthProces=1100";}else{if(b=="Site Usage Summary"||b=="SharePoint Online Health"){a+="&pageWidthProces=1400";
}}}if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}appConstants.erUtils.savePDF(a);},bookletQuery:function(b){if(customPaging||appConstants.blockPdfRelatedOptions=="yes"){this.exportDataAlert();return"";}var a=this.getQueryString(false);a+="&savereport=save&titleDisp="+appConstants.tempName;
return a;},bookletScheduleQuery:function(b){if(customPaging||appConstants.blockPdfRelatedOptions=="yes"){this.exportDataAlert();return"";}var a=this.getQueryString(true)+"&pdfprint=yes&recordInfo="+appConstants.recordInfo+"&titleDisp="+appConstants.tempName;return a;},bookletPreview:function(){this.printReport();
},getCsv:function(){if(customPaging||appConstants.blockPdfRelatedOptions=="yes"){this.exportDataAlert();return;}var a="widget";var b="/final/reporter/ErPrintReportBuilder.jsp";var c=this.getQueryString(false)+"&graphIndex=0&widgetIdInfo="+a+"&option=mainCsv&titleDisp="+appConstants.tempName;Ext.Ajax.request({url:b,params:c,success:function(d){window.location="../servlet/egurkha.reporter.SaveInCSVFormat";
}});},expandMe:function(c){var b="";var a="";var d=c.getItemId();if(d=="expandSelectorComponent"){b="er_component";a="compmultipane";}else{if(d=="expandSelectorInfo"){b="er_info";a="infomultipane";}else{if(d=="expandSelectorCompType"){b="er_mutiSelComp";a="compTypeMultiPane";}}}if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");
}appConstants.erUtils.expandMultiComboButton(Ext.getCmp(b),Ext.getCmp(a).fieldLabel,c);},toggleForm:function(c){if(c==undefined||!c.getId()=="iconReportSelectionHide"){var a=Ext.getCmp("iconReportSelectionHide");a.removeCls("x-btn-pressed");a.addCls("iconReportSelectionHide");a.pressed==true;a.tip.update("Show");
}Ext.getCmp("panelinsidetoggle").show();var b=Ext.getCmp("templateFormItms");if(b.isHidden()){b.show();if(appConstants.tempDesc==""){Ext.getCmp("selectionDetails").hide();}else{Ext.getCmp("templateDesc").hide();}}else{b.hide();if(appConstants.tempDesc==""){Ext.getCmp("upbutton").show();Ext.getCmp("templateDesc").hide();
Ext.getCmp("selectionDetails").show();}else{document.getElementById("tempDescContent").innerHTML=appConstants.tempDesc;Ext.getCmp("templateDesc").show();}}},reportGenChange:function(){Ext.getCmp("resultcontainer").hide();this.enableDisableTools(true);var a=Ext.getCmp("reportGeneration").getValue();if(a=="background"||a=="background-csv"){Ext.getCmp("bgReportName").setValue("");
Ext.getCmp("bgReportName").show();Ext.getCmp("submitViaSetting").show();Ext.getCmp("moreOptionCloseId").hide();}else{Ext.getCmp("bgReportName").hide();Ext.getCmp("submitViaSetting").hide();Ext.getCmp("moreOptionCloseId").show();}},sendMail:function(){if(customPaging||appConstants.blockPdfRelatedOptions=="yes"){this.exportDataAlert();
return;}var a=Ext.widget("sendmail");a.show();},goTo:function(a){if(customPaging||appConstants.blockPdfRelatedOptions=="yes"){this.exportDataAlert();return;}appConstants.formButtonId=a.getId();var b=appConstants.fromScheduleModify;if((b!=null&&b=="Yes")){this.saveSchedule();}else{this.saveFavorite();
}},saveSchedule:function(c){if(appConstants.blockPdfRelatedOptions=="yes"){this.exportDataAlert();return;}appConstants.totalRec=0;appConstants.currentPage=1;var b=this.getQueryString(true);b="/final/reporter/ErSaveSchedule.jsp?"+b+"&pdfprint=yes&recordInfo="+appConstants.recordInfo+"&titleDisp="+appConstants.tempName+"&com.eg.CSRF_NONCE="+csrfToken;
var a="";if(appConstants.formButtonId=="saveReport"){b+="&showSchWindow=no";var e=b.substr(0,b.indexOf("?"));var f=b.substr(b.indexOf("?")+1,b.length-1);var d=Ext.create("Ext.form.Panel");d.submit({url:e,params:f,standardSubmit:true,method:"POST"});}else{parent.scheduleWindowFn(b);}},saveFavorite:function(c){if(customPaging||appConstants.blockPdfRelatedOptions=="yes"){this.exportDataAlert();
return"";}var b=this.getQueryString(true);b="/final/reporter/ErSaveFavorite.jsp?"+b+"&pdfPrint=yes&pdfprint=yes&recordInfo="+appConstants.recordInfo+"&deleteTemplate=no&com.eg.CSRF_NONCE="+csrfToken;var f="/final/servlet/com.eg.ErFavoriteC?"+b+"&pdfPrint=yes&pdfprint=yes&recordInfo="+appConstants.recordInfo+"&deleteTemplate=no";
var a=appConstants.FavoriteId;if(appConstants.formButtonId=="saveReport"){f+="&showWindow=no"+"&FavoriteId="+a;var e=f.substr(0,f.indexOf("?"));var g=f.substr(f.indexOf("?")+1,f.length-1);var d=Ext.create("Ext.form.Panel");d.submit({url:e,params:g,standardSubmit:true,method:"POST"});}else{parent.favouriteWindowFn(b);
}},printReport:function(){if(customPaging||appConstants.blockPdfRelatedOptions=="yes"){this.exportDataAlert();return"";}var a=this.getQueryString(false);if(appConstants.isCustomLayout=="yes"){a="/final/reporter/ErPrintCustomReportBuilder.jsp?"+a+"&pdfPrint=yes&pdfprint=yes&titleDisp="+appConstants.tempName;
}else{a="/final/reporter/ErPrintReportBuilder.jsp?"+a+"&pdfPrint=yes&pdfprint=yes&titleDisp="+appConstants.tempName;}parent.printWindowFn(a);},beforeSubmit:function(e,a){var c=this;var d=Ext.getCmp("reportGeneration").getValue();appConstants.blockPdfRelatedOptions="no";if(!keepResult){appConstants.totalRec=0;
appConstants.currentPage=1;}Ext.getCmp("backgroundresults").hide();if(a){a=c.validateReportForm();}else{a=true;}if(a){var b="/final/reporter/ReportBuilderController.jsp";var f;f="method=clearSessionData";f+="&isCustomLayout="+appConstants.isCustomLayout+"&reportGenType="+d;f+="&er_compType="+Ext.getCmp(appConstants.erCompType).getValue();
f+="&templateName="+appConstants.templateName;f+="&fromReportBuilder="+appConstants.fromReportBuilder;Ext.Ajax.request({url:b,params:f,success:function(l){if(l.responseText.length>0){appConstants.perLoaderJson=Ext.decode(l.responseText);}var o=Ext.getCmp("resultcontainer");if(!Ext.isEmpty(c.getWidgetLayoutPane())){c.getWidgetLayoutPane().removeAllWidget();
}o.removeAll();o.show();if(appConstants.isCustomLayout=="yes"){widgetCount=1;var n=Ext.getCmp("er_searchGroupBy");var g=Ext.getCmp("er_searchGroupBy2");if(wildcardSearch&&((wildcardSearchCondition&&n!=undefined&&n.getValue()!="none")||(wildcardSearchCondition2&&g!=undefined&&g.getValue()!="none"))){Ext.getCmp("reportGeneration").setValue("background");
var p=new Date();var h=p.getTime();var k=appConstants.tempName;k=k.replace("/"," ");Ext.getCmp("bgReportName").show();Ext.getCmp("bgReportName").setValue(k+"_"+h);Ext.MessageBox.show({title:"Alert",msg:"This Report Generated By Background Report.You Can Change The Background Report Name Below.",width:400,buttons:Ext.MessageBox.OK,icon:"iconInformation",multiline:true,defaultTextHeight:25,fn:function(i,q){if(i=="ok"){Ext.getCmp("bgReportName").setValue(q);
}c.ajaxQueryMaker(e);},value:Ext.getCmp("bgReportName").getValue(),buttonText:{ok:"OK"}});}else{if(d!=null&&(d=="background"||d=="background-csv")){if(appConstants.blockPdfRelatedOptions=="yes"){this.exportDataAlert();return;}c.ajaxQueryMaker(e);}else{if(appConstants.perLoaderJson.preLoadWidgetInfo!=undefined&&appConstants.perLoaderJson.preLoadWidgetInfo!="undefined"){c.ajaxQueryMaker(e);
}else{var m=0.01;Ext.getCmp("pbar").updateProgress(m,Math.round(100*m)+"% completed...");var j=new Ext.util.DelayedTask(function(i){c.ajaxQueryMaker(e);});j.delay(20);}}}}else{c.ajaxQueryMaker(e);}},});}},validateReportForm:function(){var e=Ext.getCmp("er_info").getValue();var i=Ext.getCmp(appConstants.erCompType).getValue();
var f=new Array();if(Ext.getCmp("er_webAppCombo")!=undefined){f=(Ext.getCmp("er_webAppCombo").getValue()).split(",");}if(i.length==0){this.getMessageBox("Alert","Please choose Component Type");return false;}if(i=="-"||i=="-1"){this.getMessageBox("Alert","Please choose valid Component Type");return false;
}if(Ext.Array.contains(i,"All")&&i.length>1&&appConstants.erCompType=="er_mutiSelComp"){this.getMessageBox("Alert","All Components Types and Individual selection cannot be selected simultaneously!");return false;}if(Ext.Array.contains(f,"All")&&f.length>1&&appConstants.isMultiInfo=="infomultipane"){this.getMessageBox("Alert","All Web Application and Individual selection cannot be selected simultaneously!");
return false;}if((appConstants.isMultiInfo=="true"||appConstants.isMultiInfo=="infomultipane")&&e=="-1"){this.getMessageBox("Alert","Not Applicable");return false;}var g=new Array();g=Ext.getCmp("er_component").getValue();if(Ext.Array.contains(g,"All")&&g.length>1){this.getMessageBox("Alert","All Components and Individual selection cannot be selected simultaneously!");
return false;}if(g.length==0){this.getMessageBox("Alert","Please choose Components");return false;}if(g=="-"||g=="-1"){this.getMessageBox("Alert","Please choose valid Components");return false;}var b=Ext.getCmp("reportGeneration").getValue();if(b=="foreground"){var c=appConstants.builderJson.hiddenFields.limitforbg;
var d=appConstants.builderJson.hiddenFields.getMaxDaysInMonth;var h=Ext.getCmp("er_stdate").getValue();var a=Ext.getCmp("er_enddate").getValue();if(!Ext.isEmpty(c)){if(!checkTimeLineForBgLimit(c,d,h,a)){Ext.MessageBox.confirm("Confirm",appConstants.forGrdReportConfirmMsg,this.showConfirmResult,this);
return false;}}}return true;},getQueryString:function(i){var e="method=submit";e+="&er_option="+Ext.getCmp("er_option").getValue();var g=Ext.getCmp("er_site");if(!g.isHidden()){e+="&er_site="+g.getValue();if(Ext.getCmp("er_option").getValue()=="Zone"){e+="&er_site="+Ext.getCmp("er_subZone").getValue();
}}e+="&er_compType="+Ext.getCmp(appConstants.erCompType).getValue();if(appConstants.isSoringColEnable){e+="&er_sortingColumn="+Ext.getCmp("er_sortingColumn").getValue();e+="&er_sortingColumnState="+appConstants.er_sortingColumnState;}if(wildcardSearch){e+="&clientVersionn="+Ext.getCmp("wildcardSearch").getValue();
if(wildcardSearchCondition){e+="&er_searchGroupBy="+Ext.getCmp("er_searchGroupBy").getValue();}if(wildcardSearchCondition2){e+="&wildcardSearch2="+Ext.getCmp("wildcardSearch2").getValue();e+="&er_searchGroupBy2="+Ext.getCmp("er_searchGroupBy2").getValue();}}if(appConstants.gridMultiSortEnable!=undefined&&appConstants.gridMultiSortEnable=="yes"){e+="&er_secondaryColSort="+Ext.getCmp("er_secondaryColSort").getValue();
e+="&er_secondaryColSortState="+appConstants.er_secondaryColSortState;var l=Ext.getCmp("multisort");e+="&multisort="+l.getValue();}if(Ext.getCmp("showLegend")!="undefined"&&Ext.getCmp("showLegend")!=undefined){e+="&showLegendsEnable="+Ext.getCmp("showLegend").getValue();}if(i){if(appConstants.isRemoveAllComponents!=undefined&&appConstants.isRemoveAllComponents=="true"){e+="&er_component="+Ext.getCmp("er_component").getValue();
}else{var h=new Array();h=Ext.getCmp("er_component").getValue();for(var m in h){e+="&er_component="+h[m];}}}if(needHeaderCombo){if(Ext.getCmp("er_headerCombo")!=undefined){var f=Ext.getCmp("er_headerCombo").getValue();e+="&er_headerCombo="+f;}else{e+="&er_headerCombo="+appConstants.er_headerCombo;}}e+="&er_test="+Ext.getCmp("er_test").getValue();
if(appConstants.isMultiMeasureSupport=="yes"){var h=new Array();h=Ext.getCmp("er_measure").getValue();for(var m in h){var a=h[m];a=a.replace("(","EGOPENBRACE");a=a.replace(")","EGCLOSEBRACE");e+="&er_measure="+a;}}else{var a=Ext.getCmp("er_measure").getValue();a=a.replace("(","EGOPENBRACE");a=a.replace(")","EGCLOSEBRACE");
e+="&er_measure="+a;}e+="&serverAggregate="+Ext.getCmp("serverAggregate").getValue();if(appConstants.enableEntryNode){var c=Ext.getCmp(appConstants.erCompType).getValue();if(c!=undefined&&c.indexOf("IIS_web_server")>-1){Ext.getCmp("enableEntryNode").setValue(false);}else{Ext.getCmp("enableEntryNode").setValue(true);
}}e+="&enableEntryNode="+Ext.getCmp("enableEntryNode").getValue();if(Ext.getCmp(appConstants.erInfo).getValue()!=undefined){e+="&er_info="+Ext.getCmp(appConstants.erInfo).getValue();}e+="&er_timeline="+Ext.getCmp("er_timeline").getValue();e+="&er_stdate="+Ext.getCmp("er_stdate").dataArray;e+="&startdate="+Ext.getCmp("er_stdate").dataArray;
e+="&er_enddate="+Ext.getCmp("er_enddate").dataArray;e+="&enddate="+Ext.getCmp("er_enddate").dataArray;e+="&er_sthr="+Ext.getCmp("er_sthr").dataArray;e+="&starthr="+Ext.getCmp("er_sthr").dataArray;e+="&er_endhr="+Ext.getCmp("er_endhr").dataArray;e+="&endhr="+Ext.getCmp("er_endhr").dataArray;e+="&timefrom="+Ext.getCmp("timefrom").getValue();
e+="&timeto="+Ext.getCmp("timeto").getValue();e+="&minfrom="+Ext.getCmp("minfrom").getValue();e+="&startmin="+mgr_stmin+"&endmin="+mgr_enmin+"&er_secs=00";e+="&er_stmin="+mgr_stmin+"&er_endmin="+mgr_enmin;e+="&minto="+Ext.getCmp("minto").getValue();e+="&er_reportgenration="+Ext.getCmp("reportGeneration").getValue();
e+="&er_excwe="+Ext.getCmp("er_excwe").getValue();e+="&er_timeInterval="+Ext.getCmp("er_timeInterval").getValue();if(isEnableChartTypeCombo){e+="&er_chartType="+Ext.getCmp("er_chartType").getValue();}if(isEnableUiMeasureCombo){e+="&er_uiMeasure="+Ext.getCmp("er_uiMeasure").getValue();}e+="&pct_idle="+Ext.getCmp("pct_idle").getValue();
e+="&sorted_col="+Ext.getCmp("groupBy_list").getValue();e+="&aggregate_server="+Ext.getCmp("aggregate_server").getValue();e+="&infoBy="+Ext.getCmp("infoBy").getValue();e+="&er_showBy="+Ext.getCmp("er_showBy").getValue();e+="&timeline_showBy="+Ext.getCmp("timeline_showBy").getValue();e+="&bar_showBy="+Ext.getCmp("bar_showBy").getValue();
e+="&dynamicRangesInfo="+this.getDynamicRangesInfo();e+="&dynamicColorInfo="+this.getDynamicColorInfo();e+="&fromReportBuilder="+appConstants.fromReportBuilder;e+="&overAllRecCount="+appConstants.totalRec+"&dataPageNo="+appConstants.currentPage;var j=new Array();j=(Ext.getCmp("er_webAppCombo").getValue()).split(",");
for(var d=0;j.length>d;d++){e+="&er_webAppCombo="+j[d];}e+="&lastInfoAccessFromWeAppCombo="+appConstants.lastInfoAccessFromWeAppCombo;if(appConstants.isCustomLayout=="yes"){e+="&er_top="+Ext.getCmp("er_top").getValue();}else{e+="&chartInfo="+appConstants.chartInfo;e+="&er_top="+Ext.getCmp("er_top").getValue();
}e+="&isCustomLayout="+appConstants.isCustomLayout;if(!Ext.isEmpty(appConstants.builderJson)){if(!Ext.isEmpty(appConstants.builderJson.hiddenFields)){for(var m in appConstants.builderJson.hiddenFields){var b=appConstants.builderJson.hiddenFields[m];if(m=="cmd"&&appConstants.formButtonId=="saveReport"){e+="&"+m+"=client";
}else{e+="&"+m+"="+b;}}}}e+="&tempDesc="+appConstants.tempDesc;return e;},enableDisableTools:function(a){Ext.getCmp("bookletTool").setDisabled(a);Ext.getCmp("printTool").setDisabled(a);Ext.getCmp("favoriteTool").setDisabled(a);Ext.getCmp("scheduleTool").setDisabled(a);Ext.getCmp("mailTool").setDisabled(a);
Ext.getCmp("saveTool").setDisabled(a);var b=appConstants.enableCsv;if(a){Ext.getCmp("csvTool").setDisabled(a);}else{if(b==true||b=="true"){Ext.getCmp("csvTool").setDisabled(false);}else{Ext.getCmp("csvTool").setDisabled(true);}}},validateMainForm:function(){var a=true;if(isSettingsEnabled){a=this.validateSettings();
}return a;},ajaxQueryMaker:function(e){if(appConstants.isSubmit!=undefined&&appConstants.isSubmit=="true"){return;}if(appConstants.isDescFilter!=undefined&&appConstants.isDescFilter=="no"&&e.getId()!=undefined&&e.getId()=="er_component"){return;}var t=this;this.reqFromCompChange="no";if(e.getId()!=undefined&&(e.getId()=="er_timeline"||e.getId()=="er_stdate"||e.getId()=="er_sthr"||e.getId()=="er_enddate"||e.getId()=="er_endhr")&&appConstants.isTimeInterval=="yes"){var A=Ext.getCmp("er_timeline").getValue();
if(A!=undefined&&A=="Any"){var E=Ext.getCmp("er_stdate").getValue();var n=Ext.getCmp("er_enddate").getValue();var s=Ext.getCmp("er_sthr").getValue();var j=Ext.getCmp("er_endhr").getValue();E=Ext.Date.dateFormat(E,"m/d/Y");E=Ext.Date.parse(E+" "+s,"m/d/Y H");n=Ext.Date.dateFormat(n,"m/d/Y");n=Ext.Date.parse(n+" "+j,"m/d/Y H");
var C=n.getTime()-E.getTime();var o=C/(1000*3600*24);if(o<1){A="1 hour";}else{if(o==1){A="1 day";}else{A="2 days";}}}var l="method=timelineChange&er_timeline="+A;l+="&er_stdate="+Ext.getCmp("er_stdate").dataArray;l+="&er_enddate="+Ext.getCmp("er_enddate").dataArray;l+="&er_sthr="+Ext.getCmp("er_sthr").dataArray;
l+="&er_endhr="+Ext.getCmp("er_endhr").dataArray;l+="&er_stmin="+mgr_stmin+"&er_endmin="+mgr_enmin;Ext.Ajax.request({url:"/final/reporter/ReportBuilderController.jsp",params:l,scope:this,method:"POST",success:function(i){var aa=i.responseText;var k=Ext.decode(aa);if(!Ext.isEmpty(k)){t.loadComboField("er_timeInterval","timeInterValCombo",null,"selectedTimeInterval",k,false,null,false);
}}});return;}if(!isSettingsEnabled){this.invokeSettings();}if(this.validateMainForm()){var T=e.getId();var h="/final/reporter/ReportBuilderController.jsp";var b;if(T=="er_option"){appConstants.method="optionchange";appConstants.lastInfoAccessFromWeAppCombo="false";b="method="+appConstants.method+"&er_option="+Ext.getCmp("er_option").getValue();
b+="&er_compType="+Ext.getCmp(appConstants.erCompType).getValue();b+="&recordInfo="+appConstants.recordInfo+"&templateName="+appConstants.templateName;b+="&user_dispName="+appConstants.tempName;b+="&fromReportBuilder="+appConstants.fromReportBuilder;}else{if(T=="er_site"||T=="er_subZone"){appConstants.method="sitechange";
appConstants.lastInfoAccessFromWeAppCombo="false";b="method="+appConstants.method+"&er_option="+Ext.getCmp("er_option").getValue()+"&er_site="+Ext.getCmp("er_site").getValue()+"&er_subZone="+Ext.getCmp("er_subZone").getValue();b+="&er_compType="+Ext.getCmp(appConstants.erCompType).getValue();b+="&recordInfo="+appConstants.recordInfo+"&templateName="+appConstants.templateName;
b+="&user_dispName="+appConstants.tempName;b+="&fromReportBuilder="+appConstants.fromReportBuilder;}else{if(T=="er_mutiSelComp"||T=="er_compType"||T=="er_component"){appConstants.method="comptypechange";appConstants.lastInfoAccessFromWeAppCombo="false";b="method="+appConstants.method;b+="&er_option="+Ext.getCmp("er_option").getValue();
var e=Ext.getCmp("er_site");if(!e.isHidden()){b+="&er_site="+e.getValue();}b+="&er_compType="+Ext.getCmp(appConstants.erCompType).getValue();b+="&recordInfo="+appConstants.recordInfo+"&templateName="+appConstants.templateName;b+="&user_dispName="+appConstants.tempName;b+="&fromReportBuilder="+appConstants.fromReportBuilder;
if(T=="er_component"){this.reqFromCompChange="yes";if(appConstants.isRemoveAllComponents!=undefined&&appConstants.isRemoveAllComponents=="true"){b+="&er_component="+Ext.getCmp("er_component").getValue();}else{var u=new Array();u=Ext.getCmp("er_component").getValue();for(var v in u){b+="&er_component="+u[v];
}}}}else{if(T=="er_test"){appConstants.method="testchange";b="method="+appConstants.method;b+="&er_compType="+Ext.getCmp(appConstants.erCompType).getValue();if(appConstants.isRemoveAllComponents!=undefined&&appConstants.isRemoveAllComponents=="true"){b+="&er_component="+Ext.getCmp("er_component").getValue();
}else{var u=new Array();u=Ext.getCmp("er_component").getValue();for(var v in u){b+="&er_component="+u[v];}}b+="&er_test="+Ext.getCmp("er_test").getValue();}else{if(T=="er_measure"){appConstants.method="measurechange";b="method="+appConstants.method;b+="&er_compType="+Ext.getCmp(appConstants.erCompType).getValue();
b+="&er_test="+Ext.getCmp("er_test").getValue();if(appConstants.isRemoveAllComponents!=undefined&&appConstants.isRemoveAllComponents=="true"){b+="&er_component="+Ext.getCmp("er_component").getValue();}else{var u=new Array();u=Ext.getCmp("er_component").getValue();for(var v in u){b+="&er_component="+u[v];
}}if(appConstants.isMultiMeasureSupport=="yes"){u=new Array();u=Ext.getCmp("er_measure").getValue();for(var v in u){var m=u[v];m=m.replace("(","EGOPENBRACE");m=m.replace(")","EGCLOSEBRACE");b+="&er_measure="+m;}}else{var m=Ext.getCmp("er_measure").getValue();m=m.replace("(","EGOPENBRACE");m=m.replace(")","EGCLOSEBRACE");
b+="&er_measure="+m;}if(appConstants.isCustomLayout!="yes"){appConstants.isCustomLayout="no";}b+="&isCustomLayout="+appConstants.isCustomLayout;}else{if(T=="submit"){var y=Ext.getCmp("reportGeneration").getValue();appConstants.method="submit";b="method="+appConstants.method;b+="&er_option="+Ext.getCmp("er_option").getValue();
var e=Ext.getCmp("er_site");if(!e.isHidden()){b+="&er_site="+e.getValue();if(Ext.getCmp("er_option").getValue()=="Zone"){b+="&er_site="+Ext.getCmp("er_subZone").getValue();}}b+="&er_compType="+Ext.getCmp(appConstants.erCompType).getValue();if(appConstants.isSoringColEnable){b+="&er_sortingColumn="+Ext.getCmp("er_sortingColumn").getValue();
b+="&er_sortingColumnState="+appConstants.er_sortingColumnState;}if(appConstants.gridMultiSortEnable!=undefined&&appConstants.gridMultiSortEnable=="yes"){b+="&er_secondaryColSort="+Ext.getCmp("er_secondaryColSort").getValue();b+="&er_secondaryColSortState="+appConstants.er_secondaryColSortState;var Z=Ext.getCmp("multisort");
b+="&multisort="+Z.getValue();}if(Ext.getCmp("showLegend")!="undefined"&&Ext.getCmp("showLegend")!=undefined){b+="&showLegendsEnable="+Ext.getCmp("showLegend").getValue();}if(appConstants.isRemoveAllComponents!=undefined&&appConstants.isRemoveAllComponents=="true"){b+="&er_component="+Ext.getCmp("er_component").getValue();
}else{var u=new Array();u=Ext.getCmp("er_component").getValue();for(var v in u){b+="&er_component="+u[v];}}b+="&er_test="+Ext.getCmp("er_test").getValue();if(y==null||(y!=null&&(y!="background"||y!="background-csv"))){b+="&overAllRecCount="+appConstants.totalRec+"&dataPageNo="+appConstants.currentPage;
}if(appConstants.isMultiMeasureSupport=="yes"){var u=new Array();u=Ext.getCmp("er_measure").getValue();for(var v in u){var m=u[v];m=m.replace("(","EGOPENBRACE");m=m.replace(")","EGCLOSEBRACE");b+="&er_measure="+m;}}else{var m=Ext.getCmp("er_measure").getValue();m=m.replace("(","EGOPENBRACE");m=m.replace(")","EGCLOSEBRACE");
b+="&er_measure="+m;}if(Ext.getCmp(appConstants.erInfo).getValue()!=undefined){b+="&er_info="+Ext.getCmp(appConstants.erInfo).getValue();}b+="&er_timeline="+Ext.getCmp("er_timeline").getValue();b+="&er_stdate="+Ext.getCmp("er_stdate").dataArray;b+="&startdate="+Ext.getCmp("er_stdate").dataArray;b+="&er_enddate="+Ext.getCmp("er_enddate").dataArray;
b+="&enddate="+Ext.getCmp("er_enddate").dataArray;b+="&er_sthr="+Ext.getCmp("er_sthr").dataArray;b+="&starthr="+Ext.getCmp("er_sthr").dataArray;b+="&er_endhr="+Ext.getCmp("er_endhr").dataArray;b+="&endhr="+Ext.getCmp("er_endhr").dataArray;b+="&startmin="+mgr_stmin+"&endmin="+mgr_enmin+"&er_secs=00";b+="&er_stmin="+mgr_stmin+"&er_endmin="+mgr_enmin;
b+="&timefrom="+Ext.getCmp("timefrom").getValue();b+="&timeto="+Ext.getCmp("timeto").getValue();b+="&minfrom="+Ext.getCmp("minfrom").getValue();b+="&minto="+Ext.getCmp("minto").getValue();b+="&er_reportgenration="+Ext.getCmp("reportGeneration").getValue();b+="&er_excwe="+Ext.getCmp("er_excwe").getValue();
b+="&er_timeInterval="+Ext.getCmp("er_timeInterval").getValue();if(isEnableChartTypeCombo){b+="&er_chartType="+Ext.getCmp("er_chartType").getValue();}if(isEnableUiMeasureCombo){b+="&er_uiMeasure="+Ext.getCmp("er_uiMeasure").getValue();}b+="&pct_idle="+Ext.getCmp("pct_idle").getValue();b+="&sorted_col="+Ext.getCmp("groupBy_list").getValue();
b+="&aggregate_server="+Ext.getCmp("aggregate_server").getValue();b+="&infoBy="+Ext.getCmp("infoBy").getValue();b+="&er_showBy="+Ext.getCmp("er_showBy").getValue();b+="&timeline_showBy="+Ext.getCmp("timeline_showBy").getValue();b+="&bar_showBy="+Ext.getCmp("bar_showBy").getValue();b+="&dynamicRangesInfo="+this.getDynamicRangesInfo();
b+="&dynamicColorInfo="+this.getDynamicColorInfo();if(appConstants.isCustomLayout=="yes"){b+="&er_top="+Ext.getCmp("er_top").getValue();}else{b+="&chartInfo="+appConstants.chartInfo;b+="&er_top="+Ext.getCmp("er_top").getValue();}b+="&recordInfo="+appConstants.recordInfo+"&templateName="+appConstants.templateName;
b+="&user_dispName="+appConstants.tempName;b+="&fromReportBuilder="+appConstants.fromReportBuilder;if(needHeaderCombo){if(Ext.getCmp("er_headerCombo")!=undefined){var U=Ext.getCmp("er_headerCombo").getValue();b+="&er_headerCombo="+U;}else{b+="&er_headerCombo="+appConstants.er_headerCombo;}}var N=new Array();
if(Ext.getCmp("er_webAppCombo")!=undefined){N=(Ext.getCmp("er_webAppCombo").getValue()).split(",");}for(var W=0;N.length>W;W++){b+="&er_webAppCombo="+N[W];}b+="&serverAggregate="+Ext.getCmp("serverAggregate").getValue();if(appConstants.enableEntryNode){var g=Ext.getCmp(appConstants.erCompType).getValue();
if(g!=undefined&&g.indexOf("IIS_web_server")>-1){Ext.getCmp("enableEntryNode").setValue(false);}else{Ext.getCmp("enableEntryNode").setValue(true);}}b+="&enableEntryNode="+Ext.getCmp("enableEntryNode").getValue();if(wildcardSearch){b+="&clientVersionn="+Ext.getCmp("wildcardSearch").getValue();if(wildcardSearchCondition){b+="&er_searchGroupBy="+Ext.getCmp("er_searchGroupBy").getValue();
}if(wildcardSearchCondition2){b+="&wildcardSearch2="+Ext.getCmp("wildcardSearch2").getValue();b+="&er_searchGroupBy2="+Ext.getCmp("er_searchGroupBy2").getValue();}}}else{appConstants.method=null;return;}}}}}}b+="&lastInfoAccessFromWeAppCombo="+appConstants.lastInfoAccessFromWeAppCombo;b+="&isCustomLayout="+appConstants.isCustomLayout;
if(!Ext.isEmpty(appConstants.builderJson)){if(!Ext.isEmpty(appConstants.builderJson.hiddenFields)){for(var v in appConstants.builderJson.hiddenFields){var G=appConstants.builderJson.hiddenFields[v];b+="&"+v+"="+G;}}}if(keepResult){keepResult=false;return b;}if(Ext.isEmpty(initLdgMask)){initLdgMask=new Ext.LoadMask(Ext.getBody(),{msg:"Loading ..."});
}if(y!=null&&(y=="background"||y=="background-csv")){if(appConstants.blockPdfRelatedOptions=="yes"){this.exportDataAlert();return;}h="/final/servlet/com.eg.ErStartBackGroundReportC";var a=Ext.getCmp("backgroundresults");var c=Ext.getCmp("resultcontainer");var d=(Ext.getCmp("main").body.dom.offsetHeight)-(Ext.getCmp("templateFormItms").body.dom.offsetHeight+34);
c.removeAll();var R=Ext.getCmp("bgReportName").getValue();var J=1;if(appConstants.isCustomLayout=="yes"){var I=Ext.getCmp(appConstants.erCompType).getValue();appConstants.widgetList=appConstants.selectedCompTypeWidgets[I];if(Ext.isEmpty(appConstants.widgetList)){appConstants.widgetList=appConstants.selectedCompTypeWidgets["all"];
}J=appConstants.widgetList.length;}b+="&tempDesc="+appConstants.tempDesc+"&titleDisp="+appConstants.tempName;if(y=="background-csv"){b+="&SaveFormat=CSV";}initLdgMask.show();Ext.Ajax.request({url:h,params:b+"&bg_reportname="+encodeURIComponent(R)+"&totalwidget="+J,scope:this,method:"POST",success:function(i){var ad=i.responseText;
var ab=Ext.decode(ad);ab=ab.combo;var af="";var ac=ab.backgroundReportStatus;if(!Ext.isEmpty(ac)&&ac!="undefined"){if(ac=="success"){var k=ab.bgroundResponseTxt;var ae=ab.bgroundReportsURL;var aa=ab.backgroundAnchor;a.update('<table border="0px" width="100%" height="'+d+'px"><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">'+k+".</br>"+'<a class="backgroundMsgLink" href='+ae+">"+aa+"</a></div></td></tr></table></td></tr></table>");
}else{if(ac=="duplicate"){var k=ab.bgroundResponseTxt;var ae=ab.bgroundReportsURL;var aa=ab.backgroundAnchor;a.update('<table border="0px" width="100%" height="'+d+'px"><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">'+k+".</br>"+'<a class="backgroundMsgLink" href='+ae+">"+aa+"</a></div></td></tr></table></td></tr></table>");
}else{var k=ab.bgroundResponseTxt;a.update('<table border="0px" width="100%" height="'+d+'px"><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">'+k+"</div></td></tr></table></td></tr></table>");
}}}else{a.update("<span>Error In BackGround Generation</span>");}a.show();t.enableDisableTools(true);initLdgMask.hide();},Error:function(){alert("error in back ground");}});}else{var c=Ext.getCmp("resultcontainer");c.removeAll();initLdgMask.show();if(appConstants.isCustomLayout=="yes"&&T=="submit"){var I=Ext.getCmp(appConstants.erCompType).getValue();
appConstants.widgetList=appConstants.selectedCompTypeWidgets[I];if(Ext.isEmpty(appConstants.widgetList)){appConstants.widgetList=appConstants.selectedCompTypeWidgets["all"];}var O={};if(appConstants.widgetList!=undefined){O.widgetCount=appConstants.widgetList.length;}var t=this;var P=Ext.getCmp("pbar");
var X=0;widgetCount=1;var r=0;var w=false;var L=new Ext.util.DelayedTask(function(aa){var k=aa;if(k.indexOf("$")!=-1){var ab=parseInt(k.substring(k.indexOf("$")+1));k=k.substring(0,k.indexOf("$"));r=r+ab;var i=parseInt(k.y);if((i-1)+ab==12){r=0;w=true;}else{w=false;}}t.callAjax(h,b+"&widget="+k,false,false,w);
O.ajaxCount++;});var V=new Ext.util.DelayedTask(function(aa){var k=aa;if(k.indexOf("$")!=-1){var ab=parseInt(k.substring(k.indexOf("$")+1));k=k.substring(0,k.indexOf("$"));r=r+ab;var i=parseInt(k.y);if((i-1)+ab==12){r=0;w=true;}else{w=false;}}t.callAjax(h,b+"&widget="+k,false,true,w);O.ajaxCount++;});
if(appConstants.perLoaderJson.preLoadWidgetInfo!=undefined&&appConstants.perLoaderJson.preLoadWidgetInfo!="undefined"){initLdgMask.hide();c.show();var Q=0;if(appConstants.perLoaderJson.preLoadWidgetInfo instanceof Array){for(var W in appConstants.perLoaderJson.preLoadWidgetInfo){var q=appConstants.perLoaderJson.preLoadWidgetInfo[W];
if(q.length>1){var F=Ext.create("Ext.form.Panel",{layout:"column",columnWidth:1,margin:"0 2 10 0",padding:"0 0 0 0",closeAction:"destroy",});var f=0;for(var D in q){var B=q[D];for(var K in B){var x=B[K];var H=parseInt(x.size_x);r=r+H;var S=parseInt(x.y);if((S-1)+H==12){r=0;w=true;}else{w=false;}var z=false;
if(Q==0){z=true;}Q++;if(f==0){this.perLoadWidget(x,K,w,b,z,F,true);}else{this.perLoadWidget(x,K,w,b,z,F,false);}f++;}}c.add(F);}else{for(var D in q){var B=q[D];for(var K in B){var x=B[K];var H=parseInt(x.size_x);r=r+H;var S=parseInt(x.y);if((S-1)+H==12){r=0;w=true;}else{w=false;}var z=false;if(Q==0){z=true;
}Q++;this.perLoadWidget(x,K,w,b,z,c,true);}}}}}else{if(needGridStackUI){if(Ext.isEmpty(Ext.getCmp("gridsterstackpanel"))){Ext.getCmp("resultcontainer").add({xtype:"gridsterstackpanel",columnWidth:1});}Ext.getCmp("resultcontainer").show();if(!Ext.isEmpty(Ext.getCmp("gridsterstackpanel"))){if(!Ext.isEmpty(Ext.getCmp("reportergridstackpanel"))){Ext.getCmp("reportergridstackpanel")._removeAllWidget();
}Ext.getCmp("gridsterstackpanel").show();}var p=Ext.getCmp("reportergridstackpanel")._serialization();}for(var K in appConstants.perLoaderJson.preLoadWidgetInfo){var x=appConstants.perLoaderJson.preLoadWidgetInfo[K];var H=parseInt(x.size_x);r=r+H;var S=parseInt(x.y);if((S-1)+H==12){r=0;w=true;}else{w=false;
}var z=false;if(Q==0){z=true;}Q++;if(!needGridStackUI){this.perLoadWidget(x,K,w,b,z,c,true);}else{var M=true;var Y={x:x.y-1,y:x.x-1,width:x.size_x,height:x.size_y,autoPosition:true,minWidth:undefined,maxWidth:undefined,minHeight:undefined,widgetType:x.headerDescription,maxHeight:undefined,eachWidget:x,params:b,widgetCountStatus:z,panelHeaderStatus:true,id:K+"_panel",padding:10,widgetInfo:K,method:appConstants.method,noResize:M};
Ext.getCmp("reportergridstackpanel").addWidget(Y);}}Ext.getCmp("resultcontainer").doComponentLayout();Ext.getCmp("resultcontainer").doLayout();}this.enableDisableTools(false);}else{Object.defineProperty(O,"ajaxCount",{get:function(){return this.value;},set:function(i){this.value=i;X=this.value/O.widgetCount;
P.updateProgress(X,Math.round(100*X)+"% completed...");if(0==this.value){V.delay(0,null,null,[appConstants.widgetList[O.ajaxCount]]);}else{if(O.widgetCount!=this.value){L.delay(500,null,null,[appConstants.widgetList[O.ajaxCount]]);}else{initLdgMask.hide();if(c.items.items.length<=0){t.enableDisableTools(true);
}else{t.enableDisableTools(false);}c.doComponentLayout();c.doLayout();Ext.getCmp("pbarcont").hide();P.hide();}}}});if(appConstants.widgetList!=undefined&&appConstants.widgetList.length>0){O.ajaxCount=0;}}}else{this.callAjax(h,b,true,true,true);}}}},ajaxQueryMaker11:function(){if(appConstants.fromFavouriteModify=="Yes"||appConstants.fromScheduleModify=="Yes"){return;
}var a="";if(appConstants.isSubmit!=null&&appConstants.isSubmit=="true"){a="submit";}var d="/final/reporter/ReportBuilderController.jsp";var o;if(appConstants.isSubmit!=null&&appConstants.isSubmit=="true"){appConstants.method="submit";o="method="+appConstants.method;o+="&er_option="+Ext.getCmp("er_option").getValue();
var g=Ext.getCmp("er_site");if(!g.isHidden()){o+="&er_site="+g.getValue();if(Ext.getCmp("er_option").getValue()=="Zone"){o+="&er_site="+Ext.getCmp("er_subZone").getValue();}}if(Ext.getCmp("showLegend")!="undefined"&&Ext.getCmp("showLegend")!=undefined){o+="&showLegendsEnable="+Ext.getCmp("showLegend").getValue();
}o+="&er_compType="+Ext.getCmp(appConstants.erCompType).getValue();if(appConstants.isSoringColEnable){o+="&er_sortingColumn="+Ext.getCmp("er_sortingColumn").getValue();}if(appConstants.gridMultiSortEnable!=undefined&&appConstants.gridMultiSortEnable=="yes"){o+="&er_secondaryColSort="+Ext.getCmp("er_secondaryColSort").getValue();
o+="&er_secondaryColSortState="+appConstants.er_secondaryColSortState;var k=Ext.getCmp("multisort");o+="&multisort="+k.getValue();}if(appConstants.isRemoveAllComponents!=undefined&&appConstants.isRemoveAllComponents=="true"){o+="&er_component="+Ext.getCmp("er_component").getValue();}else{var b=new Array();
b=Ext.getCmp("er_component").getValue();for(var s in b){o+="&er_component="+b[s];}}o+="&er_test="+Ext.getCmp("er_test").getValue();if(appConstants.isMultiMeasureSupport=="yes"){var b=new Array();b=Ext.getCmp("er_measure").getValue();for(var s in b){var c=b[s];c=c.replace("(","EGOPENBRACE");c=c.replace(")","EGCLOSEBRACE");
o+="&er_measure="+c;}}else{var c=Ext.getCmp("er_measure").getValue();c=c.replace("(","EGOPENBRACE");c=c.replace(")","EGCLOSEBRACE");o+="&er_measure="+c;}if(Ext.getCmp(appConstants.erInfo).getValue()!=undefined){o+="&er_info="+Ext.getCmp(appConstants.erInfo).getValue();}o+="&er_timeline="+Ext.getCmp("er_timeline").getValue();
o+="&er_stdate="+Ext.getCmp("er_stdate").dataArray;o+="&startdate="+Ext.getCmp("er_stdate").dataArray;o+="&er_enddate="+Ext.getCmp("er_enddate").dataArray;o+="&enddate="+Ext.getCmp("er_enddate").dataArray;o+="&er_sthr="+Ext.getCmp("er_sthr").dataArray;o+="&starthr="+Ext.getCmp("er_sthr").dataArray;o+="&er_endhr="+Ext.getCmp("er_endhr").dataArray;
o+="&endhr="+Ext.getCmp("er_endhr").dataArray;o+="&startmin="+mgr_stmin+"&endmin="+mgr_enmin+"&er_secs=00";o+="&er_stmin="+mgr_stmin+"&er_endmin="+mgr_enmin;o+="&timefrom="+Ext.getCmp("timefrom").getValue();o+="&timeto="+Ext.getCmp("timeto").getValue();o+="&minfrom="+Ext.getCmp("minfrom").getValue();
o+="&minto="+Ext.getCmp("minto").getValue();o+="&er_reportgenration="+Ext.getCmp("reportGeneration").getValue();o+="&er_excwe="+Ext.getCmp("er_excwe").getValue();o+="&er_timeInterval="+Ext.getCmp("er_timeInterval").getValue();if(isEnableChartTypeCombo){o+="&er_chartType="+Ext.getCmp("er_chartType").getValue();
}if(isEnableUiMeasureCombo){o+="&er_uiMeasure="+Ext.getCmp("er_uiMeasure").getValue();}o+="&pct_idle="+Ext.getCmp("pct_idle").getValue();o+="&aggregate_server="+Ext.getCmp("aggregate_server").getValue();o+="&infoBy="+Ext.getCmp("infoBy").getValue();o+="&er_showBy="+Ext.getCmp("er_showBy").getValue();
o+="&timeline_showBy="+Ext.getCmp("timeline_showBy").getValue();o+="&bar_showBy="+Ext.getCmp("bar_showBy").getValue();o+="&dynamicRangesInfo="+this.getDynamicRangesInfo();o+="&dynamicColorInfo="+this.getDynamicColorInfo();o+="&sorted_col="+Ext.getCmp("groupBy_list").getValue();o+="&overAllRecCount="+appConstants.totalRec+"&dataPageNo="+appConstants.currentPage;
if(appConstants.isCustomLayout=="yes"){o+="&er_top="+Ext.getCmp("er_top").getValue();}else{o+="&chartInfo="+appConstants.chartInfo;o+="&er_top="+Ext.getCmp("er_top").getValue();}o+="&recordInfo="+appConstants.recordInfo+"&templateName="+appConstants.templateName+"&user_dispName="+appConstants.tempName;
o+="&fromReportBuilder="+appConstants.fromReportBuilder;}else{appConstants.method=null;return;}o+="&isCustomLayout="+appConstants.isCustomLayout;if(!Ext.isEmpty(appConstants.builderJson)){if(!Ext.isEmpty(appConstants.builderJson.hiddenFields)){for(var s in appConstants.builderJson.hiddenFields){var t=appConstants.builderJson.hiddenFields[s];
o+="&"+s+"="+t;}}}var n=Ext.getCmp("resultcontainer");n.removeAll();if(Ext.isEmpty(initLdgMask)){initLdgMask=new Ext.LoadMask(Ext.getBody(),{msg:"Loading ..."});}initLdgMask.show();if(appConstants.isCustomLayout=="yes"&&a=="submit"){var e=Ext.getCmp(appConstants.erCompType).getValue();appConstants.widgetList=appConstants.selectedCompTypeWidgets[e];
if(Ext.isEmpty(appConstants.widgetList)){appConstants.widgetList=appConstants.selectedCompTypeWidgets["all"];}var p={};p.widgetCount=appConstants.widgetList.length;var q=this;var f=Ext.getCmp("pbar");var j=0;widgetCount=1;var h=0;var r=false;var l=new Ext.util.DelayedTask(function(v){var u=v;if(u.indexOf("$")!=-1){var w=parseInt(u.substring(u.indexOf("$")+1));
u=u.substring(0,u.indexOf("$"));h=h+w;var i=parseInt(u.y);if((i-1)+w==12){h=0;r=true;}else{r=false;}}q.callAjax(d,o+"&widget="+u,false,false,r);p.ajaxCount++;});var m=new Ext.util.DelayedTask(function(v){var u=v;if(u.indexOf("$")!=-1){var w=parseInt(u.substring(u.indexOf("$")+1));u=u.substring(0,u.indexOf("$"));
h=h+w;var i=parseInt(u.y);if((i-1)+w==12){h=0;r=true;}else{r=false;}}q.callAjax(d,o+"&widget="+u,false,true,r);p.ajaxCount++;});Object.defineProperty(p,"ajaxCount",{get:function(){return this.value;},set:function(i){this.value=i;j=this.value/p.widgetCount;if(f!=undefined){f.updateProgress(j,Math.round(100*j)+"% completed...");
}if(0==this.value){m.delay(0,null,null,[appConstants.widgetList[p.ajaxCount]]);}else{if(p.widgetCount!=this.value){l.delay(500,null,null,[appConstants.widgetList[p.ajaxCount]]);}else{initLdgMask.hide();if(n.items.items.length<=0){q.enableDisableTools(true);}else{q.enableDisableTools(false);}n.doComponentLayout();
n.doLayout();if(Ext.getCmp("pbarcont")!=undefined){Ext.getCmp("pbarcont").hide();}if(f!=undefined){f.hide();}}}}});if(appConstants.widgetList.length>0){p.ajaxCount=0;}}else{n.removeAll();this.callAjax(d,o,true,true,true);}},sleep:function(a){var c=new Date().getTime();for(var b=0;b<10000000;b++){if((new Date().getTime()-c)>a){break;
}}},onAjaxSuccess:function(t,K){Ext.getCmp("moreOptionCloseId").show();if(appConstants.isMultiCompType=="true"){Ext.getCmp("er_compType").hide();Ext.getCmp("compTypeMultiPane").show();Ext.getCmp("er_mutiSelComp").show();}else{Ext.getCmp("compTypeMultiPane").hide();Ext.getCmp("er_mutiSelComp").hide();
Ext.getCmp("er_compType").show();}if(appConstants.isDescFilter!=undefined&&appConstants.isDescFilter=="yes"){if(appConstants.isMultiInfo=="true"){Ext.getCmp("er_infoSingleSelect").hide();Ext.getCmp("infomultipane").show();Ext.getCmp("er_info").show();}else{Ext.getCmp("infomultipane").hide();Ext.getCmp("er_info").hide();
Ext.getCmp("er_infoSingleSelect").show();}}if(Ext.isEmpty(initLdgMask)){initLdgMask=new Ext.LoadMask(Ext.getBody(),{msg:"Loading ..."});}if(appConstants.isCustomLayout=="yes"){if(appConstants.builderJson.hasOwnProperty("selectedFields")){if(appConstants.builderJson.selectedFields.hasOwnProperty("selectedCompTypeWidgets")){appConstants.selectedCompTypeWidgets=appConstants.builderJson.selectedFields.selectedCompTypeWidgets;
}}}if(appConstants.method=="init"||(appConstants.isSubmit!=null&&appConstants.isSubmit=="true")){var J="";if(appConstants.isCustomLayout!=undefined&&appConstants.isCustomLayout!="yes"){J=JSON.parse(decodeURIComponent(appConstants.chartInfo));if(J["chartType"]=="timeline"||J["chartType"]=="area"){Ext.getCmp("showLegend").show();
}}if(appConstants.builderJson.isHeaderFooterUpdate!=undefined&&appConstants.builderJson.isHeaderFooterUpdate=="yes"){return;}var y=appConstants.tempName;if(y.indexOf(".")>-1){y=y.substring(y.lastIndexOf(".")+1);}if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}y=appConstants.erUtils.specialCharDecode(y);
this.getMain().setTitle('<table cellpadding="0" cellspacing="0" border="0"><tr><td class="newFont_bold15">'+y+'</td><td id ="iconRename" style="float:left;margin-left:20px;" class="'+iconRename+'"></td></tr></table>');this.loadComboField("er_option","analysisByCombo","labelAnalysisByCombo","selectedAnalysisByCombo",appConstants.builderJson,false,null,true);
this.loadComboField("er_site","siteCombo","labelSiteCombo","selectedSiteCombo",appConstants.builderJson,false,null,true);this.loadComboField("er_subZone","subZoneCombo","labelSubZoneCombo","selectedSubZoneCombo",appConstants.builderJson,false,null,true);if(appConstants.isMultiCompType=="true"){this.loadComboField(appConstants.erCompType,"componentTypeCombo","labelComponentTypeCombo","selectedComponentTypeCombo",appConstants.builderJson,true,"compTypeMultiPane",true);
}else{this.loadComboField(appConstants.erCompType,"componentTypeCombo","labelComponentTypeCombo","selectedComponentTypeCombo",appConstants.builderJson,false,null,true);}if(appConstants.isSoringColEnable){this.loadComboField("er_sortingColumn","sortingColumnCombo","labelSortingColumnCombo","selectedSortingColCombo",appConstants.builderJson,false,null,true);
}if(appConstants.gridMultiSortEnable!=undefined&&appConstants.gridMultiSortEnable=="yes"){this.loadComboField("er_secondaryColSort","sortingColumnCombo","labelSecSortingColumnCombo","selectedSecondSortColCombo",appConstants.builderJson,false,null,true);Ext.getCmp("er_secondaryColSort").hide();}this.loadComboField("er_test","testCombo",null,"selectedTestCombo",appConstants.builderJson,false,null,false);
if(appConstants.isMultiMeasureSupport=="yes"){this.loadComboField("er_measure","measureCombo",null,"selectedMeasureCombo",appConstants.builderJson,true,"measmultipane",false);}else{this.loadComboField("er_measure","measureCombo",null,"selectedMeasureCombo",appConstants.builderJson,false,null,false);}if(appConstants.isMultiInfo=="true"){var r="infoCombo";
if(appConstants.lastInfoAccessFromWeAppCombo!=undefined&&appConstants.lastInfoAccessFromWeAppCombo=="true"){r="totalCustomInfo";}this.loadComboField(appConstants.erInfo,r,null,"selectedInfoCombo",appConstants.builderJson,true,"infomultipane",false);}else{this.loadComboField(appConstants.erInfo,"infoCombo",null,"selectedInfoCombo",appConstants.builderJson,false,null,false);
}this.loadComboField("er_timeline","timelineCombo",null,"selectedTimelineCombo",appConstants.builderJson,false,null,false);if(appConstants.isTimeInterval=="yes"){this.loadComboField("er_timeInterval","timeInterValCombo","labelTimeInterValCombo","selectedTimeInterval",appConstants.builderJson,false,null,true);
}if(isEnableChartTypeCombo){this.loadComboField("er_chartType","chartTypeCombo","labelChartType","selectedChartType",appConstants.builderJson,false,null,true);}if(isEnableUiMeasureCombo){this.loadComboField("er_uiMeasure","uiMeasureCombo","labelUiMeasure","selectedUiMeasure",appConstants.builderJson,false,null,true);
}if(wildcardSearch){if(appConstants.builderJson.selectedFields.selectedClientVersionn!=undefined){Ext.getCmp("wildcardSearch").setValue(appConstants.builderJson.selectedFields.selectedClientVersionn);if(wildcardSearchCondition){Ext.getCmp("er_searchGroupBy").setValue(appConstants.builderJson.selectedFields.selectedSearchGroupByVal);
}}else{if(wildcardSearchCondition){Ext.getCmp("wildcardSearch").setValue("");Ext.getCmp("er_searchGroupBy").setValue("none");}else{Ext.getCmp("wildcardSearch").setValue("*");}}if(wildcardSearchCondition){if(Ext.getCmp("er_searchGroupBy").getValue()=="none"){Ext.getCmp("wildcardSearch").hide();}else{Ext.getCmp("wildcardSearch").show();
}}if(wildcardSearchCondition2){if(appConstants.builderJson.selectedFields.selectedWildcardSearch2!=undefined){Ext.getCmp("wildcardSearch2").setValue(appConstants.builderJson.selectedFields.selectedWildcardSearch2);if(wildcardSearchCondition2){Ext.getCmp("er_searchGroupBy2").setValue(appConstants.builderJson.selectedFields.selectedSearchGroupBy2);
}}else{if(wildcardSearchCondition2){Ext.getCmp("wildcardSearch2").setValue("");Ext.getCmp("er_searchGroupBy2").setValue("none");}else{Ext.getCmp("wildcardSearch2").setValue("*");}}if(wildcardSearchCondition2){if(Ext.getCmp("er_searchGroupBy2").getValue()=="none"){Ext.getCmp("wildcardSearch2").hide();
}else{Ext.getCmp("wildcardSearch2").show();}}}}if(appConstants.builderJson.selectedFields.enableAggreagation=="true"){Ext.getCmp("aggregate_server").show();this.loadComboField("aggregate_server","aggregateServerCombo",null,"selectedAggregateValue",appConstants.builderJson,false,null,false);}else{Ext.getCmp("aggregate_server").hide();
}if(appConstants.builderJson.selectedFields.enableInfoBy=="true"){this.loadComboField("infoBy","infoByCombo",null,"selectedInfoBy",appConstants.builderJson,false,null,false);}else{Ext.getCmp("infoBy").hide();}if(appConstants.builderJson.selectedFields.enableSortedBy==true){this.loadComboField("groupBy_list","groupByCombo",null,"selectTableCol",appConstants.builderJson,false,null,false);
Ext.getCmp("groupBy_list").show();}else{Ext.getCmp("groupBy_list").hide();}this.loadComboField("er_excwe","excludeWeekendsCombo",null,"selectedExcludeWeekendsCombo",appConstants.builderJson,false,null,false);if(appConstants.builderJson.selectedFields["selectedPCTIdleTime"]!=undefined){Ext.getCmp("pct_idle").setValue(appConstants.builderJson.selectedFields["selectedPCTIdleTime"]);
}else{Ext.getCmp("pct_idle").hide();}this.loadComboField("er_showBy","showByCombo",null,"selectedShowByCombo",appConstants.builderJson,false,null,false);if(appConstants.builderJson.selectedFields.selectedtimeShowByCombo!=undefined&&appConstants.isCustomLayout!="yes"){this.loadComboField("timeline_showBy","timelineShowByCombo",null,"selectedtimeShowByCombo",appConstants.builderJson,false,null,false);
Ext.getCmp("timeline_showBy").show();}else{Ext.getCmp("timeline_showBy").hide();}if(appConstants.builderJson.selectedFields.selectedbarShowByCombo!=undefined&&appConstants.isCustomLayout!="yes"){this.loadComboField("bar_showBy","barShowByCombo",null,"selectedbarShowByCombo",appConstants.builderJson,false,null,false);
Ext.getCmp("bar_showBy").show();}else{Ext.getCmp("bar_showBy").hide();}if((appConstants.isCustomLayout=="no"&&J["enableTopN"]=="yes")||appConstants.isCustomTopN=="yes"){this.loadComboField("er_top","topCombo",null,"selectedTopCombo",appConstants.builderJson,false,null,false);}if(appConstants.isCustomLayout=="yes"||J["enableTopN"]=="no"){Ext.getCmp("er_top").hide();
}if(appConstants.isCustomTopN=="yes"){Ext.getCmp("er_top").show();}if(appConstants.isTimeInterval=="yes"){Ext.getCmp("er_timeInterval").show();}else{Ext.getCmp("er_timeInterval").hide();}this.loadComboField("reportGeneration","reportGenerationCombo",null,"selectedReportGenerationCombo",appConstants.builderJson,false,null,false);
if(appConstants.builderJson.combo.webAppCombo!=undefined){Ext.getCmp("customTextField").show();webAppCombo=appConstants.builderJson.combo.webAppCombo;Ext.getCmp("er_webAppCombo").setValue(appConstants.builderJson.selectedFields.selectedWebAppCombo);}if(appConstants.isRemoveAllComponents!=undefined&&appConstants.isRemoveAllComponents=="true"){this.loadComboField("er_component","componentCombo","labelComponentDropDownCombo","selectedComponentCombo",appConstants.builderJson,false,null,true);
}else{this.loadComboField("er_component","componentCombo","labelComponentCombo","selectedComponentCombo",appConstants.builderJson,true,"compmultipane",true);}if(appConstants.builderJson.combo.displayColourMeasList!=undefined&&Object.keys(appConstants.builderJson.combo.displayColourMeasList).length>0){var p=appConstants.builderJson.combo.displayColourMeasList;
Ext.getCmp("colourSettingsItemsId").collapse();Ext.getCmp("colourSettingsItemsId").expand();Ext.getCmp("colourSettingsSplitter").show();Ext.getCmp("colourSettingsItemsId").show();var w=Ext.getCmp("colourSettingsItemsId");var g=0;for(var L in p){if(p.hasOwnProperty(L)){var M=p[L];var C=new Array();var j=new Array();
var F=new Array();F=M;var f="enableImage";for(var A in M){if(A=="colorInfo"){F=M[A];}if(A=="showValue"){f=M[A];}}for(var I=0;I<F.length;I++){j.push(F[I]);}var e=L;C.push({xtype:"label",text:e,value:L});for(var u=0;u<j.length;u++){M=j[u];var m="";var d="";var b="";var E="";if(M.indexOf("*")!=-1){m=M.substring(0,M.indexOf("*"));
d=M.substring(M.indexOf("*")+1,M.lastIndexOf("*"));b=M.substring(M.lastIndexOf("*")+1);if(m.indexOf("$")!=-1&&f=="enableSymbol"){E=m.substring(0,m.indexOf("$"));m=m.substring(m.indexOf("$")+1);}}var G=d;var H=45;if(E!=""&&f=="enableSymbol"){G="";H=-5;C.push({xtype:"image",cls:E,});}C.push({fieldLabel:m,fieldLabelValue:d,id:m+g,xtype:"numberfield",allowNegative:false,labelAlign:"right",minValue:1,hideTrigger:true,keyNavEnabled:false,mouseWheelEnabled:false,labelSeparator:"",margin:"2px 0px 0px 2px",labelWidth:H,cls:"textbox",name:"upperCritical",width:100,style:{"background-color":G,},value:b,listeners:{"render":function(i){var c=Ext.getCmp(i.id);
}},});g++;}w.add({xtype:"fieldcontainer",id:L,value:L,layout:{type:"vbox",align:"stretch"},flex:1,defaults:{labelSeparator:"",labelAlign:"top",margin:"0 5 5 0",columnWidth:0.5,},items:C,});}}}if(appConstants.builderJson.combo.dynamicRangeField!=undefined&&appConstants.builderJson.combo.dynamicRangeField.length>0){Ext.getCmp("rangeSettingsItemsId").collapse();
Ext.getCmp("rangeSettingsItemsId").expand();Ext.getCmp("rangeSettingsSplitter").show();Ext.getCmp("rangeSettingsItemsId").show();var z=Ext.getCmp("rangeSettingsItemsId");var q=false;for(var D=0;D<appConstants.builderJson.combo.dynamicRangeField.length;D++){var n=appConstants.builderJson.combo.dynamicRangeField[D];
if(n.indexOf("(")>-1){n=n.substring(0,n.indexOf("("));}if(appConstants.templateName!=undefined&&appConstants.templateName=="Logon Overview"&&D>0){q=true;}z.add({xtype:"fieldcontainer",id:appConstants.builderJson.combo.dynamicRangeField[D],hidden:q,layout:{type:"column",align:"stretch"},flex:1,defaults:{labelSeparator:"",labelAlign:"top",margin:"0 5 5 0",columnWidth:0.5,},items:[{xtype:"scrollcombo",store:new Ext.data.Store({fields:["displayField","valueField"],data:appConstants.builderJson.combo.dynamicRangeValue}),displayField:"displayField",value:appConstants.builderJson.combo.dynamicRangeComboValue[D],valueField:"valueField",fieldLabel:n,fieldLabelValue:appConstants.builderJson.combo.dynamicRangeField[D],id:"dynamicRangeCombo_"+D,name:"dynamicRangeCombo_"+D,txtFieldId:"disp_MeasureName"+D,listeners:{select:function(k,i,c){if(this.getValue()!="None"){Ext.getCmp(this.txtFieldId).show();
}else{Ext.getCmp(this.txtFieldId).hide();Ext.getCmp(this.txtFieldId).setValue("");}}}},{xtype:"textfield",fieldLabel:"Range value",cls:"textbox",maskRe:/[0-9 .]/,width:200,value:appConstants.builderJson.combo.dynamicRangeFieldValue[D],id:"disp_MeasureName"+D,name:"disp_MeasureName"+D,},]});}}var s=Ext.ComponentManager.get("er_stdate");
s.setValue(appConstants.builderJson.selectedFields.selectedStartDateDisp);s.dataArray=appConstants.builderJson.selectedFields.selectedStartDateVal;s=Ext.ComponentManager.get("er_enddate");s.setValue(appConstants.builderJson.selectedFields.selectedEndDateDisp);s.dataArray=appConstants.builderJson.selectedFields.selectedEndDateVal;
s=Ext.ComponentManager.get("er_sthr");s.setValue(appConstants.builderJson.selectedFields.selectedStartHourDisp);s.dataArray=appConstants.builderJson.selectedFields.selectedStartHour;s=Ext.ComponentManager.get("er_endhr");s.setValue(appConstants.builderJson.selectedFields.selectedEndHourDisp);s.dataArray=appConstants.builderJson.selectedFields.selectedEndHour;
Ext.ComponentManager.get("timefrom").setValue(appConstants.builderJson.selectedFields.selectedTimefrom);Ext.ComponentManager.get("timeto").setValue(appConstants.builderJson.selectedFields.selectedTimeto);Ext.ComponentManager.get("minfrom").setValue(appConstants.builderJson.selectedFields.selectedMinfrom);
Ext.ComponentManager.get("minto").setValue(appConstants.builderJson.selectedFields.selectedMinto);mgr_stmin=appConstants.builderJson.selectedFields.selectedStartMin;mgr_enmin=appConstants.builderJson.selectedFields.selectedEndMin;if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");
}if(!hideBackButton){var a=appConstants.builderJson.combo["ID"];var h=a.split("&");var o="";for(var D in h){var B=h[D];if(B.trim().length>0&&B.indexOf("=")>-1){if(o.length>0){o+="&";}var l=B.substring(0,B.indexOf("="));var x=B.substring(B.indexOf("=")+1);o+=l+"="+decodeURIComponent(x);}}Ext.getCmp("templateform").add({xtype:"hidden",id:"ID",name:"ID",value:o});
}}else{if(appConstants.method=="optionchange"){this.loadComboField("er_site","siteCombo","labelSiteCombo","selectedSiteCombo",appConstants.builderJson,false,null,true);this.loadComboField("er_subZone","subZoneCombo","labelSubZoneCombo","selectedSubZoneCombo",appConstants.builderJson,false,null,false);
if(appConstants.isRemoveAllComponents!=undefined&&appConstants.isRemoveAllComponents=="true"){this.loadComboField("er_component","componentCombo","labelComponentDropDownCombo","selectedComponentCombo",appConstants.builderJson,false,null,true);}else{this.loadComboField("er_component","componentCombo","labelComponentCombo","selectedComponentCombo",appConstants.builderJson,true,"compmultipane",true);
}this.loadComboField("er_test","testCombo",null,"selectedTestCombo",appConstants.builderJson,false,null,false);if(appConstants.isMultiMeasureSupport=="yes"){this.loadComboField("er_measure","measureCombo",null,"selectedMeasureCombo",appConstants.builderJson,true,"measmultipane",false);}else{this.loadComboField("er_measure","measureCombo",null,"selectedMeasureCombo",appConstants.builderJson,false,null,false);
}if(appConstants.isMultiCompType=="true"){this.loadComboField(appConstants.erCompType,"componentTypeCombo",null,"selectedComponentTypeCombo",appConstants.builderJson,true,"compTypeMultiPane",false);}else{this.loadComboField(appConstants.erCompType,"componentTypeCombo",null,"selectedComponentTypeCombo",appConstants.builderJson,false,null,false);
}if(appConstants.isMultiInfo=="true"){this.loadComboField(appConstants.erInfo,"infoCombo",null,"selectedInfoCombo",appConstants.builderJson,true,"infomultipane",false);}else{this.loadComboField(appConstants.erInfo,"infoCombo",null,"selectedInfoCombo",appConstants.builderJson,false,null,false);}}else{if(appConstants.method=="comptypechange"){if(this.reqFromCompChange=="no"){if(appConstants.isRemoveAllComponents!=undefined&&appConstants.isRemoveAllComponents=="true"){this.loadComboField("er_component","componentCombo","labelComponentDropDownCombo","selectedComponentCombo",appConstants.builderJson,false,null,true);
}else{this.loadComboField("er_component","componentCombo","labelComponentCombo","selectedComponentCombo",appConstants.builderJson,true,"compmultipane",true);}}this.loadComboField("er_test","testCombo",null,"selectedTestCombo",appConstants.builderJson,false,null,false);if(appConstants.isMultiMeasureSupport=="yes"){this.loadComboField("er_measure","measureCombo",null,"selectedMeasureCombo",appConstants.builderJson,true,"measmultipane",false);
}else{this.loadComboField("er_measure","measureCombo",null,"selectedMeasureCombo",appConstants.builderJson,false,null,false);}if(appConstants.isMultiInfo=="true"){this.loadComboField(appConstants.erInfo,"infoCombo",null,"selectedInfoCombo",appConstants.builderJson,true,"infomultipane",false);}else{this.loadComboField(appConstants.erInfo,"infoCombo",null,"selectedInfoCombo",appConstants.builderJson,false,null,false);
}if(appConstants.builderJson.selectedFields.enableInfoBy=="true"){this.loadComboField("infoBy","infoByCombo",null,"selectedInfoBy",appConstants.builderJson,false,null,false);}else{Ext.getCmp("infoBy").hide();}this.loadComboField("groupBy_list","groupByCombo",null,"",appConstants.builderJson,true,null,false);
}else{if(appConstants.method=="testchange"){if(appConstants.isMultiMeasureSupport=="yes"){this.loadComboField("er_measure","measureCombo",null,"selectedMeasureCombo",appConstants.builderJson,true,"measmultipane",false);}else{this.loadComboField("er_measure","measureCombo",null,"selectedMeasureCombo",appConstants.builderJson,false,null,false);
}if(appConstants.isMultiInfo=="true"){this.loadComboField(appConstants.erInfo,"infoCombo",null,"selectedInfoCombo",appConstants.builderJson,true,"infomultipane",false);}else{this.loadComboField(appConstants.erInfo,"infoCombo",null,"selectedInfoCombo",appConstants.builderJson,false,null,false);}}else{if(appConstants.method=="measurechange"){if(appConstants.isMultiInfo=="true"){this.loadComboField(appConstants.erInfo,"infoCombo",null,"selectedInfoCombo",appConstants.builderJson,true,"infomultipane",false);
}else{this.loadComboField(appConstants.erInfo,"infoCombo",null,"selectedInfoCombo",appConstants.builderJson,false,null,false);}}else{if(appConstants.method=="sitechange"){if(appConstants.isRemoveAllComponents!=undefined&&appConstants.isRemoveAllComponents=="true"){this.loadComboField("er_component","componentCombo","labelComponentDropDownCombo","selectedComponentCombo",appConstants.builderJson,false,null,true);
}else{this.loadComboField("er_component","componentCombo","labelComponentCombo","selectedComponentCombo",appConstants.builderJson,true,"compmultipane",true);}this.loadComboField("er_test","testCombo",null,"selectedTestCombo",appConstants.builderJson,false,null,false);if(appConstants.isMultiMeasureSupport=="yes"){this.loadComboField("er_measure","measureCombo",null,"selectedMeasureCombo",appConstants.builderJson,true,"measmultipane",false);
}else{this.loadComboField("er_measure","measureCombo",null,"selectedMeasureCombo",appConstants.builderJson,false,null,false);}if(appConstants.isMultiCompType=="true"){this.loadComboField(appConstants.erCompType,"componentTypeCombo",null,"selectedComponentTypeCombo",appConstants.builderJson,true,"compTypeMultiPane",false);
}else{this.loadComboField(appConstants.erCompType,"componentTypeCombo",null,"selectedComponentTypeCombo",appConstants.builderJson,false,null,false);}if(appConstants.isMultiInfo=="true"){this.loadComboField(appConstants.erInfo,"infoCombo",null,"selectedInfoCombo",appConstants.builderJson,true,"infomultipane",false);
}else{this.loadComboField(appConstants.erInfo,"infoCombo",null,"selectedInfoCombo",appConstants.builderJson,false,null,false);}}else{if(appConstants.method=="submit"){if(appConstants.isCustomLayout=="yes"){}else{this.executeSingleLayout();}}else{}}}}}}}if(appConstants.isSoringColEnable){Ext.getCmp("er_sortingColumn").show();
}else{Ext.getCmp("er_sortingColumn").hide();}if(appConstants.isSubmit!=null&&appConstants.isSubmit=="true"){appConstants.isSubmit="false";this.beforeSubmit(Ext.getCmp("submit"),true);}initLdgMask.hide();if(appConstants.hideInputs=="true"){this.hideComboField();}if(Ext.getCmp("showLegend")!=undefined){if(appConstants.isshowLegend=="true"||appConstants.isshowLegend==true){Ext.getCmp("showLegend").setValue(true);
}}},executeWidgetLayout:function(z,x){var E=false;if(neeedEditableHeader=="yes"){E=true;}var I=false;I=!E;var t=this;var b=Ext.getCmp("resultcontainer");if(appConstants.builderJson.data.hasOwnProperty("widgetCollection")){if(z==true){Ext.getCmp("templateFormItms").show();Ext.getCmp("panelinsidetoggle").show();
Ext.getCmp("panelinsidetoggle").setDisabled(false);}var U=appConstants.builderJson.data.widgetCollection;var F=appConstants.builderJson.needNoMeasure;if(!Ext.isEmpty(U)){for(var K in U){var d=U[K];var c=d.testCollection;var q;var A=new Array();var H=[];var G="";var W=d.widgetId+"_detail";var T="",m="",L="";
var s=true,n=true,C=true;var R=false;var O=true;L="/final/reporter/ErPrintReportBuilder.jsp?"+this.getQueryString(false)+"&graphIndex="+0+"&widgetIdInfo="+W+"&pdfPrint=yes&pdfprint=yes";m="/final/reporter/ErPrintReportBuilder.jsp?"+this.getQueryString(false)+"&graphIndex="+0+"&widgetIdInfo="+W+"&option=csv";
var a=document.getElementById("main").offsetWidth;var u=document.getElementById("main").offsetHeight;var g=u*0.15;var h=((a)/12);h=h*d.size_x;var M=d.size_y*g;M=Ext.util.Format.round(M,0);var Q="5 20 0 10";var B="0 0 10 0";if(widgetCount%2==0){}B="0 10 10 0";if(x){B="0 2 10 0";}else{B="0 10 10 0";}var l="fit";
widgetCount=widgetCount+1;var p=appConstants.templateName+"$~$"+d.widgetId+"$~$"+"footerDescription";var e=appConstants.templateName+"$~$"+d.widgetId+"$~$"+"headerDescription";var i=false;var r="";for(var j in c){var N=c[j];var S=N.measureCollection;if(S!=undefined&&S.length>0){for(var o in S){q=S[o];
if(q.hasOwnProperty("timelineChartCollection")){s=false;n=false;C=false;G="timeline";customPaging=false;H=q.timelineChartCollection;if(H!=undefined&&H.length>0){if(H[0].needMaximize!=undefined&&H[0].needMaximize=="no"){s=true;}T=timelineurl+"&graphIndex="+0+"&widgetIdInfo="+W+"&isDDEnabled="+H[0].isDDEnabled+"&dd_Url="+encodeURIComponent(H[0].dd_Url);
}else{continue;}}else{if(q.hasOwnProperty("heatMapChartCollection")){s=false;G="heatMap";chartTypeCollection="heatMapChartCollection";customPaging=false;H=q.heatMapChartCollection;if(H!=undefined&&H.length>0){if(H[0].needMaximize!=undefined&&H[0].needMaximize=="no"){s=true;}T=timelineurl+"&graphIndex="+0+"&widgetIdInfo="+W+"&isDDEnabled="+H[0].isDDEnabled+"&dd_Url="+encodeURIComponent(H[0].dd_Url);
}else{continue;}}else{if(q.hasOwnProperty("barChartCollection")){s=false;G="bar";customPaging=false;if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}H=q.barChartCollection;if(H!=undefined&&H.length>0){if(H[0].needMaximize!=undefined&&H[0].needMaximize=="no"){s=true;}T=timelineurl+"&graphIndex="+0+"&widgetIdInfo="+W+"&isDDEnabled="+H[0].isDDEnabled+"&dd_Url="+encodeURIComponent(H[0].dd_Url);
}else{continue;}}else{if(q.hasOwnProperty("stackedBarChartCollection")){s=false;G="stackedbar";customPaging=false;if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}H=q.stackedBarChartCollection;if(H!=undefined&&H.length>0){if(H[0].needMaximize!=undefined&&H[0].needMaximize=="no"){s=true;
}T=timelineurl+"&graphIndex="+0+"&widgetIdInfo="+W+"&isDDEnabled="+H[0].isDDEnabled+"&dd_Url="+encodeURIComponent(H[0].dd_Url);}else{continue;}}else{if(q.hasOwnProperty("distributedPieChartCollection")){G="distpie";customPaging=false;if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");
}H=q.distributedPieChartCollection;if(H==undefined||H.length==0){continue;}}else{if(q.hasOwnProperty("distributionChartCollection")){G="pie";customPaging=false;if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}H=q.distributionChartCollection;if(H==undefined||H.length==0){continue;
}}else{if(q.hasOwnProperty("gridCollection")){G="table";if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}H=q.gridCollection;customPagingHeight=M;if(H==undefined||H.length==0){continue;}if(H!=undefined&&H[0]!=undefined){if(H[0].gridData!=undefined&&H[0].gridData.length>0){M="";
}}r=H[0].otherInfo;if(r!=undefined){var f=parseInt(r["dataPageNo"]);var w=r["isRangeNeed"];if(w!="true"&&f==1){customPaging=false;}else{customPaging=true;}}}else{if(q.hasOwnProperty("topnCollection")){G="topn";customPaging=false;if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");
}H=q.topnCollection;if(H==undefined||H.length==0){continue;}}else{if(q.hasOwnProperty("digitalCollection")){G="digital";customPaging=false;O=false;M=130;if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}H=q.digitalCollection;if(H==undefined||H.length==0){continue;}}}}}}}}}}if(G=="table"||G=="topn"){Q="10";
}if(G=="digital"){Q="0";}if(G=="digital"){var v=new Array();for(var V in H){var J=H[V];var D=J.unit==undefined?"":J.unit;v.push({xtype:"container",align:"center",autoSize:true,layout:{type:"table",columns:1,align:"center",tableAttrs:{style:{align:"center",margin:"auto auto"}},tdAttrs:{style:{textAlign:"center"}}},defaults:{bodyStyle:"padding:5px",align:"center",},items:[{html:'<table align="center"><tr><td align="right" style="padding-right:5px"><div class="'+J.imageCls+'" ></div></td><td style="text-align:left;padding-left:5px" class="newFont_bold33" >'+J.value+'<span class="newFont_normal13>'+D+"</span></td></tr></table>",width:"100%",style:{textAlign:"center",width:"50px"}},{html:'<span class="newFont_normal13">'+J.DisplayName+"</span>",}]});
i=true;}var y={xtype:"container",padding:"0 0 0 0",margin:0,scroll:false,autoScroll:true,flex:1,layout:{type:"hbox",align:"center"},defaults:{minWidth:180,margin:0,flex:1,layout:{type:"column",align:"center",},},items:v,};A.push(y);O=true;}else{A.push(this.loadWidgetData(d.widgetId+"_panel",H[0],W,G,h,M-5));
i=true;}}}}if(i){b.add({xtype:"panel",id:d.widgetId+"_panel",closeAction:"destroy",ui:"newGraphPanel",title:'<table cellpadding="0" cellspacing="0" border="0"><tr><td class="newFont_bold14">'+d.widgetHeader+'</td><td id ="iconRename" style="float:left;margin-left:20px;" class="'+iconRenameWidget+'"></td></tr></table>',margin:B,height:M,scroll:false,bodyPadding:Q,layout:l,align:"stretch",autoScroll:true,overflowX:"hidden",overflowY:"auto",columnWidth:h/a,header:{hidden:!O,},tools:[this.addToolBarItems([{xtype:"button",width:16,height:16,margin:"0 3 0 3",style:{"border":"0px"},cls:"iconCsvWidget",hidden:n,handler:function(){window.location=m;
}},{xtype:"button",cls:"iconDataWidget",style:{"border":"0px"},width:16,height:16,margin:"0 3 0 3",hidden:C,handler:function(){parent.printWindowFn(L);}},{xtype:"button",width:16,height:16,margin:"0 0 0 3",style:{"border":"0px"},cls:"iconMaximize",hidden:s,handler:function(){parent.maximizeWindowLightBox(T);
}}])],dockedItems:[{xtype:"toolbar",dock:"bottom",align:"stretch",overCls:"reporterTemplateWidgetToolbarOver",layout:"fit",hidden:I,cls:"reporterTemplateWidgetToolbar",height:42,items:[{xtype:"container",layout:{type:"hbox",align:"middle"},items:[{xtype:"button",width:16,height:16,padding:0,margin:"8 4 8 10",id:"widgetDescriptor"+d.widgetId,cls:"iconDescription",listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"Widget Descriptor"});
}}},{xtype:"label",id:p,text:d.widgetFooter,margin:"5 10 5 5",flex:1,cls:"handSymbol",listeners:{afterrender:function(k){k.el.on("click",this.onEdit,this);},},onEdit:function(Y,k,Z){var X=this;if(!X.editor){X.editor=Ext.create("Ext.Editor",{updateEl:true,completeOnEnter:true,cancelOnEsc:true,floating:false,alignment:"tl",autoSize:{width:"boundEl",height:"21"},hideEl:false,offsets:[0,-2],field:{xtype:"textfield",cls:"textbox",},listeners:{complete:{fn:function(ac,af,ab,ae){var ad="/final/reporter/ReportBuilderController.jsp";
var aa=appConstants.appObj.getController(appConstants.appController);var ag="&widgetHeaderFooterInfo="+Ext.encode(af);ag+="&method=setWidgetHeaderFooter";ag+="&isCustomLayout="+appConstants.isCustomLayout;ag+="&templateName="+appConstants.templateName;ag+="&idDescription="+p;aa.callAjax(ad,ag,false,true,true);
},scope:X,}}});}X.editor.startEdit(k);}},]}]}],listeners:{boxready:function(X){if(!Ext.isEmpty(X.header)){var k=Ext.get(X.header.id+"_hd-textEl");if(E){Ext.get(X.header.id).on("click",function(ab,aa){var Z=k.dom.innerText;var Y=new Ext.Editor({width:150,alignment:"tl",floating:false,shadow:false,updateEl:true,completeOnEnter:true,cancelOnEsc:true,offsets:[0,-3],field:{xtype:"textfield",cls:"textbox",maxLength:32,allowBlank:false,enforceMaxLength:true},listeners:{"complete":function(ah,ag,ad,af){k.dom.innerHTML=ag;
k.dom.innerHTML='<table cellpadding="0" cellspacing="0" border="0"><tr><td class="newFont_bold14">'+ag+'</td><td id ="iconRename" style="float:left;margin-left:20px;" class="'+iconRenameWidget+'"></td></tr></table>';var ae="/final/reporter/ReportBuilderController.jsp";var ac=appConstants.appObj.getController(appConstants.appController);
var ai="&widgetHeaderFooterInfo="+Ext.encode(ag);ai+="&method=setWidgetHeaderFooter";ai+="&templateName="+appConstants.templateName;ai+="&isCustomLayout="+appConstants.isCustomLayout;ai+="&fromReportBuilder="+appConstants.fromReportBuilder;ai+="&idDescription="+e;ac.callAjax(ae,ai,false,true,true);}}});
Y.startEdit(k,Z);},X,{delegate:"#"+X.header.id+"_hd-textEl"});}}},"afterRender":function(X){if(G!=undefined&&G=="table"){var k=Ext.get(d.widgetId+"_panel");k.on("click",function(Z,ag,ai){var ac=ag.textContent;if(ac!=undefined&&ac.indexOf("$")!=-1){ac=ac.substring(ac.indexOf("$")+1);}var aa;var ad="method=submit";
var ae=Ext.getCmp("er_site");var ab="yes";if(appConstants.templateName!=undefined&&appConstants.templateName=="GPU Overview"){aa="/final/reporter/ReportBuilder.jsp?";ad="method=submit&recordInfo="+encodeURIComponent('{"templateName":"GPU Details"}');ad+="&isSubmit=true";if(!ae.isHidden()){ad+="&er_site="+ae.getValue();
if(Ext.getCmp("er_option").getValue()=="Zone"){ad+="&er_subZone="+Ext.getCmp("er_subZone").getValue();}}}else{if(appConstants.templateName!=undefined&&appConstants.templateName=="User Idle Reports"){aa="/final/reporter/ErThinClientUserReport.jsp?fromMenuBar=true&er_trgttype=User Session Report&";ad+="&isForceSubmit=true";
ad+="&er_user="+encodeURIComponent(ac);ad+="&er_RmDispName="+encodeURIComponent("User Session Details");ad+="&fromReportBuilder=yes";if(!ae.isHidden()){ad+="&select_farm="+ae.getValue();if(Ext.getCmp("er_option").getValue()=="Zone"){ad+="&er_subZone="+Ext.getCmp("er_subZone").getValue();}}ab="no";}}ad+="&hideInputs=false";
ad+="&er_option="+Ext.getCmp("er_option").getValue();ad+="&er_compType="+Ext.getCmp(appConstants.erCompType).getValue();if(Ext.getCmp("showLegend")!="undefined"&&Ext.getCmp("showLegend")!=undefined){ad+="&showLegendsEnable="+Ext.getCmp("showLegend").getValue();}if(appConstants.isRemoveAllComponents!=undefined&&appConstants.isRemoveAllComponents=="true"){ad+="&er_component="+Ext.getCmp("er_component").getValue();
}else{var af=new Array();af=Ext.getCmp("er_component").getValue();for(var ah in af){if(ab=="yes"){if(af[ah].indexOf(ac)!=-1){ad+="&er_component="+af[ah];}if(af[ah]=="All"){if(ac.indexOf(":")!=-1){ad+="&er_component="+ac+":"+Ext.getCmp(appConstants.erCompType).getValue();}else{ad+="&er_component="+ac+":NULL:"+Ext.getCmp(appConstants.erCompType).getValue();
}}}else{if(ab=="no"){ad+="&er_componentserver="+af[ah];ad+="&select_server1="+af[ah];}}}}ad+="&er_test="+Ext.getCmp("er_test").getValue();if(appConstants.isMultiMeasureSupport=="yes"){var af=new Array();af=Ext.getCmp("er_measure").getValue();for(var ah in af){var Y=af[ah];Y=Y.replace("(","EGOPENBRACE");
Y=Y.replace(")","EGCLOSEBRACE");ad+="&er_measure="+Y;}}else{var Y=Ext.getCmp("er_measure").getValue();Y=Y.replace("(","EGOPENBRACE");Y=Y.replace(")","EGCLOSEBRACE");ad+="&er_measure="+Y;}if(Ext.getCmp(appConstants.erInfo).getValue()!=undefined){ad+="&er_info="+Ext.getCmp(appConstants.erInfo).getValue();
}ad+="&er_timeline="+Ext.getCmp("er_timeline").getValue();ad+="&er_stdate="+Ext.getCmp("er_stdate").dataArray;ad+="&startdate="+Ext.getCmp("er_stdate").dataArray;ad+="&er_enddate="+Ext.getCmp("er_enddate").dataArray;ad+="&enddate="+Ext.getCmp("er_enddate").dataArray;ad+="&er_sthr="+Ext.getCmp("er_sthr").dataArray;
ad+="&starthr="+Ext.getCmp("er_sthr").dataArray;ad+="&er_endhr="+Ext.getCmp("er_endhr").dataArray;ad+="&endhr="+Ext.getCmp("er_endhr").dataArray;ad+="&startmin="+mgr_stmin+"&endmin="+mgr_enmin+"&er_secs=00";ad+="&er_stmin="+mgr_stmin+"&er_endmin="+mgr_enmin;ad+="&timefrom="+Ext.getCmp("timefrom").getValue();
ad+="&timeto="+Ext.getCmp("timeto").getValue();ad+="&minfrom="+Ext.getCmp("minfrom").getValue();ad+="&minto="+Ext.getCmp("minto").getValue();ad+="&er_reportgenration="+Ext.getCmp("reportGeneration").getValue();ad+="&er_excwe="+Ext.getCmp("er_excwe").getValue();ad+="&pct_idle="+Ext.getCmp("pct_idle").getValue();
ad+="&sorted_col="+Ext.getCmp("groupBy_list").getValue();ad+="&aggregate_server="+Ext.getCmp("aggregate_server").getValue();ad+="&er_showBy="+Ext.getCmp("er_showBy").getValue();ad+="&timeline_showBy="+Ext.getCmp("timeline_showBy").getValue();ad+="&bar_showBy="+Ext.getCmp("bar_showBy").getValue();if(appConstants.isCustomLayout=="yes"){ad+="&er_top="+Ext.getCmp("er_top").getValue();
}else{ad+="&chartInfo="+appConstants.chartInfo;ad+="&er_top="+Ext.getCmp("er_top").getValue();}ad+="&fromReportBuilder="+appConstants.fromReportBuilder;ad+="&enableBack=true";linkURL(aa+ad);},this,{delegate:".forCursorSymbol",});}}},items:A,});if(r!=""&&r!=undefined){var P=Ext.getCmp("customgridId"+d.widgetId+"_panel");
if(fromPerBtn){P.getStore().loadPage(activePage);}this.loadOverAllPageNavigation("pageingTool"+d.widgetId+"_panel",r,"customPageinationId"+d.widgetId+"_panel");fromPerBtn=false;}}else{if(F=="no"){continue;}if(G!=undefined&&G=="table"){M=customPagingHeight;}A.push({xtype:"container",margin:-10,html:'<div class="egFlexCenterByColumnWise" style="height:100%"> <div class="iconInformation"></div> <div class="commonErrorMsgText">No Measures Available!</div> </div>'});
b.add({xtype:"panel",id:d.widgetId+"_panel",closeAction:"destroy",ui:"newGraphPanel",title:'<table cellpadding="0" cellspacing="0" border="0"><tr><td class="newFont_bold14">'+d.widgetHeader+'</td><td id ="iconRename" style="float:left;margin-left:20px;" class="'+iconRenameWidget+'"></td></tr></table>',margin:B,height:M,scroll:false,bodyPadding:Q,layout:"fit",align:"stretch",columnWidth:h/a,dockedItems:[{xtype:"toolbar",dock:"bottom",align:"stretch",hidden:I,layout:"fit",overCls:"reporterTemplateWidgetToolbarOver",cls:"reporterTemplateWidgetToolbar",height:42,items:[{xtype:"container",layout:{type:"hbox",align:"middle"},items:[{xtype:"button",width:16,height:16,padding:0,margin:"8 4 8 10",id:"widgetDescriptor"+d.widgetId,cls:"iconDescription",listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"Widget Descriptor"});
}}},{xtype:"label",id:p,text:d.widgetFooter,margin:"5 10 5 5",flex:1,cls:"handSymbol",listeners:{afterrender:function(k){k.el.on("click",this.onEdit,this);},},onEdit:function(Y,k,Z){var X=this;if(!X.editor){X.editor=Ext.create("Ext.Editor",{updateEl:true,completeOnEnter:true,cancelOnEsc:true,floating:false,alignment:"tl",autoSize:{width:"boundEl",height:"21"},hideEl:false,offsets:[0,-2],field:{xtype:"textfield",cls:"textbox",},listeners:{complete:{fn:function(ac,af,ab,ae){var ad="/final/reporter/ReportBuilderController.jsp";
var aa=appConstants.appObj.getController(appConstants.appController);var ag="&widgetHeaderFooterInfo="+Ext.encode(af);ag+="&method=setWidgetHeaderFooter";ag+="&isCustomLayout="+appConstants.isCustomLayout;ag+="&templateName="+appConstants.templateName;ag+="&idDescription="+p;aa.callAjax(ad,ag,false,true,true);
},scope:X,}}});}X.editor.startEdit(k);}},]}]}],listeners:{boxready:function(X){if(!Ext.isEmpty(X.header)){var k=Ext.get(X.header.id+"_hd-textEl");if(E){Ext.get(X.header.id).on("click",function(ab,aa){var Z=k.dom.innerText;var Y=new Ext.Editor({width:150,alignment:"tl",floating:false,shadow:false,updateEl:true,completeOnEnter:true,cancelOnEsc:true,offsets:[0,-3],field:{xtype:"textfield",cls:"textbox",maxLength:32,allowBlank:false,enforceMaxLength:true},listeners:{"complete":function(ah,ag,ad,af){k.dom.innerHTML=ag;
k.dom.innerHTML='<table cellpadding="0" cellspacing="0" border="0"><tr><td class="newFont_bold14">'+ag+'</td><td id ="iconRename" style="float:left;margin-left:20px;" class="'+iconRenameWidget+'"></td></tr></table>';var ae="/final/reporter/ReportBuilderController.jsp";var ac=appConstants.appObj.getController(appConstants.appController);
var ai="&widgetHeaderFooterInfo="+Ext.encode(ag);ai+="&method=setWidgetHeaderFooter";ai+="&templateName="+appConstants.templateName;ai+="&isCustomLayout="+appConstants.isCustomLayout;ai+="&fromReportBuilder="+appConstants.fromReportBuilder;ai+="&idDescription="+e;ac.callAjax(ae,ai,false,true,true);}}});
Y.startEdit(k,Z);},X,{delegate:"#"+X.header.id+"_hd-textEl"});}}}},items:A});}}if(z==true){Ext.getCmp("selectionDetails").setSelectionDetailsData(appConstants.builderJson.selectionDetails);}}else{if(F!="no"){b.add(this.getNoMeasure());}}}else{if(F!="no"){b.add(this.getNoMeasure());}}b.doLayout();b.doComponentLayout();
},executeWidgetLayout_gridster:function(d){if(Ext.isEmpty(this.getWidgetLayoutPane())){this.getMain().add({xtype:"gridster"});}if(appConstants.builderJson.data.hasOwnProperty("widgetCollection")){var f=appConstants.builderJson.data.widgetCollection;if(!Ext.isEmpty(f)){for(var e in f){var h=f[e];var j=h.testCollection;
for(var g in j){var b=j[g];var c=b.measureCollection;for(var a in c){var i=c[a];Ext.getCmp("widgetLayoutPane").addWidget(h.widgetHeader,h.widgetFooter,h.size_x,h.size_y,h.x,h.y,i,"iconConfigUser",h.widgetId+"_detail");}}}}}if(d==true){Ext.getCmp("selectionDetails").setSelectionDetailsData(appConstants.builderJson.selectionDetails);
}},executeSingleLayout:function(){var w=false;if(neeedEditableHeader=="yes"){w=true;}var b=Ext.getCmp("resultcontainer");if(!Ext.isEmpty(appConstants.builderJson.data)&&appConstants.builderJson.data.hasOwnProperty("measureCollection")){b.removeAll();var G=appConstants.builderJson.data.measureCollection;
var I=appConstants.builderJson.data.headerDescription;var r=appConstants.builderJson.data.widgetHeader;if(!Ext.isEmpty(G)){var g="testWise";for(var i in G){var n=G[i];var L="widget";var o=true,h=true,v=true;var y;var x="";var f="";if(n.hasOwnProperty("timelineChartCollection")){o=false;h=false;v=false;
x="timeline";f="timelineChartCollection";y=n.timelineChartCollection;}else{if(n.hasOwnProperty("heatMapChartCollection")){o=false;x="heatMap";f="heatMapChartCollection";y=n.heatMapChartCollection;}else{if(n.hasOwnProperty("barChartCollection")){o=false;x="bar";f="barChartCollection";if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");
}y=n.barChartCollection;}else{if(n.hasOwnProperty("stackedBarChartCollection")){o=false;f="stackedBarChartCollection";x="stackedbar";if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}y=n.stackedBarChartCollection;}else{if(n.hasOwnProperty("distributedPieChartCollection")){x="distpie";
f="distributedPieChartCollection";if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}y=n.distributedPieChartCollection;}else{if(n.hasOwnProperty("distributionChartCollection")){x="pie";f="distributionChartCollection";if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");
}y=n.distributionChartCollection;}else{if(n.hasOwnProperty("gridCollection")){x="table";f="gridCollection";if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}y=n.gridCollection;}else{if(n.hasOwnProperty("topnCollection")){x="topn";f="topnCollection";if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");
}y=n.topnCollection;}else{if(n.hasOwnProperty("digitalCollection")){x="digital";f="digitalCollection";if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}y=n.digitalCollection;}}}}}}}}}if(!appConstants.needToolOption){o=true;h=true;v=true;}this.enableDisableTools(false);
if(y instanceof Array){var H=1;if(y.length>1){H=0.5;}widgetCount=1;if(!Ext.isEmpty(y)){var a=document.getElementById("main").offsetWidth;var p=document.getElementById("main").offsetHeight;var d=p*0.15;var e=((a)/12);e=Ext.util.Format.round(e,0);e=e*12;if(x=="digital"){var q=new Array();var u=1;for(var J in y){var A=y[J];
var E="solid";if(u%5==0||y.length-1==J){E="0px";}u++;var C='<div style="height:100%;width:100%;display:table"><div style="text-align:center;margin-top:40px;vertical-align:middle;display:table-cell"><h1 style="line-height:90px;font-family:digital-7regular;font-size:70px;font-weight:normal;color:#35c8c2" class="count">'+A.value+"</h1><div>"+A.DisplayName+"</div><div>";
if(A.unit!=null&&A.unit!=""){C=C+A.unit+"</div></div></div>";}else{C=C+"</div></div></div>";}q.push({xtype:"container",align:"center",autoSize:true,border:true,margin:"10 0 10 0",padding:10,columnWidth:0.2,style:{"border-right":E,"border-color":"#303030",},layout:"fit",items:[{html:C}]});}b.add({xtype:"panel",layout:"column",columnWidth:1,items:q,});
}else{for(var J in y){var A=y[J];var B=3*d;if(y.length==1){B=4*d;}B=Ext.util.Format.round(B,0);var D="5 20 0 10";if(x=="table"||x=="topn"){D="10";}var t="0 10 10 0";if(widgetCount%2==0){t="0 2 10 0";}if(x=="pie"){A.title=A.chartTitle;}var s=new Array();s.push(this.loadWidgetData(L+J+"_panel",A,L,x,e,B));
var l=appConstants.templateName+"$~$widget$~$"+"footerDescription";if(A.title==""||A.title==" "||A.title=="title"){A.title=r;}B=B+20;if(x=="table"){B="";}if(A.columnWidth!=undefined&&A.columnWidth=="full"){H=1;t="0 2 10 0";widgetCount=0;}else{if(y.length>1){H=0.5;}}b.add({xtype:"panel",id:L+J+"_panel",closeAction:"destroy",ui:"newGraphPanel",title:'<table cellpadding="0" cellspacing="0" border="0"><tr><td class="newFont_bold14">'+A.title+'</td><td id ="iconRename" style="float:left;margin-left:20px;" class="'+iconRenameWidget+'"></td></tr></table>',margin:t,height:B,scroll:false,bodyPadding:D,layout:"fit",align:"stretch",autoScroll:true,overflowX:"hidden",overflowY:"auto",chartCollectionVal:A,graphIndex:J,columnWidth:H,chartType:x,chartTypeCollection:f,tools:[this.addToolBarItems([{xtype:"button",width:16,height:16,margin:"0 3 0 3",style:{"border":"0px"},cls:"iconCsvWidget",hidden:h,handler:function(){var M=this.up("panel");
var N=appConstants.appObj.getController(appConstants.appController);var k="/final/reporter/ErPrintReportBuilder.jsp?"+N.getQueryString(false)+"&graphIndex="+M.graphIndex+"&widgetIdInfo="+L+"&option=csv";window.location=k;}},{xtype:"button",cls:"iconDataWidget",style:{"border":"0px"},width:16,height:16,margin:"0 3 0 3",hidden:v,handler:function(){var k=this.up("panel");
var M=appConstants.appObj.getController(appConstants.appController);var N="/final/reporter/ErPrintReportBuilder.jsp?"+M.getQueryString(false)+"&graphIndex="+k.graphIndex+"&widgetIdInfo="+L+"&pdfPrint=yes&pdfprint=yes";parent.printWindowFn(N);}},{xtype:"button",width:16,height:16,margin:"0 0 0 3",style:{"border":"0px"},cls:"iconMaximizeWidget",hidden:o,handler:function(){var k=this.up("panel");
var M=timelineurl+"&graphIndex="+k.graphIndex+"&widgetIdInfo="+L+"&isDDEnabled="+k.chartCollectionVal.isDDEnabled+"&dd_Url="+k.chartCollectionVal.dd_Url;parent.maximizeWindowLightBox(M);}}])],dockedItems:[{xtype:"toolbar",dock:"bottom",align:"stretch",layout:"fit",overCls:"reporterTemplateWidgetToolbarOver",cls:"reporterTemplateWidgetToolbar",hidden:!w,height:42,items:[{xtype:"container",layout:{type:"hbox",align:"middle"},items:[{xtype:"button",width:16,height:16,padding:0,margin:"8 4 8 10",id:"widgetDescriptor"+L+J,cls:"iconDescription",listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"Widget Descriptor"});
}}},{xtype:"label",id:l+J,text:appConstants.builderJson.data.widgetFooter,margin:"5 10 5 5",flex:1,cls:"handSymbol",listeners:{afterrender:function(k){k.el.on("click",this.onEdit,this);},},onEdit:function(N,k,O){var M=this;if(!M.editor){M.editor=Ext.create("Ext.Editor",{updateEl:true,completeOnEnter:true,cancelOnEsc:true,floating:false,alignment:"tl",autoSize:{width:"boundEl",height:"21"},hideEl:false,offsets:[0,-2],field:{xtype:"textfield",cls:"textbox",},listeners:{complete:{fn:function(R,V,Q,U){var S="/final/reporter/ReportBuilderController.jsp";
var P=appConstants.appObj.getController(appConstants.appController);var T=this.up("panel");var W="&widgetHeaderFooterInfo="+Ext.encode(V);W+="&isCustomLayout="+appConstants.isCustomLayout;W+="&method=graphHeaderFooter";W+="&templateName="+appConstants.templateName;W+="&chartType="+T.chartType;W+="&chartTypeCollection="+T.chartTypeCollection;
W+="&idDescription=footer$~$"+T.graphIndex;P.callAjax(S,W,false,true,true);},scope:M,}}});}M.editor.startEdit(k);}},]}]}],listeners:{boxready:function(M){if(!Ext.isEmpty(M.header)){var k=Ext.get(M.header.id+"_hd-textEl");if(w){Ext.get(M.header.id).on("click",function(Q,P){var O=k.dom.innerText;var N=new Ext.Editor({width:150,alignment:"tl",floating:false,shadow:false,updateEl:true,completeOnEnter:true,cancelOnEsc:true,hideEl:true,offsets:[0,-3],field:{xtype:"textfield",cls:"textbox",maxLength:32,allowBlank:false,enforceMaxLength:true},listeners:{"complete":function(X,W,S,U){k.dom.innerHTML=W;
k.dom.innerHTML='<table cellpadding="0" cellspacing="0" border="0"><tr><td class="newFont_bold14">'+W+'</td><td id ="iconRename" style="float:left;margin-left:20px;" class="'+iconRenameWidget+'"></td></tr></table>';var T="/final/reporter/ReportBuilderController.jsp";var R=appConstants.appObj.getController(appConstants.appController);
var V=M;var Y="&widgetHeaderFooterInfo="+Ext.encode(W);Y+="&isCustomLayout="+appConstants.isCustomLayout;Y+="&method=graphHeaderFooter";Y+="&templateName="+appConstants.templateName;Y+="&fromReportBuilder="+appConstants.fromReportBuilder;Y+="&idDescription=header$~$"+V.graphIndex;Y+="&chartType="+V.chartType;
Y+="&chartTypeCollection="+V.chartTypeCollection;R.callAjax(T,Y,false,true,true);}}});N.startEdit(k,O);},M,{delegate:"#"+M.header.id+"_hd-textEl"});}}}},items:s});widgetCount=widgetCount+1;}}}else{b.add(this.getNoMeasureWithoutBorderNew());}}else{g="componentWise";for(var F in y){widgetCount=1;chartCollectionComp=y[F];
var m=F;var z=new Array();if(chartCollectionComp instanceof Array){var H=1;if(chartCollectionComp.length>1){H=0.5;}for(var J in chartCollectionComp){var c=chartCollectionComp[J];var a=document.getElementById("main").offsetWidth;var p=document.getElementById("main").offsetHeight;var d=p*0.15;var e=((a)/12);
e=Ext.util.Format.round(e,0);e=e*12;var B=3*d;B=Ext.util.Format.round(B,0);var D="5 20 0 10";var t="0 10 10 0";if(widgetCount%2==0){t="0 10 10 0";}B=350;widgetCount=widgetCount+1;var s=new Array();F=replaceAll(F," ","_");s.push(this.loadWidgetData(L+F+J+"_panel",c,L,x,e,B));var l=appConstants.templateName+"$~$widget$~$"+"footerDescription";
z.push({xtype:"panel",id:L+F+J+"_panel",closeAction:"destroy",ui:"newGraphPanel",title:c.title,margin:t,height:B,scroll:false,bodyPadding:D,layout:"fit",align:"stretch",autoScroll:true,overflowX:"hidden",overflowY:"auto",columnWidth:H,chartCollectionCompVal:c,graphIndex:J,compName:F,chartType:x,chartTypeCollection:f,tools:[this.addToolBarItems([{xtype:"button",width:16,height:16,margin:"0 3 0 3",style:{"border":"0px"},cls:"iconCsvWidget",hidden:h,handler:function(){var M=this.up("panel");
var N=appConstants.appObj.getController(appConstants.appController);var k="/final/reporter/ErPrintReportBuilder.jsp?"+N.getQueryString(false)+"&graphIndex="+M.graphIndex+"&widgetIdInfo="+L+"&option=csv&compName="+M.compName+"";window.location=k;}},{xtype:"button",cls:"iconDataWidget",style:{"border":"0px"},width:16,height:16,margin:"0 3 0 3",hidden:v,handler:function(){var k=this.up("panel");
var M=appConstants.appObj.getController(appConstants.appController);var N="/final/reporter/ErPrintReportBuilder.jsp?"+M.getQueryString(false)+"&graphIndex="+k.graphIndex+"&widgetIdInfo="+L+"&pdfPrint=yes&pdfprint=yes&compName="+k.compName+"";parent.printWindowFn(N);window.location=csvInfoUrl;}},{xtype:"button",width:16,height:16,margin:"0 0 0 3",style:{"border":"0px"},cls:"iconMaximizeWidget",hidden:o,handler:function(){var k=this.up("panel");
var M=timelineurl+"&graphIndex="+k.graphIndex+"&widgetIdInfo="+L+"&isDDEnabled="+k.chartCollectionCompVal.isDDEnabled+"&dd_Url="+k.chartCollectionCompVal.dd_Url+"&compName="+k.compName+"";parent.maximizeWindowLightBox(M);}}])],dockedItems:[{xtype:"toolbar",dock:"bottom",align:"stretch",layout:"fit",overCls:"reporterTemplateWidgetToolbarOver",cls:"reporterTemplateWidgetToolbar",hidden:!w,height:42,items:[{xtype:"container",layout:{type:"hbox",align:"middle"},items:[{xtype:"button",width:16,height:16,padding:0,margin:"8 4 8 10",id:"widgetDescriptor"+L+F+J,cls:"iconDescription",listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"Widget Descriptor"});
}}},{xtype:"label",id:l+F+J,text:appConstants.builderJson.data.widgetFooter,margin:"5 10 5 5",flex:1,cls:"handSymbol",listeners:{afterrender:function(k){k.el.on("click",this.onEdit,this);},},onEdit:function(N,k,O){var M=this;if(!M.editor){M.editor=Ext.create("Ext.Editor",{updateEl:true,completeOnEnter:true,cancelOnEsc:true,floating:false,alignment:"tl",autoSize:{width:"boundEl",height:"21"},hideEl:false,offsets:[0,-2],field:{xtype:"textfield",cls:"textbox",},listeners:{complete:{fn:function(R,V,Q,U){var S="/final/reporter/ReportBuilderController.jsp";
var P=appConstants.appObj.getController(appConstants.appController);var T=this.up("panel");var W="&widgetHeaderFooterInfo="+Ext.encode(V);W+="&isCustomLayout="+appConstants.isCustomLayout;W+="&method=graphHeaderFooter";W+="&templateName="+appConstants.templateName;W+="&compName="+T.compName;W+="&idDescription=footer$~$"+T.graphIndex;
W+="&chartType="+T.chartType;W+="&chartTypeCollection="+T.chartTypeCollection;P.callAjax(S,W,false,true,true);},scope:M,}}});}M.editor.startEdit(k);}},]}]}],listeners:{boxready:function(M){if(!Ext.isEmpty(M.header)){var k=Ext.get(M.header.id+"_hd-textEl");if(w){Ext.get(M.header.id).on("click",function(Q,P){var O=k.dom.innerText;
var N=new Ext.Editor({width:150,alignment:"tl",floating:false,shadow:false,updateEl:true,completeOnEnter:true,cancelOnEsc:true,offsets:[0,-3],field:{xtype:"textfield",cls:"textbox",maxLength:32,allowBlank:false,enforceMaxLength:true},listeners:{"complete":function(X,W,S,U){k.dom.innerHTML=W;k.dom.innerHTML='<table cellpadding="0" cellspacing="0" border="0"><tr><td class="newFont_bold14">'+W+'</td><td id ="iconRename" style="float:left;margin-left:20px;" class="'+iconRenameWidget+'"></td></tr></table>';
var T="/final/reporter/ReportBuilderController.jsp";var R=appConstants.appObj.getController(appConstants.appController);var V=M;var Y="&widgetHeaderFooterInfo="+Ext.encode(W);Y+="&isCustomLayout="+appConstants.isCustomLayout;Y+="&method=graphHeaderFooter";Y+="&templateName="+appConstants.templateName;
Y+="&fromReportBuilder="+appConstants.fromReportBuilder;Y+="&compName="+V.compName;Y+="&idDescription=header$~$"+V.graphIndex;Y+="&chartType="+V.chartType;Y+="&chartTypeCollection="+V.chartTypeCollection;R.callAjax(T,Y,false,true,true);}}});N.startEdit(k,O);},M,{delegate:"#"+M.header.id+"_hd-textEl"});
}}}},items:s});}}var j=1;if(z.length>1){j=2;}if(z.length==0){z=this.getNoMeasureWithoutBorderNew();}var K="0 0 0 10";if(F==undefined||F==""){K="10 0 0 10";}b.add({xtype:"panel",id:F+"basepanel",closeAction:"destroy",ui:"multiGraphPanel",bodyPadding:K,title:m,columns:j,margin:"0 5 10 5",sortable:true,autoScroll:true,layout:{type:"table",columns:j,tableAttrs:{style:{width:"100%",tableLayout:"fixed"}}},items:z});
}}}b.doLayout();Ext.getCmp("selectionDetails").setSelectionDetailsData(appConstants.builderJson.selectionDetails);}else{b.add(this.getNoMeasureWithoutBorderNew());this.enableDisableTools(true);}}else{b.add(this.getNoMeasureWithoutBorderNew());this.enableDisableTools(true);}},perLoadWidget:function(v,g,t,o,w,b,c){var A=false;
var F=v.y;var G=v.x;if(lastY==F&&lastX!=G&&F!=1){if(heightChangeId==""){heightChangeId=createdPanelAry[createdPanelAry.length-2];}heightChangeCount=heightChangeCount+1;}else{heightChangeId="";}if(heightChangeId!=""&&heightChangeCount!=0){var C=Ext.getCmp(heightChangeId+"_panel").height;Ext.getCmp(heightChangeId+"_panel").setHeight(C+(heightChangeCount*10));
heightChangeCount=0;}lastY=F;lastX=G;createdPanelAry.push(g);if(neeedEditableHeader=="yes"){A=true;}var D=false;D=!A;var q=this;var B=v.chartType;var R=g+"_detail";var P="",j="",H="";var p=true,k=true,z=true,E=false;var O=false;var M=true;H="/final/reporter/ErPrintReportBuilder.jsp?"+this.getQueryString(false)+"&graphIndex="+0+"&widgetIdInfo="+R+"&pdfPrint=yes&pdfprint=yes&titleDisp="+appConstants.tempName;
j="/final/reporter/ErPrintReportBuilder.jsp?"+this.getQueryString(false)+"&graphIndex="+0+"&widgetIdInfo="+R+"&option=csv&titleDisp="+appConstants.tempName;var a=document.getElementById("main").offsetWidth;var r=document.getElementById("main").offsetHeight;var e=r*0.15;var f=((a)/12);f=f*v.size_x;var I=v.size_y*e;
I=Ext.util.Format.round(I,0);var L="";if(v.footerDescription!=undefined&&v.footerDescription!="undefined"){L=v.footerDescription;}var l="iconNoCommentSmall";if(L!=""){l="iconCommentSmall";}var N="5 20 0 10";var x="0 10 10 0";if(t){x="0 2 10 0";}else{x="0 10 10 0";}x="0 5 10 5";var h="fit";if(B=="table"||B=="topn"){N="0";
}if(B=="digital"||B=="multiDigi"){N="0";}M=c;if(b.getId()!="resultcontainer"){N="0";x="0 0 0 0";if(B=="table"||B=="topn"){N="0 10 0 10";}}var n=appConstants.templateName+"$~$"+g+"$~$"+"footerDescription";var d=appConstants.templateName+"$~$"+g+"$~$"+"headerDescription";var J=true;var u="auto";var m="5 0 0 0";
if(B=="timeline"||B=="area"){B="timeline";p=false;k=false;z=false;}else{if(B=="heatMap"){p=false;}else{if(B=="bar"||B=="vertbar"){p=false;if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}}else{if(B=="stackedbar"){B="bar";p=false;if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");
}}else{if(B=="distributedPie"){B="distpie";E=true;if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}}else{if(B=="pie"){if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}E=true;}else{if(B=="table"){if(!A){customPagingHeight=I;I="";}if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");
}}else{if(B=="topn"){B="topn";if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}}else{if(B=="digital"||B=="multiDigi"){B="digital";I=130;if(v.digitalRow!=undefined){I=221;M=false;J=false;u="hidden";m="0 0 0 0";}D=true;if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");
}E=true;}}}}}}}}}D=true;var y=" graphHeaderBottomBorder";var i="5px 10px 5px 10px";if(k&&z&&p){y="";i="10px 0px 10px 15px";}if(B=="table"){i="0px 5px 10px 10px";x="0 5 10 5";}var K=[];if(v.headerCombo!=undefined&&v.headerCombo=="yes"){K.push({xtype:"scrollcombo",width:285,cls:"dropdown",editable:false,margin:"0 4px 0 0",name:"er_headerCombo",id:"er_headerCombo",fieldLabel:v.headerDescription,labelAlign:"left",labelSeparator:"",labelStyle:"white-space: nowrap;font-size: 14px;font-weight:500;",labelWidth:160,store:new Ext.data.Store({fields:["displayField","valueField"],data:[{"displayField":"Session Identifier","valueField":"SESSION_ID"},{"displayField":"Username","valueField":"userName"}]}),displayField:"displayField",valueField:"valueField",queryMode:"local",listeners:{boxready:function(S){Ext.getCmp("er_headerCombo").setValue(appConstants.er_headerCombo);
},change:function(W,X,T,S){var V=q.getQueryString(true);V+="&widget="+g;V+="&tempDesc="+appConstants.tempDesc;V+="&recordInfo="+appConstants.recordInfo+"&templateName="+appConstants.templateName;V+="&user_dispName="+appConstants.tempName;appConstants.er_headerCombo=X;var U="ReportBuilderController.jsp";
Ext.Ajax.request({url:U,params:V,scope:this,success:function(Y){if(Y.responseText.length>0){var Z=Ext.decode(Y.responseText);q.preLoadAjaxSuccess(Z,w,g);if(customPaging){appConstants.blockPdfRelatedOptions="yes";}}},failure:function(Y){}});}}});v.headerDescription="";}if(B!=undefined&&B=="combinedChart"){J=false;
}J=false;var s={xtype:"panel",id:g+"_panel",closeAction:"destroy",ui:"newGraphPanel"+y,title:'<table cellpadding="0" cellspacing="0" border="0"><tr><td class="newFont_bold14">'+v.headerDescription+'</td><td id ="iconRename" style="float:left;margin-left:20px;" class="'+iconRenameWidget+'"></td></tr></table>',margin:x,height:I,scroll:false,bodyPadding:N,layout:h,padding:m,align:"stretch",autoScroll:J,overflowX:"hidden",overflowY:u,header:false,timelineLink:"",columnWidth:f/a,header:{hidden:!M,style:{"padding":i},titlePosition:1,items:K},tools:[this.addToolBarItems([{xtype:"button",scale:"small",padding:0,border:false,iconCls:l,margin:"2 7 0 3",style:{"border":"0px"},id:g+"_note",hidden:E,noteValue:L,handler:function(){q.openSmallPopupWindow(this);
}},{xtype:"button",width:16,height:16,margin:"0 3 0 3",style:{"border":"0px"},cls:"iconCsvWidget",id:g+"_csv",hidden:k,handler:function(){window.location=j;}},{xtype:"button",cls:"iconDataWidget",style:{"border":"0px"},width:16,height:16,margin:"0 3 0 3",id:g+"_data",hidden:z,handler:function(){parent.printWindowFn(H);
}},{xtype:"button",width:16,height:16,margin:"0 0 0 3",style:{"border":"0px"},cls:"iconMaximize",id:g+"_drill",hidden:p,handler:function(){var S=Ext.getCmp(g+"_panel");parent.maximizeWindowLightBox(S.timelineLink);}}])],dockedItems:[{xtype:"toolbar",dock:"bottom",align:"stretch",overCls:"reporterTemplateWidgetToolbarOver",layout:"fit",hidden:D,cls:"reporterTemplateWidgetToolbar",height:42,items:[{xtype:"container",layout:{type:"hbox",align:"middle"},items:[{xtype:"button",width:16,height:16,padding:0,margin:"8 4 8 10",id:"widgetDescriptor"+g,cls:"iconDescription",listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"Widget Descriptor"});
}}},{xtype:"label",id:n,text:L,margin:"5 10 5 5",flex:1,cls:"handSymbol",listeners:{afterrender:function(S){S.el.on("click",this.onEdit,this);},},onEdit:function(U,S,V){var T=this;if(!T.editor){T.editor=Ext.create("Ext.Editor",{updateEl:true,completeOnEnter:true,cancelOnEsc:true,floating:false,alignment:"tl",autoSize:{width:"boundEl",height:"21"},hideEl:false,offsets:[0,-2],field:{xtype:"textfield",cls:"textbox",},listeners:{complete:{fn:function(Y,ab,X,aa){var Z="/final/reporter/ReportBuilderController.jsp";
var W=appConstants.appObj.getController(appConstants.appController);var ac="&widgetHeaderFooterInfo="+encodeURIComponent(ab);ac+="&method=setWidgetHeaderFooter";ac+="&isCustomLayout="+appConstants.isCustomLayout;ac+="&templateName="+appConstants.templateName;ac+="&idDescription="+n;W.callAjax(Z,ac,false,true,true);
},scope:T,}}});}T.editor.startEdit(S);}},]}]}],listeners:{boxready:function(W){if(!Ext.isEmpty(W.header)){var V=Ext.get(W.header.id+"_hd-textEl");if(A){Ext.get(W.header.id).on("click",function(aa,Z){var Y=V.dom.innerText;var X=new Ext.Editor({width:150,alignment:"tl",floating:false,shadow:false,updateEl:true,completeOnEnter:true,cancelOnEsc:true,offsets:[0,-3],field:{xtype:"textfield",cls:"textbox",maxLength:32,allowBlank:false,enforceMaxLength:true},listeners:{"complete":function(ag,af,ac,ae){V.dom.innerHTML=af;
V.dom.innerHTML='<table cellpadding="0" cellspacing="0" border="0"><tr><td class="newFont_bold14">'+af+'</td><td id ="iconRename" style="float:left;margin-left:20px;" class="'+iconRenameWidget+'"></td></tr></table>';var ad="/final/reporter/ReportBuilderController.jsp";var ab=appConstants.appObj.getController(appConstants.appController);
var ah="&widgetHeaderFooterInfo="+encodeURIComponent(af);ah+="&method=setWidgetHeaderFooter";ah+="&templateName="+appConstants.templateName;ah+="&isCustomLayout="+appConstants.isCustomLayout;ah+="&fromReportBuilder="+appConstants.fromReportBuilder;ah+="&idDescription="+d;ab.callAjax(ad,ah,false,true,true);
}}});X.startEdit(V,Y);},W,{delegate:"#"+W.header.id+"_hd-textEl"});}}var U=new Ext.LoadMask(this.getEl(),{msg:"Loading ..."});U.show();var S=this;var T="/final/reporter/ReportBuilderController.jsp";o+="&widget="+g;o+="&tempDesc="+appConstants.tempDesc;if(wildcardSearch){o+="&clientVersionn="+Ext.getCmp("wildcardSearch").getValue();
if(wildcardSearchCondition){o+="&er_searchGroupBy="+Ext.getCmp("er_searchGroupBy").getValue();}if(wildcardSearchCondition2){params+="&wildcardSearch2="+Ext.getCmp("wildcardSearch2").getValue();params+="&er_searchGroupBy2="+Ext.getCmp("er_searchGroupBy2").getValue();}}if(appConstants.method=="submit"){S.timelineLink="/final/reporter/ErReportBuilderDrillDown.jsp?"+o+"&isSubmit=true";
}distributedPieUrl=q.getQueryString(true);Ext.Ajax.request({url:T,params:o,scope:this,success:function(X){if(X.responseText.length>0){U.hide();var Y=Ext.decode(X.responseText);q.preLoadAjaxSuccess(Y,w,g);if(customPaging){appConstants.blockPdfRelatedOptions="yes";}}},failure:function(X){Ext.MessageBox.alert("Error occured in ErReportBuilder.jsp page");
}});},"afterRender":function(T){if(B!=undefined&&B=="table"){var S=Ext.get(g+"_panel");S.on("click",function(V,ac,ae){var Y=ac.textContent;if(Y!=undefined&&Y.indexOf("$")!=-1){Y=Y.substring(Y.indexOf("$")+1);}var W;var Z="method=submit";var aa=Ext.getCmp("er_site");var X="yes";if(appConstants.templateName!=undefined&&appConstants.templateName=="GPU Overview"){W="/final/reporter/ReportBuilder.jsp?";
Z="method=submit&recordInfo="+encodeURIComponent('{"templateName":"GPU Details"}');Z+="&isSubmit=true";if(!aa.isHidden()){Z+="&er_site="+aa.getValue();if(Ext.getCmp("er_option").getValue()=="Zone"){Z+="&er_subZone="+Ext.getCmp("er_subZone").getValue();}}}else{if(appConstants.templateName!=undefined&&appConstants.templateName=="User Idle Reports"){W="/final/reporter/ErThinClientUserReport.jsp?fromMenuBar=true&er_trgttype=User Session Report&";
Z+="&isForceSubmit=true";Z+="&er_user="+encodeURIComponent(Y);Z+="&er_RmDispName="+encodeURIComponent("User Session Details");Z+="&fromReportBuilder=yes";if(!aa.isHidden()){Z+="&select_farm="+aa.getValue();if(Ext.getCmp("er_option").getValue()=="Zone"){Z+="&er_subZone="+Ext.getCmp("er_subZone").getValue();
}}X="no";}}Z+="&hideInputs=false";Z+="&er_option="+Ext.getCmp("er_option").getValue();Z+="&er_compType="+Ext.getCmp(appConstants.erCompType).getValue();if(Ext.getCmp("showLegend")!="undefined"&&Ext.getCmp("showLegend")!=undefined){Z+="&showLegendsEnable="+Ext.getCmp("showLegend").getValue();}if(appConstants.isRemoveAllComponents!=undefined&&appConstants.isRemoveAllComponents=="true"){Z+="&er_component="+Ext.getCmp("er_component").getValue();
}else{var ab=new Array();ab=Ext.getCmp("er_component").getValue();for(var ad in ab){if(X=="yes"){if(ab[ad].indexOf(Y)!=-1){Z+="&er_component="+ab[ad];}if(ab[ad]=="All"){if(Y.indexOf(":")!=-1){Z+="&er_component="+Y+":"+Ext.getCmp(appConstants.erCompType).getValue();}else{Z+="&er_component="+Y+":NULL:"+Ext.getCmp(appConstants.erCompType).getValue();
}}}else{if(X=="no"){Z+="&er_componentserver="+ab[ad];Z+="&select_server1="+ab[ad];}}}}Z+="&er_test="+Ext.getCmp("er_test").getValue();if(appConstants.isMultiMeasureSupport=="yes"){var ab=new Array();ab=Ext.getCmp("er_measure").getValue();for(var ad in ab){var U=ab[ad];U=U.replace("(","EGOPENBRACE");U=U.replace(")","EGCLOSEBRACE");
Z+="&er_measure="+U;}}else{var U=Ext.getCmp("er_measure").getValue();U=U.replace("(","EGOPENBRACE");U=U.replace(")","EGCLOSEBRACE");Z+="&er_measure="+U;}if(Ext.getCmp(appConstants.erInfo).getValue()!=undefined){Z+="&er_info="+Ext.getCmp(appConstants.erInfo).getValue();}Z+="&er_timeline="+Ext.getCmp("er_timeline").getValue();
Z+="&er_stdate="+Ext.getCmp("er_stdate").dataArray;Z+="&startdate="+Ext.getCmp("er_stdate").dataArray;Z+="&er_enddate="+Ext.getCmp("er_enddate").dataArray;Z+="&enddate="+Ext.getCmp("er_enddate").dataArray;Z+="&er_sthr="+Ext.getCmp("er_sthr").dataArray;Z+="&starthr="+Ext.getCmp("er_sthr").dataArray;Z+="&er_endhr="+Ext.getCmp("er_endhr").dataArray;
Z+="&endhr="+Ext.getCmp("er_endhr").dataArray;Z+="&startmin="+mgr_stmin+"&endmin="+mgr_enmin+"&er_secs=00";Z+="&er_stmin="+mgr_stmin+"&er_endmin="+mgr_enmin;Z+="&timefrom="+Ext.getCmp("timefrom").getValue();Z+="&timeto="+Ext.getCmp("timeto").getValue();Z+="&minfrom="+Ext.getCmp("minfrom").getValue();
Z+="&minto="+Ext.getCmp("minto").getValue();Z+="&er_reportgenration="+Ext.getCmp("reportGeneration").getValue();Z+="&er_excwe="+Ext.getCmp("er_excwe").getValue();Z+="&pct_idle="+Ext.getCmp("pct_idle").getValue();Z+="&sorted_col="+Ext.getCmp("groupBy_list").getValue();Z+="&aggregate_server="+Ext.getCmp("aggregate_server").getValue();
Z+="&er_showBy="+Ext.getCmp("er_showBy").getValue();Z+="&timeline_showBy="+Ext.getCmp("timeline_showBy").getValue();Z+="&bar_showBy="+Ext.getCmp("bar_showBy").getValue();if(appConstants.isCustomLayout=="yes"){Z+="&er_top="+Ext.getCmp("er_top").getValue();}else{Z+="&chartInfo="+appConstants.chartInfo;
Z+="&er_top="+Ext.getCmp("er_top").getValue();}Z+="&fromReportBuilder="+appConstants.fromReportBuilder;Z+="&enableBack=true";linkURL(W+Z);},this,{delegate:".forCursorSymbol",});}}},};if(v.digitalRow!=undefined){var Q=new Array();Q.push(s);b.add({xtype:"container",id:g+"_digitalPanel",columnWidth:f/a,items:Q});
}else{b.add(s);}},preLoadAjaxSuccess:function(c,a,b){if(appConstants.isMultiCompType=="true"){Ext.getCmp("er_compType").hide();Ext.getCmp("compTypeMultiPane").show();Ext.getCmp("er_mutiSelComp").show();}else{Ext.getCmp("compTypeMultiPane").hide();Ext.getCmp("er_mutiSelComp").hide();Ext.getCmp("er_compType").show();
}if(appConstants.gridMultiSortEnable!=undefined&&appConstants.gridMultiSortEnable=="yes"){Ext.getCmp("er_secondaryColSort").hide();}if(appConstants.isCustomLayout=="yes"){if(c.hasOwnProperty("selectedFields")){if(c.selectedFields.hasOwnProperty("selectedCompTypeWidgets")){appConstants.selectedCompTypeWidgets=c.selectedFields.selectedCompTypeWidgets;
}}}if(appConstants.method=="submit"){if(appConstants.isCustomLayout=="yes"){this.executePerLoadedWidget(c,a,b);}}initLdgMask.hide();if(appConstants.hideInputs=="true"){this.hideComboField();}},executePerLoadedWidget:function(u,G,q){var e=Ext.getCmp(q+"_panel");e.removeAll();customPaging=false;var N=false;
if(neeedEditableHeader=="yes"){N=true;}if(u.data.hasOwnProperty("widgetCollection")){if(G==true){Ext.getCmp("templateFormItms").show();Ext.getCmp("panelinsidetoggle").show();Ext.getCmp("panelinsidetoggle").setDisabled(false);}var an=u.data.widgetCollection;if(!Ext.isEmpty(an)){for(var Z in an){var i=an[Z];
var I=i.noMeasureIcon;var av=i.noMeasureMessage;var g=i.testCollection;var o=false;var B="";var P="";var Q;var aq=i.widgetId+"_detail";var W=180;if(i.minWidth!=undefined){W=i.minWidth;}var ae="";var M="";var R="";for(var t in g){var af=g[t];var ak=af.measureCollection;if(ak!=undefined&&ak.length>0){for(var v in ak){measureObject=ak[v];
if(measureObject.hasOwnProperty("timelineChartCollection")){P="timeline";Q=measureObject.timelineChartCollection;if(Q!=undefined&&Q.length>0){e.timelineLink=e.timelineLink+"&graphIndex="+0+"&widgetIdInfo="+aq+"&isDDEnabled="+Q[0].isDDEnabled+"&dd_Url="+encodeURIComponent(Q[0].dd_Url);Q[0].popUpSeriesClickUrl=e.timelineLink;
}else{e.timelineLink=e.timelineLink+"&graphIndex="+0+"&widgetIdInfo="+aq;continue;}}else{if(measureObject.hasOwnProperty("heatMapChartCollection")){P="heatMap";chartTypeCollection="heatMapChartCollection";Q=measureObject.heatMapChartCollection;if(Q!=undefined&&Q.length>0){e.timelineLink=e.timelineLink+"&graphIndex="+0+"&widgetIdInfo="+aq+"&isDDEnabled="+Q[0].isDDEnabled+"&dd_Url="+encodeURIComponent(Q[0].dd_Url);
Q[0].popUpSeriesClickUrl=e.timelineLink;}else{e.timelineLink=e.timelineLink+"&graphIndex="+0+"&widgetIdInfo="+aq;continue;}}else{if(measureObject.hasOwnProperty("barChartCollection")){P="bar";if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}Q=measureObject.barChartCollection;
if(Q!=undefined&&Q.length>0){e.timelineLink=e.timelineLink+"&graphIndex="+0+"&widgetIdInfo="+aq+"&isDDEnabled="+Q[0].isDDEnabled+"&dd_Url="+encodeURIComponent(Q[0].dd_Url);Q[0].popUpSeriesClickUrl=e.timelineLink;}else{e.timelineLink=e.timelineLink+"&graphIndex="+0+"&widgetIdInfo="+aq;continue;}}else{if(measureObject.hasOwnProperty("stackedBarChartCollection")){P="stackedbar";
if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}Q=measureObject.stackedBarChartCollection;if(Q!=undefined&&Q.length>0){e.timelineLink=e.timelineLink+"&graphIndex="+0+"&widgetIdInfo="+aq+"&isDDEnabled="+Q[0].isDDEnabled+"&dd_Url="+encodeURIComponent(Q[0].dd_Url);Q[0].popUpSeriesClickUrl=e.timelineLink;
}else{e.timelineLink=e.timelineLink+"&graphIndex="+0+"&widgetIdInfo="+aq;continue;}}else{if(measureObject.hasOwnProperty("distributedPieChartCollection")){P="distpie";if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}Q=measureObject.distributedPieChartCollection;if(Q==undefined||Q.length==0){continue;
}}else{if(measureObject.hasOwnProperty("distributionChartCollection")){P="pie";if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}Q=measureObject.distributionChartCollection;if(Q!=undefined&&Q.length>0){e.timelineLink=e.timelineLink+"&graphIndex="+0+"&widgetIdInfo="+aq+"&isDDEnabled="+Q[0].isDDEnabled+"&dd_Url="+encodeURIComponent(Q[0].dd_Url);
Q[0].popUpSeriesClickUrl=e.timelineLink;}else{e.timelineLink=e.timelineLink+"&graphIndex="+0+"&widgetIdInfo="+aq;continue;}}else{if(measureObject.hasOwnProperty("gridCollection")){P="table";if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}Q=measureObject.gridCollection;
if(Q==undefined||Q.length==0){continue;}if(Q!=undefined&&Q[0]!=undefined){if(Q[0].gridData!=undefined&&Q[0].gridData.length<1&&!N){e.setHeight(customPagingHeight);}}B=Q[0].otherInfo;if(B!=undefined){var m=parseInt(B["dataPageNo"]);var E=B["isRangeNeed"];if(E!="true"&&m==1){customPaging=false;}else{if(!N){e.setHeight(customPagingHeight);
}customPaging=true;}}}else{if(measureObject.hasOwnProperty("topnCollection")){P="topn";if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}Q=measureObject.topnCollection;if(Q==undefined||Q.length==0){continue;}}else{if(measureObject.hasOwnProperty("digitalCollection")){P="digital";
if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}Q=measureObject.digitalCollection;if(Q==undefined||Q.length==0){continue;}}else{if(measureObject.hasOwnProperty("gridCollectionSPO")||measureObject.hasOwnProperty("combinedChartCollection")){P=i.chartType;if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");
}if(measureObject.hasOwnProperty("gridCollectionSPO")){Q=measureObject.gridCollectionSPO;}if(measureObject.hasOwnProperty("combinedChartCollection")){Q=measureObject.combinedChartCollection;}if(Q!=undefined&&Q.length>0){e.timelineLink=e.timelineLink+"&graphIndex="+0+"&widgetIdInfo="+aq+"&isDDEnabled="+Q[0].isDDEnabled+"&dd_Url="+encodeURIComponent(Q[0].dd_Url);
Q[0].popUpSeriesClickUrl=e.timelineLink;}else{e.timelineLink=e.timelineLink+"&graphIndex="+0+"&widgetIdInfo="+aq;continue;}if(Q!=undefined&&Q[0]!=undefined){if(Q[0].gridData!=undefined&&Q[0].gridData.length<1){e.setHeight(customPagingHeight);}}}}}}}}}}}}o=true;if(P=="digital"&&Q!=undefined){var D=[];
if(measureObject.digitalRow!=undefined&&measureObject.digitalRow=="two"){var K=[];var am=1;for(var ao in Q){var S=Q[ao];var y=S.title==undefined?"":S.title;var L=S.unit==undefined?"":S.unit;var aj=[];var r='<table align="center"><tr><td align="right" style="padding-right:5px"><div class="'+S.imageCls+'" ></div></td>';
if(S.url!=undefined){r+='<td style="text-align:left;padding-left:5px;" class="newFont_bold33"><a class="anchorLink" href="javascript:void(0);" onClick="javascript:linkURL(\''+S.url+"');\">"+S.value+"<span class=newFont_normal13>"+L+"</span></a>";}else{r+='<td style="text-align:left;padding-left:5px;" class="newFont_bold33">'+S.value+"<span class=newFont_normal13>"+L+"</span>";
}r+="</td></tr></table>";aj.push({html:r,xtype:"container",width:"100%",style:{textAlign:"center",width:"50px"}});aj.push({html:'<div class="newFont_normal13" style="margin-top:5px;">'+S.DisplayName+"</div>",});if(am%2!=0){aj.push({html:'<div class="newPlainPanelBottomDivider" style="margin-top:10px;position:relative;width:170px"></div>'});
}var z={xtype:"container",align:"center",autoSize:true,margin:"5 0 5 0",layout:{type:"table",columns:1,align:"center",tableAttrs:{style:{align:"center",margin:"auto auto"}},tdAttrs:{style:{textAlign:"center"}}},defaults:{bodyStyle:"padding:0px 0px 0px 0px",align:"center",},items:aj};K.push(z);if(am%2==0){var Y="newGraphPanel noShadow";
var ad="newPlainPanelDivider";if(am==8){ad="";}if(am==4){Y="newGraphPanel noShadow panelShadow";}D.push({xtype:"panel",height:200,padding:"0 5 10 5",title:'<div class="f13-bold">'+y+"&nbsp;</div>",layout:{type:"vbox",align:"stretch",},ui:Y,bodyCls:ad,items:K});}if(am%2==0){K=[];}am++;}var F={xtype:"container",scroll:false,autoScroll:false,padding:0,margin:0,height:200,flex:1,layout:{type:"column",align:"stretch",},defaults:{minWidth:180,margin:0,columnWidth:(1/4),layout:{type:"vbox",align:"center",},},items:D,};
e.add(F);}else{if(measureObject.digitalRow!=undefined){var J=[];var au=[];var a=[];var T=[];for(var ao in Q){var S=Q[ao];var L=S.unit==undefined?"":S.unit;if(S.needHeatMap!=undefined&&S.needHeatMap=="yes"){var d='<table cellpadding="0" cellspacing="0" border="0" style="margin:70px 20px 30px 20px;"><tr><td>';
d+='<div class="btmHeatmapDiv" style="border:0px solid red;margin:0px 20px 0px 0px">';var ac=S.healthyCount;var ah=S.slowCount;var n=S.errorCount;var ab=S.stalledCount;var p=S.healthyPer;var l=S.slowCountPer;var c=S.errorCountPer;var ap=S.stalledPer;p=Math.round(p);ap=Math.round(ap);l=Math.round(l);c=Math.round(c);
var X=p+ap+l+c;var U=Math.max(p,ap,l,c);var b=0;if(X!=100){b=100-X;}if(p==U){p=p+b;}else{if(ap==U){ap=ap+b;}else{if(l==U){l=l+b;}else{if(c==U){c=c+b;}}}}for(var at=0;at<p;at++){d+='<div class="healthyDiv" style="background-color:#69c7b3;"></div>';}for(var at=0;at<l;at++){d+='<div class="slowDiv" style="background-color:#f49242;"></div>';
}for(var at=0;at<ap;at++){d+='<div class="stalledDiv" style="background-color:#8399b0;"></div>';}for(var at=0;at<c;at++){d+='<div class="errorDiv" style="background-color:#ff0059;"></div>';}d+="</div>";d+='</td><td><table cellpadding="0" cellspacing="0" border="0" style="margin-bottom:13px;">';d+="<tbody>";
d+='<tr><td style="padding-left:3px"><div style="background-color:#69c7b3;width:6px;height:6px;border-radius:3px;">&nbsp;</div></td><td style="padding-left:9px;font-size:12px;">Healthy</td><td data-qtip="'+Math.round(ac)+'" style="padding-left:10px;font-size:12px;" class="font_normal12">'+S.healthyPer+"%</td></tr>";
d+='<tr><td style="padding-left:3px"><div style="background-color:#f49242;width:6px;height:6px;border-radius:3px;">&nbsp;</div></td><td style="padding-left:9px;font-size:12px;">Slow</td><td data-qtip="'+Math.round(ah)+'" style="padding-left:10px;font-size:12px;" class="font_normal12">'+S.slowCountPer+"%</td></tr>";
d+='<tr><td style="padding-left:3px"><div style="background-color:#8399b0;width:6px;height:6px;border-radius:3px;">&nbsp;</div></td><td style="padding-left:9px;font-size:12px;">Stalled</td><td data-qtip="'+Math.round(ab)+'" style="padding-left:10px;font-size:12px;" class="font_normal12">'+S.stalledPer+"%</td></tr>";
d+='<tr><td style="padding-left:3px"><div style="background-color:#ff0059;width:6px;height:6px;border-radius:3px;">&nbsp;</div></td><td style="padding-left:9px;font-size:12px;">Error</td><td data-qtip="'+Math.round(n)+'" style="padding-left:10px;font-size:12px;" class="font_normal12">'+S.errorCountPer+"%</td></tr>";
d+="</tbody></table>";d+="</td></tr></table>";au.push({xtype:"container",cls:"summaryChild",align:"center",html:d});}else{var ai="";var aj=[];var r='<table align="center"><tr><td align="right" style="padding-right:5px"><div class="'+S.imageCls+'" ></div></td>';if(S.url!=undefined){r+='<td style="text-align:left;padding-left:5px;" class="newFont_bold33"><a class="anchorLink" href="javascript:void(0);" onClick="javascript:linkURL(\''+S.url+"');\">"+S.value+"</a>";
}else{r+='<td style="text-align:left;padding-left:5px;" class="newFont_bold33">'+S.value;}r+="</td></tr></table>";aj.push({html:r,xtype:"container",width:"100%",style:{textAlign:"center",width:"50px"}});aj.push({html:'<div class="newFont_normal13" style="margin-top:5px;">'+S.DisplayName+L+"</div>",});
if(ao==0||ao==3||ao==2){aj.push({html:'<div class="newPlainPanelBottomDivider" style="margin-top:10px;position:relative;width:170px"></div>'});}var z={xtype:"container",align:"center",autoSize:true,margin:"5 0 5 0",layout:{type:"table",columns:1,align:"center",tableAttrs:{style:{align:"center",margin:"auto auto"}},tdAttrs:{style:{textAlign:"center"}}},defaults:{bodyStyle:"padding:0px 0px 0px 0px",align:"center",},items:aj};
if(ao==0||ao==4){J.push(z);if(ao==0){ae=S.title;}}else{if(ao==3||ao==6){a.push(z);if(ao==3){M=S.title;}}else{if(ao==2||ao==5){T.push(z);if(ao==2){R=S.title;}}}}}}var O={xtype:"panel",title:'<spanclass="f14-bold">'+ae+"</span>",margin:"0 0 0 0",padding:"2 0 0 5",ui:"newGraphPanel noShadow",bodyCls:"newPlainPanelDivider",layout:{type:"vbox",align:"stretch",pack:"top",},items:J,};
var j={xtype:"panel",height:250,layout:{type:"vbox",align:"stretch",},ui:"newGraphPanel noShadow panelShadow",items:au};var H={xtype:"panel",margin:"0 0 0 0",padding:"0 0 0 5",height:250,title:'<span class="f13-bold">'+M+"</span>",ui:"newGraphPanel noShadow panelShadow",layout:{type:"vbox",align:"stretch",pack:"top",},items:a};
var al={xtype:"panel",margin:"0 0 0 0",padding:"0 0 0 5",title:'<span class="f13-bold">'+R+"</span>",ui:"newGraphPanel noShadow",height:200,layout:{type:"vbox",align:"stretch",pack:"top",},items:T};D.push(O);D.push(j);D.push(H);D.push(al);var F={xtype:"container",scroll:false,autoScroll:false,padding:0,margin:0,height:200,flex:1,layout:{type:"column",align:"stretch",},defaults:{minWidth:180,margin:0,columnWidth:(1/4),layout:{type:"vbox",align:"center",},},items:D,};
e.add(F);}else{var w="graphSeperatorLineRight";var V=Q.length-1;for(var ao in Q){var S=Q[ao];var L=S.unit==undefined?"":S.unit;var x=S.font==undefined?"newFont_bold33":S.font;if(ao==V){w="";}var aa=[];var aw="";if(S.imageCls!=undefined){aw+='<div class="'+S.imageCls+'" ></div>';}aw+='<div class="'+x+'" style="padding:0 5px">'+S.value+"<span class=newFont_normal13>"+L+"</span></div>";
aa.push({xtype:"container",cls:"egFlexCenterByRowWise",height:45,html:aw,width:"100%",});if(S.DataSet!=undefined&&S.value!=undefined&&S.value!="-"){var ar=15;aa.push({xtype:"container",dataIndex:ao,data:S,height:ar,html:'<div id="'+q+"_digital"+ao+'"></div>',listeners:{"boxready":function(s){try{var h={};
jQuery.extend(true,{},getHighChartsSparklineInstance(q+"_digital"+this.dataIndex,this.data,this.height,this.width),h);}catch(k){console.log("e::>>>>"+k);}}}});}aa.push({xtype:"container",html:'<span class="newFont_normal13">'+S.DisplayName+"</span>",});D.push({xtype:"container",align:"center",autoSize:true,cls:w,layout:{type:"table",columns:1,align:"center",tableAttrs:{style:{align:"center",margin:"auto auto"}},tdAttrs:{style:{textAlign:"center"}}},defaults:{bodyStyle:"padding:5px",align:"center",},items:aa});
}var F={xtype:"container",padding:"10 0 0 0",margin:0,scroll:false,autoScroll:true,flex:1,layout:{type:"hbox",align:"center"},defaults:{minWidth:W,margin:0,flex:1,layout:{type:"column",align:"center",},},items:D,};e.add(F);}}}else{if(Q!=undefined){var C=Q[0];var f=C.DataSet;if((f!=undefined&&f.length>0)||(C.gridData!=undefined&&C.gridData.length>0)){e.add(this.loadWidgetData(q+"_panel",Q[0],aq,P,e.getWidth(),e.getHeight()-5));
}else{o=false;}}else{o=false;}}if(B!=""&&B!=undefined){var ag=Ext.getCmp("customgridId"+q+"_panel");if(fromPerBtn){ag.getStore().loadPage(activePage);}this.loadOverAllPageNavigation("pageingTool"+i.widgetId+"_panel",B,"customPageinationId"+i.widgetId+"_panel");fromPerBtn=false;}}if(!o){e.setAutoScroll(false);
if((customPaging||(P!=undefined&&P=="table"))&&!N){e.setHeight(customPagingHeight);}var A=e.getHeight()-50;this.getCustomNoMeasure(I,av,A,e);}}else{e.setAutoScroll(false);if((customPaging||(i.chartType!=undefined&&i.chartType=="table"))&&!N){e.setHeight(customPagingHeight);}var A=e.getHeight()-50;if(av!=undefined){this.getCustomNoMeasure(I,av,A,e);
}else{this.getCustomNoMeasure(I,av,A,e);}}}}if(G==true){Ext.getCmp("selectionDetails").setSelectionDetailsData(u.selectionDetails);}}else{e.setAutoScroll(false);if(customPaging&&!N){e.setHeight(customPagingHeight);}e.add({xtype:"container",height:e.getHeight()-50,html:'<div class="egFlexCenterByColumnWise" style="height:100%"> <div class="iconInformation"></div> <div class="commonErrorMsgText">No Measures Available!</div> </div>'});
}}},getCustomNoMeasure:function(d,e,b,a){var c='<div class="egFlexCenterByColumnWise" style="height:100%">';if(d!=undefined||e!=undefined){if(d!=undefined){c+='<div class="'+d+'"></div>';}if(e!=undefined){c+='<div class="commonErrorMsgText">'+e+"</div>";}}else{c+='<div class="iconInformation"></div><div class="commonErrorMsgText">No Measures Available!</div>';
}c+="</div>";a.add({xtype:"container",height:a.getHeight()-50,html:c});},gridCustomPaging:function(g){var f=this;var h=g.id;var a=Ext.getCmp(h);var c=new Ext.LoadMask(a.getEl(),{msg:"Loading ..."});c.show();var b="/final/reporter/ReportBuilderController.jsp";var e=h.substring(0,h.indexOf("_"));if(e.indexOf("customgridId")!=-1){e=e.substring(e.indexOf("customgridId")+12);
}keepResult=true;var d=f.ajaxQueryMaker(Ext.getCmp("submit"));d+="&widget="+e;d+="&tempDesc="+appConstants.tempDesc;if(appConstants.method=="submit"){a.timelineLink="/final/reporter/ErReportBuilderDrillDown.jsp?"+d+"&isSubmit=true";}distributedPieUrl=f.getQueryString(true);Ext.Ajax.request({url:b,params:d,async:false,scope:this,success:function(i){if(i.responseText.length>0){c.hide();
var j=Ext.decode(i.responseText);f.preLoadAjaxSuccess(j,false,e);}},failure:function(i){Ext.MessageBox.alert("Error occured in ErReportBuilder.jsp page");}});},addToolBarItems:function(a){if(Ext.isArray(a)){var b={xtype:"toolbar",padding:"6 0 3 0",bodypadding:0,margin:"0 0 0 0",border:false,items:a};
return b;}else{alert("error in  @param, use as array [{..},{..}]");}},getDynamicRangesInfo:function(){var c=new Array();var a=Ext.getCmp("rangeSettingsItemsId");if(!a.isHidden()&&a.items!=undefined){for(var b=0;b<a.items.length;b++){var d=Ext.getCmp("dynamicRangeCombo_"+b).fieldLabelValue+"~";d+=Ext.getCmp("dynamicRangeCombo_"+b).getValue()+"*";
if(Ext.getCmp("dynamicRangeCombo_"+b).getValue()=="None"){d+="0";}else{d+=Ext.getCmp("disp_MeasureName"+b).getValue();}c.push(d);}}return c;},getDynamicColorInfo:function(){var c=Ext.getCmp("colourSettingsItemsId");var g=new Array();if(!c.isHidden()&&c.items.items!=undefined){for(var h=0;h<c.items.items.length;
h++){var e="";var f="";var b="";var a=c.items.items[h].items.items;var i=a.length-1;for(var j=0;j<=i;j++){var d=a[j];if(j==0){f=d.value;}else{if(d.xtype=="image"){b+=d.cls+"$";}if(d.xtype!="image"){b+=d.fieldLabel+"*"+d.fieldLabelValue+"*"+d.value;if(j!=i){b+="|";}}}}g.push(f+"~"+b);}}return g;},exportDataAlert:function(){Ext.MessageBox.show({title:"Alert",msg:"Exporting the report may take too long to complete. Choose the Background option to export this report",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
},openSmallPopupWindow:function(a){var b=this;if(Ext.isEmpty(Ext.getCmp("GenericWindowId"))){var b=this;var c=Ext.create("Ext.tip.ToolTip",{anchor:"top",anchorToTarget:true,anchorOffset:252,target:a.id,scroll:false,autoHide:false,padding:0,header:{width:30,},width:310,heigth:245,layout:{type:"vbox",align:"stretch"},flex:1,bodyPadding:0,border:false,id:"GenericWindowId",closeAction:"destroy",closable:true,ui:"newTooltipCommentPopup",title:"Comments",tools:[b.addToolBarItems([{xtype:"container",margin:"-2px 0 0 0",html:'<div class="checkGroupClear" style="width:46px;height:16px;cursor:pointer;float:right;text-align:center;"><span style="text-decoration:underline;font-size:11px;" class="clearCommentText">Clear</span></div>',id:"noteDelete",listeners:{"afterrender":function(){this.getEl().on("click",function(e,f,d){Ext.getCmp("NotesTextAreaId").setValue("");
});}}}])],listeners:{hide:function(){if(!Ext.isEmpty(Ext.getCmp("GenericWindowId"))){Ext.getCmp("GenericWindowId").doClose();}},el:{"mouseenter":function(){if(!Ext.isEmpty(Ext.getCmp("GenericWindowId"))){}},"mouseleave":function(){if(!Ext.isEmpty(Ext.getCmp("GenericWindowId"))){}}}},close:function(){var f=Ext.getCmp("NotesTextAreaId").getValue();
f=f.trim();var g=a.id;if(g.indexOf("_")>-1){g=g.substring(0,g.lastIndexOf("_"));}if(f.length==0){if(a.iconCls="iconCommentSmall"){a.setIconCls("iconNoCommentSmall");}else{if(a.iconCls!="iconNoCommentSmall"){a.setIconCls("iconNoCommentSmall");}}}else{if(a.iconCls="iconNoCommentSmall"){a.setIconCls("iconCommentSmall");
}else{if(a.iconCls!="iconCommentSmall"){a.setIconCls("iconCommentSmall");}}}a.noteValue=f;var e="/final/reporter/ReportBuilderController.jsp";var d=appConstants.appObj.getController(appConstants.appController);var h="&widgetHeaderFooterInfo="+encodeURIComponent(f);h+="&method=setWidgetHeaderFooter";h+="&isCustomLayout="+appConstants.isCustomLayout;
h+="&templateName="+appConstants.templateName;h+="&idDescription="+appConstants.templateName+"$~$"+g+"$~$"+"footerDescription";d.callAjax(e,h,false,true,true);this.doClose();},items:[{xtype:"textareafield",grow:false,padding:0,bodyPadding:0,margin:"0 10 10 10",heigth:145,layout:{type:"vbox",align:"stretch"},rows:5,flex:1,width:310,cls:"textarea commentBox",name:"NotesTextAreaId",id:"NotesTextAreaId",fieldLabel:"",value:a.noteValue}]}).showAt([Ext.get(event.target).getX()-265,Ext.get(event.target).getY()+28]);
}Ext.getCmp("NotesTextAreaId").focus();},showConfirmResult:function(c){if(c=="yes"){var b=Ext.getCmp("submit");b.setDisabled(false);if(isSettingsEnabled){Ext.get("configMod").animate({duration:500,to:{y:-500}});}this.beforeSubmit(Ext.getCmp("submit"),false);}else{this.getReporterSettings().down("button").fireHandler();
var a=Ext.getCmp("reportGeneration");var d=Ext.getCmp("bgReportName");a.setValue("background");d.setValue("");d.show();d.focus(false,1000);Ext.getCmp("submitViaSetting").show();Ext.getCmp("moreOptionCloseId").hide();validateTextBoxWithSpecialChars(d.getValue(),"Attachment",true);return false;}}});