Ext.define("CtxLogonSimulator.controller.CtxLogonSimulator",{extend:"Ext.app.Controller",gridColStateParam:"ASC",gridColIndexParam:-1,views:["Main"],refs:[{selector:"main",ref:"main"},{selector:"newUtilities",ref:"newUtilities"},{selector:"thinclientapplicationform",ref:"thinclientapplicationform"},{selector:"egcomponent",ref:"egcomponent"},{selector:"mainform",ref:"mainform"},{selector:"thinclientapplicationsettings",ref:"thinclientapplicationsettings"},{selector:"nomeasurepanel",ref:"nomeasurepanel"},{selector:"backGroundPanel",ref:"backGroundPanel"}],init:function(){this.control({"main":{"boxready":this.afterMainRender},"mainform":{"afterrender":this.loadFormElements},"thinclientapplicationsettings":{"afterrender":this.loadSettingsElements},"newUtilities":{"afterrender":this.loadTools},"newUtilities > #printTool > button":{"click":this.printReport},"newUtilities > #saveTool > button":{"click":this.saveReportAsPDF},"newUtilities > #mailTool > button":{"click":this.sendMail},"newUtilities > #favoriteTool > button":{"click":this.saveFavorite},"newUtilities > #scheduleTool > button":{"click":this.saveSchedule},'timeline combo[name="er_mode"]':{"select":this.changeEr_mode},'mainform combo[name="select_farm"]':{"select":this.zoneOnChange},'mainform button[id="expandAppln"]':{"click":this.expandAppln},'mainform combo[name="er_applicationX"]':{"select":this.appOnChange},'mainform combo[name="er_location"]':{"select":this.locationOnChange},'mainform combo[name="er_compType"]':{"select":this.compTypeOnChange},'thinclientapplicationsettings combo[name="er_excwe"]':{"select":this.weekendOnChange},'thinclientapplicationsettings combo[name="reportGeneration"]':{"select":this.reportGenChange},'thinclientapplicationsettings button[id="moreOptionCloseId"]':{"click":this.validateAndCloseSettings},'thinclientapplicationsettings button[id="submitViaSetting"]':{"click":this.closeSettingAndSubmit},'mainform button[name="submit"]':{"click":this.showResult},'mainform button[name="save"]':{"click":this.goTo},'mainform button[id="panelinsidetoggle"]':{"click":this.toggleForm},'mainform button[id="expandSelectorActivity"]':{"click":this.expandMeActivity},'mainform button[id="expandSelectorUsage"]':{"click":this.expandMeUsage},'mainform trigger[id="compSearch"]':{"change":this.filterMultiselect},'mainform trigger[id="appSearch"]':{"change":this.filterMultiselect},'mainform combo[id="er_option"]':{"select":this.onSelectAnalysisBy},'mainform combo[id="er_site"]':{"select":this.er_siteOnChange}});
},appOnChange:function(){var e=Ext.getCmp("er_option").getValue();var d=Ext.getCmp("select_farm").getValue();var c=Ext.getCmp("er_compType").getValue();var b=Ext.getCmp("er_applicationX").getValue();var f="&er_option="+e+"&er_zone="+d+"&er_compType="+c+"&er_applicationX="+encodeURIComponent(b)+"&er_trgttype="+targetType;
var a="";a="/final/reporter/ErCtxLogonSimulatorJSON.jsp";Ext.Ajax.request({url:a,params:f,success:function(g){var j=Ext.decode(g.responseText);var h;if(b!=undefined&&b!="All"){if(isSettingsEnabled){Ext.getCmp("lowLimitLbl").hide();Ext.getCmp("lowLimitLbl_enum").hide();Ext.getCmp("lowLimitLbl_appl").hide();
Ext.getCmp("logonStatusSepId").hide();}}else{if(isSettingsEnabled){Ext.getCmp("lowLimitLbl").show();Ext.getCmp("lowLimitLbl_enum").show();Ext.getCmp("lowLimitLbl_appl").show();Ext.getCmp("logonStatusSepId").show();if(!Ext.isEmpty(j.majorValue)){Ext.getCmp("uppermajor").setValue(j.majorValue);}if(!Ext.isEmpty(j.minorValue)){Ext.getCmp("upperminor").setValue(j.minorValue);
}if(!Ext.isEmpty(j.criticalValue)){Ext.getCmp("upperCritical").setValue(j.criticalValue);}if(!Ext.isEmpty(j.criticalColor)){Ext.get("upperCritical").setStyle("background-color",j.criticalColor);}if(!Ext.isEmpty(j.majorColor)){Ext.get("uppermajor").setStyle("background-color",j.majorColor);}if(!Ext.isEmpty(j.minorColor)){Ext.get("upperminor").setStyle("background-color",j.minorColor);
}if(!Ext.isEmpty(j.uppermajor_enum)){Ext.getCmp("uppermajor_enum").setValue(j.uppermajor_enum);}if(!Ext.isEmpty(j.upperminor_enum)){Ext.getCmp("upperminor_enum").setValue(j.upperminor_enum);}if(!Ext.isEmpty(j.upperCritical_enum)){Ext.getCmp("upperCritical_enum").setValue(j.upperCritical_enum);}if(!Ext.isEmpty(j.criticalColor)){Ext.get("upperCritical_enum").setStyle("background-color",j.criticalColor);
}if(!Ext.isEmpty(j.majorColor)){Ext.get("uppermajor_enum").setStyle("background-color",j.majorColor);}if(!Ext.isEmpty(j.minorColor)){Ext.get("upperminor_enum").setStyle("background-color",j.minorColor);}if(!Ext.isEmpty(j.uppermajor_appl)){Ext.getCmp("uppermajor_appl").setValue(j.uppermajor_appl);}if(!Ext.isEmpty(j.upperminor_appl)){Ext.getCmp("upperminor_appl").setValue(j.upperminor_appl);
}if(!Ext.isEmpty(j.upperCritical_appl)){Ext.getCmp("upperCritical_appl").setValue(j.upperCritical_appl);}if(!Ext.isEmpty(j.criticalColor)){Ext.get("upperCritical_appl").setStyle("background-color",j.criticalColor);}if(!Ext.isEmpty(j.majorColor)){Ext.get("uppermajor_appl").setStyle("background-color",j.majorColor);
}if(!Ext.isEmpty(j.minorColor)){Ext.get("upperminor_appl").setStyle("background-color",j.minorColor);}}}h=Ext.getCmp("er_server");var i=j.componentCombo;var k=j.selectedComponents;appConstants.rawDataForComponents=i;h.getStore().loadRawData(i);if(!Ext.isEmpty(k)){h.setValue(k);}else{if(!Ext.isEmpty(i)){h.setValue(i[0].valueField);
}else{h.setValue("-1");}}}});},locationOnChange:function(){var e=Ext.getCmp("er_option").getValue();var d=Ext.getCmp("select_farm").getValue();var c=Ext.getCmp("er_compType").getValue();var b=Ext.getCmp("er_location").getValue();var f="&er_option="+e+"&er_zone="+d+"&er_compType="+c+"&er_location="+b+"&er_trgttype="+targetType;
var a="";a="/final/reporter/ErCtxLogonSimulatorJSON.jsp";Ext.Ajax.request({url:a,params:f,success:function(g){var j=Ext.decode(g.responseText);var h;if(b!=undefined&&b!="all"){if(isSettingsEnabled){Ext.getCmp("lowLimitLbl").hide();Ext.getCmp("lowLimitLbl_enum").hide();Ext.getCmp("lowLimitLbl_appl").hide();
Ext.getCmp("logonStatusSepId").hide();}}else{if(isSettingsEnabled){Ext.getCmp("lowLimitLbl").show();Ext.getCmp("lowLimitLbl_enum").show();Ext.getCmp("lowLimitLbl_appl").show();Ext.getCmp("logonStatusSepId").show();if(!Ext.isEmpty(j.majorValue)){Ext.getCmp("uppermajor").setValue(j.majorValue);}if(!Ext.isEmpty(j.minorValue)){Ext.getCmp("upperminor").setValue(j.minorValue);
}if(!Ext.isEmpty(j.criticalValue)){Ext.getCmp("upperCritical").setValue(j.criticalValue);}if(!Ext.isEmpty(j.criticalColor)){Ext.get("upperCritical").setStyle("background-color",j.criticalColor);}if(!Ext.isEmpty(j.majorColor)){Ext.get("uppermajor").setStyle("background-color",j.majorColor);}if(!Ext.isEmpty(j.minorColor)){Ext.get("upperminor").setStyle("background-color",j.minorColor);
}if(!Ext.isEmpty(j.uppermajor_enum)){Ext.getCmp("uppermajor_enum").setValue(j.uppermajor_enum);}if(!Ext.isEmpty(j.upperminor_enum)){Ext.getCmp("upperminor_enum").setValue(j.upperminor_enum);}if(!Ext.isEmpty(j.upperCritical_enum)){Ext.getCmp("upperCritical_enum").setValue(j.upperCritical_enum);}if(!Ext.isEmpty(j.criticalColor)){Ext.get("upperCritical_enum").setStyle("background-color",j.criticalColor);
}if(!Ext.isEmpty(j.majorColor)){Ext.get("uppermajor_enum").setStyle("background-color",j.majorColor);}if(!Ext.isEmpty(j.minorColor)){Ext.get("upperminor_enum").setStyle("background-color",j.minorColor);}if(!Ext.isEmpty(j.uppermajor_appl)){Ext.getCmp("uppermajor_appl").setValue(j.uppermajor_appl);}if(!Ext.isEmpty(j.upperminor_appl)){Ext.getCmp("upperminor_appl").setValue(j.upperminor_appl);
}if(!Ext.isEmpty(j.upperCritical_appl)){Ext.getCmp("upperCritical_appl").setValue(j.upperCritical_appl);}if(!Ext.isEmpty(j.criticalColor)){Ext.get("upperCritical_appl").setStyle("background-color",j.criticalColor);}if(!Ext.isEmpty(j.majorColor)){Ext.get("uppermajor_appl").setStyle("background-color",j.majorColor);
}if(!Ext.isEmpty(j.minorColor)){Ext.get("upperminor_appl").setStyle("background-color",j.minorColor);}}}h=Ext.getCmp("er_server");var i=j.componentCombo;var k=j.selectedComponents;appConstants.rawDataForComponents=i;h.getStore().loadRawData(i);if(!Ext.isEmpty(k)){h.setValue(k);}else{if(!Ext.isEmpty(i)){h.setValue(i[0].valueField);
}else{h.setValue("-1");}}}});},onSelectAnalysisBy:function(c){var b=c.getValue();var d="er_option="+b;var a="";a="/final/reporter/ErCtxLogonSimulatorJSON.jsp";Ext.Ajax.request({url:a,params:d,success:function(e){var h=Ext.decode(e.responseText);var f;if(b=="Zone"){Ext.getCmp("er_site").hide();f=Ext.getCmp("select_farm");
f.getStore().clearFilter(true);f.getStore().loadRawData(h.zoneCombo);f.setValue(h.selectedZone);f.show();}else{if(b=="Component"){Ext.getCmp("select_farm").hide();Ext.getCmp("er_site").hide();}else{Ext.getCmp("select_farm").hide();f=Ext.getCmp("er_site");f.getStore().clearFilter(true);f.getStore().loadRawData(h.siteCombo);
f.setFieldLabel(h.siteComboLabel);f.setValue(h.selectedSiteCombo);f.show();}}f=Ext.getCmp("er_compType");f.getStore().clearFilter(true);f.getStore().loadRawData(h.compTypeCombo);f.setValue(h.compTypeCombo[0].valueField);f=Ext.getCmp("er_server");var g=h.componentCombo;var k=h.selectedComponents;appConstants.rawDataForComponents=g;
f.getStore().loadRawData(g);if(!Ext.isEmpty(k)){f.setValue(k);}else{if(!Ext.isEmpty(g)){f.setValue(g[0].valueField);}else{f.setValue("-1");}}if(targetType=="applicationBased"){Ext.getCmp("er_location").hide();var j=h.selectedAppln;f=Ext.getCmp("er_applicationX");f.getStore().clearFilter(true);f.getStore().loadRawData(h.applnCombo);
if(!Ext.isEmpty(j)&&j!=undefined){f.setValue(j);}else{if(!Ext.isEmpty(h.applnCombo)){f.setValue(h.applnCombo[0].valueField);}else{f.setValue("-1");}}}else{var i=h.locationselectOptions.selectedLocationsType;Ext.getCmp("er_applicationX").hide();f=Ext.getCmp("er_location");f.getStore().clearFilter(true);
f.getStore().loadRawData(h.locationCmbo);if(!Ext.isEmpty(i)&&i!=undefined){f.setValue(i);}else{if(!Ext.isEmpty(h.locationCmbo)){f.setValue(h.locationCmbo[0].valueField);}else{f.setValue("-1");}}}}});},er_siteOnChange:function(b){var d=b.getValue();var c;var a="";a="/final/reporter/ErCtxLogonSimulatorJSON.jsp";
c="er_option="+Ext.getCmp("er_option").getValue()+"&er_site="+encodeURIComponent(d);Ext.Ajax.request({url:a,params:c,method:"GET",success:function(e){var f;var h=Ext.decode(e.responseText);f=Ext.getCmp("er_compType");f.getStore().clearFilter(true);f.getStore().loadRawData(h.compTypeCombo);f.setValue(h.selectedCompType);
f=Ext.getCmp("er_server");var g=h.componentCombo;var i=h.selectedComponents;appConstants.rawDataForComponents=g;f.getStore().loadRawData(g);if(!Ext.isEmpty(i)){f.setValue(i);}else{if(!Ext.isEmpty(g)){f.setValue(g[0].valueField);}else{f.setValue("-1");}}if(targetType=="applicationBased"){Ext.getCmp("er_location").hide();
f=Ext.getCmp("er_applicationX");f.getStore().clearFilter(true);f.getStore().loadRawData(h.applnCombo);f.setValue(h.selectedAppln);}else{Ext.getCmp("er_applicationX").hide();f=Ext.getCmp("er_location");f.getStore().clearFilter(true);f.getStore().loadRawData(h.locationCmbo);f.setValue(h.locationselectOptions.selectedLocationsType);
}}});},filterMultiselect:function(b){if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}var a=b.getId();if(a=="compSearch"){compStore=appConstants.rawDataForComponents;compName="er_server";}b.toggleTriggger();appConstants.erUtils.filterComboStore(b,Ext.getCmp(compName),compStore);
},changeEr_mode:function(c){var b="";var a="";a=appConstants.publicjsonDataUsage["hiddenfields"]["favorite_id"];b=appConstants.publicjsonDataUsage["hiddenfields"]["fromScheduleModify"];if(!(a=="undefined"||a==undefined)||!(b==null||b=="null")){return;}Ext.get("configMod").animate({duration:250,to:{y:-530}});
this.showResult();},goTo:function(a){appConstants.formButtonId=a.getId();var b="";appConstants.queryStringUsage=appConstants.queryStringUsage.replace("printPageIdentify",appConstants.printPageIdentify);b=appConstants.publicjsonDataUsage["hiddenfields"];var c=b["fromScheduleModify"];if((c!=null&&c=="Yes")){this.saveSchedule();
}else{this.saveFavorite();}},compTypeOnChange:function(){Ext.getCmp("resultPanel").hide();var b;var d=Ext.getCmp("er_option").getValue();var e="&er_trgttype="+targetType+"&er_option="+d+"&er_compType="+Ext.getCmp("er_compType").getValue()+"&fromComponentChange=yes";var a=Ext.getCmp("mainform").getForm();
var c=a.findField("select_farm").getValue();if(d=="Zone"){e+="&er_zone="+encodeURIComponent(c);}else{e+="&er_site="+encodeURIComponent(Ext.getCmp("er_site").getValue());}b="/final/reporter/ErCtxLogonSimulatorJSON.jsp";Ext.Ajax.request({url:b,params:e,scope:this,method:"GET",success:function(g){var k=g.responseText;
var i=Ext.decode(k);appConstants.publicjsonDataUsage=i;comboRawData=appConstants.publicjsonDataUsage.componentCombo;selectedComboOption=appConstants.publicjsonDataUsage.selectedComponents;comboObject=Ext.getCmp("er_server");appConstants.rawDataForComponents=comboRawData;comboObject.getStore().loadRawData(comboRawData);
if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);}comboObject.resumeEvents();if(targetType=="applicationBased"){comboRawData=appConstants.publicjsonDataUsage.applnCombo;selectedComboOption=appConstants.publicjsonDataUsage.selectedAppln;
comboObject=a.findField("er_applicationX");comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);}var h=Ext.getCmp("er_applicationX").getValue();
if(h!=undefined&&h!="All"){if(isSettingsEnabled){Ext.getCmp("lowLimitLbl").hide();Ext.getCmp("lowLimitLbl_enum").hide();Ext.getCmp("lowLimitLbl_appl").hide();Ext.getCmp("logonStatusSepId").hide();}}else{if(isSettingsEnabled){Ext.getCmp("lowLimitLbl").show();Ext.getCmp("lowLimitLbl_enum").show();Ext.getCmp("lowLimitLbl_appl").show();
Ext.getCmp("logonStatusSepId").show();if(!Ext.isEmpty(i.majorValue)){Ext.getCmp("uppermajor").setValue(i.majorValue);}if(!Ext.isEmpty(i.minorValue)){Ext.getCmp("upperminor").setValue(i.minorValue);}if(!Ext.isEmpty(i.criticalValue)){Ext.getCmp("upperCritical").setValue(i.criticalValue);}if(!Ext.isEmpty(i.criticalColor)){Ext.get("upperCritical").setStyle("background-color",i.criticalColor);
}if(!Ext.isEmpty(i.majorColor)){Ext.get("uppermajor").setStyle("background-color",i.majorColor);}if(!Ext.isEmpty(i.minorColor)){Ext.get("upperminor").setStyle("background-color",i.minorColor);}if(!Ext.isEmpty(i.uppermajor_enum)){Ext.getCmp("uppermajor_enum").setValue(i.uppermajor_enum);}if(!Ext.isEmpty(i.upperminor_enum)){Ext.getCmp("upperminor_enum").setValue(i.upperminor_enum);
}if(!Ext.isEmpty(i.upperCritical_enum)){Ext.getCmp("upperCritical_enum").setValue(i.upperCritical_enum);}if(!Ext.isEmpty(i.criticalColor)){Ext.get("upperCritical_enum").setStyle("background-color",i.criticalColor);}if(!Ext.isEmpty(i.majorColor)){Ext.get("uppermajor_enum").setStyle("background-color",i.majorColor);
}if(!Ext.isEmpty(i.minorColor)){Ext.get("upperminor_enum").setStyle("background-color",i.minorColor);}if(!Ext.isEmpty(i.uppermajor_appl)){Ext.getCmp("uppermajor_appl").setValue(i.uppermajor_appl);}if(!Ext.isEmpty(i.upperminor_appl)){Ext.getCmp("upperminor_appl").setValue(i.upperminor_appl);}if(!Ext.isEmpty(i.upperCritical_appl)){Ext.getCmp("upperCritical_appl").setValue(i.upperCritical_appl);
}if(!Ext.isEmpty(i.criticalColor)){Ext.get("upperCritical_appl").setStyle("background-color",i.criticalColor);}if(!Ext.isEmpty(i.majorColor)){Ext.get("uppermajor_appl").setStyle("background-color",i.majorColor);}if(!Ext.isEmpty(i.minorColor)){Ext.get("upperminor_appl").setStyle("background-color",i.minorColor);
}}}}else{var j=i.locationselectOptions.selectedLocationsType;comboObject=Ext.getCmp("er_location");comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(i.locationCmbo);if(!Ext.isEmpty(j)&&j!=undefined){comboObject.setValue(j);}else{if(!Ext.isEmpty(i.locationCmbo)){comboObject.setValue(i.locationCmbo[0].valueField);
}else{comboObject.setValue("-1");}}comboRawData=appConstants.publicjsonDataUsage.applnCombo;selectedComboOption=appConstants.publicjsonDataUsage.selectedAppln;comboObject=a.findField("appForAgent");comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)&&selectedComboOption!=undefined){comboObject.setValue(selectedComboOption);
}else{if(!Ext.isEmpty(comboRawData)){comboObject.setValue(comboRawData[0].valueField);}else{comboObject.setValue("-1");}}var f=Ext.getCmp("er_location").getValue();if(f!=undefined&&f!="all"){if(isSettingsEnabled){Ext.getCmp("lowLimitLbl").hide();Ext.getCmp("lowLimitLbl_enum").hide();Ext.getCmp("lowLimitLbl_appl").hide();
Ext.getCmp("logonStatusSepId").hide();}}else{if(isSettingsEnabled){Ext.getCmp("lowLimitLbl").show();Ext.getCmp("lowLimitLbl_enum").show();Ext.getCmp("lowLimitLbl_appl").show();Ext.getCmp("logonStatusSepId").show();if(!Ext.isEmpty(i.majorValue)){Ext.getCmp("uppermajor").setValue(i.majorValue);}if(!Ext.isEmpty(i.minorValue)){Ext.getCmp("upperminor").setValue(i.minorValue);
}if(!Ext.isEmpty(i.criticalValue)){Ext.getCmp("upperCritical").setValue(i.criticalValue);}if(!Ext.isEmpty(i.criticalColor)){Ext.get("upperCritical").setStyle("background-color",i.criticalColor);}if(!Ext.isEmpty(i.majorColor)){Ext.get("uppermajor").setStyle("background-color",i.majorColor);}if(!Ext.isEmpty(i.minorColor)){Ext.get("upperminor").setStyle("background-color",i.minorColor);
}if(!Ext.isEmpty(i.uppermajor_enum)){Ext.getCmp("uppermajor_enum").setValue(i.uppermajor_enum);}if(!Ext.isEmpty(i.upperminor_enum)){Ext.getCmp("upperminor_enum").setValue(i.upperminor_enum);}if(!Ext.isEmpty(i.upperCritical_enum)){Ext.getCmp("upperCritical_enum").setValue(i.upperCritical_enum);}if(!Ext.isEmpty(i.criticalColor)){Ext.get("upperCritical_enum").setStyle("background-color",i.criticalColor);
}if(!Ext.isEmpty(i.majorColor)){Ext.get("uppermajor_enum").setStyle("background-color",i.majorColor);}if(!Ext.isEmpty(i.minorColor)){Ext.get("upperminor_enum").setStyle("background-color",i.minorColor);}if(!Ext.isEmpty(i.uppermajor_appl)){Ext.getCmp("uppermajor_appl").setValue(i.uppermajor_appl);}if(!Ext.isEmpty(i.upperminor_appl)){Ext.getCmp("upperminor_appl").setValue(i.upperminor_appl);
}if(!Ext.isEmpty(i.upperCritical_appl)){Ext.getCmp("upperCritical_appl").setValue(i.upperCritical_appl);}if(!Ext.isEmpty(i.criticalColor)){Ext.get("upperCritical_appl").setStyle("background-color",i.criticalColor);}if(!Ext.isEmpty(i.majorColor)){Ext.get("uppermajor_appl").setStyle("background-color",i.majorColor);
}if(!Ext.isEmpty(i.minorColor)){Ext.get("upperminor_appl").setStyle("background-color",i.minorColor);}}}}}});},zoneOnChange:function(){Ext.getCmp("resultPanel").hide();var b=Ext.getCmp("mainform").getForm();var c;var d=b.findField("select_farm").getValue();var a=b.findField("er_option").getValue();if(d!="-1"){c="/final/reporter/ErCtxLogonSimulatorJSON.jsp?er_zone="+encodeURIComponent(d);
Ext.Ajax.request({url:c,scope:this,method:"GET",success:function(e){var i=e.responseText;var g=Ext.decode(i);appConstants.publicjsonDataUsage=g;var f=appConstants.publicjsonDataUsage.screenLabels;comboRawData=appConstants.publicjsonDataUsage.compTypeCombo;selectedComboOption=appConstants.publicjsonDataUsage.selectedCompType;
comboObject=b.findField("er_compType");comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);}comboRawData=appConstants.publicjsonDataUsage.componentCombo;
selectedComboOption=appConstants.publicjsonDataUsage.selectedComponents;comboObject=Ext.getCmp("er_server");appConstants.rawDataForComponents=comboRawData;comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);
}comboRawData=appConstants.publicjsonDataUsage.applnCombo;selectedComboOption=appConstants.publicjsonDataUsage.selectedAppln;comboObject=b.findField("er_applicationX");appConstants.rawDataForApplication=comboRawData;comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);
if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);}else{comboObject.setValue(comboRawData[0].valueField);}comboObject=b.findField("appForAgent");comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(comboRawData);if(!Ext.isEmpty(selectedComboOption)){comboObject.setValue(selectedComboOption);
}else{comboObject.setValue(comboRawData[0].valueField);}var h=g.locationselectOptions.selectedLocationsType;comboObject=Ext.getCmp("er_location");comboObject.getStore().clearFilter(true);comboObject.getStore().loadRawData(g.locationCmbo);if(!Ext.isEmpty(h)&&h!=undefined){comboObject.setValue(h);}else{if(!Ext.isEmpty(g.locationCmbo)){comboObject.setValue(g.locationCmbo[0].valueField);
}else{comboObject.setValue("-1");}}}});}},LoadFieldsForUsage:function(){var a="/final/reporter/ErCtxLogonSimulatorJSON.jsp";Ext.Ajax.request({url:a,scope:this,method:"POST",success:function(b){var d=b.responseText;var c=Ext.decode(d);appConstants.publicjsonDataUsage=c;this.getMain().setTitle(c.reportTitle);
this.fillFormFieldsForUsage(c);}});},fillFormFieldsForUsage:function(j){var b=Ext.getCmp("mainform").getForm();b.findField("er_mode").hide();if(Ext.getCmp("er_excwe")!=undefined){Ext.getCmp("er_excwe").hide();Ext.getCmp("logonStatusSepId").hide();}Ext.getCmp("egcomponent").show();Ext.getCmp("er_server").show();
b.findField("er_compType").show();b.findField("er_applicationX").show();var c=appConstants.publicjsonDataUsage.hiddenfields;var e=c["fromScheduleModify"];var h=c["fromFavoriteModify"];if((e!=null&&e=="Yes")||(h!=null&&h=="Yes")){Ext.getCmp("submit").hide();Ext.getCmp("save").show();Ext.getCmp("favoriteTool").setDisabled(true);
Ext.getCmp("scheduleTool").setDisabled(true);}else{Ext.getCmp("submit").show();Ext.getCmp("save").hide();}var f;var g;var l;var i=j.screenLabels;f=j.viewApplnCombo;g=j.selectedViewAppln;var a="";if(j.hasOwnProperty("selectedAnalysisByCombo")){a=j.selectedAnalysisByCombo;}if(a=="Zone"||Ext.isEmpty(a)){Ext.getCmp("er_site").hide();
f=j.zoneCombo;g=j.selectedZone;l=b.findField("select_farm");l.setFieldLabel(i["reporter.common.Zone"]);l.getStore().clearFilter(true);l.getStore().loadRawData(f);if(!Ext.isEmpty(g)){l.setValue(g);}else{l.setValue(f[0].valueField);}}else{if(a=="Segment"){Ext.getCmp("select_farm").hide();f=j.siteCombo;
g=j.selectedSiteCombo;l=b.findField("er_site");l.setFieldLabel("Segment");l.getStore().clearFilter(true);l.getStore().loadRawData(f);if(!Ext.isEmpty(g)){l.setValue(g);}else{l.setValue(f[0].valueField);}l.show();}else{if(a=="Service"){Ext.getCmp("select_farm").hide();f=j.siteCombo;g=j.selectedSiteCombo;
l=b.findField("er_site");l.setFieldLabel("Service");l.getStore().clearFilter(true);l.getStore().loadRawData(f);if(!Ext.isEmpty(g)){l.setValue(g);}else{l.setValue(f[0].valueField);}l.show();}else{if(a=="Component"){Ext.getCmp("select_farm").hide();Ext.getCmp("er_site").hide();}}}}f=j.compTypeCombo;g=j.selectedCompType;
l=b.findField("er_compType");l.setFieldLabel(i["reporter.common.Component Type"]);l.getStore().clearFilter(true);l.getStore().loadRawData(f);if(!Ext.isEmpty(g)){l.setValue(g);}else{l.setValue(f[0].valueField);}component=Ext.getCmp("er_server");var k=j.componentCombo;var d=j.selectedComponents;appConstants.rawDataForComponents=k;
component.getStore().loadRawData(k);if(!Ext.isEmpty(d)){component.setValue(d);}else{if(!Ext.isEmpty(k)){component.setValue(k[0].valueField);}else{component.setValue("-1");}}l.resumeEvents();if(targetType=="applicationBased"){Ext.getCmp("er_location").hide();f=j.applnCombo;g=j.selectedAppln;l=b.findField("er_applicationX");
l.getStore().clearFilter(true);l.getStore().loadRawData(f);if(appConstants.isThirdPage!=null&&appConstants.isThirdPage=="true"&&!Ext.isEmpty(j.selectedapplicationX)){l.setValue(j.selectedapplicationX);}else{if(!Ext.isEmpty(g)&&appConstants.isThirdPage!=null&&appConstants.isThirdPage!="true"){l.setValue(g);
}else{l.setValue(f[0].valueField);}}Ext.getCmp("appForAgent").hide();}else{Ext.getCmp("er_applicationX").hide();f=j.applnCombo;g=j.selectedAppln;l=b.findField("appForAgent");l.getStore().clearFilter(true);l.getStore().loadRawData(f);if(appConstants.isThirdPage!=null&&appConstants.isThirdPage=="true"&&!Ext.isEmpty(j.selectedapplicationX)){l.setValue(j.selectedapplicationX);
}else{if(!Ext.isEmpty(g)&&appConstants.isThirdPage!=null&&appConstants.isThirdPage!="true"){l.setValue(g);}else{l.setValue(f[0].valueField);}}f=j.locationCmbo;g=j.selectedAppln;l=b.findField("er_location");l.getStore().clearFilter(true);l.getStore().loadRawData(j.locationCmbo);if(!Ext.isEmpty(j.selectedLocationsType)&&j.selectedLocationsType!=undefined){l.setValue(j.locationselectOptions.selectedLocationsType);
}else{if(!Ext.isEmpty(f)){l.setValue(f[0].valueField);}else{l.setValue(j.locationselectOptions.valueField);}}}},saveReportAsPDF:function(){var c;c=appConstants.queryStringUsage;c+="&pageWidthProces=1024&options=graph&pdfPrint=yes&pdf=yes";if(appConstants.checkFull!=undefined){c+="&checkFull="+appConstants.checkFull;
}if(appConstants.byName!=undefined){c+="&byName="+appConstants.byName;}if(appConstants.fromAppLaunchIcon!=undefined){c+="&fromAppLaunchIcon="+appConstants.fromAppLaunchIcon;}var b="../reporter/ErHtmlToSavePdf.jsp?&pdfPrint=yes&isChartRequest=true&er_width=450&er_height=250&options=graph"+c;var g=Ext.getCmp("er_server").getValue();
var e=Ext.getCmp("er_location").getValue();var d=Ext.getCmp("er_applicationX").getValue();b+="&selectedLoc="+e+"&selectedApp="+encodeURIComponent(d)+"&selectedCompnt="+g;if(appConstants.commonPage!=null&&appConstants.commonPage!=undefined&&appConstants.commonPage=="yes"){b+="&commonPage="+appConstants.commonPage;
}var a=false;if(Ext.getCmp("showLegend")!=undefined){var a=Ext.getCmp("showLegend").getValue();if(a!=null&&a!=undefined&&a!="undefined"){var f="&showLegend="+a;if(b.indexOf(f)==-1){if(b.indexOf("&showLegend=")>-1){if(a.toString()=="true"){b=b.replace("&showLegend=false",f);}else{b=b.replace("&showLegend=true",f);
}}else{b+=f;}}}}if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}b=this.getGridColSortParam(b);appConstants.erUtils.savePDF(b);},getGridColSortParam:function(e){var b=e.indexOf("er_sortby");if(b>-1){var d;var c=e.substring(b+10,b+12);if(c=="-1"){d="er_sortby="+c;}else{d="er_sortby="+parseInt(c);
}e=e.replace(d,"er_sortby="+this.gridColIndexParam);}else{e+="&er_sortby="+this.gridColIndexParam;}var a="1";if(this.gridColStateParam=="ASC"){a="1";}else{a="0";}return e+"&orderBy="+a;},bookletQuery:function(h){var c;c=appConstants.queryStringUsage;c+="&pageWidthProces=1024&options=graph&pdfPrint=yes&pdf=yes";
if(appConstants.checkFull!=undefined){c+="&checkFull="+appConstants.checkFull;}if(appConstants.byName!=undefined){c+="&byName="+appConstants.byName;}if(appConstants.fromAppLaunchIcon!=undefined){c+="&fromAppLaunchIcon="+appConstants.fromAppLaunchIcon;}var b="pdfPrint=yes&isChartRequest=true&er_width=450&er_height=250&options=graph"+c;
var g=Ext.getCmp("er_server").getValue();var e=Ext.getCmp("er_location").getValue();var d=Ext.getCmp("er_applicationX").getValue();b+="&selectedLoc="+e+"&selectedApp="+encodeURIComponent(d)+"&selectedCompnt="+g;if(appConstants.commonPage!=null&&appConstants.commonPage!=undefined&&appConstants.commonPage=="yes"){b+="&commonPage="+appConstants.commonPage;
}var a=false;if(Ext.getCmp("showLegend")!=undefined){var a=Ext.getCmp("showLegend").getValue();if(a!=null&&a!=undefined&&a!="undefined"){var f="&showLegend="+a;if(b.indexOf(f)==-1){if(b.indexOf("&showLegend=")>-1){if(a.toString()=="true"){b=b.replace("&showLegend=false",f);}else{b=b.replace("&showLegend=true",f);
}}else{b+=f;}}}}if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}b=this.getGridColSortParam(b);return b;},bookletScheduleQuery:function(b){var a="&er_trgttype="+targetType+appConstants.queryStringUsage;return a;},bookletPreview:function(){this.printReport();},printReport:function(){var b;
if(appConstants.printPageIdentify!=null&&appConstants.printPageIdentify=="appSecondPage"){var e="&selectedApp="+Ext.getCmp("er_applicationX").getValue();if(appConstants.queryStringUsage.indexOf("&selectedApp=All")>-1){appConstants.queryStringUsage=appConstants.queryStringUsage.replace("&selectedApp=All",e);
}}b="/final/reporter/ErCtxLogonSimulatorPRINT.jsp?&pdf=no&pdfPrint=yes&isChartRequest=true&er_width=450&er_height=250&options=graph"+appConstants.queryStringUsage;if(appConstants.checkFull!=undefined){b+="&checkFull="+appConstants.checkFull;}if(appConstants.byName!=undefined){b+="&byName="+appConstants.byName;
}if(appConstants.fromAppLaunchIcon!=undefined){b+="&fromAppLaunchIcon="+appConstants.fromAppLaunchIcon;}if(appConstants.commonPage!=null&&appConstants.commonPage!=undefined&&appConstants.commonPage=="yes"){b+="&commonPage="+appConstants.commonPage;}var g=Ext.getCmp("er_server").getValue();var d=Ext.getCmp("er_location").getValue();
var c=Ext.getCmp("er_applicationX").getValue();b+="&selectedLoc="+encodeURIComponent(d)+"&selectedApp="+encodeURIComponent(c)+"&selectedCompnt="+g;var a=false;if(Ext.getCmp("showLegend")!=undefined){var a=Ext.getCmp("showLegend").getValue();if(a!=null&&a!=undefined&&a!="undefined"){var f="&showLegend="+a;
if(b.indexOf(f)==-1){if(b.indexOf("&showLegend=")>-1){if(a.toString()=="true"){b=b.replace("&showLegend=false",f);}else{b=b.replace("&showLegend=true",f);}}else{b+=f;}}}b=this.getGridColSortParam(b);}parent.printWindowFn(b);},sendMail:function(){var a=Ext.widget("sendmail");a.show();},saveSchedule:function(){var a=Ext.getCmp("mainform").getForm();
var f=this.validateMainForm(false);if(f&&a.findField("er_timeline").getValue()=="Any"){Ext.MessageBox.show({title:"Operation Reports",msg:"Chosen timeline not allowed",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});f=false;}if(f){var b;this.updateQStringUsage();b="/final/reporter/ErSaveSchedule.jsp?"+appConstants.queryStringUsage;
if(appConstants.byName==null){appConstants.byName="no";}b+="&byName="+appConstants.byName;var e=b+"&com.eg.CSRF_NONCE="+csrfToken;if(appConstants.formButtonId=="save"){e+="&showSchWindow=no";var d=e.substr(0,e.indexOf("?"));var g=e.substr(e.indexOf("?")+1,e.length-1);var c=Ext.create("Ext.form.Panel");
c.submit({url:d,params:g,standardSubmit:true,method:"POST"});}else{parent.scheduleWindowFn(e);}}else{return;}},saveFavorite:function(){var i=this.validateMainForm(false);var a=Ext.getCmp("mainform").getForm();if(i){var g;this.updateQStringUsage();var c=appConstants.publicjsonDataUsage["hiddenfields"];
var h=c["favorite_id"];g="../servlet/com.eg.ErFavoriteC?cmd=client&er_trgttype="+targetType+"&"+appConstants.queryStringUsage+"&isFavorite=true&er_view=GRAPH&er_excwe=No";var f=g+"&er_RmDispName="+appConstants.er_RmDispName+"&com.eg.CSRF_NONCE="+csrfToken;if(appConstants.formButtonId=="save"){if((h=="null"||h=="undefined"||h==undefined)&&appConstants.favorite_id!="null"){h=appConstants.favorite_id;
}f+="&showSchWindow=no"+"&FavoriteId="+h;var d=f.substr(0,f.indexOf("?"));var b=f.substr(f.indexOf("?")+1,f.length-1);var e=Ext.create("Ext.form.Panel");e.submit({url:d,params:b,standardSubmit:true,method:"POST"});}else{parent.favouriteWindowFn(f);}}else{return;}},validateMainForm:function(y){var k=Ext.getCmp("mainform").getForm();
var h=null;if(isSettingsEnabled){h=this.getThinclientapplicationsettings().getForm();}var q=k.findField("er_compType");var G=k.findField("er_server");var C=k.findField("er_applicationX");var x=k.findField("appForAgent");var w=k.findField("er_location");if(q.getValue()=="-1"){Ext.MessageBox.show({title:"Logon Simulator",msg:q.getStore().getAt(0).get("displayField"),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}if(G.getValue()=="-1"){Ext.MessageBox.show({title:"Logon Simulator",msg:G.getStore().getAt(0).get("displayField"),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}if(targetType=="applicationBased"){if(C.getValue()=="-1"&&appConstants.forceSubmit=="true"){return false;
}else{if(C.getValue()=="-1"){Ext.MessageBox.show({title:"Logon Simulator",msg:C.getStore().getAt(0).get("displayField"),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}}}else{if(w.getValue()=="-1"){Ext.MessageBox.show({title:"Logon Simulator",msg:w.getStore().getAt(0).get("displayField"),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}if(x.getValue()=="-1"){Ext.MessageBox.show({title:"Logon Simulator",msg:x.getStore().getAt(0).get("displayField"),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}}var b=Ext.getCmp("er_applicationX").getValue();var z=Ext.getCmp("er_location").getValue();if(targetType=="applicationBased"){z=null;
}else{b=null;}if((b!=null&&b!=undefined&&b=="All")||(z!=null&&z!=undefined&&z=="all")){if(isSettingsEnabled){var K;var t;var o;K=Ext.getCmp("upperCritical").getValue();if(Ext.isEmpty(K)||K.length==0){Ext.MessageBox.show({title:"Logon Simulator settings",msg:"Invalid Critical Value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}o=Ext.getCmp("uppermajor").getValue();if(Ext.isEmpty(o)||o.length==0){Ext.MessageBox.show({title:"Logon Simulator settings",msg:"Invalid Major Value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}t=Ext.getCmp("upperminor").getValue();if(Ext.isEmpty(t)||t.length==0){Ext.MessageBox.show({title:"Logon Simulator settings",msg:"Invalid Minor Value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}if(K<=o||K<=t){Ext.MessageBox.show({title:"Logon Simulator settings",msg:"Critical Value Should be greater than other values",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}if(o<=t){Ext.MessageBox.show({title:"Logon Simulator settings",msg:"Major Value Should be greater than Minor value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}var E;var l;var i;E=Ext.getCmp("upperCritical_enum").getValue();if(Ext.isEmpty(E)||E.length==0){Ext.MessageBox.show({title:"Logon Simulator settings",msg:"Invalid Critical Value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}i=Ext.getCmp("uppermajor_enum").getValue();
if(Ext.isEmpty(i)||i.length==0){Ext.MessageBox.show({title:"Logon Simulator settings",msg:"Invalid Major Value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}l=Ext.getCmp("upperminor_enum").getValue();if(Ext.isEmpty(l)||l.length==0){Ext.MessageBox.show({title:"Logon Simulator settings",msg:"Invalid Minor Value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}if(E<=i||E<=l){Ext.MessageBox.show({title:"Logon Simulator settings",msg:"Critical Value Should be greater than other values",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}if(i<=l){Ext.MessageBox.show({title:"Logon Simulator settings",msg:"Major Value Should be greater than Minor value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}var s;var d;var a;s=Ext.getCmp("upperCritical_appl").getValue();if(Ext.isEmpty(s)||s.length==0){Ext.MessageBox.show({title:"Logon Simulator settings",msg:"Invalid Critical Value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}a=Ext.getCmp("uppermajor_appl").getValue();
if(Ext.isEmpty(a)||a.length==0){Ext.MessageBox.show({title:"Logon Simulator settings",msg:"Invalid Major Value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}d=Ext.getCmp("upperminor_appl").getValue();if(Ext.isEmpty(d)||d.length==0){Ext.MessageBox.show({title:"Logon Simulator settings",msg:"Invalid Minor Value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}if(s<=a||s<=d){Ext.MessageBox.show({title:"Logon Simulator settings",msg:"Critical Value Should be greater than other values",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}if(a<=d){Ext.MessageBox.show({title:"Logon Simulator settings",msg:"Major Value Should be greater than Minor value",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}}}var v;v=appConstants.publicjsonDataUsage;var u=true;var H=v["hiddenfields"];var I=H["getMaxDaysInMonth"];var m=this.getSettingsFieldValue(h,"reportGeneration",isSettingsEnabled,"reportGeneration");var p="";if(!Ext.isEmpty(H["userTimeline"])){p=H["userTimeline"];}var n=k.findField("er_timeline").getValue();
var j=k.findField("er_stdate").getValue();var F=k.findField("er_enddate").getValue();var D=k.findField("er_sthr").getValue();var L=k.findField("er_endhr").getValue();j.setHours(D);F.setHours(L);var g=this.getSettingsFieldValue(h,"timefrom",isSettingsEnabled,"selectedTimeFrom");var A=this.getSettingsFieldValue(h,"minfrom",isSettingsEnabled,"selectedMinsFrom");
var c=this.getSettingsFieldValue(h,"timeto",isSettingsEnabled,"selectedTimeTo");var r=this.getSettingsFieldValue(h,"minto",isSettingsEnabled,"selectedMinsTo");if(!checkTimePeriod(g,A,c,r)){u=false;}if(!checkDateTime(j,F)){u=false;}if(p!=null&&p!="-1"){var e=isUserTimelineLimitExceeded(p,I,j,F);if(!e){Ext.MessageBox.show({title:"Thin Client Application settings",msg:appConstants.userTimelineErrorMsg,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
u=false;}}if(m!=null&&m=="foreground"){var f=H["limitforbg"];if(!Ext.isEmpty(f)){if(y){}}}else{var J=h.findField("bgReportName").getValue();if(!validateTextBoxWithSpecialChars(J,"Attachment",true)){u=false;}}if(u){var B=Ext.getCmp("submit");B.setDisabled(false);return true;}else{return false;}},toggleForm:function(b){Ext.getCmp("panelinsidetoggle").show();
Ext.getCmp("panelinsidetoggle").setDisabled(false);var a=Ext.getCmp("mainform");if(a.isHidden()){a.show();Ext.getCmp("selectionDetails").hide();}else{a.hide();Ext.getCmp("selectionDetails").show();}},showResult:function(){var g=Ext.getCmp("resultPanel");g.removeAll();var c=Ext.getCmp("mainform").getForm();
var e=c.findField("er_stdate").getValue();var f=c.findField("er_sthr").getValue();e.setHours(f);var b=c.findField("er_enddate").getValue();var d=c.findField("er_endhr").getValue();b.setHours(d);var a=checkDateTime(e,b);if(!a){return;}var h=this.validateMainForm(true);if(h){this.submitReport();}},validateSettings:function(){var a=true;
var b=Ext.getCmp("reportGeneration").getValue();if(b!=null&&(b=="background"||b=="background-csv")){var c=Ext.getCmp("bgReportName").getValue();if(!validateTextBoxWithSpecialChars(c,"Attachment",true)){a=false;}}return a;},showConfirmResult:function(d){if(d=="yes"){var b=Ext.getCmp("submit");this.submitReport();
}else{if(!isSettingsEnabled){this.showConfigDropdown();}var c=this.getThinclientapplicationsettings().getForm();var a=c.findField("reportGeneration");var e=c.findField("bgReportName");a.setValue("background");e.setValue("");e.show();e.focus(false,1000);Ext.getCmp("submitViaSetting").show();Ext.getCmp("moreOptionCloseId").hide();
this.showResult();}},getXmlForUrl:function(b){try{var a;Ext.Ajax.request({url:b,method:"GET",async:false,success:function(d){var e=d.responseText;a=Ext.decode(e);},failure:function(){alert("I am not loading..."+b);}});return a;}catch(c){alert("[Exception] "+c);}},loadGrid:function(b){var n=Ext.getCmp("resultPanel");
var s=Ext.getCmp("mainform").getForm();var f=Ext.getCmp("er_location").getValue();var h=Ext.getCmp("appForAgent").getValue();var e=new Array();e=Ext.getCmp("er_server").getValue();var x=this;n.removeAll();n.show();var y=b.enableEnumulation;var A=b.table_data;var d=b["firstPageData"];var m=false;if(b.table_data!=undefined&&!Ext.isEmpty(b.table_data)){var o='<div class="newTable" style="overflow:auto"><table align="center" valign="middle" width="100%">';
o+="<thead>";o+="<tr>";o+=' <th align="center" rowspan="2" style="width:20%">SIMULATION</th > ';o+='<th align="center" rowspan="2" style="width:20%">EXTERNAL AGENT</th >';o+=' <th align="center" colspan="2" style="width:20%;text-align:center">WEB LOGON</th >';if(y){o+=' <th align="center" colspan="2" style="width:20%;text-align:center">APPLICATION/DESKTOP ENUMERATION</th >';
}o+='<th align="center" colspan="2"  style="width:20%;text-align:center">APPLICATION/DESKTOP LAUNCH</th >';o+="</tr>";o+="<tr>";o+=' <th style="text-align:center" class="subHeader">Availability (%)</th >';o+=' <th style="text-align:center" class="subHeader">Duration (secs)</th > ';if(y){o+=' <th style="text-align:center" class="subHeader">Availability (%)</th >';
o+=' <th style="text-align:center" class="subHeader">Duration (secs)</th > ';}o+=' <th style="text-align:center" class="subHeader">Availability (%)</th >';o+=' <th style="text-align:center" class="subHeader">Duration (secs)</th >';o+="</tr>";o+="</thead>";o+"<tbody>";appConstants.printPageIdentify="locMainTable";
appConstants.queryStringUsage+="&printPageIdentify="+appConstants.printPageIdentify;var w=1;for(var B in A){if(w%2==0){className="alterColor2";}else{className="alterColor1";}var l=B.substring(0,B.indexOf("#"));var z=B.substring(B.indexOf("#")+1,B.length);var a=A[B];o+="<tr>";w=w+1;o+='<td rowspan="'+z+'" class="'+className+'">'+l+"</td>";
for(var t=0;t<a.length;t++){var r=a[t];for(var q=0;q<r.length;q++){var u=d["hrefUrl"];var j=Ext.getCmp("er_option");if(j!=undefined){u+="&er_option="+j.getValue();if(j.getValue()=="Zone"){var p=s.findField("select_farm").getValue();u+="&er_zone="+p;}else{if(j.getValue()=="Segment"||j.getValue()=="Service"){var g=Ext.getCmp("er_site");
u+="&er_site="+g.getValue();}}}if(appConstants.isFifthPage!=null&&appConstants.isFifthPage!="true"&&appConstants.isFourthPage!=null&&appConstants.isFourthPage!="true"&&f!=undefined&&f=="all"&&!m){u+="&er_location="+r[0]+"&er_component="+l+"&isNavigation=true&isNeedBack=true&isFourthPage=false&isFifthPage=false&printPageIdentify=locFirstPage"+"&appForAgent="+encodeURIComponent(h);
appConstants.isFromBack=false;}else{if(appConstants.isFromBack){u+="&er_location="+r[0]+"&er_component="+l+"&isNeedBack="+appConstants.isNeedBack+"&appForAgent="+encodeURIComponent(h);}if(appConstants.isFifthPage!=null&&appConstants.isFifthPage!="true"&&appConstants.isFourthPage!=null&&appConstants.isFourthPage!="true"&&!appConstants.isFromBack){m=true;
for(var q=0;e.length>q;q++){u+="&er_component="+e[q];}u+="&er_location="+f+"&firstpage=true"+"&er_trgttype="+targetType+"&isNeedBack="+appConstants.isNeedBack+"&isFourthPage=false&isFifthPage=false&printPageIdentify=locFirstPage"+"&appForAgent="+encodeURIComponent(h);this.goFirstPage(u,appConstants.isNeedBack);
return;}else{if(appConstants.isFourthPage!=null&&appConstants.isFourthPage=="true"&&!appConstants.isFromBack){for(var q=0;e.length>q;q++){u+="&er_component="+e[q];}u+="&er_location="+f+"&firstpage=true"+"&er_trgttype="+targetType+"&isFourthPage=true&pageNo=2&isNavigation=false&isNeedBack="+appConstants.isNeedBack+"&appForAgent="+encodeURIComponent(h);
this.goFourthPage(u);return;}else{if(appConstants.isFifthPage!=null&&appConstants.isFifthPage=="true"&&!appConstants.isFromBack){for(var q=0;e.length>q;q++){u+="&er_component="+e[q];}u+="&er_location="+f+"&firstpage=true"+"&er_trgttype="+targetType+"&isFifthPage=true&pageNo=2&isNavigation=false&isNeedBack="+appConstants.isNeedBack+"&appForAgent="+encodeURIComponent(h);
this.goFifthPage(u);return;}}}}o+='<td style="cursor:pointer;" class="'+className+'" ><a href="javascript:void(0);" onClick="javascript:showDrillDownData(\''+u+"','"+"true"+"');\" >"+r[q]+"</a></td>";if(appConstants.isFifthPage!=null&&appConstants.isFifthPage!="true"&&appConstants.isFourthPage!=null&&appConstants.isFourthPage!="true"&&f!=undefined&&f!="all"&&!appConstants.isFromBack){u+="&er_location="+r[0]+"&er_component="+l+"&firstpage=true"+"&er_trgttype="+targetType+"&isNeedBack="+appConstants.isNeedBack+"&printPageIdentify=locFirstPage"+"&appForAgent="+encodeURIComponent(h);
this.goFirstPage(u,"true");return;}else{if(appConstants.isFourthPage!=null&&appConstants.isFourthPage=="true"&&!appConstants.isFromBack){for(var q=0;e.length>q;q++){u+="&er_component="+e[q];}u+="&er_location="+f+"&firstpage=true"+"&er_trgttype="+targetType+"&isFourthPage=true&pageNo=2&isNavigation=false&isNeedBack="+appConstants.isNeedBack+"&appForAgent="+encodeURIComponent(h);
this.goFourthPage(u);return;}else{if(appConstants.isFifthPage!=null&&appConstants.isFifthPage=="true"&&!appConstants.isFromBack){for(var q=0;e.length>q;q++){u+="&er_component="+e[q];}u+="&er_location="+f+"&firstpage=true"+"&er_trgttype="+targetType+"&isFifthPage=true&pageNo=2&isNeedBack="+appConstants.isNeedBack+"&appForAgent="+encodeURIComponent(h);
this.goFifthPage(u);return;}}}if(r.length-q==1){o+="</tr>";}}if(t<a.length-1){o+="<tr>";}}}o+="</div>";o+="</div>";o+="</tbody></table>";o+="</div>";n.show();n.removeCls("containerShadow");n.addCls("");n.setTitle("LOGON SIMULATOR");n.add({xtype:"container",border:true,html:o,flex:1,cls:"selectionDetailsBorder selectionDetailsBg",margin:"5 10 10 10",layout:{type:"fit",align:"stretch"},});
}else{this.disableTools();n.hide();var c=Ext.getCmp("errorPanelId");var v='<div class="egFlexCenterByColumnWise" style="height:100%"> <div class="iconInformation"></div> <div class="commonErrorMsgText">No Measures Available!</div> </div>';c.add({xtype:"panel",html:v,ui:"newGraphPanel",margin:"5 10 10 10",flex:1,layout:{type:"fit",align:"stretch"},});
c.show();}},goFirstPage:function(b,h){appConstants.commonPage=null;appConstants.printPageIdentify="locFirstPage";appConstants.queryStringUsage=appConstants.queryStringUsage.replace("locMainTable",appConstants.printPageIdentify);initLdgMask.show();var d=this;var a=b.substring(b.indexOf("?")+1);var f=b.substring(0,b.indexOf("?"));
var c=Ext.getCmp("resultPanel");c.removeAll();var i="";var g;var e=Ext.getCmp("er_location");if(h!=undefined&&h=="true"){g=false;}else{if(appConstants.fromLoc!=undefined&&appConstants.fromLoc=="yes"&&(e==undefined||(e!=undefined&&e.getValue()=="All"||e.getValue()=="all"))){g=false;}else{if(appConstants.splEntry!=undefined&&appConstants.splEntry=="yes"){g=false;
}else{g=true;}}}Ext.Ajax.request({url:f,params:a+"&responseType=json",method:"POST",scope:this,success:function(l){var r=l.responseText;var F=Ext.decode(r);var t=F.checkData;appConstants.publicjsonDataUsage=F;var p=F.enableEnumulation;var Y=F.firstPageData;var U=Y["summaryList_1"]["totalLogon"];var S=Y["summaryList_1"]["successLogon"];
var C=Y["summaryList_1"]["failLogon"];var G=Y["availabilityList"]["avgLogonAvail"];var Q=Y["availabilityList"]["avgEnumAvail"];var w=Y["availabilityList"]["avgAppLaunchAvail"];var I="";if(U>0){I+='<div margin:-6px auto 0px auto;" align="center"><table><tr><td align="right"><div id="donuts_id" ></div></td>';
I+='<td align="left"><table align="center" cellpadding="0" cellspacing="0" border="0"><tbody>';if(F.summSucc!=undefined&&F.summSucc!=null){I+='<tr><td ><div style="background-color:#32B395;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">'+F.summSucc+"</td></tr>";
}if(F.summFail!=undefined&&F.summFail!=null){I+='<tr><td><div style="background-color:#EC7672;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">'+F.summFail+"</td></tr>";}I+="</tbody></table></td></tr></table></div>";}if(G!=undefined&&w!=undefined&&U>0){var M=Ext.getCmp("er_location").getValue();
var W;W=Ext.getCmp("er_location");W.getStore().clearFilter(true);W.getStore().loadRawData(F.locationCmbo);W.setValue(F.selectedLocation);if(F.selectedLocation!=undefined&&F.selectedLocation!="all"&&isSettingsEnabled){Ext.getCmp("lowLimitLbl").hide();Ext.getCmp("lowLimitLbl_enum").hide();Ext.getCmp("lowLimitLbl_appl").hide();
Ext.getCmp("logonStatusSepId").hide();}W=Ext.getCmp("er_server");var B=F.componentCombo;var j=F.selectedComponents;appConstants.rawDataForComponents=B;W.getStore().loadRawData(B);if(!Ext.isEmpty(j)){W.setValue(j);}else{if(!Ext.isEmpty(B)){W.setValue(B[0].valueField);}else{W.setValue("-1");}}initLdgMask.hide();
if(appConstants.splEntry!=undefined&&appConstants.splEntry=="yes"){this.insideBackButton(6,false);}else{this.insideBackButton(1,g);}c.add({xtype:"panel",margin:"10 10 0 10",ui:"newGraphPanel",title:overviewOfSimsLabel+'<span class="f13-normal" style="margin-left:20px">('+simulatorLabel+" : "+F.selectedComponents+", "+externalAgentLabel+" : "+F.selectedLocation+")</span>",bodyPadding:"0 0 4 0",padding:0,layout:{type:"hbox",align:"center"},defaults:{flex:0.22,},items:[{xtype:"container",autoSize:true,align:"stretch",height:"100%",layout:{type:"vbox",align:"center",pack:"center"},defaults:{padding:"6px 5px 5px 5px",},items:[{xtype:"container",cls:"mouseOverHighlight",html:'<table align="center" onClick="javascript:totalGraphs(\''+b+"&printPageIdentify=commonPage"+"','"+"true"+"','"+"full"+'\');" style="cursor:pointer;"><tr><td align="center" nowrap><div class="egFlexCenterByRowWise"><div class="iconTotalSimulations"/></div><div class="newFont_bold28" style="margin:5px;">'+U+'</div></div></td></tr><tr><td align="center"  width="100%" style="padding:0px 5px 10px 5px"><span class="newFont_normal13">'+totalLabel+"</span></td></tr></table>"}]},{xtype:"container",autoSize:true,align:"stretch",height:"100%",layout:{type:"vbox",align:"center",pack:"center"},defaults:{padding:"6px 5px 5px 5px",},items:[{xtype:"container",cls:"mouseOverHighlight",html:'<table align="center" onClick="javascript:totalGraphs(\''+b+"&printPageIdentify=commonPage"+"','"+"true"+"','"+"full"+'\');" style="cursor:pointer;"><tr><td align="center" nowrap><div class="egFlexCenterByRowWise"><div class="iconSuccessfulSimulations"/></div><div class="newFont_bold28" style="margin:5px;">'+S+'</div></div></td></tr><tr><td align="center"  width="100%" style="padding:0px 5px 10px 5px"><span class="newFont_normal13">'+successLabel+"</span></td></tr></table>"}]},{xtype:"container",autoSize:true,align:"stretch",height:"100%",layout:{type:"vbox",align:"center",pack:"center"},defaults:{padding:"6px 5px 5px 5px",},items:[{xtype:"container",cls:"mouseOverHighlight",html:'<table align="center" onClick="javascript:totalGraphs(\''+b+"&printPageIdentify=commonPage"+"','"+"true"+"','"+"full"+'\');" style="cursor:pointer;"><tr><td align="center" nowrap><div class="egFlexCenterByRowWise"><div class="iconFailedSimulations"/></div><div class="newFont_bold28" style="margin:5px;">'+C+'</div></div></td></tr><tr><td align="center"  width="100%" style="padding:0px 5px 10px 5px"><span class="newFont_normal13">'+failureLabel+"</span></td></tr></table>"}]},{xtype:"container",align:"center",flex:0.34,autoSize:true,layout:{type:"table",rows:1,columns:1,align:"center",tableAttrs:{style:{"text-align":"center","width":"100%",}},},items:[{html:I,}]}]});
if(t&&!Ext.isEmpty(F.donutChart)&&F.donutChart!=undefined){var q={};q=jQuery.extend(true,{},getHighChartsBarInstance("donuts_id",150,150),q);q.setData(F.donutChart,"","","donut");q.drawChart();c.show();}var x=Ext.getCmp("mainform").getForm();var E="";if(G!=undefined&&G>=0){appConstants.fromAvailIcon="yes";
E='<table class="mouseOverHighlight"  onClick="javascript:totalGraphs(\''+b+"&fromAppIcon=yes&printPageIdentify=commonPage"+"','"+"false"+"','"+"fromLogon"+'\');" style="cursor:pointer;" align="center" ><tr><td align="center" nowrap><div class="egFlexCenterByRowWise"><div class="iconWebLogIn"/></div><div class="newFont_bold28" style="margin:5px;">'+G+'%</div></div></td></tr><tr><td align="center"  width="100%" style="padding:0px 5px 10px 5px"><span class="newFont_normal13">'+webLogonLabel+"</span></td></tr></table>";
}var D="";if(p&&Q!=undefined&&Q>=0){appConstants.fromEnumIcon="yes";D='<table class="mouseOverHighlight"  onClick="javascript:totalGraphs(\''+b+"&fromAppIcon=yes&printPageIdentify=commonPage"+"','"+"false"+"','"+"fromEnum"+'\');" style="cursor:pointer;" align="center" ><tr><td align="center" nowrap><div class="egFlexCenterByRowWise"><div class="iconAppEnumeration"/></div><div class="newFont_bold28" style="margin:5px;">'+Q+'%</div></div></td></tr><tr><td align="center"  width="100%" style="padding:0px 5px 10px 5px"><span class="newFont_normal13">'+applnDesktopEnumLabel+"</span></td></tr></table>";
}var A="";if(w!=undefined&&w>=0){appConstants.fromAppIcon="yes";A='<table class="mouseOverHighlight"  onClick="javascript:totalGraphs(\''+b+"&fromAppIcon=yes&printPageIdentify=commonPage"+"','"+"false"+"','"+"fromApp"+'\');" style="cursor:pointer;" align="center"><tr><td align="center" nowrap><div class="egFlexCenterByRowWise"><div class="iconAppLaunch"/></div><div class="newFont_bold28" style="margin:5px;">'+w+'%</div></div></td></tr><tr><td align="center"  width="100%" style="padding:0px 5px 10px 5px"><span class="newFont_normal13">'+applnDesktopLaunchLabel+"</span></td></tr></table>";
}var o="";if(t&&!Ext.isEmpty(F.logonAvaiStBar)&&F.logonAvaiStBar!=undefined){o='<div id="logonAvai_id" style="height:300px"></div>';}else{o='<div class="egFlexCenterByColumnWise" style="height:300px"> <div class="iconInformation"></div> <div class="commonErrorMsgText">No Measures Available!</div> </div>';
}if(p){var n="";if(t&&!Ext.isEmpty(F.enumAvai_graphMap)&&F.enumAvai_graphMap!=undefined){n='<div id="enumAvai_id" style="height:300px"></div>';}else{n='<div class="egFlexCenterByColumnWise" style="height:300px"> <div class="iconInformation"></div> <div class="commonErrorMsgText">No Measures Available!</div> </div>';
}}var m="";if(t&&!Ext.isEmpty(F.appSuFaAvg)&&F.appSuFaAvg!=undefined){m='<div id="appLaucngAvg_id" style="height:300px"></div>';}else{m='<div class="egFlexCenterByColumnWise" style="height:300px"> <div class="iconInformation"></div> <div class="commonErrorMsgText">No Measures Available!</div> </div>';
}var T=0.5;if(p){T=0.3;}c.add({xtype:"panel",margin:"10 10 0 10",ui:"newGraphPanel",title:availabilityLabel,id:"availabltyGrph",bodyPadding:"0 0 0 0",padding:0,flex:1,listeners:{resize:function(){if(!Ext.isEmpty($("#logonAvai_id").highcharts())||!Ext.isEmpty($("#enumAvai_id").highcharts())||!Ext.isEmpty($("#appLaucngAvg_id").highcharts())){$("#logonAvai_id").highcharts().reflow();
if(p){$("#enumAvai_id").highcharts().reflow();}$("#appLaucngAvg_id").highcharts().reflow();}}},layout:{type:"hbox",align:"stretch"},defaults:{flex:T,},items:[{xtype:"container",autoSize:true,height:370,margin:"0 0 20 0",cls:"graphSeperatorLineRight",defaults:{bodyStyle:"padding:5px",},items:[{xtype:"container",margin:"0 0 0 0",html:E},{xtype:"container",padding:"10 10 0 10",html:o}]}]});
if(p){Ext.getCmp("availabltyGrph").add({xtype:"container",margin:"0 0 20 0",defaults:{bodyStyle:"padding:5px",},cls:"graphSeperatorLineRight",items:[{xtype:"container",margin:"0 0 0 0",html:D},{xtype:"container",padding:"10 10 0 10",html:n}]});}Ext.getCmp("availabltyGrph").add({xtype:"container",autoSize:true,margin:"0 0 20 0",defaults:{bodyStyle:"padding:5px",},items:[{xtype:"container",margin:"0 0 0 0",html:A},{xtype:"container",padding:"10 10 0 10",html:m}]});
var O="";var P=5;if(t&&!Ext.isEmpty(F.avgDurationPie)&&F.avgDurationPie!=undefined){O='<div style="text-align:center;padding:0px 10px 10px 10px" class="newFont_bold13">'+responseDistrByStageLabel+'</div><div id="avgDura_id" style="height:260px;width:100%;overflow:hidden;padding:0px"></div>';}else{P=5;
O='<div style="text-align:center;padding:5px" class="newFont_bold13">'+responseDistrByStageLabel+'</div><div class="egFlexCenterByColumnWise" style="height:260px"> <div class="iconInformation"></div> <div class="commonErrorMsgText">No Measures Available!</div> </div>';}var N="";var s=webLogonDurationLabel;
if(p){s=webLogonEnumDurationLabel;}if(t&&!Ext.isEmpty(F.timlinSuccFailAvg)&&F.timlinSuccFailAvg!=undefined){N='<div style="text-align:center;padding:10px 10px 0px 10px" class="newFont_bold13">'+s+'</div><div id="timlin_id" style="height:200px;width:100%;overflow:hidden;padding:0px 5px 0px 5px"></div>';
}else{N='<div style="text-align:center;padding:5px" class="newFont_bold13">'+s+'</div><div class="egFlexCenterByColumnWise" style="height:260px"><div class="iconInformation"></div> <div class="commonErrorMsgText">No Measures Available!</div> </div>';}var L="";if(t&&!Ext.isEmpty(F.applicationLaunchTime)&&F.applicationLaunchTime!=undefined){L='<div style="text-align:center;padding:10px" class="newFont_bold13">'+applnDesktopLaunchTimeLabel+'</div><div id="appLaunchMax_Avg_Time_id" style="height:260px;width:100%;overflow:hidden;padding:0px"></div>';
}else{L='<div style="text-align:center;padding:5px" class="newFont_bold13">'+applnDesktopLaunchTimeLabel+'</div><div class="egFlexCenterByColumnWise" style="height:260px"><div class="iconInformation"></div> <div class="commonErrorMsgText">No Measures Available!</div> </div>';}var J="";if(t&&!Ext.isEmpty(F.diffAppDuratn)&&F.diffAppDuratn!=undefined){J='<div style="text-align:center;padding:10px 10px 0px 25px" class="newFont_bold13">'+applnDesktopLaunchAnalysisLabel+'</div><div id="appLaunchTime_id" style="height:210px;width:100%;overflow:hidden;padding:0px 5px 0px 5px"></div>';
}else{J='<div style="text-align:center;padding:5px" class="newFont_bold13">'+applnDesktopLaunchAnalysisLabel+'</div><div class="egFlexCenterByColumnWise" style="height:260px"><div class="iconInformation"></div> <div class="commonErrorMsgText">No Measures Available!</div> </div>';}c.add({xtype:"panel",margin:"10 10 10 10",ui:"newGraphPanel",title:performanceLabel,bodyPadding:"0 0 0 0",padding:"5 10 10 0",flex:1,layout:{type:"column",align:"stretch"},defaults:{columnWidth:0.5},items:[{xtype:"container",cls:"graphSeperatorLineBottomRight",padding:5,margin:"0 0 0 10",height:305,html:O},{xtype:"container",cls:"graphSeperatorLineBottom",height:305,items:[{xtype:"container",id:"timlin_id_GraphPanel",html:N},{xtype:"container",id:"timlin_id_legendPanel",margin:"10 0 0 0",height:55,style:{"overflow":"hidden"},}]},{xtype:"container",cls:"graphSeperatorLineRight",padding:5,html:L},{xtype:"container",height:280,items:[{xtype:"container",id:"appLaunchTime_id_GraphPanel",html:J},{xtype:"container",id:"appLaunchTime_id_legendPanel",margin:"10 0 0 0",height:55,style:{"overflow":"hidden"}}]}]});
if(t&&!Ext.isEmpty(F.logonAvaiStBar)&&F.logonAvaiStBar!=undefined){var z=F.logonAvaiStBar.chartWidth;if(!p){z=400;}var k={};k=jQuery.extend(true,{},getHighChartsBarInstance("logonAvai_id",F.logonAvaiStBar.chartHeight,z),k);k.setData(F.logonAvaiStBar,"<%=currentDateFormat%>","");k.drawChart();}if(p&&t&&!Ext.isEmpty(F.enumAvai_graphMap)&&F.enumAvai_graphMap!=undefined){var y={};
y=jQuery.extend(true,{},getHighChartsBarInstance("enumAvai_id",F.enumAvai_graphMap.chartHeight,F.enumAvai_graphMap.chartWidth),y);y.setData(F.enumAvai_graphMap,"<%=currentDateFormat%>","");y.drawChart();}if(t&&!Ext.isEmpty(F.appSuFaAvg)&&F.appSuFaAvg!=undefined){var X={};X=jQuery.extend(true,{},getHighChartsBarInstance("appLaucngAvg_id",F.appSuFaAvg.chartHeight,F.appSuFaAvg.chartWidth),X);
X.setData(F.appSuFaAvg,"<%=currentDateFormat%>","");X.drawChart();c.show();}if(t&&!Ext.isEmpty(F.avgDurationPie)&&F.avgDurationPie!=undefined){var R={};R=jQuery.extend(true,{},getHighChartsBarInstance("avgDura_id",F.avgDurationPie.chartHeight,F.avgDurationPie.chartWidth),R);R.setData(F.avgDurationPie,"<%=currentDateFormat%>","");
R.drawChart();c.show();}if(t&&!Ext.isEmpty(F.timlinSuccFailAvg)&&F.timlinSuccFailAvg!=undefined){var H={};H=jQuery.extend(true,{},getHighChartsInstance("timlin_id",F.timlinSuccFailAvg.chartHeight,F.timlinSuccFailAvg.chartWidth),H);H.setData(F.timlinSuccFailAvg,"MMM dd, yyyy","");H.drawChart();c.show();
}if(t&&!Ext.isEmpty(F.applicationLaunchTime)&&F.applicationLaunchTime!=undefined){var V={};V=jQuery.extend(true,{},getHighChartsBarInstance("appLaunchMax_Avg_Time_id",F.applicationLaunchTime.chartHeight,F.applicationLaunchTime.chartWidth),V);V.setData(F.applicationLaunchTime,"MMM dd, yyyy","");V.drawChart();
c.show();}if(t&&!Ext.isEmpty(F.diffAppDuratn)&&F.diffAppDuratn!=undefined){var K={};K=jQuery.extend(true,{},getHighChartsInstance("appLaunchTime_id",F.diffAppDuratn.chartHeight,F.diffAppDuratn.chartWidth),K);K.setData(F.diffAppDuratn,"MMM dd, yyyy","");K.drawChart();c.show();}}else{this.disableTools();
c.hide();var v=Ext.getCmp("errorPanelId");var u='<div class="egFlexCenterByColumnWise" style="height:100%"> <div class="iconInformation"></div> <div class="commonErrorMsgText">No Measures Available!</div> </div>';v.add({xtype:"panel",html:u,ui:"newGraphPanel",margin:"5 10 10 10",flex:1,layout:{type:"fit",align:"stretch"},});
v.show();}}});},goFourthPage:function(d){appConstants.printPageIdentify="locSecondPage";appConstants.queryStringUsage=appConstants.queryStringUsage.replace("locMainTable",appConstants.printPageIdentify);appConstants.queryStringUsage=appConstants.queryStringUsage.replace("locFirstPage",appConstants.printPageIdentify);
initLdgMask.show();var b=this;var c=d.substring(d.indexOf("?")+1);var a=d.substring(0,d.indexOf("?"));var g=Ext.getCmp("er_location").getValue();var f=Ext.getCmp("resultPanel");f.removeAll();var e="";Ext.Ajax.request({url:"../servlet/com.eg.ErCtxLogonSimulator",params:c+"&appForAgent="+encodeURIComponent(appForAgent)+"&responseType=json",method:"POST",scope:this,success:function(h){var A=h.responseText;
var n=Ext.decode(A);appConstants.publicjsonDataUsage=n;component=Ext.getCmp("er_server");var w=n.componentCombo;var B=n.selectedComponents;appConstants.rawDataForComponents=w;component.getStore().loadRawData(w);if(!Ext.isEmpty(B)){component.setValue(B);}else{if(!Ext.isEmpty(w)){component.setValue(w[0].valueField);
}else{component.setValue("-1");}}var u=n.checkData;var C=n.enableEnumulation;var l=n.firstPageData;var k=l["summaryList"]["totalLogon"];var p=l["summaryList"]["successLogon"];var t=l["summaryList"]["failLogon"];var v=l["summaryList"]["failedApp"];var s="";if(C){s=l["summaryList"]["failedEnum"];}var x=l["summaryList"]["failedSimu"];
var z=true;if(C){z=false;}e+='<div style="margin:1px auto 0px auto;" align="center"><table><tr><td align="right"><div  id="donuts_id" ></div></td>';if(k>0){e+='<td style="vertical-align:top;padding-top:10px !important"; align="top"><table align="top" cellpadding="0" cellspacing="0" border="0"><tbody>';
if(n.donSucc!=undefined&&n.donSucc!=null){e+='<tr><td><div style="background-color:#32B395;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">'+n.donSucc+"</td></tr>";}if(n.donEnum!=undefined&&n.donEnum!=null){e+='<tr><td><div style="background-color:#F8ABA7;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">'+n.donEnum+"</td></tr>";
}if(n.donFail!=undefined&&n.donFail!=null){e+='<tr><td><div style="background-color:#EF7672;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">'+n.donFail+"</td></tr>";}if(n.donfApp!=undefined&&n.donfApp!=null){e+='<tr><td><div style="background-color:#F7BD42;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">'+n.donfApp+"</td></tr>";
}e+="</tbody></table></td>";}e+="</tr></table></div>";initLdgMask.hide();this.insideBackButton(2,false);f.add({xtype:"panel",margin:"10 10 0 10",ui:"newGraphPanel",title:overviewOfSimsLabel+'<span style="font-size:13px;font-family:roboto;font-weight:400;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;('+simulatorLabel+" : "+n.selectedComponents+", "+externalAgentLabel+" : "+n.selectedLocation+")</span>",bodyPadding:"0 0 0 0",padding:0,layout:{type:"column",align:"stretch"},items:[{xtype:"container",columnWidth:0.66,padding:"6 5 0 5",layout:{type:"column",align:"center",pack:"center"},defaults:{columnWidth:0.24,padding:"8px 5px 0px 5px",},items:[{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table ><tr><td align="right"><img src="/final/images/spacer.gif" class="iconTotalSimulations"/></td><td align="left" style="padding:5px"><span class="newFont_bold28">'+k+'</span></td></tr><tr><td align="center" style="padding:6px 6px 1px 6px;word-break:break-all" colspan="2" class=newFont_normal13>'+totalLabel+"<br/> "+simulationsLabel+"</td></tr></table>",}]},{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table ><tr><td align="right"><img src="/final/images/spacer.gif" class="iconSuccessfulSimulations"/></td><td align="left" style="padding:5px"><span class="newFont_bold28">'+p+'</span></td></tr><tr><td align="center" style="padding:6px 6px 1px 6px;word-break:break-all" colspan="2" class=newFont_normal13>'+successfulLabel+"<br/> "+simulationsLabel+"</td></tr></table>",}]},{xtype:"container",autoSize:true,hidden:z,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table ><tr><td align="right"><img src="/final/images/spacer.gif" class="iconFailedEnumeration"/></td><td align="left" style="padding:5px"><span class="newFont_bold28">'+s+'</span></td></tr><tr><td align="center" style="padding:6px 6px 1px 6px;word-break:break-all" colspan="2" class="newFont_normal13">'+failedLabel+"<br/> "+enumerationsLabel+"</td></tr></table>",}]},{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table ><tr><td align="right"><img src="/final/images/spacer.gif" class="iconLogonFailed"/></td><td align="left" style="padding:5px"><span class="newFont_bold28">'+t+'</span></td></tr><tr><td align="center" style="padding:6px 6px 1px 6px;word-break: break-all" colspan="2" class="newFont_normal13">'+failedLabel+" <br/> "+webLogonLabel+"</td></tr></table>",}]},{xtype:"container",items:[{html:'<table><tr><td align="right"><img src="/final/images/spacer.gif" class="iconAppLaunch"/></td><td align="left" style="padding:5px"><span class="newFont_bold28">'+v+'</span></td></tr><tr><td align="center" style="padding:6px 6px 1px 6px;word-break: break-word" colspan="2" class="newFont_normal13">'+failedLabel+"<br/>"+applnDesktopLaunchLabel+"</td></tr></table>"}]}]},{xtype:"container",columnWidth:0.34,border:true,html:e,}]});
if(u&&!Ext.isEmpty(n.logonDonutHealth)&&n.logonDonutHealth!=undefined){var m='<div><table width="100%" ><col width="70%"><col width="30%"> <tr><td ><div style="text-align:center;padding:12px" class="newFont_bold13">'+webLogonHealthPercLabel+'</div><div id="logonHealth" style="height:200px;width:100%;overflow:auto;padding:0px"></div></td>';
m+='<td><table align="left" cellpadding="0" cellspacing="0" border="0"><tbody>';if(n.lg_Critical!=undefined&&n.lg_Critical!=null){m+='<tr><td><div style="background-color:#CC0000;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Critical - '+n.lg_Critical+"</td></tr>";
}if(n.lg_Major!=undefined&&n.lg_Major!=null){m+='<tr><td><div style="background-color:#FA9D1C;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Major - '+n.lg_Major+"</td></tr>";}if(n.lg_Minor!=undefined&&n.lg_Minor!=null){m+='<tr><td><div style="background-color:#CCC100;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Minor - '+n.lg_Minor+"</td></tr>";
}if(n.lg_Normal!=undefined&&n.lg_Normal!=null){m+='<tr><td><div style="background-color:#457E08;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Normal - '+n.lg_Normal+"</td></tr>";}if(n.lg_Unkown!=undefined&&n.lg_Unkown!=null){m+='<tr><td><div style="background-color:#49909F;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Unknown - '+n.lg_Unkown+"</td></tr>";
}m+="</tbody></table></td></tr></table></div>";}else{m='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+webLogonHealthPercLabel+'</div><div style="height:270px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}var o="";if(u&&!Ext.isEmpty(n.appLogonAvail)&&n.appLogonAvail!=undefined){o='<div style="text-align:center;padding:12px" class="newFont_bold13">'+availabilityLabel+'</div><div id="appLocLogonAvail" style="height:250px;width:100%;overflow:auto;padding:0px"></div>';}else{o='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+availabilityLabel+'</div><div style="height:344px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}var j="";if(u&&!Ext.isEmpty(n.appLogonDura)&&n.appLogonDura!=undefined){j='<div style="text-align:center;padding:12px" class="newFont_bold13">'+durationLabel+'</div><div id="appLocLogonDura" style="height:250px;width:100%;overflow:auto;padding:0px"></div>';}else{j='<div style="text-align:center;padding:12px" class="newFont_bold13">&nbsp;'+durationLabel+'</div><div style="height:344px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}f.add({xtype:"panel",margin:"10 10 0 10",ui:"newGraphPanel",title:webLogonDetailsLabel,bodyPadding:"0 0 0 0",padding:"0 10 10 0",flex:1,layout:{type:"column",align:"stretch"},defaults:{columnWidth:0.5},items:[{xtype:"container",cls:"graphSeperatorLineBottomRight",padding:"0 30 0 20",margin:"0 0 0 10",html:o},{xtype:"container",cls:"graphSeperatorLineBottom",padding:"0 20 0 30",html:j},{xtype:"container",cls:"graphSeperatorLineRight",padding:"0 30 0 20",html:m}]});
if(u&&!Ext.isEmpty(n.donutChartforApp)&&n.donutChartforApp!=undefined){var q={};q=jQuery.extend(true,{},getHighChartsBarInstance("donuts_id",n.donutChartforApp.chartHeight,n.donutChartforApp.chartWidth),q);q.setData(n.donutChartforApp,"","","donut");q.drawChart();f.show();}if(u&&!Ext.isEmpty(n.appLogonAvail)&&n.appLogonAvail!=undefined){var y={};
y=jQuery.extend(true,{},getHighChartsInstance("appLocLogonAvail",n.appLogonAvail.chartHeight,n.appLogonAvail.chartWidth),y);y.setData(n.appLogonAvail,"MMM dd, yyyy","");y.drawChart();f.show();}if(u&&!Ext.isEmpty(n.appLogonDura)&&n.appLogonDura!=undefined){var r={};r=jQuery.extend(true,{},getHighChartsInstance("appLocLogonDura",n.appLogonDura.chartHeight,n.appLogonDura.chartWidth),r);
r.setData(n.appLogonDura,"MMM dd, yyyy","");r.drawChart();f.show();}if(u&&!Ext.isEmpty(n.logonDonutHealth)&&n.logonDonutHealth!=undefined){var i={};i=jQuery.extend(true,{},getHighChartsBarInstance("logonHealth",n.chartWidth,n.chartHeight),i);i.setData(n.logonDonutHealth,"","","donut");i.drawChart();f.show();
}}});},goFifthPage:function(d){appConstants.printPageIdentify="locThirdPage";appConstants.queryStringUsage=appConstants.queryStringUsage.replace("locMainTable",appConstants.printPageIdentify);appConstants.queryStringUsage=appConstants.queryStringUsage.replace("locFirstPage",appConstants.printPageIdentify);
initLdgMask.show();var b=this;var c=d.substring(d.indexOf("?")+1);var a=d.substring(0,d.indexOf("?"));var f=Ext.getCmp("resultPanel");f.removeAll();var e="";Ext.Ajax.request({url:"../servlet/com.eg.ErCtxLogonSimulator",params:c+"&appForAgent="+encodeURIComponent(appForAgent)+"&responseType=json",method:"POST",scope:this,success:function(g){var x=g.responseText;
var m=Ext.decode(x);appConstants.publicjsonDataUsage=m;var r=m.checkData;var j=m.firstPageData;var i=j["summaryList"]["totalLogon"];var n=j["summaryList"]["successLogon"];var q=j["summaryList"]["failLogon"];var p=j["summaryList"]["failedEnum"];var u=j["summaryList"]["failedSimu"];var v=Ext.getCmp("er_server");
var s=m.componentCombo;var z=m.selectedComponents;appConstants.rawDataForComponents=s;v.getStore().loadRawData(s);if(!Ext.isEmpty(z)){v.setValue(z);}else{if(!Ext.isEmpty(s)){v.setValue(s[0].valueField);}else{v.setValue("-1");}}e+='<div style="margin:1px auto 0px auto;" align="center"><table><tr><td align="right"><div  id="donuts_id" ></div></td>';
if(i>0){e+='<td style="vertical-align:top;padding-top:10px !important"; align="top"><table align="top" cellpadding="0" cellspacing="0" border="0"><tbody>';if(m.donSucc!=undefined&&m.donSucc!=null){e+='<tr><td><div style="background-color:#32B395;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">'+m.donSucc+"</td></tr>";
}if(m.donEnum!=undefined&&m.donEnum!=null){e+='<tr><td><div style="background-color:#F8ABA7;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">'+m.donEnum+"</td></tr>";}if(m.donFail!=undefined&&m.donFail!=null){e+='<tr><td><div style="background-color:#EF7672;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">'+m.donFail+"</td></tr>";
}e+="</tbody></table></td>";}e+="</tr></table></div>";var t=Ext.getCmp("er_location").getValue();this.insideBackButton(3,false);f.add({xtype:"panel",margin:"10 10 0 10",ui:"newGraphPanel",title:overviewOfSimsLabel+'<span style="font-size:13px;font-family:roboto;font-weight:400;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;('+simulatorLabel+" : "+m.selectedComponents+", "+externalAgentLabel+" : "+m.selectedLocation+")</span>",bodyPadding:"0 0 0 0",padding:0,layout:{type:"column",align:"stretch"},items:[{xtype:"container",columnWidth:0.66,padding:"6 5 0 5",layout:{type:"column",align:"center",pack:"center"},defaults:{columnWidth:0.24,padding:"8px 5px 0px 5px",},items:[{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table ><tr><td align="right"><img src="/final/images/spacer.gif" class="iconTotalSimulations"/></td><td align="left" style="padding:5px"><span class="newFont_bold28">'+i+'</span></td></tr><tr><td align="center" style="padding:6px 6px 2px 6px;word-break:break-all" colspan="2" class=newFont_normal13>'+totalLabel+"<br/> "+simulationsLabel+"</td></tr></table>",}]},{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table ><tr><td align="right"><img src="/final/images/spacer.gif" class="iconSuccessfulSimulations"/></td><td align="left" style="padding:5px"><span class="newFont_bold28">'+n+'</span></td></tr><tr><td align="center" style="padding:6px 6px 2px 6px;word-break:break-all" colspan="2" class=newFont_normal13>'+successfulLabel+"<br/> "+simulationsLabel+"</td></tr></table>",}]},{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table ><tr><td align="right"><img src="/final/images/spacer.gif" class="iconLogonFailed"/></td><td align="left" style="padding:5px"><span class="newFont_bold28">'+q+'</span></td></tr><tr><td align="center" style="padding:6px 6px 2px 6px;word-break:break-all" colspan="2" class=newFont_normal13>'+failedLabel+"<br/>"+webLogonLabel+"</td></tr></table>",}]},{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table ><tr><td align="right"><img src="/final/images/spacer.gif" class="iconFailedEnumeration"/></td><td align="left" style="padding:5px"><span class="newFont_bold28">'+p+'</span></td></tr><tr><td align="center" style="padding:6px 6px 2px 6px;word-break:break-all" colspan="2" class=newFont_normal13>'+failedLabel+"<br/> "+enumerationsLabel+"</td></tr></table>",}]}]},{xtype:"container",columnWidth:0.34,border:true,html:e,}]});
var k="";if(r&&!Ext.isEmpty(m.enumDonutHealth)&&m.enumDonutHealth!=undefined){k='<div><table width="100%" ><col width="70%"><col width="30%"> <tr><td ><div style="text-align:center;padding:5px" class="newFont_bold13">'+enumHealthPercLabel+'</div><div id="enumHealth" style="height:200px;width:100%;overflow:auto;padding:0px"></div></td>';
k+='<td><table align="left" cellpadding="0" cellspacing="0" border="0"><tbody>';if(m.enum_Critical!=undefined&&m.enum_Critical!=null){k+='<tr><td><div style="background-color:#CC0000;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Critical - '+m.enum_Critical+"</td></tr>";
}if(m.enum_Major!=undefined&&m.enum_Major!=null){k+='<tr><td><div style="background-color:#FA9D1C;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Major - '+m.enum_Major+"</td></tr>";}if(m.enum_Minor!=undefined&&m.enum_Minor!=null){k+='<tr><td><div style="background-color:#CCC100;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Minor - '+m.enum_Minor+"</td></tr>";
}if(m.enum_Normal!=undefined&&m.enum_Normal!=null){k+='<tr><td><div style="background-color:#457E08;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Normal - '+m.enum_Normal+"</td></tr>";}if(m.enum_Unkown!=undefined&&m.enum_Unkown!=null){k+='<tr><td><div style="background-color:#49909F;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Unkown - '+m.enum_Unkown+"</td></tr>";
}k+="</tbody></table></td></tr></table></div>";}else{k='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+enumHealthPercLabel+'</div><div style="height:270px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available </div></td></tr></table></div>';
}var w="";if(r&&!Ext.isEmpty(m.appEnumAvail)&&m.appEnumAvail!=undefined){sec_padding="0 20 0 30";w='<div style="text-align:center;padding:12px" class="newFont_bold13">'+availabilityLabel+'</div><div id="appLocEnumAvail" style="height:250px;width:100%;overflow:auto;padding:0px"></div>';}else{w='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+availabilityLabel+'</div><div style="height:344px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available </div></td></tr></table></div>';
}var l="";if(r&&!Ext.isEmpty(m.appEnumDura)&&m.appEnumDura!=undefined){l='<div style="text-align:center;padding:12px" class="newFont_bold13">'+durationLabel+'</div><div id="appLocEnumDura" style="height:250px;width:100%;overflow:auto;padding:0px"></div>';}else{l='<div style="text-align:center;padding:12px" class="newFont_bold13">&nbsp;'+durationLabel+' </div><div style="height:265px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available </div></td></tr></table></div>';
}f.add({xtype:"panel",margin:"10 10 0 10",ui:"newGraphPanel",title:enumerationDetailsLabel,bodyPadding:"0 0 0 0",padding:"0 10 10 0",flex:1,layout:{type:"column",align:"stretch"},defaults:{columnWidth:0.5},items:[{xtype:"container",cls:"graphSeperatorLineBottomRight",padding:"0 30 0 20",margin:"0 0 0 10",html:w},{xtype:"container",cls:"graphSeperatorLineBottom",padding:"0 20 0 30",html:l},{xtype:"container",cls:"graphSeperatorLineRight",padding:"0 30 0 20",html:k}]});
if(r&&!Ext.isEmpty(m.donutChartforApp)&&m.donutChartforApp!=undefined){var o={};o=jQuery.extend(true,{},getHighChartsBarInstance("donuts_id",m.donutChartforApp.chartHeight,m.donutChartforApp.chartWidth),o);o.setData(m.donutChartforApp,"","","donut");o.drawChart();f.show();}if(r&&!Ext.isEmpty(m.appEnumAvail)&&m.appEnumAvail!=undefined){var h={};
h=jQuery.extend(true,{},getHighChartsInstance("appLocEnumAvail",m.appEnumAvail.chartHeight,m.appEnumAvail.chartWidth),h);h.setData(m.appEnumAvail,"MMM dd, yyyy","");h.drawChart();f.show();}if(r&&!Ext.isEmpty(m.appEnumDura)&&m.appEnumDura!=undefined){var A={};A=jQuery.extend(true,{},getHighChartsInstance("appLocEnumDura",m.appEnumDura.chartHeight,m.appEnumDura.chartWidth),A);
A.setData(m.appEnumDura,"MMM dd, yyyy","");A.drawChart();f.show();}if(r&&!Ext.isEmpty(m.enumDonutHealth)&&m.enumDonutHealth!=undefined){var y={};y=jQuery.extend(true,{},getHighChartsBarInstance("enumHealth",m.chartWidth,m.chartHeight),y);y.setData(m.enumDonutHealth,"","","donut");y.drawChart();f.show();
}}});},loadGridforApp:function(c){var m=Ext.getCmp("resultPanel");var r=Ext.getCmp("mainform").getForm();var u=Ext.getCmp("er_applicationX").getValue();var f=new Array();f=Ext.getCmp("er_server").getValue();var x=this;m.removeAll();m.show();var y=c.enableEnumulation;var A=c.table_data;var e=c["secondPageData"];
var l=false;appConstants.printPageIdentify="appMainTable";appConstants.queryStringUsage+="&printPageIdentify="+appConstants.printPageIdentify;if(A!=undefined&&!Ext.isEmpty(A)){var n='<div class="plainTableReporterDynamicRowspan"><table align="center" valign="middle" width="100%">';n+="<thead>";n+="<tr>";
n+=' <th align="center" rowspan="2">SIMULATION</th> ';n+='<th align="center" rowspan="2">APPLICATION/DESKTOP</th>';n+=' <th align="center" colspan="2" style="min-width:250px;text-align:center">WEB LOGON</th>';if(y){n+=' <th align="center" colspan="2" style="min-width:250px;text-align:center">APPLICATION/DESKTOP ENUMERATION</th>';
}n+='<th align="center" colspan="2"  style="min-width:250px;text-align:center">APPLICATION/DESKTOP LAUNCH</th>';n+="</tr>";n+="<tr>";n+=' <th style="text-align:center" class="subHeader">Availability (%)</th>';n+=' <th style="text-align:center" class="subHeader">Duration (Secs)</th> ';if(y){n+=' <th style="text-align:center" class="subHeader">Availability (%)</th>';
n+=' <th style="text-align:center" class="subHeader">Duration (Secs)</th> ';}n+=' <th style="text-align:center" class="subHeader">Availability (%)</th>';n+=' <th style="text-align:center" class="subHeader">Duration (Secs)</th>';n+="</tr>";n+="</thead>";n+"<tbody>";var w=1;var b="alterColor1";for(var B in A){if(w%2==0){b="alterColor2";
}else{b="alterColor1";}var j=B.substring(0,B.indexOf("#"));var z=B.substring(B.indexOf("#")+1,B.length);var a=A[B];n+="<tr >";w=w+1;n+='<td rowspan="'+z+'" class="'+b+'">'+j+"</td>";for(var s=0;s<a.length;s++){var q=a[s];for(var p=0;p<q.length;p++){var t=e["hrefUrl"];var h=Ext.getCmp("er_option");if(h!=undefined){t+="&er_option="+h.getValue();
if(h.getValue()=="Zone"){var o=r.findField("select_farm").getValue();t+="&er_zone="+o;}else{if(h.getValue()=="Segment"||h.getValue()=="Service"){var g=Ext.getCmp("er_site");t+="&er_site="+g.getValue();}}}if(appConstants.isThirdPage!=null&&appConstants.isThirdPage!="true"&&u!=undefined&&u=="All"&&!l){t+="&er_applicationX="+encodeURIComponent(q[0])+"&er_component="+j+"&er_trgttype="+targetType;
}else{if(u!=undefined&&u=="All"){t+="&er_applicationX="+encodeURIComponent(q[0])+"&er_component="+j+"&er_trgttype="+targetType;}else{if(appConstants.isFromBack){t+="&er_applicationX="+encodeURIComponent(q[0])+"&er_component="+j+"&er_trgttype="+targetType;}if(!appConstants.isFromBack){l=true;for(var p=0;
f.length>p;p++){t+="&er_component="+f[p];}t+="&er_applicationX="+encodeURIComponent(u)+"&er_trgttype="+targetType+"&isNavigation=false&secondpage=true&isThirdPage=true&pageNo=2";this.goThirdPage(t,"false");return;}}}n+='<td style="cursor:pointer;" class="'+b+'"><a href="javascript:void(0);" onClick="javascript:appLaunchSimulator(\''+t+"','"+q[0]+"','"+"true"+"');\" >"+q[p]+"</a></td>";
if(appConstants.isThirdPage!=null&&appConstants.isThirdPage=="true"&&!appConstants.isFromBack&&u!=undefined&&u!="All"){for(var p=0;f.length>p;p++){t+="&er_component="+f[p];}t+="&er_applicationX="+encodeURIComponent(u)+"&er_trgttype="+targetType+"&isNavigation=false&secondpage=true&isThirdPage=true&pageNo=2";
this.goThirdPage(t,"true");return;}if(q.length-p==1){n+="</tr>";}}if(s<a.length-1){n+="<tr>";}}}n+="</tbody></table>";n+="</div>";m.show();m.removeCls("containerShadow");m.addCls("");m.setTitle("LOGON SIMULATOR");m.add({xtype:"container",html:n,margin:"10 10 10 10",padding:10,ui:"newContainer",layout:{type:"fit",align:"stretch"},});
}else{this.disableTools();m.hide();var d=Ext.getCmp("errorPanelId");var v='<div class="egFlexCenterByColumnWise" style="height:100%"> <div class="iconInformation"></div> <div class="commonErrorMsgText">No Measures Available!</div> </div>';d.add({xtype:"panel",html:v,ui:"newGraphPanel",margin:"5 10 10 10",flex:1,layout:{type:"fit",align:"stretch"},});
d.show();}},goThirdPage:function(d,h){appConstants.fromAppLaunchIcon="yes";appConstants.printPageIdentify="appSecondPage";appConstants.queryStringUsage=appConstants.queryStringUsage.replace("appMainTable",appConstants.printPageIdentify);appConstants.queryStringUsage=appConstants.queryStringUsage.replace("locFirstPage",appConstants.printPageIdentify);
initLdgMask.show();var b=this;var c=d.substring(d.indexOf("?")+1);var a=d.substring(0,d.indexOf("?"));var f=Ext.getCmp("resultPanel");f.removeAll();var e="";var g;if((h!=undefined&&h=="true")||(appConstants.fromLoc!=undefined&&appConstants.fromLoc=="yes")){g=false;}else{g=true;}Ext.Ajax.request({url:"../servlet/com.eg.ErCtxLogonSimulator",params:c+"&responseType=json",method:"POST",scope:this,success:function(o){var v=o.responseText;
var Q=Ext.decode(v);appConstants.publicjsonDataUsage=Q;var x=Q.checkData;var ak;ak=Ext.getCmp("er_applicationX");ak.getStore().clearFilter(true);ak.getStore().loadRawData(Q.applnCombo);ak.setValue(Q.selectedapplicationX);ak=Ext.getCmp("er_server");var K=Q.componentCombo;var j=Q.selectedComponents;appConstants.rawDataForComponents=K;
ak.getStore().loadRawData(K);if(!Ext.isEmpty(j)){ak.setValue(j);}else{if(!Ext.isEmpty(K)){ak.setValue(K[0].valueField);}else{ak.setValue("-1");}}var au=Q.firstPageData;var ai=au["summaryList"]["totalLogon"];var Z=au["summaryList"]["successLogon"];var L=au["summaryList"]["failLogon"];var af=au["summaryList"]["failedSimu"];
var p=au["summaryList"]["failedEnum"];var w=au["summaryList"]["failedApp"];this.insideBackButton(4,g);var S=Ext.getCmp("er_location").getValue();var P=new Array();var A=[];if(ai!=undefined&&ai!=null&&ai>0&&ai!=""&&ai!="-"){if((appConstants.fromAppIcon!=undefined&&appConstants.fromAppIcon=="yes")||(appConstants.fromLoc!=undefined&&appConstants.fromLoc=="yes"&&ai>0&&ai!="-")){e+='<div style="margin:1px auto 0px auto;height:150px;"><table border="0px" height="100%"><tr><td align="right" valign="middle"><div  id="donuts_id" ></div></td>';
e+='<td align="center" valign="middle">';if(Q.donSucc!=undefined&&Q.donSucc!=null){e+='<div style="float:left"><table><tr><td valign="top" style="padding:3px"><div style="background-color:#32B395;height:8px;width:8px;">&nbsp;</div></td><td style="padding:0px 20px 5px 5px;" class="newFont_normal11_Legend" valign="top">'+Q.donSucc+"</td></tr></table></div>";
}if(Q.donFail!=undefined&&Q.donFail!=null){e+='<div style="float:left"><table><tr><td valign="top" style="padding:3px"><div style="background-color:#EF7672;height:8px;width:8px;">&nbsp;</div></td><td style="padding:0px 20px 5px 5px;" class="newFont_normal11_Legend" valign="top">'+Q.donFail+"</td></tr></table></div>";
}if(Q.donEnum!=undefined&&Q.donEnum!=null){e+='<div style="float:left"><table><tr><td valign="top" style="padding:3px"><div style="background-color:#F8ABA7;height:8px;width:8px;">&nbsp;</div></td><td style="padding:0px 20px 5px 5px;" class="newFont_normal11_Legend" valign="top">'+Q.donEnum+"</td></tr></table></div>";
}if(Q.donSimu!=undefined&&Q.donSimu!=null){e+='<div style="float:left"><table><tr><td valign="top" style="padding:3px"><div style="background-color:#DE4640;height:8px;width:8px;">&nbsp;</div></td><td style="padding:0px 20px 5px 5px;" class="newFont_normal11_Legend" valign="top">'+Q.donSimu+"</td></tr></table></div>";
}if(Q.donfApp!=undefined&&Q.donfApp!=null){e+='<div style="float:left"><table><tr><td valign="top" style="padding:3px"><div style="background-color:#F7BD42;height:8px;width:8px;">&nbsp;</div></td><td style="padding:0px 20px 5px 5px;" class="newFont_normal11_Legend" valign="top">'+Q.donfApp+"</td></tr></table></div>";
}e+="</td></tr></table></div>";A=[{xtype:"container",columnWidth:0.7,layout:{type:"column",align:"center",pack:"center"},defaults:{columnWidth:0.33,padding:"10 10 0 10",},items:[{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table align="center"><tr><td align="center" nowrap><div class="egFlexCenterByRowWise"><div class="iconTotalSimulations"/></div><div class="newFont_bold28" style="margin:5px;">'+ai+'</div></div></td></tr><tr><td align="center" style="padding:7px 7px 0px 7px" colspan="2"><span class="newFont_normal13">'+totalSimulationsLabel+"</span></td></tr></table>"}]},{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table ><tr><td align="right"><img src="/final/images/spacer.gif" class="iconSuccessfulSimulations"/></td><td align="left" style="padding:5px"><span class="newFont_bold28">'+Z+'</span></td></tr><tr><td align="center" style="padding:7px 7px 0px 7px" colspan="2"><span class=newFont_normal13>'+succuessSimulationsLabel+"</span></td></tr></table>",}]},{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table ><tr><td align="right"><img src="/final/images/spacer.gif" class="iconFailedSimulations"/></td><td align="left" style="padding:5px"><span class="newFont_bold28">'+af+'</span></td></tr><tr><td align="center" style="padding:7px 7px 0px 7px" colspan="2"><span class=newFont_normal13>'+failedSimulationsLabel+"</span></td></tr></table>",}]},{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table ><tr><td align="right"><img src="/final/images/spacer.gif" class="iconLogonFailed"/></td><td align="left" style="padding:5px"><span class="newFont_bold28">'+L+'</span></td></tr><tr><td align="center" style="padding:7px 7px 0px 7px" colspan="2"><span class=newFont_normal13>'+failedWebLogonsLabel+"</span></td></tr></table>",}]},{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table ><tr><td align="right"><img src="/final/images/spacer.gif" class="iconFailedEnumeration"/></td><td align="left" style="padding:5px"><span class="newFont_bold28">'+p+'</span></td></tr><tr><td align="center" style="padding:7px 7px 0px 7px" colspan="2"><span class=newFont_normal13>'+failedEnumerationsLabel+"</span></td></tr></table>",}]},{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table ><tr><td align="right"><img src="/final/images/spacer.gif" class="iconFailedAppLaunch"/></td><td align="left" style="padding:5px"><span class="newFont_bold28">'+w+'</span></td></tr><tr><td align="center" style="padding:7px 7px 0px 7px" colspan="2"><span class=newFont_normal13>'+failedApplnDesktopLabel+"</span></td></tr></table>",}]}]},{xtype:"container",columnWidth:0.3,html:e,}];
initLdgMask.hide();f.add({xtype:"panel",layout:"column",margin:"10 10 10 10",ui:"newGraphPanel",title:simsForApplnDesktopLabel+" - "+Q.selectedapplicationX,padding:0,bodyPadding:0,html:Y,items:A});}else{var q=Ext.getCmp("er_applicationX").getValue();var ao=Q.summaryTableApp;var s=Q.enableEnumulation;
var Y="";var N="";N="../reporter/ErCtxLogonSimulator.jsp?&er_trgttype=locationBased&isNeedBack="+appConstants.isNeedBack+"&isFourthPage=false&isFifthPage=false&printPageIdentify=locFirstPage"+"&appForAgent="+encodeURIComponent(q)+"&splEntry=yes";var H=Ext.getCmp("mainform").getForm();var E=null;var W=Ext.getCmp("er_compType").getValue();
N+="&er_compType="+W;var ac=new Array();if(isSettingsEnabled){E=this.getThinclientapplicationsettings().getForm();}var R="&er_timeline="+Ext.getCmp("er_timeline").getValue()+"&startdate="+Ext.getCmp("er_stdate").dataArray+"&enddate="+Ext.getCmp("er_enddate").dataArray+"&starthr="+Ext.getCmp("er_sthr").dataArray+"&endhr="+Ext.getCmp("er_endhr").dataArray+"&startmin="+mgr_stmin+"&endmin="+mgr_enmin;
var C=this.getSettingsFieldValue(E,"timefrom",isSettingsEnabled,"selectedTimeFrom");var T=this.getSettingsFieldValue(E,"minfrom",isSettingsEnabled,"selectedMinsFrom");var t=this.getSettingsFieldValue(E,"timeto",isSettingsEnabled,"selectedTimeTo");var M=this.getSettingsFieldValue(E,"minto",isSettingsEnabled,"selectedMinsTo");
var y="&timefrom="+C+"&minfrom="+T+"&timeto="+t+"&minto="+M;N+=y+R;var I=Ext.getCmp("er_option");if(I!=undefined){N+="&er_option="+I.getValue();if(I.getValue()=="Zone"){var J=H.findField("select_farm").getValue();N+="&er_zone="+J;}else{if(I.getValue()=="Segment"||I.getValue()=="Service"){var al=Ext.getCmp("er_site");
N+="&er_site="+al.getValue();}}}ac=Ext.getCmp("er_server").getValue();for(var ae=0;ac.length>ae;ae++){N+="&er_component="+ac[ae];}if(ao!=null&&ao!=undefined&&!Ext.isEmpty(ao)&&ao!="-"){Y='<div class="newTable"><table width="100%"><thead><tr><th rowspan="2">'+externalAgentLabel+'</th><th colspan="3" style="text-align:center">'+simulationsLabel+'</th><th style="text-align:center;" rowspan="2">'+failedLogonsLabel+"</th>";
if(s){Y+='<th style="text-align:center;" rowspan="2">'+failedEnumerationsLabel+"</th>";}Y+='<th style="text-align:center;" rowspan="2">'+failedApplnDesktopLaunchesLabel+'</th></tr><tr><th colspan="1" class="subHeader">'+totalLabel+'</th><th colspan="1" class="subHeader">'+successfulLabel+'</th><th colspan="1" class="subHeader">'+failureLabel+"</th></tr></thead>";
Y+="<tbody>";for(var G in ao){Y+="<tr>";N+="&er_location="+G;Y+='<td style="cursor:pointer;text-align:center" onClick="javascript:fromAppToLoc(\''+N+"','"+"true"+"');\" >"+G+"</td>";var ar=ao[G];if(ar!=null&&ar!=undefined&&!Ext.isEmpty(ar)){for(var ah=0;ah<ar.length;ah++){Y+='<td style="cursor:pointer;text-align:center" onClick="javascript:fromAppToLoc(\''+N+"','"+"true"+"');\" >"+ar[ah]+"</td>";
}}else{for(var ah=0;ah<6;ah++){Y+='<td style="text-align:center">';Y+="-";Y+="</td>";}}Y+="</tr>";}Y+="</tbody></table></div>";}A=[{xtype:"container",scroll:false,autoScroll:true,height:180,padding:0,margin:10,}];initLdgMask.hide();f.add({xtype:"panel",layout:"column",margin:"10 10 0 10",ui:"newGraphPanel",title:simsForApplnDesktopLabel+" - "+Q.selectedapplicationX,padding:0,bodyPadding:10,html:Y,});
}if(ai!=undefined&&ai!=""&&ai>0&&ai!="-"){if((appConstants.fromAppIcon!=undefined&&appConstants.fromAppIcon=="yes")||(appConstants.fromLoc!=undefined&&appConstants.fromLoc=="yes")){var ab="";if(x&&!Ext.isEmpty(Q.appLaunchDonutHealth)&&Q.appLaunchDonutHealth!=undefined){ab='<div><table width="100%" ><col width="70%"><col width="30%"> <tr><td ><div style="text-align:center;padding:12px" class="newFont_bold13">'+applnDesktopLaunchHealthPercLabel+'</div><div id="appLaunchHealth" style="height:200px;width:100%;overflow:auto;padding:0px"></div></td>';
ab+='<td><table align="left" cellpadding="0" cellspacing="0" border="0"><tbody>';if(Q.app_Critical!=undefined&&Q.app_Critical!=null){ab+='<tr><td><div style="background-color:#CC0000;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Critical - '+Q.app_Critical+"</td></tr>";
}if(Q.app_Major!=undefined&&Q.app_Major!=null){ab+='<tr><td><div style="background-color:#FA9D1C;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Major - '+Q.app_Major+"</td></tr>";}if(Q.app_Minor!=undefined&&Q.app_Minor!=null){ab+='<tr><td><div style="background-color:#CCC100;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Minor - '+Q.app_Minor+"</td></tr>";
}if(Q.app_Normal!=undefined&&Q.app_Normal!=null){ab+='<tr><td><div style="background-color:#457E08;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Normal - '+Q.app_Normal+"</td></tr>";}if(Q.app_Unkown!=undefined&&Q.app_Unkown!=null){ab+='<tr><td><div style="background-color:#49909F;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Unkown - '+Q.app_Unkown+"</td></tr>";
}ab+="</tbody></table></td></tr></table></div>";}else{ab='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+applnDesktopLaunchHealthPercLabel+'</div><div style="height:330px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}var an="";if(x&&!Ext.isEmpty(Q.appLaunchAvailLocation)&&Q.appLaunchAvailLocation!=undefined){an='<div style="text-align:center;padding:12px" class="newFont_bold13">'+availabilityLabel+'</div><div id="appLaunchAvailTime_id" style="height:250px;width:100%;overflow:auto;padding:0px"></div>';}else{an='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+availabilityLabel+' </div><div style="height:264px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}var ag="";if(x&&!Ext.isEmpty(Q.appLaunchDurationLocation)&&Q.appLaunchDurationLocation!=undefined){ag='<div style="text-align:center;padding:12px" class="newFont_bold13">'+durationLabel+' </div><div id="appLaunchDurationTime_id" style="height:250px;width:100%;overflow:auto;padding:0px"></div>';}else{ag='<div style="text-align:center;padding:12px" class="newFont_bold13">&nbsp;'+durationLabel+'</div><div style="height:264px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}f.add({xtype:"panel",margin:"10 10 0 10",ui:"newGraphPanel",title:applnDesktopLabel,bodyPadding:"0 0 0 0",padding:"0 10 10 0",flex:1,layout:{type:"column",align:"stretch"},defaults:{columnWidth:0.5,},items:[{xtype:"container",cls:"graphSeperatorLineBottomRight",padding:"0 30 0 20",margin:"0 0 0 10",html:an},{xtype:"container",cls:"graphSeperatorLineBottom",padding:"0 20 0 30",html:ag},{xtype:"container",cls:"graphSeperatorLineRight",padding:"0 30 0 20",html:ab}]});
if((appConstants.fromAppIcon!=undefined&&appConstants.fromAppIcon=="yes")||(appConstants.fromLoc!=undefined&&appConstants.fromLoc=="yes"&&ai>0)){if(x&&!Ext.isEmpty(Q.donutChartforApp)&&Q.donutChartforApp!=undefined){var u={};u=jQuery.extend(true,{},getHighChartsBarInstance("donuts_id",Q.donutChartforApp.chartHeight,Q.donutChartforApp.chartWidth),u);
u.setData(Q.donutChartforApp,"","","donut");u.drawChart();f.show();}}if(x&&!Ext.isEmpty(Q.appLaunchAvailLocation)&&Q.appLaunchAvailLocation!=undefined){var U={};U=jQuery.extend(true,{},getHighChartsInstance("appLaunchAvailTime_id",Q.appLaunchAvailLocation.chartHeight,Q.appLaunchAvailLocation.chartWidth),U);
U.setData(Q.appLaunchAvailLocation,"MMM dd, yyyy","");U.drawChart();f.show();}if(x&&!Ext.isEmpty(Q.appLaunchDurationLocation)&&Q.appLaunchDurationLocation!=undefined){var O={};O=jQuery.extend(true,{},getHighChartsInstance("appLaunchDurationTime_id",Q.appLaunchDurationLocation.chartHeight,Q.appLaunchDurationLocation.chartWidth),O);
O.setData(Q.appLaunchDurationLocation,"MMM dd, yyyy","");O.drawChart();f.show();}if(x&&!Ext.isEmpty(Q.appLaunchDonutHealth)&&Q.appLaunchDonutHealth!=undefined){var X={};X=jQuery.extend(true,{},getHighChartsBarInstance("appLaunchHealth",280,280),X);X.setData(Q.appLaunchDonutHealth,"","","donut");X.drawChart();
f.show();}}else{var x=Q.checkData;initLdgMask.hide();f.show();var at="";var aj="";if(x&&!Ext.isEmpty(Q.appLogonAvail)&&Q.appLogonAvail!=undefined){at='<div style="text-align:center;padding:12px" class="newFont_bold13">'+availabilityLabel+'</div><div id="appLocLogonAvail" style="height:250px;width:100%;overflow:hidden;padding:0px"></div>';
}else{at='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+availabilityLabel+'</div><div style="height:250px;width:100%;overflow:hidden;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}if(x&&!Ext.isEmpty(Q.appLogonDura)&&Q.appLogonDura!=undefined){aj='<div style="text-align:center;padding:12px" class="newFont_bold13">'+durationLabel+'</div><div id="appLocLogonDura" style="height:250px;width:100%;overflow:hidden;padding:0px"></div>';}else{aj='<div style="text-align:center;padding:12px" class="newFont_bold13">&nbsp;'+durationLabel+'</div><div style="height:250px;width:100%;overflow:hidden;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}f.add({xtype:"panel",margin:"10 10 0 10",ui:"newGraphPanel",title:webLogonDetailsLabel,bodyPadding:"0 0 0 0",padding:"0 10 10 0",flex:1,layout:{type:"column",align:"stretch"},defaults:{columnWidth:0.5},items:[{xtype:"container",cls:"graphSeperatorLineBottomRight",padding:"0 30 0 20",margin:"0 0 0 10",html:at},{xtype:"container",cls:"graphSeperatorLineBottom",padding:"0 20 0 30",html:aj}]});
if(x&&!Ext.isEmpty(Q.appLogonAvail)&&Q.appLogonAvail!=undefined){var z={};z=jQuery.extend(true,{},getHighChartsInstance("appLocLogonAvail",Q.appLogonAvail.chartHeight,Q.appLogonAvail.chartWidth),z);z.setData(Q.appLogonAvail,"MMM dd, yyyy","");z.drawChart();f.show();}if(x&&!Ext.isEmpty(Q.appLogonDura)&&Q.appLogonDura!=undefined){var m={};
m=jQuery.extend(true,{},getHighChartsInstance("appLocLogonDura",Q.appLogonDura.chartHeight,Q.appLogonDura.chartWidth),m);m.setData(Q.appLogonDura,"MMM dd, yyyy","");m.drawChart();f.show();}if(s){var n="";var V;var aq="";if(x&&!Ext.isEmpty(Q.appEnumAvail)&&Q.appEnumAvail!=undefined){V="0 20 0 30";n='<div style="text-align:center;padding:12px" class="newFont_bold13">'+availabilityLabel+'</div><div id="appLocEnumAvail" style="height:250px;width:100%;overflow:hidden;padding:0px"></div>';
}else{V="0 20 20 30";n='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+availabilityLabel+'</div><div style="height:250px;width:100%;overflow:hidden;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available </div></td></tr></table></div>';
}if(x&&!Ext.isEmpty(Q.appEnumDura)&&Q.appEnumDura!=undefined){V="0 20 0 30";aq='<div style="text-align:center;padding:12px" class="newFont_bold13">'+durationLabel+'</div><div id="appLocEnumDura" style="height:250px;width:100%;overflow:hidden;padding:0px"></div>';}else{V="0 20 0 30";aq='<div style="text-align:center;padding:12px" class="newFont_bold13">&nbsp;'+durationLabel+'</div><div style="height:250px;width:100%;overflow:hidden;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available </div></td></tr></table></div>';
}f.add({xtype:"panel",margin:"10 10 0 10",ui:"newGraphPanel",title:enumerationDetailsLabel,bodyPadding:"0 0 0 0",padding:"0 10 10 0",flex:1,layout:{type:"column",align:"stretch"},defaults:{columnWidth:0.5},items:[{xtype:"container",cls:"graphSeperatorLineBottomRight",padding:"0 30 0 20",margin:"0 0 0 10",html:n},{xtype:"container",cls:"graphSeperatorLineBottom",padding:V,html:aq}]});
if(x&&!Ext.isEmpty(Q.appEnumAvail)&&Q.appEnumAvail!=undefined){var ap={};ap=jQuery.extend(true,{},getHighChartsInstance("appLocEnumAvail",Q.appEnumAvail.chartHeight,Q.appEnumAvail.chartWidth),ap);ap.setData(Q.appEnumAvail,"MMM dd, yyyy","");ap.drawChart();f.show();}if(x&&!Ext.isEmpty(Q.appEnumDura)&&Q.appEnumDura!=undefined){var r={};
r=jQuery.extend(true,{},getHighChartsInstance("appLocEnumDura",Q.appEnumDura.chartHeight,Q.appEnumDura.chartWidth),r);r.setData(Q.appEnumDura,"MMM dd, yyyy","");r.drawChart();f.show();}}var an="";var ag="";if(x&&!Ext.isEmpty(Q.totalAppAvail)&&Q.totalAppAvail!=undefined){an='<div style="text-align:center;padding:12px" class="newFont_bold13">'+availabilityLabel+'</div><div id="tot_appLaunchAvailTime_id" style="height:250px;width:100%;overflow:hidden;padding:0px"></div>';
}else{an='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+availabilityLabel+'</div><div style="height:250px;width:100%;overflow:hidden;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}if(x&&!Ext.isEmpty(Q.totalAppDura)&&Q.totalAppDura!=undefined){ag='<div style="text-align:center;padding:12px" class="newFont_bold13">'+durationLabel+'</div><div id="tot_appLaunchDurationTime_id" style="height:250px;width:100%;overflow:hidden;padding:0px"></div>';}else{ag='<div style="text-align:center;padding:12px" class="newFont_bold13">&nbsp;'+durationLabel+'</div><div style="height:250px;width:100%;overflow:hidden;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}f.add({xtype:"panel",margin:"10 10 0 10",ui:"newGraphPanel",title:applnDesktopLaunchDetailsLabel,bodyPadding:"0 0 0 0",padding:"0 10 10 0",flex:1,layout:{type:"column",align:"stretch"},defaults:{columnWidth:0.5},items:[{xtype:"container",cls:"graphSeperatorLineBottomRight",padding:"0 30 0 20",margin:"0 0 0 10",html:an},{xtype:"container",cls:"graphSeperatorLineBottom",padding:"0 20 0 30",html:ag}]});
if(x&&!Ext.isEmpty(Q.totalAppAvail)&&Q.totalAppAvail!=undefined){var U={};U=jQuery.extend(true,{},getHighChartsInstance("tot_appLaunchAvailTime_id",Q.totalAppAvail.chartHeight,Q.totalAppAvail.chartWidth),U);U.setData(Q.totalAppAvail,"MMM dd, yyyy","");U.drawChart();f.show();}if(x&&!Ext.isEmpty(Q.totalAppDura)&&Q.totalAppDura!=undefined){var O={};
O=jQuery.extend(true,{},getHighChartsInstance("tot_appLaunchDurationTime_id",Q.totalAppDura.chartHeight,Q.totalAppDura.chartWidth),O);O.setData(Q.totalAppDura,"MMM dd, yyyy","");O.drawChart();f.show();}var F="";var ad="";var aa="";if(x&&!Ext.isEmpty(Q.logonDonutHealth)&&Q.logonDonutHealth!=undefined){F='<div><table width="100%" ><col width="70%"><col width="30%"> <tr><td ><div style="text-align:center;padding:12px" class="newFont_bold13">'+webLogonLabel+'</div><div id="logonHealth" style="height:200px;width:100%;overflow:auto;padding:0px"></div></td>';
F+='<td><table align="left" cellpadding="0" cellspacing="0" border="0"><tbody>';if(Q.lg_Critical!=undefined&&Q.lg_Critical!=null){F+='<tr><td><div style="background-color:#CC0000;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Critical - '+Q.lg_Critical+"</td></tr>";
}if(Q.lg_Major!=undefined&&Q.lg_Major!=null){F+='<tr><td><div style="background-color:#FA9D1C;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Major - '+Q.lg_Major+"</td></tr>";}if(Q.lg_Minor!=undefined&&Q.lg_Minor!=null){F+='<tr><td><div style="background-color:#CCC100;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Minor - '+Q.lg_Minor+"</td></tr>";
}if(Q.lg_Normal!=undefined&&Q.lg_Normal!=null){F+='<tr><td><div style="background-color:#457E08;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Normal - '+Q.lg_Normal+"</td></tr>";}if(Q.lg_Unkown!=undefined&&Q.lg_Unkown!=null){F+='<tr><td><div style="background-color:#49909F;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Unknown - '+Q.lg_Unkown+"</td></tr>";
}F+="</tbody></table></td></tr></table></div>";}else{F='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+webLogonLabel+'</div><div style="height:250px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}if(s){if(x&&!Ext.isEmpty(Q.enumDonutHealth)&&Q.enumDonutHealth!=undefined){aa='<div><table width="100%" ><col width="70%"><col width="30%"> <tr><td ><div style="text-align:center;padding:12px" class="newFont_bold13">'+applnDesktopEnumLabel+'</div><div id="enumHealth" style="height:200px;width:100%;overflow:auto;padding:0px"></div></td>';
aa+='<td><table align="left" cellpadding="0" cellspacing="0" border="0"><tbody>';if(Q.enum_Critical!=undefined&&Q.enum_Critical!=null){aa+='<tr><td><div style="background-color:#CC0000;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Critical - '+Q.enum_Critical+"</td></tr>";
}if(Q.enum_Major!=undefined&&Q.enum_Major!=null){aa+='<tr><td><div style="background-color:#FA9D1C;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Major - '+Q.enum_Major+"</td></tr>";}if(Q.enum_Minor!=undefined&&Q.enum_Minor!=null){aa+='<tr><td><div style="background-color:#CCC100;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Minor - '+Q.enum_Minor+"</td></tr>";
}if(Q.enum_Normal!=undefined&&Q.enum_Normal!=null){aa+='<tr><td><div style="background-color:#457E08;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Normal - '+Q.enum_Normal+"</td></tr>";}if(Q.enum_Unkown!=undefined&&Q.enum_Unkown!=null){aa+='<tr><td><div style="background-color:#49909F;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Unkown - '+Q.enum_Unkown+"</td></tr>";
}aa+="</tbody></table></td></tr></table></div>";}else{aa='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+applnDesktopEnumLabel+' </div><div style="height:250px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available </div></td></tr></table></div>';
}}if(x&&!Ext.isEmpty(Q.total_appLaunchDonutHealth)&&Q.total_appLaunchDonutHealth!=undefined){ad='<div><table width="100%" ><col width="70%"><col width="30%"> <tr><td ><div style="text-align:center;padding:12px" class="newFont_bold13">'+applnDesktopLaunchLabel+'</div><div id="tot_appLaunchHealth" style="height:200px;width:100%;overflow:auto;padding:0px"></div></td>';
ad+='<td><table align="left" cellpadding="0" cellspacing="0" border="0"><tbody>';if(Q.tot_app_Critical!=undefined&&Q.tot_app_Critical!=null){ad+='<tr><td><div style="background-color:#CC0000;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Critical - '+Q.tot_app_Critical+"</td></tr>";
}if(Q.tot_app_Major!=undefined&&Q.tot_app_Major!=null){ad+='<tr><td><div style="background-color:#FA9D1C;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Major - '+Q.tot_app_Major+"</td></tr>";}if(Q.tot_app_Minor!=undefined&&Q.tot_app_Minor!=null){ad+='<tr><td><div style="background-color:#CCC100;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Minor - '+Q.tot_app_Minor+"</td></tr>";
}if(Q.tot_app_Normal!=undefined&&Q.tot_app_Normal!=null){ad+='<tr><td><div style="background-color:#457E08;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Normal - '+Q.tot_app_Normal+"</td></tr>";}if(Q.tot_app_Unkown!=undefined&&Q.tot_app_Unkown!=null){ad+='<tr><td><div style="background-color:#49909F;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Unkown - '+Q.tot_app_Unkown+"</td></tr>";
}ad+="</tbody></table></td></tr></table></div>";}else{ad='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+applnDesktopLaunchLabel+'</div><div style="height:250px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}f.add({xtype:"panel",margin:"10 10 10 10",ui:"newGraphPanel",title:healthPercLabel+"(%)",bodyPadding:"0 0 0 0",padding:"0 10 10 0",flex:1,id:"healthChrt",layout:{type:"column",align:"stretch"},defaults:{columnWidth:0.5,},items:[{xtype:"container",cls:"graphSeperatorLineBottomRight",padding:"0 30 20 20",margin:"0 0 0 10",html:F}]});
if(s){Ext.getCmp("healthChrt").add({xtype:"container",cls:"graphSeperatorLineBottom",padding:"0 20 20 30",html:aa});}Ext.getCmp("healthChrt").add({xtype:"container",cls:"graphSeperatorLineRight",padding:"0 30 0 20",html:ad});if(x&&!Ext.isEmpty(Q.logonDonutHealth)&&Q.logonDonutHealth!=undefined){var l={};
l=jQuery.extend(true,{},getHighChartsBarInstance("logonHealth",Q.chartWidth,Q.chartHeight),l);l.setData(Q.logonDonutHealth,"","","donut");l.drawChart();f.show();}if(s&&x&&!Ext.isEmpty(Q.enumDonutHealth)&&Q.enumDonutHealth!=undefined){var am={};am=jQuery.extend(true,{},getHighChartsBarInstance("enumHealth",Q.chartWidth,Q.chartHeight),am);
am.setData(Q.enumDonutHealth,"","","donut");am.drawChart();f.show();}if(x&&!Ext.isEmpty(Q.total_appLaunchDonutHealth)&&Q.total_appLaunchDonutHealth!=undefined){var X={};X=jQuery.extend(true,{},getHighChartsBarInstance("tot_appLaunchHealth",280,280),X);X.setData(Q.total_appLaunchDonutHealth,"","","donut");
X.drawChart();f.show();}}}else{this.disableTools();f.hide();var D=Ext.getCmp("errorPanelId");var B='<div class="egFlexCenterByColumnWise" style="height:100%"> <div class="iconInformation"></div> <div class="commonErrorMsgText">No Measures Available!</div> </div>';D.add({xtype:"panel",html:B,ui:"newGraphPanel",margin:"5 10 10 10",flex:1,cls:"selectionDetailsBorder selectionDetailsBg",layout:{type:"fit",align:"stretch"},});
D.show();}}else{this.disableTools();f.hide();var D=Ext.getCmp("errorPanelId");var B='<div class="egFlexCenterByColumnWise" style="height:100%"> <div class="iconInformation"></div> <div class="commonErrorMsgText">No Measures Available!</div> </div>';D.add({xtype:"panel",html:B,ui:"newGraphPanel",margin:"5 10 10 10",flex:1,cls:"selectionDetailsBorder selectionDetailsBg",layout:{type:"fit",align:"stretch"},});
D.show();}}});},loadReportData:function(c){var e=Ext.getCmp("resultPanel");e.removeAll();var d=this;var a=c.reportData;var b=false;Ext.getCmp("bookletTool").setDisabled(false);Ext.getCmp("saveTool").setDisabled(false);Ext.getCmp("printTool").setDisabled(false);Ext.getCmp("mailTool").setDisabled(false);
e.setTitle("<span class='font_bold'>"+a.title+"</span>");e.show();Ext.getCmp("selectionDetails").setSelectionDetailsData(c.selectionDetails);Ext.getCmp("thinclientapplication").doLayout();Ext.getCmp("thinclientapplication").doComponentLayout();},submitReport:function(){if(!isSettingsEnabled){this.showConfigDropdown();
}var e;var d;var n;var k;var b=Ext.getCmp("mainform").getForm();var o=this.validateMainForm(true);if(o){this.updateQStringUsage();}var h="";if(isSettingsEnabled){var f=Ext.getCmp("showLegend").getValue();if(f!=null&&f!=undefined&&f!="undefined"){h="&showLegend="+f;}}else{h="&showLegend=true";}k=appConstants.queryStringUsage+h;
e="../servlet/com.eg.ErCtxLogonSimulator?isSubmit=true&responseType=json";d="../servlet/com.eg.ErStartBackGroundReportC?isSubmit=true&responseType=json";var i=Ext.getCmp("resultPanel");var g=null;if(isSettingsEnabled){g=this.getThinclientapplicationsettings().getForm();}var a=this.getSettingsFieldValue(g,"reportGeneration",isSettingsEnabled,"reportGeneration");
var m=Ext.getCmp("errorPanelId");m.hide();this.getBackGroundPanel().hide();k+="&er_RmDispName="+appConstants.er_RmDispName;if(a=="foreground"){Ext.Ajax.request({url:e,params:k,method:"POST",scope:this,timout:320000,success:function(p){var r=p.responseText;var q=Ext.decode(r);appConstants.publicjsonDataUsage=q;
this.loadReportData(q);if(targetType=="applicationBased"){this.loadGridforApp(q);}else{this.loadGrid(q);}}});}else{if(a=="background"){i.hide();var c="";var l=this;var j=Ext.getCmp("bgReportName").getValue();j=checkFileName(j);Ext.Ajax.request({url:d,params:k+"&bg_reportname="+j,success:function(q){var v=q.responseText;
var t=Ext.decode(v);publicjsonData=t;var u=t.backgroundReportStatus;var p=t.bgGroundMsg;if(u!="undefined"){if(u=="success"){var r=t.bgroundResponseTxt;var w=t.bgroundReportsURL;var s=t.backgroundAnchor;c='<table border="0px" width="100%" height="100%"><tr><td align="center" valign="middle"><table style="width:480px;"border="0px"><tr><td><div style="margin:0px 10px 0px 0px;display:block;width:32px;height:32px;float:right;" class="iconSuccess"></div></td><td><div style="line-height:1.5em" class="font_bold11">'+r+".</br>"+'<a class="backgroundMsgLink" href='+w+">"+s+"</a></div></td></tr></table></td></tr></table>";
}else{if(u=="duplicate"||(p!=null)){var r=t.bgroundResponseTxt;var w=t.bgroundReportsURL;var s=t.backgroundAnchor;c='<table border="0px" width="100%" height="100%"><tr><td align="center" valign="middle"><table style="width:480px;"border="0px"><tr><td><div style="margin:0px 10px 0px 0px;display:block;width:32px;height:32px;float:right;" class="iconInformation"></div></td><td><div style="line-height:1.5em" class="font_bold11">'+r+".</br>"+'<a class="backgroundMsgLink" href='+w+">"+s+"</a></div></td></tr></table></td></tr></table>";
}else{var r=t.bgroundResponseTxt;c='<table border="0px" width="100%" height="100%"><tr><td align="center" valign="middle"><table style="width:480px;"border="0px"><tr><td><div style="margin:0px 10px 0px 0px;display:block;width:32px;height:32px;float:right;" class="iconInformation"></div></td><td><div style="line-height:1.5em" class="font_bold11">'+r+"</div></td></tr></table></td></tr></table>";
}}}else{c="<span>ErroR In BackGround Generation</span>";}l.getBackGroundPanel().update(c);l.getBackGroundPanel().show();}});}}},reportGenChange:function(){Ext.getCmp("resultPanel").hide();this.disableTools();var b=this.getThinclientapplicationsettings().getForm();var a=b.findField("reportGeneration").getValue();
Ext.getCmp("submitViaSetting").show();Ext.getCmp("moreOptionCloseId").hide();if(a=="background"){b.findField("bgReportName").setValue("");Ext.getCmp("bgReportName").show();}else{if(a=="background-csv"){b.findField("bgReportName").setValue("");Ext.getCmp("bgReportName").show();}else{Ext.getCmp("submitViaSetting").hide();
Ext.getCmp("moreOptionCloseId").show();Ext.getCmp("bgReportName").hide();}}},weekendOnChange:function(){var b=Ext.getCmp("er_excwe").getValue();var a=Ext.getCmp("excludeDays");if(b=="Yes"){a.show();a.update(appConstants.publicjsonDataActivity.screenLabels["MappedExcludeDays"]);}else{a.hide();}},loadTools:function(){this.getNewUtilities().loadIcon(true,true,true,false,true,true,true,false,false,false,true);
Ext.getCmp("favoriteTool").setDisabled(false);Ext.getCmp("scheduleTool").setDisabled(false);},disableTools:function(){Ext.getCmp("saveTool").setDisabled(true);Ext.getCmp("bookletTool").setDisabled(true);Ext.getCmp("printTool").setDisabled(true);Ext.getCmp("mailTool").setDisabled(true);Ext.getCmp("csvTool").setDisabled(true);
},updateQStringUsage:function(){var v="";var y="";var A;var b;var g=new Array();var u=Ext.getCmp("mainform").getForm();var a=null;if(isSettingsEnabled){a=this.getThinclientapplicationsettings().getForm();}g=Ext.getCmp("er_server").getValue();var h=Ext.getCmp("er_location").getValue();appConstants.er_location=appConstants;
if(appConstants.isFourthPage!=null&&appConstants.isFourthPage=="true"&&appConstants.isNavigation!=null&&appConstants.isNavigation=="false"&&appConstants.isFifthPage!=null&&appConstants.isFifthPage=="true"&&appConstants.isThirdPage!=null&&appConstants.isThirdPage=="true"){v="";}else{if(appConstants.isFourthPage!=null&&appConstants.isFourthPage!="false"&&appConstants.isNavigation!=null&&appConstants.isNavigation!="true"&&appConstants.isFifthPage!=null&&appConstants.isFifthPage!="false"&&appConstants.isThirdPage!=null&&appConstants.isThirdPage!="false"){v="&pageNo=0";
}}if(targetType!=null&&targetType!=undefined&&targetType=="applicationBased"&&appConstants.fromLoc!=undefined&&appConstants.fromLoc=="yes"){v+="&fromLoc=yes";}else{v+="&fromLoc=no";}v+="&er_trgttype="+targetType+"&er_compType="+u.findField("er_compType").getValue()+"&er_reportgenration="+this.getSettingsFieldValue(a,"reportGeneration",isSettingsEnabled,"reportGeneration");
v+="&isNeedBack="+appConstants.isNeedBack;if(targetType=="applicationBased"){if(appConstants.isFromBack){var l=Ext.getCmp("er_applicationX");l.getStore().clearFilter(true);l.getStore().loadRawData(jsonData.applnCombo);l.setValue(jsonData.applnCombo[0].valueField);this.appOnChange();}v+="&er_applicationX="+encodeURIComponent(u.findField("er_applicationX").getValue());
if(targetType!=null&&targetType!=undefined&&targetType=="applicationBased"&&appConstants.fromLoc!=undefined&&appConstants.fromLoc=="yes"){}}else{v+="&er_location="+encodeURIComponent(u.findField("er_location").getValue());}var q=Ext.getCmp("er_option");if(q!=undefined){v+="&er_option="+q.getValue();if(q.getValue()=="Zone"){var s=u.findField("select_farm").getValue();
v+="&er_zone="+s;}else{if(q.getValue()=="Segment"||q.getValue()=="Service"){var m=Ext.getCmp("er_site");v+="&er_site="+m.getValue();}}}if(Ext.get("showLegend")!=null){v=v+"&showLegend="+u.findField("showLegend").getValue();}for(var t=0;g.length>t;t++){v+="&er_component="+g[t];}if(isSettingsEnabled){var d=Ext.getCmp("uppermajor").getValue();
if(!Ext.isEmpty(d)){v+="&uppermajor="+d;}d=Ext.getCmp("upperminor").getValue();if(!Ext.isEmpty(d)){v+="&upperminor="+d;}d=Ext.getCmp("upperCritical").getValue();if(!Ext.isEmpty(d)){v+="&upperCritical="+d;}d=Ext.getCmp("uppermajor_enum").getValue();if(!Ext.isEmpty(d)){v+="&uppermajor_enum="+d;}d=Ext.getCmp("upperminor_enum").getValue();
if(!Ext.isEmpty(d)){v+="&upperminor_enum="+d;}d=Ext.getCmp("upperCritical_enum").getValue();if(!Ext.isEmpty(d)){v+="&upperCritical_enum="+d;}d=Ext.getCmp("uppermajor_appl").getValue();if(!Ext.isEmpty(d)){v+="&uppermajor_appl="+d;}d=Ext.getCmp("upperminor_appl").getValue();if(!Ext.isEmpty(d)){v+="&upperminor_appl="+d;
}d=Ext.getCmp("upperCritical_appl").getValue();if(!Ext.isEmpty(d)){v+="&upperCritical_appl="+d;}}var A="&er_timeline="+u.findField("er_timeline").getValue()+"&startdate="+u.findField("er_stdate").dataArray+"&enddate="+u.findField("er_enddate").dataArray+"&starthr="+u.findField("er_sthr").dataArray+"&endhr="+u.findField("er_endhr").dataArray+"&startmin="+mgr_stmin+"&endmin="+mgr_enmin;
var p=this.getSettingsFieldValue(a,"timefrom",isSettingsEnabled,"selectedTimeFrom");var z=this.getSettingsFieldValue(a,"minfrom",isSettingsEnabled,"selectedMinsFrom");var e=this.getSettingsFieldValue(a,"timeto",isSettingsEnabled,"selectedTimeTo");var x=this.getSettingsFieldValue(a,"minto",isSettingsEnabled,"selectedMinsTo");
var j="&timefrom="+p+"&minfrom="+z+"&timeto="+e+"&minto="+x;var r=Ext.getCmp("er_server").getValue();var C=Ext.getCmp("er_location").getValue();var B=Ext.getCmp("er_applicationX").getValue();if(appConstants.publicjsonDataUsage.hasOwnProperty("hiddenfields")){var n=appConstants.publicjsonDataUsage.hiddenfields;
for(var f in n){y+="&"+f+"="+n[f];}}var i=Ext.getCmp("er_location").getValue();var w=Ext.getCmp("er_applicationX").getValue();var c="";if(targetType!=null&&appConstants.isThirdPage!=undefined&&appConstants.isThirdPage!="true"&&((i!=undefined&&i=="all")||(w!=undefined&&w=="All"))){if(targetType=="locationBased"){printPageIdentify="&printPageIdentify=locMainTable";
}else{printPageIdentify="&printPageIdentify=appMainTable";}}if(targetType!=null&&targetType=="locationBased"&&appConstants.isFourthPage!="true"&&appConstants.isFifthPage!="true"&&i!=undefined&&i!="all"){printPageIdentify="&printPageIdentify=locFirstPage";}if(appConstants.isFourthPage!=undefined&&appConstants.isFourthPage=="true"){printPageIdentify="&isFourthPage=true&printPageIdentify=locSecondPage";
}if(appConstants.isFifthPage!=undefined&&appConstants.isFifthPage=="true"){printPageIdentify="&isFifthPage=true&printPageIdentify=locThirdPage";}if((appConstants.isThirdPage!=undefined&&appConstants.isThirdPage=="true")||(B!=undefined&&B!="All")){printPageIdentify="&printPageIdentify=appSecondPage";}if(appConstants.commonPage!=null&&appConstants.commonPage!=undefined&&appConstants.commonPage=="yes"){v+="&commonPage=yes";
printPageIdentify="&printPageIdentify=commonPage";}v+=printPageIdentify;console.log("-------venkatesan@eginnovations.com-----------");if(appConstants.showPartial!=undefined&&appConstants.showPartial!=null){v+="&checkFull="+appConstants.showPartial;}if(appConstants.byName==null){appConstants.byName="no";
}v+="&byName="+appConstants.byName;v+="&selectedLoc="+C+"&selectedApp="+encodeURIComponent(B)+"&selectedCompnt="+r;if(targetType=="locationBased"){var o=Ext.getCmp("appForAgent").getValue();v+="&appForAgent="+encodeURIComponent(o);}appConstants.queryStringUsage=v+A+y+j;},afterMainRender:function(){var a=this;
this.refreshReportData(appConstants.publicjsonDataUsage);},loadFormElements:function(){registerAjaxEvents();var l;var a=Ext.getCmp("mainform").getForm();if(appConstants.er_RmDispName!=null&&appConstants.er_RmDispName!="null"&&appConstants.er_RmDispName!="undefined"){this.getMain().setTitle(appConstants.er_RmDispName);
}else{this.getMain().setTitle(appConstants.publicjsonDataUsage.reportTitle);}this.fillFormFieldsForUsage(appConstants.publicjsonDataUsage);Ext.getCmp("egcomponent").show();if(!hideBackButton){Ext.getCmp("thinclientapplicationform").add({xtype:"hidden",id:"ID",name:"ID",value:appConstants.publicjsonDataUsage["ID"]});
}jsonData=appConstants.publicjsonDataUsage;var k=jsonData.screenLabels;var m=jsonData.timelineCombo;var o=jsonData.selectedTimeline;var c=a.findField("er_timeline");c.setFieldLabel(k["reporter.common.Timeline"]);c.getStore().loadRawData(m);if(!Ext.isEmpty(m)){if(!Ext.isEmpty(o)){c.setValue(o);}else{c.setValue(m[0].valueField);
}}var e=a.findField("er_option");e.getStore().loadRawData(jsonData.analysisByCombo);if(!Ext.isEmpty(jsonData.selectedAnalysisByCombo)){e.setValue(jsonData.selectedAnalysisByCombo);}else{if(jsonData.analysisByCombo!=undefined){e.setValue(jsonData.analysisByCombo[0].valueField);}}var i=jsonData.startHour;
var d=jsonData.endHour;var g=jsonData.startDate;var b=jsonData.endDate;var f=a.findField("er_stdate");f.setValue(jsonData.startDateForDisplay);f.dataArray=g;var n=a.findField("er_sthr");n.setValue(jsonData.startHourForDisplay);n.dataArray=i;var j=a.findField("er_enddate");j.setValue(jsonData.endDateForDisplay);
j.dataArray=b;var h=a.findField("er_endhr");h.setValue(jsonData.endHourForDisplay);h.dataArray=d;mgr_stmin=jsonData.startmin;mgr_enmin=jsonData.endmin;if(appConstants.forceSubmit=="true"){this.showResult();appConstants.forceSubmit="false";}},refreshReportData:function(e){if(appConstants.isSubmit!=null&&appConstants.isSubmit=="true"){this.gridColStateParam="ASC";
this.gridColIndexParam=e.selectedSort;}else{if(appConstants.isForceSubmit=="true"){appConstants.isForceSubmit="false";this.showResult();}}if((appConstants.isThirdPage!=undefined&&appConstants.isThirdPage=="true")||(appConstants.isFourthPage!=undefined&&appConstants.isFourthPage=="true")||(appConstants.isFifthPage!=undefined&&appConstants.isFifthPage=="true")||(appConstants.isSubmit!=null&&appConstants.isSubmit=="true")){var b;
var c=Ext.getCmp("er_applicationX").getValue();b=Ext.getCmp("er_location");b.getStore().clearFilter(true);b.getStore().loadRawData(e.locationCmbo);b.setValue(e.locationselectOptions.selectedLocationsType);var a=Ext.getCmp("er_location").getValue();b=Ext.getCmp("er_server");var d=e.componentCombo;var f=e.selectedComponents;
b.getStore().loadRawData(d);appConstants.rawDataForComponents=d;if(!Ext.isEmpty(f)){b.setValue(f);}else{if(!Ext.isEmpty(d)){b.setValue(d[0].valueField);}else{b.setValue("-1");}}this.submitReport();}},closeSettingAndSubmit:function(){if(this.validateAndCloseSettings()){this.showResult();}},validateAndCloseSettings:function(){var b=this.validateSettings();
var a=Ext.getCmp("submit");a.setDisabled(true);if(b){a.setDisabled(false);Ext.get("configMod").animate({duration:500,to:{y:-500}});return true;}},loadSettingsElements:function(){var a="";var j="";a=appConstants.publicjsonDataUsage["hiddenfields"];j=a["favorite_id"];Ext.getCmp("moreOptionCloseId").show();
if(!Ext.isEmpty(j)){Ext.getCmp("reportGeneration").setDisabled(true);}var e;var f;var l;var b=this.getThinclientapplicationsettings().getForm();jsonData=appConstants.publicjsonDataUsage;var h=jsonData.screenLabels;Ext.getCmp("timeperiodLbl").setText(h["reporter.common.Time period"]);b.findField("timefrom").setValue(jsonData.selectedTimeFrom);
b.findField("minfrom").setValue(jsonData.selectedMinsFrom);b.findField("timeto").setValue(jsonData.selectedTimeTo);b.findField("minto").setValue(jsonData.selectedMinsTo);stmin=jsonData.startMinForDisplay;enmin=jsonData.endMinForDisplay;updatingAppSettings();var m=jsonData.reportGenerationCombo;var k=jsonData.reportGeneration;
var c=b.findField("reportGeneration");c.setFieldLabel(h["reporter.common.Report Generation"]);c.getStore().loadRawData(m);c.setValue(k);var g=this;Ext.EventManager.onWindowResize(function(){Ext.get("configMod").setStyle("left","");});Ext.get("closeSettings").on("click",function(){g.validateAndCloseSettings();
});b.findField("er_excwe").hide();if(targetType=="applicationBased"){var i=Ext.getCmp("er_applicationX").getValue();if(i!=undefined&&i!="All"){if(isSettingsEnabled){Ext.getCmp("lowLimitLbl").hide();Ext.getCmp("lowLimitLbl_enum").hide();Ext.getCmp("lowLimitLbl_appl").hide();Ext.getCmp("logonStatusSepId").hide();
}}else{if(isSettingsEnabled){Ext.getCmp("lowLimitLbl").show();Ext.getCmp("lowLimitLbl_enum").show();Ext.getCmp("lowLimitLbl_appl").show();Ext.getCmp("logonStatusSepId").show();if(!Ext.isEmpty(jsonData.majorValue)){Ext.getCmp("uppermajor").setValue(jsonData.majorValue);}if(!Ext.isEmpty(jsonData.minorValue)){Ext.getCmp("upperminor").setValue(jsonData.minorValue);
}if(!Ext.isEmpty(jsonData.criticalValue)){Ext.getCmp("upperCritical").setValue(jsonData.criticalValue);}if(!Ext.isEmpty(jsonData.criticalColor)){Ext.get("upperCritical").setStyle("background-color",jsonData.criticalColor);}if(!Ext.isEmpty(jsonData.majorColor)){Ext.get("uppermajor").setStyle("background-color",jsonData.majorColor);
}if(!Ext.isEmpty(jsonData.minorColor)){Ext.get("upperminor").setStyle("background-color",jsonData.minorColor);}Ext.getCmp("lowLimitLbl_enum").show();if(!Ext.isEmpty(jsonData.majorValue)){Ext.getCmp("uppermajor_enum").setValue(jsonData.majorValue);}if(!Ext.isEmpty(jsonData.minorValue)){Ext.getCmp("upperminor_enum").setValue(jsonData.minorValue);
}if(!Ext.isEmpty(jsonData.criticalValue)){Ext.getCmp("upperCritical_enum").setValue(jsonData.criticalValue);}if(!Ext.isEmpty(jsonData.criticalColor)){Ext.get("upperCritical_enum").setStyle("background-color",jsonData.criticalColor);}if(!Ext.isEmpty(jsonData.majorColor)){Ext.get("uppermajor_enum").setStyle("background-color",jsonData.majorColor);
}if(!Ext.isEmpty(jsonData.minorColor)){Ext.get("upperminor_enum").setStyle("background-color",jsonData.minorColor);}Ext.getCmp("lowLimitLbl_enum").show();if(!Ext.isEmpty(jsonData.majorValue)){Ext.getCmp("uppermajor_appl").setValue(jsonData.majorValue);}if(!Ext.isEmpty(jsonData.minorValue)){Ext.getCmp("upperminor_appl").setValue(jsonData.minorValue);
}if(!Ext.isEmpty(jsonData.criticalValue)){Ext.getCmp("upperCritical_appl").setValue(jsonData.criticalValue);}if(!Ext.isEmpty(jsonData.criticalColor)){Ext.get("upperCritical_appl").setStyle("background-color",jsonData.criticalColor);}if(!Ext.isEmpty(jsonData.majorColor)){Ext.get("uppermajor_appl").setStyle("background-color",jsonData.majorColor);
}if(!Ext.isEmpty(jsonData.minorColor)){Ext.get("upperminor_appl").setStyle("background-color",jsonData.minorColor);}}}}else{var d=Ext.getCmp("er_location").getValue();if(d!=undefined&&d!="all"){if(isSettingsEnabled){Ext.getCmp("lowLimitLbl").hide();Ext.getCmp("lowLimitLbl_enum").hide();Ext.getCmp("lowLimitLbl_appl").hide();
Ext.getCmp("logonStatusSepId").hide();}}else{if(isSettingsEnabled){Ext.getCmp("lowLimitLbl").show();Ext.getCmp("lowLimitLbl_enum").show();Ext.getCmp("lowLimitLbl_appl").show();Ext.getCmp("logonStatusSepId").show();if(!Ext.isEmpty(jsonData.majorValue)){Ext.getCmp("uppermajor").setValue(jsonData.majorValue);
}if(!Ext.isEmpty(jsonData.minorValue)){Ext.getCmp("upperminor").setValue(jsonData.minorValue);}if(!Ext.isEmpty(jsonData.criticalValue)){Ext.getCmp("upperCritical").setValue(jsonData.criticalValue);}if(!Ext.isEmpty(jsonData.criticalColor)){Ext.get("upperCritical").setStyle("background-color",jsonData.criticalColor);
}if(!Ext.isEmpty(jsonData.majorColor)){Ext.get("uppermajor").setStyle("background-color",jsonData.majorColor);}if(!Ext.isEmpty(jsonData.minorColor)){Ext.get("upperminor").setStyle("background-color",jsonData.minorColor);}Ext.getCmp("lowLimitLbl_enum").show();if(!Ext.isEmpty(jsonData.majorValue)){Ext.getCmp("uppermajor_enum").setValue(jsonData.majorValue);
}if(!Ext.isEmpty(jsonData.minorValue)){Ext.getCmp("upperminor_enum").setValue(jsonData.minorValue);}if(!Ext.isEmpty(jsonData.criticalValue)){Ext.getCmp("upperCritical_enum").setValue(jsonData.criticalValue);}if(!Ext.isEmpty(jsonData.criticalColor)){Ext.get("upperCritical_enum").setStyle("background-color",jsonData.criticalColor);
}if(!Ext.isEmpty(jsonData.majorColor)){Ext.get("uppermajor_enum").setStyle("background-color",jsonData.majorColor);}if(!Ext.isEmpty(jsonData.minorColor)){Ext.get("upperminor_enum").setStyle("background-color",jsonData.minorColor);}Ext.getCmp("lowLimitLbl_enum").show();if(!Ext.isEmpty(jsonData.majorValue)){Ext.getCmp("uppermajor_appl").setValue(jsonData.majorValue);
}if(!Ext.isEmpty(jsonData.minorValue)){Ext.getCmp("upperminor_appl").setValue(jsonData.minorValue);}if(!Ext.isEmpty(jsonData.criticalValue)){Ext.getCmp("upperCritical_appl").setValue(jsonData.criticalValue);}if(!Ext.isEmpty(jsonData.criticalColor)){Ext.get("upperCritical_appl").setStyle("background-color",jsonData.criticalColor);
}if(!Ext.isEmpty(jsonData.majorColor)){Ext.get("uppermajor_appl").setStyle("background-color",jsonData.majorColor);}if(!Ext.isEmpty(jsonData.minorColor)){Ext.get("upperminor_appl").setStyle("background-color",jsonData.minorColor);}}}}},showConfigDropdown:function(){isSettingsEnabled=true;var a=new Ext.XTemplate('<div style="float:left;margin:0px 0px 0px 0px">'+settings+'</div><div style="text-align:right;float:right;"><div class="iconCloseNew" id="closeSettings"></div></div>');
Ext.create("Ext.container.Container",{width:565,id:"configMod",ui:"settingsWindowContainer",items:[{xtype:"container",cls:"configMode_popupArrow",style:{"top":"-14px","left":"355px"}},{xtype:"container",html:a.apply(),style:{"top":"0px","margin":"0px"},cls:"containerHeader"},{xtype:"thinclientapplicationsettings",parent:this}],renderTo:"thinclientapplication"});
},expandMeUsage:function(a){if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");}appConstants.erUtils.expandMultiComboButton(Ext.getCmp("er_server"),Ext.getCmp("systemLabel").text,a);},expandMeActivity:function(a){if(Ext.isEmpty(appConstants.erUtils)){appConstants.erUtils=Ext.widget("erutils");
}appConstants.erUtils.expandMultiComboButton(Ext.getCmp("er_server"),Ext.getCmp("multiSelectLabel").text,a);},getSettingsFieldValue:function(a,g,d,e){var b=null;b=appConstants.publicjsonDataUsage;var f="";if(d){var c=a.findField(g);if(!Ext.isEmpty(c)){f=c.getValue();}}else{if(b!=null){f=b[e];}}return f;
},insideBackButton:function(a,c){for(var b=1;b<7;b++){if(b==a){if(c){Ext.getCmp("bckButton_"+b).hide();}else{Ext.getCmp("bckButton_"+b).show();}}else{Ext.getCmp("bckButton_"+b).hide();}}},goTotalGraphs:function(c,i,h){appConstants.showPartial=h;appConstants.commonPage="yes";c+="&commonPage=yes&checkFull="+h+"&byName="+h;
appConstants.printPageIdentify="commonPage";appConstants.queryStringUsage=appConstants.queryStringUsage.replace("locMainTable",appConstants.printPageIdentify);appConstants.queryStringUsage=appConstants.queryStringUsage.replace("locFirstPage",appConstants.printPageIdentify);var e=this;var b=c.substring(c.indexOf("?")+1);
var f=c.substring(0,c.indexOf("?"));var g=Ext.getCmp("er_location").getValue();var d=Ext.getCmp("resultPanel");d.removeAll();var a="";Ext.Ajax.request({url:f,params:b+"&responseType=json",method:"POST",scope:this,success:function(p){var u=p.responseText;var E=Ext.decode(u);appConstants.publicjsonDataUsage=E;
var O=Ext.getCmp("er_server");var B=E.componentCombo;var j=E.selectedComponents;appConstants.rawDataForComponents=B;O.getStore().loadRawData(B);if(!Ext.isEmpty(j)){O.setValue(j);}else{if(!Ext.isEmpty(B)){O.setValue(B[0].valueField);}else{O.setValue("-1");}}var z=E.applnCombo;var A=E.selectedAppln;O=Ext.getCmp("appForAgent");
O.getStore().clearFilter(true);O.getStore().loadRawData(z);if(appConstants.isThirdPage!=null&&appConstants.isThirdPage=="true"&&!Ext.isEmpty(E.selectedapplicationX)){O.setValue(E.selectedapplicationX);}else{if(!Ext.isEmpty(A)&&appConstants.isThirdPage!=null&&appConstants.isThirdPage!="true"){O.setValue(A);
}else{O.setValue(z[0].valueField);}}var s=E.enableEnumulation;var w=E.checkData;var V=E.secondPageData;var M=V["summaryList"]["totalLogon"];var J=V["summaryList"]["successLogon"];var C=V["summaryList"]["failLogon"];var q=V["summaryList"]["failedEnum"];var L=V["summaryList"]["failedSimu"];var v=V["summaryList"]["failedApp"];
a+='<div style="margin:10px auto 0px auto;height:150px;"><table border="0px" height="100%"><tr><td align="right" valign="middle"><div  id="tot_donuts_id" ></div></td>';a+='<td align="center" valign="middle">';if(M>0){if(E.donSucc!=undefined&&E.donSucc!=null){a+='<div style="float:left"><table><tr><td valign="top" style="padding:3px"><div style="background-color:#32B395;height:8px;width:8px;">&nbsp;</div></td><td style="padding:0px 20px 5px 5px;" class="newFont_normal11_Legend" valign="top">'+E.donSucc+"</td></tr></table></div>";
}if(E.donFail!=undefined&&E.donFail!=null){a+='<div style="float:left"><table><tr><td valign="top" style="padding:3px"><div style="background-color:#EF7672;height:8px;width:8px;">&nbsp;</div></td><td style="padding:0px 20px 5px 5px;" class="newFont_normal11_Legend" valign="top">'+E.donFail+"</td></tr></table></div>";
}if(E.donEnum!=undefined&&E.donEnum!=null){a+='<div style="float:left"><table><tr><td valign="top" style="padding:3px"><div style="background-color:#F8ABA7;height:8px;width:8px;">&nbsp;</div></td><td style="padding:0px 20px 5px 5px;" class="newFont_normal11_Legend" valign="top">'+E.donEnum+"</td></tr></table></div>";
}if(E.donSimu!=undefined&&E.donSimu!=null){a+='<div style="float:left"><table><tr><td valign="top" style="padding:3px"><div style="background-color:#DE4640;height:8px;width:8px;">&nbsp;</div></td><td style="padding:0px 20px 5px 5px;" class="newFont_normal11_Legend" valign="top">'+E.donSimu+"</td></tr></table></div>";
}if(E.donfApp!=undefined&&E.donfApp!=null){a+='<div style="float:left"><table><tr><td valign="top" style="padding:3px"><div style="background-color:#F7BD42;height:8px;width:8px;">&nbsp;</div></td><td style="padding:0px 20px 5px 5px;" class="newFont_normal11_Legend" valign="top">'+E.donfApp+"</td></tr></table></div>";
}}a+="</td></tr></table></div>";initLdgMask.hide();var H=true;if(s){H=false;}this.insideBackButton(5,false);d.add({xtype:"panel",layout:"column",margin:"10 10 0 10",ui:"newGraphPanel",title:overviewOfSimsLabel+'<span class="f13-normal" style="margin-left:20px">('+simulatorLabel+" : "+E.selectedComponents+", "+externalAgentLabel+" : "+E.selectedLocation+")</span>",padding:0,bodyPadding:0,items:[{xtype:"container",columnWidth:0.7,padding:"6 5 0 5",layout:{type:"column",align:"center",pack:"center"},defaults:{columnWidth:0.33,padding:"10 10 0 10",},items:[{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table align="center"><tr><td align="center" nowrap><div class="egFlexCenterByRowWise"><div class="iconTotalSimulations"/></div><div class="newFont_bold28" style="margin:5px;">'+M+'</div></div></td></tr><tr><td align="center"  width="100%" style="padding:0px 5px 10px 5px"><span class="newFont_normal13">'+totalSimulationsLabel+"</span></td></tr></table>"}]},{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table align="center"><tr><td align="center" nowrap><div class="egFlexCenterByRowWise"><div class="iconSuccessfulSimulations"/></div><div class="newFont_bold28" style="margin:5px;">'+J+'</div></div></td></tr><tr><td align="center"  width="100%" style="padding:0px 5px 10px 5px"><span class="newFont_normal13">'+succuessSimulationsLabel+"</span></td></tr></table>"}]},{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table align="center"><tr><td align="center" nowrap><div class="egFlexCenterByRowWise"><div class="iconFailedSimulations"/></div><div class="newFont_bold28" style="margin:5px;">'+L+'</div></div></td></tr><tr><td align="center"  width="100%" style="padding:0px 5px 10px 5px"><span class="newFont_normal13">'+failedSimulationsLabel+"</span></td></tr></table>"}]},{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table align="center"><tr><td align="center" nowrap><div class="egFlexCenterByRowWise"><div class="iconLogonFailed"/></div><div class="newFont_bold28" style="margin:5px;">'+C+'</div></div></td></tr><tr><td align="center"  width="100%" style="padding:0px 5px 10px 5px"><span class="newFont_normal13">'+failedWebLogonsLabel+"</span></td></tr></table>"}]},{xtype:"container",autoSize:true,align:"stretch",hidden:H,layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table align="center"><tr><td align="center" nowrap><div class="egFlexCenterByRowWise"><div class="iconFailedEnumeration"/></div><div class="newFont_bold28" style="margin:5px;">'+q+'</div></div></td></tr><tr><td align="center"  width="100%" style="padding:0px 5px 10px 5px"><span class="newFont_normal13">'+failedEnumerationsLabel+"</span></td></tr></table>"}]},{xtype:"container",autoSize:true,align:"stretch",layout:{type:"vbox",align:"center",pack:"center"},items:[{xtype:"container",html:'<table align="center"><tr><td align="center" nowrap><div class="egFlexCenterByRowWise"><div class="iconFailedAppLaunch"/></div><div class="newFont_bold28" style="margin:5px;">'+v+'</div></div></td></tr><tr><td align="center"  width="100%" style="padding:0px 5px 10px 5px"><span class="newFont_normal13">'+failedApplnDesktopLabel+"</span></td></tr></table>"}]}]},{xtype:"container",columnWidth:0.3,html:a,}]});
initLdgMask.hide();d.show();if(w&&!Ext.isEmpty(E.donutChartforApp)&&E.donutChartforApp!=undefined){var t={};t=jQuery.extend(true,{},getHighChartsBarInstance("tot_donuts_id",150,150),t);t.setData(E.donutChartforApp,"","","donut");t.drawChart();}var K="";if(i=="true"){appConstants.fromAppLaunchIcon="no";
}else{appConstants.fromAppLaunchIcon="yes";}if(h!=undefined&&(h=="fromLogon"||h=="full")){if(h=="full"){appConstants.checkFull="full";}else{appConstants.byName="fromLogon";}if(w&&!Ext.isEmpty(E.logonDonutHealth)&&E.logonDonutHealth!=undefined){K='<div><table width="100%" ><col width="70%"><col width="30%"> <tr><td ><div style="text-align:center;padding:12px" class="newFont_bold13">'+webLogonHealthPercLabel+'</div><div id="logonHealth" style="height:200px;width:100%;overflow:auto;padding:0px"></div></td>';
K+='<td><table align="left" cellpadding="0" cellspacing="0" border="0"><tbody>';if(E.lg_Critical!=undefined&&E.lg_Critical!=null){K+='<tr><td><div style="background-color:#CC0000;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Critical - '+E.lg_Critical+"</td></tr>";
}if(E.lg_Major!=undefined&&E.lg_Major!=null){K+='<tr><td><div style="background-color:#FA9D1C;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Major - '+E.lg_Major+"</td></tr>";}if(E.lg_Minor!=undefined&&E.lg_Minor!=null){K+='<tr><td><div style="background-color:#CCC100;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Minor - '+E.lg_Minor+"</td></tr>";
}if(E.lg_Normal!=undefined&&E.lg_Normal!=null){K+='<tr><td><div style="background-color:#457E08;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Normal - '+E.lg_Normal+"</td></tr>";}if(E.lg_Unkown!=undefined&&E.lg_Unkown!=null){K+='<tr><td><div style="background-color:#49909F;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Unknown - '+E.lg_Unkown+"</td></tr>";
}K+="</tbody></table></td></tr></table></div>";}else{K='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+webLogonHealthPercLabel+'</div><div style="height:250px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}var U="";if(w&&!Ext.isEmpty(E.appLogonAvail)&&E.appLogonAvail!=undefined){U='<div style="text-align:center;padding:12px" class="newFont_bold13">'+availabilityLabel+'</div><div id="appLocLogonAvail" style="height:250px;width:100%;overflow:auto;padding:0px"></div>';}else{U='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+availabilityLabel+'</div><div style="height:250px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}var P="";if(w&&!Ext.isEmpty(E.appLogonDura)&&E.appLogonDura!=undefined){P='<div style="text-align:center;padding:12px" class="newFont_bold13">'+durationLabel+'</div><div id="appLocLogonDura" style="height:250px;width:100%;overflow:auto;padding:0px"></div>';}else{P='<div style="text-align:center;padding:12px" class="newFont_bold13">&nbsp;'+durationLabel+'</div><div style="height:250px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}d.add({xtype:"panel",margin:"10 10 10 10",ui:"newGraphPanel",title:webLogonDetailsLabel,bodyPadding:"0 0 0 0",padding:"0 10 10 0",flex:1,layout:{type:"column",align:"stretch"},defaults:{columnWidth:0.5},items:[{xtype:"container",cls:"graphSeperatorLineBottomRight",padding:"0 30 0 20",margin:"0 0 0 10",html:U},{xtype:"container",cls:"graphSeperatorLineBottom",padding:"0 20 0 30",html:P},{xtype:"container",cls:"graphSeperatorLineRight",padding:"0 30 0 20",html:K}]});
if(w&&!Ext.isEmpty(E.appLogonAvail)&&E.appLogonAvail!=undefined){var y={};y=jQuery.extend(true,{},getHighChartsInstance("appLocLogonAvail",E.appLogonAvail.chartHeight,E.appLogonAvail.chartWidth),y);y.setData(E.appLogonAvail,"MMM dd, yyyy","");y.drawChart();d.show();}if(w&&!Ext.isEmpty(E.appLogonDura)&&E.appLogonDura!=undefined){var l={};
l=jQuery.extend(true,{},getHighChartsInstance("appLocLogonDura",E.appLogonDura.chartHeight,E.appLogonDura.chartWidth),l);l.setData(E.appLogonDura,"MMM dd, yyyy","");l.drawChart();d.show();}if(w&&!Ext.isEmpty(E.logonDonutHealth)&&E.logonDonutHealth!=undefined){var k={};k=jQuery.extend(true,{},getHighChartsBarInstance("logonHealth",E.chartWidth,E.chartHeight),k);
k.setData(E.logonDonutHealth,"","","donut");k.drawChart();d.show();}}if(s&&h!=undefined&&(h=="fromEnum"||h=="full")){if(h=="full"){appConstants.checkFull="full";}else{appConstants.byName="fromEnum";}var m="";if(w&&!Ext.isEmpty(E.enumDonutHealth)&&E.enumDonutHealth!=undefined){m='<div><table width="100%" ><col width="70%"><col width="30%"> <tr><td ><div style="text-align:center;padding:5px" class="newFont_bold13">'+enumHealthPercLabel+'</div><div id="enumHealth" style="height:200px;width:100%;overflow:auto;padding:0px"></div></td>';
m+='<td><table align="left" cellpadding="0" cellspacing="0" border="0"><tbody>';if(E.enum_Critical!=undefined&&E.enum_Critical!=null){m+='<tr><td><div style="background-color:#CC0000;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Critical - '+E.enum_Critical+"</td></tr>";
}if(E.enum_Major!=undefined&&E.enum_Major!=null){m+='<tr><td><div style="background-color:#FA9D1C;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Major - '+E.enum_Major+"</td></tr>";}if(E.enum_Minor!=undefined&&E.enum_Minor!=null){m+='<tr><td><div style="background-color:#CCC100;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Minor - '+E.enum_Minor+"</td></tr>";
}if(E.enum_Normal!=undefined&&E.enum_Normal!=null){m+='<tr><td><div style="background-color:#457E08;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Normal - '+E.enum_Normal+"</td></tr>";}if(E.enum_Unkown!=undefined&&E.enum_Unkown!=null){m+='<tr><td><div style="background-color:#49909F;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Unkown - '+E.enum_Unkown+"</td></tr>";
}m+="</tbody></table></td></tr></table></div>";}else{m='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+enumHealthPercLabel+'</div><div style="height:250px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available </div></td></tr></table></div>';
}var o="";var G;if(w&&!Ext.isEmpty(E.appEnumAvail)&&E.appEnumAvail!=undefined){G="0 20 0 30";o='<div style="text-align:center;padding:12px" class="newFont_bold13">'+availabilityLabel+'</div><div id="appLocEnumAvail" style="height:250px;width:100%;overflow:auto;padding:0px"></div>';}else{G="0 20 20 30";
o='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+availabilityLabel+'</div><div style="height:250px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available </div></td></tr></table></div>';
}var S="";var x;if(w&&!Ext.isEmpty(E.appEnumDura)&&E.appEnumDura!=undefined){G="0 20 0 30";S='<div style="text-align:center;padding:12px" class="newFont_bold13">'+durationLabel+'</div><div id="appLocEnumDura" style="height:250px;width:100%;overflow:auto;padding:0px"></div>';}else{G="0 20 0 30";S='<div style="text-align:center;padding:12px" class="newFont_bold13">&nbsp;'+durationLabel+'</div><div style="height:250px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available </div></td></tr></table></div>';
}d.add({xtype:"panel",margin:"10 10 10 10",ui:"newGraphPanel",title:enumerationDetailsLabel,bodyPadding:"0 0 0 0",padding:"0 10 10 0",flex:1,layout:{type:"column",align:"stretch"},defaults:{columnWidth:0.5},items:[{xtype:"container",cls:"graphSeperatorLineBottomRight",padding:"0 30 0 20",margin:"0 0 0 10",html:o},{xtype:"container",cls:"graphSeperatorLineBottom",padding:G,html:S},{xtype:"container",cls:"graphSeperatorLineRight",padding:"0 30 0 20",html:m}]});
if(w&&!Ext.isEmpty(E.appEnumAvail)&&E.appEnumAvail!=undefined){var T={};T=jQuery.extend(true,{},getHighChartsInstance("appLocEnumAvail",E.appEnumAvail.chartHeight,E.appEnumAvail.chartWidth),T);T.setData(E.appEnumAvail,"MMM dd, yyyy","");T.drawChart();d.show();}if(w&&!Ext.isEmpty(E.appEnumDura)&&E.appEnumDura!=undefined){var r={};
r=jQuery.extend(true,{},getHighChartsInstance("appLocEnumDura",E.appEnumDura.chartHeight,E.appEnumDura.chartWidth),r);r.setData(E.appEnumDura,"MMM dd, yyyy","");r.drawChart();d.show();}if(w&&!Ext.isEmpty(E.enumDonutHealth)&&E.enumDonutHealth!=undefined){var Q={};Q=jQuery.extend(true,{},getHighChartsBarInstance("enumHealth",E.chartWidth,E.chartHeight),Q);
Q.setData(E.enumDonutHealth,"","","donut");Q.drawChart();d.show();}}if(h!=undefined&&(h=="fromApp"||h=="full")){if(h=="full"){appConstants.checkFull="full";}else{appConstants.byName="fromApp";}K="";if(w&&!Ext.isEmpty(E.total_appLaunchDonutHealth)&&E.total_appLaunchDonutHealth!=undefined){K='<div><table width="100%" ><col width="70%"><col width="30%"> <tr><td ><div style="text-align:center;padding:12px" class="newFont_bold13">'+applnDektopHealthPercLabel+'</div><div id="tot_appLaunchHealth" style="height:200px;width:100%;overflow:auto;padding:0px"></div></td>';
K+='<td><table align="left" cellpadding="0" cellspacing="0" border="0"><tbody>';if(E.tot_app_Critical!=undefined&&E.tot_app_Critical!=null){K+='<tr><td><div style="background-color:#CC0000;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Critical - '+E.tot_app_Critical+"</td></tr>";
}if(E.tot_app_Major!=undefined&&E.tot_app_Major!=null){K+='<tr><td><div style="background-color:#FA9D1C;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Major - '+E.tot_app_Major+"</td></tr>";}if(E.tot_app_Minor!=undefined&&E.tot_app_Minor!=null){K+='<tr><td><div style="background-color:#CCC100;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Minor - '+E.tot_app_Minor+"</td></tr>";
}if(E.tot_app_Normal!=undefined&&E.tot_app_Normal!=null){K+='<tr><td><div style="background-color:#457E08;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Normal - '+E.tot_app_Normal+"</td></tr>";}if(E.tot_app_Unkown!=undefined&&E.tot_app_Unkown!=null){K+='<tr><td><div style="background-color:#49909F;height:8px;width:8px;">&nbsp;</div></td><td style="padding:5px 20px 5px 5px;float:left" class="newFont_normal11_Legend">Unkown - '+E.tot_app_Unkown+"</td></tr>";
}K+="</tbody></table></td></tr></table></div>";}else{K='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+applnDektopHealthPercLabel+'</div><div style="height:250px;width:100%;overflow:auto;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}var R="";if(w&&!Ext.isEmpty(E.totalAppAvail)&&E.totalAppAvail!=undefined){R='<div style="text-align:center;padding:12px" class="newFont_bold13">'+availabilityLabel+'</div><div id="tot_appLaunchAvailTime_id" style="height:200px;width:100%;overflow:hidden;padding:0px"></div>';}else{R='<div style="text-align:center;padding:5px" class="newFont_bold13">&nbsp;'+availabilityLabel+' </div><div style="height:200px;width:100%;overflow:hidden;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}var N="";var n="0 20 20 30";if(w&&!Ext.isEmpty(E.totalAppDura)&&E.totalAppDura!=undefined){N='<div style="text-align:center;padding:12px" class="newFont_bold13">'+durationLabel+'</div><div id="tot_appLaunchDurationTime_id" style="height:200px;width:100%;overflow:hidden;padding:0px"></div>';}else{n="0 20 20 30";
N='<div style="text-align:center;padding:12px" class="newFont_bold13">&nbsp;'+durationLabel+'</div><div style="height:200px;width:100%;overflow:hidden;padding:0px"><table width="100%" height="100%" style="height:100%;"><tr><td align="center" valign="middle"><div class="iconInformation" ></div><div class="commonErrorMsgText">No Measures Available</div></td></tr></table></div>';
}d.add({xtype:"panel",margin:"10 10 10 10",ui:"newGraphPanel",title:applnDesktopDetailsLabel,bodyPadding:"0 0 0 0",padding:"0 10 10 0",flex:1,layout:{type:"column",align:"stretch"},defaults:{columnWidth:0.5,},items:[{xtype:"container",cls:"graphSeperatorLineBottomRight",height:305,items:[{xtype:"container",id:"tot_appLaunchAvailTime_id_GraphPanel",margin:"0 10 0 10",html:R},{xtype:"container",id:"tot_appLaunchAvailTime_id_legendPanel",margin:"0 10 15 0",height:55,style:{"overflow":"hidden"},}]},{xtype:"container",cls:"graphSeperatorLineBottom",height:305,items:[{xtype:"container",id:"tot_appLaunchDurationTime_id_GraphPanel",margin:"0 10 0 10",html:N},{xtype:"container",id:"tot_appLaunchDurationTime_id_legendPanel",margin:"0 0 15 0",height:55,style:{"overflow":"hidden"},}]},{xtype:"container",cls:"graphSeperatorLineRight",padding:"0 30 0 20",html:K}]});
if(w&&!Ext.isEmpty(E.totalAppAvail)&&E.totalAppAvail!=undefined){var F={};F=jQuery.extend(true,{},getHighChartsInstance("tot_appLaunchAvailTime_id",E.totalAppAvail.chartHeight,E.totalAppAvail.chartWidth),F);F.setData(E.totalAppAvail,"MMM dd, yyyy","");F.drawChart();d.show();}if(w&&!Ext.isEmpty(E.totalAppDura)&&E.totalAppDura!=undefined){var D={};
D=jQuery.extend(true,{},getHighChartsInstance("tot_appLaunchDurationTime_id",E.totalAppDura.chartHeight,E.totalAppDura.chartWidth),D);D.setData(E.totalAppDura,"MMM dd, yyyy","");D.drawChart();d.show();}if(w&&!Ext.isEmpty(E.total_appLaunchDonutHealth)&&E.total_appLaunchDonutHealth!=undefined){var I={};
I=jQuery.extend(true,{},getHighChartsBarInstance("tot_appLaunchHealth",280,280),I);I.setData(E.total_appLaunchDonutHealth,"","","donut");I.drawChart();d.show();}}}});this.updateQStringUsage();},});