var checkedArr=new Array();var treeFlag_SBD=requestParams.treeFlag_SBD;var outsideService_SBD=requestParams.outsideService_SBD;var titleText_SBD=requestParams.titleText_SBD;var selectNode_SBD=requestParams.selectNode_SBD;var isEmulTrans_SBD=requestParams.isEmulTrans_SBD;var serviceState_SBD=requestParams.serviceState_SBD;
var serviceName=requestParams.serviceName;var serviceState_SBD=requestParams.serviceState;var isServiceBusiDash=requestParams.isServiceBusiDash;var isServiceBusiViewMetrics=requestParams.isServiceBusiViewMetrics;var hidePanelLog=new Array();var showPanelLog=new Array();var associateUsersWindow;Ext.define("endUserDashboard.controller.Main",{extend:"Ext.app.Controller",views:["Main"],init:function(){this.control({"main textfield[id=searchString]":{specialkey:function(b,a){if(a.getKey()==a.ENTER){this.onSearchVdi();
}}},"main textfield[id=adtnlSearchString]":{specialkey:function(b,a){if(a.getKey()==a.ENTER){this.onSearchVdi();}}},"main combo[id=vdiTypeCombo]":{"change":this.onChangeVdi},"main combo[id=limitCombo]":{"change":this.saveLimits},"main button[action=Save PDF]":{"click":this.saveUEDInPDFFormat},"main button[action=csv]":{"click":this.saveUEDInCSVFormat},"main button[action=keyuser]":{"click":this.associateKeyUsers},"main button[action=filter]":{"click":this.loadFilterOptions},"main commonbackbutton[id=backbtn]":{"click":this.backButtonFunction},"main commonbackbutton[id=backbtn1]":{"click":this.backButtonFunction},'main combo[id="groupCombo"]':{"change":this.changeGroupFunction},"main combo[id=moreOptions]":{"change":this.loadMoreOptions},"main combo[id=updateBtn]":{"change":this.updateMoreOptions},"settingsForm":{"afterrender":function(){this.loadTests();
}},'settingsForm radiogroup[id="AddDelete"]':{"change":this.loadTests},'settingsForm combo[id="group"]':{"select":this.changeGroupCombo},'settingsForm combo[id="test"]':{"change":this.loadMeasureForTest},'settingsForm combo[id="measure"]':{"select":this.loadMeasureDisplay},'settingsForm radiogroup[id="metrics"]':{"change":this.loadTests},'settingsForm button[id="update"]':{"click":this.updateConfiguration},'associateuserssettingsform button[id="updateUserAssociateId"]':{"click":this.updateUserAssociateConfiguration},'egcomponent button[id="expandSelectorComponent"]':{"click":this.expandMe},'egcomponent trigger[id="compSearch"]':{"change":this.filterMultiselect}});
},expandMe:function(c){var b="";var a="";var d=c.getItemId();if(d=="expandSelectorComponent"){b="compCombo";a="compmultipane";}else{if(d=="expandSelectorInfo"){b="er_info";a="infomultipane";}else{if(d=="expandSelectorCompType"){b="er_mutiSelComp";a="compTypeMultiPane";}}}if(Ext.isEmpty(thisApp.erUtils)){thisApp.erUtils=Ext.widget("erutils");
}thisApp.erUtils.expandMultiComboButton(Ext.getCmp(b),Ext.getCmp(a).text,c);},filterMultiselect:function(c){var d=null,b=null;var a=c.getId();if(Ext.isEmpty(thisApp.erUtils)){thisApp.erUtils=Ext.widget("erutils");}if(a=="compSearch"){thisApp.erUtils.filterComboStore(c,Ext.getCmp("compCombo"),thisApp.compRawData);
}else{if(a=="infoSearch"){thisApp.erUtils.filterComboStore(c,Ext.getCmp("er_info"),thisApp.infoRawData);}else{if(a=="compTypeSearch"){thisApp.erUtils.filterComboStore(c,Ext.getCmp("er_mutiSelComp"),thisApp.compTypeRawData);}}}},updateDetails:function(b){if(b!=null&&b!=undefined&&b!=""){var a=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});
a.show();Ext.Ajax.request({url:b,method:"POST",scope:this,timeout:280000,success:function(l,c){var j=l.responseText;var p=Ext.decode(j);var s=Ext.get("vdiListGrid");var m=p["FIlTER"];this.checkFilterSession(m);if(!Ext.isEmpty(p["GRID_DATA"])){}else{if(!Ext.isEmpty(p["REDIRECT"])&&p["REDIRECT"]){window.document.location=p["REDIRECT_URL"];
}}if(!Ext.isEmpty(p["isDataAvail"])){isDataAva=p["isDataAvail"];}var g=Ext.getCmp("adtnlSearchString");if(!Ext.isEmpty(p.addtionalSearchFlag)&&p.addtionalSearchFlag!=undefined&&(p.addtionalSearchFlag==false||p.addtionalSearchFlag=="false")&&(!Ext.isEmpty(g)&&g!=undefined)){g.value="";g.hide();this.onSearchVdi();
}else{if((addtionalSearchFlag)&&(!Ext.isEmpty(g)&&g!=undefined)&&!Ext.isEmpty(p.addtionalSearchFlag)&&p.addtionalSearchFlag!=undefined&&(p.addtionalSearchFlag==true||p.addtionalSearchFlag=="true")){g.show();g.emptyText=p.addSearchEmptyText;g.reset();adtnlSearchEmptyText=p.addSearchEmptyText;}}if(!Ext.isEmpty(p["header_display"])){Ext.getCmp("endUserView").setTitle(p["header_display"]);
Ext.getCmp("endUserView").setIconCls(p["header_display_icon"]);}var e=p["isEnableFilterJson"];if(e!=null&&e!=undefined){var n=p["isEnableFilterJson"].isdefaultFilter;var d=p["isEnableFilterJson"].istmpSubFilter;var o=p["isEnableFilterJson"].istmpnextSubFilter;if(n){Ext.getCmp("searchFilter").show();}else{Ext.getCmp("searchFilter").hide();
}if(d){searchFilter=Ext.getCmp("searchFilter");if(!Ext.isEmpty(searchFilter)&&searchFilter.getValue()!="All"){Ext.getCmp("nextSearch").show();}}else{Ext.getCmp("nextSearch").hide();}if(o){if(!Ext.isEmpty(searchFilter)&&searchFilter.getValue()!="All"){Ext.getCmp("nextSubSearch").show();}}else{Ext.getCmp("nextSubSearch").hide();
}}var h=Ext.getCmp("vdiListGrid");if(h!=null&&h!=undefined&&h.items!=null&&h.items!=undefined){var r=h.items.items;for(var q=r.length-1;q>-1;q--){r[q].destroy();}}var k={xtype:"generalMeasuresGridPanel",ui:"newGridPanel removeTableBg",itemId:"userExperience",margin:0,padding:0,frame:false,border:false,flex:1,url:b,someFun:Ext.emptyFn,listeners:{"afterrender":function(x){var u="";
var y="";var t="";try{u=Ext.getCmp("filterBy").getValue();y=Ext.getCmp("detailCombo").getValue();t=Ext.getCmp("compmultipane").getValue();}catch(w){}var v=u+""+y+""+t;if(userType=="OverviewAppXenApp7"||userType=="OverviewAppVDI"||(isOnlyVMAssigned&&userType=="VDI")){this.loadTabJson(p,x.url,"true","endUserDashboard-"+userType,v);
}else{this.loadTabJson(p,x.url,fromMetricView,"endUserDashboard-"+userType,v);}a.hide();k.someFun();}}};if(!Ext.isEmpty(p)&&p.hasOwnProperty("countJson")&&p.countJson.hasOwnProperty("isHidePaging")){isHidePaging=p.countJson.isHidePaging;}else{isHidePaging=true;}tempSearchPanel=k;Ext.getCmp("vdiListGrid").add(k);
Ext.getCmp("vdiListGrid").doLayout();},failure:function(){}});}},changeGroupFunction:function(){var a=Ext.getCmp("groupCombo");var c=Ext.getCmp("adgroup");if(a!=undefined&&a!=null&&c!=undefined&&c!=null){var b=a.getValue();if(b=="ad_group"){c.setValue("All");if(showKeyUser){c.setVisible(false);}else{c.setVisible(true);
}}else{c.setVisible(false);}}},changeGroupAdFunction:function(){var c=Ext.getCmp("adgroup");if(c!=undefined&&c!=null){var a=c.getValue();if(userUrl.indexOf("&aduserFilter")!=-1){userUrl=userUrl.substring(0,userUrl.indexOf("&aduserFilter"));}if(a!=null&a!=undefined){a=a.replace(/=/g,"|eq|");a=a.replace(/,/g,"|comma|");
}var b=userUrl+"&aduserFilter="+encodeURIComponent(a);this.updateUserInfo(b);}},updateUserInfo:function(b){if(b!=undefined&&b!=null&&b!=""){var a=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});a.show();Ext.Ajax.request({url:b,method:"POST",scope:this,timeout:280000,success:function(g,B){var o=g.responseText;
var G=Ext.decode(o);var u=Ext.get("vdiListGrid");u.fil_json=null;var E=G["FIlTER"];this.checkFilterSession(E);if(!Ext.isEmpty(G["header_display"])){Ext.getCmp("endUserView").setTitle(G["header_display"]);Ext.getCmp("endUserView").setIconCls(G["header_display_icon"]);}if(!Ext.isEmpty(G["GRID_DATA"])){}else{if(!Ext.isEmpty(G["REDIRECT"])&&G["REDIRECT"]){window.document.location=G["REDIRECT_URL"];
}}var j=Ext.getCmp("vdiListGrid");if(j!=null&&j!=undefined&&j.items!=null&&j.items!=undefined){var p=j.items.items;for(var F=p.length-1;F>-1;F--){p[F].destroy();}}var x={xtype:"generalMeasuresGridPanel",ui:"newGridPanel removeTableBg",itemId:"userExperience",margin:0,padding:0,frame:false,border:false,flex:1,url:b,someFun:Ext.emptyFn,listeners:{"afterrender":function(ad){var aa="";
var ae="";var Z="";try{aa=Ext.getCmp("filterBy").getValue();ae=Ext.getCmp("detailCombo").getValue();Z=Ext.getCmp("compmultipane").getValue();}catch(ac){}var ab=aa+""+ae+""+Z;if(userType=="OverviewAppXenApp7"||userType=="OverviewAppVDI"||(isOnlyVMAssigned&&userType=="VDI")){this.loadTabJson(G,ad.url,"true","endUserDashboard-"+userType,ab);
}else{this.loadTabJson(G,ad.url,fromMetricView,"endUserDashboard-"+userType,ab);}a.hide();x.someFun();}}};if(!Ext.isEmpty(G)&&G.hasOwnProperty("countJson")&&G.countJson.hasOwnProperty("isHidePaging")){isHidePaging=G.countJson.isHidePaging;}else{isHidePaging=true;}tempSearchPanel=x;Ext.getCmp("vdiListGrid").add(x);
Ext.getCmp("vdiListGrid").doLayout();if(!Ext.isEmpty(G["isDataAvail"])){isDataAva=G["isDataAvail"];}if(Ext.getCmp("formPanel").isVisible()&&Ext.getCmp("zoneCombo").isVisible()){Ext.getCmp("zoneCombo").setVisible(false);Ext.getCmp("filtersConId").setVisible(false);var W=Ext.getCmp("detailCombo");var s=Ext.getCmp("compCombo");
var H=G["isEnableFilterJson"];if(H!=null&&H!=undefined){var c=G["isEnableFilterJson"].isdefaultFilter;var w=G["isEnableFilterJson"].istmpSubFilter;var r=G["isEnableFilterJson"].istmpnextSubFilter;}var S=Ext.getCmp("filterBy");var U=Ext.getCmp("searchFilter");var X=Ext.getCmp("nextSearch");var n=Ext.getCmp("nextSubSearch");
var D=Ext.getCmp("priorityFilter");var P=Ext.getCmp("gatewayFilter");var z=Ext.getCmp("groupCombo");var A=Ext.getCmp("adgroup");if(showKeyUser){D.setVisible(true);if(isGateway){P.setVisible(true);}Ext.getCmp("zoneCombo").setVisible(false);S.setVisible(false);U.setVisible(false);X.setVisible(false);z.setVisible(false);
A.setVisible(false);}else{Ext.getCmp("zoneCombo").setVisible(false);}var V="";var L=W.getValue();if(L!=null&&L=="componentType"){var K=s.getValue();var d="";var e="";if(K!=null&&K!=undefined){if(K.length==1){var I=K[0];try{var k=I.split(":");if(k!=null&&k!=undefined&&k.length>=3){var v=k[0];var Y=k[1];
var h=k[2];if(h!=null&&h!=undefined&&h!="NULL"&&h!="null"){I=Y+":"+h;}else{I=Y;}}}catch(q){if(I!=null&&I!=undefined&&I.indexOf(":")>-1){I=I.substring(I.indexOf(":")+1);}}d=I;}else{var I=K[0];try{var k=I.split(":");if(k!=null&&k!=undefined&&k.length>=3){var v=k[0];var Y=k[1];var h=k[2];if(h!=null&&h!=undefined&&h!="NULL"&&h!="null"){I=Y+":"+h;
}else{I=Y;}}}catch(q){if(I!=null&&I!=undefined&&I.indexOf(":")>-1){I=I.substring(I.indexOf(":")+1);}}for(var R=0;R<K.length;R++){var m=K[R];var J=m.split(":");if(J!=null&&J!=undefined&&J.length>=3){var Q=J[0];var t=J[1];var C=J[2];if(C!=null&&C!=undefined&&C!="NULL"&&C!="null"){m=t+":"+C;}else{m=t;}}else{if(m!=null&&m!=undefined&&m.indexOf(":")>-1){m=m.substring(m.indexOf(":")+1);
}}e+=", "+m;}d=e.substring(1);}}if(showComFilter){if(d!=null&&d!=undefined&&d!=""){if(d.indexOf(",")>-1){V+="Component(s) - "+d+"&";}else{if(W.getValue()=="componentType"){V+="Component - "+d+"&";}else{V+=W.getRawValue()+" - "+d+"&";}}}}else{if(S.isVisible()&&S.getValue()!=undefined){if(W.getValue().toLowerCase()=="componenttype"){if(S.getValue()=="All"){V+="Component Type - "+S.getRawValue()+"&";
}else{if(!Ext.isEmpty(d)&&d!="All"){V+="Component(s) - "+S.getRawValue()+" - "+d+"&";}else{V+="Component Type - "+S.getRawValue()+" &";}}}else{V+=W.getRawValue()+" - "+S.getRawValue()+"&";}}}}else{if(S.isVisible()&&S.getValue()!=undefined){if(W.getValue()=="componentType"){if(S.getValue()=="All"){V+=W.getRawValue()+" - "+S.getRawValue()+"&";
}else{var K=s.getValue();var d="";var e="";if(K!=null&&K!=undefined){if(K.length==1){var I=K[0];if(I!=null&&I!=undefined&&I.indexOf(":")>-1){I=I.substring(I.indexOf(":")+1);}d=I;}else{var I=K[0];if(I!=null&&I!=undefined&&I.indexOf(":")>-1){I=I.substring(I.indexOf(":")+1);}for(var R=0;R<K.length;R++){var m=K[R];
if(m!=null&&m!=undefined&&m.indexOf(":")>-1){m=m.substring(m.indexOf(":")+1);}e+=", "+m;}d=e.substring(1);}}V+=W.getRawValue()+" - "+S.getRawValue()+" - "+d+"&";}}else{V+=W.getRawValue()+" - "+S.getRawValue()+"&";}}}if(c&&!isDetailsFromADOnly&&U.isVisible()&&U.getFieldLabel()!=undefined&&!Ext.isEmpty(U.getValue())&&U.getValue()!="null"){if(!Ext.isEmpty(U.getRawValue())&&U.getRawValue()!="-"){V+=U.getFieldLabel()+" - "+U.getRawValue()+"&";
}}else{if(c&&U.isVisible()&&!Ext.isEmpty(U.getValue())&&U.getValue()!="null"){V+="Filter By - "+U.getRawValue()+"&";}}if((c&&w)&&!Ext.isEmpty(U)&&U.getValue()!="null"&&U.getValue()!="All"&&U.getValue()!="-"&&U.isVisible()){if(!isDetailsFromADOnly&&X.getFieldLabel()!=undefined&&X.getRawValue()!=undefined){if(X.getValue()==""){X.setValue("All");
}var O=X.getFieldLabel();if(O!=null&&O.indexOf(">")>0){O=O.substring(O.indexOf(">")+1,O.indexOf("</"));}if(X.isVisible()){V+=O+" - "+X.getValue()+"&";}}else{if(X.isVisible()&&X.getRawValue()!=undefined){if(X.getValue()==""){X.setValue("All");}V+=U.getRawValue()+" - "+X.getValue()+"&";}}}if((w&&r)&&!Ext.isEmpty(X)&&U.getValue()!="null"&&X.getValue()!="All"){if(!isDetailsFromADOnly&&n.isVisible()&&n.getFieldLabel()!=undefined&&n.getRawValue()!=undefined){if(n.getValue()==""){n.setValue("All");
}var O=n.getFieldLabel();if(O!=null&&O.indexOf(">")>0){O=O.substring(O.indexOf(">")+1,O.indexOf("</"));}V+=O+" - "+n.getValue()+"&";}else{if(n.isVisible()&&n.getRawValue()!=undefined){if(n.getValue()==""){n.setValue("All");}V+=X.getRawValue()+" - "+n.getValue()+"&";}}}if(D.isVisible()&&D.getRawValue()!=undefined){if(D.getValue()==""){D.setValue("All");
}V+=priority+" - "+D.getRawValue()+"&";}if(isGateway&&P.isVisible()&&P.getRawValue()!=undefined){if(P.getValue()==""){P.setValue("All");}V+=gateway+" - "+P.getRawValue()+"&";}if(z.isVisible()&&z.getValue()!=undefined&&(!showKeyUser)){V+="View By - "+z.getRawValue()+"&";}if(A.isVisible()&&A.getValue()!=undefined&&(!showKeyUser)){V+="AD Group - "+A.getRawValue()+"&";
}var N=Ext.getCmp("htmlVal");var y=V.split("&");var l=[];for(var T=0;T<y.length;T++){if(!Ext.isEmpty(y[T])){l.push({xtype:"label",html:y[T]});}}N.removeAll(true);N.add(l);Ext.getCmp("zoneLabel").setVisible(true);if(c&&U.isVisible()){Ext.getCmp("searchFilter").show();}else{Ext.getCmp("searchFilter").hide();
}if(w){if(!Ext.isEmpty(U)&&U.getValue()!="All"&&U.isVisible()){Ext.getCmp("nextSearch").show();}}else{Ext.getCmp("nextSearch").hide();}if(r){if(!Ext.isEmpty(U)&&U.getValue()!="All"&&U.isVisible()){Ext.getCmp("nextSubSearch").show();}}else{Ext.getCmp("nextSubSearch").hide();}var M=Ext.getCmp("formPanel");
}a.hide();},failure:function(){}});}},saveUEDInCSVFormat:function(){if(isDataAva){var a=this.getFilterParamForPDFandCSV();var n=Ext.getCmp("searchString")!=null?Ext.getCmp("searchString").value:"";var m=Ext.getCmp("adtnlSearchString")!=null?Ext.getCmp("adtnlSearchString").value:"";var l="/final/monitor/endUserDashboardDataPrint.jsp?";
l+="access=allusers&isCSV=true&userType="+userType+a;if(!Ext.isEmpty(n)&&n!=null&&n!="null"&&n!=undefined){try{l=l+"&searchString="+encodeURIComponent(parent.filterEncode(n));}catch(j){l=l+"&searchString="+encodeURIComponent(parent.parent.filterEncode(n));}}if(defaultVdiType!=null&&defaultVdiType!="null"&&defaultVdiType!=""&&defaultVdiType!="undefined"){l=l+"&vdiType="+defaultVdiType;
}if(currOrderByColumn!=null&&currOrderByColumn!=undefined&&currOrderByColumn!=""){l=l+"&orderByColumn="+currOrderByColumn;}if(currOrderBy!=null&&currOrderBy!=undefined&&currOrderBy!=""){l=l+"&orderBy="+currOrderBy;}if(currOrderByColumn!=null&&currOrderByColumn!=undefined&&currOrderByColumn!=""){l=l+"&currOrderByColumn="+currOrderByColumn;
}if(currOrderBy!=null&&currOrderBy!=undefined&&currOrderBy!=""){l=l+"&currOrderBy="+currOrderBy;}if(currColumnType!=null&&currColumnType!=undefined&&currColumnType!=""){l=l+"&columnType="+currColumnType;}if(currColumndispName!=null&&currColumndispName!="null"&&currColumndispName!=""&&currColumndispName!="undefined"){l=l+"&columnDispName="+currColumndispName;
}if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){l=l+"&fromctx="+fromctx;}var d=Ext.getCmp("groupCombo");var b=Ext.getCmp("adgroup");if(d!=undefined&&d!=null&&b!=undefined&&b!=null){var h=d.getValue();if(h=="ad_group"){var g=b.getValue();if(g!=null&g!=undefined){g=g.replace(/=/g,"|eq|");
g=g.replace(/,/g,"|comma|");}l=l+"&aduserFilter="+encodeURIComponent(g);}}l+=this.encodeForFilterParam();l=this.removeDuplicateParam(l);if(endUserOverviewFlag){l=l+"&endUserDashOverview="+endUserOverviewFlag;}if(!Ext.isEmpty(isfromuedsort)&&isfromuedsort!=null&&isfromuedsort!=undefined&&(isfromuedsort=="true"||isfromuedsort==true)){l=l+"&isfromuedsort="+isfromuedsort;
}var k=Ext.getCmp("gatewayFilter");if(isGateway&&!Ext.isEmpty(k)&&k!=undefined&&k!=null){l=l+"&gatewayFilter="+k.getRawValue();}if(!Ext.isEmpty(m)&&m!=null&&m!="null"&&m!=""&&m!="undefined"){l=l+"&adtnlSearchStr="+m;}if(showKeyUser){l=l+"&showKeyUser=true";if(updateUserAssociateFlag){l=l+"&updateUserAssociate=true";
}}l=l+"&user="+user;if(isFromGeo){l=l+"&fromGeo=true&iniName="+iniName+"&user_name="+user_name+"&isUserBased="+isUserBased+"&dashboard_name="+dashboard_name+"&view_name="+view_name+"&dashboard_mapping="+dashboard_mapping+"&time_line="+time_line+"&ginfo="+geoInfo+"&fromServiceHomePage="+fromServiceHomePage+"&fromZonePage="+fromZonePage+"&selectedTest="+encodeURIComponent(selectedTest)+"&selectedMeasure="+selectedMeasure+"&usercountval="+usercountval;
if(!Ext.isEmpty(backObject.overviewType)&&backObject.overviewType!=undefined&&backObject.overviewType!=null&&backObject.overviewType!=""){l=l+"&overviewType="+backObject.overviewType;}}var c=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});c.show();Ext.Ajax.request({url:l,method:"POST",timeout:280000,scope:this,success:function(e){window.location.href="../servlet/egurkha.reporter.SaveInCSVFormat?fromEndUser=true","CSVFormat","width=1012,height=603,left=0,top=105,scrollbars=1,scrollbars=yes,resizable=yes";
c.hide();},failure:function(){c.hide();alert("failed to download csv");}});}else{if(!Ext.isEmpty(noDataMsg)){Ext.MessageBox.show({title:"Alert",msg:"No Records Found",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING,});}}},saveUEDInPDFFormat:function(g,n,a){if(isDataAva){var b=this.getFilterParamForPDFandCSV();
var d="access=allusers&userType="+userType+b;var s=Ext.getCmp("searchString")!=null?Ext.getCmp("searchString").value:"";var q=Ext.getCmp("adtnlSearchString")!=null?Ext.getCmp("adtnlSearchString").value:"";if(!Ext.isEmpty(s)&&s!=null&&s!="null"&&s!=undefined){try{d=d+"&searchString="+encodeURIComponent(parent.filterEncode(s));
}catch(n){d=d+"&searchString="+encodeURIComponent(parent.parent.filterEncode(s));}}if(defaultVdiType!=null&&defaultVdiType!="null"&&defaultVdiType!=""&&defaultVdiType!="undefined"){d=d+"&vdiType="+defaultVdiType;}if(currOrderByColumn!=null&&currOrderByColumn!=undefined&&currOrderByColumn!=""){d=d+"&orderByColumn="+currOrderByColumn;
}if(currOrderBy!=null&&currOrderBy!=undefined&&currOrderBy!=""){d=d+"&orderBy="+currOrderBy;}if(currOrderByColumn!=null&&currOrderByColumn!=undefined&&currOrderByColumn!=""){d=d+"&currOrderByColumn="+currOrderByColumn;}if(currOrderBy!=null&&currOrderBy!=undefined&&currOrderBy!=""){d=d+"&currOrderBy="+currOrderBy;
}if(currColumnType!=null&&currColumnType!=undefined&&currColumnType!=""){d=d+"&columnType="+currColumnType;}if(currColumndispName!=null&&currColumndispName!="null"&&currColumndispName!=""&&currColumndispName!="undefined"){d=d+"&columnDispName="+currColumndispName;}if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){url=url+"&fromctx="+fromctx;
}var h=Ext.getCmp("groupCombo");var c=Ext.getCmp("adgroup");if(h!=undefined&&h!=null&&c!=undefined&&c!=null){var m=h.getValue();if(m=="ad_group"){var j=c.getValue();if(j!=null&j!=undefined){j=j.replace(/=/g,"|eq|");j=j.replace(/,/g,"|comma|");}d=d+"&aduserFilter="+encodeURIComponent(j);}}if(showKeyUser){d=d+"&showKeyUser=true";
if(updateUserAssociateFlag){d=d+"&updateUserAssociate=true";}}d+=this.encodeForFilterParam();d=this.removeDuplicateParam(d);if(endUserOverviewFlag){d=d+"&endUserDashOverview="+endUserOverviewFlag;}if(!Ext.isEmpty(isfromuedsort)&&isfromuedsort!=null&&isfromuedsort!=undefined&&(isfromuedsort=="true"||isfromuedsort==true)){d=d+"&isfromuedsort="+isfromuedsort;
}if(!Ext.isEmpty(q)&&q!=null&&q!="null"&&q!=""&&q!="undefined"){d=d+"&adtnlSearchStr="+q;}if(isFromGeo){d=d+"&fromGeo=true&iniName="+iniName+"&user_name="+user_name+"&isUserBased="+isUserBased+"&dashboard_name="+dashboard_name+"&view_name="+view_name+"&dashboard_mapping="+dashboard_mapping+"&time_line="+time_line+"&ginfo="+geoInfo+"&fromServiceHomePage="+fromServiceHomePage+"&fromZonePage="+fromZonePage+"&selectedTest="+encodeURIComponent(selectedTest)+"&selectedMeasure="+selectedMeasure+"&usercountval="+usercountval;
if(!Ext.isEmpty(backObject.overviewType)&&backObject.overviewType!=undefined&&backObject.overviewType!=null&&backObject.overviewType!=""){d=d+"&overviewType="+backObject.overviewType;}}var p=Ext.getCmp("gatewayFilter");if(isGateway&&!Ext.isEmpty(p)&&p!=undefined&&p!=null){d=d+"&gatewayFilter="+p.getRawValue();
}d=d+"&user="+user;var r="";var o="/final/servlet/com.eg.EgPdfDownloadC?from=usrExpDash";if(d!=null){o=o+"&"+d;}var l=Ext.MessageBox.progress({title:"Downloading",value:5,width:350,increment:15,closable:false,progressText:"Connecting..",wait:true,waitConfig:{interval:200},msg:"<b>Downloading Please wait...</b>",scope:this,handler:function(){this.updateText("Done!");
}});var k=Ext.query("#pdfIframe");if(Ext.isEmpty(k)){Ext.DomHelper.append(document.body,{tag:"iframe",frameBorder:0,width:0,height:0,css:"display:none;visibility:hidden;height:1px;",src:o,id:"pdfIframe"});}else{Ext.select("#pdfIframe").set({src:o});}Ext.Ajax.request({url:"/final/monitor/EgSaveStatus.jsp?downloadFile=true",scope:this,method:"POST",timeout:280000,success:function(t){var v=t.responseText;
var u=Ext.decode(v);if(!Ext.isEmpty(u)){var x=u.downloadStatus;try{if(x=="DONE"||x=="done"||x=="Done"){l.hide();}}catch(w){l.hide();}}},failure:function(e){l.hide();}});}else{if(!Ext.isEmpty(noDataMsg)){Ext.MessageBox.show({title:"Alert",msg:"No Records Found",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING,});
}}},associateKeyUsers:function(b,d,c){var a="/final/monitor/endUserDashboardConfigJson.jsp?userType="+userType;if(isFromMenu){a=a+"&fromMenu=true";}if(showKeyUser){a=a+"&showKeyUser=true&loadAssociateUsers=true";if(updateUserAssociateFlag){a=a+"&updateUserAssociate=true";}}Ext.Ajax.request({url:a,method:"POST",scope:this,timeout:280000,success:function(g,k){var l=g.responseText;
var j=Ext.decode(l);if(!Ext.isEmpty(j)){var m=j.allUserList;var h=j.selectedUserList;if(associateUsersWindow!=undefined&&associateUsersWindow!=null){associateUsersWindow.setVisible(true);var e=Ext.getCmp("associateshowHidePanels");var n=e.up().down("itemselectormashreq[id=associateshowHidePanels]");n.getStore().loadData([],false);
if(m!=undefined&&m!=null&&m!=""){n.getStore().loadRawData(m);if(h!="undefined"&&h!=null&&h!=""){e.setValue(h);}}}else{if(!Ext.getCmp("keyuserswindow")){associateUsersWindow=new Ext.Window({title:"High Profile Users",height:250,width:700,id:"keyuserswindow",closeAction:"close",floatable:true,x:(Ext.getBody().getViewSize().width/2)-300,y:(Ext.getBody().getViewSize().height/2)-175,focusOnToFront:true,draggable:false,items:[{xtype:"associateuserssettingsform",listeners:{"afterrender":function(p){var q=p.up().down("itemselectormashreq[id=associateshowHidePanels]");
q.getStore().loadData([],false);var o=Ext.getCmp("associateshowHidePanels");if(m!=undefined&&m!=null&&m!=""){q.getStore().loadRawData(m);if(h!="undefined"&&h!=null&&h!=""){o.setValue(h);}}}}}]});associateUsersWindow.show();}}}},failure:function(){}});},sortByMeasureValues:function(n,q,o){var g="/final/monitor/endUserDashboardData.jsp?user="+userName;
var m=Ext.getCmp("searchString")!=null?Ext.getCmp("searchString").value:"";var d=Ext.getCmp("adtnlSearchString")!=null?Ext.getCmp("adtnlSearchString").value:"";var u=Ext.getCmp("limitCombo")!=null?Ext.getCmp("limitCombo").value:"";var h=Ext.getCmp("vdiTypeCombo")!=null?Ext.getCmp("vdiTypeCombo").value:"";
if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){if(defaultDispLimit!=null&&defaultDispLimit!=undefined&&defaultDispLimit!=""){u=defaultDispLimit;}if(defaultVdiType!=null&&defaultVdiType!=undefined&&defaultVdiType!=""){h=defaultVdiType;}}var j=userType;try{var w=Ext.getCmp("vdiTypeCombo");
if(!Ext.isEmpty(w)&&!Ext.isEmpty(w.getValue())&&w.getValue()!=""){var p=w.getValue();var k=w.findRecord(w.valueField||w.displayField,p);var l=w.store.indexOf(k);j=w.getStore().getAt(l).get("usertype");if(Ext.isEmpty(j)){j=userType;}}}catch(t){}g=g+"&orderByColumn="+n+"&orderBy="+q;g=g+"&userType="+j;
if(m!=null&&m!="null"&&m!=""&&m!="undefined"){g=g+"&searchString="+m;}if(u!=null&&u!="null"&&u!=""&&u!="undefined"){g=g+"&priority="+u;}if(h!=null&&h!="null"&&h!=""&&h!="undefined"&&h!="VDI"&&h!="ESX"&&h!="Terminal"&&h!="Horizon"){g=g+"&vdiType="+h;}if(o!=null&&o!="null"&&o!=""&&o!="undefined"){g=g+"&columnDispName="+o;
currColumndispName=o;}if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){g=g+"&fromctx="+fromctx;}if(isFromXenVdi!=null&&isFromXenVdi!=undefined&&isFromXenVdi!=""&&isFromXenVdi!="undefined"&&isFromXenVdi!="null"){g=g+"&isFromXenVdi="+isFromXenVdi;}if(isFromMenu){g=g+"&fromMenu=true";
}if(showKeyUser){g=g+"&showKeyUser=true";if(updateUserAssociateFlag){g=g+"&updateUserAssociate=true";}}if(isFromGeo){g=g+"&fromGeo=true&iniName="+iniName+"&user_name="+user_name+"&isUserBased="+isUserBased+"&dashboard_name="+dashboard_name+"&view_name="+view_name+"&dashboard_mapping="+dashboard_mapping+"&time_line="+time_line+"&ginfo="+geoInfo+"&fromServiceHomePage="+fromServiceHomePage+"&fromZonePage="+fromZonePage+"&selectedTest="+encodeURIComponent(selectedTest)+"&selectedMeasure="+selectedMeasure;
}if(filterParam!=null&&filterParam!="null"&&filterParam!=""&&filterParam!=undefined){g=g+"&"+filterParam;}if((!Ext.isEmpty(isfromCitrix)&&isfromCitrix!=null&&isfromCitrix!=undefined&&(isfromCitrix=="true"||isfromCitrix==true))||(!Ext.isEmpty(isfromRum)&&isfromRum!=null&&isfromRum!=undefined&&(isfromRum=="true"||isfromRum==true))){if(isfromRum!=null&&isfromRum!="null"&&isfromRum!=""&&isfromRum!="undefined"){if((serviceComponent!=null&&serviceComponent!="null"&&serviceComponent!=""&&serviceComponent!="undefined"&&serviceComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){g=g+"&iniName=eg_rumdashboard&isfromRum=true&userBased=true&fromMenu=true&showConfig=true&dashboard_name=RUM_Dashboard&appliesTo="+appliesTo+"&isBackFromRUM=false&filter=Service&filterBy="+subFilterGl+"&view_name="+view_name+"&subFilter="+subFilterGl;
}else{g=g+"&iniName=eg_rumdashboard&isfromCitrix=true&isfromRum=true&userBased=true&fromMenu=true&showConfig=true&dashboard_name=RUM_Dashboard&appliesTo="+appliesTo+"&isBackFromRUM=false&filter=Service&filterBy="+subFilterGl+"&view_name="+view_name+"&subFilter="+subFilterGl;}}else{if(g!=""&&g!=null){g=g+"&fromMetricView=true&isfromCitrix="+isfromCitrix+"&iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&fromMenu=true&showConfig=true&fromUED=true&dashboard_name="+dashboard_name+"&dashboard_mapping="+dashboard_mapping+"&view_name="+view_name+"&selectedTest="+encodeURIComponent(selectedTest)+"&selectedMeasure="+selectedMeasure+"&fromSerComboChange="+fromSerComboChange+"&fromServiceHomePage="+fromServiceHomePage;
}}if((serviceComponent!=null&&serviceComponent!="null"&&serviceComponent!=""&&serviceComponent!="undefined"&&serviceComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){g=g+"&selectedRum="+selectedRum+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup+"&isUserBased="+isUserBased+"&fromZonePage="+fromZonePage+"&comptype="+backObject.comptype+"&fromHostPanel=true";
}}if((segmentComponent!=null&&segmentComponent!="null"&&segmentComponent!=""&&segmentComponent!="undefined"&&segmentComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){g=g+"&fromHostPanel=true&segmentComponent=true&fromHomepage="+backObject.fromHomepage;
}var b=Ext.getCmp("groupCombo");var r=Ext.getCmp("adgroup");if(b!=undefined&&b!=null&&r!=undefined&&r!=null){var s=b.getValue();if(s=="ad_group"){var c=r.getValue();if(c!=null&c!=undefined){c=c.replace(/=/g,"|eq|");c=c.replace(/,/g,"|comma|");}g=g+"&aduserFilter="+encodeURIComponent(c);}}if(fromMetricView!=null&&fromMetricView!="null"&&fromMetricView!=""&&fromMetricView!="undefined"){g=g+"&fromMetricView="+fromMetricView;
}if(!Ext.isEmpty(d)&&d!=null&&d!="null"&&d!=""&&d!="undefined"){g=g+"&adtnlSearchStr="+d;}var x=this.id;if(!Ext.isEmpty(x)){var a=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});a.show();}userUrl=g;Ext.Ajax.request({url:g,method:"POST",scope:this,timeout:280000,success:function(E,e){var A=E.responseText;
var I=Ext.decode(A);var z=[],J=0,v=0;if(!Ext.isEmpty(I)&&!Ext.isEmpty(I.measures)&&I.measures!="undefiend"){if(I.measures.length>0){for(var F=0;F<I.columns.length;F++){z=[];v=0;for(var D=0;D<I.measures.length;D++){if((I.measures[D][""+F+"MeasureValueLenWidth"])>0&&I.measures[D][""+F+"MeasureValueLenWidth"]!="-"&&I.measures[D][""+F+"MeasureValueLenWidth"]!="undefined"){z[J]=I.measures[D][""+F+"MeasureValue"];
J++;}}if(z.length>0){for(var H=0;H<z.length;H++){if(z[H].indexOf(".")!=-1&&z[H]!=null){if(v<(z[H].substr(0,z[H].indexOf("."))).length){v=(z[H].substr(0,z[H].indexOf("."))).length;}}else{if(v<z[H].length){v=z[H].length;}}}}for(var C=0;C<I.measures.length;C++){if((I.measures[C][""+F+"MeasureValueLenWidth"])>0&&I.measures[C][""+F+"MeasureValueLenWidth"]!="-"&&I.measures[C][""+F+"MeasureValueLenWidth"]!="undefined"){I.measures[C][""+F+"MeasureValueLenWidth"]=v*7;
}}}}}var G=I["FIlTER"];this.checkFilterSession(G);if(!Ext.isEmpty(I["header_display"])){Ext.getCmp("endUserView").setTitle(I["header_display"]);Ext.getCmp("endUserView").setIconCls(I["header_display_icon"]);}var y=Ext.getCmp("vdiListGrid");if(y!=null&&y!=undefined&&y.items!=null&&y.items!=undefined){var L=y.items.items;
for(var K=L.length-1;K>-1;K--){L[K].destroy();}}var B={xtype:"generalMeasuresGridPanel",ui:"newGridPanel removeTableBg",itemId:"userExperience",margin:0,padding:0,frame:false,border:false,flex:1,url:g,someFun:Ext.emptyFn,listeners:{"afterrender":function(Q){var N="";var R="";var M="";try{N=Ext.getCmp("filterBy").getValue();
R=Ext.getCmp("detailCombo").getValue();M=Ext.getCmp("compmultipane").getValue();}catch(P){}var O=N+""+R+""+M;if(userType=="OverviewAppXenApp7"||userType=="OverviewAppVDI"||(isOnlyVMAssigned&&userType=="VDI")){this.loadTabJson(I,Q.url,"true","endUserDashboard-"+userType,O);}else{this.loadTabJson(I,Q.url,fromMetricView,"endUserDashboard-"+userType,O);
}a.hide();B.someFun();}}};if(!Ext.isEmpty(I)&&I.hasOwnProperty("countJson")&&I.countJson.hasOwnProperty("isHidePaging")){isHidePaging=I.countJson.isHidePaging;}else{isHidePaging=true;}tempSearchPanel=B;Ext.getCmp("vdiListGrid").add(B);Ext.getCmp("vdiListGrid").doLayout();},failure:function(){if(!Ext.isEmpty(a)){a.hide();
}}});},sortByDDMeasureValues:function(o,r,p,n){var g="/final/monitor/endUserDashboardData.jsp?user="+userName;var m=Ext.getCmp("searchString")!=null?Ext.getCmp("searchString").value:"";var d=Ext.getCmp("adtnlSearchString")!=null?Ext.getCmp("adtnlSearchString").value:"";var w=Ext.getCmp("limitCombo")!=null?Ext.getCmp("limitCombo").value:"";
var h=Ext.getCmp("vdiTypeCombo")!=null?Ext.getCmp("vdiTypeCombo").value:"";if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){if(defaultDispLimit!=null&&defaultDispLimit!=undefined&&defaultDispLimit!=""){w=defaultDispLimit;}if(defaultVdiType!=null&&defaultVdiType!=undefined&&defaultVdiType!=""){h=defaultVdiType;
}}var j=userType;try{var x=Ext.getCmp("vdiTypeCombo");if(!Ext.isEmpty(x)&&!Ext.isEmpty(x.getValue())&&x.getValue()!=""){var q=x.getValue();var k=x.findRecord(x.valueField||x.displayField,q);var l=x.store.indexOf(k);j=x.getStore().getAt(l).get("usertype");if(Ext.isEmpty(j)){j=userType;}}}catch(u){}g=g+"&orderByColumn="+o+"&orderBy="+r;
g=g+"&userType="+j;if(m!=null&&m!="null"&&m!=""&&m!="undefined"){g=g+"&searchString="+m;}if(w!=null&&w!="null"&&w!=""&&w!="undefined"){g=g+"&priority="+w;}if(h!=null&&h!="null"&&h!=""&&h!="undefined"&&h!="VDI"&&h!="ESX"&&h!="Terminal"&&h!="Horizon"){g=g+"&vdiType="+h;}if(p!=null&&p!="null"&&p!=""&&p!="undefined"){g=g+"&columnDispName="+p;
currColumndispName=p;}if(n!=null&&n!="null"&&n!=""&&n!="undefined"){g=g+"&columnType="+n;currColumnType=n;}if(isFromMenu){g=g+"&fromMenu=true";}if(isFromXenVdi!=null&&isFromXenVdi!=undefined&&isFromXenVdi!=""&&isFromXenVdi!="undefined"&&isFromXenVdi!="null"){g=g+"&isFromXenVdi="+isFromXenVdi;}if(showKeyUser){g=g+"&showKeyUser=true";
if(updateUserAssociateFlag){g=g+"&updateUserAssociate=true";}}if(isFromGeo){g=g+"&fromGeo=true&iniName="+iniName+"&user_name="+user_name+"&isUserBased="+isUserBased+"&dashboard_name="+dashboard_name+"&view_name="+view_name+"&dashboard_mapping="+dashboard_mapping+"&time_line="+time_line+"&ginfo="+geoInfo+"&fromServiceHomePage="+fromServiceHomePage+"&fromZonePage="+fromZonePage+"&selectedTest="+encodeURIComponent(selectedTest)+"&selectedMeasure="+selectedMeasure;
}if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){g=g+"&fromctx="+fromctx;}if((!Ext.isEmpty(isfromCitrix)&&isfromCitrix!=null&&isfromCitrix!=undefined&&(isfromCitrix=="true"||isfromCitrix==true))||(!Ext.isEmpty(isfromRum)&&isfromRum!=null&&isfromRum!=undefined&&(isfromRum=="true"||isfromRum==true))){if(isfromRum!=null&&isfromRum!="null"&&isfromRum!=""&&isfromRum!="undefined"){if((serviceComponent!=null&&serviceComponent!="null"&&serviceComponent!=""&&serviceComponent!="undefined"&&serviceComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){g=g+"&iniName=eg_rumdashboard&isfromRum=true&userBased=true&fromMenu=true&showConfig=true&dashboard_name=RUM_Dashboard&appliesTo="+appliesTo+"&isBackFromRUM=false&filter=Service&filterBy="+subFilterGl+"&view_name="+view_name+"&subFilter="+subFilterGl;
}else{g=g+"&iniName=eg_rumdashboard&isfromCitrix=true&isfromRum=true&userBased=true&fromMenu=true&showConfig=true&dashboard_name=RUM_Dashboard&appliesTo="+appliesTo+"&isBackFromRUM=false&filter=Service&filterBy="+subFilterGl+"&view_name="+view_name+"&subFilter="+subFilterGl;}}else{if(g!=""&&g!=null){g=g+"&fromMetricView=true&isfromCitrix="+isfromCitrix+"&iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&fromMenu=true&showConfig=true&fromUED=true&dashboard_name="+dashboard_name+"&dashboard_mapping="+dashboard_mapping+"&view_name="+view_name+"&selectedTest="+encodeURIComponent(selectedTest)+"&selectedMeasure="+selectedMeasure+"&fromSerComboChange="+fromSerComboChange+"&fromServiceHomePage="+fromServiceHomePage;
}}if((serviceComponent!=null&&serviceComponent!="null"&&serviceComponent!=""&&serviceComponent!="undefined"&&serviceComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){g=g+"&selectedRum="+selectedRum+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup+"&isUserBased="+isUserBased+"&fromZonePage="+fromZonePage+"&comptype="+backObject.comptype+"&fromHostPanel=true";
}}if((segmentComponent!=null&&segmentComponent!="null"&&segmentComponent!=""&&segmentComponent!="undefined"&&segmentComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){g=g+"&fromHostPanel=true&segmentComponent=true&fromHomepage="+backObject.fromHomepage;
}var b=Ext.getCmp("groupCombo");var s=Ext.getCmp("adgroup");if(b!=undefined&&b!=null&&s!=undefined&&s!=null){var t=b.getValue();if(t=="ad_group"){var c=s.getValue();if(c!=null&c!=undefined){c=c.replace(/=/g,"|eq|");c=c.replace(/,/g,"|comma|");}g=g+"&aduserFilter="+encodeURIComponent(c);}}if(filterParam!=null&&filterParam!="null"&&filterParam!=""&&filterParam!=undefined){g=g+"&"+filterParam;
}if(endUserOverviewFlag){g=g+"&endUserDashOverview="+endUserOverviewFlag;}if(!Ext.isEmpty(isfromuedsort)&&isfromuedsort!=null&&isfromuedsort!=undefined&&(isfromuedsort=="true"||isfromuedsort==true)){g=g+"&isfromuedsort="+isfromuedsort;}if(fromMetricView!=null&&fromMetricView!="null"&&fromMetricView!=""&&fromMetricView!="undefined"){g=g+"&fromMetricView="+fromMetricView;
}if(!Ext.isEmpty(d)&&d!=null&&d!="null"&&d!=""&&d!="undefined"){g=g+"&adtnlSearchStr="+d;}var y=this.id;if(!Ext.isEmpty(y)){var a=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});a.show();}userUrl=g;Ext.Ajax.request({url:g,method:"POST",scope:this,timeout:280000,success:function(F,e){var B=F.responseText;
var J=Ext.decode(B);var A=[],K=0,v=0;if(!Ext.isEmpty(J)&&!Ext.isEmpty(J.measures)&&J.measures!="undefiend"){if(J.measures.length>0){for(var G=0;G<J.columns.length;G++){A=[];v=0;for(var E=0;E<J.measures.length;E++){if((J.measures[E][""+G+"MeasureValueLenWidth"])>0&&J.measures[E][""+G+"MeasureValueLenWidth"]!="-"&&J.measures[E][""+G+"MeasureValueLenWidth"]!="undefined"){A[K]=J.measures[E][""+G+"MeasureValue"];
K++;}}if(A.length>0){for(var I=0;I<A.length;I++){if(A[I]!=null&&A[I]!="undefined"){if(A[I].indexOf(".")!=-1){if(v<(A[I].substr(0,A[I].indexOf("."))).length){v=(A[I].substr(0,A[I].indexOf("."))).length;}}else{if(v<A[I].length){v=A[I].length;}}}}}for(var D=0;D<J.measures.length;D++){if((J.measures[D][""+G+"MeasureValueLenWidth"])>0&&J.measures[D][""+G+"MeasureValueLenWidth"]!="-"&&J.measures[D][""+G+"MeasureValueLenWidth"]!="undefined"){J.measures[D][""+G+"MeasureValueLenWidth"]=v*7;
}}}}}var N=Ext.get("vdiListGrid");var H=J["FIlTER"];this.checkFilterSession(H);if(!Ext.isEmpty(J["header_display"])){Ext.getCmp("endUserView").setTitle(J["header_display"]);Ext.getCmp("endUserView").setIconCls(J["header_display_icon"]);}var z=Ext.getCmp("vdiListGrid");if(z!=null&&z!=undefined&&z.items!=null&&z.items!=undefined){var M=z.items.items;
for(var L=M.length-1;L>-1;L--){M[L].destroy();}}var C={xtype:"generalMeasuresGridPanel",ui:"newGridPanel removeTableBg",itemId:"userExperience",margin:0,padding:0,frame:false,border:false,layout:{type:"vbox",align:"stretch"},flex:1,url:g,someFun:Ext.emptyFn,listeners:{"afterrender":function(S){var P="";
var T="";var O="";try{P=Ext.getCmp("filterBy").getValue();T=Ext.getCmp("detailCombo").getValue();O=Ext.getCmp("compmultipane").getValue();}catch(R){}var Q=P+""+T+""+O;if(userType=="OverviewAppXenApp7"||userType=="OverviewAppVDI"||(isOnlyVMAssigned&&userType=="VDI")){this.loadTabJson(J,S.url,"true","endUserDashboard-"+userType,Q);
}else{this.loadTabJson(J,S.url,fromMetricView,"endUserDashboard-"+userType,Q);}a.hide();C.someFun();}}};if(!Ext.isEmpty(J)&&J.hasOwnProperty("countJson")&&J.countJson.hasOwnProperty("isHidePaging")){isHidePaging=J.countJson.isHidePaging;}else{isHidePaging=true;}tempSearchPanel=C;Ext.getCmp("vdiListGrid").add(C);
Ext.getCmp("vdiListGrid").doLayout();},failure:function(){if(!Ext.isEmpty(a)){a.hide();}}});},saveLimits:function(c){var g=userType;try{var h=Ext.getCmp("vdiTypeCombo");if(!Ext.isEmpty(h)&&!Ext.isEmpty(h.getValue())&&h.getValue()!=""){var l=h.getValue();var a=h.findRecord(h.valueField||h.displayField,l);
var k=h.store.indexOf(a);g=h.getStore().getAt(k).get("usertype");if(Ext.isEmpty(g)){g=userType;}}}catch(j){}var d=Ext.getCmp("limitCombo")!=null?Ext.getCmp("limitCombo").value:"";if(d!=null&&d!="undefined"){var b="/final/monitor/endUserDashboardConfigJson.jsp?user="+userName+"&saveLimit=yes";b=b+"&userType="+g;
if(d!=null&&d!="null"&&d!=""&&d!="undefined"){b=b+"&saveLimitValue="+d;}Ext.Ajax.request({url:b,scope:this,method:"POST",success:function(e){var n=e.responseText;var m=Ext.decode(n);this.onSearchVdi(c);},failure:function(){this.onSearchVdi(c);}});}},onChangeVdi:function(h){var j=Ext.getCmp("vdiTypeCombo")!=null?Ext.getCmp("vdiTypeCombo").value:"";
if(j!=null&&j!="null"&&j!=""&&j!="undefined"&&(j=="Citrix_XcXenApp_server"||j=="Citrix_server")){var d="";if(j=="Citrix_XcXenApp_server"){d="/final/monitor/endUserDashboard.jsp?access=allusers&userType=XenApp7&fromMenu=true";}else{d="/final/monitor/endUserDashboard.jsp?access=allusers&userType=XenApp&fromMenu=true";
}var e=Ext.getCmp("vdiTypeCombo");var c=false;if(!Ext.isEmpty(e)&&!Ext.isEmpty(e.getValue())&&e.getValue()!=""){var b=e.getValue();var g=e.findRecord(e.valueField||e.displayField,b);var a=e.store.indexOf(g);c=e.getStore().getAt(a).get("isLocOverviewSupport");}if(endUserOverviewFlag){if(!Ext.isEmpty(c)&&c=="true"){isfromuedsort="";
d=d+"&endUserDashOverview="+endUserOverviewFlag+"&isfromuedsort="+isfromuedsort;}}else{if(!Ext.isEmpty(c)&&c=="true"){d=d+"&endUserDashOverview=true&isfromuedsort=";}}window.location.href=d;}else{if(j!=null&&j!="null"&&j!=""&&j!="undefined"&&(j=="VDI"||j=="Terminal"||j=="Horizon")){var d="/final/monitor/endUserDashboard.jsp?access=allusers&userType="+j+"&fromMenu=true";
var e=Ext.getCmp("vdiTypeCombo");var c=false;if(!Ext.isEmpty(e)&&!Ext.isEmpty(e.getValue())&&e.getValue()!=""){var b=e.getValue();var g=e.findRecord(e.valueField||e.displayField,b);var a=e.store.indexOf(g);c=e.getStore().getAt(a).get("isLocOverviewSupport");}if(endUserOverviewFlag){if(!Ext.isEmpty(c)&&c=="true"){isfromuedsort="";
d=d+"&endUserDashOverview="+endUserOverviewFlag+"&isfromuedsort="+isfromuedsort;}}else{if(!Ext.isEmpty(c)&&c=="true"){isfromuedsort="";d=d+"&endUserDashOverview=true&isfromuedsort="+isfromuedsort;}}window.location.href=d;}else{this.onSearchVdi(j);}}},onSearchVdi:function(s){var g="/final/monitor/endUserDashboardData.jsp?user="+userName;
var m=Ext.getCmp("searchString")!=null?Ext.getCmp("searchString").value:"";var d=Ext.getCmp("adtnlSearchString")!=null?Ext.getCmp("adtnlSearchString").value:"";var r=Ext.getCmp("limitCombo")!=null?Ext.getCmp("limitCombo").value:"";var h=Ext.getCmp("vdiTypeCombo")!=null?Ext.getCmp("vdiTypeCombo").value:"";
if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){if(defaultVdiType!=null&&defaultVdiType!=undefined&&defaultVdiType!=""){h=defaultVdiType;}}var j=userType;try{var t=Ext.getCmp("vdiTypeCombo");if(!Ext.isEmpty(t)&&!Ext.isEmpty(t.getValue())&&t.getValue()!=""){var n=t.getValue();var k=t.findRecord(t.valueField||t.displayField,n);
var l=t.store.indexOf(k);j=t.getStore().getAt(l).get("usertype");if(Ext.isEmpty(j)){j=userType;}}}catch(q){}if(m!=null&&m!="null"&&m!=""&&m!="undefined"){try{g=g+"&searchString="+encodeURIComponent(parent.filterEncode(m));}catch(q){g=g+"&searchString="+encodeURIComponent(parent.parent.filterEncode(m));
}}if(r!=null&&r!="null"&&r!=""&&r!="undefined"){g=g+"&priority="+r;}if(h!=null&&h!="null"&&h!=""&&h!="undefined"&&h!="VDI"&&h!="ESX"&&h!="Terminal"&&h!="Horizon"){g=g+"&vdiType="+encodeURIComponent(h);}if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){g=g+"&fromctx="+fromctx;}if(!Ext.isEmpty(d)&&d!=null&&d!="null"&&d!=""&&d!="undefined"){g=g+"&adtnlSearchStr="+d;
}g=g+"&userType="+j;userType=j;if(Ext.isEmpty(fromctx)){if(userType=="ESX"){Ext.getCmp("endUserView").setTitle("Performance Metrics for VMs");}else{Ext.getCmp("endUserView").setTitle("User Experience Overview for "+userType);}}if(isFromMenu){g=g+"&fromMenu=true";}if(showKeyUser){g=g+"&showKeyUser=true";
if(updateUserAssociateFlag){g=g+"&updateUserAssociate=true";}}if(isFromGeo){g=g+"&fromGeo=true&iniName="+iniName+"&user_name="+user_name+"&isUserBased="+isUserBased+"&dashboard_name="+dashboard_name+"&view_name="+view_name+"&dashboard_mapping="+dashboard_mapping+"&time_line="+time_line+"&ginfo="+geoInfo+"&fromServiceHomePage="+fromServiceHomePage+"&fromZonePage="+fromZonePage+"&selectedTest="+encodeURIComponent(selectedTest)+"&selectedMeasure="+selectedMeasure;
}if(isFromXenVdi!=null&&isFromXenVdi!=undefined&&isFromXenVdi!=""&&isFromXenVdi!="undefined"&&isFromXenVdi!="null"){g=g+"&isFromXenVdi="+isFromXenVdi;}g+=this.encodeForFilterParam();var b=Ext.getCmp("groupCombo");var o=Ext.getCmp("adgroup");if(b!=undefined&&b!=null&&o!=undefined&&o!=null){var p=b.getValue();
if(p=="ad_group"){var c=o.getValue();if(c!=null&c!=undefined){c=c.replace(/=/g,"|eq|");c=c.replace(/,/g,"|comma|");}g=g+"&aduserFilter="+encodeURIComponent(c);}}if(fromMetricView!=null&&fromMetricView!="null"&&fromMetricView!=""&&fromMetricView!="undefined"){g=g+"&fromMetricView="+fromMetricView;}userUrl=g;
if(endUserOverviewFlag){isfromuedsort="";g=g+"&endUserDashOverview="+endUserOverviewFlag+"&isfromuedsort="+isfromuedsort;Ext.getCmp("formPanel").setVisible(false);}if(!Ext.isEmpty(isFromUEDOverview)&&isFromUEDOverview!=null&&isFromUEDOverview!=undefined&&(isFromUEDOverview=="true"||isFromUEDOverview==true)){g=g+"&isfromuedoverview="+isFromUEDOverview;
}if(!Ext.isEmpty(isServiceBusiViewMetrics)&&isServiceBusiViewMetrics!=null&&isServiceBusiViewMetrics!=undefined&&(isServiceBusiViewMetrics=="true"||isServiceBusiViewMetrics==true)){g=g+"&isServiceBusiViewMetrics="+isServiceBusiViewMetrics;}if((!Ext.isEmpty(isfromCitrix)&&isfromCitrix!=null&&isfromCitrix!=undefined&&(isfromCitrix=="true"||isfromCitrix==true))||(!Ext.isEmpty(isfromRum)&&isfromRum!=null&&isfromRum!=undefined&&(isfromRum=="true"||isfromRum==true))){if(isfromRum!=null&&isfromRum!="null"&&isfromRum!=""&&isfromRum!="undefined"){if((serviceComponent!=null&&serviceComponent!="null"&&serviceComponent!=""&&serviceComponent!="undefined"&&serviceComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){g=g+"&iniName=eg_rumdashboard&isfromRum=true&userBased=true&fromMenu=true&showConfig=true&dashboard_name=RUM_Dashboard&appliesTo="+appliesTo+"&isBackFromRUM=false&filter=Service&filterBy="+subFilterGl+"&view_name="+view_name+"&subFilter="+subFilterGl;
}else{g=g+"&iniName=eg_rumdashboard&isfromCitrix=true&isfromRum=true&userBased=true&fromMenu=true&showConfig=true&dashboard_name=RUM_Dashboard&appliesTo="+appliesTo+"&isBackFromRUM=false&filter=Service&filterBy="+subFilterGl+"&view_name="+view_name+"&subFilter="+subFilterGl;}}else{if(g!=""&&g!=null){g=g+"&fromMetricView=true&isfromCitrix="+isfromCitrix+"&iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&fromMenu=true&showConfig=true&fromUED=true&dashboard_name="+dashboard_name+"&dashboard_mapping="+dashboard_mapping+"&view_name="+view_name+"&selectedTest="+encodeURIComponent(selectedTest)+"&selectedMeasure="+selectedMeasure+"&fromSerComboChange="+fromSerComboChange+"&fromServiceHomePage="+fromServiceHomePage;
}}if((serviceComponent!=null&&serviceComponent!="null"&&serviceComponent!=""&&serviceComponent!="undefined"&&serviceComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){g=g+"&selectedRum="+selectedRum+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup+"&isUserBased="+isUserBased+"&fromZonePage="+fromZonePage+"&comptype="+backObject.comptype+"&fromHostPanel=true";
}}if((segmentComponent!=null&&segmentComponent!="null"&&segmentComponent!=""&&segmentComponent!="undefined"&&segmentComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){g=g+"&fromHostPanel=true&segmentComponent=true&fromHomepage="+backObject.fromHomepage;
}if(showKeyUser){}var u=this.id;if(!Ext.isEmpty(u)){var a=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});a.show();}if(!Ext.isEmpty(enableBackButton)&&enableBackButton!=null&&enableBackButton!=undefined&&(enableBackButton=="true"||enableBackButton==true)){g+="&enableBackButton="+enableBackButton;
}Ext.Ajax.request({url:g,method:"POST",scope:this,timeout:280000,success:function(x,C){var G=x.responseText;var y=Ext.decode(G);var I=Ext.get("vdiListGrid");var K=[],w=0,z=0;var B=Ext.getCmp("adtnlSearchString");if(!Ext.isEmpty(y.addtionalSearchFlag)&&y.addtionalSearchFlag!=undefined&&(y.addtionalSearchFlag==false||y.addtionalSearchFlag=="false")&&(!Ext.isEmpty(B)&&B!=undefined)){B.value="";
B.hide();}else{if((addtionalSearchFlag)&&(!Ext.isEmpty(B)&&B!=undefined)&&!Ext.isEmpty(y.addtionalSearchFlag)&&y.addtionalSearchFlag!=undefined&&(y.addtionalSearchFlag==true||y.addtionalSearchFlag=="true")){B.emptyText="";B.emptyText=y.addSearchEmptyText;}}if(!Ext.isEmpty(y)&&!Ext.isEmpty(y.measures)&&y.measures!="undefiend"){if(y.measures.length>0){for(var F=0;
F<y.columns.length;F++){K=[];z=0;for(var E=0;E<y.measures.length;E++){if((y.measures[E][""+F+"MeasureValueLenWidth"])>0&&y.measures[E][""+F+"MeasureValueLenWidth"]!="-"&&y.measures[E][""+F+"MeasureValueLenWidth"]!="undefined"){K[w]=y.measures[E][""+F+"MeasureValue"];w++;}}if(K.length>0){for(var H=0;H<K.length;
H++){if(K[H]!=null&&K[H]!="undefined"){if(K[H].indexOf(".")!=-1){if(z<(K[H].substr(0,K[H].indexOf("."))).length){z=(K[H].substr(0,K[H].indexOf("."))).length;}}else{if(z<K[H].length){z=K[H].length;}}}}}for(var D=0;D<y.measures.length;D++){if((y.measures[D][""+F+"MeasureValueLenWidth"])>0&&y.measures[D][""+F+"MeasureValueLenWidth"]!="-"&&y.measures[D][""+F+"MeasureValueLenWidth"]!="undefined"){y.measures[D][""+F+"MeasureValueLenWidth"]=z*7;
}}}}}var L=y["FIlTER"];if(!Ext.isEmpty(y["header_display"])){Ext.getCmp("endUserView").setTitle(y["header_display"]);Ext.getCmp("endUserView").setIconCls(y["header_display_icon"]);}if(!endUserOverviewFlag&&!showKeyUser&&!Ext.isEmpty(s)&&s.id=="vdiTypeCombo"){this.loadFilterOptionsCombo();}this.checkFilterSession(L);
if(!Ext.isEmpty(y["GRID_DATA"])){isDataAva=true;}if(!Ext.isEmpty(y["isDataAvail"])){isDataAva=y["isDataAvail"];}var A=Ext.getCmp("vdiListGrid");if(A!=null&&A!=undefined&&A.items!=null&&A.items!=undefined){var v=A.items.items;for(var J=v.length-1;J>-1;J--){v[J].destroy();}}var e={xtype:"generalMeasuresGridPanel",ui:"newGridPanel removeTableBg",itemId:"userExperience",margin:0,padding:0,frame:false,border:false,layout:{type:"vbox",align:"stretch"},flex:1,url:g,someFun:Ext.emptyFn,listeners:{"afterrender":function(Q){var N="";
var R="";var M="";try{N=Ext.getCmp("filterBy").getValue();R=Ext.getCmp("detailCombo").getValue();M=Ext.getCmp("compmultipane").getValue();}catch(P){}var O=N+""+R+""+M;if(userType=="OverviewAppXenApp7"||userType=="OverviewAppVDI"||(isOnlyVMAssigned&&userType=="VDI")){this.loadTabJson(y,Q.url,"true","endUserDashboard-"+userType,O);
}else{this.loadTabJson(y,Q.url,fromMetricView,"endUserDashboard-"+userType,O);}a.hide();e.someFun();}}};if(!Ext.isEmpty(y)&&y.hasOwnProperty("countJson")&&y.countJson.hasOwnProperty("isHidePaging")){isHidePaging=y.countJson.isHidePaging;}else{isHidePaging=true;}tempSearchPanel=e;Ext.getCmp("vdiListGrid").add(e);
Ext.getCmp("vdiListGrid").doLayout();},failure:function(){if(!Ext.isEmpty(a)){a.hide();}}});},changeVdiType:function(){var b="/final/monitor/endUserDashboardData.jsp?user="+userName;var s=Ext.getCmp("searchString")!=null?Ext.getCmp("searchString").value:"";var j=Ext.getCmp("limitCombo")!=null?Ext.getCmp("limitCombo").value:"";
var p=Ext.getCmp("vdiTypeCombo")!=null?Ext.getCmp("vdiTypeCombo").value:"";if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){if(defaultDispLimit!=null&&defaultDispLimit!=undefined&&defaultDispLimit!=""){j=defaultDispLimit;}if(defaultVdiType!=null&&defaultVdiType!=undefined&&defaultVdiType!=""){p=defaultVdiType;
}}var k=userType;try{var l=Ext.getCmp("vdiTypeCombo");if(!Ext.isEmpty(l)&&!Ext.isEmpty(l.getValue())&&l.getValue()!=""){var r=l.getValue();var a=l.findRecord(l.valueField||l.displayField,r);var q=l.store.indexOf(a);k=l.getStore().getAt(q).get("usertype");if(Ext.isEmpty(k)){k=userType;}}}catch(o){}if(s!=null&&s!="null"&&s!=""&&s!="undefined"){b=b+"&searchString="+s;
}if(j!=null&&j!="null"&&j!=""&&j!="undefined"){b=b+"&priority="+j;}if(p!=null&&p!="null"&&p!=""&&p!="undefined"){b=b+"&vdiType="+p;}if(orderByColumn!=null&&orderByColumn!="null"&&orderByColumn!=""&&orderByColumn!="undefined"){b=b+"&orderByColumn="+orderByColumn;}if(orderBy!=null&&orderBy!="null"&&orderBy!=""&&orderBy!="undefined"){b=b+"&orderBy="+orderBy;
}if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){b=b+"&fromctx="+fromctx;}b=b+"&userType="+k;if(isFromXenVdi!=null&&isFromXenVdi!=undefined&&isFromXenVdi!=""&&isFromXenVdi!="undefined"&&isFromXenVdi!="null"){b=b+"&isFromXenVdi="+isFromXenVdi;}if(isFromMenu){b=b+"&fromMenu=true";
}if(showKeyUser){b=b+"&showKeyUser=true";if(updateUserAssociateFlag){b=b+"&updateUserAssociate=true";}}if(isFromGeo){b=b+"&fromGeo=true&iniName="+iniName+"&user_name="+user_name+"&isUserBased="+isUserBased+"&dashboard_name="+dashboard_name+"&view_name="+view_name+"&dashboard_mapping="+dashboard_mapping+"&time_line="+time_line+"&ginfo="+geoInfo+"&fromServiceHomePage="+fromServiceHomePage+"&fromZonePage="+fromZonePage+"&selectedTest="+encodeURIComponent(selectedTest)+"&selectedMeasure="+selectedMeasure;
}if(filterParam!=null&&filterParam!="null"&&filterParam!=""&&filterParam!=undefined){b=b+"&"+filterParam;}if((!Ext.isEmpty(isfromCitrix)&&isfromCitrix!=null&&isfromCitrix!=undefined&&(isfromCitrix=="true"||isfromCitrix==true))||(!Ext.isEmpty(isfromRum)&&isfromRum!=null&&isfromRum!=undefined&&(isfromRum=="true"||isfromRum==true))){if(isfromRum!=null&&isfromRum!="null"&&isfromRum!=""&&isfromRum!="undefined"){if((serviceComponent!=null&&serviceComponent!="null"&&serviceComponent!=""&&serviceComponent!="undefined"&&serviceComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){b=b+"&iniName=eg_rumdashboard&isfromRum=true&userBased=true&fromMenu=true&showConfig=true&dashboard_name=RUM_Dashboard&appliesTo="+appliesTo+"&isBackFromRUM=false&filter=Service&filterBy="+subFilterGl+"&view_name="+view_name+"&subFilter="+subFilterGl;
}else{b=b+"&iniName=eg_rumdashboard&isfromCitrix=true&isfromRum=true&userBased=true&fromMenu=true&showConfig=true&dashboard_name=RUM_Dashboard&appliesTo="+appliesTo+"&isBackFromRUM=false&filter=Service&filterBy="+subFilterGl+"&view_name="+view_name+"&subFilter="+subFilterGl;}}else{if(b!=""&&b!=null){b=b+"&fromMetricView=true&isfromCitrix="+isfromCitrix+"&iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&fromMenu=true&showConfig=true&fromUED=true&dashboard_name="+dashboard_name+"&dashboard_mapping="+dashboard_mapping+"&view_name="+view_name+"&selectedTest="+encodeURIComponent(selectedTest)+"&selectedMeasure="+selectedMeasure+"&fromSerComboChange="+fromSerComboChange+"&fromServiceHomePage="+fromServiceHomePage;
}}if((serviceComponent!=null&&serviceComponent!="null"&&serviceComponent!=""&&serviceComponent!="undefined"&&serviceComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){b=b+"&selectedRum="+selectedRum+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup+"&isUserBased="+isUserBased+"&fromZonePage="+fromZonePage+"&comptype="+backObject.comptype+"&fromHostPanel=true";
}}if((segmentComponent!=null&&segmentComponent!="null"&&segmentComponent!=""&&segmentComponent!="undefined"&&segmentComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){b=b+"&fromHostPanel=true&segmentComponent=true&fromHomepage="+backObject.fromHomepage;
}var h=Ext.getCmp("groupCombo");var d=Ext.getCmp("adgroup");if(h!=undefined&&h!=null&&d!=undefined&&d!=null){var n=h.getValue();if(n=="ad_group"){var m=d.getValue();if(m!=null&m!=undefined){m=m.replace(/=/g,"|eq|");m=m.replace(/,/g,"|comma|");}b=b+"&aduserFilter="+encodeURIComponent(m);}}if(fromMetricView!=null&&fromMetricView!="null"&&fromMetricView!=""&&fromMetricView!="undefined"){b=b+"&fromMetricView="+fromMetricView;
}userUrl=b;var c=this.id;if(!Ext.isEmpty(c)){var g=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});g.show();}Ext.Ajax.request({url:b,method:"POST",scope:this,timeout:280000,success:function(w,e){var u=w.responseText;var y=Ext.decode(u);var B=Ext.get("vdiListGrid");var x=y["FIlTER"];this.checkFilterSession(x);
if(!Ext.isEmpty(y["GRID_DATA"])){isDataAva=true;}if(!Ext.isEmpty(y["header_display"])){Ext.getCmp("endUserView").setTitle(y["header_display"]);Ext.getCmp("endUserView").setIconCls(y["header_display_icon"]);}var t=Ext.getCmp("vdiListGrid");if(t!=null&&t!=undefined&&t.items!=null&&t.items!=undefined){var A=t.items.items;
for(var z=A.length-1;z>-1;z--){A[z].destroy();}}var v={xtype:"generalMeasuresGridPanel",ui:"newGridPanel removeTableBg",itemId:"userExperience",margin:0,padding:0,frame:false,border:false,flex:1,url:b,someFun:Ext.emptyFn,listeners:{"afterrender":function(G){var D="";var H="";var C="";try{D=Ext.getCmp("filterBy").getValue();
H=Ext.getCmp("detailCombo").getValue();C=Ext.getCmp("compmultipane").getValue();}catch(F){}var E=D+""+H+""+C;if(userType=="OverviewAppXenApp7"||userType=="OverviewAppVDI"||(isOnlyVMAssigned&&userType=="VDI")){this.loadTabJson(y,G.url,"true","endUserDashboard-"+userType,E);}else{this.loadTabJson(y,G.url,fromMetricView,"endUserDashboard-"+userType,E);
}g.hide();v.someFun();}}};if(!Ext.isEmpty(y)&&y.hasOwnProperty("countJson")&&y.countJson.hasOwnProperty("isHidePaging")){isHidePaging=y.countJson.isHidePaging;}else{isHidePaging=true;}tempSearchPanel=v;Ext.getCmp("vdiListGrid").add(v);Ext.getCmp("vdiListGrid").doLayout();},failure:function(){if(!Ext.isEmpty(g)){g.hide();
}}});},changeRecordsPerPage:function(){var b="/final/monitor/endUserDashboardData.jsp?user="+userName;var s=Ext.getCmp("searchString")!=null?Ext.getCmp("searchString").value:"";var j=Ext.getCmp("limitCombo")!=null?Ext.getCmp("limitCombo").value:"";var p=Ext.getCmp("vdiTypeCombo")!=null?Ext.getCmp("vdiTypeCombo").value:"";
if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){if(defaultDispLimit!=null&&defaultDispLimit!=undefined&&defaultDispLimit!=""){j=defaultDispLimit;}if(defaultVdiType!=null&&defaultVdiType!=undefined&&defaultVdiType!=""){p=defaultVdiType;}}var k=userType;try{var l=Ext.getCmp("vdiTypeCombo");
if(!Ext.isEmpty(l)&&!Ext.isEmpty(l.getValue())&&l.getValue()!=""){var r=l.getValue();var a=l.findRecord(l.valueField||l.displayField,r);var q=l.store.indexOf(a);k=l.getStore().getAt(q).get("usertype");if(Ext.isEmpty(k)){k=userType;}}}catch(o){}if(s!=null&&s!="null"&&s!=""&&s!="undefined"){b=b+"&searchString="+s;
}if(j!=null&&j!="null"&&j!=""&&j!="undefined"){b=b+"&priority="+j;}if(p!=null&&p!="null"&&p!=""&&p!="undefined"){b=b+"&vdiType="+p;}if(orderByColumn!=null&&orderByColumn!="null"&&orderByColumn!=""&&orderByColumn!="undefined"){b=b+"&orderByColumn="+orderByColumn;}if(orderBy!=null&&orderBy!="null"&&orderBy!=""&&orderBy!="undefined"){b=b+"&orderBy="+orderBy;
}if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){b=b+"&fromctx="+fromctx;}b=b+"&userType="+k;if(isFromXenVdi!=null&&isFromXenVdi!=undefined){b=b+"&isFromXenVdi="+isFromXenVdi;}if(isFromMenu){b=b+"&fromMenu=true";}if(showKeyUser){b=b+"&showKeyUser=true";if(updateUserAssociateFlag){b=b+"&updateUserAssociate=true";
}}if(isFromGeo){b=b+"&fromGeo=true&iniName="+iniName+"&user_name="+user_name+"&isUserBased="+isUserBased+"&dashboard_name="+dashboard_name+"&view_name="+view_name+"&dashboard_mapping="+dashboard_mapping+"&time_line="+time_line+"&ginfo="+geoInfo+"&fromServiceHomePage="+fromServiceHomePage+"&fromZonePage="+fromZonePage+"&selectedTest="+encodeURIComponent(selectedTest)+"&selectedMeasure="+selectedMeasure;
}if(filterParam!=null&&filterParam!="null"&&filterParam!=""&&filterParam!=undefined){b=b+"&"+filterParam;}if((!Ext.isEmpty(isfromCitrix)&&isfromCitrix!=null&&isfromCitrix!=undefined&&(isfromCitrix=="true"||isfromCitrix==true))||(!Ext.isEmpty(isfromRum)&&isfromRum!=null&&isfromRum!=undefined&&(isfromRum=="true"||isfromRum==true))){if(isfromRum!=null&&isfromRum!="null"&&isfromRum!=""&&isfromRum!="undefined"){if((serviceComponent!=null&&serviceComponent!="null"&&serviceComponent!=""&&serviceComponent!="undefined"&&serviceComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){b=b+"&iniName=eg_rumdashboard&isfromRum=true&userBased=true&fromMenu=true&showConfig=true&dashboard_name=RUM_Dashboard&appliesTo="+appliesTo+"&isBackFromRUM=false&filter=Service&filterBy="+subFilterGl+"&view_name="+view_name+"&subFilter="+subFilterGl;
}else{b=b+"&iniName=eg_rumdashboard&isfromCitrix=true&isfromRum=true&userBased=true&fromMenu=true&showConfig=true&dashboard_name=RUM_Dashboard&appliesTo="+appliesTo+"&isBackFromRUM=false&filter=Service&filterBy="+subFilterGl+"&view_name="+view_name+"&subFilter="+subFilterGl;}}else{if(b!=""&&b!=null){b=b+"&fromMetricView=true&isfromCitrix="+isfromCitrix+"&iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&fromMenu=true&showConfig=true&fromUED=true&dashboard_name="+dashboard_name+"&dashboard_mapping="+dashboard_mapping+"&view_name="+view_name+"&selectedTest="+encodeURIComponent(selectedTest)+"&selectedMeasure="+selectedMeasure+"&fromSerComboChange="+fromSerComboChange+"&fromServiceHomePage="+fromServiceHomePage;
}}if((serviceComponent!=null&&serviceComponent!="null"&&serviceComponent!=""&&serviceComponent!="undefined"&&serviceComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){b=b+"&selectedRum="+selectedRum+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup+"&isUserBased="+isUserBased+"&fromZonePage="+fromZonePage+"&comptype="+backObject.comptype+"&fromHostPanel=true";
}}if((segmentComponent!=null&&segmentComponent!="null"&&segmentComponent!=""&&segmentComponent!="undefined"&&segmentComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){b=b+"&fromHostPanel=true&segmentComponent=true&fromHomepage="+backObject.fromHomepage;
}var h=Ext.getCmp("groupCombo");var d=Ext.getCmp("adgroup");if(h!=undefined&&h!=null&&d!=undefined&&d!=null){var n=h.getValue();if(n=="ad_group"){var m=d.getValue();if(m!=null&m!=undefined){m=m.replace(/=/g,"|eq|");m=m.replace(/,/g,"|comma|");}b=b+"&aduserFilter="+encodeURIComponent(m);}}if(fromMetricView!=null&&fromMetricView!="null"&&fromMetricView!=""&&fromMetricView!="undefined"){b=b+"&fromMetricView="+fromMetricView;
}userUrl=b;var c=this.id;if(!Ext.isEmpty(c)){var g=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});g.show();}Ext.Ajax.request({url:b,method:"POST",scope:this,timeout:280000,success:function(A,e){var w=A.responseText;var E=Ext.decode(w);var I=Ext.get("vdiListGrid");var v=[],F=0,t=0;if(!Ext.isEmpty(E)&&!Ext.isEmpty(E.measures)&&E.measures!="undefiend"){if(E.measures.length>0){for(var B=0;
B<E.columns.length;B++){v=[];t=0;for(var z=0;z<E.measures.length;z++){if((E.measures[z][""+B+"MeasureValueLenWidth"])>0&&E.measures[z][""+B+"MeasureValueLenWidth"]!="-"&&E.measures[z][""+B+"MeasureValueLenWidth"]!="undefined"){v[F]=E.measures[z][""+B+"MeasureValue"];F++;}}if(v.length>0){for(var D=0;D<v.length;
D++){if(v[D]!=null&&v[D]!="undefined"){if(v[D].indexOf(".")!=-1){if(t<(v[D].substr(0,v[D].indexOf("."))).length){t=(v[D].substr(0,v[D].indexOf("."))).length;}}else{if(t<v[D].length){t=v[D].length;}}}}}for(var y=0;y<E.measures.length;y++){if((E.measures[y][""+B+"MeasureValueLenWidth"])>0&&E.measures[y][""+B+"MeasureValueLenWidth"]!="-"&&E.measures[y][""+B+"MeasureValueLenWidth"]!="undefined"){E.measures[y][""+B+"MeasureValueLenWidth"]=t*7;
}}}}}var C=E["FIlTER"];this.checkFilterSession(C);if(!Ext.isEmpty(E["GRID_DATA"])){isDataAva=true;}if(!Ext.isEmpty(E["header_display"])){Ext.getCmp("endUserView").setTitle(E["header_display"]);Ext.getCmp("endUserView").setIconCls(E["header_display_icon"]);}var u=Ext.getCmp("vdiListGrid");if(u!=null&&u!=undefined&&u.items!=null&&u.items!=undefined){var H=u.items.items;
for(var G=H.length-1;G>-1;G--){H[G].destroy();}}var x={xtype:"generalMeasuresGridPanel",ui:"newGridPanel removeTableBg",itemId:"userExperience",margin:0,padding:0,frame:false,border:false,layout:{type:"vbox",align:"stretch"},flex:1,url:b,someFun:Ext.emptyFn,listeners:{"afterrender":function(N){var K="";
var O="";var J="";try{K=Ext.getCmp("filterBy").getValue();O=Ext.getCmp("detailCombo").getValue();J=Ext.getCmp("compmultipane").getValue();}catch(M){}var L=K+""+O+""+J;if(userType=="OverviewAppXenApp7"||userType=="OverviewAppVDI"||(isOnlyVMAssigned&&userType=="VDI")){this.loadTabJson(E,N.url,"true","endUserDashboard-"+userType,L);
}else{this.loadTabJson(E,N.url,fromMetricView,"endUserDashboard-"+userType,L);}g.hide();x.someFun();}}};if(!Ext.isEmpty(E)&&E.hasOwnProperty("countJson")&&E.countJson.hasOwnProperty("isHidePaging")){isHidePaging=E.countJson.isHidePaging;}else{isHidePaging=true;}tempSearchPanel=x;Ext.getCmp("vdiListGrid").add(x);
Ext.getCmp("vdiListGrid").doLayout();},failure:function(){if(!Ext.isEmpty(g)){g.hide();}}});},loadMoreOptions:function(){var a="/final/monitor/endUserDashboardConfigJson.jsp?userType="+userType;a=a+"&fromMoreOptions=true";Ext.Ajax.request({url:a,method:"POST",scope:this,timeout:280000,success:function(e,b){var d=e.responseText;
var k=Ext.decode(d);if(!Ext.isEmpty(k)){var l=k.moreOptions;var m=Ext.getCmp("chkGrp");var n=[];if(l!=null&&l!=undefined&&l.length>0){var g=0;if(Ext.isChrome){g=19;}else{g=16;}for(var r=0;r<l.length;r++){var q=l[r];var o=q["displayField"];var c=q["valueField"];var p=q["disabled"];var h=q["checkField"];
var j=false;if(h!=undefined&&(h=="true"||h==true)){j=true;}n.push({xtype:"checkbox",cls:"components-checkbox-field checkbt",fieldLabel:"",boxLabel:'<span style="line-height:20px !important" data-qtip="'+o+'">'+Ext.String.ellipsis(o,g,false)+"</span>",inputValue:c,checked:j,disabled:p});}Ext.getCmp("pnl").add({id:"chkGrp",xtype:"checkboxgroup",columns:2,cls:"uxChkLabel",layout:"checkboxgroup",vertical:true,width:"100%",labelAlign:"right",items:n});
}}},failure:function(){if(!Ext.isEmpty(myMask)){myMask.hide();}}});},loadMoreOptionsGrid:function(b,d,c){var a="/final/monitor/endUserDashboardConfigJson.jsp?userType="+userType;a=a+"&fromMoreGrid=true";if(!Ext.isEmpty(fromctx)&&fromctx!=undefined&&(fromctx||fromctx=="true")){a=a+"&fromctx="+fromctx;
a=a+"&vdiType="+defaultVdiType;}Ext.Ajax.request({url:a,method:"POST",scope:this,async:true,timeout:280000,success:function(g,k){var l=g.responseText;var j=Ext.decode(l);if(!Ext.isEmpty(j)){var m=j.moreGrid;if(m!=null&&m!=undefined&&m.length>0){var e=Ext.getCmp("mainGrid");if(!Ext.isEmpty(e)&&e!=undefined&&e!=null){e.getStore().removeAll();
e.getStore().loadRawData("");e.getStore().loadRawData(m);var n=[];e.store.each(function(o){if((o.data.measName!="Host"||o.data.measName!="User/Desktops")&&(o.data.checkVal==true)){n.push(o);}});e.getSelectionModel().select(n,false,false);}var h={xtype:"button",text:"Update",id:"updateBtn",itemId:"Update",margin:"5 0 0 125",cls:"button20",listeners:{"click":function(){thisApp.getController("Main").updateMoreOptionsGrid();
Ext.getCmp("moreOptionsWindowNew").destroy();}}};if(!Ext.isEmpty(Ext.getCmp("chkPanel"))){Ext.getCmp("chkPanel").add(h);}}}},failure:function(){if(!Ext.isEmpty(myMask)){myMask.hide();}}});},updateMoreOptionsGrid:function(){checkedArr1=new Array();var k=Ext.getCmp("mainGrid");var q=k.getStore();var c=q.data.items;
var g=k.getSelectionModel().getSelection();var r=new Array();if(!Ext.isEmpty(g)&&g!=undefined){for(var n=0;n<g.length;n++){var h=g[n].raw.measName;if(!Ext.isEmpty(h)&&!Ext.Array.contains(r,h)){r.push(h);}}}if(c!=null&&c!=undefined&&c.length>0){for(var n=0;n<c.length;n++){var a=c[n].raw;var l=a.measName;
if(!Ext.isEmpty(l)&&l!=undefined&&Ext.Array.contains(r,l)){var m=a.orgName;if(m!=null&&m!=undefined&&m!="User/Desktops"&&m!="Host"){checkedArr1.push(m);}}}}var b="/final/monitor/endUserDashboardConfigJson.jsp?userType="+userType;b=b+"&fromMoreGrid=true&updateMoreGrid=true";if(!Ext.isEmpty(fromctx)&&fromctx!=undefined&&(fromctx||fromctx=="true")){b=b+"&fromctx="+fromctx;
b=b+"&vdiType="+defaultVdiType;}if(checkedArr1!=null&&checkedArr1!=undefined&&checkedArr1.length>0){var o="";for(var e=0;e<checkedArr1.length;e++){o=o+checkedArr1[e];if(e+1!=checkedArr1.length){o=o+",";}}o=parent.filterEncode(o);o=o.replace(/'/g,"|sinquot|");b=b+"&checkedArr1="+encodeURI(o);}var d=this.id;
if(!Ext.isEmpty(d)){var j=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});j.show();}Ext.Ajax.request({url:b,method:"POST",scope:this,timeout:280000,success:function(p,t){var u=p.responseText;var s=Ext.decode(u);this.updateDetails(userUrl);if(!Ext.isEmpty(j)){j.hide();}},failure:function(){if(!Ext.isEmpty(j)){j.hide();
}}});},updateMoreOptions:function(){checkedArr=new Array();var m=Ext.getCmp("chkGrp");var b=m.items.items;if(b!=null&&b!=undefined&&b.length>0){for(var j=0;j<b.length;j++){var k=b[j];var h=k["xtype"];var l=k["checked"];if(h!=null&&h!=""&&h=="checkbox"){var o=k["boxLabel"];var e=k["inputValue"];var n=k["disabled"];
if(n==null||n==undefined||n!=true){if(l!=null&&l!=""&&l==true){checkedArr.push(e);}}}}}var a="/final/monitor/endUserDashboardConfigJson.jsp?userType="+userType;a=a+"&fromMoreOptions=true&updateMoreOptions=true";if(checkedArr!=null&&checkedArr!=undefined&&checkedArr.length>0){var l="";for(var d=0;d<checkedArr.length;
d++){l=l+checkedArr[d];if(d+1!=checkedArr.length){l=l+",";}}a=a+"&checkedArr="+l;}var c=this.id;if(!Ext.isEmpty(c)){var g=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});g.show();}Ext.Ajax.request({url:a,method:"POST",scope:this,timeout:280000,success:function(p,r){var s=p.responseText;var q=Ext.decode(s);
this.updateDetails(userUrl);if(!Ext.isEmpty(g)){g.hide();}},failure:function(){if(!Ext.isEmpty(g)){g.hide();}}});},backButtonFunction:function(){var F=requestParams.isServiceBusiDash;var c=requestParams.action;var w=requestParams.viewPageTitle;var J=requestParams.componentNameSearch;var j=requestParams.componentType;
var p=requestParams.fromPageView;var a=requestParams.selectedState;var d=requestParams.treeFlag_SBD;var y=requestParams.outsideService_SBD;var n=requestParams.titleText_SBD;var s=requestParams.selectNode_SBD;var N=requestParams.serviceName;var k=requestParams.isEmulTrans_SBD;var A=selectedRum;var C=filterByGl;
if(dashboard_mapping!=null&&dashboard_mapping!="null"&&dashboard_mapping!=""&&dashboard_mapping!=undefined&&dashboard_mapping!="undefined"&&fromServiceHomePage!=null&&fromServiceHomePage!="null"&&fromServiceHomePage!=""&&fromServiceHomePage!=undefined&&fromServiceHomePage!="undefined"){C=dashboard_mapping.substr(0,dashboard_mapping.length-5);
}if(appliesTo!=null&&appliesTo!="null"&&appliesTo!=""&&appliesTo!=undefined&&appliesTo!="undefined"){A=appliesTo;}if(fromMetricView!=null&&fromMetricView!="null"&&fromMetricView!=""&&fromMetricView!="undefined"){if((isfromCitrix!=null&&isfromCitrix!="null"&&isfromCitrix!=""&&isfromCitrix!="undefined")||isfromRum!=null&&isfromRum!="null"&&isfromRum!=""&&isfromRum!="undefined"){if(isfromRum!=null&&isfromRum!="null"&&isfromRum!=""&&isfromRum!="undefined"){l="/final/monitor/rumAppFlow.jsp?iniName=eg_rumdashboard&userBased=true&fromMenu=true&showConfig=true&dashboard_name=RUM_Dashboard&appliesTo="+A+"&isBackFromRUM=false&filter=Service&filterBy="+filterByGl+"&view_name="+view_name+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup+"&componentNameSearch="+backObject.componentNameSearch+"&componentType="+backObject.comptype;
if((serviceComponent!=null&&serviceComponent!="null"&&serviceComponent!=""&&serviceComponent!="undefined"&&serviceComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){l="/final/monitor/rumAppFlow.jsp?iniName=eg_rumdashboard&userBased=true&fromMenu=true&showConfig=true&dashboard_name=RUM_Dashboard&appliesTo="+A+"&isBackFromRUM=false&filter=Service&filterBy="+filterByGl+"&view_name="+view_name+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup+"&componentNameSearch="+backObject.componentNameSearch+"&componentType="+backObject.comptype;
}}else{l="/final/monitor/citrixDashboard.jsp?iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&userBased="+isUserBased+"&fromMenu=true&showConfig=true&fromUED=true&dashboard_name="+dashboard_name+"&dashboard_mapping="+dashboard_mapping+"&view_name="+view_name+"&componentType="+backObject.comptype+"&fromSerComboChange="+fromSerComboChange+"&fromServiceHomePage="+fromServiceHomePage+"&filter="+filterByFlag+"&filterBy="+filterByParamFlag+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&componentNameSearch="+backObject.componentNameSearch+"";
if((serviceComponent!=null&&serviceComponent!="null"&&serviceComponent!=""&&serviceComponent!="undefined"&&serviceComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){l="/final/monitor/citrixDashboard.jsp?iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&userBased="+isUserBased+"&fromMenu=true&showConfig=true&fromUED=true&dashboard_name="+dashboard_name+"&dashboard_mapping="+dashboard_mapping+"&view_name="+view_name+"&componentType="+backObject.comptype+"&fromSerComboChange="+fromSerComboChange+"&fromServiceHomePage="+fromServiceHomePage+"&filter="+filterByFlag+"&filterBy="+filterByGl+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&componentNameSearch="+backObject.componentNameSearch+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
if(fromServiceHomePage!=null&&fromServiceHomePage!=""&&fromServiceHomePage!="null"&&fromServiceHomePage!="undefined"&&fromServiceHomePage=="true"){l="/final/monitor/citrixDashboard.jsp?iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&userBased="+isUserBased+"&fromMenu=true&showConfig=true&fromUED=true&dashboard_name="+dashboard_name+"&view_name="+view_name+"&componentType="+backObject.comptype+"&fromSerComboChange="+fromSerComboChange+"&fromServiceHomePage="+fromServiceHomePage+"&filter=Service&filterBy="+C+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&componentNameSearch="+backObject.componentNameSearch+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
}else{l="/final/monitor/citrixDashboard.jsp?iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&userBased="+isUserBased+"&fromMenu=true&showConfig=true&fromUED=true&dashboard_name="+dashboard_name+"&dashboard_mapping="+dashboard_mapping+"&view_name="+view_name+"&componentType="+backObject.comptype+"&fromSerComboChange="+fromSerComboChange+"&fromServiceHomePage="+fromServiceHomePage+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&componentNameSearch="+backObject.componentNameSearch+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
}}}document.location=l;}else{if(backObject.treeTitle!=undefined&&backObject.treeTitle!=null){var m=backObject.treeTitle;var g=backObject.layerModelFromCompPage;var K=requestParams.currentTab;var r=requestParams.selectedParam;var t=requestParams.selectNode;var E=requestParams.aggregateTab;var H=backObject.fromHomepage;
var z=backObject.comptype;if(m!=null&&m=="services"){if(K!=null&&K=="system"){var h="/final/monitor/serviceDashboard.jsp?treeTitle=services&selectNode="+t+"&selectedParam="+r+"&currentTab=system&isSite=false&hasTransactions=false&hasEmulatedTransactions=false&aggregateTab="+E+"&fromHomepage="+H+"&treeOpen=false&openNode=Services&refresh=true&action=service&topoSegment="+r;
if(!Ext.isEmpty(csrfToken)&&csrfToken!=null&&csrfToken!=undefined){h=h+"&com.eg.CSRF_NONCE="+csrfToken;}document.location=h;}else{if(K!=null&&K=="components"){var Q="/final/monitor/serviceDashboard.jsp?treeTitle=services&selectNode="+t+"&selectedParam="+r+"&currentTab=components&isSite=false&aggregateTab="+E+"&fromHomepage="+H+"&hasTransactions=false&hasLogonSimulations=false&hasEmulatedTransactions=false&treeOpen=false&openNode=Services&refresh=true&action=service&topoSegment="+r+"&appCurrentHost="+z;
if(!Ext.isEmpty(csrfToken)&&csrfToken!=null&&csrfToken!=undefined){Q=Q+"&com.eg.CSRF_NONCE="+csrfToken;}document.location=Q;}else{if(K!=null&&K=="aggregates"){var v="/final/monitor/serviceDashboard.jsp?treeTitle=services&selectNode="+t+"&selectedParam="+r+"&currentTab=aggregates&isSite=false&aggregateTab="+E+"&fromHomepage="+H+"&hasTransactions=false&hasEmulatedTransactions=false&treeOpen=false&openNode=Services&refresh=true&action=service&topoSegment="+r+"&aggregateComp="+z;
if(!Ext.isEmpty(csrfToken)&&csrfToken!=null&&csrfToken!=undefined){v=v+"&com.eg.CSRF_NONCE="+csrfToken;}document.location=v;}else{window.history.go(-1);}}}}else{if(m!=null&&m=="segment"){if(K!=null&&K=="system"){var O="/final/monitor/segmentDashboard.jsp?treeTitle=segment&selectNode="+t+"&selectedParam="+r+"&currentTab=system&fromHomepage="+H+"&treeOpen=false&isSite=false&aggregateTab="+E+"&hasTransactions=false&hasEmulatedTransactions=false";
if(!Ext.isEmpty(csrfToken)&&csrfToken!=null&&csrfToken!=undefined){O=O+"&com.eg.CSRF_NONCE="+csrfToken;}document.location=O;}else{if((K!=null&&K=="components")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")||(segmentComponent!=null&&segmentComponent!="null"&&segmentComponent!=""&&segmentComponent!="undefined"&&segmentComponent=="true")){var B="/final/monitor/segmentDashboard.jsp?treeTitle=segment&selectNode="+t+"&selectedParam="+r+"&currentTab=components&fromHomepage="+backObject.fromHomepage+"&treeOpen=false&isSite=false&aggregateTab="+E+"&hasTransactions=false&hasEmulatedTransactions=false&appCurrentHost="+z;
if(!Ext.isEmpty(csrfToken)&&csrfToken!=null&&csrfToken!=undefined){B=B+"&com.eg.CSRF_NONCE="+csrfToken;}document.location=B;}else{if(K!=null&&K=="aggregates"){var L="/final/monitor/segmentDashboard.jsp?treeTitle=segment&selectNode="+t+"&selectedParam="+r+"&currentTab=aggregates&isSite=false&aggregateTab="+E+"&hasTransactions=false&hasEmulatedTransactions=false&fromHomepage="+H+"&treeOpen=false&aggregateComp="+z;
if(!Ext.isEmpty(csrfToken)&&csrfToken!=null&&csrfToken!=undefined){L=L+"&com.eg.CSRF_NONCE="+csrfToken;}document.location=L;}else{window.history.go(-1);}}}}else{if(m!=null&&m=="zone"){if(K!=null&&K=="system"){var M="/final/monitor/zoneDash.jsp?treeTitle=zone&selectNode="+t+"&selectedParam="+r+"&currentTab=system&fromHomepage="+H+"&treeOpen=false&openNode=null&isSite=false&aggregateTab="+E+"&hasTransactions=false&hasEmulatedTransactions=false";
if(!Ext.isEmpty(csrfToken)&&csrfToken!=null&&csrfToken!=undefined){M=M+"&com.eg.CSRF_NONCE="+csrfToken;}document.location=M;}else{if(K!=null&&K=="components"){var x="/final/monitor/zoneDash.jsp?treeTitle=zone&selectNode="+t+"&selectedParam="+r+"&currentTab=components&fromHomepage="+H+"&treeOpen=false&openNode=null&isSite=false&aggregateTab="+E+"&hasTransactions=false&hasEmulatedTransactions=false&appCurrentHost="+z;
if(!Ext.isEmpty(csrfToken)&&csrfToken!=null&&csrfToken!=undefined){x=x+"&com.eg.CSRF_NONCE="+csrfToken;}document.location=x;}else{if(K!=null&&K=="aggregates"){var G="/final/monitor/zoneDash.jsp?treeTitle=zone&selectNode="+t+"&selectedParam="+r+"&currentTab=aggregates&fromHomepage="+H+"&treeOpen=false&openNode=null&isSite=false&aggregateTab="+E+"&hasTransactions=false&hasEmulatedTransactions=false&aggregateComp="+z;
if(!Ext.isEmpty(csrfToken)&&csrfToken!=null&&csrfToken!=undefined){x=x+"&com.eg.CSRF_NONCE="+csrfToken;}document.location=G;}else{window.history.go(-1);}}}}else{if(m!=null&&m=="LogonSimulation"){l="/final/monitor/citrixDashboard.jsp?iniName="+requestParams.iniName+"&action=loadViewData&user_name="+requestParams.user_name+"&fromMenu=true&showConfig=true&fromUED=false&dashboard_name="+requestParams.dashboard_name+"&dashboard_mapping="+requestParams.dashboard_mapping+"&view_name="+requestParams.view_name+"&fromSerComboChange="+requestParams.fromSerComboChange+"&fromServiceHomePage="+requestParams.fromServiceHomePage+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&componentType="+z+"&componentNameSearch="+J;
document.location=l;}else{if(m!=null&&m=="components"){if(!Ext.isEmpty(p)&&p!=null&&p=="zoneDashboard"){isFromMenu="";}var D="/final/servlet/com.eg.EgMonitorController?monCmd=componentList&from=TreeMenu&action="+c+"&searchIndComps=checked&view=metric&viewId=components&viewPageTitle="+w+"&viewTreeTitle=Component&componentType="+backObject.comptype+"&componentNameSearch="+J+"&fromPageView="+p+"&selectedState="+backObject.selectedState+"&stateName="+backObject.selectedState+"&parentZone="+parentZone+"&iszoneName="+iszoneName+"&filterBy="+C+"&subFilter="+iszoneName;
if(!Ext.isEmpty(isServiceBusiViewMetrics)&&isServiceBusiViewMetrics!=undefined&&isServiceBusiViewMetrics!=null){D=D+"&isServiceBusiViewMetrics="+isServiceBusiViewMetrics+"&treeFlag_SBD="+d+"&outsideService_SBD="+y+"&titleText_SBD="+n+"&selectNode_SBD="+s+"&serviceFromZone="+N+"&isEmulTrans_SBD="+k+"&serviceName="+N+"&serviceState_SBD="+serviceState_SBD+"&isServiceBusiDash="+F;
}if(!Ext.isEmpty(filterByGl)&&filterByGl!=null&&filterByGl!=undefined){D=D+"&filterBy="+filterByGl+"&subFilter="+subFilterGl;}if(H!=null&&H!="null"&&H!=""&&H!=undefined&&H!="undefined"&&H=="true"){D=D+"&fromHomepage="+H;}else{D=D+"&isFromMenu="+isFromMenu;}if(isFromZoneMenu!=null&&isFromZoneMenu!="null"&&isFromZoneMenu!=""&&isFromZoneMenu!=undefined&&isFromZoneMenu!="undefined"&&isFromZoneMenu=="true"){D=D+"&isFromZoneMenu="+isFromZoneMenu;
}document.location=D;}else{if(m!=null&&m=="layerModel"){var P="";if(g!=null&&g=="true"){P="/final/servlet/com.eg.EgMonitorController?monCmd=componentList&from=TreeMenu&action="+c+"&searchIndComps=checked&view=metric&viewId=components&viewPageTitle="+w+"&viewTreeTitle=Component&componentType="+backObject.cmpType+"&componentNameSearch="+J+"&fromPageView="+p+"&selectedState="+backObject.selectedState+"&stateName="+backObject.selectedState+"&parentZone="+parentZone+"&fromHomepage="+H+"&iszoneName="+iszoneName+"&filterBy="+C+"&subFilter="+iszoneName;
if(isFromZoneMenu!=null&&isFromZoneMenu!="null"&&isFromZoneMenu!=""&&isFromZoneMenu!=undefined&&isFromZoneMenu!="undefined"&&isFromZoneMenu=="true"){P=P+"&isFromZoneMenu="+isFromZoneMenu;}if(!Ext.isEmpty(filterByGl)&&filterByGl!=null&&filterByGl!=undefined){P=D+"&filterBy="+filterByGl+"&subFilter="+subFilterGl;
}document.location=P;return;}else{P="/final/servlet/com.eg.EgDashboardController?site=NULL&qctr=0&from=list&comptype="+encodeURI(backObject.cmpType)+"&host="+encodeURI(backObject.cmpName)+"&tab=LayerModel&fromHomepage="+H;}window.location.href=P;}else{if(segmentComponent!=null&&segmentComponent!="null"&&segmentComponent!=undefined&&segmentComponent!="undefined"&&segmentComponent=="true"&&fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=undefined&&fromHostPanel!="undefined"&&fromHostPanel=="true"){var B="/final/monitor/segmentDashboard.jsp?treeTitle=segment&selectNode="+encodeURI(t)+"&selectedParam="+r+"&currentTab=components&fromHomepage="+backObject.fromHomepage+"&treeOpen=false&isSite=false&aggregateTab="+E+"&hasTransactions=false&hasEmulatedTransactions=false&appCurrentHost="+z;
if(!Ext.isEmpty(csrfToken)&&csrfToken!=null&&csrfToken!=undefined){B=B+"&com.eg.CSRF_NONCE="+csrfToken;}document.location=B;}else{if((zoneComponent!=null&&zoneComponent!="null"&&zoneComponent!=undefined&&zoneComponent!="undefined"&&zoneComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=undefined&&fromHostPanel!="undefined"&&fromHostPanel=="true")){var x="/final/monitor/zoneDash.jsp?treeTitle=zone&selectNode="+encodeURI(t)+"&selectedParam="+r+"&currentTab=components&fromHomepage="+H+"&treeOpen=false&openNode=null&isSite=false&aggregateTab="+E+"&hasTransactions=false&hasEmulatedTransactions=false&appCurrentHost="+z;
if(!Ext.isEmpty(csrfToken)&&csrfToken!=null&&csrfToken!=undefined){x=x+"&com.eg.CSRF_NONCE="+csrfToken;}document.location=x;}else{var D="/final/servlet/com.eg.EgMonitorController?monCmd=componentList&from=TreeMenu&action="+c+"&searchIndComps=checked&view=metric&viewId=components&viewPageTitle="+w+"&viewTreeTitle=Component&componentType="+backObject.comptype+"&componentNameSearch="+J+"&fromPageView="+p+"&selectedState="+backObject.selectedState+"&stateName="+backObject.selectedState+"&parentZone="+parentZone+"&iszoneName="+iszoneName+"&filterBy="+C+"&subFilter="+iszoneName;
if(H!=null&&H!="null"&&H!=""&&H!=undefined&&H!="undefined"&&H=="true"){D=D+"&fromHomepage="+H;}else{D=D+"&isFromMenu="+isFromMenu;}if(isFromZoneMenu!=null&&isFromZoneMenu!="null"&&isFromZoneMenu!=""&&isFromZoneMenu!=undefined&&isFromZoneMenu!="undefined"&&isFromZoneMenu=="true"){D=D+"&isFromZoneMenu="+isFromZoneMenu;
}document.location=D;}}}}}}}}}else{if(segmentComponent!=null&&segmentComponent!="null"&&segmentComponent!=undefined&&segmentComponent!="undefined"&&segmentComponent=="true"&&fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=undefined&&fromHostPanel!="undefined"&&fromHostPanel=="true"){var B="/final/monitor/segmentDashboard.jsp?treeTitle=segment&selectNode="+t+"&selectedParam="+r+"&currentTab=components&fromHomepage="+backObject.fromHomepage+"&treeOpen=false&isSite=false&aggregateTab="+E+"&hasTransactions=false&hasEmulatedTransactions=false&appCurrentHost="+z;
if(!Ext.isEmpty(csrfToken)&&csrfToken!=null&&csrfToken!=undefined){B=B+"&com.eg.CSRF_NONCE="+csrfToken;}document.location=B;}else{var q="/final/servlet/com.eg.EgMonitorController?monCmd=componentList&from=TreeMenu&action="+backObject.action+"&searchIndComps=checked&view=metric&viewId=components&viewPageTitle="+backObject.viewPageTitle+"&viewTreeTitle=Component&componentType="+backObject.comptype+"&componentNameSearch="+backObject.componentNameSearch+"&fromPageView="+backObject.fromPageView+"&selectedState="+backObject.selectedState+"&stateName="+backObject.selectedState+"&isFromMenu=true&fromHomepage="+backObject.fromHomepage;
if(!Ext.isEmpty(isServiceBusiViewMetrics)&&isServiceBusiViewMetrics!=undefined&&isServiceBusiViewMetrics!=null){q=q+"&isServiceBusiViewMetrics="+isServiceBusiViewMetrics+"&treeFlag_SBD="+d+"&outsideService_SBD="+y+"&titleText_SBD="+n+"&selectNode_SBD="+s+"&serviceFromZone="+N+"&isEmulTrans_SBD="+k+"&serviceName="+N+"&serviceState_SBD="+serviceState_SBD+"&isServiceBusiDash="+F;
if(!Ext.isEmpty(filterByGl)&&filterByGl!=null&&filterByGl!=undefined){q=q+"&filterBy="+filterByGl+"&subFilter="+subFilterGl;}}document.location=q;}}}}else{if(!Ext.isEmpty(endUserOverviewParams)&&endUserOverviewParams!=null&&endUserOverviewParams!=undefined&&endUserOverviewParams.indexOf("isfromuedoverview")!=-1){window.location.href="/final/monitor/endUserDashboard.jsp?access=allusers&endUserDashOverview=true&"+endUserOverviewParams;
}else{if(!Ext.isEmpty(endUserOverviewParams)&&endUserOverviewParams!=null&&endUserOverviewParams!=undefined&&endUserOverviewParams.indexOf("=VDIESX")!=-1){if(filterParam!=undefined&&filterParam!=null&&filterParam!="null"&&filterParam!=""&&filterParam!="undefined"&&filterParam.indexOf("isFromVCDS")>-1){var b=filterParam.substring(0,filterParam.indexOf("isFromVCDS"));
window.location.href="/final/monitor/endUserDashboard.jsp?access=allusers&userType=VCDataStore&fromMenu=true&searchString="+encodeURI(searchStringVCDS)+"&"+b;}else{window.location.href="/final/monitor/endUserDashboard.jsp?access=allusers&userType=VCDataStore&fromMenu=true&searchString="+encodeURI(searchStringVCDS);
}}else{if(isFromGeo==true||isFromGeo=="true"){var l="";if(!Ext.isEmpty(view_name)&&view_name=="Overview_View"){l="/final/monitor/citrixDashboard.jsp?iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&userBased="+isUserBased+"&fromMenu=true&showConfig=true&fromUED=false&dashboard_name="+dashboard_name+"&view_name="+view_name+"&dashboard_mapping="+dashboard_mapping+"&filterName="+encodeURI(filterName)+"&filterViewName="+filterViewName+"&selectedTest="+encodeURIComponent(selectedTest)+"&selectedMeasure="+selectedMeasure+"&fromSerComboChange="+fromSerComboChange+"&filter="+filterByFlag+"&filterBy="+filterByParamFlag+"&componentNameSearch="+backObject.componentNameSearch+"&componentType="+backObject.comptype;
if(!Ext.isEmpty(fromServiceHomePage)&&fromServiceHomePage!=null&&fromServiceHomePage!=undefined&&fromServiceHomePage!="null"&&fromServiceHomePage!="undefined"){l+="&fromServiceHomePage="+fromServiceHomePage;}if(!Ext.isEmpty(fromZonePage)&&fromZonePage!=null&&fromZonePage!=undefined&&fromZonePage!="null"&&fromZonePage!="undefined"){l+="&fromZonePage="+fromZonePage;
}}else{if(fromf5!=null&&fromf5!="null"&&fromf5=="true"){if(filterViewName!=null&&filterViewName.trim().length>0&&filterViewName=="Geo_Country_View"){filterViewName="";filterName="World";}else{if(filterViewName!=null&&filterViewName.trim().length>0&&filterViewName=="Geo_Region_View"){var I=Ext.getCmp("searchFilter").getValue();
I=I.trim();countryCode=I;filterViewName="Geo_Country_View";var o=Ext.getCmp("nextSearch");var e=o.getValue();var u=Ext.getCmp("nextSubSearch").getValue();if(u!=null&&u.trim().length>0&&u.toLowerCase()!="all"){if(nextSubSearchGl!=null&&nextSubSearchGl==u){filterViewName="Geo_Region_View";filterName=e.trim()+" - "+I.trim();
}else{filterName=I.trim();}}else{filterName=I.trim();}}}}if(filterName.toLowerCase()=="all"){filterViewName="";filterName="World";}l="/final/monitor/citrixDashboard.jsp?iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&userBased="+isUserBased+"&fromMenu=true&showConfig=true&fromUED=true&dashboard_name="+dashboard_name+"&dashboard_mapping="+dashboard_mapping+"&view_name="+view_name+"&filterName="+encodeURI(filterName)+"&filterViewName="+filterViewName+"&selectedTest="+encodeURIComponent(selectedTest)+"&selectedMeasure="+selectedMeasure+"&fromSerComboChange="+fromSerComboChange+"&filter="+filterByFlag+"&filterBy="+filterByParamFlag+"&componentNameSearch="+backObject.componentNameSearch+"&componentType="+backObject.comptype;
}if(!Ext.isEmpty(countryCode)&&countryCode!=null&&countryCode!=undefined&&countryCode!="null"&&countryCode!="undefined"){if(countryCode!=null&&countryCode.indexOf("-")>-1){l+="&countryCode="+countryCode.substring(countryCode.indexOf("- ")+2);}else{l+="&countryCode="+countryCode;}}if(!Ext.isEmpty(time_line)&&time_line!=null&&time_line!=undefined&&time_line!="null"&&time_line!="undefined"){l+="&time_line="+encodeURI(time_line);
}if(!Ext.isEmpty(regionName)&&regionName!=null&&regionName!=undefined&&regionName!="null"&&regionName!="undefined"){l+="&regionName="+encodeURI(regionName);}if(!Ext.isEmpty(fromServiceHomePage)&&fromServiceHomePage!=null&&fromServiceHomePage!=undefined&&fromServiceHomePage!="null"&&fromServiceHomePage!="undefined"){l+="&fromServiceHomePage="+fromServiceHomePage;
}if(!Ext.isEmpty(fromZonePage)&&fromZonePage!=null&&fromZonePage!=undefined&&fromZonePage!="null"&&fromZonePage!="undefined"){l+="&fromZonePage="+fromZonePage;}if(backObject.uedOverviewType!=null&&backObject.uedOverviewType!=undefined&&(backObject.uedOverviewType=="OverviewAppXenApp7"||backObject.uedOverviewType=="OverviewAppVDI")){l="/final/monitor/endUserDashboard.jsp?access=allusers&user="+user_name+"&userType="+backObject.uedOverviewType+"&priority=20&orderByColumn=&isFromXenVdi=false&fromGeo=true&iniName="+iniName+"&isUserBased=true&dashboard_name="+dashboard_name+"&view_name="+view_name+"&dashboard_mapping="+dashboard_mapping+"&ginfo=&usercountval=&selectedTest="+encodeURIComponent(selectedTest)+"&selectedMeasure="+selectedMeasure+"&enableBackButton=true&filterFlag=true&detail=ComponentType&compCombo=All&filterBy="+filterByParamFlag+"&searchFilter=&nextSearch=&nextSubSearch=&fromf5="+fromf5+"&priorityFilter=&orderByColumn="+selectedMeasure+"&gatewayFilter=";
if(!Ext.isEmpty(countryCode)&&countryCode!=null&&countryCode!=undefined&&countryCode!="null"&&countryCode!="undefined"){l+="&countryCode="+countryCode;}if(!Ext.isEmpty(time_line)&&time_line!=null&&time_line!=undefined&&time_line!="null"&&time_line!="undefined"){l+="&time_line="+encodeURI(time_line);}if(!Ext.isEmpty(regionName)&&regionName!=null&&regionName!=undefined&&regionName!="null"&&regionName!="undefined"){l+="&regionName="+encodeURI(regionName);
}if(!Ext.isEmpty(fromServiceHomePage)&&fromServiceHomePage!=null&&fromServiceHomePage!=undefined&&fromServiceHomePage!="null"&&fromServiceHomePage!="undefined"){l+="&fromServiceHomePage="+fromServiceHomePage;}if(!Ext.isEmpty(fromZonePage)&&fromZonePage!=null&&fromZonePage!=undefined&&fromZonePage!="null"&&fromZonePage!="undefined"){l+="&fromZonePage="+fromZonePage;
}if(!Ext.isEmpty(usercountval)&&usercountval!=null&&usercountval!=undefined&&usercountval!="null"&&usercountval!="undefined"){l+="&usercountval="+usercountval;}window.location.href=l;}else{if(backObject.overviewType!=null&&backObject.overviewType!=undefined&&(backObject.overviewType=="OverviewAppXenApp7"||backObject.overviewType=="OverviewAppVDI")){window.history.back();
}else{window.location.href=l;}}}else{window.history.back();}}}}},loadTests:function(){var c=Ext.getCmp("displayName");if(!Ext.isEmpty(c)){c.setValue("");}var b="/final/monitor/endUserDashboardConfigJson.jsp?";var d=Ext.getCmp("AddDelete")!=null?Ext.getCmp("AddDelete").getValue().Config:"add";var a=b+"loadTest=true&addOrDelete="+d;
a=a+"&userType="+userType;Ext.Ajax.request({url:a,method:"POST",scope:this,timeout:280000,success:function(e,j){var k=e.responseText;var g=Ext.decode(k);var l=Ext.getCmp("test");if(!Ext.isEmpty(l)&&!Ext.isEmpty(g["TEST"])){l.getStore().loadRawData(g["TEST"]);l.setValue("-1");}else{l.getStore().loadRawData("");
}var h=Ext.getCmp("adgroup");if(!Ext.isEmpty(h)&&!Ext.isEmpty(g["AdGroup"])){h.getStore().loadRawData(g["AdGroup"]);}else{h.getStore().loadRawData("");}},failure:function(){}});if(d=="add"){Ext.getCmp("displayName").show();}else{Ext.getCmp("displayName").hide();}},checkFilterSession:function(g){try{var d=Ext.getCmp("searchFilter");
var h=Ext.getCmp("nextSearch");if(!Ext.isEmpty(g)&&g!=undefined&&g!=null&&g.length>0){var c=d.getStore();var j=d.getStore().data.length;if(j!=undefined&&j>0){var l=false;for(var a=0;a<j;a++){var b="";if(!Ext.isEmpty(d.getStore())&&d.getStore()!=undefined&&!Ext.isEmpty(d.getStore().getAt(a))&&d.getStore().getAt(a)!=undefined){b=d.getStore().getAt(a).get("valueField");
}if(g.indexOf(b)==-1&&(!isDetailsFromADOnly&&b!="All")){d.getStore().removeAt(a);}else{l=true;}}if(!l){d.setVisible(false);h.setVisible(false);}else{if(showKeyUser){d.setVisible(false);h.setVisible(false);}else{d.setVisible(true);h.setVisible(true);}}}}else{d.setVisible(false);h.setVisible(false);}}catch(k){console.log("error in checkFilterSession --->",k);
}},loadFilterOptionsCombo:function(){var b="/final/monitor/endUserDashboardConfigJson.jsp?";if(!showFilter){b+="loadFilterOptions=true&";}var a=b+"userType="+userType;Ext.Ajax.request({url:a,method:"POST",scope:this,timeout:280000,success:function(d,r){var v=d.responseText;var k=Ext.decode(v);if(!Ext.isEmpty(k)){var K="";
var I=Ext.getCmp("filterBy");var z=Ext.getCmp("detailCombo");if(k.Searchs!=undefined&&k.total_arr.length>0){z.getStore().loadRawData(k.total_arr);z.setValue(k.total_select);if(isOnlyVMAssigned&&userType=="VDI"){z.setVisible(false);}else{z.setVisible(true);}var s=z.getValue();if(s!=null&&s=="componentType"){if(showComFilter){I.hide();
}else{I.getStore().loadRawData(k[k.total_select]);var t=I.getStore().getAt(0).get("valueField");if(!Ext.isEmpty(filterByGl)&&filterByGl!=null&&filterByGl!="null"&&filterByGl!=undefined){t=filterByGl;}I.setValue(t);I.setVisible(true);}}else{I.getStore().loadRawData(k[k.total_select]);var t=I.getStore().getAt(0).get("valueField");
I.setValue(t);I.setVisible(true);}try{if(!Ext.isEmpty(fromf5)&&fromf5!="null"&&(fromf5=="true"||fromf5==true||fromf5)){var B=Ext.get("vdiListGrid");var C="";if(B!=null&&B!=undefined){C=B.fil_json;}if(!Ext.isEmpty(C)){var G=Ext.getCmp("detailCombo");var H=Ext.getCmp("compCombo");var I=Ext.getCmp("filterBy");
G.setValue(C.detail);I.setValue(C.filterBy);if(C.detail=="componentType"){if(I.detail!="All"){H.show();}}if(s!=null&&s=="componentType"){var h=H.getValue();var l="";var q="";if(h!=null&&h!=undefined){if(h.length==1){var j=h[0];if(j!=null&&j!=undefined&&j.indexOf(":")>-1){j=j.substring(j.indexOf(":")+1);
}l=j;}else{var j=h[0];if(j!=null&&j!=undefined&&j.indexOf(":")>-1){j=j.substring(j.indexOf(":")+1);}for(var c=0;c<h.length;c++){var J=h[c];if(J!=null&&J!=undefined&&J.indexOf(":")>-1){J=J.substring(J.indexOf(":")+1);}q+=", "+J;}l=q.substring(1);}}if(showComFilter){K+=G.getRawValue()+" - "+l+"&";}else{if(I.getValue()=="All"){K+=G.getRawValue()+" -  "+I.getRawValue()+"&";
}else{K+=G.getRawValue()+" - "+I.getRawValue()+" - "+l+"&";}}}else{K+=G.getRawValue()+" - "+I.getRawValue()+"&";}}else{K+=z.getRawValue()+" - "+I.getRawValue()+"&";}}else{K+=z.getRawValue()+" - "+I.getRawValue()+"&";}}catch(A){K+=z.getRawValue()+" - "+I.getRawValue()+"&";}}else{z.setVisible(false);I.setVisible(false);
}if(showKeyUser){I.setVisible(false);}else{I.setVisible(true);}var n=Ext.getCmp("searchFilter");if(k.Searchs!=undefined&&k.Searchs.length>1){n.getStore().loadRawData(k.Searchs);if(searchFilterGl!=null&&searchFilterGl!=undefined&&searchFilterGl!=""&&searchFilterGl!="null"){n.setValue(searchFilterGl);}else{if(defaultFilter!=null&&defaultFilter!=undefined&&defaultFilter!=""){n.setValue(defaultFilter);
}else{var p=n.getStore().getAt(0).get("valueField");n.setValue(p);}}if(k.Searchs_label!=null&&k.Searchs_label!=undefined&&k.Searchs_label!=""&&k.Searchs_label!="null"){n.setFieldLabel(k.Searchs_label);}if(showKeyUser){n.setVisible(false);}else{n.setVisible(true);}if(f){K+=" Filter By - "+n.getRawValue()+"&";
}var E=Ext.getCmp("nextSearch");if(nextSearchGl!=null&&nextSearchGl!=undefined&&nextSearchGl!=""&&nextSearchGl!="null"){E.setValue("All");if(showKeyUser){E.setVisible(false);}else{E.setVisible(true);}if(f){K+=n.getRawValue()+" - "+E.getValue()+"&";}}else{E.setValue("All");if(f){K+=n.getRawValue()+" - All &";
}if(showKeyUser){E.setVisible(false);}else{E.setVisible(true);}}}else{n.setVisible(false);}f=true;var F=Ext.getCmp("endUserView");var o=Ext.getCmp("vdiListGrid");var g=Ext.getCmp("groupCombo");var u=Ext.getCmp("adgroup");if(showKeyUser){g.setVisible(false);u.setVisible(false);}else{g.setVisible(true);
u.setVisible(true);}if(!showgroupInfo&&g.getValue()!=undefined&&(!showKeyUser)){K+="View By - "+g.getRawValue()+"&";}if(!showgroupInfo&&u.getValue()!=undefined&&u.getValue()!=""&&(!showKeyUser)){K+="AD Group - "+u.getRawValue()+"&";}var y=Ext.getBody().getViewSize().height;if(K!=""){var D=Ext.getCmp("htmlVal");
var m=K.split("&");var x=[];for(var w=0;w<m.length;w++){if(!Ext.isEmpty(m[w])){x.push({xtype:"label",html:m[w]});}}D.removeAll(true);D.add(x);Ext.getCmp("formPanel").setVisible(true);F.body.applyStyles({"padding":"0 0 0 0"});y=y-120;}else{Ext.getCmp("formPanel").setVisible(false);F.body.applyStyles({"padding":"10 0 0 0"});
y=y-70;}}},failure:function(){alert("failure");}});},loadFilterOptions:function(){var c="/final/monitor/endUserDashboardConfigJson.jsp?";if(!showFilter){c+="loadFilterOptions=true&";}var b=c+"userType="+userType;if(!Ext.isEmpty(detail)&&detail!=null&&detail!=undefined){detail=((detail=="ComponentType")||(detail=="componentType"))?"componentType":detail.toLowerCase();
b+="&detail="+detail;b+="&detailFor="+filterByGl;if(!Ext.isEmpty(compComboValues)&&compComboValues!=null&&compComboValues!=undefined&&compComboValues!="All"){var d=compComboValues.split(",");for(var a=0;a<d.length;a++){b+="&C"+a+"="+d[a];}b+="&compLen="+d.length;}}if(isFromGeo&&searchFilterGl!=null&&searchFilterGl!=undefined&&searchFilterGl!="null"&&searchFilterGl!=""&&searchFilterGl!="All"){b+="&fromGeo=true";
}Ext.Ajax.request({url:b,method:"POST",scope:this,timeout:280000,async:false,success:function(m,G){var r=m.responseText;var J=Ext.decode(r);if(!Ext.isEmpty(J)){var K=J["isEnableFilterJson"];if(K!=null&&K!=undefined){var g=J["isEnableFilterJson"].isdefaultFilter;var z=J["isEnableFilterJson"].istmpSubFilter;
var v=J["isEnableFilterJson"].istmpnextSubFilter;}var Z="";var N=Ext.getCmp("filterBy");var U=Ext.getCmp("detailCombo");var x=Ext.getCmp("compCombo");if(J.Searchs!=undefined&&J.total_arr.length>0){U.getStore().loadRawData(J.total_arr);var V=new Object();for(var ad in J.total_arr){var ae=J.total_arr[ad];
var H=ae.valueField;V[H]=J[H];}for(var ad in J.compNamesArr){var ae=J.compNamesArr[ad];V[ae]=J[ae];}thisApp.compRawData=J.compNames;U.getJson=V;U.setValue(J.total_select);if(isOnlyVMAssigned&&userType=="VDI"){U.setVisible(false);}else{U.setVisible(true);}var s=U.getValue();if(s!=null&&(s=="componentType"||s=="componenttype")&&(!showKeyUser)){if(showComFilter){if(x!=undefined&&x!=null&&J.compNamesArr!=null&&J.compNamesArr!=undefined&&J.compNamesArr!=""&&thisApp.compRawData!=undefined&&thisApp.compRawData!=null){x.getStore().loadRawData(thisApp.compRawData);
var P=x.getStore().getAt(0).get("valueField");x.setValue(P);}N.getStore().loadRawData(J[J.total_select]);var P=N.getStore().getAt(0).get("valueField");if(!Ext.isEmpty(filterByGl)&&filterByGl!=null&&filterByGl!="null"&&filterByGl!=undefined){P=filterByGl;}if(isOnlyVMAssigned&&userType=="VDI"){N.setValue("");
N.setVisible(false);x.hide();}else{N.setValue(P);N.setVisible(false);x.show();}}else{N.getStore().loadRawData(J[J.total_select]);var P=N.getStore().getAt(0).get("valueField");if(!Ext.isEmpty(filterByGl)&&filterByGl!=null&&filterByGl!="null"&&filterByGl!=undefined){P=filterByGl;}N.setValue(P);N.setVisible(true);
if(s.toLowerCase()=="componenttype"&&N.getValue()!="All"&&!Ext.isEmpty(thisApp.compRawData)){x.getStore().loadRawData(thisApp.compRawData);var P=x.getStore().getAt(0).get("valueField");x.setValue(P);Ext.getCmp("compmultipane").setVisible(true);}}if(isFromGeo&&!showVdiHostCombo){var h=Ext.getCmp("vdiTypeCombo");
h.show();var w=J["compNamesSelected"];var j="";var k="";var l="";if(!Ext.isEmpty(w)&&w!=null&&w!=undefined){if(w.length==1){var L=w[0];l=L;if(L!=null&&L!=undefined&&L.indexOf(":")>-1){L=L.substring(L.indexOf(":")+1);}var E=false;if(L!=null&&L!=undefined&&L.indexOf(":")>-1){var t=L.substring(L.indexOf(":")+1);
if(t!=null&&t.toLowerCase()!="null"&&t!=undefined&&t!="undefined"){E=true;}}if(L!=null&&L!=undefined&&L.indexOf(":")>-1&&!E){L=L.substring(0,L.indexOf(":"));}j=L;}else{var L=w[0];if(L!=null&&L!=undefined&&L.indexOf(":")>-1){L=L.substring(L.indexOf(":")+1);}for(var W=0;W<w.length;W++){var q=w[W];l+=q+",";
if(q!=null&&q!=undefined&&q.indexOf(":")>-1){q=q.substring(q.indexOf(":")+1);}if(q!=null&&q!=undefined&&q.indexOf(":")>-1){q=q.substring(0,q.indexOf(":"));}k+=", "+q;}j=k.substring(1);}if(showComFilter){if(j.indexOf(",")>-1){Z+="Component(s) - "+j+"&";}else{if(ab.getValue().toLowerCase()=="componenttype"){Z+="Component - "+j+"&";
}else{Z+=ab.getRawValue()+" - "+j+"&";}}}else{if(N.getValue()=="All"){Z+="Component Type - "+N.getRawValue()+"&";}else{if(j!="All"){Z+="Component(s) - "+N.getRawValue()+" - "+j+"&";}else{Z+="Component Type - "+N.getRawValue()+"&";}}}x.setValue(l);}}else{var w=J["compNamesSelected"];if(compComboArray!=null&&compComboArray!=undefined&&compComboArray.length>0){w=compComboArray;
}var j="";var k="";var l="";if(!Ext.isEmpty(w)&&w!=null&&w!=undefined){if(w.length==1){var L=w[0];l=L;if(L!=null&&L!=undefined&&L.indexOf(":")>-1){L=L.substring(L.indexOf(":")+1);}var E=false;if(L!=null&&L!=undefined&&L.indexOf(":")>-1){var t=L.substring(L.indexOf(":")+1);if(t!=null&&t.toLowerCase()!="null"&&t!=undefined&&t!="undefined"){E=true;
}}if(L!=null&&L!=undefined&&L.indexOf(":")>-1&&!E){L=L.substring(0,L.indexOf(":"));}if(L!=null&&L!="null"&&L!=undefined&&L!="undefined"){j=L;}else{j="All";l=j;}}else{var L=w[0];if(L!=null&&L!=undefined&&L.indexOf(":")>-1){L=L.substring(L.indexOf(":")+1);}var E=false;if(L!=null&&L!=undefined&&L.indexOf(":")>-1){var t=L.substring(L.indexOf(":")+1);
if(t!=null&&t.toLowerCase()!="null"&&t!=undefined&&t!="undefined"){E=true;}}if(L!=null&&L!=undefined&&L.indexOf(":")>-1&&!E){L=L.substring(0,L.indexOf(":"));}if(L!=null&&L!="null"&&L!=undefined&&L!="undefined"){L=L;}else{L="All";}for(var W=0;W<w.length;W++){var q=w[W];if(q!=null&&q!=undefined&&q.indexOf(":")>-1){q=q.substring(q.indexOf(":")+1);
}if(q!=null&&q!=undefined&&q.indexOf(":")>-1){q=q.substring(0,q.indexOf(":"));}if(q!=null&&q!="null"&&q!=undefined&&q!="undefined"){q=q;}else{q="All";}l+=q+",";k+=", "+q;}j=k.substring(1);}if(showComFilter){if(!Ext.isEmpty(j)){if(j.indexOf(",")>-1){Z+="Component(s) - "+j+"&";}else{if(s.toLowerCase()=="componenttype"){Z+="Component - "+j+"&";
}else{Z+=s+" - "+j+"&";}}}}else{var D=N.getRawValue();if(!Ext.isEmpty(D)&&D=="All"){Z+="Component Type - All&";}else{if(!Ext.isEmpty(D)&&D!="null"){if(!Ext.isEmpty(U.getValue())&&U.getValue()=="componentType"){if(!Ext.isEmpty(j)&&j!="All"){Z+="Component(s) - "+D+" - "+j+"&";}else{Z+="Component Type - "+D+"&";
}}else{Z+=U.getValue()+" - "+D+" - "+j+"&";}}else{Z+=U.getValue()+" - All&";}}}x.setValue(l);}}}else{N.getStore().loadRawData(J[J.total_select]);var P=J.detailFor;if(Ext.isEmpty(P)||P==null||P==undefined){P=N.getStore().getAt(0).get("valueField");}if(!Ext.isEmpty(filterByGl)&&filterByGl!=null&&filterByGl!="null"&&filterByGl!=undefined){P=filterByGl;
}N.setValue(P);if(showKeyUser){N.setVisible(false);}else{N.setVisible(true);}Ext.getCmp("compmultipane").setVisible(false);}try{if(!Ext.isEmpty(fromf5)&&fromf5!="null"&&fromf5=="true"&&(!showKeyUser)){var y=Ext.get("vdiListGrid");var Q="";if(y!=null&&y!=undefined){Q=y.fil_json;}if(!Ext.isEmpty(Q)){var ab=Ext.getCmp("detailCombo");
var x=Ext.getCmp("compCombo");var N=Ext.getCmp("filterBy");ab.setValue(Q.detail);N.setValue(Q.filterBy);if(Q.detail=="componentType"){if(N.detail!="All"){x.show();}}if(s!=null&&s=="componentType"){var O=x.getValue();if(!Ext.isEmpty(compComboArray)){O=compComboArray;}var j="";var k="";if(O!=null&&O!=undefined&&O!="All"&&O!=""){if(O.length==1){var L=O[0];
if(L!=null&&L!=undefined&&L.indexOf(":")>-1){L=L.substring(L.indexOf(":")+1);}j=L;}else{var L=O[0];if(L!=null&&L!=undefined&&L.indexOf(":")>-1){L=L.substring(L.indexOf(":")+1);}for(var W=0;W<O.length;W++){var q=O[W];if(q!=null&&q!=undefined&&q.indexOf(":")>-1){q=q.substring(q.indexOf(":")+1);}k+=",  "+q;
}j=k.substring(1);}}if(showComFilter){if(!Ext.isEmpty(j)){if(Z.indexOf("Component")==-1){if(j.indexOf(",")>-1){Z+="Component(s) - "+j+"&";}else{Z+="Component - "+j+"&";}}}}else{if(N.getValue()=="All"){Z+="Component Type - "+N.getRawValue()+"&";}else{if(!Ext.isEmpty(N.getRawValue())&&j!="All"){Z+=ab.getRawValue()+" - "+N.getRawValue()+" - "+j+"&";
}else{Z+="Component Type - "+N.getRawValue()+"&";}}}}else{Z+=ab.getRawValue()+" - "+N.getRawValue()+"&";}}else{Z+=U.getRawValue()+" - "+N.getRawValue()+"&";}}else{if(Z==""&&(!showKeyUser)){if(!Ext.isEmpty(U.getRawValue())&&!Ext.isEmpty(N.getRawValue())){if(showComFilter){if(U.getValue().toLowerCase()=="componenttype"){Z+="Component - "+N.getRawValue()+"&";
}else{Z+=U.getRawValue()+" - "+N.getRawValue()+"&";}}else{if(U.getValue().toLowerCase()=="componenttype"){Z+="ComponentType - "+N.getRawValue()+"&";}else{Z+=U.getRawValue()+" - "+N.getRawValue()+"&";}}}}}}catch(aa){Z+=U.getRawValue()+" - "+N.getRawValue()+"&";}}else{U.setVisible(false);N.setVisible(false);
}var Y=Ext.getCmp("searchFilter");if((g||z||v)&&J.Searchs!=undefined&&J.Searchs.length>1&&Y.isVisible()&&(!showKeyUser)){f=true;Y.getStore().loadRawData(J.Searchs);if(searchFilterGl!=null&&searchFilterGl!=undefined&&searchFilterGl!=""&&searchFilterGl!="null"){Y.setValue(searchFilterGl);}else{if(isDetailsFromADOnly&&defaultFilter!=null&&defaultFilter!=undefined&&defaultFilter!=""){Y.setValue(defaultFilter);
}else{var M=Y.getStore().getAt(0).get("valueField");Y.setValue(M);}}if(f){if(J.Searchs_label!=null&&J.Searchs_label!=undefined&&J.Searchs_label!=""&&J.Searchs_label!="null"){if(!Ext.isEmpty(Y.getRawValue())&&Y.getRawValue()!="-"){Z+=J.Searchs_label+" - "+Y.getRawValue()+"&";}}else{Z+="Filter By - "+Y.getRawValue()+"&";
}}var ac=Ext.getCmp("nextSearch");if(z&&Y.getValue()!="All"){if(!isFromGeo&&!isDetailsFromADOnly&&J["Searchs_SubFilterlabel1"]!=null&&J["Searchs_SubFilterlabel1"]!=undefined&&J["Searchs_SubFilterlabel1"]!=""&&J["Searchs_SubFilterlabel1"]!="null"){if(nextSearchGl==null||nextSearchGl==undefined||nextSearchGl==""||nextSearchGl=="null"){nextSearchGl="All";
}if(f){Z+=J["Searchs_SubFilterlabel1"]+" - "+nextSearchGl+"&";}if(ac.getValue()!=nextSearchGl){ac.setValue(nextSearchGl);ac.setVisible(true);}}else{if(nextSearchGl!=null&&nextSearchGl!=undefined&&nextSearchGl!=""&&nextSearchGl!="null"){ac.setValue(nextSearchGl);ac.setVisible(true);var S=isDetailsFromADOnly?Y.getRawValue():J["Searchs_SubFilterlabel1"];
if(f){Z+=S+" - "+ac.getValue()+"&";}}else{if(f&&isDetailsFromADOnly){Z+=Y.getRawValue()+" - All &";}z=false;}}}var p=Ext.getCmp("nextSubSearch");if(v&&!isDetailsFromADOnly&&(ac.getValue()!="All"||(nextSearchGl!=null&&nextSearchGl!="null"&&nextSearchGl!="All"))){if(!isFromGeo&&!isDetailsFromADOnly&&J["Searchs_SubFilterlabel2"]!=null&&J["Searchs_SubFilterlabel2"]!=undefined&&J["Searchs_SubFilterlabel2"]!=""&&J["Searchs_SubFilterlabel2"]!="null"){if(nextSubSearchGl==null||nextSubSearchGl==undefined||nextSubSearchGl==""||nextSubSearchGl=="null"){nextSubSearchGl="All";
}if(f){Z+=J["Searchs_SubFilterlabel2"]+" - "+nextSubSearchGl+"&";}if(p.getValue()!=nextSubSearchGl){p.setValue(nextSubSearchGl);p.setVisible(true);}}else{if(nextSubSearchGl!=null&&nextSubSearchGl!=undefined&&nextSubSearchGl!=""&&nextSubSearchGl!="null"){p.setValue(nextSubSearchGl);if(showKeyUser){p.setVisible(false);
}else{p.setVisible(true);}if(f){Z+=J["Searchs_SubFilterlabel2"]+" - "+p.getValue()+"&";}}else{if(f&&isDetailsFromADOnly){Z+=ac.getRawValue()+" - All &";}v=false;}}}}else{Y.setVisible(false);g=false;z=false;v=false;}f=true;if(g){if(!Ext.isEmpty(Y)&&Y.getValue()!="null"){if(showKeyUser){Ext.getCmp("searchFilter").hide();
}else{Ext.getCmp("searchFilter").show();}}}else{Ext.getCmp("searchFilter").hide();}if(z){if(!Ext.isEmpty(Y)&&Y.getValue()!="All"&&Y.getValue()!="null"){if(showKeyUser){Ext.getCmp("nextSearch").hide();}else{Ext.getCmp("nextSearch").show();}}}else{Ext.getCmp("nextSearch").hide();}if(v){if(!Ext.isEmpty(Y)&&Y.getValue()!="All"&&Y.getValue()!="null"){if(showKeyUser){Ext.getCmp("nextSubSearch").hide();
}else{Ext.getCmp("nextSubSearch").show();}}}else{Ext.getCmp("nextSubSearch").hide();}var I=Ext.getCmp("priorityFilter");if(!Ext.isEmpty(I)&&I!=undefined&&I!=null){if(J.priorities!=undefined&&J.priorities.length>1){f=true;I.getStore().loadRawData(J.priorities);if(priorityFilterGl!=null&&priorityFilterGl!=undefined&&priorityFilterGl!=""&&priorityFilterGl!="null"){I.setValue(priorityFilterGl);
}I.setVisible(true);if(f){Z+=priority+" - "+I.getRawValue()+"&";}}else{I.setVisible(false);}}else{I.setVisible(false);}var T=Ext.getCmp("gatewayFilter");if(isGateway&&!Ext.isEmpty(T)&&T!=undefined&&T!=null){if(J.gateways!=undefined&&J.gateways.length>1){f=true;T.getStore().loadRawData(J.gateways);if(gatewayFilterGl!=null&&gatewayFilterGl!=undefined&&gatewayFilterGl!=""&&gatewayFilterGl!="null"){T.setValue(gatewayFilterGl);
}T.setVisible(true);if(f){Z+=gateway+" - "+T.getRawValue()+"&";}}else{T.setVisible(false);}}else{T.setVisible(false);}var u=Ext.getCmp("endUserView");var n=Ext.getCmp("vdiListGrid");var C=Ext.getCmp("groupCombo");var F=Ext.getCmp("adgroup");if(showKeyUser){C.setVisible(false);F.setVisible(false);}else{C.setVisible(true);
if(!Ext.isEmpty(C.getRawValue())&&C.getRawValue()=="User"){F.setVisible(false);}else{F.setVisible(true);}}if(!showgroupInfo&&C.getValue()!=undefined&&(!showKeyUser)){Z+="View By - "+C.getRawValue()+"&";}if(!showgroupInfo&&F.getValue()!=undefined&&F.getValue()!=""&&(!showKeyUser)){Z+="AD Group - "+F.getRawValue()+"&";
}var B=Ext.getBody().getViewSize().height;if(Z!=""){var R=Ext.getCmp("htmlVal");var A=Z.split("&");var o=[];for(var X=0;X<A.length;X++){if(!Ext.isEmpty(A[X])){o.push({xtype:"label",html:A[X]});}}R.removeAll(true);R.add(o);Ext.getCmp("formPanel").setVisible(true);u.body.applyStyles({"padding":"0 0 0 0"});
B=B-120;}else{Ext.getCmp("formPanel").setVisible(false);u.body.applyStyles({"padding":"10 0 0 0"});B=B-70;}}},failure:function(){alert("failure");}});},loadRelatedInfos:function(e,d,g,a){var c="/final/monitor/endUserDashboardConfigJson.jsp?";var b=c+"loadFilterOptions=true&userType="+userType+"&loadRelatedInfo="+d+"&loadRelatedSubInfo="+g;
if(isFromGeo&&searchFilterGl!=null&&searchFilterGl!=undefined&&searchFilterGl!="null"&&searchFilterGl!=""&&searchFilterGl!="All"){b=b+"&fromGeo=true&iniName="+iniName+"&user_name="+user_name+"&isUserBased="+isUserBased+"&dashboard_name="+dashboard_name+"&view_name="+view_name+"&dashboard_mapping="+dashboard_mapping+"&time_line="+time_line+"&ginfo="+geoInfo+"&fromServiceHomePage="+fromServiceHomePage+"&fromZonePage="+fromZonePage;
}Ext.Ajax.request({url:b,method:"POST",scope:this,timeout:280000,success:function(j,u){var B=j.responseText;var n=Ext.decode(B);var q=Ext.getCmp("searchFilter");var F=Ext.getCmp("priorityFilter");var o=Ext.getCmp("gatewayFilter");var l=n["isEnableFilterJson"];var r=n["EnableADGroup"];if(r==null||r==undefined){r=n["enableAdGroup"];
}if(l!=null&&l!=undefined){var s=n["isEnableFilterJson"].isdefaultFilter;var m=n["isEnableFilterJson"].istmpSubFilter;var x=n["isEnableFilterJson"].istmpnextSubFilter;}if(!Ext.isEmpty(n)&&!Ext.isEmpty(n["otherInfos"])){var E=Ext.getCmp("nextSearch");if(!Ext.isEmpty(q)&&q.getValue()!="All"){E.getStore().loadRawData(n["otherInfos"]);
var y=E.getStore().getAt(0).get("valueField");var w=false;if(!Ext.isEmpty(E)&&E!=null&&E!=undefined&&E!="undefined"){w=true;}if(g!=undefined&&g!=null&&g!=""){E.setValue(g);}else{if((g==undefined||g==null||g=="")&&nextSearchGl!=undefined&&nextSearchGl!=null&&nextSearchGl!=""&&nextSearchGl!="All"&&((E.getStore()).findRecord("valueField",nextSearchGl)!=null)){E.setValue(nextSearchGl);
}else{E.setValue(y);}}if(showKeyUser){E.setVisible(false);}else{E.setVisible(true);}if(!isDetailsFromADOnly&&n["Searchs_SubFilterlabel1"]!=null&&n["Searchs_SubFilterlabel1"]!=undefined&&n["Searchs_SubFilterlabel1"]!=""&&n["Searchs_SubFilterlabel1"]!="null"){E.setFieldLabel(n["Searchs_SubFilterlabel1"]);
}else{if((!Ext.isEmpty(q)&&q!=null&&q!=undefined)&&(!Ext.isEmpty(q.getRawValue())&&q.getRawValue()!=null&&q.getRawValue()!=undefined)){E.setFieldLabel(q.getRawValue());}else{E.setFieldLabel(d);}}if(showKeyUser){q.setVisible(false);}else{q.setVisible(true);}}else{E.setValue("All");if(showKeyUser){E.setVisible(false);
q.setVisible(false);}else{E.setVisible(true);q.setVisible(true);}}if(!isDetailsFromADOnly&&!Ext.isEmpty(E)&&E.getValue()!="All"&&!Ext.isEmpty(n["otherSubInfos"])){var A=Ext.getCmp("nextSubSearch");A.getStore().loadRawData(n["otherSubInfos"]);var y=A.getStore().getAt(0).get("valueField");var w=false;if(!Ext.isEmpty(A)&&A!=null&&A!=undefined&&A!="undefined"){w=true;
}if(a!=undefined&&a!=null&&a!=""){A.setValue(a);}else{A.setValue(y);}if(showKeyUser){A.setVisible(false);}else{A.setVisible(true);}if(!isDetailsFromADOnly&&n["Searchs_SubFilterlabel2"]!=null&&n["Searchs_SubFilterlabel2"]!=undefined&&n["Searchs_SubFilterlabel2"]!=""&&n["Searchs_SubFilterlabel2"]!="null"){A.setFieldLabel(n["Searchs_SubFilterlabel2"]);
}else{if((!Ext.isEmpty(E)&&E!=null&&E!=undefined)&&(!Ext.isEmpty(E.getRawValue())&&E.getRawValue()!=null&&E.getRawValue()!=undefined)){A.setFieldLabel(E.getRawValue());}else{A.setFieldLabel(d);}}}else{if(!isDetailsFromADOnly){var A=Ext.getCmp("nextSubSearch");if((!Ext.isEmpty(A)&&A!=null&&A!=undefined)&&(!Ext.isEmpty(n["otherSubInfos"])&&n["otherSubInfos"]!=null&&n["otherSubInfos"]!=undefined)){A.getStore().loadRawData(n["otherSubInfos"]);
}var h=n["Searchs_SubFilterlabel2"];if(!Ext.isEmpty(h)&&h!=null&&h!=undefined){A.setFieldLabel(h);}A.setValue("All");A.setVisible(false);}else{var A=Ext.getCmp("nextSubSearch");if(!Ext.isEmpty(A)&&A!=null&&A!=undefined){A.setVisible(false);}}}}else{s=false;m=false;x=false;var E=Ext.getCmp("nextSearch");
var C="";if(!Ext.isEmpty(E)&&E!=null&&E!=undefined){C=E.getValue();}if(!Ext.isEmpty(C)&&C!=null&&C!=undefined){E.setValue(C);E.setVisible(false);}else{E.setValue("All");E.setVisible(false);}if(q.isVisible()){var p="";if(!Ext.isEmpty(q)&&q!=null&&q!=undefined){p=q.getValue();}if(!Ext.isEmpty(p)&&p!=null&&p!=undefined){q.setValue(p);
}else{if(q.getStore().data.length>0){var t=q.getStore().getAt(0).get("valueField");q.setValue(t);}}}var G=Ext.getCmp("filterBy");var D=Ext.getCmp("detailCombo");if(!Ext.isEmpty(n.total_arr)&&n.total_arr.length>0){var v=D.getValue();if(v!=null&&v=="componentType"){D.getStore().loadRawData(n.total_arr);
D.setValue(n.total_select);if(showKeyUser||(isOnlyVMAssigned&&userType=="VDI")){D.setVisible(false);}else{D.setVisible(true);}if(showComFilter){G.hide();}else{var H="";if(!Ext.isEmpty(G)&&G!=undefined&&G!=null){H=G.getValue();}if(!Ext.isEmpty(H)&&H!=undefined&&H!=null&&H=="All"){G.getStore().loadRawData(n[n.total_select]);
var y=G.getStore().getAt(0).get("valueField");G.setValue(y);if(showKeyUser){G.setVisible(false);}else{G.setVisible(true);}}else{G.setValue(H);if(showKeyUser){G.setVisible(false);}else{G.setVisible(true);}}}}else{G.getStore().loadRawData(D.getJson[D.getValue()]);var y=G.getStore().getAt(0).get("valueField");
if(detailComboValue!=null&&detailComboValue!="null"&&detailComboValue==D.getValue()&&filterByValue!=null&&filterByValue!="null"&&filterByValue!=""){G.setValue(filterByValue);}else{G.setValue(y);}if(showKeyUser){G.setVisible(false);}else{G.setVisible(true);}}}}var k=Ext.getCmp("groupCombo");var z=Ext.getCmp("adgroup");
if(!r){if((!Ext.isEmpty(k)&&k!=undefined)&&(!Ext.isEmpty(z)&&z!=undefined)){k.setVisible(false);z.setVisible(false);}}else{if(Ext.isEmpty(z.getValue())||z.getValue()==""){z.setVisible(false);}}if(s){if(!Ext.isEmpty(q)&&q.isVisible()){if(showKeyUser){Ext.getCmp("searchFilter").hide();}else{Ext.getCmp("searchFilter").show();
}}}else{Ext.getCmp("searchFilter").hide();}if(m){if(!Ext.isEmpty(q)&&q.getValue()!="All"&&q.isVisible()){if(showKeyUser){Ext.getCmp("nextSearch").hide();}else{Ext.getCmp("nextSearch").show();}}}else{Ext.getCmp("nextSearch").hide();}if(x){if(!Ext.isEmpty(q)&&q.getValue()!="All"&&(!isDetailsFromADOnly)&&q.isVisible()){if(showKeyUser){Ext.getCmp("nextSubSearch").hide();
}else{Ext.getCmp("nextSubSearch").show();}}}else{Ext.getCmp("nextSubSearch").hide();}if(!Ext.isEmpty(n)&&!Ext.isEmpty(n["priorities"])){if(!Ext.isEmpty(F)&&F!=null&&F!=undefined){F.getStore().loadRawData(n["priorities"]);}}if(!Ext.isEmpty(n)&&!Ext.isEmpty(n["gateways"])){if(isGateway&&!Ext.isEmpty(o)&&o!=null&&o!=undefined){o.getStore().loadRawData(n["gateways"]);
}}},failure:function(){var k=Ext.getCmp("nextSearch");k.setVisible(false);var j=Ext.getCmp("searchFilter");var h=j.getStore().getAt(0).get("valueField");j.setValue(h);}});},loadMeasureForTest:function(){var c=Ext.getCmp("AddDelete").getValue().Config;var d=Ext.getCmp("test").getValue();var b="/final/monitor/endUserDashboardConfigJson.jsp?";
var a=b+"loadMeasure=true&addOrDelete="+c+"&test="+d;a=a+"&userType="+userType;Ext.Ajax.request({url:a,method:"POST",scope:this,timeout:280000,success:function(e,h){var j=e.responseText;var g=Ext.decode(j);var k=Ext.getCmp("measure");k.getStore().loadRawData(g["MEASURE"]);k.setValue("-1");},failure:function(){}});
},loadMeasureDisplay:function(){var c=Ext.getCmp("measure");if(!Ext.isEmpty(c)){var e=c.getRawValue();var b=c.getValue();var d=Ext.getCmp("AddDelete").getValue().Config;if(d!="delete"){var a=Ext.getCmp("displayName");if(!Ext.isEmpty(e)&&b!="-1"){if(!Ext.isEmpty(a)){a.setValue(e);}}else{if(!Ext.isEmpty(b)&&b=="-1"){if(!Ext.isEmpty(a)){a.setValue("");
}}}}}},updateConfiguration:function(){var d=Ext.getCmp("settingsLimitCombo")!=null?Ext.getCmp("settingsLimitCombo").getValue():"";var k=Ext.getCmp("refreshFreq")!=null?Ext.getCmp("refreshFreq").getValue():"";var c=Ext.getCmp("AddDelete").getValue().Config;var h=Ext.getCmp("test").getValue();var b=Ext.getCmp("measure").getValue();
var j=Ext.getCmp("displayName").getValue();var e=true;var g=parseInt(k);if(isNaN(g)||g==null||g<=0){Ext.Msg.alert("Error",freqError);e=false;}if(h!="-1"){if(b=="-1"){Ext.Msg.alert("Error",measureError);e=false;}else{if(c=="add"&&h!="-1"&&j==""){Ext.Msg.alert("Error",displayNameError);e=false;}}}if(e){var a="/final/monitor/endUserDashboardConfigJson.jsp?isUpdate=true&addOrDelete="+c+"&test="+h+"&measure="+b+"&displayName="+j+"&limit="+d+"&refreshFreq="+k;
a=a+"&userType="+userType;Ext.Ajax.request({url:a,method:"POST",scope:this,timeout:280000,success:function(l,n){var o=l.responseText;var m=Ext.decode(o);if(m["UPDATE"]=="FAILED"){Ext.Msg.alert("Error",UpdateError);}if(m["UPDATE"]=="SUCCESS"){this.reloadListPage(d);}},failure:function(){}});}},updateUserAssociateConfiguration:function(){var a=Ext.getCmp("associateshowHidePanels");
var e="/final/monitor/endUserDashboardConfigJson.jsp?isUpdateUser=true";e=e+"&userType="+userType;var c=a.getValue();var g="";if(!Ext.isEmpty(c)&&c.length>0){for(i=0;i<c.length;i++){if(i!=0){g+=",";}g+=c[i];}}e=e+"&enabledUsers="+encodeURI(g);if(hidePanelLog!=null&&hidePanelLog!=undefined&&hidePanelLog.length>0){var b="";
for(var h=0;h<hidePanelLog.length;h++){b=b+hidePanelLog[h];if(h+1!=hidePanelLog.length){b=b+",";}}e=e+"&hidePanelLog="+encodeURI(parent.filterEncode(b));}if(showPanelLog!=null&&showPanelLog!=undefined&&showPanelLog.length>0){var d="";for(var h=0;h<showPanelLog.length;h++){d=d+showPanelLog[h];if(h+1!=showPanelLog.length){d=d+",";
}}e=e+"&showPanelLog="+encodeURI(parent.filterEncode(d));}Ext.Ajax.request({url:e,method:"POST",scope:this,timeout:280000,success:function(j,l){var m=j.responseText;var k=Ext.decode(m);if(k["UPDATE"]=="FAILED"){Ext.Msg.alert("Error",UpdateError);}if(k["UPDATE"]=="SUCCESS"){if(associateUsersWindow!=undefined&&associateUsersWindow!=null){associateUsersWindow.setVisible(false);
}this.refreshThisPage("updateUserAssociate");}},failure:function(){console.log("------failure-----");}});},reloadListPage:function(l){var c="/final/monitor/endUserDashboard.jsp?access=allusers";var k=Ext.getCmp("searchString")!=null?Ext.getCmp("searchString").value:"";var s=(l==null||l==undefined||l=="")?(Ext.getCmp("limitCombo")!=null?Ext.getCmp("limitCombo").value:""):l;
var d=Ext.getCmp("vdiTypeCombo")!=null?Ext.getCmp("vdiTypeCombo").value:"";if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){if(defaultDispLimit!=null&&defaultDispLimit!=undefined&&defaultDispLimit!=""){s=defaultDispLimit;}if(defaultVdiType!=null&&defaultVdiType!=undefined&&defaultVdiType!=""){d=defaultVdiType;
}}var g=userType;try{var u=Ext.getCmp("vdiTypeCombo");if(!Ext.isEmpty(u)&&!Ext.isEmpty(u.getValue())&&u.getValue()!=""){var m=u.getValue();var h=u.findRecord(u.valueField||u.displayField,m);var j=u.store.indexOf(h);g=u.getStore().getAt(j).get("usertype");if(Ext.isEmpty(g)){g=userType;}}}catch(r){}if(k!=null&&k!="null"&&k!=""&&k!="undefined"){c=c+"&searchString="+k;
}if(s!=null&&s!="null"&&s!=""&&s!="undefined"){c=c+"&priority="+s;}if(d!=null&&d!="null"&&d!=""&&d!="undefined"){c=c+"&vdiType="+d;}if(currOrderByColumn!=null&&currOrderByColumn!=undefined&&currOrderByColumn!="null"&&currOrderByColumn!=""&&currOrderByColumn!="undefined"){c=c+"&orderByColumn="+currOrderByColumn;
}if(currOrderBy!=null&&currOrderBy!=undefined&&currOrderBy!="null"&&currOrderBy!=""&&currOrderBy!="undefined"){c=c+"&orderBy="+currOrderBy;}if(currColumnType!=null&&currColumnType!=undefined&&currColumnType!=""){c=c+"&columnType="+currColumnType;}if(currColumndispName!=null&&currColumndispName!="null"&&currColumndispName!=""&&currColumndispName!="undefined"){c=c+"&columnDispName="+currColumndispName;
}if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){c=c+"&fromctx="+fromctx;}if(!Ext.isEmpty(isServiceBusiViewMetrics)&&isServiceBusiViewMetrics!=null&&isServiceBusiViewMetrics!=undefined&&(isServiceBusiViewMetrics=="true"||isServiceBusiViewMetrics==true)){c=c+"&isServiceBusiViewMetrics="+isServiceBusiViewMetrics;
}c=c+"&userType="+g;if(isFromMenu){c=c+"&fromMenu=true";}if(showKeyUser){c=c+"&showKeyUser=true";if(updateUserAssociateFlag){c=c+"&updateUserAssociate=true";}}var a=Ext.getCmp("groupCombo");var o=Ext.getCmp("adgroup");if(a!=undefined&&a!=null&&o!=undefined&&o!=null){var p=a.getValue();if(p=="ad_group"){var b=o.getValue();
if(b!=null&b!=undefined){b=b.replace(/=/g,"|eq|");b=b.replace(/,/g,"|comma|");}c=c+"&aduserFilter="+encodeURIComponent(b);}}if(filterParam!=null&&filterParam!="null"&&filterParam!=""&&filterParam!=undefined){c=c+"&"+filterParam;}userUrl=c;var q=Ext.getCmp("endUserDashboardViewPort");if(q!=null){var n=q.items.items;
for(var t=0;t<n.length;t++){n[t].destroy();}}window.document.location=c;},refreshListPage:function(){var b="/final/monitor/endUserDashboard.jsp?access=allusers";var s=Ext.getCmp("searchString")!=null?Ext.getCmp("searchString").value:"";var r=Ext.getCmp("adtnlSearchString")!=null?Ext.getCmp("adtnlSearchString").value:"";
var g=Ext.getCmp("limitCombo")!=null?Ext.getCmp("limitCombo").value:"";var o=Ext.getCmp("vdiTypeCombo")!=null?Ext.getCmp("vdiTypeCombo").value:"";if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){if(defaultDispLimit!=null&&defaultDispLimit!=undefined&&defaultDispLimit!=""){g=defaultDispLimit;
}if(defaultVdiType!=null&&defaultVdiType!=undefined&&defaultVdiType!=""){o=defaultVdiType;}}var j=userType;try{var k=Ext.getCmp("vdiTypeCombo");if(!Ext.isEmpty(k)&&!Ext.isEmpty(k.getValue())&&k.getValue()!=""){var q=k.getValue();var a=k.findRecord(k.valueField||k.displayField,q);var p=k.store.indexOf(a);
j=k.getStore().getAt(p).get("usertype");if(Ext.isEmpty(j)){j=userType;}}}catch(n){}if(userType!=null&&userType!=undefined&&userType=="VDIESX"&&s!=null&&s!=undefined&&s!=""){return;}if(s!=null&&s!="null"&&s!=""&&s!="undefined"){b=b+"&searchString="+s;}if(!Ext.isEmpty(r)&&r!=null&&r!="null"&&r!=""&&r!="undefined"){b=b+"&adtnlSearchStr="+r;
}if(g!=null&&g!="null"&&g!=""&&g!="undefined"){b=b+"&priority="+g;}if(o!=null&&o!="null"&&o!=""&&o!="undefined"){b=b+"&vdiType="+o;}if(currOrderByColumn!=null&&currOrderByColumn!=undefined&&currOrderByColumn!="null"&&currOrderByColumn!=""&&currOrderByColumn!="undefined"){b=b+"&orderByColumn="+currOrderByColumn;
}if(currOrderBy!=null&&currOrderBy!=undefined&&currOrderBy!="null"&&currOrderBy!=""&&currOrderBy!="undefined"){b=b+"&orderBy="+currOrderBy;}if(currColumnType!=null&&currColumnType!="null"&&currColumnType!=""&&currColumnType!="undefined"){b=b+"&columnType="+currColumnType;}if(currColumndispName!=null&&currColumndispName!="null"&&currColumndispName!=""&&currColumndispName!="undefined"){b=b+"&columnDispName="+currColumndispName;
}if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){b=b+"&fromctx="+fromctx;}if(fromMetricView!=null&&fromMetricView!="null"&&fromMetricView!=""&&fromMetricView!="undefined"){b=b+"&fromMetricView="+fromMetricView;}b=b+"&userType="+j;if(isFromMenu){b=b+"&fromMenu=true";}if(endUserOverviewFlag){b=b+"&endUserDashOverview="+endUserOverviewFlag;
}if(!Ext.isEmpty(enableBackButton)&&enableBackButton!=null&&enableBackButton!=undefined&&(enableBackButton=="true"||enableBackButton==true)){b=b+"&enableBackButton="+enableBackButton;}if(!Ext.isEmpty(isFromUEDOverview)&&isFromUEDOverview!=null&&isFromUEDOverview!=undefined&&(isFromUEDOverview=="true"||isFromUEDOverview==true)){b=b+"&isfromuedoverview="+isFromUEDOverview;
}if(!Ext.isEmpty(isfromuedsort)&&isfromuedsort!=null&&isfromuedsort!=undefined&&(isfromuedsort=="true"||isfromuedsort==true)){b=b+"&isfromuedsort="+isfromuedsort;}if(!Ext.isEmpty(isServiceBusiViewMetrics)&&isServiceBusiViewMetrics!=null&&isServiceBusiViewMetrics!=undefined&&(isServiceBusiViewMetrics=="true"||isServiceBusiViewMetrics==true)){b=b+"&isServiceBusiViewMetrics="+isServiceBusiViewMetrics;
}var d=Ext.getCmp("groupCombo");var c=Ext.getCmp("adgroup");if(d!=undefined&&d!=null&&c!=undefined&&c!=null){var m=d.getValue();if(m=="ad_group"){var l=c.getValue();if(l!=null&l!=undefined){l=l.replace(/=/g,"|eq|");l=l.replace(/,/g,"|comma|");}b=b+"&aduserFilter="+encodeURIComponent(l);}}if(filterParam!=null&&filterParam!="null"&&filterParam!=""&&filterParam!="undefined"&&filterParam!=undefined){b=b+"&"+filterParam;
}var h=b;if(userUrl!=null&&userUrl!=undefined&&userUrl!="null"){h=userUrl;}Ext.Ajax.request({url:h,method:"POST",scope:this,timeout:280000,success:function(y,e){var v=y.responseText;var z=Ext.decode(v);var B=Ext.getCmp("hostDetailsId");var A=Ext.getCmp("hostInner");if(A!=undefined&&A!="undefined"){A.removeAll(true);
}if(B!=undefined&&B!="undefined"){B.renderHostData(z["HostMetrics"]);}var t=this.id;if(!Ext.isEmpty(t)){var x=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});x.show();}var u=Ext.getCmp("vdiListGrid");if(u!=null&&u!=undefined&&u.items!=null&&u.items!=undefined){var D=u.items.items;for(var C=D.length-1;
C>-1;C--){D[C].destroy();}}var w={xtype:"generalMeasuresGridPanel",ui:"newGridPanel removeTableBg",itemId:"userExperience",margin:0,padding:0,frame:false,border:false,flex:1,url:h,someFun:Ext.emptyFn,listeners:{"afterrender":function(I){var F="";var J="";var E="";try{F=Ext.getCmp("filterBy").getValue();
J=Ext.getCmp("detailCombo").getValue();E=Ext.getCmp("compmultipane").getValue();}catch(H){}var G=F+""+J+""+E;if(userType=="OverviewAppXenApp7"||userType=="OverviewAppVDI"||(isOnlyVMAssigned&&userType=="VDI")){this.loadTabJson(z,I.url,"true","endUserDashboard-"+userType,G);}else{this.loadTabJson(z,I.url,fromMetricView,"endUserDashboard-"+userType,G);
}x.hide();w.someFun();}}};if(!Ext.isEmpty(z)&&z.hasOwnProperty("countJson")&&z.countJson.hasOwnProperty("isHidePaging")){isHidePaging=z.countJson.isHidePaging;}else{isHidePaging=true;}tempSearchPanel=w;Ext.getCmp("vdiListGrid").add(w);Ext.getCmp("vdiListGrid").doLayout();}});},refreshThisPage:function(m){var b="/final/monitor/endUserDashboard.jsp?access=allusers";
var s=Ext.getCmp("searchString")!=null?Ext.getCmp("searchString").value:"";var g=Ext.getCmp("limitCombo")!=null?Ext.getCmp("limitCombo").value:"";var p=Ext.getCmp("vdiTypeCombo")!=null?Ext.getCmp("vdiTypeCombo").value:"";if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){if(defaultDispLimit!=null&&defaultDispLimit!=undefined&&defaultDispLimit!=""){g=defaultDispLimit;
}if(defaultVdiType!=null&&defaultVdiType!=undefined&&defaultVdiType!=""){p=defaultVdiType;}}var j=userType;try{var k=Ext.getCmp("vdiTypeCombo");if(!Ext.isEmpty(k)&&!Ext.isEmpty(k.getValue())&&k.getValue()!=""){var r=k.getValue();var a=k.findRecord(k.valueField||k.displayField,r);var q=k.store.indexOf(a);
j=k.getStore().getAt(q).get("usertype");if(Ext.isEmpty(j)){j=userType;}}}catch(o){}if(s!=null&&s!="null"&&s!=""&&s!="undefined"){b=b+"&searchString="+s;}if(g!=null&&g!="null"&&g!=""&&g!="undefined"){b=b+"&priority="+g;}if(p!=null&&p!="null"&&p!=""&&p!="undefined"){b=b+"&vdiType="+p;}if(currOrderByColumn!=null&&currOrderByColumn!=undefined&&currOrderByColumn!="null"&&currOrderByColumn!=""&&currOrderByColumn!="undefined"){b=b+"&orderByColumn="+currOrderByColumn;
}if(currOrderBy!=null&&currOrderBy!=undefined&&currOrderBy!="null"&&currOrderBy!=""&&currOrderBy!="undefined"){b=b+"&orderBy="+currOrderBy;}if(currColumnType!=null&&currColumnType!="null"&&currColumnType!=""&&currColumnType!="undefined"){b=b+"&columnType="+currColumnType;}if(currColumndispName!=null&&currColumndispName!="null"&&currColumndispName!=""&&currColumndispName!="undefined"){b=b+"&columnDispName="+currColumndispName;
}if(fromctx!=null&&fromctx!="null"&&fromctx!=""&&fromctx!="undefined"){b=b+"&fromctx="+fromctx;}if(fromMetricView!=null&&fromMetricView!="null"&&fromMetricView!=""&&fromMetricView!="undefined"){b=b+"&fromMetricView="+fromMetricView;}b=b+"&userType="+j;if(isFromMenu){b=b+"&fromMenu=true";}if(showKeyUser){b=b+"&showKeyUser=true";
if(m!=null&&m=="updateUserAssociate"){b=b+"&updateUserAssociate=true";}}if(endUserOverviewFlag){b=b+"&endUserDashOverview="+endUserOverviewFlag;}if(!Ext.isEmpty(enableBackButton)&&enableBackButton!=null&&enableBackButton!=undefined&&(enableBackButton=="true"||enableBackButton==true)){b=b+"&enableBackButton="+enableBackButton;
}if(!Ext.isEmpty(isFromUEDOverview)&&isFromUEDOverview!=null&&isFromUEDOverview!=undefined&&(isFromUEDOverview=="true"||isFromUEDOverview==true)){b=b+"&isfromuedoverview="+isFromUEDOverview;}if(!Ext.isEmpty(isfromuedsort)&&isfromuedsort!=null&&isfromuedsort!=undefined&&(isfromuedsort=="true"||isfromuedsort==true)){b=b+"&isfromuedsort="+isfromuedsort;
}if(!Ext.isEmpty(isServiceBusiViewMetrics)&&isServiceBusiViewMetrics!=null&&isServiceBusiViewMetrics!=undefined&&(isServiceBusiViewMetrics=="true"||isServiceBusiViewMetrics==true)){b=b+"&isServiceBusiViewMetrics="+isServiceBusiViewMetrics;}var d=Ext.getCmp("groupCombo");var c=Ext.getCmp("adgroup");if(d!=undefined&&d!=null&&c!=undefined&&c!=null){var n=d.getValue();
if(n=="ad_group"){var l=c.getValue();if(l!=null&l!=undefined){l=l.replace(/=/g,"|eq|");l=l.replace(/,/g,"|comma|");}b=b+"&aduserFilter="+encodeURIComponent(l);}}if(filterParam!=null&&filterParam!="null"&&filterParam!=""&&filterParam!="undefined"&&filterParam!=undefined){b=b+"&"+filterParam;}var h=b;if(userUrl!=null&&userUrl!=undefined&&userUrl!="null"){h=userUrl;
}Ext.Ajax.request({url:h,method:"POST",scope:this,timeout:280000,success:function(y,e){var v=y.responseText;var z=Ext.decode(v);var B=Ext.getCmp("hostDetailsId");var A=Ext.getCmp("hostInner");if(A!=undefined&&A!="undefined"){A.removeAll(true);}if(B!=undefined&&B!="undefined"){B.renderHostData(z["HostMetrics"]);
}var t=this.id;if(!Ext.isEmpty(t)){var x=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});x.show();}var u=Ext.getCmp("vdiListGrid");if(u!=null&&u!=undefined&&u.items!=null&&u.items!=undefined){var D=u.items.items;for(var C=D.length-1;C>-1;C--){D[C].destroy();}}var w={xtype:"generalMeasuresGridPanel",ui:"newGridPanel removeTableBg",itemId:"userExperience",margin:0,padding:0,frame:false,border:false,flex:1,url:h,someFun:Ext.emptyFn,listeners:{"afterrender":function(I){var F="";
var J="";var E="";try{F=Ext.getCmp("filterBy").getValue();J=Ext.getCmp("detailCombo").getValue();E=Ext.getCmp("compmultipane").getValue();}catch(H){}var G=F+""+J+""+E;if(userType=="OverviewAppXenApp7"||userType=="OverviewAppVDI"||(isOnlyVMAssigned&&userType=="VDI")){this.loadTabJson(z,I.url,"true","endUserDashboard-"+userType,G);
}else{this.loadTabJson(z,I.url,fromMetricView,"endUserDashboard-"+userType,G);}x.hide();w.someFun();}}};if(!Ext.isEmpty(z)&&z.hasOwnProperty("countJson")&&z.countJson.hasOwnProperty("isHidePaging")){isHidePaging=z.countJson.isHidePaging;}else{isHidePaging=true;}tempSearchPanel=w;Ext.getCmp("vdiListGrid").add(w);
Ext.getCmp("vdiListGrid").doLayout();}});},goToPageNo:function(u){var g="/final/monitor/endUserDashboardData.jsp?user="+userName;var m=Ext.getCmp("searchString")!=null?Ext.getCmp("searchString").value:"";var r=Ext.getCmp("limitCombo")!=null?Ext.getCmp("limitCombo").value:"";var h=Ext.getCmp("vdiTypeCombo")!=null?Ext.getCmp("vdiTypeCombo").value:"";
var j=userType;try{var s=Ext.getCmp("vdiTypeCombo");if(!Ext.isEmpty(s)&&!Ext.isEmpty(s.getValue())&&s.getValue()!=""){var n=s.getValue();var k=s.findRecord(s.valueField||s.displayField,n);var l=s.store.indexOf(k);j=s.getStore().getAt(l).get("usertype");if(Ext.isEmpty(j)){j=userType;}}}catch(q){}if(m!=null&&m!="null"&&m!=""&&m!="undefined"){g=g+"&searchString="+m;
}if(r!=null&&r!="null"&&r!=""&&r!="undefined"){g=g+"&priority="+r;}if(h!=null&&h!="null"&&h!=""&&h!="undefined"){g=g+"&vdiType="+h;}if(currOrderByColumn!=null&&currOrderByColumn!=undefined&&currOrderByColumn!="null"&&currOrderByColumn!=""&&currOrderByColumn!="undefined"){g=g+"&orderByColumn="+currOrderByColumn;
}if(currOrderBy!=null&&currOrderBy!=undefined&&currOrderBy!="null"&&currOrderBy!=""&&currOrderBy!="undefined"){g=g+"&orderBy="+currOrderBy;}if(currColumnType!=null&&currColumnType!=undefined&&currColumnType!=""){g=g+"&columnType="+currColumnType;}if(currColumndispName!=null&&currColumndispName!="null"&&currColumndispName!=""&&currColumndispName!="undefined"){g=g+"&columnDispName="+currColumndispName;
}g=g+"&userType="+j;if(isFromXenVdi!=null&&isFromXenVdi!=undefined){g=g+"&isFromXenVdi="+isFromXenVdi;}if(isFromMenu){g=g+"&fromMenu=true";}if(showKeyUser){g=g+"&showKeyUser=true";if(updateUserAssociateFlag){g=g+"&updateUserAssociate=true";}}if(isFromGeo){g=g+"&fromGeo=true&iniName="+iniName+"&user_name="+user_name+"&isUserBased="+isUserBased+"&dashboard_name="+dashboard_name+"&view_name="+view_name+"&dashboard_mapping="+dashboard_mapping+"&time_line="+time_line+"&ginfo="+geoInfo+"&fromServiceHomePage="+fromServiceHomePage+"&fromZonePage="+fromZonePage;
}if(!Ext.isEmpty(isServiceBusiViewMetrics)&&isServiceBusiViewMetrics!=null&&isServiceBusiViewMetrics!=undefined&&(isServiceBusiViewMetrics=="true"||isServiceBusiViewMetrics==true)){g=g+"&isServiceBusiViewMetrics="+isServiceBusiViewMetrics;}var b=Ext.getCmp("groupCombo");var o=Ext.getCmp("adgroup");if(b!=undefined&&b!=null&&o!=undefined&&o!=null){var p=b.getValue();
if(p=="ad_group"){var c=o.getValue();if(c!=null&c!=undefined){c=c.replace(/=/g,"|eq|");c=c.replace(/,/g,"|comma|");}g=g+"&aduserFilter="+encodeURIComponent(c);}}if(filterParam!=null&&filterParam!="null"&&filterParam!=""&&filterParam!=undefined){g=g+"&"+filterParam;}if((!Ext.isEmpty(isfromCitrix)&&isfromCitrix!=null&&isfromCitrix!=undefined&&(isfromCitrix=="true"||isfromCitrix==true))||(!Ext.isEmpty(isfromRum)&&isfromRum!=null&&isfromRum!=undefined&&(isfromRum=="true"||isfromRum==true))){if(isfromRum!=null&&isfromRum!="null"&&isfromRum!=""&&isfromRum!="undefined"){if((serviceComponent!=null&&serviceComponent!="null"&&serviceComponent!=""&&serviceComponent!="undefined"&&serviceComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){g=g+"&iniName=eg_rumdashboard&isfromRum=true&userBased=true&fromMenu=true&showConfig=true&dashboard_name=RUM_Dashboard&appliesTo="+appliesTo+"&isBackFromRUM=false&filter=Service&filterBy="+subFilterGl+"&view_name="+view_name+"&subFilter="+subFilterGl;
}else{g=g+"&iniName=eg_rumdashboard&isfromCitrix=true&isfromRum=true&userBased=true&fromMenu=true&showConfig=true&dashboard_name=RUM_Dashboard&appliesTo="+appliesTo+"&isBackFromRUM=false&filter=Service&filterBy="+subFilterGl+"&view_name="+view_name+"&subFilter="+subFilterGl;}}else{if(g!=""&&g!=null){g=g+"&fromMetricView=true&isfromCitrix="+isfromCitrix+"&iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&fromMenu=true&showConfig=true&fromUED=true&dashboard_name="+dashboard_name+"&dashboard_mapping="+dashboard_mapping+"&view_name="+view_name+"&selectedTest="+encodeURIComponent(selectedTest)+"&selectedMeasure="+selectedMeasure+"&fromSerComboChange="+fromSerComboChange+"&fromServiceHomePage="+fromServiceHomePage;
}}if((serviceComponent!=null&&serviceComponent!="null"&&serviceComponent!=""&&serviceComponent!="undefined"&&serviceComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){g=g+"&selectedRum="+selectedRum+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup+"&isUserBased="+isUserBased+"&fromZonePage="+fromZonePage+"&comptype="+backObject.comptype+"&fromHostPanel=true";
}}if((segmentComponent!=null&&segmentComponent!="null"&&segmentComponent!=""&&segmentComponent!="undefined"&&segmentComponent=="true")||(fromHostPanel!=null&&fromHostPanel!="null"&&fromHostPanel!=""&&fromHostPanel!="undefined"&&fromHostPanel=="true")){g=g+"&fromHostPanel=true&segmentComponent=true&fromHomepage="+backObject.fromHomepage;
}userUrl=g;if(endUserOverviewFlag){g=g+"&endUserDashOverview="+endUserOverviewFlag;}if(fromMetricView!=null&&fromMetricView!="null"&&fromMetricView!=""&&fromMetricView!="undefined"){g=g+"&fromMetricView="+fromMetricView;}if(!Ext.isEmpty(enableBackButton)&&enableBackButton!=null&&enableBackButton!=undefined&&(enableBackButton=="true"||enableBackButton==true)){g=g+"&enableBackButton="+enableBackButton;
}var d=Ext.getCmp("adtnlSearchString")!=null?Ext.getCmp("adtnlSearchString").value:"";if(!Ext.isEmpty(d)&&d!=null&&d!="null"&&d!=""&&d!="undefined"){g=g+"&adtnlSearchStr="+d;}var t=this.id;if(!Ext.isEmpty(t)){var a=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});a.show();}Ext.Ajax.request({url:g,method:"POST",scope:this,timeout:280000,success:function(y,e){var w=y.responseText;
var A=Ext.decode(w);var D=Ext.get("vdiListGrid");var z=A["FIlTER"];this.checkFilterSession(z);if(!Ext.isEmpty(A["GRID_DATA"])){isDataAva=true;}if(!Ext.isEmpty(A["header_display"])){Ext.getCmp("endUserView").setTitle(A["header_display"]);Ext.getCmp("endUserView").setIconCls(A["header_display_icon"]);}var v=Ext.getCmp("vdiListGrid");
if(v!=null&&v!=undefined&&v.items!=null&&v.items!=undefined){var C=v.items.items;for(var B=C.length-1;B>-1;B--){C[B].destroy();}}var x={xtype:"generalMeasuresGridPanel",ui:"newGridPanel removeTableBg",itemId:"userExperience",margin:0,padding:0,frame:false,border:false,flex:1,url:g,someFun:Ext.emptyFn,listeners:{"afterrender":function(I){var F="";
var J="";var E="";try{F=Ext.getCmp("filterBy").getValue();J=Ext.getCmp("detailCombo").getValue();E=Ext.getCmp("compmultipane").getValue();}catch(H){}var G=F+""+J+""+E;if(userType=="OverviewAppXenApp7"||userType=="OverviewAppVDI"||(isOnlyVMAssigned&&userType=="VDI")){this.loadTabJson(A,I.url,"true","endUserDashboard-"+userType,G);
}else{this.loadTabJson(A,I.url,fromMetricView,"endUserDashboard-"+userType,G);}a.hide();x.someFun();}}};if(!Ext.isEmpty(A)&&A.hasOwnProperty("countJson")&&A.countJson.hasOwnProperty("isHidePaging")){isHidePaging=A.countJson.isHidePaging;}else{isHidePaging=true;}tempSearchPanel=x;Ext.getCmp("vdiListGrid").add(x);
Ext.getCmp("vdiListGrid").doLayout();},failure:function(){if(!Ext.isEmpty(a)){a.hide();}}});},encodeForFilterParam:function(){var d="";try{if(!Ext.isEmpty(filterParam)&&filterParam!=null&&filterParam!="null"&&filterParam!=undefined){if(filterParam.indexOf("&")==0){filterParam=filterParam.substring(1);
}var c=filterParam.split("&");var a="";for(i=0;i<c.length;i++){if(!Ext.isEmpty(c[i])&&c[i]!=null){a=c[i].split("=");if(!Ext.isEmpty(a[0])&&a[0]!=null){if(a[0]=="dsInfo"){a[1]=encodeURIComponent(a[1]);}}d+="&"+a[0]+"="+a[1];}}return d;}else{return d;}}catch(b){return d;}},getFilterParamForPDFandCSV:function(){var a="";
try{var l=Ext.getCmp("detailCombo");detailComboValue=l.getValue();var g=Ext.getCmp("compCombo");var p=g.getValue();var m="";if(!Ext.isEmpty(p)){for(i=0;i<p.length;i++){m+=p[i]+",";}m=m.slice(0,-1);}if(m==undefined||m==null||m==""){m="All";}var q=Ext.getCmp("filterBy");filterByValue=q.getValue();var c=Ext.getCmp("searchFilter");
var j=Ext.getCmp("nextSearch");var k=Ext.getCmp("nextSubSearch");var d=Ext.getCmp("priorityFilter");var n=Ext.getCmp("gatewayFilter");var e="";if(detailComboValue.toLowerCase()=="componenttype"){if(showComFilter){if(m.indexOf(",")>-1){e="Components";}else{e="Component";}}else{if(filterByValue!="All"&&m!="All"){e="Components";
}else{e="Component Type";}}}if(Ext.isEmpty(filterByValue)){if(isOnlyVMAssigned&&userType=="VDI"){filterByValue="Virtual_Machine";}else{filterByValue="All";}}if(!endUserOverviewFlag){a="&filterFlag=true";a+="&detail="+detailComboValue;a+="&compCombo="+m;a+="&filterBy="+encodeURI(filterByValue);a+="&compDispName="+e;
a+="&showComFilter="+showComFilter;if(filterByValue!=null&&filterByValue!="Virtual_Machine"){if(!Ext.isEmpty(c)&&!c.hidden&&!Ext.isEmpty(c.getValue())&&c.getValue()!="null"&c.getValue()!="-"){a+="&searchFilter="+encodeURI(c.getValue());if(!j.hidden&&c.getValue()!="All"){a+="&nextSearch="+encodeURI(j.getValue());
}else{a+="&nextSearch=";}if(!k.hidden&&j.getValue()!="All"&&!Ext.getCmp("zoneLabel").hidden){a+="&nextSubSearch="+encodeURI(k.getValue());}else{if(!k.hidden&&Ext.getCmp("zoneLabel").hidden){a+="&nextSubSearch="+encodeURI(k.getValue());}else{a+="&nextSubSearch=";}}}else{a+="&searchFilter=&nextSearch=&nextSubSearch=";
}}else{a+="&searchFilter=&nextSearch=&nextSubSearch=";}}if(!Ext.isEmpty(d)&&d!=null&&d!=undefined){a+="&priorityFilter="+d.getValue();}if(isGateway&&!Ext.isEmpty(n)&&n!=null&&n!=undefined){a+="&gatewayFilter="+n.getValue();}var b=Ext.getCmp("adgroup");if(b!=undefined&&b!=null&&b.isVisible()){var h=b.getValue();
if(h!=undefined&&h!=null&&h!=""){h=h.replace(/=/g,"|eq|");h=h.replace(/,/g,"|comma|");a=a+"&aduserFilter="+encodeURIComponent(h);}}return a;}catch(o){return a;}},removeDuplicateParam:function(j){var k="";var g=j;if(!Ext.isEmpty(g)){try{var a="";var c=g.indexOf("?");if(c>-1){a=g.substring(0,c+1);g=g.substring(c+1);
}var h=g.split("&");for(var b=0;b<h.length;b++){if(k.indexOf(h[b].substring(0,h[b].indexOf("=")+1))==-1){k+="&"+h[b];}}if(k.indexOf("&")==0){k=k.substring(1);}if(!Ext.isEmpty(a)){k=a+k;}return k;}catch(d){return j;}}return j;}});