var errorPanel=false;var curServiceName="";var reqArray=["citrixDashboard.view.Main","citrixDashboard.view.OverviewPanel","citrixDashboard.view.OverviewVerticalPanel","citrixDashboard.view.OverviewCtxPanel","citrixDashboard.view.CitrixDashMenu","citrixDashboard.view.GeoPanel","citrixDashboard.view.GeoMapDetails","citrixDashboard.view.TransactionsChartPanel","citrixDashboard.view.TransactionGridPanel","citrixDashboard.view.MetricsComponentList","citrixDashboard.view.ListView","citrixDashboard.view.CustomConfigTemplateWindow","citrixDashboard.view.ConfigWindow","citrixDashboard.view.AlertsWidgets","widgets.SessionsParentPanel","sessionSimulation.view.SessionSimulation"];
Ext.define("citrixDashboard.controller.Main",{extend:"Ext.app.Controller",requires:reqArray,transactionMeasuresChartURL:"/final/servlet/com.egurkha.TransactionMeasures",time_line_obj:null,chart_url:null,siteName:null,refs:[{ref:"main",selector:"main"},{ref:"overviewdetails",selector:"overviewdetails"},{ref:"citrixdashmenu",selector:"citrixdashmenu"},{ref:"chartpanel",selector:"chartpanel"},{ref:"resources",selector:"resources"},{ref:"transactiongridpanel",selector:"transactiongridpanel"},{ref:"transactionschartpanel",selector:"transactionschartpanel"},{ref:"myTimeWindow",selector:"floatingContainer"},{ref:"myTimelinePanel",selector:"floatingContainer > panel"},{ref:"transactionComboMode",selector:'floatingContainer > panel > combo[itemId= "mode"]'},{ref:"systemPanel",selector:'dashboardgeneralmeasuresgridpanel[itemId="system"]'},{ref:"transactionComboTimeline",selector:'floatingContainer > panel > combo[itemId= "timeline"]'},{ref:"transactionComboFromhr",selector:'floatingContainer > panel > combo[itemId= "fromhr"]'},{ref:"transactionComboTohr",selector:'floatingContainer > panel > combo[itemId= "tohr"]'},{ref:"transactionComboFrommin",selector:'floatingContainer > panel > combo[itemId= "frommin"]'},{ref:"transactionComboTomin",selector:'floatingContainer > panel > combo[itemId= "tomin"]'},{ref:"transactionFromDate",selector:'floatingContainer > panel > datefield[itemId= "from"]'},{ref:"transactionToDate",selector:'floatingContainer > panel > datefield[itemId= "to"]'},{ref:"transactionsPanelToolbar",selector:"floatingContainer > panel"},{ref:"mydashboardlistview",selector:"mydashboardlistview"},{ref:"customConfigTemplateWindow",selector:"customConfigTemplateWindow"},{ref:"configWindow",selector:"configwindow"},{ref:"configWindowForm",selector:"configwindow > form"}],init:function(){timerId=window.setInterval("execute()",panelRefFreq);
this.control({"overviewdetails":{afterrender:this.overviewdetailsRender},'button[itemId="overviewtoggle"]':{toggle:this.toggleOverView},'transactionschartpanel button[id= "settingBt"]':{click:this.settingClick},"transactionschartpanel":{"afterrender":this.onChartsPanelRender},'floatingContainer > panel > combo[itemId= "timeline"]':{select:this.timelineChangeHandler},'floatingContainer > panel > button[action = "transactionGraphBtn"]':{click:this.displayGraph},'main combo[id="TimeLineId"]':{"select":this.refresh},'main button[action="configsetting"]':{scope:this,click:this.openConfigWindow},"configwindow":{"render":this.itemset,"close":this.refreshcall},"configwindow > form > combo":{"select":this.combo},"configwindow > form > radiogroup":{"change":this.radio},'configwindow > toolbar > button[action="submit"]':{click:this.buttonclick},'main button[id="back"]':{"click":this.goBack},'combo[id="countryComboId"]':{"select":this.geoComboOnChange},'combo[id="regionComboId"]':{"select":this.geoComboOnChange},'generalMeasuresGridPanel combo[id="filterByCombo"]':{"select":this.compFilterByComboOnChange},'generalMeasuresGridPanel combo[id="subFilterCombo"]':{change:this.compSubFilterComboOnChange},'generalMeasuresGridPanel combo[id="componentTypCombo"]':{change:this.componentTypeComboOnChange},'dashboardgeneralmeasuresgridpanel[itemId="system"] > panel > toolbar > combobox':{change:this.systemsComboChange},'dashboardgeneralmeasuresgridpanel[itemId="system"] > toolbar > combobox':{change:this.systemsComboChange},'generalMeasuresGridPanel combo[id="sortByCombo"]':{"select":this.componentsmeasureComboChange},'generalMeasuresGridPanel textfield[id="nickName"]':{specialkey:function(b,a){if(a.getKey()==a.ENTER){this.compSubmitButtonClicked();
}}},'main button[id="listBtn"]':{"click":this.loadListView},'main button[action="addNew"]':{"click":this.loadAddDashboardPopup},'main checkbox[id="selectAllDashboards"]':{"change":this.checkboxClick},'main button[id="DeleteListOfDashboards"]':{"click":this.deleteSelectedDashBoards},'customConfigTemplateWindow  combo[id="infraTypeCombo"]':{"select":this.getCustomOptionsForType},'customConfigTemplateWindow  combo[id="subInfraTypeCombo"]':{"select":this.setValuesForSiteAndDirector},'customConfigTemplateWindow  button[id="customCreateDashboardBtn"]':{"click":this.createCtxCustomDashboard},'button[action = "transactionsGridConfigureBtn"]':{"click":this.configureTransactionsHandler},});
},itemset:function(a,b){a.add(a.setData("",""));},combo:function(f,h,c){var n=this.getConfigWindowForm().getForm().getValues()["selectedTab"];var o=this.getConfigWindowForm().getForm().getValues()["perform"];var l=this.getConfigWindowForm().getForm().getValues()["descMeasureUnit"];var j="";j=this.getConfigWindowForm().getForm().getValues()["TestFunc"];
var b=f.getName();var e=f.getValue();var g;if(n=="Component"||n=="Aggregate"||n=="System"){g=this.getConfigWindowForm().getForm().getValues()["serviceComp"];}if(b=="serviceComp"){this.getConfigWindow().setData(n,o,g,"","","",l,j,"",b,e);}if(b=="compLayer"){var d=this.getConfigWindowForm().getForm().findField("compLayer").getValue();
this.getConfigWindow().setData(n,o,g,d,"","",l,j,"",b,e);}else{if(b=="serviceTest"){var d;if(o=="Add"){d=this.getConfigWindowForm().getForm().findField("compLayer").getValue();}else{d="";}var m=this.getConfigWindowForm().getForm().findField("serviceTest").getValue();this.getConfigWindow().setData(n,o,g,d,m,"",l,j,"",b,e);
}else{if(b=="serviceMeasure"){var d;if(o=="Add"){d=this.getConfigWindowForm().getForm().findField("compLayer").getValue();}else{d="";}var m=this.getConfigWindowForm().getForm().findField("serviceTest").getValue();var k=this.getConfigWindowForm().getForm().findField("serviceMeasure").getValue();var a=h[0].data.name;
this.getConfigWindow().setData(n,o,g,d,m,k,l,j,a,b,e);}else{}}}},radio:function(e,h,f,a){var c="";var g="";var d="";var m="";var k="";var b="";var n=this.getConfigWindowForm().getForm().getValues()["selectedTab"];var o=this.getConfigWindowForm().getForm().getValues()["perform"];var l="";var j="";if(o=="Add"){j=this.getConfigWindowForm().getForm().getValues()["TestFunc"];
}if(e.getName()=="Does the Test have Descriptors ?"||e.getName()=="Function"){if(o=="Add"){d=this.getConfigWindowForm().getForm().findField("compLayer").getValue();}if(n=="Component"||n=="Aggregate"||n=="System"){g=this.getConfigWindowForm().getForm().findField("serviceComp").getValue();}m=this.getConfigWindowForm().getForm().findField("serviceTest").getValue();
k=this.getConfigWindowForm().getForm().findField("serviceMeasure").getValue();b=this.getConfigWindowForm().getForm().findField("serviceDispName").getValue();c=e.name;}this.getConfigWindow().setData(n,o,g,d,m,k,l,j,b,c,"");},buttonclick:function(h,k,a){var l=false;var m=this;var d="/final/monitor/serviceDashboardConfigP.jsp";
var f="selectType=Update";var n=this.getConfigWindow().jsonData.Window.fields;var j=this.getConfigWindow().jsonData.Window.screenlabels[0];for(var g=0;g<n.length;g++){if(n[g].type=="combo"){var c=n[g].name;if(this.getConfigWindowForm().getForm().findField(c).getValue()==-1){Ext.Msg.alert("",j[c]);l=true;
break;}else{if(c=="serviceTest"){c="testName";}f+="&"+c+"="+n[g].selected;}}else{if(n[g].type=="textfield"){var b=this.getConfigWindowForm().getForm().findField("serviceDispName").getValue();l=true;while(true){if(b.indexOf("?")!=-1){b=b.replace("?","qqsstt");}if(b.indexOf("'")!=-1){b=b.replace("'","sinCour");
}if(b.indexOf("-")!=-1){b=b.replace("-","minSym");}if(b.indexOf("?")==-1&&b.indexOf("'")==-1&&b.indexOf("'")==-1){break;}}if(b.length<1){Ext.Msg.alert("","Please enter display name");}else{if(this.hasSpecialCharacters(b)){if(this.hasNumbers(b)){f+="&"+n[g].name+"="+b;l=false;}else{Ext.Msg.alert("","Special characters not allowed");
}}else{f+="&"+n[g].name+"="+b;l=false;}}}else{if(n[g].selected=="Component"){n[g].selected="Application";}f+="&"+n[g].name+"="+n[g].selected;}}}if(l==false){Ext.Ajax.request({url:d,params:f,method:"POST",scope:this,success:function(q){var v=this.getConfigWindowForm().getForm().getValues()["selectedTab"];
var w=this.getConfigWindowForm().getForm().getValues()["perform"];var e="";var s=-1;var u=this.getConfigWindowForm().getForm().findField("serviceTest").getValue();var o="";var p="";var t="";var r="";if(w=="Add"){r=this.getConfigWindowForm().getForm().getValues()["TestFunc"];o=this.getConfigWindowForm().getForm().findField("compLayer").getValue();
Ext.Msg.alert("","Measure Added Successfully");}else{if(w=="Delete"){Ext.Msg.alert("","Measure Deleted Successfully");}}if(v=="Component"||v=="Aggregate"||v=="System"){p=this.getConfigWindowForm().getForm().findField("serviceComp").getValue();}this.getConfigWindow().setData(v,w,p,o,u,s,t,r,e,c,"");},failure:function(){window.parent.location.href="/final/servlet/com.egurkha.Logout";
}});}if(l==false){Ext.Function.defer(function(){m.setValues(l);},350);}},setValues:function(a){if(a==false){var c=this.getConfigWindow().jsonData.Window.fields;var d=false;for(var b=0;b<c.length;b++){if(c[b].type=="combo"){if(c[b].selected!="Not Applicable!"){d=true;}if(!d&&this.getConfigWindowForm().getForm().getValues()["perform"]=="Delete"){this.getConfigWindowForm().getForm().findField(c[b].name).setValue(-1);
}}d=false;}}},hasNumbers:function(a){var b=/\d/g;return b.test(a);},hasSpecialCharacters:function(b){var a=b.split("");if(a!=null&&a!=undefined&&a.length>0){for(var d=0;d<a.length;d++){var e=a[d];if(!(e==" "||e==")"||e=="("||e=="_"||e.match(/^[-'a-z\u4e00-\u9eff]{1,20}$/i))){return true;}}return false;
}},openConfigWindow:function(){var a=Ext.Element.getViewportWidth();try{var b=Ext.getCmp("back").hidden;var f="135px";if(b!=undefined&&b!=null&&!b){f="205px";}}catch(d){f="105px";}if(!this.getConfigWindow()){var c=Ext.create("citrixDashboard.view.ConfigWindow");c.show();container=Ext.create("Ext.container.Container",{padding:10,floating:true,frame:false,width:510,hidden:true,floatable:true,id:"ctxConfigWindow",ui:"configOuterContainer",items:[{xtype:"container",cls:"configMode_popupArrow",style:{"top":"-14px","left":f}},{xtype:"container",cls:"configMode_header",padding:"10 0 5 0",html:'<div class="settingsfont" style="float:left;color:#f7f7f7text-transform:uppercase;margin-top: -5px;">Settings</div><div style="text-align:right;float:right;margin-top:-7px;"><div class="iconClose3"></div></div>',},c]});
Ext.create("Ext.fx.Anim",{target:container,duration:500,from:{left:a-615,top:-500},to:{top:40,left:a-615}});container.showAt(a-615,5000);Ext.select(".iconClose3").on("click",function(){Ext.create("Ext.fx.Anim",{target:container,duration:500,from:{left:a-615,top:40},to:{top:-500,left:a-615},callback:function(){container.hide();
citrixDashboard.app.getController("Main").metricRefresh();}});},this);Ext.getBody().on("click",function(g){var e=g.target.id;if((e!=undefined&&e!=null&&((e.toLowerCase().indexOf("gridview")!=-1)||(e.toLowerCase().indexOf("toolbar")!=-1)||(e.toLowerCase().indexOf("filter")!=-1)||(e.toLowerCase().indexOf("listbutid")!=-1)||(e.toLowerCase().indexOf("centerp")!=-1)))){container.hide();
}});}else{if(container.isHidden()){var c=this.getConfigWindow();Ext.create("Ext.fx.Anim",{target:container,duration:500,from:{left:a-615,top:-500},to:{top:40,left:a-615}});container.showAt(a-615,5000);}else{container.hide();citrixDashboard.app.getController("Main").metricRefresh();}}},metricRefresh:function(){selected_CompType_st="";
var h="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){h=Ext.getCmp("dashListComId").getValue();}var e=Ext.getCmp("dashmenu_model_id");var c=e.getStore();var d=e.forceClickKey;var b=requestParams.activeView;var f=Ext.getCmp("comboValue");
SysComponentType="";if(!Ext.isEmpty(f)){SysComponentType=f.getValue();}var a=Ext.getCmp("systemViewMeasuresgridpanel");var g=a.url;g+="&selectNode=Service$cap$"+encodeURIComponent(filterByParamFlag)+"&componentType="+SysComponentType+"&selectedParam="+encodeURIComponent(filterByParamFlag)+"&currentTab=Systems&isSite=true&aggregateTab=false&hasTransactions=true&hasEmulatedTransactions=false&fromHomepage=&hasLogonSimulations=true&refresh=true&action=Systems&topoSegment="+encodeURIComponent(filterByParamFlag)+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_name="+dashboard+"&dashboard_mapping="+h+"&view_name="+b+"&fromServiceHomePage="+isFromHomePage+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
a.loadTab(g,"servicesSys");},configurePanels:function(d){var h=new Array();var r="";var e=[];var c=Ext.create("Ext.data.Store",{fields:["value","name"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:d.IconsInfo});if(e.length<12){var b={xtype:"form",bodyPadding:0,margin:"0px 0px 0px 0px",defaults:{labelSeparator:"",labelAlign:"top",margin:"5px 10px 10px 10px",},layout:"hbox",items:[{xtype:"scrollcombo",store:c,id:"imagecombo",cls:"imagecombo",name:"imagecombo",displayField:"name",valueField:"value",queryMode:"local",editable:false,typeAhead:false,editable:false,value:"Choose a type",fieldLabel:d.DownGridLabels.newTransType,tpl:Ext.create("Ext.XTemplate","<ul>",'<tpl for=".">','<li class="x-boundlist-item"><span style="padding-left:18px" class=trans_{value}_small></span><span style="font-size: 12px;">{name}</span></li>',"</tpl>","</ul>"),listeners:{select:function(x,u,v){var t=u[0];
var w=t.get("value");cls="trans_"+w+"_small";if(w){$("#"+x.inputEl.id).removeClass().addClass(cls);}}},},{xtype:"textfield",cls:"textbox",fieldLabel:d.DownGridLabels.newTransName,labelSeparator:"",width:"220px",labelAlign:"top",id:"tname",action:"tname"},{xtype:"textfield",fieldLabel:d.DownGridLabels.pagesToInclude,labelAlign:"top",cls:"textbox",labelSeparator:"",labelAlign:"top",width:"210px",action:"tpage",id:"tpage"},{xtype:"button",text:d.DownGridLabels.addBtnLabel,action:"addAction",id:"addButton",cls:"button20",margin:"27px 10px 0px 10px",handler:function(){var z=Ext.getCmp("tname").getValue();
var u=Ext.getCmp("tpage").getValue();var A=Ext.getCmp("imagecombo").getRawValue();var v=Ext.getCmp("imagecombo").getValue();var x=d.HiddenFields.site;if(x==null||x==undefined){x=d.HiddenFields.siteName;}var y=d.HiddenFields.currentuser;if(Ext.isEmpty(A)||Ext.isEmpty(z)||Ext.isEmpty(u)){Ext.Msg.alert("Empty","Choose required fields");
return;}else{var B=[];var C=[];var w='<div><img style="padding-left:18px;vertical-align:middle;dispaly:inline-block" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="trans_'+v+'_small"/>'+A+"</div>";C.push(w);C.push(z);C.push(u);B.push(C);var t="../monitor/addTransactionsP.jsp?mode=add&site="+x+"&m="+v+"&currentuser="+y+"&tran="+z+"&pageinclude="+u+"&isFromCitrix=true";
Ext.Ajax.request({url:t,method:"POST",async:false,success:function(D){if(D.status==200&&!Ext.isEmpty(D.responseText)){var F=Ext.getCmp("gridStore");if(!Ext.isEmpty(F)){var E=F.getStore().getCount()+1;F.getStore().insert(E,B);Ext.getCmp("tname").setValue("");Ext.getCmp("tpage").setValue("");}else{}}}});
}}}]};var q={xtype:"toolbar",docked:"top",cls:"component-list-right-panel-header",height:"30px",style:{"border":"0px solid red !important"},border:false,frame:false,items:[{xtype:"label",text:d.DownGridLabels.newTransName,cls:"configure-transaction-label",action:"tname"},{xtype:"textfield",cls:"textbox",margin:"0px 20px 0px 0px",labelCls:"config-window-font",labelSeparator:"",width:"200px",itemId:"tname",action:"tname"},{xtype:"label",text:d.DownGridLabels.pagesToInclude,cls:"configure-transaction-label"},{xtype:"textfield",cls:"textbox",margin:"0px 20px 0px 0px",labelCls:"config-window-font",labelSeparator:"",width:"250px",action:"tpage",itemId:"tpage"},"->",{xtype:"button",text:d.DownGridLabels.addBtnLabel,cls:"button20",itemId:"addbtn",action:"addbtn",}]};
var k=[{xtype:"panel",width:"100%",height:25,border:false,html:'<div class="configure-transaction-info-text">&nbsp;* '+d.DownGridLabels.info+"</div>"}];for(o=0;o<d.IconsInfo.length;o++){k.push({xtype:"container",width:80,margin:14,layout:"column",border:true,items:[{xtype:"radio",name:"transaction",cls:"radiobt",margin:"5 4 0 2",value:d.IconsInfo[o].value},{xtype:"component",html:'<div class="trans_'+d.IconsInfo[o].value+'" title="'+d.IconsInfo[o].name+'"></div>',listeners:{render:function(t){t.getEl().on({click:function(){t.prev().setValue(true);
}});}}}]});}var n={xtype:"panel",width:"100%",cls:"block1",border:false,frame:false,flex:3,layout:"vbox",items:[b]};h.push(n);}var p=new Array();e=d.upperGridLabels.transHeaders;var l="";if(e.length==0){var m={xtype:"toolbar",docked:"top",style:{"border":"0px solid red !important"},border:false,frame:false,items:[{xtype:"label",text:d.upperGridLabels.transactionName,cls:"delete-service-transaction-label"},"->",{xtype:"button",text:d.upperGridLabels.deleteBtn,action:"deleteTrans",cls:"button20",user:d.upperGridLabels.user,tname:d.upperGridLabels.transactionName,currentUser:Ext.isEmpty(d.HiddenFields.currentuser)?"":d.HiddenFields.currentuser}]};
l={xtype:"panel",cls:"service-transaction-toolbar",border:false,frame:false,style:{"border":"0px solid blue !important"},width:"100%",html:d.upperGridLabels.files};l.dockedItems=m;p.push(l);}var m="";var s=[];var f=[];for(var o=0;o<e.length;o++){if(user_name!="admin"&&user_name==e[o].user){this.enableSelectAll=true;
}var j='<div><img style="padding-left:18px;vertical-align:middle;dispaly:inline-block" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="trans_'+e[o].img+'_small"/>'+e[o].uiImg+"</div>";f.push([j,e[o].transactionName,e[o].files]);}s.push(f);var g=Ext.create("Ext.data.ArrayStore",{fields:[{name:"Type"},{name:"Transaction Name"},{name:"Pages"}],data:f});
var a={xtype:"grid",id:"gridStore",height:405,border:false,cls:"gridSkin",store:g,columns:[{text:"Type",flex:0.25,sortable:false,dataIndex:"Type"},{text:"Transaction Name",flex:0.3,sortable:true,dataIndex:"Transaction Name"},{text:"Pages",flex:0.4,sortable:true,dataIndex:"Pages"},{xtype:"actioncolumn",width:32,items:[{iconCls:"iconDelete",tooltip:"Delete",handler:function(u,z,B){if(Ext.isEmpty(u)){alert("No data found");
}else{var v=u.getStore().getAt(z);var A=u.getStore().getAt(B);var w=v.raw[1];var x=d.HiddenFields.site;if(x==null||x==undefined){x=d.HiddenFields.siteName;}var y=d.upperGridLabels.user;var t="../monitor/addTransactionsP.jsp?mode=del&site="+x+"&currentuser="+y+"&trans="+w+"&isFromCitrix=true";Ext.Ajax.request({url:t,method:"POST",async:false,success:function(C){if(C.status==200&&!Ext.isEmpty(C.responseText)){u.getStore().removeAt(z);
}}});}}}]}]};r={xtype:"panel",height:405,padding:0,border:false,items:[a],margin:"0 10 0 10",flex:4};h.push(r);return h;},configureTransactionsHandler:function(b,a){if(this.siteName==null||this.siteName=="null"){this.siteName=selectedParam;}var c=loadTransConfigOnTopo(this.siteName);Ext.Ajax.request({url:c,scope:this,timeout:280000,success:function(e){var g=e.responseText;
var f=Ext.decode(g);this.jsonData=f;var d=this.configurePanels(f);var h=Ext.create("Ext.window.Window",{cls:"alarmsbg lightbox",width:810,closeAction:"destroy",autoDestroy:true,frame:true,doClose:function(){var j=this;location.reload();},modal:false,title:"CONFIGURE TRANSACTION DETAILS",height:510,margin:10,items:d,flex:1});
h.show();},failure:function(){window.parent.location.href="/final/servlet/com.egurkha.Logout";}});},getGroupPanelArray:function(e,g,c,b,f){var d={xtype:"panel",layout:{type:"hbox",align:"strech"},minHeight:140,items:[],margin:0,padding:"10 0 0 0",listeners:{"afterrender":function(m){var j=this;for(var a in e){var h=e[a]["chart"];
if(h!=undefined&&h=="GraphText"){var o=h+"_GraphText_"+a+"_overviewextra";var l="0 40 0 0";if(a==2){l="0 0 0 0";}var k=citrixDashboard.app.getController("Main").getGraphtextPanel(e[a],o,a,l);j.add(k);Ext.getCmp(o).removeCls("widgetcon");}else{if(h!=undefined&&h.toLowerCase()=="gauge"){var o=h+"_Gauge_"+a+"_overviewextra";
var l="0 0 0 0";var k=citrixDashboard.app.getController("Main").getGaugePanel(e[a],o,a,true);j.add(k);if(a==2){Ext.getCmp(o).removeCls("widgetcon");}}else{if(h!=undefined&&h=="ColourText"){var o=h+"_ColourText_"+a+"_overviewextra";var l="0 0 0 0";var n=citrixDashboard.app.getController("Main").getColourTextPanel(e[a],o,a,true);
j.add(n);}}}}}}};return d;},getGraphtextPanel:function(g,h,c,f){var e="separator_measure";if(c==0){e="";}var d="#35c8c2";if(g.colorValue!=undefined){d=g.colorValue;}var b={xtype:"panel",flex:1,margin:0,margin:f,bodyPadding:"5 0 0 0",autoScroll:false,minHeight:160,items:[{xtype:"graphtext",cls:"widgetcon font_bold12",ifVer:false,data:g,id:h,num:h+"_"+c,aid:c}],};
return b;},getGaugePanel:function(g,c,k,j){var e="separator_measure";if(k==0){e="";}var l="#35c8c2";if(g.colorValue!=undefined){l=g.colorValue;}var f=null;var h=true;var d="";if(Ext.isEmpty(j)||(!Ext.isEmpty(j)&&!j)){h=false;f=165;d="widgetcon";}var b={xtype:"panel",cls:d+" font_bold12",baseCls:"panelHeader",margin:"-10 0 0 0",flex:1,minWidth:f,items:[{xtype:"gauge",data:g,id:c,num:c+"_"+k,titleNeeded:true,ifGroup:h,ifOvCtxPFlag:true}],};
return b;},getColourTextPanel:function(g,c,k,j){var e="separator_measure";if(k==0){e="";}var l="#35c8c2";var f=null;var h=true;var d="";if(Ext.isEmpty(j)||(!Ext.isEmpty(j)&&!j)){h=false;f=165;d="widgetcon";}var b={xtype:"panel",cls:d+" font_bold12",baseCls:"panelHeader",margin:"20 0 0 10",flex:1,minWidth:f,items:[{xtype:"colourtext",ifVer:false,data:g,id:c,num:c+"_"+k,ifGroup:h,}],};
return b;},goBack:function(){var a=false;if(isFromZone!=undefined&&isFromZone!=null&&isFromZone=="true"){a=true;}if(isFromLayerModel&&isFromZoneMenu){document.location="/final/monitor/zoneDash.jsp?&selectNode=Zone$cap$"+iszoneName+"&selectedParam="+iszoneName+"&currentTab=details&zoneName="+iszoneName+"&iszoneName="+iszoneName+"&aggregateTab=false&openNode=null&treeFlag=false&fromHomepage="+tempFromHomepage+"&parentZone="+parentZone+"&fromPageView=&fromZoneMenu="+isFromZoneMenu;
return;}else{if(isFromLayerModel&&tempLogonType!=null&&(tempLogonType=="true"||tempLogonType=="false")){document.location="/final/monitor/comparisonDashboard.jsp?treeTitle="+treeTitle+"&isFromMenu=true&isLogonType="+tempLogonType+"&monitorsBy="+monitorsBy+"&ltest="+ltest;return;}else{if(isFromLayerModel&&tempFromHomepage!=null&&tempFromHomepage=="true"){if(iszoneName!=null&&iszoneName!="null"&&!Ext.isEmpty(iszoneName)){document.location="/final/monitor/zoneDash.jsp?&selectNode=Zone$cap$"+iszoneName+"&selectedParam="+iszoneName+"&currentTab=details&zoneName="+iszoneName+"&iszoneName="+iszoneName+"&aggregateTab=false&openNode=null&treeFlag=false&fromHomepage="+tempFromHomepage+"&parentZone="+parentZone+"&fromPageView=&fromZoneMenu="+isFromZoneMenu;
return;}else{document.location="/final/servlet/com.eg.EgMonitorController?monCmd=dashboard";return;}}else{if(isFromLayerModel&&isFromServiceMenu){document.location="/final/servlet/com.eg.EgMonitorController?monCmd=serviceList&from=MainDashboard&action=service&isFromMenu=true";return;}else{if(isFromLayerModel&&isFromServiceGroup){document.location="/final/servlet/com.eg.EgMonitorController?monCmd=serviceList&from=MainDashboard&action=serviceGroup&isFromMenu=true";
return;}}}}}if((a&&!isFromZoneMain)||(a&&!isFromZoneMain&&((parentZone!=null&&parentZone!="null"&&parentZone!=undefined&&parentZone!="undefined"&&parentZone!="")||(iszoneName!=null&&iszoneName!="null"&&iszoneName!=undefined&&iszoneName!="undefined"&&iszoneName!="")))){window.location.href="/final/monitor/zoneDash.jsp?&selectNode=Zone$cap$"+iszoneName+"&selectedParam="+iszoneName+"&currentTab=details&zoneName="+iszoneName+"&iszoneName="+iszoneName+"&aggregateTab=false&openNode=null&treeFlag=false&fromHomepage=true&parentZone="+parentZone+"&fromZoneMenu="+isFromZoneMenu;
}else{if(isFromHomePage&&!isFromServiceMenu&&!isFromZoneMain&&!isFromServiceGroup){window.location.href="/final/servlet/com.eg.EgMonitorController?monCmd=dashboard";}else{if(isFromZonePage&&!isFromZoneMain){window.location.href="/final/servlet/com.eg.EgMonitorController?monCmd=zoneList&from=MainDashboard&action=zone";
}else{if(isFromServiceMenu&&!isFromZoneMain){window.location.href="/final/servlet/com.eg.EgMonitorController?monCmd=serviceList&from=MainDashboard&action=service&isFromMenu=true";}else{if(isFromServiceGroup){document.location="/final/servlet/com.eg.EgMonitorController?monCmd=serviceList&from=MainDashboard&action=serviceGroup&isFromMenu=true";
}else{if(isFromZoneMain){window.location.href="/final/servlet/com.eg.EgMonitorController?monCmd=zoneList&from=MainDashboard&action=zone&isFromMenu=true";}else{window.history.go(-1);}}}}}}},onComponentChange:function(x,e,n,b,t){var m=x.getValue();refreshSimulation="";if(e!=null&&e=="webTrans"){selectedCompTypeValue=m;
}else{selectedCompTypeValue="";}if(e!=null&&e=="logonSim"){var l=extSimData[m];var w=Ext.getCmp("simulationCombo");w.getStore().removeAll();w.getStore().loadRawData("");w.getStore().loadRawData(l);w.setValue(l.selectedValue);w.setFieldLabel(l.label);var o=l.selectedValue;var q=Ext.getCmp("dashboard_container_grid");
var p=Ext.getCmp("dashboard_container_chart");selectedVal=m;var r="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){r=Ext.getCmp("dashListComId").getValue();}var a="";if(o!=null&&o.indexOf(":NULL")>-1){a=o.substring(0,o.indexOf(":NULL"));
}else{a=o;o=o+":NULL";}var f="/final/monitor/comparisonLogonSimulator.jsp?"+logonParam+"&componentType=&selectedState=&subFilter=&simulationName="+a+"&externalAgent="+selectedVal+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+r+"&dashboard_name="+dashboard+"&view_name="+t+"&fromServiceDashboard="+fromServiceDashboard+"&servicename="+n+"&fromSerComboChange="+fromSerComboChange+"&fromServiceHomePage="+isFromHomePage+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&componentNameService="+o+"&isLogonType=true&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
var d="/final/monitor/simulationGraph.jsp?treeTitle=services&site=NULL&mHost="+selectedVal+"&simulationName="+a+"&componentNameService="+o;Ext.Ajax.request({url:d,scope:this,async:true,success:function(A){var C=A.responseText;if(!Ext.isEmpty(C)){var z=Ext.decode(C);if(z!=null&&z!=undefined){if(!Ext.isEmpty(q)){q.removeAll(true);
}var B="gridHeadercenter iconGrid";if(!Ext.isEmpty(logon_treeTitle)&&logon_treeTitle=="ExtTestDashboard"){B="gridHeadercenter";}q.add({xtype:"generalMeasuresGridPanel",plugins:Ext.create("Ext.ux.AutoColumnWithLockingPlugin"),cls:B,itemId:"logonSimualtion",searchBoxCombo:false,margin:0,padding:0,id:"perPanel",height:185,frame:false,border:true,layout:{type:"vbox",align:"stretch"},flex:1,screenLabelPath:"monitor.Dashboard",url:f,listeners:{"afterrender":function(D){this.loadTab(D.url,null,null,null,null,true,"citrixDashBoard");
}}});if(!Ext.isEmpty(p)){p.removeAll(true);}p.add({xtype:"transactionschartpanel",id:"transactionschartpanelid",jsonData:z,minHeight:265,margin:"10 1 0 0",padding:0,border:true,isNotAreaChart:false});}}},failure:function(){}});return;}var y=n;if(y==null||y==undefined||y=="null"){return;}var v=false;var g="/final/monitor/serviceDashHelper.jsp?&site="+encodeURI(y)+"&isSite=true&serviceName="+encodeURI(y)+"&fromLayer="+v;
var j=this.getTransactionComboTimeline();var c=this.getTransactionComboFromhr();var h=this.getTransactionComboTohr();var u=this.getTransactionComboMode();var s=this.getTransactionFromDate();var k=this.getTransactionToDate();if(!Ext.isEmpty(x)){g+="&transComp="+x.getValue();}if(this.tab=="emulated"){g+="&selectedTab=EmulatedClients&from=emulated";
}else{g+="&selectedTab="+this.tab;}if(!Ext.isEmpty(j)){g+="&time_line="+j.getValue();if(j.getValue()=="Any"){if(!Ext.isEmpty(c)){g+="&starthr="+c.getValue();}if(!Ext.isEmpty(h)){g+="&endhr="+h.getValue();}if(!Ext.isEmpty(u)){g+="&mode="+u.getValue();}if(!Ext.isEmpty(s)){tempstarttime=Ext.Date.format(s.getValue(),mgr_dateFormat);
g+="&starttime="+tempstarttime;}if(!Ext.isEmpty(k)){tempendtime=Ext.Date.format(k.getValue(),mgr_dateFormat);g+="&endtime="+tempendtime;}}}Ext.Ajax.request({url:g,scope:this,success:function(z){var B=z.responseText;var A=Ext.decode(B);if(A.HiddenFields!=null&&A.HiddenFields.siteName!=undefined){var C=A.HiddenFields.siteName;
if(C!=null&&C!=undefined){citrixDashboard.app.getController("Main").siteName=C;}}citrixDashboard.app.getController("Main").showTransactionGridPanelData(A.GridScreenLabels,A);},failure:function(){}});},showTransactionGridPanelData:function(d,g){var n=Ext.getCmp("tabAll");var h=new Object();var s=true;
h["title"]=d["emulBtnLabel"];h["itemId"]="serviceToolbarEmulatedButton";h["dataUrl"]=d["emulBtnURL"];var q=(!Ext.isEmpty(d["emulBtnLabel"]))?true:false;var j=Ext.getCmp("componentCombo");var b=g.ComponentList;var l=g.HiddenFields.siteName;if(l!=null&&l!=undefined){citrixDashboard.app.getController("Main").siteName=l;
}var k="",p="";var t=true;var f;if(!Ext.isEmpty(b)&&b!=null&&b!=undefined){t=false;}if(!Ext.isEmpty(j)){if(t==false||t=="false"){try{j.suspendEvents(true);j.getStore().removeAll();j.getStore().loadRawData("");j.getStore().loadRawData(b);j.setValue(b.selectedValue);j.setFieldLabel(b.label);j.resumeEvents();
}catch(v){alert(v);}}else{j.setVisible(false);}}if(strSkin=="Dark"){skinBg="#444444";}else{if(strSkin=="Light"){skinBg="#ffffff";}}var m=Ext.getCmp("dashboard_view_container_grid");var a=Ext.getCmp("dashboard_view_container_chart");var r=Ext.getCmp("dashboard_container_grid");var o=Ext.getCmp("dashboard_container_chart");
var c;var u;if(!Ext.isEmpty(m)&&!Ext.isEmpty(a)){c=m;u=a;}else{if(!Ext.isEmpty(r)&&!Ext.isEmpty(o)){c=r;u=o;}}c.removeAll();u.removeAll();c.add({xtype:"transactiongridpanel",id:"transactiongridpanelid",ui:"newGridPanel",jsonData:g,isEmuEnabled:q,margin:"0 0 0 0",padding:0,height:185,autoScroll:false,scroll:false,border:true});
u.add({xtype:"transactionschartpanel",id:"transactionschartpanelid",columnWidth:1,jsonData:g,margin:"10 0 0 0",padding:0,border:false,layout:{type:"fit"},});},onComponentTypeChange:function(f,b,m,g,c){var a="";var h="";var j="";var n="";var e="";var l=f.getValue();if(b!=null&&b=="logonSim"){var d="";
if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){d=Ext.getCmp("dashListComId").getValue();}var k="/final/monitor/transactions.jsp?componentType="+l+"&treeTitle=services&1=1&selectNode=Service$cap$"+encodeURIComponent(filterByParamFlag)+"&selectedParam="+encodeURIComponent(filterByParamFlag)+"&currentTab=transactions&aggregateTab=false&hasTransactions=true&hasEmulatedTransactions=false&fromHomepage=&hasLogonSimulations=true&site="+encodeURIComponent(filterByParamFlag)+"&isSite="+isSite+"&serviceName="+encodeURIComponent(filterByParamFlag)+"&fromLayer=false&selectNode="+encodeURIComponent(filterByParamFlag)+"&currentTab=transactions&transTab=true&from=null&treeOpen=false&openNode=Services&refresh=true&action=service&topoSegment="+encodeURIComponent(filterByParamFlag)+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+d+"&dashboard_name="+dashboard+"&view_name="+c+"&fromServiceHomePage="+isFromHomePage+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&fromLogonTab=true";
Ext.Ajax.request({url:k,timeout:280000,scope:this,success:function(x){var s=x.responseText;if(!Ext.isEmpty(s)){var D=Ext.decode(s);var B=D.externalAgents;var y=D.logonComponentList;var p=D.componentListObj;a=p.selectedValue;h="";j=B.selectedValue;n=D.logonParam;var A=Ext.getCmp("componentCombo");if(!Ext.isEmpty(A)){A.setVisible(true);
}var z=Ext.getCmp("simulationCombo");if(!Ext.isEmpty(z)){z.setVisible(true);}var o=Ext.getCmp("compTypeCombo");if(!Ext.isEmpty(o)){o.setVisible(true);}if(!Ext.isEmpty(o)&&p!=null&&p!=undefined){selectedCompType=p.selectedValue;}if(!Ext.isEmpty(A)&&B!=null&&B!=undefined){selectedExtAgent=B.selectedValue;
if(!Ext.isEmpty(z)&&y!=null&&y!=undefined){extSimData=y;y=y[selectedExtAgent];selectedSimulation=y.selectedValue;h=y.selectedValue;e=y.selectedOrgValue;if(!Ext.isEmpty(z.getValue())){z.getStore().removeAll();z.getStore().loadRawData("");z.getStore().loadRawData(y);z.setFieldLabel(y.label);z.setValue(y.selectedValue);
}else{var w=Ext.create("Ext.data.Store",{fields:["value","name","comptype"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:y});z.bindStore(w);z.setFieldLabel(y.label);z.setValue(y.selectedValue);}}if(!Ext.isEmpty(A.getValue())){A.getStore().removeAll();A.getStore().loadRawData("");A.getStore().loadRawData(B);
A.setFieldLabel(B.label);A.setValue(B.selectedValue);}else{var u=Ext.create("Ext.data.Store",{fields:["value","name"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:B});A.bindStore(u);A.setFieldLabel(B.label);A.setValue(B.selectedValue);}}var E=Ext.getCmp("dashboard_container_grid");var v=Ext.getCmp("dashboard_container_chart");
selectedVal=l;var r="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){r=Ext.getCmp("dashListComId").getValue();}var C="";if(h!=null&&h.indexOf(":NULL")>-1){C=h.substring(0,h.indexOf(":NULL"));}else{C=h;}var q="/final/monitor/comparisonLogonSimulator.jsp?"+logonParam+"&componentType=&selectedState=&subFilter=&simulationName="+C+"&externalAgent="+j+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+r+"&dashboard_name="+dashboard+"&view_name="+c+"&fromServiceDashboard="+fromServiceDashboard+"&servicename="+m+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&componentNameService="+e+"&isLogonType=true&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
if(n!=null&&n!=""&&n!=undefined){q="/final/monitor/comparisonLogonSimulator.jsp?"+n+"&componentType=&selectedState=&subFilter=&simulationName="+C+"&externalAgent="+j+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+r+"&dashboard_name="+dashboard+"&view_name="+c+"&fromServiceDashboard="+fromServiceDashboard+"&servicename="+m+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&componentNameService="+e+"&isLogonType=true&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
}var t="/final/monitor/simulationGraph.jsp?treeTitle=services&site=NULL&mHost="+j+"&componentNameSearch="+h+"&componentNameService="+e;Ext.Ajax.request({url:t,scope:this,async:true,success:function(G){var I=G.responseText;if(!Ext.isEmpty(I)){var F=Ext.decode(I);if(F!=null&&F!=undefined){if(!Ext.isEmpty(E)){E.removeAll(true);
}var H="gridHeadercenter iconGrid";if(!Ext.isEmpty(logon_treeTitle)&&logon_treeTitle=="ExtTestDashboard"){H="gridHeadercenter";}E.add({xtype:"generalMeasuresGridPanel",plugins:Ext.create("Ext.ux.AutoColumnWithLockingPlugin"),cls:H,itemId:"logonSimualtion",searchBoxCombo:false,margin:0,padding:0,id:"perPanel",height:185,frame:false,border:true,layout:{type:"vbox",align:"stretch"},flex:1,screenLabelPath:"monitor.Dashboard",url:q,listeners:{"afterrender":function(J){this.loadTab(J.url,null,null,null,null,true,"citrixDashBoard");
}}});if(!Ext.isEmpty(v)){v.removeAll(true);}v.add({xtype:"transactionschartpanel",id:"transactionschartpanelid",jsonData:F,minHeight:265,margin:"10 1 10 0",padding:0,border:true,isNotAreaChart:false});}}},failure:function(){}});}},failure:function(){var p=Ext.getCmp("dashboard_container_grid");var t=Ext.getCmp("dashboard_container_chart");
selectedVal=l;var s="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){s=Ext.getCmp("dashListComId").getValue();}var q="";if(h!=null&&h.indexOf(":NULL")>-1){q=h.substring(0,h.indexOf(":NULL"));}else{q=h;}var o="/final/monitor/comparisonLogonSimulator.jsp?"+logonParam+"&componentType=&selectedState=&subFilter=&simulationName="+q+"&externalAgent="+j+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+s+"&dashboard_name="+dashboard+"&view_name="+c+"&fromServiceDashboard="+fromServiceDashboard+"&servicename="+m+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&componentNameService="+e+"&isLogonType=true&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
if(n!=null&&n!=""&&n!=undefined){o="/final/monitor/comparisonLogonSimulator.jsp?"+logonParam+"&componentType=&selectedState=&subFilter=&simulationName="+q+"&externalAgent="+j+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+s+"&dashboard_name="+dashboard+"&view_name="+c+"&fromServiceDashboard="+fromServiceDashboard+"&servicename="+m+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&componentNameService="+e+"&isLogonType=true&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
}var r="/final/monitor/simulationGraph.jsp?treeTitle=services&site=NULL&mHost="+j+"&componentNameSearch="+h+"&componentNameService="+e;Ext.Ajax.request({url:r,scope:this,async:true,success:function(v){var x=v.responseText;if(!Ext.isEmpty(x)){var u=Ext.decode(x);if(u!=null&&u!=undefined){if(!Ext.isEmpty(p)){p.removeAll(true);
}var w="gridHeadercenter iconGrid";if(!Ext.isEmpty(logon_treeTitle)&&logon_treeTitle=="ExtTestDashboard"){w="gridHeadercenter";}p.add({xtype:"generalMeasuresGridPanel",plugins:Ext.create("Ext.ux.AutoColumnWithLockingPlugin"),cls:w,itemId:"logonSimualtion",searchBoxCombo:false,margin:0,padding:0,id:"perPanel",height:185,frame:false,border:true,layout:{type:"vbox",align:"stretch"},flex:1,screenLabelPath:"monitor.Dashboard",url:o,listeners:{"afterrender":function(y){this.loadTab(y.url,null,null,null,null,true,"citrixDashBoard");
}}});if(!Ext.isEmpty(t)){t.removeAll(true);}t.add({xtype:"transactionschartpanel",id:"transactionschartpanelid",jsonData:u,minHeight:265,margin:"10 1 10 0",padding:0,border:true,isNotAreaChart:false});}}},failure:function(){}});}});return;}},onSimulationChange:function(f,a,l,e,b){var m=f.getValue();if(a!=null&&a=="logonSim"){var h=l;
if(Ext.isEmpty(h)||h==null||h==undefined){h=curServiceName;}var o=m;if(!Ext.isEmpty(o)&&o!=null&&o.indexOf(":")>0){o=o.substring(0,o.indexOf(":"));}selectedExtAgent=Ext.getCmp("componentCombo").getValue();var n=Ext.getCmp("dashboard_container_grid");var j=Ext.getCmp("dashboard_container_chart");selectedVal=m;
var d="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){d=Ext.getCmp("dashListComId").getValue();}var k="";if(selectedVal!=null&&selectedVal.indexOf(":NULL")>-1){k=selectedVal.substring(0,selectedVal.indexOf(":NULL"));}else{k=selectedVal;
selectedVal=selectedVal+":NULL";}var c="/final/monitor/comparisonLogonSimulator.jsp?"+logonParam+"&componentType=&selectedState=&subFilter=&simulationName="+k+"&externalAgent="+selectedExtAgent+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+d+"&dashboard_name="+dashboard+"&view_name="+b+"&fromServiceDashboard="+fromServiceDashboard+"&servicename="+l+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&componentNameService="+selectedVal+"&isLogonType=true&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup+"&fromServiceHomePage="+isFromHomePage;
var g="/final/monitor/simulationGraph.jsp?treeTitle=services&site=NULL&mHost="+selectedExtAgent+"&simulationName="+k+"&componentNameService="+selectedVal+"&fromServiceHomePage="+isFromHomePage;Ext.Ajax.request({url:g,scope:this,async:true,success:function(q){var s=q.responseText;if(!Ext.isEmpty(s)){var p=Ext.decode(s);
if(p!=null&&p!=undefined){if(!Ext.isEmpty(n)){n.removeAll(true);}var r="gridHeadercenter iconGrid";if(!Ext.isEmpty(logon_treeTitle)&&logon_treeTitle=="ExtTestDashboard"){r="gridHeadercenter";}n.add({xtype:"generalMeasuresGridPanel",plugins:Ext.create("Ext.ux.AutoColumnWithLockingPlugin"),cls:r,itemId:"logonSimualtion",searchBoxCombo:false,margin:0,padding:0,id:"perPanel",height:185,frame:false,border:true,layout:{type:"vbox",align:"stretch"},flex:1,screenLabelPath:"monitor.Dashboard",url:c,listeners:{"afterrender":function(t){this.loadTab(t.url,null,null,null,null,true,"citrixDashBoard");
}}});if(!Ext.isEmpty(j)){j.removeAll(true);}j.add({xtype:"transactionschartpanel",id:"transactionschartpanelid",jsonData:p,minHeight:265,margin:"10 1 10 0",padding:0,border:true,isNotAreaChart:false});}}},failure:function(){}});selectedSimulation=m;return;}},onChartsPanelRender:function(a){this.displayGraphInitially(a.jsonData);
},settingClick:function(c){var b=Ext.getCmp("settingBt").getPosition();var a=Ext.getCmp("timeWindow");a.showAt([b[0]-680,b[1]+20]);},createDivforHighChart:function(c){var a=Ext.getCmp("transactionschartpanelid");var d="";tmp_div_size_of_td=c;var e=0;var g="",b="";a.removeAll();var f=Ext.create("Ext.panel.Panel",{layout:{type:"vbox",align:"stretch"},padding:"0 15 15 15",items:[{xtype:"container",id:"legends"},{xtype:"container",border:true,layout:"column",id:"midid",defaults:{columnWidth:0.33,},items:this.getItems(c)}]});
a.add(f);},getItems:function(d){var a="";var c=[];for(var g=1;g<d+1;g++){i=g-1;var f="";var e="";if(strSkin=="Dark"){a="#404040";f="1px solid #515151 !important";e="1px solid #515151 !important";}else{if(strSkin=="Light"){a="#ffffff";f="1px solid #f2f2f2 !important";e="1px solid #f2f2f2 !important";}}var b="transchart"+i;
if(d%2===0){if(g!=0&&g%3===0){f="0px solid #f2f2f2 !important";}}else{if(g!=0&&g===d+1){f="0px solid #f2f2f2 !important";}}c.push({xtype:"panel",ui:"newPlainPanel",height:280,style:{background:a+"!important",borderRight:f,borderBottom:e},frame:true,border:true,padding:"10 0 10 0",title:"",id:b});}return c;
},timelineChangeHandler:function(s){var r=s.getValue();if(r=="Any"){this.enableDisableDateFields(true);}else{this.enableDisableDateFields(false);}var a=this.getTransactionsPanelToolbar();var k=Ext.getCmp("transactionschartpanelid");var m=k.jsonData.HiddenFields.remoteURL;var l=k.jsonData.HiddenFields.currentDateFormat;
var f="";var n=a.getComponent("from");if(!Ext.isEmpty(n)&&!Ext.isEmpty(n.getValue())){f=Ext.Date.format(n.getValue(),mgrDateFormat);}var t="";var p=a.getComponent("to");if(!Ext.isEmpty(p)&&!Ext.isEmpty(p.getValue())){t=Ext.Date.format(p.getValue(),mgrDateFormat);}var q="";var o=a.getComponent("fromhr");
if(!Ext.isEmpty(o)&&!Ext.isEmpty(o.getValue())){q=o.getValue();}var c="";var e=a.getComponent("tohr");if(!Ext.isEmpty(e)&&!Ext.isEmpty(e.getValue())){c=e.getValue();}var g="";var j=a.getComponent("frommin");if(!Ext.isEmpty(j)&&!Ext.isEmpty(j.getValue())){g=j.getValue();}var b="";var d=a.getComponent("tomin");
if(!Ext.isEmpty(d)&&!Ext.isEmpty(d.getValue())){b=d.getValue();}var h="F=getTimeJSON&P0=["+r+"]&P1=["+f+"]&P2=["+t+"]&P3=["+q+"]&P4=["+c+"]&P5=["+l+"]&P6=["+g+"]&P7=["+b+"]&C=1&calljson=true";Ext.Ajax.request({url:m,scope:this,method:"POST",params:h,timeout:280000,success:function(u){if(u.status==200&&!Ext.isEmpty(u.responseText)){var w=u.responseText;
var v=Ext.decode(w);this.setTime(v.getTime,r);}},failure:function(){}});},setTime:function(j,g){var c=j.split("\t");var b="",m="";var l="",e="";time_line_obj=new Object();time_line_obj.starttime=c[0];var d="",f="";if(g=="Any"){d=Ext.Date.format(c[6],mgrDateFormat);f=Ext.Date.format(c[7],mgrDateFormat);
}else{d=new Date(c[6]);f=new Date(c[7]);d=Ext.Date.format(c[6],mgrDateFormat);f=Ext.Date.format(c[7],mgrDateFormat);}if(d=="Invalid Date"||d==""){d=c[6];}if(f=="Invalid Date"||f==""){f=c[7];}var k="",h="";k=Ext.Date.format(d,mgrDateFormat);h=Ext.Date.format(f,mgrDateFormat);d=(k=="")?d:k;f=(h=="")?f:h;
this.getTransactionsPanelToolbar().getComponent("from").setValue(d);time_line_obj.endtime=c[1];this.getTransactionsPanelToolbar().getComponent("to").setValue(f);time_line_obj.starthr=c[2];if(g=="Any"){b=c[8];m=c[9];}else{b=c[8];m=c[9];}l=c[10];e=c[11];this.getTransactionsPanelToolbar().getComponent("frommin").setValue(l);
this.getTransactionsPanelToolbar().getComponent("tomin").setValue(e);this.getTransactionsPanelToolbar().getComponent("fromhr").setValue(b);time_line_obj.endhr=c[3];this.getTransactionsPanelToolbar().getComponent("tohr").setValue(m);var a=this.getTransactionsPanelToolbar();},enableDisableDateFields:function(c){var a=this.getTransactionsPanelToolbar();
var d=a.getComponent("from");var f=a.getComponent("to");var e=a.getComponent("fromhr");var b=a.getComponent("tohr");if(c){d.setDisabled(false);f.setDisabled(false);e.setDisabled(false);b.setDisabled(false);}else{d.setDisabled(true);f.setDisabled(true);e.setDisabled(true);b.setDisabled(true);}},createHighStockChart:function(g,h){var j=[],x=[],q=0;
var B="";var l="";var n="";var f="";var u="";var v="";var t="";var o="";var b="";var z=0;var m=0;var k=[];var a="";var r=Ext.getCmp("transactionschartpanelid");var s=r.jsonData.HiddenFields.measurelst;var c=s.split(",");var d="Web";var e=Ext.getCmp("firstid");var w=Ext.getCmp("midid");var y=Ext.getCmp("lastid");
if(!Ext.isEmpty(errorPanel)&&errorPanel==true){r.update("");if(!Ext.isEmpty(e)){r.remove(e);}if(!Ext.isEmpty(w)){r.remove(w);}if(!Ext.isEmpty(y)){r.remove(y);}}var A=this;var p=Ext.getCmp("transactionschartpanelid");Ext.Ajax.request({url:g,params:h,scope:this,timeout:6000000,success:function(G){if(G.status==200&&!Ext.isEmpty(G)){var L=G.responseText;
if(!Ext.isEmpty(L)){var aq=Ext.decode(L);if(!Ext.isEmpty(aq)){var T=[];var D="";var C="";var V="";var ab=[];var O=new Array();var N=new Array();var H=new Array();var ad=new Array();var J=new Array();var ai=new Array();var P=new Array();var W=new Array();var F=new Array();var ac=new Array();var ah=new Array();
var K=0;var E=0;var al=0;for(var ap in aq){if(ap.indexOf("chart")>-1){K=K+1;}}var aa=Ext.getCmp("transactionschartpanelid");if(aa!=null&&aa!=undefined&&!Ext.isEmpty(aa)){var Z=K%3;var I=Math.floor(K/3);var an=I;if(Z>0){an=I+1;}var ak=an*300;var ar=40;ak=ak+ar;aa.setHeight(ak);}A.createDivforHighChart(K);
if(K>0){var Y=new Object();Y["fontFamily"]="Arial";Y["fontSize"]="11px";Y["axisLabelGridColor"]=(strSkin=="Light")?"#e1e1e1":"#666666";Y["axisLabelColor"]=(strSkin=="Light")?"#969696":"#c6c6c6";Y["axisLabelFontFmy"]="Arial";Y["axisLabelFontSize"]="11px";Y["axisLabelLineColor"]=(strSkin=="Light")?"#e1e1e1":"#666666";
Y["axisLabelMinorGrid"]=(strSkin=="Light")?"#e1e1e1":"#666666";Y["axisLabelTickColor"]=(strSkin=="Light")?"#e1e1e1":"#666666";Y["axisTitleColor"]=(strSkin=="Light")?"#606060":"#c0c0c0";Y["axisTitleFontFmy"]="Arial";Y["axisTitleFontSize"]="11px";Y["TooltipFontFmy"]="Arial";Y["TooltipFontSize"]="11px";
Y["TooltipBgColor"]=(strSkin=="Light")?"white":"#161616";Y["TooltipBorderColor"]=(strSkin=="Light")?"black":"#0c0c0c";Y["legendFontFmy"]="Arial";Y["legendFontSize"]="12px";Y["legendColor"]=(strSkin=="Light")?"#2a292a":"#c6c6c6";Y["titleFontClr"]=(strSkin=="Light")?"#2a292a":"#c6c6c6";Y["titleFontFmy"]="Roboto-Bold";
Y["titleFontSize"]="13px";Y["lineThickness"]="2";var S=aq["styles"];for(var am in aq){var ao=aq[am];if(am!="styles"&&am!="chartKey"&&ao.indexOf("^eg^")==-1){for(var R in ao){if(!isNaN(R)){B=ao[R]["title"];n=ao[R]["fmts"];f=ao[R]["axislabel"];t=ao[R]["xmax"];o=ao[R]["xmin"];v=ao[R]["max"];l=ao[R]["color"],b=ao[R]["lineWidth"],j[R]={name:ao[R]["name"],data:ao[R]["data"],color:ao[R]["color"],dataGrouping:{enabled:false}};
}ac.push(l);}ah.push(B);H.push(n);ad.push(t);J.push(o);ai.push(v);P.push(f);W.push(j);F.push(z);if(z==2||(this.tab=="emulated"&&z==1)){var af=j.length;var aj="<table align='right'style='margin-top:-10px;'><tr>";var M="";if(af!=null&&af!=""){for(var ae=0;ae<af;ae++){if(ae!=(af-1)){M="15px";}else{M="0px";
}var U=j[ae].name;if(U!=null&&U.indexOf("^")>-1){var Q=U.substring(0,U.lastIndexOf("^"));aj=aj+"<td width='10' height='10' align='center'>";aj=aj+"<table cellpadding='0' cellspacing='1' border='0'>";aj=aj+"<tr>";aj=aj+"<td nowrap style='width:40px;padding-right:10px; height:10px' >"+Q+"</td>";}else{aj=aj+"<td width='10' height='10' align='center'>";
aj=aj+"<table cellpadding='0' cellspacing='1' border='0'>";aj=aj+"<tr>";aj=aj+"<td width = '10' style='vetical-align:top' class='linesquare_white' height='5'><div style='background:"+ac[ae]+";height:8px;width:8px' ><div></td></tr></table></td>";aj=aj+"<td nowrap class='font_normal11' style='padding-left:5px;padding-right:"+M+"; height:35px' >"+U+"</td>";
}}}aj=aj+"</tr></table>";var ag=Ext.get("legends");if(!Ext.isEmpty(ag)){Ext.getCmp("legends").update(aj);}}if(!Ext.isEmpty(p.isNotAreaChart)){loadTransHCGrap(j,z,f,n,"",v,t,o,b,Y,true);}else{loadTransHCGrap(j,z,f,n,"",v,t,o,b,Y);}Ext.getCmp("transchart"+z).setTitle('<span style="margin-top:20px;display:block;text-align:center" class="font_bold13 fontStyleRobot">'+B+"</span>");
z=z+1;al=al+1;if(!Ext.isEmpty(r.getEl())&&r.getEl()!=null&&r.getEl()!="undefined"){r.getEl().unmask();}}else{if(am!="styles"&&am!="chartKey"&&ao.indexOf("^eg^")>-1){var X='<div style="margin:7% 20% auto 30%"><img src="/final/images/'+strSkin+'/nomeasures_custom.png" /></div>';if(al<K){var at=ao.substring(4);
Ext.getCmp("transchart"+al).setTitle('<span style="margin-top:20px;display:block;text-align:center" class="font_bold13 fontStyleRobot">'+at+"</span>");Ext.getCmp("transchart"+al).update(X);z=z+1;al=al+1;}}}}errorPanel=false;}else{this.displayErrorMsg();}errorPanel=false;}else{this.displayErrorMsg();}errorPanel=false;
}else{this.displayErrorMsg();}}},failure:function(){}});},displayErrorMsg:function(){errorPanel=true;var a=Ext.getCmp("transactionschartpanelid");var c='<table width="100%" height="100%"><tr style="text-align:center;" width="100%" height="100%"><td width="100%" height="100%">';c+='<div style="text-align:center"><div class="iconInformation" style="margin:0px auto"></div><div class="font_normal11">No measure available for the current selection</div></div>';
c+="</td></tr></table>";a.setHeight(screen.height-465);a.setLoading(false);a.removeAll();var b=Ext.create("Ext.panel.Panel",{layout:"fit",html:c});a.add(b);},getCurrentDateTime:function(){var e="";var b="";var k="";var c="";var f="";var g="";var d=this.getTransactionsPanelToolbar();var l=d.getComponent("timeline");
if(!Ext.isEmpty(l)&&!Ext.isEmpty(l.getValue())){f=l.getValue();}var a=d.getComponent("from");if(!Ext.isEmpty(a)){if(!a.isDisabled()&&!Ext.isEmpty(a.getValue())){k=Ext.Date.format(a.getValue(),mgrDateFormat);}else{if(!Ext.isEmpty(time_line_obj)){k=time_line_obj.starttime;}else{k=Ext.Date.format(a.getValue(),mgrDateFormat);
}}}var j=d.getComponent("to");if(!Ext.isEmpty(j)){if(!j.isDisabled()&&!Ext.isEmpty(j.getValue())){c=Ext.Date.format(j.getValue(),mgrDateFormat);}else{if(!Ext.isEmpty(time_line_obj)){c=time_line_obj.endtime;}else{c=Ext.Date.format(j.getValue(),mgrDateFormat);}}}var h=d.getComponent("fromhr");if(!Ext.isEmpty(h)){if(!h.isDisabled()&&!Ext.isEmpty(h.getValue())){b=h.getValue();
}else{if(!Ext.isEmpty(time_line_obj)){b=time_line_obj.starthr;}else{b=h.getValue();}}}var m=d.getComponent("tohr");if(!Ext.isEmpty(m)){if(!m.isDisabled()&&!Ext.isEmpty(m.getValue())){e=m.getValue();}else{if(!Ext.isEmpty(time_line_obj)){e=time_line_obj.endhr;}else{e=m.getValue();}}}if(!Ext.isEmpty(a)&&!Ext.isEmpty(j)){k=Ext.Date.dateFormat(a.getValue(),"m/d/Y");
c=Ext.Date.dateFormat(j.getValue(),"m/d/Y");g=f+":"+k+":"+b+":"+c+":"+e;}return g;},displayGraph:function(){var B=this.getCurrentDateTime();var h="highcharts";if(h.indexOf("highchart")>-1){this.getTransactionComboMode().hide();}else{this.getTransactionComboMode().hide();}var t=Ext.getCmp("transactionschartpanelid");
if(!Ext.isEmpty(t)&&!Ext.isEmpty(t.jsonData)){var f=t.jsonData;var p="";var l="";var C="";var y="";var n="";var c="";var b="";var s="";var z="";var a=this.getTransactionsPanelToolbar();var x=a.getComponent("mode");if(!Ext.isEmpty(x)&&!Ext.isEmpty(x.getValue())){p=x.getValue();}var u=a.getComponent("from");
if(!Ext.isEmpty(u)){if(!u.isDisabled()&&!Ext.isEmpty(u.getValue())){l=Ext.Date.format(u.getValue(),mgrDateFormat);}else{if(!Ext.isEmpty(time_line_obj)){l=time_line_obj.starttime;}else{l=Ext.Date.format(u.getValue(),mgrDateFormat);}}}var w=a.getComponent("to");if(!Ext.isEmpty(w)){if(!w.isDisabled()&&!Ext.isEmpty(w.getValue())){C=Ext.Date.format(w.getValue(),mgrDateFormat);
}else{if(!Ext.isEmpty(time_line_obj)){C=time_line_obj.endtime;}else{C=Ext.Date.format(w.getValue(),mgrDateFormat);}}}var v=a.getComponent("fromhr");if(!Ext.isEmpty(v)){if(!v.isDisabled()&&!Ext.isEmpty(v.getValue())){y=v.getValue();}else{if(!Ext.isEmpty(time_line_obj)){y=time_line_obj.starthr;}else{y=v.getValue();
}}}var k=a.getComponent("tohr");if(!Ext.isEmpty(k)){if(!k.isDisabled()&&!Ext.isEmpty(k.getValue())){c=k.getValue();}else{if(!Ext.isEmpty(time_line_obj)){c=time_line_obj.endhr;}else{c=k.getValue();}}}var n="";var o=a.getComponent("frommin");if(!Ext.isEmpty(o)&&!Ext.isEmpty(o.getValue())){n=o.getValue();
}var b="";var e=a.getComponent("tomin");if(!Ext.isEmpty(e)&&!Ext.isEmpty(e.getValue())){b=e.getValue();}var j=this.getTransactionComboTimeline();if(j.getValue()=="Any"){var z=u.getName();var A=w.getName();var q=u.getValue();var g=w.getValue();var m=curDateTime;var r=new Date(m);var l=formatDate(q,"MM/dd/yyyy");
var C=formatDate(g,"MM/dd/yyyy");if(dateValidation(l,C,parseInt(y),parseInt(c),0,0)==-1){Ext.Msg.alert("Error",z);return;}}this.anyStartTime=l;this.anyEndTime=C;this.anyStartHr=y;this.anyEndHr=c;var d=a.getComponent("timeline");if(!Ext.isEmpty(d)&&!Ext.isEmpty(d.getValue())){s=d.getValue();}var t=Ext.getCmp("transactionschartpanelid");
var B=this.getCurrentDateTime();var h="highcharts";this.transactionMeasuresParam={startTrans:"",site:f.HiddenFields.siteName,comp:f.HiddenFields.compName,test:f.HiddenFields.testForTab,measure:f.HiddenFields.measurelst,gformat:"graph",chartType:h,GraphSize:"true",monitorSkin:f.HiddenFields.monitorSkin,mode:"2D",starttime:u.getRawValue(),endtime:w.getRawValue(),starthr:y,endhr:c,startmin:n,endmin:b,time_line:s,all_trans_names:f.HiddenFields.all_trans_names,msmt_host:f.HiddenFields.mHost,endTrans:"",isAreaChart:isAreaChart,isLogonType:isLogonType};
if(h.indexOf("highchart")>-1){this.createHighStockChart(this.transactionMeasuresChartURL,this.transactionMeasuresParam);this.getTransactionComboMode().hide();}else{this.getTransactionComboMode().hide();t.getEl().mask("Loading...");Ext.Ajax.request({url:this.transactionMeasuresChartURL,params:this.transactionMeasuresParam,method:"get",scope:this,success:function(E){var D=Ext.getCmp("transactionschartpanelid");
D.getEl().unmask();this.createGraphs(E);},failure:function(){var D=Ext.getCmp("transactionschartpanelid");D.getEl().unmask();}});}}},displayGraphInitially:function(j){var e=j.HiddenFields.mode;var k=j.HiddenFields.starttime;var b=j.HiddenFields.endtime;var m=j.HiddenFields.startHr;var a=j.HiddenFields.endHr;
var d=j.HiddenFields.timeline;var c=j.HiddenFields.startMin;var h=j.HiddenFields.endMin;var g=this.getCurrentDateTime();var l="highcharts";if(requestParams.refresh==true){e=requestParams.mode;k=j.HiddenFields.starttime;b=j.HiddenFields.endtime;m=j.HiddenFields.startHr;a=j.HiddenFields.endHr;c=j.HiddenFields.startMin;
h=j.HiddenFields.endMin;d=requestParams.timeline;}if(isRefreshing){if(timeLineValueForRefresh!=null&&timeLineValueForRefresh!=""&&timeLineValueForRefresh!=undefined){if(timeLineValueForRefresh!="Any"){d=timeLineValueForRefresh;}else{if(timeLineValueForRefresh=="Any"){d=timeLineValueForRefresh;if(fromDateValueForRefresh!=null&&fromDateValueForRefresh!=""&&fromDateValueForRefresh!=undefined){k=fromDateValueForRefresh;
}if(toDateValueForRefresh!=null&&toDateValueForRefresh!=""&&toDateValueForRefresh!=undefined){b=toDateValueForRefresh;}if(fromHrValueForRefresh!=null&&fromHrValueForRefresh!=""&&fromHrValueForRefresh!=undefined){m=fromHrValueForRefresh;}if(toHrValueForRefresh!=null&&toHrValueForRefresh!=""&&toHrValueForRefresh!=undefined){a=toHrValueForRefresh;
}if(fromMinValueForRefresh!=null&&fromMinValueForRefresh!=""&&fromMinValueForRefresh!=undefined){c=fromMinValueForRefresh;}if(toMinValueForRefresh!=null&&toMinValueForRefresh!=""&&toMinValueForRefresh!=undefined){h=toMinValueForRefresh;}}}}}if(!Ext.isEmpty(k)&&!Ext.isEmpty(b)){k=Ext.Date.format(new Date(k),mgrDateFormat);
b=Ext.Date.format(new Date(b),mgrDateFormat);}this.transactionMeasuresParam={site:j.HiddenFields.siteName,comp:j.HiddenFields.compName,test:j.HiddenFields.testForTab,measure:j.HiddenFields.measurelst,gformat:"graph",GraphSize:"true",monitorSkin:j.HiddenFields.monitorSkin,mode:"2D",starttime:k,endtime:b,starthr:m,startmin:c,endhr:a,endmin:h,time_line:d,all_trans_names:j.HiddenFields.all_trans_names,msmt_host:j.HiddenFields.mHost,isAreaChart:isAreaChart,isLogonType:isLogonType};
if(!Ext.isEmpty(j.HiddenFields)){var g=this.getCurrentDateTime();var l="highcharts";if(l!=null){if(l.indexOf("highchart")>-1){this.getTransactionComboMode().hide();this.createHighStockChart(this.transactionMeasuresChartURL,this.transactionMeasuresParam);}else{this.getTransactionComboMode().hide();var f=this.getTransactionsChartPanel();
Ext.Ajax.request({url:this.transactionMeasuresChartURL,params:this.transactionMeasuresParam,scope:this,success:function(n){this.createGraphs(n);},failure:function(){}});}}}},compFilterByComboOnChange:function(d){var k=requestParams.userName;var b="";if(Ext.getCmp("filterByCombo")!=null&&Ext.getCmp("filterByCombo")!=undefined&&Ext.getCmp("filterByCombo").getValue()!=null&&Ext.getCmp("filterByCombo").getValue()!="null"){b=Ext.getCmp("filterByCombo").getValue();
}var e="";if(Ext.getCmp("subFilterCombo")!=null&&Ext.getCmp("subFilterCombo")!=undefined&&Ext.getCmp("subFilterCombo").getValue()!=null&&Ext.getCmp("subFilterCombo").getValue()!="null"){e=Ext.getCmp("subFilterCombo").getValue();}var c="";if(Ext.getCmp("componentTypCombo")!=null&&Ext.getCmp("componentTypCombo")!=undefined&&Ext.getCmp("componentTypCombo").getValue()!=null&&Ext.getCmp("componentTypCombo").getValue()!="null"){c=Ext.getCmp("componentTypCombo").getValue();
}var f="";if(Ext.getCmp("nickName")!=null&&Ext.getCmp("nickName")!=undefined&&Ext.getCmp("nickName").getValue()!=null&&Ext.getCmp("nickName").getValue()!="null"){f=Ext.getCmp("nickName").getValue();}var a="";var h=Ext.getCmp("perPanel").itemId;if(h=="system"||h=="System"){a="/final/monitor/comparisonSystem.jsp?treeTitle=System";
}else{if(h=="components"||h=="Components"){a="/final/monitor/comparisonComponent.jsp?treeTitle=Component";}else{if(h=="network"||h=="Network"){a="/final/monitor/comparisonComponent.jsp?treeTitle=Network";}}}a=a+"&filterBy="+b;if(requestParams.fromPageView!=null&&requestParams.fromPageView=="CitrixDashboard"){a=a+"&timeline="+timeline;
}var g=Ext.getCmp("subFilterCombo");var j=false;a=a+"&isCitrixComp=true&isfromCitrix=true&fromServiceHomePage="+isFromHomePage+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&serviceName="+encodeURIComponent(filterByParamFlag);if(b=="Component"||b=="System"||b=="Network"){g.hide();
j=true;}else{}sortState="";DirProperty="";if(j){Ext.getCmp("perPanel").loadTab(a,"","","","","","citrixDashboardForComponent");Refurl=a;}else{Ext.Ajax.request({url:a,scope:this,timeout:280000,success:function(l){var n=l.responseText;var m=Ext.decode(n);g.getStore().loadRawData(m.subFilterOptions);g.setValue(m.pageParams.selectedSubFilterOption);
g.setFieldLabel(m.pageParams.subFilterLabel);g.show();}});}},compSubFilterComboOnChange:function(h){var g=requestParams.userName;var b="";if(Ext.getCmp("filterByCombo")!=null&&Ext.getCmp("filterByCombo")!=undefined&&Ext.getCmp("filterByCombo").getValue()!=null&&Ext.getCmp("filterByCombo").getValue()!="null"){b=Ext.getCmp("filterByCombo").getValue();
}var d="";if(Ext.getCmp("subFilterCombo")!=null&&Ext.getCmp("subFilterCombo")!=undefined&&Ext.getCmp("subFilterCombo").getValue()!=null&&Ext.getCmp("subFilterCombo").getValue()!="null"){d=Ext.getCmp("subFilterCombo").getValue();}var e="";if(Ext.getCmp("componentTypCombo")!=null&&Ext.getCmp("componentTypCombo")!=undefined&&Ext.getCmp("componentTypCombo").getValue()!=null&&Ext.getCmp("componentTypCombo").getValue()!="null"){e=Ext.getCmp("componentTypCombo").getValue();
}var a="";if(Ext.getCmp("nickName")!=null&&Ext.getCmp("nickName")!=undefined&&Ext.getCmp("nickName").getValue()!=null&&Ext.getCmp("nickName").getValue()!="null"){a=Ext.getCmp("nickName").getValue();}var c="";var f=Ext.getCmp("perPanel").itemId;sortState="";DirProperty="";if(f=="system"||f=="System"){c="/final/monitor/comparisonSystem.jsp?treeTitle=System";
c=c+"&filterBy="+b+"&subFilter="+encodeURIComponent(d)+"&componentNameSearch="+encodeURIComponent(a)+"&serviceName="+encodeURIComponent(filterByParamFlag)+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone;var c=c;c=c+"&isfromCitrix=true";Refurl=c;Ext.getCmp("perPanel").loadTab(c,"","","","","","citrixDashboardForComponent");
}else{if(f=="components"||f=="Components"){c="/final/monitor/comparisonComponent.jsp?treeTitle=Component";c=c+"&filterBy="+b+"&subFilter="+encodeURIComponent(d);if(requestParams.fromPageView!=null&&requestParams.fromPageView=="CitrixDashboard"){c=c+"&timeline="+encodeURIComponent(timeline);}c=c+"&isCitrixComp=true&isfromCitrix=true&fromServiceHomePage="+isFromHomePage+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&serviceName="+encodeURIComponent(filterByParamFlag);
Ext.Ajax.request({url:c,scope:this,timeout:280000,success:function(k){var m=k.responseText;var l=Ext.decode(m);var j=Ext.getCmp("componentTypCombo");j.getStore().loadRawData(l.componentTypeOptions);j.setValue(l.componentTypeOptions.selectedComponentType);j.setFieldLabel(l.componentTypeOptions.componentTypeLabel);
}});}else{if(f=="network"||f=="Network"){c="/final/monitor/comparisonComponent.jsp?treeTitle=Network";c=c+"&filterBy="+b+"&subFilter="+encodeURIComponent(d);if(requestParams.fromPageView!=null&&requestParams.fromPageView=="CitrixDashboard"){c=c+"&timeline="+encodeURIComponent(timeline);}c=c+"&isCitrixComp=true&isfromCitrix=true&fromServiceHomePage="+isFromHomePage+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&serviceName="+encodeURIComponent(filterByParamFlag);
Ext.Ajax.request({url:c,scope:this,timeout:280000,success:function(k){var m=k.responseText;var l=Ext.decode(m);var j=Ext.getCmp("componentTypCombo");j.getStore().loadRawData(l.componentTypeOptions);j.setValue(l.componentTypeOptions.selectedComponentType);j.setFieldLabel(l.componentTypeOptions.componentTypeLabel);
}});}}}},componentTypeComboOnChange:function(x){var p=requestParams.treeFlag_SBD;var a=requestParams.outsideService_SBD;var w=requestParams.titleText_SBD;var u=requestParams.selectNode_SBD;var j=requestParams.isEmulTrans_SBD;var y=requestParams.serviceState_SBD;var h=requestParams.serviceName;var f=requestParams.serviceState;
var d=requestParams.isServiceBusiDash;var g=requestParams.userName;var e=requestParams.stateName;e=(e==null||e==undefined||e=="null")?"":e;var o=requestParams.fromPageView;var n=x.getValue();compListType=n;var k="";if(Ext.getCmp("filterByCombo")!=null&&Ext.getCmp("filterByCombo")!=undefined){k=Ext.getCmp("filterByCombo").getValue();
}var b="";if(Ext.getCmp("subFilterCombo")!=null&&Ext.getCmp("subFilterCombo")!=undefined&&Ext.getCmp("subFilterCombo").getValue()!=null&&Ext.getCmp("subFilterCombo").getValue()!="null"){b=Ext.getCmp("subFilterCombo").getValue();}if(Ext.isEmpty(b)||b==null||b==undefined){if(!Ext.isEmpty(k)&&k!=null&&k!=undefined&&k.toLowerCase().indexOf("component")>-1&&!Ext.isEmpty(userMappingApplisTo)&&userMappingApplisTo!=null&&userMappingApplisTo!=undefined){if(userMappingApplisTo.indexOf(":")>0){b=userMappingApplisTo.substring(userMappingApplisTo.indexOf(":")+1);
}}}if(Ext.isEmpty(b)||b==null||b==undefined){b=n;}var l="";if(Ext.getCmp("nickName")!=null&&Ext.getCmp("nickName")!=undefined){l=Ext.getCmp("nickName").getValue();}var v=Ext.getCmp("dashmenu_model_id");var t=v.getStore();var q=v.forceClickKey;var s=requestParams.activeView;var c="";var m=Ext.getCmp("perPanel").itemId;
if(m=="system"||m=="System"){c="/final/monitor/comparisonSystem.jsp?treeTitle=System";}else{if(m=="components"||m=="Components"){c="/final/monitor/comparisonComponent.jsp?treeTitle=Component";}else{if(m=="network"||m=="Network"){c="/final/monitor/comparisonComponent.jsp?treeTitle=Network";}}}selected_CompType_st=n;
compTypeChanged=n;c=c+"&isCitrixComp=true&filterBy="+k+"&subFilter="+encodeURI(b)+"&componentType="+encodeURI(n)+"&componentNameSearch=&fromPageView=CitrixDashboard&userName="+encodeURI(g)+"&selectedState="+e;sortState="";DirProperty="";if(!Ext.isEmpty(requestParams.isServiceBusiDetails)&&requestParams.isServiceBusiDetails!=undefined&&requestParams.isServiceBusiDetails!=null){c=c+"&isServiceBusiViewMetrics="+requestParams.isServiceBusiDetails+"&treeFlag_SBD="+p+"&outsideService_SBD="+a+"&titleText_SBD="+w+"&selectNode_SBD="+u+"&serviceFromZone="+h+"&isEmulTrans_SBD="+j+"&serviceName="+h+"&serviceState_SBD="+y+"&isServiceBusiDash="+d;
}if(requestParams.fromPageView!=null&&requestParams.fromPageView=="CitrixDashboard"){c=c+"&timeline="+encodeURIComponent(timeline);}var r="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){r=Ext.getCmp("dashListComId").getValue();
}c=c+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+r+"&dashboard_name="+dashboard+"&firstTime=true&view_name="+s+"&fromServiceHomePage="+isFromHomePage+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&serviceName="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup+"&isCitrixComp=true&fromSerComboChange="+fromSerComboChange;
Refurl=c;Ext.getCmp("perPanel").loadTab(c,"","","","","","citrixDashboardForComponent");},systemsComboChange:function(g){selected_CompType_st="";var h="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){h=Ext.getCmp("dashListComId").getValue();
}var e=Ext.getCmp("dashmenu_model_id");var c=e.getStore();var d=e.forceClickKey;var b=requestParams.activeView;SysComponentType=g.getValue();var a=Ext.getCmp("systemViewMeasuresgridpanel");var f=a.url;f+="&selectNode=Service$cap$"+encodeURIComponent(filterByParamFlag)+"&componentType="+encodeURI(SysComponentType)+"&selectedParam="+encodeURIComponent(filterByParamFlag)+"&currentTab=Systems&isSite=true&aggregateTab=false&hasTransactions=true&hasEmulatedTransactions=false&fromHomepage=&hasLogonSimulations=true&refresh=true&action=Systems&topoSegment="+encodeURIComponent(filterByParamFlag)+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_name="+dashboard+"&dashboard_mapping="+h+"&view_name="+b+"&fromServiceHomePage="+isFromHomePage+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
a.loadTab(f,"servicesSys");},compSubmitButtonClicked:function(){componentNameSearch="";var j=requestParams.fromPageView;var q=requestParams.userName;var s=requestParams.stateName;s=(s==null||s==undefined||s=="null")?"":s;if(s==null||s==undefined||s==""){s=requestParams.selectedState;}s=(s==null||s==undefined||s=="null")?"":s;
var b="";if(Ext.getCmp("filterByCombo")!=null&&Ext.getCmp("filterByCombo")!=undefined){b=Ext.getCmp("filterByCombo").getValue();}var g="";if(Ext.getCmp("subFilterCombo")!=null&&Ext.getCmp("subFilterCombo")!=undefined&&Ext.getCmp("subFilterCombo").getValue()!=null&&Ext.getCmp("subFilterCombo").getValue()!="null"){g=Ext.getCmp("subFilterCombo").getValue();
}var d="";if(Ext.getCmp("componentTypCombo")!=null&&Ext.getCmp("componentTypCombo")!=undefined&&Ext.getCmp("componentTypCombo").getValue()!=null&&Ext.getCmp("componentTypCombo").getValue()!="null"){d=Ext.getCmp("componentTypCombo").getValue();}var l="";if(Ext.getCmp("nickName")!=null&&Ext.getCmp("nickName")!=undefined&&Ext.getCmp("nickName").getValue()!=null&&Ext.getCmp("nickName").getValue()!="null"){l=Ext.getCmp("nickName").getValue();
}var p="";if(Ext.getCmp("sortByCombo")!=null&&Ext.getCmp("sortByCombo")!=undefined&&Ext.getCmp("sortByCombo").getValue()!=null&&Ext.getCmp("sortByCombo").getValue()!="null"){p=Ext.getCmp("sortByCombo").getValue();}var a="";var o=Ext.getCmp("perPanel").itemId;if(o=="system"||o=="System"){a="/final/monitor/comparisonSystem.jsp?treeTitle=System";
a=a+"&filterBy="+b+"&subFilter="+encodeURIComponent(g)+"&componentNameSearch="+encodeURIComponent(l)+"&viewPageTitle="+encodeURIComponent(requestParams.viewPageTitle);}else{if(o=="components"||o=="Components"){a="/final/monitor/comparisonComponent.jsp?treeTitle=Component";a=a+"&isCitrixComp=true&filterBy="+b+"&subFilter="+encodeURIComponent(g)+"&componentType="+encodeURIComponent(d)+"&componentNameSearch="+encodeURIComponent(l)+"&fromPageView="+j+"&userName="+encodeURIComponent(q)+"&selectedState="+s+"&viewPageTitle="+encodeURIComponent(requestParams.viewPageTitle);
}else{if(o=="network"||o=="Network"){a="/final/monitor/comparisonComponent.jsp?treeTitle=Network";a=a+"&isCitrixComp=true&filterBy="+b+"&subFilter="+encodeURIComponent(g)+"&componentType="+encodeURIComponent(d)+"&componentNameSearch="+encodeURIComponent(l)+"&fromPageView="+j+"&userName="+encodeURIComponent(q)+"&selectedState="+s+"&viewPageTitle="+encodeURIComponent(requestParams.viewPageTitle);
}}}if(requestParams.fromPageView!=null&&requestParams.fromPageView=="CitrixDashboard"){a=a+"&timeline="+encodeURIComponent(timeline);}var a=a+"&serviceName="+encodeURIComponent(filterByParamFlag);var f="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){f=Ext.getCmp("dashListComId").getValue();
}var n=Ext.getCmp("dashmenu_model_id");var m=n.getStore();var r=n.forceClickKey;var c="";for(var h=0;h<m.getCount();h++){var e=m.getAt(h).data.caption;if(requestParams.activeViewIndex==h){c=m.getAt(h).data.name;break;}}a=a+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+f+"&dashboard_name="+dashboard+"&view_name="+c+"&fromServiceHomePage="+isFromHomePage+"&fromServiceHomePage="+isFromHomePage+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone;
Refurl=a;Ext.getCmp("perPanel").loadTab(a,"","","","","","citrixDashboardForComponent");},geoComboOnChange:function(n,f,t){window.clearInterval(timerId);timerId=window.setInterval("execute()",panelRefFreq);if(Ext.isEmpty(t)||typeof t=="object"){t=true;}perVal=0;var s=Ext.getCmp("TimeLineId");var m=null;
if(s!=null&&s!=undefined){m=s.getValue();}if(m==null||m==undefined||m==""){m="Current";}var w=Ext.getCmp("dashmenu_model_id");var v=w.getStore();var o=w.forceClickKey;var r=requestParams.activeView;var d="";var c="";if(!Ext.isEmpty(r)&&r.trim()=="Geo_View"){var a=Ext.getCmp("countryComboId");var k=Ext.getCmp("regionComboId");
var b=null;if(n!=null&&n!=undefined){b=n.id;}if(a!=null&&a!=undefined&&b!=null&&b!=undefined&&b==a.id){d=a.getValue();if(d!=null&&d!=undefined&&d=="World"){d="World";c="";}else{if(!Ext.isEmpty(f)&&typeof f=="string"&&d!=f){d=f;}try{var l=Ext.getCmp("region_label");var a=Ext.getCmp("countryComboId");var p=a.getRawValue();
if(p!=undefined&&p!=null){l.setText(p);}}catch(x){}c="Geo_Country_View";}}else{if(k!=null&&k!=undefined&&b!=null&&b!=undefined&&b==k.id){d=k.getValue();if(!Ext.isEmpty(f)&&typeof f=="string"&&d!=f){d=f;}if(d!=null&&d!=undefined&&d=="AllRegion"){if(a!=null&&a!=undefined&&a.getValue()!="World"){if(!Ext.isEmpty(o)){d=o;
}else{d=a.getValue();}c="Geo_Country_View";}else{d="";c="";}}else{try{var g=Ext.getCmp("region_icon");var a=Ext.getCmp("countryComboId");var u=a.getRawValue();if(u!=undefined&&u!=null){g.setText('<span style="float:left" class="geoDrilldownLink">'+u+'</span><div class="geoDrilldownArrow"></div>');}var j=Ext.getCmp("city_icon");
var k=Ext.getCmp("regionComboId");var e=k.getRawValue();if(e!=undefined&&e!=null){j.setText(e);}}catch(h){}c="Geo_Region_View";}}}if(d==null||d==undefined||d==""){d="";}}else{if(!Ext.isEmpty(r)&&r.trim()=="Logon_View"){d="Logon_View";}}var q="/final/servlet/com.eg.EgCommonDashboardController?iniName="+iniName+"&user_name="+encodeURI(user_name)+"&action=loadViewData&subject="+encodeURI(dashboard)+"&time_line="+encodeURI(m)+"&isUserBased=true&view_name="+encodeURI(r)+"&filterName="+encodeURI(d)+"&filterViewName="+encodeURI(c)+"&dashboard_mapping="+encodeURI(dashboard_mapping)+"&fromSerComboChange="+fromSerComboChange+"&dashboard_name="+dashboard;
if(!Ext.isEmpty(isFromHomePage)&&isFromHomePage){q+="&fromServiceHomePage="+isFromHomePage+"&appliesTo="+userMappingApplisTo+"&isFromServiceMenu="+isFromServiceMenu;}if(!Ext.isEmpty(isFromZone)&&isFromZone!=null&&isFromZone!="undefined"&&isFromZone!="null"&&isFromZone=="true"){q+="&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&isFromZoneMenu="+isFromZoneMenu;
}Ext.Ajax.request({url:q,method:"POST",scope:this,async:t,timeout:280000,success:function(D,z){var C=D.responseText;var L=true;if(C!=null&&C!=undefined){var J=Ext.decode(C);if(!Ext.isEmpty(r)&&r.trim()=="Geo_View"){if(J!=null&&J!=undefined){if(J.loadViewDetails!=null&&J.loadViewDetails!=undefined){var K=J.loadViewDetails;
if(K!=null&&K!=undefined&&K.length>0){if(!Ext.isEmpty(K[0])&&K[0]!=undefined){var G=Ext.getCmp("geo_first_header_id");G.setTitle(K[0].Geo_Block_1_Title);}if(!Ext.isEmpty(K[1])&&K[1]!=undefined){Ext.getCmp("geo_overviewpanel_id").updateData(K[1].Geo_Block_1_Value);}if(!Ext.isEmpty(K[2])&&K[2]!=undefined){if(K[2].Geo_Block_2_Value[0].resultArray!=null&&K[2].Geo_Block_2_Value[0].resultArray.length>0){if(c==null||c==undefined||c==""){var y=Ext.getCmp("countryComboId");
if(!Ext.isEmpty(y)&&y!=undefined){y.show();y.getStore().loadRawData(K[2].Geo_Block_2_Value[0].countryArray);y.setValue(K[2].Geo_Block_2_Value[0].selectedCountry);}var E=Ext.getCmp("regionComboId");if(!Ext.isEmpty(E)&&E!=undefined){E.show();E.getStore().loadRawData();E.setValue("");E.hide();}}else{if(c!=null&&c!=undefined&&c=="Geo_Country_View"){var E=Ext.getCmp("regionComboId");
if(!Ext.isEmpty(E)&&E!=undefined){E.show();E.getStore().loadRawData(K[2].Geo_Block_2_Value[0].regionArray);E.setValue(K[2].Geo_Block_2_Value[0].selectedRegion);}}else{if(c!=null&&c!=undefined&&c=="Geo_Region_View"){var E=Ext.getCmp("regionComboId");if(!Ext.isEmpty(E)&&E!=undefined){E.setValue(d);}}}}}Ext.getCmp("geo_id_map").updateData(K[2].Geo_Block_2_Value[0],false);
try{if(c==null||c==undefined||c==""){Ext.getCmp("geo_map_conainer_id").remove("geo_mapdetails_id");}else{Ext.getCmp("geo_id_mapdetails").updateData(K[2].Geo_Block_2_Value[0],K);}}catch(I){Ext.getCmp("geo_map_conainer_id").add({xtype:"container",id:"geo_mapdetails_id",flex:0.3,width:210,padding:"20 10 10 10",items:[{xtype:"geomapdetails",id:"geo_id_mapdetails",height:Ext.getCmp("geo_map_conainer_id").getHeight()-40,jsonData:K[2].Geo_Block_2_Value[0],fullJson:K}]});
}}if(!Ext.isEmpty(K[3])&&K[3]!=undefined){}if(!Ext.isEmpty(K[4])&&K[4]!=undefined){if(c==null||c==undefined||c==""){Ext.getCmp("geo_alerts3x1_id").flex=0.4;Ext.getCmp("geo_alerts3x1_id").getEl().setStyle({padding:"10 15 10 10"});Ext.getCmp("geo_alerts3x1_id").removeAll(true);try{Ext.getCmp("geo_alerts3x1_id").add({xtype:"overviewctxpanel",id:"geo_overviewpanel3x1_alert_id",jsonData:K[4].Geo_Block_3_Value,key:"overview",layout:{type:"vbox",align:"stretch"}});
}catch(I){}Ext.getCmp("cardID").doLayout();}else{Ext.getCmp("geo_alerts3x1_id").flex=0.25;Ext.getCmp("geo_alerts3x1_id").getEl().setStyle({padding:"10 0 0 10"});Ext.getCmp("geo_alerts3x1_id").removeAll(true);try{Ext.getCmp("geo_alerts3x1_id").add({xtype:"overviewverticalpanel",id:"geo_overviewpanel3x1_alert_id",margin:0,padding:"0 0 0 0",ifGeo:true,flex:1,jsonData:K[4].Geo_Block_3_Value,key:"geo3x1",});
}catch(I){}Ext.getCmp("cardID").doLayout();}}if((!Ext.isEmpty(K[5])&&K[5]!=undefined)){var B=Ext.getCmp("multBarIns_geo");var F=Ext.getCmp("geoBarIns");F.removeAll(true);F.add({xtype:"chartparentpanel",id:"multBarIns_geo",bodyPadding:0,margin:0,data:K[5].Geo_Block_4_Value,flex:1,});F.doLayout();}}}}}else{if(!Ext.isEmpty(r)&&r.trim()=="Overview_View"){if(!Ext.isEmpty(K[0])&&K[0]!=undefined){var H=Ext.getCmp("overview_first_header_id");
H.setTitle(K[0].Overview_Block_1_Title);}if(!Ext.isEmpty(K[1])&&K[1]!=undefined){Ext.getCmp("overview_details_id").updateData(K[1].Overview_Block_1_Value);}if(!Ext.isEmpty(K[2])&&K[2]!=undefined){Ext.getCmp("overview_map_id").updateData(K[2].Overview_Block_2_Value[0]);Ext.getCmp("overviewctxpanel_right_top_panel_id").updateData(K[2].Overview_Block_2_Value[0]);
}if((!Ext.isEmpty(K[3])&&K[3]!=undefined)){var A=Ext.getCmp("multBarIns_overview");A.data=K[3].Overview_Block_3_Value;A.updateChart(K[3].Overview_Block_3_Value);}}}}},failure:function(){}});},refresh:function(aj){if(!Ext.isEmpty(Ext.getCmp("myDashListPageView"))){return;}Ext.getCmp("settingIconId").hide();
isRefreshing=true;perVal=0;try{var Z=document.getElementById("isSessionWindowOpen").value;if(Z=="true"||Z==true){return;}}catch(ag){}var q=Ext.getCmp("TimeLineId");var o=null;if(q!=null&&q!=undefined){o=q.getValue();}if(o==null||o==undefined||o==""){o="Current";}var a=Ext.getCmp("dashmenu_model_id");
var s=null;var H=null;if(!Ext.isEmpty(a)&&a!=undefined&&a!=null){s=a.getStore();H=a.forceClickKey;}var r=requestParams.activeView;var W="";var R="";if(!Ext.isEmpty(r)&&r.trim()=="Geo_View"){var g=Ext.getCmp("countryComboId");var ai=Ext.getCmp("regionComboId");if(g!=null&&g!=undefined){var l=g.getValue();
if(l!=null&&l!=undefined&&l!=""&&l!="World"){if(!Ext.isEmpty(H)){W=H;}else{W=l;}R="Geo_Country_View";}else{if(l!=null&&l!=undefined&&l!=""&&l=="World"){W=l;R="";}}}if(ai!=null&&ai!=undefined){var am=ai.getValue();if(am!=null&&am!=undefined&&am!=""&&am!="AllRegion"&&am!="World"){W=am;R="Geo_Region_View";
}else{if(am!=null&&am!=undefined&&am!=""&&am!="AllRegion"&&am=="World"){W=l;R="";}}}if(W==null||W==undefined||W==""){W="World";}try{var D="";var h="";var ak="";var ab=0;for(var T=0;T<20;T++){D=Ext.getCmp("Geo_View_ComboBar"+T);if(!Ext.isEmpty(D)){h=D.getValue();if(ab==0){ak=h;}else{ak+="^#^"+h;}ab++;
}}}catch(ad){}}else{if(!Ext.isEmpty(r)&&r.trim()=="Overview_View"){W="World";R="";try{var D="";var h="";var ak="";var ab=0;for(var T=0;T<20;T++){D=Ext.getCmp("Overview_View_ComboBar"+T);if(!Ext.isEmpty(D)){h=D.getValue();if(ab==0){ak=h;}else{ak+="^#^"+h;}ab++;}}}catch(ad){}}else{if(!Ext.isEmpty(r)&&r.trim()=="Logon_View"){W="Logon_View";
}}}if(Ext.isEmpty(ak)&&ak==undefined&&ak==null){ak="";}if(!Ext.isEmpty(r)&&r.trim()=="Metrics_View"){var u=Ext.getCmp("metrics_container");if(!Ext.isEmpty(userMappingApplisTo)&&userMappingApplisTo!=null&&userMappingApplisTo!=undefined){if(userMappingApplisTo.indexOf(":")>0){var M=userMappingApplisTo.substring(0,userMappingApplisTo.indexOf(":"));
var P=userMappingApplisTo.substring(userMappingApplisTo.indexOf(":")+1);if(M!=null&&M=="Service"){M="services";}}}var m=false;if(M.toLowerCase().indexOf("component")>-1){m=true;}var C="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){C=Ext.getCmp("dashListComId").getValue();
}var v="";if(Ext.getCmp("componentTypCombo")!=null&&Ext.getCmp("componentTypCombo")!=undefined&&Ext.getCmp("componentTypCombo")!=null&&Ext.getCmp("componentTypCombo")!="null"){v=Ext.getCmp("componentTypCombo").getValue();}var G="";if(Ext.getCmp("nickName")!=null&&Ext.getCmp("nickName")!=undefined&&Ext.getCmp("nickName").getValue()!=null&&Ext.getCmp("nickName").getValue()!="null"){G=Ext.getCmp("nickName").getValue();
}if(componentNameSearch!=null&&componentNameSearch!="null"&&componentNameSearch!=undefined&&componentNameSearch!="undefined"){G=componentNameSearch;}var c="/final/monitor/comparisonComponent.jsp?treeTitle=citrixcomponents&selectedState=&componentNameSearch="+G+"&fromPageView=CitrixDashboard&viewPageTitle=Components&action=component&fromHomepage=&userName=&filterBy="+M+"&subFilter="+P+"&timeline=null&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+C+"&dashboard_name="+dashboard+"&view_name="+r+"&fromServiceHomePage="+isFromHomePage+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&firstTime=true&filter=service&serviceName="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup+"&isCitrixComp=true&fromSerComboChange="+fromSerComboChange;
if(typeof hasCitrix==="string"){if(hasCitrix=="true"){if(selected_CompType_st!=null&&selected_CompType_st!=""&&selected_CompType_st!="undefined"&&selected_CompType_st!=undefined){c+="&componentType="+selected_CompType_st;}else{if(((M!=null&&M.indexOf("Agg_")>=0)||(requestParams.serviceCombo!=null&&requestParams.serviceCombo[0].selected.indexOf("Agg_")>=0))&&isUserHaveDirector){c+="&componentType="+directorTypes;
}}}else{if(selected_CompType_st!=null&&selected_CompType_st!=""&&selected_CompType_st!="undefined"&&selected_CompType_st!=undefined){c+="&componentType="+selected_CompType_st;}else{if(((M!=null&&M.indexOf("Agg_")>=0)||(requestParams.serviceCombo!=null&&requestParams.serviceCombo[0].selected.indexOf("Agg_")>=0))&&isUserHaveDirector){c+="&componentType="+directorTypes;
}}}}else{if(hasCitrix){if(selected_CompType_st!=null&&selected_CompType_st!=""&&selected_CompType_st!="undefined"&&selected_CompType_st!=undefined){c+="&componentType="+selected_CompType_st;}else{if(((M!=null&&M.indexOf("Agg_")>=0)||(requestParams.serviceCombo!=null&&requestParams.serviceCombo[0].selected.indexOf("Agg_")>=0))&&isUserHaveDirector){c+="&componentType="+directorTypes;
}}}else{if(selected_CompType_st!=null&&selected_CompType_st!=""&&selected_CompType_st!="undefined"&&selected_CompType_st!=undefined){c+="&componentType="+selected_CompType_st;}else{if(((M!=null&&M.indexOf("Agg_")>=0)||(requestParams.serviceCombo!=null&&requestParams.serviceCombo[0].selected.indexOf("Agg_")>=0))&&isUserHaveDirector){c+="&componentType="+directorTypes;
}}}}u.removeAll(true);u.add({xtype:"metricscomponentlist",id:"metricscomponentlist_id",layout:"fit",compTypeComboNeeded:m,margin:0,padding:0,metricsURL:c});u.doLayout();}else{if(!Ext.isEmpty(r)&&r.trim()=="Systems_View"){Ext.getCmp("settingIconId").show();var C="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){C=Ext.getCmp("dashListComId").getValue();
}var K=Ext.getCmp("systemViewMeasuresgridpanel");var z=K.url;z+="&selectNode=Service$cap$"+encodeURIComponent(filterByParamFlag)+"&componentType="+encodeURI(SysComponentType)+"&selectedParam="+encodeURIComponent(filterByParamFlag)+"&currentTab=Systems&isSite=true&aggregateTab=false&hasTransactions=true&hasEmulatedTransactions=false&fromHomepage=&hasLogonSimulations=true&refresh=true&action=Systems&topoSegment="+encodeURIComponent(filterByParamFlag)+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+C+"&dashboard_name="+dashboard+"&view_name="+r+"&fromServiceHomePage="+isFromHomePage+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
K.loadTab(z,"servicesSys");}else{if(!Ext.isEmpty(r)&&r.trim()=="Aggregates_View"){var C="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){C=Ext.getCmp("dashListComId").getValue();}var n=Ext.getCmp("systemViewAggregatesgridpanel");
var z=n.url;z+="&selectNode=Service$cap$"+encodeURIComponent(filterByParamFlag)+"&selectedParam="+encodeURIComponent(filterByParamFlag)+"&currentTab=Systems&isSite=true&aggregateTab=true&hasTransactions=true&hasEmulatedTransactions=false&fromHomepage=&hasLogonSimulations=true&refresh=true&action=Systems&topoSegment="+encodeURIComponent(filterByParamFlag)+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+C+"&dashboard_name="+dashboard+"&view_name="+r+"&fromServiceHomePage="+isFromHomePage+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
n.loadTab(z,"servicesAgg");}else{if(!Ext.isEmpty(r)&&r.trim()=="Services_Topology_View"){if(!Ext.isEmpty(userMappingApplisTo)&&userMappingApplisTo!=null&&userMappingApplisTo!=undefined){if(userMappingApplisTo.indexOf(":")>0){var w=userMappingApplisTo.substring(userMappingApplisTo.indexOf(":")+1);}}var C="";
if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){C=Ext.getCmp("dashListComId").getValue();}var U="";var Q="";try{U=Ext.getCmp("stateCombo").getValue();if(!Ext.isEmpty(selectedSegmentName)&&selectedSegmentName!=null&&selectedSegmentName!=undefined&&selectedSegmentName!="null"&&selectedSegmentName!="undefined"){U=selectedSegmentName;
}}catch(aa){if(!Ext.isEmpty(ifAssSeg)&&ifAssSeg!=null&&ifAssSeg!=undefined){var x="";if(ifAssSeg.indexOf(",")>0){ifAssSeg=ifAssSeg.trim();Q=true;assSeg=ifAssSeg.split(",");for(var Y=0;Y<assSeg.length;Y++){assSegArray[Y]={"value":assSeg[Y]};}var x=ifAssSeg.substring(0,ifAssSeg.indexOf(","));}else{if(!Ext.isEmpty(ifAssSeg)&&ifAssSeg!=null&&ifAssSeg!=undefined){var x=ifAssSeg;
}}}if(!Ext.isEmpty(selectedSegmentName)&&selectedSegmentName!=null&&selectedSegmentName!=undefined&&selectedSegmentName!="null"&&selectedSegmentName!="undefined"){x=selectedSegmentName;}U=x;}var L="/final/monitor/EgServiceTopologyD3JS.jsp?physical_topology=0&type=monitor&treeFlag=null&zoneName=&currentTab=null&aggregateTab=null&openNode=null&treeFlag=null&fromHomepage="+isFromHomePage+"&dashboard_mapping="+C+"&user_name="+user_name+"&serviceGroup=&iszoneName="+iszoneName+"&isFromZone="+isFromZone+"&parentZone="+parentZone+"&action=service&serviceState=service20New_"+ifAssSegState+"&service="+w+"&site="+w+"&segment="+U+"&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isfromCitrix=true&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup+"&activeView=topology";
Ext.get("serTopologyMainCon").dom.src=L;}else{if(!Ext.isEmpty(r)&&r.trim()=="Segments_Topology_View"){if(!Ext.isEmpty(userMappingApplisTo)&&userMappingApplisTo!=null&&userMappingApplisTo!=undefined){if(userMappingApplisTo.indexOf(":")>0){var x=userMappingApplisTo.substring(userMappingApplisTo.indexOf(":")+1);
}}var b="/final/monitor/EgSegmentTopologyD3JS.jsp?segment="+x+"&physical_topology=1&fromHomepage="+isFromHomePage+"&type=segment&zoom=100&iszoneName="+iszoneName+"&isFromZone="+isFromZone+"&parentZone="+parentZone+"&segmentState=segment20New_HIGH";Ext.get("segTopologyMainCon").dom.src=b;}else{if(!Ext.isEmpty(r)&&r.trim()=="Web_Transaction_Sub_View"){var af=this.getTransactionComboTimeline();
if(!Ext.isEmpty(af)){timeLineValueForRefresh=af.getValue();}var F=this.getTransactionComboFromhr();if(!Ext.isEmpty(F)){fromHrValueForRefresh=F.getValue();}var I=this.getTransactionComboTohr();if(!Ext.isEmpty(I)){toHrValueForRefresh=I.getValue();}var ah=this.getTransactionComboMode();if(!Ext.isEmpty(ah)){modeValueForRefresh=ah.getValue();
}var ae=this.getTransactionComboTomin();if(!Ext.isEmpty(ae)){toMinValueForRefresh=ae.getValue();}var X=this.getTransactionComboFrommin();if(!Ext.isEmpty(X)){fromMinValueForRefresh=X.getValue();}var B=this.getTransactionFromDate();if(!Ext.isEmpty(B)){fromDateValueForRefresh=B.getValue();}var f=this.getTransactionToDate();
if(!Ext.isEmpty(f)){toDateValueForRefresh=f.getValue();}var N=Ext.getCmp("dashboard_view_container_grid");var k=Ext.getCmp("dashboard_view_container_chart");var S=Ext.getCmp("dashboard_view_header_id");if(!Ext.isEmpty(N)){N.removeAll(true);}if(!Ext.isEmpty(k)){k.removeAll(true);}if(!Ext.isEmpty(S)){S.removeAll(true);
}if(!Ext.isEmpty(Ext.getCmp("tabBarHeader1"))){Ext.getCmp("tabBarHeader1").removeAll(true);}var C="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){C=Ext.getCmp("dashListComId").getValue();}var V="/final/monitor/transactions.jsp?treeTitle=services&1=1&selectNode=Service$cap$"+encodeURIComponent(filterByParamFlag)+"&selectedParam="+encodeURIComponent(filterByParamFlag)+"&currentTab=transactions&isSite=true&aggregateTab=false&hasTransactions=true&hasEmulatedTransactions=false&fromHomepage=&hasLogonSimulations=true&site="+encodeURIComponent(filterByParamFlag)+"&isSite=true&serviceName="+encodeURIComponent(filterByParamFlag)+"&fromLayer=false&selectNode="+encodeURIComponent(filterByParamFlag)+"&currentTab=transactions&transTab=true&from=null&treeOpen=false&openNode=Services&refresh=true&action=service&topoSegment="+encodeURIComponent(filterByParamFlag)+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+C+"&dashboard_name="+dashboard+"&view_name="+r+"&fromServiceHomePage="+isFromHomePage+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&fromLogonTab=true";
Ext.Ajax.request({url:V,timeout:280000,success:function(t){var aL=t.responseText;if(!Ext.isEmpty(aL)){var at=Ext.decode(aL);var aq=at.GridScreenLabels;var aK=at.HiddenFields.compType;var aE=at.HiddenFields.compName;var aC=at.HiddenFields.siteName;if(aC!=null&&aC!=undefined){citrixDashboard.app.getController("Main").siteName=aC;
}var aG=(!Ext.isEmpty(aq["emulBtnLabel"]))?true:false;var aR=(!Ext.isEmpty(aq["webBtnLabel"]))?true:false;var ay=(!Ext.isEmpty(at["isTabChanged"]))?true:false;var aP=(!Ext.isEmpty(at["fromRefresh"]))?true:false;var e=at.HiddenFields.isLogonSimul;var aB=at.HiddenFields.Refreshing;var y=at.HiddenFields.innerActiveTab;
var aS=at.HiddenFields.timelineParam;if(!Ext.isEmpty(at.HiddenFields)){serviceRefSortByLogon=at.HiddenFields.serviceRefSortByLogon;serviceRefSortByLogonType=at.HiddenFields.serviceRefSortByLogonType;serviceRefSortByLogonId=at.HiddenFields.serviceRefSortByLogonId;}var ap=at.ComponentList;var aI=at.externalAgents;
var au=at.logonComponentList;var ao=at.componentListObj;var ax="",aF="",aH="",aw="",aD="",aN="",an="";var aM=false;var aO=true;var ar,aJ,aQ;if(!Ext.isEmpty(ap)&&ap!=null&&ap!=undefined&&(y==null||y==undefined||y=="undefined")){ar=Ext.create("Ext.data.Store",{fields:["value","name","comptype"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:ap});
aM=false;ax=ap.label;if(selectedCompTypeValue==null||selectedCompTypeValue=="null"||selectedCompTypeValue==""||selectedCompTypeValue==undefined||selectedCompTypeValue=="undefined"){aF=ap.selectedValue;}else{aF=selectedCompTypeValue;}}else{if(!Ext.isEmpty(aI)&&aI!=null&&aI!=undefined&&(y=="logonSim"||(!aG&&!aR))){extAgentData=aI;
ar=Ext.create("Ext.data.Store",{fields:["value","name"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:aI});aM=false;ax=extAgentData.label;aF=aI.selectedValue;}else{aM=true;}}var aA="GOOD";aA=at.GridScreenLabels.siteState;var az=true;if(!Ext.isEmpty(y)&&y!=null&&y!=undefined&&y=="logonSim"){az=false;
}curViewTab=y;S.setTitle("USER EXPERIENCE - WEB TRANSACTIONS <img style='position: relative;left: 6px;top: 3px;' src='/final/images/clear.png' data-qtip='Layer Model' class='iconLayerstack mouse' onclick=\"DashboardToLayers('"+aE+"','"+aK+"','"+aC+"','WebTransactions','"+r+"','"+iniName+"','"+user_name+"','"+C+"')\" /> <img style='position: relative;left: 12px;top: 3px;' src='/final/images/clear.png' class='iconTopology mouse' data-qtip='Topology' onclick=\"loadView('Services_Topology_View')\"/>");
S.addTool({xtype:"container",id:"tabBarHeader1",layout:{type:"hbox",align:"right"},margin:"10 0 0 0",style:{"float":"right"},items:[{xtype:"combo",id:"componentCombo",itemId:"componentCombo",editable:false,labelWidth:75,margin:"0 0 0 10",hidden:aM,store:ar,cls:"dropdown",width:290,displayField:"name",valueField:"value",trigerAction:"all",fieldLabel:""+ax,value:aF,queryMode:"local",listeners:{"change":function(aT){citrixDashboard.app.getController("Main").onComponentChange(this,"webTrans",aC);
}}}]});N.add([{xtype:"container",ui:"eg-container",margin:"0 0 0 0",padding:"0 10 10 10",items:[{xtype:"transactiongridpanel",ui:"newGridPanel",id:"transactiongridpanelid",jsonData:at,isEmuEnabled:aG,id:"transGrid1",height:185,border:true}]}]);try{k.add([{xtype:"container",margin:"10 2 0 0",items:[{xtype:"transactionschartpanel",id:"transactionschartpanelid",jsonData:at,padding:0,border:false,layout:{type:"fit"},}]}]);
}catch(av){}}},failure:function(){}});}else{if(!Ext.isEmpty(r)&&r.trim()=="Logon_Sub_View"){var af=this.getTransactionComboTimeline();if(!Ext.isEmpty(af)){timeLineValueForRefresh=af.getValue();}var F=this.getTransactionComboFromhr();if(!Ext.isEmpty(F)){fromHrValueForRefresh=F.getValue();}var I=this.getTransactionComboTohr();
if(!Ext.isEmpty(I)){toHrValueForRefresh=I.getValue();}var ah=this.getTransactionComboMode();if(!Ext.isEmpty(ah)){modeValueForRefresh=ah.getValue();}var ae=this.getTransactionComboTomin();if(!Ext.isEmpty(ae)){toMinValueForRefresh=ae.getValue();}var X=this.getTransactionComboFrommin();if(!Ext.isEmpty(X)){fromMinValueForRefresh=X.getValue();
}var B=this.getTransactionFromDate();if(!Ext.isEmpty(B)){fromDateValueForRefresh=B.getValue();}var f=this.getTransactionToDate();if(!Ext.isEmpty(f)){toDateValueForRefresh=f.getValue();}var A=Ext.getCmp("compTypeCombo");var E="";if(A!=null&&A!=undefined&&A!="null"&&A=="undefined"){E=A.getValue();singleComponentTypeValue="";
singleComponentTypeName="";}else{if((A==null||A==undefined)&&(singleComponentTypeValue!=""&&singleComponentTypeValue!=null&&singleComponentTypeValue!=undefined)){E=singleComponentTypeValue;}}var p=Ext.getCmp("componentCombo");var ac=p.getValue();var O=Ext.getCmp("simulationCombo");refreshSimulation=O.getValue();
var J=Ext.getCmp("dashboard_container_grid");var al=Ext.getCmp("dashboard_container_chart");var d=Ext.getCmp("dashboard_header_id");if(!Ext.isEmpty(J)){J.removeAll(true);}if(!Ext.isEmpty(al)){al.removeAll(true);}if(!Ext.isEmpty(d)){d.removeAll(true);}if(!Ext.isEmpty(Ext.getCmp("tabBarHeader1"))){Ext.getCmp("tabBarHeader1").removeAll(true);
}var C="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){C=Ext.getCmp("dashListComId").getValue();}var V="/final/monitor/transactions.jsp?componentType="+E+"&treeTitle=services&selectNode=Service$cap$"+encodeURIComponent(filterByParamFlag)+"&selectedParam="+encodeURIComponent(filterByParamFlag)+"&currentTab=logon&isSite=false&aggregateTab=false&hasTransactions=false&hasEmulatedTransactions=false&fromHomepage=&hasLogonSimulations=true&site="+encodeURIComponent(filterByParamFlag)+"&isSite=true&serviceName="+encodeURIComponent(filterByParamFlag)+"&fromLayer=false&selectNode="+encodeURIComponent(filterByParamFlag)+"&currentTab=logon&transTab=true&from=null&treeOpen=false&openNode=Services&refresh=true&action=service&topoSegment="+encodeURIComponent(filterByParamFlag)+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+C+"&dashboard_name="+dashboard+"&view_name="+r+"&fromServiceHomePage="+isFromHomePage+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&fromLogonTab=true";
Ext.Ajax.request({url:V,timeout:280000,success:function(au){var ay=au.responseText;if(!Ext.isEmpty(ay)){var aL=Ext.decode(ay);var aE=aL.logonParam;var aW=aL.GridScreenLabels;var aI=aL.HiddenFields.compType;var aT=aL.HiddenFields.compName;var aO=aL.HiddenFields.siteName;if(aO!=null&&aO!=undefined){citrixDashboard.app.getController("Main").siteName=aO;
}var aV=(!Ext.isEmpty(aW["emulBtnLabel"]))?true:false;var aB=(!Ext.isEmpty(aW["webBtnLabel"]))?true:false;var aR=(!Ext.isEmpty(aL["isTabChanged"]))?true:false;var aJ=(!Ext.isEmpty(aL["fromRefresh"]))?true:false;var t=aL.HiddenFields.isLogonSimul;var aw=aL.HiddenFields.Refreshing;var aD=aL.HiddenFields.innerActiveTab;
var aF=aL.HiddenFields.timelineParam;var aG="";if(!Ext.isEmpty(aF)&&aF!=null&&aF!=undefined){aG="&mode="+aF.mode+"&time_line="+aF.time_line+"&starthr="+aF.starthr+"&endhr="+aF.endhr+"&starttime="+aF.starttime+"&endtime="+aF.endtime+"&startmin="+aF.startmin+"&endmin="+aF.endmin;}aD="logonSim";if(!Ext.isEmpty(aL.HiddenFields)){serviceRefSortByLogon=aL.HiddenFields.serviceRefSortByLogon;
serviceRefSortByLogonType=aL.HiddenFields.serviceRefSortByLogonType;serviceRefSortByLogonId=aL.HiddenFields.serviceRefSortByLogonId;}var at=aL.ComponentList;var y=aL.externalAgents;var aZ=aL.logonComponentList;var aq=aL.componentListObj;var ap=false;if(aL.componentListObj!=null&&aL.componentListObj["options"].length==1){ap=true;
}var aU="",aX="",ar="",aK="",aN="",ax="",aP="";var az=false;var aS=true;var aQ,aY,aC;if(!Ext.isEmpty(aq)&&aq!=null&&aq!=undefined&&(aD=="logonSim"||(!aV&&!aB))){aS=false;aC=Ext.create("Ext.data.Store",{fields:["value","name","url"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:aq});aK=aq.label;
ax=aq.selectedValue;selectedCompType=aq.selectedValue;}if(!Ext.isEmpty(at)&&at!=null&&at!=undefined&&(aD==null||aD==undefined||aD=="undefined")){aQ=Ext.create("Ext.data.Store",{fields:["value","name","comptype"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:at});az=false;aU=at.label;
aX=at.selectedValue;}else{if(!Ext.isEmpty(y)&&y!=null&&y!=undefined&&(aD=="logonSim"||(!aV&&!aB))){extAgentData=y;aQ=Ext.create("Ext.data.Store",{fields:["value","name"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:y});az=false;aU=extAgentData.label;if(!Ext.isEmpty(ac)&&ac!=null){aX=ac;
}else{aX=y.selectedValue;}}else{az=true;}}if(!Ext.isEmpty(aZ)&&aZ!=null&&aZ!=undefined){aZ=aZ[aX];aY=Ext.create("Ext.data.Store",{fields:["value","name","comptype"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:aZ});ar=aZ.label;if(!Ext.isEmpty(refreshSimulation)&&refreshSimulation!=null){if(refreshSimulation.indexOf(":")>-1){var e=refreshSimulation;
e=e.substring(0,e.indexOf(":"));aN=e;}aP=refreshSimulation;}else{aN=aZ.selectedValue;aP=aZ.selectedOrgValue;}}if(ap){aS=true;}var aA="GOOD";aA=aL.GridScreenLabels.siteState;var av=true;if(!Ext.isEmpty(aD)&&aD!=null&&aD!=undefined&&aD=="logonSim"){av=false;}curViewTab=aD;if(singleComponentTypeName!=""&&singleComponentTypeName!=null&&singleComponentTypeName!=undefined){singleComponentTypeName=singleComponentTypeName.toUpperCase();
d.setTitle("USER EXPERIENCE - "+singleComponentTypeName+" <img style='position: relative;left: 6px;top: 3px;' src='/final/images/clear.png' class='iconLayerstack mouse' data-qtip='Layer Model' onclick=\"DashboardToLayers('"+aT+"','"+aI+"','"+aO+"','logonSim','"+r+"','"+iniName+"','"+user_name+"','"+aH+"')\" /> <img style='position: relative;left: 12px;top: 3px;' src='/final/images/clear.png' class='iconTopology mouse' data-qtip='Topology' onclick=\"loadView('Services_Topology_View')\"/>");
}else{d.setTitle("USER EXPERIENCE - LOGON SIMULATIONS <img style='position: relative;left: 6px;top: 3px;' src='/final/images/clear.png' class='iconLayerstack mouse' data-qtip='Layer Model' onclick=\"DashboardToLayers('"+aT+"','"+aI+"','"+aO+"','logonSim','"+r+"','"+iniName+"','"+user_name+"','"+aH+"')\" /> <img style='position: relative;left: 12px;top: 3px;' src='/final/images/clear.png' class='iconTopology mouse' data-qtip='Topology' onclick=\"loadView('Services_Topology_View')\"/>");
}J.removeAll(true);d.addTool({xtype:"container",id:"tabBarHeader1",layout:{type:"hbox",align:"right"},margin:"10 0 0 0",style:{"float":"right","border":"none !important"},items:[{xtype:"combo",id:"compTypeCombo",itemId:"compTypeCombo",labelAlign:"left",editable:false,store:aC,hidden:aS,labelSeparator:"",cls:"dropdown",displayField:"name",valueField:"value",url:"url",trigerAction:"all",fieldLabel:aK+":",labelWidth:100,width:290,queryMode:"local",margin:"0 0 0 20",value:ax,listeners:{"change":function(a0){citrixDashboard.app.getController("Main").onComponentTypeChange(this,"logonSim",aO,ax,r);
}}},{xtype:"combo",id:"componentCombo",itemId:"componentCombo",editable:false,margin:"0 0 0 20",hidden:az,store:aQ,cls:"dropdown",width:290,displayField:"name",valueField:"value",trigerAction:"all",fieldLabel:""+aU,labelWidth:100,value:aX,queryMode:"local",listeners:{"change":function(a0){citrixDashboard.app.getController("Main").onComponentChange(this,"logonSim",aO,aP,r);
}}},{xtype:"combo",id:"simulationCombo",itemId:"simulationCombo",editable:false,margin:"0 0 0 20",width:270,hidden:av,store:aY,cls:"dropdown",displayField:"name",valueField:"value",trigerAction:"all",fieldLabel:""+ar,labelWidth:70,value:aP,queryMode:"local",listeners:{"change":function(a0){citrixDashboard.app.getController("Main").onSimulationChange(this,"logonSim",aO,aP,r);
}}}]});var aH="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){aH=Ext.getCmp("dashListComId").getValue();}var ao="";if(aP!=null&&aP.indexOf(":NULL")>-1){ao=aP.substring(0,aP.indexOf(":NULL"));}else{ao=aP;}var an="/final/monitor/comparisonLogonSimulator.jsp?"+logonParam+"&componentType=&selectedState=&subFilter=&simulationName="+ao+"&externalAgent="+aX+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+aH+"&dashboard_name="+dashboard+"&view_name="+r+"&fromServiceDashboard="+fromServiceDashboard+"&servicename="+aO+"&fromSerComboChange="+fromSerComboChange+"&fromServiceHomePage="+isFromHomePage+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&isLogonType=true&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
if(aE!=null&&aE!=""&&aE!=undefined){an="/final/monitor/comparisonLogonSimulator.jsp?"+aE+"&componentType=&selectedState=&subFilter=&simulationName="+ao+"&externalAgent="+aX+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+aH+"&dashboard_name="+dashboard+"&view_name="+r+"&fromServiceDashboard="+fromServiceDashboard+"&servicename="+aO+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&componentNameService="+aP+"&isLogonType=true&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
}var aM="/final/monitor/simulationGraph.jsp?treeTitle=services&site=NULL&mHost="+aX+"&simulationName="+ao+"&componentNameService="+aP;Ext.Ajax.request({url:aM,scope:this,success:function(a1){var a3=a1.responseText;if(!Ext.isEmpty(a3)){var a0=Ext.decode(a3);if(a0!=null&&a0!=undefined){var a2="gridHeadercenter iconGrid";
if(!Ext.isEmpty(logon_treeTitle)&&logon_treeTitle=="ExtTestDashboard"){a2="gridHeadercenter";}J.add({xtype:"generalMeasuresGridPanel",plugins:Ext.create("Ext.ux.AutoColumnWithLockingPlugin"),cls:a2,itemId:"logonSimualtion",searchBoxCombo:false,margin:0,padding:3,id:"perPanel",height:185,frame:false,border:true,layout:{type:"vbox",align:"stretch"},flex:1,screenLabelPath:"monitor.Dashboard",url:an,listeners:{"afterrender":function(a4){this.loadTab(a4.url,null,null,null,null,true,"citrixDashBoard");
}}});al.add({xtype:"transactionschartpanel",id:"transactionschartpanelid",height:(Ext.getBody().getViewSize().height-280),jsonData:a0,margin:"10 1 0 0",padding:0,border:false,isNotAreaChart:false});}}},failure:function(){}});}},failure:function(){}});}else{if(!Ext.isEmpty(r)&&r.trim()=="Emulated_Transaction_Sub_View"){try{var Z=document.getElementById("isSessionWindowOpen").value;
if(Z=="true"||Z==true){return;}}catch(ag){}var C="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){C=Ext.getCmp("dashListComId").getValue();}var V="/final/monitor/transactions.jsp?treeTitle=services&1=1&&selectNode=Service$cap$"+encodeURIComponent(filterByParamFlag)+"&selectedParam="+encodeURIComponent(filterByParamFlag)+"&currentTab=transactions&isSite=false&aggregateTab=false&hasTransactions=false&hasEmulatedTransactions=true&fromHomepage=&hasLogonSimulations=false&site="+encodeURIComponent(filterByParamFlag)+"&isSite=true&serviceName="+encodeURIComponent(filterByParamFlag)+"&fromLayer=false&selectNode="+encodeURIComponent(filterByParamFlag)+"&selectedParam="+encodeURIComponent(filterByParamFlag)+"&currentTab=transactions&transTab=true&from=null&treeOpen=false&openNode=Services&refresh=true&action=service&topoSegment="+encodeURIComponent(filterByParamFlag)+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+C+"&dashboard_name="+dashboard+"&view_name="+r+"&fromServiceHomePage="+isFromHomePage+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&fromLogonTab=true";
Ext.Ajax.request({url:V,timeout:280000,success:function(an){var t=an.responseText;if(!Ext.isEmpty(t)){var av=Ext.decode(t);var au=av.GridScreenLabels;var e=av.HiddenFields.compType;var aq=av.HiddenFields.compName;var ar=av.HiddenFields.siteName;if(ar!=null&&ar!=undefined){citrixDashboard.app.getController("Main").siteName=ar;
}var ax=av.HiddenFields.isWebTrans;if(!Ext.isEmpty(sess_sim_compType)){e=sess_sim_compType;}if(!Ext.isEmpty(sess_sim_comp)){aq=sess_sim_comp;}var ap="";if(!Ext.isEmpty(sess_sim_agent)){ap=sess_sim_agent;}var at=selectedScript;if(!Ext.isEmpty(sess_sim_script)){at=sess_sim_script;}var y="NULL";if(ax=="true"){y=filterByParamFlag;
}var ao=Ext.getCmp("dashboard_header_id_Emu");ao.setTitle("<div style=position:relative;top:-4px;><span>"+fullSessionSimulation+"</span><img style='position: relative;left: 6px;top: 4px;' src='/final/images/clear.png' onclick=\"DashboardToLayers('"+aq+"','"+e+"','"+ar+"','emulated','"+r+"','"+iniName+"','"+user_name+"','"+C+"')\" class='iconLayerstack mouse' data-qtip='Layer Model' /> <img style='position: relative;left: 12px;top: 4px;' src='/final/images/clear.png' class='iconTopology mouse' data-qtip='Topology' onclick=\"loadView('Services_Topology_View')\"/></div>");
var aw=Ext.getCmp("sessionSimTopology");if(!Ext.isEmpty(aw)){Ext.get("sessionSimTopology").dom.src="/final/monitor/sessionSimulation.jsp?scriptName="+at+"&site="+ar+"&dashboard_name="+dashboard+"&compName="+aq+"&site="+y+"&compType="+e+"&serviceName="+filterByParamFlag+"&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+C+"&view_name="+r+"&fromServiceHomePage="+isFromHomePage+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&isCitrix=true&msmt_host="+ap;
}}}});}}}}}}}}var C="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){C=Ext.getCmp("dashListComId").getValue();}if(!Ext.isEmpty(C)&&C!=null&&C!=undefined){dashboard_mapping=C;}if(ak!=null&&ak!=undefined&&ak!=""){do{if(ak!=null&&ak.indexOf("%")>-1){ak=ak.replace("%","|pct|");
}}while(ak.indexOf("%")>-1);do{if(ak!=null&&ak.indexOf("#")>-1){ak=ak.replace("#","|hash|");}}while(ak.indexOf("#")>-1);do{if(ak!=null&&ak.indexOf("*")>-1){ak=ak.replace("*","|star|");}}while(ak.indexOf("*")>-1);do{if(ak!=null&&ak.indexOf("(")>-1){ak=ak.replace("(","|lb|");}}while(ak.indexOf("(")>-1);
do{if(ak!=null&&ak.indexOf(")")>-1){ak=ak.replace(")","|rb|");}}while(ak.indexOf(")")>-1);}var j="/final/servlet/com.eg.EgCommonDashboardController?iniName="+iniName+"&user_name="+encodeURI(user_name)+"&action=loadViewData&subject="+encodeURI(dashboard)+"&time_line="+encodeURI(o)+"&isUserBased=true&view_name="+encodeURI(r)+"&filterName="+encodeURI(W)+"&filterViewName="+encodeURI(R)+"&allSelectedMeasure="+encodeURI(ak)+"&dashboard_mapping="+encodeURI(dashboard_mapping)+"&fromSerComboChange="+fromSerComboChange+"&isFromCitrix=true"+"&dashboard_name="+dashboard;
if(isFromHomePage||isFromHomePage=="true"){j+="&fromServiceHomePage="+isFromHomePage+"&appliesTo="+userMappingApplisTo;}Ext.Ajax.request({url:j,method:"POST",scope:this,timeout:280000,success:function(ar,aQ){var aw=ar.responseText;var aq=true;if(aw!=null&&aw!=undefined){var aS=Ext.decode(aw);var ax=null;
if(!Ext.isEmpty(r)&&r.trim()=="Applications_View"){if(aS!=null&&aS!=undefined){if(aS.loadViewDetails!=null&&aS.loadViewDetails!=undefined){var aH=aS.loadViewDetails;if(aH!=null&&aH!=undefined&&aH.length>0){var aK=aH[0];var aW=aH[1];var aJ=aH[2];var aT=aH[3];var aX=aH[4];if(!Ext.isEmpty(aH[0])&&aH[0]!=undefined){var a8=Ext.getCmp("app_id");
a8.setTitle(aH[0].Application_Block_1_Title);}if(!Ext.isEmpty(aH[1])&&aH[1]!=undefined){Ext.getCmp("app_overviewpanel_id").updateData(aH[1].Application_Block_1_Value);}if(!Ext.isEmpty(aH[2])&&aH[2]!=undefined){var a5=Ext.getCmp("top_app_id");a5.setTitle(aH[2].Application_Block_2_Title);}if((!Ext.isEmpty(aH[3])&&aH[3]!=undefined)){var bn=Ext.getCmp("multBarIns");
bn.updateChart(aH[3].Application_Block_2_Value);}if(!Ext.isEmpty(aH[4])&&aH[4]!=undefined){var a1=Ext.getCmp("gridInst");a1.data=aH[4].Application_Block_3_Value[0];a1.loadData(aH[4].Application_Block_3_Value[0]);}}}}}else{if(!Ext.isEmpty(r)&&r.trim()=="Resources_View"){ax="res_toogle";if(aS!=null&&aS!=undefined){if(aS.loadViewDetails!=null&&aS.loadViewDetails!=undefined){var aH=aS.loadViewDetails;
if(aH!=null&&aH!=undefined&&aH.length>0){var aK=aH[0];var aW=aH[1];var aJ=aH[2];var aT=aH[3];var aX=aH[4];if(!Ext.isEmpty(aH[0])&&aH[0]!=undefined){var aU=Ext.getCmp("res_first_header_id");aU.setTitle(aH[0].Resources_Block_1_Title);}if(!Ext.isEmpty(aH[1])&&aH[1]!=undefined){Ext.getCmp("res_overviewpanel_id").updateData(aH[1].Resources_Block_1_Value);
}if(!Ext.isEmpty(aH[2])&&aH[2]!=undefined){var aP=Ext.getCmp("res_user_header_id");aP.setTitle(aH[2].Resources_Block_2_Title);}if((!Ext.isEmpty(aH[3])&&aH[3]!=undefined)){var bm=Ext.getCmp("multBarIns_user");bm.data=aH[3].Resources_Block_2_Value;bm.updateChart(aH[3].Resources_Block_2_Value);}if(!Ext.isEmpty(aH[4])&&aH[4]!=undefined){var aP=Ext.getCmp("res_app_header_id");
aP.setTitle(aH[4].Resources_Block_3_Title);}if((!Ext.isEmpty(aH[5])&&aH[5]!=undefined)){var a6=Ext.getCmp("multBarIns_app");if(Ext.isEmpty(a6)){var at=Ext.getCmp("res_app_header_id");at.removeAll(true);at.add({xtype:"chartparentpanel",id:"multBarIns_app",ifRes:true,data:aH[5].Resources_Block_3_Value,orgData:aH[5].Resources_Block_3_Value,flex:1,});
at.doLayout();}else{a6.data=aH[5].Resources_Block_3_Value;a6.updateChart(aH[5].Resources_Block_3_Value);}}if(!Ext.isEmpty(aH[6])&&aH[6]!=undefined){var aP=Ext.getCmp("res_server_header_id");aP.setTitle(aH[6].Resources_Block_4_Title);}if((!Ext.isEmpty(aH[7])&&aH[7]!=undefined)){var aI=Ext.getCmp("multBarIns_server");
if(Ext.isEmpty(aI)){var at=Ext.getCmp("res_server_header_id");at.removeAll(true);at.add({xtype:"chartparentpanel",id:"multBarIns_server",ifRes:true,data:aH[7].Resources_Block_4_Value,orgData:aH[7].Resources_Block_4_Value,flex:1,});at.doLayout();}else{aI.data=aH[7].Resources_Block_4_Value;aI.updateChart(aH[7].Resources_Block_4_Value);
}}}}}}else{if(!Ext.isEmpty(r)&&r.trim()=="Geo_View"){ax="geo_toogle";if(aS!=null&&aS!=undefined){if(aS.loadViewDetails!=null&&aS.loadViewDetails!=undefined){var aH=aS.loadViewDetails;if(aH!=null&&aH!=undefined&&aH.length>0){if(!Ext.isEmpty(aH[0])&&aH[0]!=undefined){var a0=Ext.getCmp("geo_first_header_id");
a0.setTitle(aH[0].Geo_Block_1_Title);}if(!Ext.isEmpty(aH[1])&&aH[1]!=undefined){Ext.getCmp("geo_overviewpanel_id").updateData(aH[1].Geo_Block_1_Value);}if(!Ext.isEmpty(aH[2])&&aH[2]!=undefined){if(aH[2].Geo_Block_2_Value[0].resultArray!=null&&aH[2].Geo_Block_2_Value[0].resultArray.length>0&&isInternetAvailableFlag){if(R==null||R==undefined||R==""){var bi=Ext.getCmp("countryComboId");
if(!Ext.isEmpty(bi)&&bi!=undefined){bi.show();bi.getStore().loadRawData(aH[2].Geo_Block_2_Value[0].countryArray);bi.setValue(aH[2].Geo_Block_2_Value[0].selectedCountry);}}else{if(R!=null&&R!=undefined&&R=="Geo_Country_View"){var aO=Ext.getCmp("regionComboId");if(!Ext.isEmpty(aO)&&aO!=undefined){aO.show();
aO.getStore().loadRawData(aH[2].Geo_Block_2_Value[0].regionArray);aO.setValue(aH[2].Geo_Block_2_Value[0].selectedRegion);}}}try{Ext.getCmp("geo_id_map").updateData(aH[2].Geo_Block_2_Value[0],true);Ext.getCmp("geo_id_mapdetails").updateData(aH[2].Geo_Block_2_Value[0]);}catch(be){}}}if(!Ext.isEmpty(aH[3])&&aH[3]!=undefined){}if(!Ext.isEmpty(aH[4])&&aH[4]!=undefined){var aN=aH[2].Geo_Block_2_Value[0].resultArray;
var bf=aH[2].Geo_Block_2_Value[0].resultArray.length;var aZ=false;if(bf>0){for(var bh=0;bh<bf;bh++){if(aN[bh]["Info"]!="+Unknown"){aZ=true;}}if(!isInternetAvailableFlag){aZ=false;}}if(aN!=null&&bf>0&&aZ){try{var aA=Ext.getCmp("geo_overviewpanel3x1_alert_id");aA.updateData(aH[4].Geo_Block_3_Value);}catch(be){}}else{var bg=aH[4].Geo_Block_3_Value;
if(bg!=undefined&&bg!=null&&bg.length>0){for(var bl in bg){var an=bg[bl];try{var aV=an["chart"];if(aV==undefined){aV=an["type"];}}catch(bc){}if(aV!=undefined&&aV.toLowerCase()=="tierhealth"){var a4=aV+"_"+bl+"_overviewextra";Ext.getCmp(a4).updateData(an);}else{if(aV!=undefined&&aV.toLowerCase()=="donut"){var a4=aV+"_"+bl+"_overviewextra";
Ext.getCmp(a4).updateData(an);}else{if(aV!=undefined&&aV=="Gauge"){var aM=an.data;if(aM!=undefined&&aM!=null){for(var bj in aM){var bb=aM[bj]["chart"];if(bb!=undefined&&bb=="Gauge"){var a4=bb+"_Gauge_"+bj+"_overviewextra";Ext.getCmp(a4).updateData(aM[bj].graphData);}else{if(bb!=undefined&&bb=="ColourText"){var a4=bb+"_ColourText_"+bj+"_overviewextra";
Ext.getCmp(a4).updateData(aM[bj]);}}}}}else{if(aV!=undefined&&aV=="GraphText"){var aM=an.data;if(aM!=undefined&&aM!=null){for(var bj in aM){var bb=aM[bj]["chart"];if(bb!=undefined&&bb=="GraphText"){var a4=bb+"_GraphText_"+bj+"_overviewextra";Ext.getCmp(a4).updateData(aM[bj]);}else{if(bb!=undefined&&bb.toLowerCase()=="gauge"){var a4=bb+"_Gauge_"+bj+"_overviewextra";
Ext.getCmp(a4).updateData(aM[bj]);}}}}}}}}}}}}if((!Ext.isEmpty(aH[5])&&aH[5]!=undefined)){var aG=Ext.getCmp("multBarIns_geo");aG.data=aH[5].Geo_Block_4_Value;aG.updateChart(aH[5].Geo_Block_4_Value);}}}}}else{if(!Ext.isEmpty(r)&&r.trim()=="Overview_View"){ax="over_toogle";if(aS!=null&&aS!=undefined){if(aS.loadViewDetails!=null&&aS.loadViewDetails!=undefined){var aH=aS.loadViewDetails;
if(!Ext.isEmpty(aH[0])&&aH[0]!=undefined){var au=Ext.getCmp("overview_first_header_id");au.setTitle(aH[0].Overview_Block_1_Title);}if(!Ext.isEmpty(aH[1])&&aH[1]!=undefined){Ext.getCmp("overviewpanel_id").updateData(aH[1].Overview_Block_1_Value);}if(!Ext.isEmpty(aH[2])&&aH[2]!=undefined){Ext.getCmp("overview_map_id").updateData(aH[2].Overview_Block_2_Value[0]);
Ext.getCmp("overviewctxpanel_right_top_panel_id").updateData(aH[2].Overview_Block_2_Value[0]);}if(!Ext.isEmpty(aH[2])&&aH[2]!=undefined){var a3=new Array();var aC=new Array();if(aH[2].Overview_Block_2_Value!=undefined&&aH[2].Overview_Block_2_Value!=null&&aH[2].Overview_Block_2_Value.length>0){var a2=aH[2].Overview_Block_2_Value[1];
a3.push(a2);var a2=aH[2].Overview_Block_2_Value[2];aC.push(a2);}Ext.getCmp("overviewctxpanel_right_top_panel_id").updateData(aH[2].Overview_Block_2_Value);}if((!Ext.isEmpty(aH[3])&&aH[3]!=undefined)){var aY=Ext.getCmp("multBarIns_overview");aY.updateChart(aH[3].Overview_Block_3_Value);}}}}else{if(!Ext.isEmpty(r)&&r.trim()=="Alerts_View"){if(aS!=null&&aS!=undefined){if(aS.loadViewDetails!=null&&aS.loadViewDetails!=undefined){var aH=aS.loadViewDetails;
if(!Ext.isEmpty(aH[0])&&aH[0]!=undefined){var au=Ext.getCmp("alerts_header_id");au.setTitle(aH[0].Alert_Block_1_Title);}if(!Ext.isEmpty(aH[1])&&aH[1]!=undefined){var a7=Ext.getCmp("alertswidgets_Ins");a7.updateData(aH[1].Alert_Block_1_Value);}if(!Ext.isEmpty(aH[2])&&aH[2]!=undefined){var t=Ext.getCmp("alerts_gridInst");
t.data=aH[2].Alert_Block_2_Value;t.updateChart(aH[2].Alert_Block_2_Value);}}}}else{if(!Ext.isEmpty(r)&&r.trim()=="UserExperience_View"){ax="ux_toogle";if(aS!=null&&aS!=undefined){if(aS.loadViewDetails!=null&&aS.loadViewDetails!=undefined){var aH=aS.loadViewDetails;if(!Ext.isEmpty(aH[0])&&aH[0]!=undefined){var ba=Ext.getCmp("UxDashHeader_id");
ba.setTitle("USER EXPERIENCE - REAL USERS");}if(!Ext.isEmpty(aH[1])&&aH[1]!=undefined){var a9=Ext.getCmp("overviewpaneluxdash_Ins");a9.updateData(aH[1].UserExperience_Block_1_Value);}if(!Ext.isEmpty(aH[2])&&aH[2]!=undefined){var ao=Ext.getCmp("ux_dash_chart_panel_id");ao.data=aH[2].UserExperience_Block_2_Value;
ao.updateChart(aH[2].UserExperience_Block_2_Value);}}}}else{if(!Ext.isEmpty(r)&&r.trim()=="Sessions_View"){var aH=aS.loadViewDetails;if(!Ext.isEmpty(aH[0])&&aH[0]!=undefined){var y=Ext.getCmp("sessions_headerid");y.setTitle(aH[0].Sessions_Block_1_Title);}if(!Ext.isEmpty(aH[1])&&aH[1]!=undefined){var az=Ext.getCmp("sessionsparentpanel_Obj");
az.updatePanelData(aH);}}else{if(!Ext.isEmpty(r)&&r.trim()=="Logon_View"){var aH=aS.loadViewDetails;if(!Ext.isEmpty(aH[0])&&aH[0]!=undefined){var ay=Ext.getCmp("logon_header_Id");ay.setTitle(aH[0].Logon_Block_1_Title);}if(!Ext.isEmpty(aH[1])&&aH[1]!=undefined){var aR=Ext.getCmp("sessionOverViewId_Ins");
aR.updateData(aH[1].Logon_Block_1_Value);}if(!Ext.isEmpty(aH[2])&&aH[2]!=undefined){var bd=Ext.getCmp("sessionOverViewId_prpanel");bd.data=aH[2].Logon_Block_2_Value;bd.updateChart(aH[2].Logon_Block_2_Value);}}else{if(!Ext.isEmpty(r)&&r.trim()=="Broker_View"){var aH=aS.loadViewDetails;if(!Ext.isEmpty(aH[0])&&aH[0]!=undefined){var aB=Ext.getCmp("broker_header_Id");
aB.setTitle(aH[0].Broker_Block_1_Title);}if(!Ext.isEmpty(aH[1])&&aH[1]!=undefined){var aF=Ext.getCmp("broker_overviewpanel_id");aF.updateData(aH[1].Broker_Block_1_Value);}if(!Ext.isEmpty(aH[2])&&aH[2]!=undefined){var aL=Ext.getCmp("br_desktop_header_id");aL.setTitle(aH[2].Broker_Block_2_Title);}if((!Ext.isEmpty(aH[3])&&aH[3]!=undefined)){var at=Ext.getCmp("multBarIns_Des");
at.data=aH[3].Broker_Block_2_Value;at.updateChart(aH[3].Broker_Block_2_Value);}if(!Ext.isEmpty(aH[4])&&aH[4]!=undefined){var ap=Ext.getCmp("br_server_header_id");ap.setTitle(aH[4].Broker_Block_3_Title);}if((!Ext.isEmpty(aH[5])&&aH[5]!=undefined)){var at=Ext.getCmp("multBarIns_Ser");at.data=aH[5].Broker_Block_3_Value;
at.updateChart(aH[5].Broker_Block_3_Value);}}}}}}}}}}var aE=this;try{var aD=Ext.ComponentQuery.query('button[itemId="overviewtoggle"]')[0];if(!Ext.isEmpty(aD)){if(ax!=null){var av=Ext.getCmp(ax);if(!Ext.isEmpty(av)&&!Ext.isEmpty(av.pressed)&&av.pressed){aD.pressed=true;aE.toggleOverViewrefresh(aD,true);
}else{if(!Ext.isEmpty(av)){aD.pressed=false;aE.toggleOverViewrefresh(aD,false);}}}}}catch(bk){}}},failure:function(){}});},addGeoPage:function(f,b,h,a,d,g){var e=this,c=Ext.getCmp("citrix_ground");c.add({xtype:"container",id:"cardID",listeners:{"boxready":function(n){var j=this;j.add({xtype:"container",height:25,layout:"hbox",margin:"0 0 0 0",items:[{xtype:"header",id:"geo_first_header_id",height:25,title:f[0].Geo_Block_1_Title,},{xtype:"combo",fieldLabel:"",cls:"dropdown",labelSeparator:"",width:120,labelWidth:130,labelStyle:{"white-space":"nowrap;"},name:"worldCombo",hidden:true,id:"countryComboId",margin:"2 10 0 10",displayField:"name",valueField:"value",queryMode:"local",store:Ext.create("Ext.data.Store",{fields:["name","value"],}),},{xtype:"combo",fieldLabel:"",cls:"dropdown",labelSeparator:"",width:120,labelWidth:130,labelStyle:{"white-space":"nowrap;"},name:"regionCombo",hidden:true,id:"regionComboId",margin:"2 10 0 0",displayField:"name",valueField:"value",queryMode:"local",store:Ext.create("Ext.data.Store",{fields:["name","value"],}),},{xtype:"combo",fieldLabel:"",cls:"dropdown",labelSeparator:"",width:250,labelWidth:130,labelStyle:{"white-space":"nowrap;"},name:"cityCombo",hidden:true,id:"cityComboId",margin:"0 10 0 0",displayField:"name",valueField:"value",queryMode:"local",store:Ext.create("Ext.data.Store",{fields:["name","value"],}),}]});
j.add({xtype:"container",height:1,style:{"border":"0px solid pink !important"},items:[{xtype:"button",id:"geo_toogle",height:16,width:16,margin:"0 8 0 0",style:{"boreder":"0px solid blue !important"},iconCls:"toggle_m",itemId:"overviewtoggle",enableToggle:true,ui:"overviewtoggle"}]},{xtype:"overviewdetails",layout:"fit",margin:"0 1 0 0",id:"geo_overview_id",items:[{xtype:"overviewpanel",id:"geo_overviewpanel_id",jsonData:f[1].Geo_Block_1_Value,key:"geo",}]});
if(!Ext.isEmpty(f[2])&&f[2]!=undefined){j.add({xtype:"container",layout:{type:"hbox",align:"stretch"},autoDestroy:true,frame:false,margin:"10 0 8 0",id:"geo_map_parent_conainer_id",autoScroll:false,scroll:false,items:[],listeners:{afterrender:function(q){var s=f[2].Geo_Block_2_Value[0].resultArray;var o=f[2].Geo_Block_2_Value[0].resultArray.length;
var p=false;if(o>0){for(var r=0;r<o;r++){if(s[r]["Info"]!="+Unknown"){p=true;}}}if(!isInternetAvailableFlag){p=false;}if(s!=null&&o>0&&p){q.add({xtype:"panel",layout:{type:"hbox",align:"stretch",},flex:0.75,ui:"eg-x-panel",id:"geo_map_conainer_id",border:false,frame:false,margin:"0 10 2 0",autoScroll:false,scroll:false,items:[{layout:{type:"vbox",align:"stretch",},flex:0.7,items:[{xtype:"header",id:"geo_map_header_id",padding:"10 5 5 5",height:50,},{xtype:"container",id:"geo_map_id",padding:"0 20 0 20",margin:"3 0 0 0",layout:"fit",items:[{xtype:"geopanel",id:"geo_id_map",jsonData:f[2].Geo_Block_2_Value[0],fullJson:f,height:347,mapStyle:strRumSkin=="Dark"?"dark":"light",mapType:"styled_map",center:{lat:40.378,lng:10.4359},infoBoxArray:[],markerArray:[],feauturesArray:[],stateArray:[],selectedView:selected_view_name}]}]}]},{xtype:"container",frame:false,padding:"10 15 10 10",margin:"0 2 2 0",id:"geo_alerts3x1_id",style:{"height":"100% !important","width":"100% !important"},flex:0.4,height:428,ui:"eg-container",layout:{type:"vbox",align:"stretch"},items:[{xtype:"overviewctxpanel",id:"geo_overviewpanel3x1_alert_id",jsonData:f[4].Geo_Block_3_Value,key:"overview",layout:{type:"vbox",align:"stretch"}}]});
}else{q.add({xtype:"container",padding:0,id:"geoextraIns",flex:1,layout:{type:"card",reserveScrollbar:true},items:[{xtype:"panel",defaults:{columnWidth:0.5,height:180},layout:"column",manageOverflow:2,items:[{xtype:"panel",ui:"eg-x-panel",height:180,columnWidth:0.5,margin:"0 10 1 0",bodyPadding:"10 10 10 10",layout:{type:"vbox",align:"stretch"},listeners:{"afterrender":function(x){var t=this;
var u=f[4].Geo_Block_3_Value;if(u!=undefined&&u!=null&&u.length>0){var w=u[0];var v=w["chart"];if(v==undefined){v=w["type"];}if(v!=undefined&&v.toLowerCase()=="tierhealth"){var z=v+"_0_overviewextra";t.add({xtype:"panel",margin:"0px 0px 15px 0px",cls:"widgetBottomBorder",minHeight:180,autoDestroy:false,items:[{xtype:"tierhealth",id:z,jsonData:w,data:w,key:"overview",}]});
}else{if(v!=undefined&&v.toLowerCase()=="donut"){var z=v+"_0_overviewextra";try{t.add({xtype:"panel",margin:"0px 0px 0px 0px",height:180,style:{"border":"0px solid blue !important"},cls:"widgetcon",autoDestroy:true,items:[{xtype:"donutalert",ifXtra:true,data:w,id:z,num:z+"1"}]});}catch(y){}}}}}}},{xtype:"panel",ui:"eg-x-panel",height:180,columnWidth:0.5,margin:"0 1 1 0",bodyPadding:"10 10 10 10",layout:{type:"vbox",align:"stretch"},listeners:{"afterrender":function(z){var v=this;
var w=f[4].Geo_Block_3_Value;if(w!=undefined&&w!=null&&w.length>0){var y=w[1];var x=y["chart"];if(x==undefined){x=y["type"];}if(x!=undefined&&x=="Gauge"){var u=y.data;v.add({xtype:"container",baseCls:"panelHeader",cls:"font_normal15 fontStyleRobot",html:y.heading,padding:"0px 0px 0px 0px",style:{"border":"0px solid grey;float:left"},minHeight:20});
if(u!=undefined&&u!=null){var t=citrixDashboard.app.getView("Main").getGroupPanelArray(u,null,null,v,y.heading);v.add(t);}}else{if(x!=undefined&&x=="GraphText"){var u=y.data;v.add({xtype:"container",baseCls:"panelHeader",cls:"font_normal15 fontStyleRobot",html:"<span>"+y.heading+'</span><span style="float:right" class="font_bold9 grayColor">'+y.timeline+"</span>",padding:"0px 0px 0px 0px",style:{"border":"0px solid grey;float:left"},minHeight:20});
if(u!=undefined&&u!=null){var t=citrixDashboard.app.getController("Main").getGroupPanelArray(u,null,null,v,y.heading);v.add(t);}}}}}}}]}]});}}}});}var m=Ext.getCmp("countryComboId");if(!Ext.isEmpty(m)&&m!=undefined){if(f[2].Geo_Block_2_Value[0].resultArray!=null&&f[2].Geo_Block_2_Value[0].resultArray.length>0){m.show();
m.getStore().loadRawData(f[2].Geo_Block_2_Value[0].countryArray);var l=null;if(isFromUED||isFromUED=="true"){if(b){Ext.Ajax.request({url:d,method:"POST",scope:this,timeout:280000,success:function(o,q){var s=o.responseText;if(s!=null&&s!=undefined){var p=Ext.decode(s);if(p!=null&&p!=undefined){var t=p.loadViewDetails;
m.getStore().loadRawData(t[2].Geo_Block_2_Value[0].countryArray);if(h&&countryCode!=null&&countryCode!=undefined&&countryCode!=""){m.setValue(countryCode);}else{m.setValue(filterName);}citrixDashboard.app.getController("Main").geoComboOnChange(m,filterName,false);}var r=Ext.getCmp("regionComboId");if(h){Ext.Ajax.request({url:g,method:"POST",scope:this,timeout:280000,success:function(w,x){var u=w.responseText;
if(u!=null&&u!=undefined){var v=Ext.decode(u);if(v!=null&&v!=undefined){var y=v.loadViewDetails;if(!Ext.isEmpty(r)&&r!=undefined){r.show();r.getStore().loadRawData(y[2].Geo_Block_2_Value[0].regionArray);r.setValue(filterName);}citrixDashboard.app.getController("Main").geoComboOnChange(r,filterName,false);
}}}});}else{if(filterName!=null&&filterName!=undefined&&filterName!="World"){if(!Ext.isEmpty(r)&&r!=undefined){r.show();r.getStore().loadRawData(f[2].Geo_Block_2_Value[0].regionArray);l=f[2].Geo_Block_2_Value[0].selectedRegion;r.setValue(f[2].Geo_Block_2_Value[0].selectedRegion);}}}}}});}else{countroComboVal=filterName;
m.setValue(filterName);}}else{m.setValue(f[2].Geo_Block_2_Value[0].selectedCountry);}}}if(a){var m=Ext.getCmp("countryComboId");if(!Ext.isEmpty(m)&&m!=undefined){m.show();m.getStore().loadRawData(menuObj.cnCombo);}var k=Ext.getCmp("regionComboId");if(!Ext.isEmpty(k)&&k!=undefined){k.show();k.getStore().loadRawData(f[2].Geo_Block_2_Value[0].regionArray);
k.setValue(f[2].Geo_Block_2_Value[0].selectedRegion);}}if((!Ext.isEmpty(f[5])&&f[5]!=undefined)){j.add({xtype:"container",padding:0,id:"geoBarIns",bodyPadding:10,flex:1,layout:{type:"card",reserveScrollbar:true},items:[{xtype:"chartparentpanel",id:"multBarIns_geo",bodyPadding:0,margin:0,data:f[5].Geo_Block_4_Value,flex:1}]});
}j.doLayout();}}});},addLogonPage:function(c){var b=this,a=Ext.getCmp("citrix_ground");a.add({xtype:"container",id:"cardID",listeners:{"boxready":function(f){var d=this;d.add({xtype:"header",id:"logon_header_Id",height:25,title:c[0].Logon_Block_1_Title,});d.add({xtype:"overviewdetails",layout:"fit",margin:"0 1 0 0",id:"sessionOverViewp_Id",items:[{xtype:"overviewpanel",id:"sessionOverViewId_Ins",jsonData:c[1].Logon_Block_1_Value,ifLogon:true}]});
d.add({xtype:"container",padding:0,id:"LogonBarIns",bodyPadding:10,flex:1,layout:{type:"card",reserveScrollbar:true},items:[{xtype:"chartparentpanel",id:"sessionOverViewId_prpanel",padding:"10 0 0 0",margin:"0 0 0 0",ifLogOn:true,data:c[2].Logon_Block_2_Value}]});d.doLayout();}}});},addUxPage:function(c){var b=this,a=Ext.getCmp("citrix_ground");
a.add({xtype:"container",id:"cardID",listeners:{"boxready":function(f){var d=this;d.add({xtype:"header",id:"UxDashHeader_id",height:25,title:"USER EXPERIENCE - REAL USERS",});d.add({xtype:"container",height:1,items:[{xtype:"button",id:"ux_toogle",height:16,width:16,style:{"margin-right":"5px !important"},iconCls:"toggle_m",itemId:"overviewtoggle",enableToggle:true,ui:"overviewtoggle"}]},{xtype:"overviewdetails",id:"UxDashHeaderoverviewdetails_ins",layout:"fit",margin:"0 1 0 0",items:[{xtype:"overviewpanel",id:"overviewpaneluxdash_Ins",jsonData:c[1].UserExperience_Block_1_Value,key:"overviewpaneluxdash_Ins",}]});
d.add({xtype:"container",padding:0,id:"uxdashBarIds",bodyPadding:10,flex:1,layout:{type:"card",reserveScrollbar:true},items:[{xtype:"chartparentpanel",id:"ux_dash_chart_panel_id",ifUx:true,padding:"10 0 0 0",margin:"0 0 0 0",data:c[2].UserExperience_Block_2_Value,flex:1}]});d.doLayout();}}});},addBrokerPage:function(c){var b=this,a=Ext.getCmp("citrix_ground");
a.add({xtype:"container",id:"cardID",listeners:{"boxready":function(g){var f=this;f.add({xtype:"header",id:"broker_header_Id",height:25,title:c[0].Broker_Block_1_Title,});f.add({xtype:"overviewdetails",layout:"fit",margin:"0 1 0 0",id:"broker_overview_id",items:[{xtype:"overviewpanel",id:"broker_overviewpanel_id",jsonData:c[1].Broker_Block_1_Value,ifBroker:true}]});
f.add({xtype:"panel",id:"res_acc_pan_id",ui:"eg-accordion-panel",padding:0,bodyPadding:"0 0 10 0",margin:0,flex:1,layout:{type:"accordion",animate:true,multi:true,},items:[{id:"br_desktop_header_id",title:c[2].Broker_Block_2_Title,width:"100%",layout:{type:"anchor",anchor:"50%"},margin:"10 2 0 0",bodyPadding:"0 20 20 20",collapsed:false,items:[{xtype:"chartparentpanel",id:"multBarIns_Des",ifBro:true,data:c[3].Broker_Block_2_Value,orgData:c[3].Broker_Block_2_Value,flex:1}],listeners:{afterlayout:function(){var k=Ext.getCmp("multBarIns_Des");
if(!Ext.isEmpty(k)&&!Ext.isEmpty(k.data)&&k.data!=undefined){for(var j=0;j<k.data.length;j++){var l=null;try{l=k.data[j][0];if(l==undefined||l==null){l=k.data[j].Error;}}catch(e){l=k.data[j];}if(l==undefined||l==null){continue;}var h="chartParent_multBarIns_Des_"+l.chartCId+"_"+j;if(h.indexOf("(")!=-1){h=h.replace("(","LB");
}if(h.indexOf(")")!=-1){h=h.replace(")","RB");}if(!Ext.isEmpty(Ext.getCmp(h))){$("#"+h+"-body").width("100%");var m=((strSkin=="Dark"||strSkin=="dark"))?"#525252":"#f2f2f2";if(j==0||j==1){Ext.getCmp(h).getEl().dom.style.borderRight="1px solid "+m;}else{if(j%2!=0){Ext.getCmp(h).getEl().dom.style.borderRight="1px solid "+m;
}else{Ext.getCmp(h).getEl().dom.style.borderRight="0px solid "+m;}}if((k.data.length-2)>j){Ext.getCmp(h).getEl().dom.style.borderBottom="1px solid "+m;}else{Ext.getCmp(h).getEl().dom.style.borderBottom="0px solid "+m;}}}}},expand:function(){var e=Ext.getCmp("multBarIns_Des");}}},{id:"br_server_header_id",title:c[4].Broker_Block_3_Title,width:"100%",flex:2,layout:{type:"vbox",align:"stretch"},margin:"10 2 0 0",bodyPadding:"0 20 20 20",collapsed:false,items:[{xtype:"chartparentpanel",id:"multBarIns_Ser",ifBro:true,data:c[5].Broker_Block_3_Value,orgData:c[5].Broker_Block_3_Value,flex:1}],listeners:{afterlayout:function(){var l=Ext.getCmp("multBarIns_Ser");
if(!Ext.isEmpty(l)&&!Ext.isEmpty(l.data)&&l.data!=undefined){for(var k=0;k<l.data.length;k++){var h=null;try{h=l.data[k][0];if(h==undefined||h==null){h=l.data[k].Error;}}catch(e){h=l.data[k];}if(h==undefined||h==null){continue;}var j="chartParent_multBarIns_Ser_"+h.chartCId+"_"+k;if(j.indexOf("(")!=-1){j=j.replace("(","LB");
}if(j.indexOf(")")!=-1){j=j.replace(")","RB");}if(!Ext.isEmpty(Ext.getCmp(j))){$("#"+j+"-body").width("100%");var m=((strSkin=="Dark"||strSkin=="dark"))?"#525252":"#f2f2f2";if(k==0||k==1){Ext.getCmp(j).getEl().dom.style.borderRight="1px solid "+m;}else{if(k%2!=0){Ext.getCmp(j).getEl().dom.style.borderRight="1px solid "+m;
}else{Ext.getCmp(j).getEl().dom.style.borderRight="0px solid "+m;}}if((l.data.length-2)>k){Ext.getCmp(j).getEl().dom.style.borderBottom="1px solid "+m;}else{Ext.getCmp(j).getEl().dom.style.borderBottom="0px solid "+m;}}}}},expand:function(){var e=Ext.getCmp("multBarIns_Ser");}}}]});f.doLayout();var d=Ext.getCmp("br_desktop_header_id");
if(Dashboard_ComponentType=="Citrix_XcXenApp_server"||Dashboard_ComponentType=="Agg_Citrix_XcXenApp_server"){d.collapse();}var d=Ext.getCmp("br_server_header_id");if(Dashboard_ComponentType=="Xen_desktop_server"||Dashboard_ComponentType=="Agg_Xen_desktop_server"){d.collapse();}}}});},addSessionsPage:function(c){var b=this,a=Ext.getCmp("citrix_ground");
a.add({xtype:"container",id:"cardID",listeners:{"boxready":function(f){var d=this;d.add({xtype:"header",id:"sessions_headerid",height:25,title:c[0].Sessions_Block_1_Title});d.add({xtype:"panel",layout:{type:"vbox",align:"stretch"},id:"sessions_connected_established_id",items:[{xtype:"sessionsparentpanel",id:"sessionsparentpanel_Obj",flex:1,margin:"0 0 8 0",data:c}]});
}}});},addApplicationsPage:function(c){var b=this,a=Ext.getCmp("citrix_ground");a.padding="0 10 0 10";a.add({xtype:"container",id:"cardID",listeners:{"boxready":function(f){var d=this;d.add({xtype:"header",id:"app_id",height:25,title:c[0].Application_Block_1_Title});d.add({xtype:"overviewdetails",id:"overviewdetails_id",layout:"fit",margin:"0 1 0 0",items:[{xtype:"overviewpanel",id:"app_overviewpanel_id",jsonData:c[1].Application_Block_1_Value,ifApp:true,height:140,}]});
d.add({xtype:"header",height:25,id:"top_app_id",width:"100%",margin:"8 0 4 0",title:c[2].Application_Block_2_Title},{xtype:"container",padding:0,margin:0,id:"app_chart_id",layout:"fit",items:[{xtype:"chartparentpanel",id:"multBarIns",margin:"0 0 0 0",data:c[3].Application_Block_2_Value,flex:1}]});d.add({xtype:"panel",ui:"eg-x-panel",layout:"fit",bodyPadding:"0 15 15 15",id:"grid_id",margin:"0 1 10 0",title:c[4].Application_Block_3_Value[0].title,items:[{xtype:"commongrid",width:"100%",id:"gridInst",data:c[4].Application_Block_3_Value[0]}]});
d.doLayout();}}});},addResourcesPage:function(c,d){var b=this,a=Ext.getCmp("citrix_ground");a.padding="0 10 0 10";a.add({xtype:"container",id:"cardID",resources_url:d,listeners:{"boxready":function(g){var f=this;f.add({xtype:"header",height:25,id:"res_first_header_id",title:c[0].Resources_Block_1_Title});
f.add({xtype:"container",height:1,items:[{xtype:"button",id:"res_toogle",height:16,width:16,style:{"margin-right":"5px !important"},iconCls:"toggle_m",itemId:"overviewtoggle",enableToggle:true,ui:"overviewtoggle"}]},{xtype:"overviewdetails",layout:"fit",margin:"0 1 0 0",id:"res_overview_id",items:[{xtype:"overviewpanel",id:"res_overviewpanel_id",jsonData:c[1].Resources_Block_1_Value,key:"res",}]});
f.add({xtype:"panel",id:"res_acc_pan_id",ui:"eg-accordion-panel",padding:0,margin:0,flex:2,layout:{type:"accordion",animate:true,multi:false,},items:[{id:"res_user_header_id",title:"Top Users",width:"100%",layout:{type:"anchor",anchor:"50%"},margin:"10 2 0 0",bodyPadding:"0 20 20 20",collapsed:(!isExpendAllBlocks),items:[],listeners:{afterrender:function(h){if(!Ext.isEmpty(c[2])&&c[2]!=undefined){h.setTitle(c[2].Resources_Block_2_Title);
}if((!Ext.isEmpty(c[3])&&c[3]!=undefined)){h.add({xtype:"chartparentpanel",id:"multBarIns_user",ifRes:true,data:c[3].Resources_Block_2_Value,orgData:c[3].Resources_Block_2_Value,ifRes:true,flex:1});}},afterlayout:function(){var l=Ext.getCmp("multBarIns_user");if(!Ext.isEmpty(l)&&!Ext.isEmpty(l.data)&&l.data!=undefined){for(var k=0;
k<l.data.length;k++){var m=null;try{m=l.data[k][0];}catch(e){m=l.data[k];}if(m==undefined||m==null){continue;}var j="chartParent_multBarIns_user_"+m.chartCId+"_"+k;if(j.indexOf("(")!=-1){j=j.replace("(","LB");}if(j.indexOf(")")!=-1){j=j.replace(")","RB");}if(!Ext.isEmpty(Ext.getCmp(j))){$("#"+j+"-body").width("100%");
var n=((strSkin=="Dark"||strSkin=="dark"))?"#525252":"#f2f2f2";if(k%2==0){Ext.getCmp(j).getEl().dom.style.borderRight="1px solid "+n;}else{Ext.getCmp(j).getEl().dom.style.borderRight="0px solid "+n;}var h=2;if(l.data.length%2!=0){h=1;}if((l.data.length-h)>k){Ext.getCmp(j).getEl().dom.style.borderBottom="1px solid "+n;
}else{Ext.getCmp(j).getEl().dom.style.borderBottom="0px solid "+n;}}}}},expand:function(){var k=Ext.getCmp("multBarIns_user");if(!Ext.isEmpty(k)&&!Ext.isEmpty(k.data)&&k.data!=undefined){for(var j=0;j<k.data.length;j++){var l=null;try{l=k.data[j][0];}catch(e){l=k.data[j];}if(l==undefined||l==null){continue;
}var h="chartParent_multBarIns_user_"+l.chartCId+"_"+j;if(h.indexOf("(")!=-1){h=h.replace("(","LB");}if(h.indexOf(")")!=-1){h=h.replace(")","RB");}if(!Ext.isEmpty(Ext.getCmp(h))){Ext.getCmp(h).updateChart(h+"-body",l,"Bar");}}}}}},{id:"res_app_header_id",title:"Top Applications",width:"100%",flex:2,layout:{type:"vbox",align:"stretch"},margin:"10 2 0 0",bodyPadding:"0 20 20 20",collapsed:(!isExpendAllBlocks),items:[],listeners:{afterrender:function(h){if(!Ext.isEmpty(c[4])&&c[4]!=undefined){h.setTitle(c[4].Resources_Block_3_Title);
}if((!Ext.isEmpty(c[5])&&c[5]!=undefined)){h.add({xtype:"chartparentpanel",id:"multBarIns_app",ifRes:true,data:c[5].Resources_Block_3_Value,orgData:c[5].Resources_Block_3_Value,flex:1});}},afterlayout:function(){var m=Ext.getCmp("multBarIns_app");if(!Ext.isEmpty(m)&&!Ext.isEmpty(m.data)&&m.data!=undefined){for(var l=0;
l<m.data.length;l++){var h=null;try{h=m.data[l][0];}catch(e){h=m.data[l];}if(h==undefined||h==null){continue;}var k="chartParent_multBarIns_app_"+h.chartCId+"_"+l;if(k.indexOf("(")!=-1){k=k.replace("(","LB");}if(k.indexOf(")")!=-1){k=k.replace(")","RB");}var n=((strSkin=="Dark"||strSkin=="dark"))?"#525252":"#f2f2f2";
if(!Ext.isEmpty(Ext.getCmp(k))){$("#"+k+"-body").width("100%");if(l%2==0){Ext.getCmp(k).getEl().dom.style.borderRight="1px solid "+n;}else{Ext.getCmp(k).getEl().dom.style.borderRight="0px solid "+n;}var j=2;if(m.data.length%2!=0){j=1;}if((m.data.length-j)>l){Ext.getCmp(k).getEl().dom.style.borderBottom="1px solid "+n;
}else{Ext.getCmp(k).getEl().dom.style.borderBottom="0px solid "+n;}}}}},expand:function(){var m=f.resources_url;if(!Ext.isEmpty(m)&&m!=undefined){m=m+"&selectedVariable=Resources_Block_3_Title,Resources_Block_3_Value";Ext.Ajax.request({url:m,method:"POST",scope:this,timeout:280000,success:function(n,r){var t=n.responseText;
var q=true;if(t!=null&&t!=undefined){var p=Ext.decode(t);if(p!=null&&p!=undefined){if(p.loadViewDetails!=null&&p.loadViewDetails!=undefined){var u=p.loadViewDetails;if(u!=null&&u!=undefined&&u.length>0){if(!Ext.isEmpty(u[0])&&u[0]!=undefined){var s=Ext.getCmp("res_app_header_id");s.setTitle(u[0].Resources_Block_3_Title);
}if((!Ext.isEmpty(u[1])&&u[1]!=undefined)){var o=Ext.getCmp("res_app_header_id");o.removeAll(true);o.add({xtype:"chartparentpanel",id:"multBarIns_app",ifRes:true,data:u[1].Resources_Block_3_Value,orgData:u[1].Resources_Block_3_Value,flex:1});o.doLayout();}}}}}}});}else{var l=Ext.getCmp("multBarIns_app");
if(!Ext.isEmpty(l)&&!Ext.isEmpty(l.data)&&l.data!=undefined){for(var k=0;k<l.data.length;k++){var h=null;try{h=l.data[k][0];}catch(e){h=l.data[k];}if(h==undefined||h==null){continue;}var j="chartParent_multBarIns_app_"+h.chartCId+"_"+k;if(j.indexOf("(")!=-1){j=j.replace("(","LB");}if(j.indexOf(")")!=-1){j=j.replace(")","RB");
}if(!Ext.isEmpty(Ext.getCmp(j))){Ext.getCmp(j).updateChart(j+"-body",h,"Bar");}}}}}}},{id:"res_server_header_id",title:"Top Servers",width:"100%",flex:2,layout:{type:"vbox",align:"stretch"},margin:"10 2 10 0",bodyPadding:"0 20 20 20",collapsed:(!isExpendAllBlocks),items:[],listeners:{afterrender:function(h){if(!Ext.isEmpty(c[6])&&c[6]!=undefined){h.setTitle(c[6].Resources_Block_4_Title);
}if((!Ext.isEmpty(c[7])&&c[7]!=undefined)){h.add({xtype:"chartparentpanel",id:"multBarIns_server",ifRes:true,data:c[7].Resources_Block_4_Value,orgData:c[7].Resources_Block_4_Value,flex:1});}},afterlayout:function(){var l=Ext.getCmp("multBarIns_server");if(!Ext.isEmpty(l)&&!Ext.isEmpty(l.data)&&l.data!=undefined){for(var k=0;
k<l.data.length;k++){var m=null;try{m=l.data[k][0];}catch(e){m=l.data[k];}if(m==undefined||m==null){continue;}var j="chartParent_multBarIns_server_"+m.chartCId+"_"+k;if(j.indexOf("(")!=-1){j=j.replace("(","LB");}if(j.indexOf(")")!=-1){j=j.replace(")","RB");}var n=((strSkin=="Dark"||strSkin=="dark"))?"#525252":"#f2f2f2";
if(!Ext.isEmpty(Ext.getCmp(j))){$("#"+j+"-body").width("100%");if(k%2==0){Ext.getCmp(j).getEl().dom.style.borderRight="1px solid "+n;}else{Ext.getCmp(j).getEl().dom.style.borderRight="0px solid "+n;}var h=2;if(l.data.length%2!=0){h=1;}if((l.data.length-h)>k){Ext.getCmp(j).getEl().dom.style.borderBottom="1px solid "+n;
}else{Ext.getCmp(j).getEl().dom.style.borderBottom="0px solid "+n;}}}}},expand:function(){var m=f.resources_url;if(!Ext.isEmpty(m)&&m!=undefined){m=m+"&selectedVariable=Resources_Block_4_Title,Resources_Block_4_Value";Ext.Ajax.request({url:m,method:"POST",scope:this,timeout:280000,success:function(n,q){var s=n.responseText;
if(s!=null&&s!=undefined){var p=Ext.decode(s);if(p!=null&&p!=undefined){if(p.loadViewDetails!=null&&p.loadViewDetails!=undefined){var t=p.loadViewDetails;if(!Ext.isEmpty(t[0])&&t[0]!=undefined){var r=Ext.getCmp("res_server_header_id");r.setTitle(t[0].Resources_Block_4_Title);}if((!Ext.isEmpty(t[1])&&t[1]!=undefined)){var o=Ext.getCmp("res_server_header_id");
o.removeAll(true);o.add({xtype:"chartparentpanel",id:"multBarIns_server",ifRes:true,data:t[1].Resources_Block_4_Value,orgData:t[1].Resources_Block_4_Value,flex:1});o.doLayout();}}}}}});}else{var k=Ext.getCmp("multBarIns_server");if(!Ext.isEmpty(k)&&!Ext.isEmpty(k.data)&&k.data!=undefined){for(var j=0;
j<k.data.length;j++){var l=null;try{l=k.data[j][0];}catch(e){l=k.data[j];}if(l==undefined||l==null){continue;}var h="chartParent_multBarIns_server_"+l.chartCId+"_"+j;if(h.indexOf("(")!=-1){h=h.replace("(","LB");}if(h.indexOf(")")!=-1){h=h.replace(")","RB");}if(!Ext.isEmpty(Ext.getCmp(h))){Ext.getCmp(h).updateChart(h+"-body",l,"Bar");
}}}}}}}]});f.doLayout();if(!Ext.isEmpty(window.parent.isTvMode)){Ext.getCmp("res_user_header_id").expand();Ext.getCmp("res_app_header_id").expand();Ext.getCmp("res_server_header_id").expand();Ext.getCmp("res_acc_pan_id").doLayout();Ext.getCmp("res_acc_pan_id").setHeight(2100);}}}});},addAlertsPage:function(c,d){var b=this,a=Ext.getCmp("citrix_ground");
a.getEl().setStyle({padding:"0 10 0 10"});a.add({xtype:"container",id:"cardID",listeners:{"boxready":function(g){var f=this;f.add({xtype:"header",height:25,id:"alerts_header_id",title:c[0].Alert_Block_1_Title});f.add({xtype:"overviewdetails",layout:"fit",margin:"0 1 0 0",id:"alertsWidgetsIns",items:[{xtype:"alertswidgets",id:"alertswidgets_Ins",data:c[1].Alert_Block_1_Value,}]});
f.add({xtype:"container",padding:0,id:"alertsBarIns",bodyPadding:0,flex:1,layout:{type:"card",reserveScrollbar:true},items:[{xtype:"chartparentpanel",id:"alerts_gridInst",isAlerts:true,data:c[2].Alert_Block_2_Value,flex:1}]});f.doLayout();}}});},addOverviewPage:function(c,d){var b=this,a=Ext.getCmp("citrix_ground");
a.add({xtype:"container",id:"cardID",listeners:{"boxready":function(g){var f=this;f.add({xtype:"header",height:25,id:"overview_first_header_id",title:c[0].Overview_Block_1_Title});f.add({xtype:"container",height:1,items:[{xtype:"button",id:"over_toogle",height:16,width:16,style:{"margin-right":"5px !important"},iconCls:"toggle_m",itemId:"overviewtoggle",enableToggle:true,ui:"overviewtoggle"}]},{xtype:"overviewdetails",layout:"fit",margin:"0 1 0 0",id:"overview_details_id",items:[{xtype:"overviewpanel",id:"overviewpanel_id",jsonData:c[1].Overview_Block_1_Value,key:"overview",}]});
f.add({xtype:"container",layout:{type:"hbox",align:"stretch"},autoDestroy:true,frame:false,margin:"10 0 8 0",height:395,autoScroll:false,scroll:false,items:[{layout:{type:"hbox",align:"stretch",},flex:0.75,xtype:"panel",ui:"eg-x-panel",border:false,frame:false,margin:"0 10 2 0",autoScroll:false,scroll:false,items:[{layout:{type:"vbox",align:"stretch",},flex:0.7,items:[{xtype:"header",id:"geo_map_header_id",padding:"10 5 5 5",height:50,},{xtype:"container",id:"overview_large_panel_id",padding:"0 20 0 20",margin:"3 0 0 0",items:[{xtype:"geopanel",id:"overview_map_id",jsonData:c[2].Overview_Block_2_Value[0],fullJson:c,height:325,mapStyle:strRumSkin=="Dark"?"dark":"light",mapType:"styled_map",center:{lat:40.378,lng:10.4359},infoBoxArray:[],markerArray:[],feauturesArray:[],stateArray:[],selectedView:selected_view_name}]}]}]},{xtype:"container",frame:false,padding:"10 15 10 10",margin:"0 2 2 0",id:"overview_large_right_top_panels_id",style:{"height":"100% !important","width":"100% !important"},flex:0.4,height:474,ui:"eg-container",layout:{type:"vbox",align:"stretch"},items:[{xtype:"overviewctxpanel",id:"overviewctxpanel_right_top_panel_id",jsonData:c[2].Overview_Block_2_Value,key:"overview",layout:{type:"vbox",align:"stretch"},}]}]});
f.add({xtype:"container",padding:0,id:"overviewBarIns",bodyPadding:10,flex:1,layout:{type:"card",reserveScrollbar:true},items:[{xtype:"chartparentpanel",id:"multBarIns_overview",data:c[3].Overview_Block_3_Value,margin:0,flex:1,}]});}}});},addServiceTopologyView:function(){var b=this,a=Ext.getCmp("citrix_ground");
a.add({xtype:"container",id:"cardID",layout:{type:"vbox",align:"stretch"},listeners:{"boxready":function(j){var l=this;var f=null;var k=[];if(!Ext.isEmpty(userMappingApplisTo)&&userMappingApplisTo!=null&&userMappingApplisTo!=undefined){if(userMappingApplisTo.indexOf(":")>0){var n=userMappingApplisTo.substring(userMappingApplisTo.indexOf(":")+1);
}}var d="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){d=Ext.getCmp("dashListComId").getValue();}var c=false;if(!Ext.isEmpty(ifAssSeg)&&ifAssSeg!=null&&ifAssSeg!=undefined){var m="";if(ifAssSeg.indexOf(",")>0){ifAssSeg=ifAssSeg.trim();
c=true;f=ifAssSeg.split(",");for(var p=0;p<f.length;p++){var o=f[p];if(f[p].toLowerCase()=="independent_servers"){o="Independent Servers";}k[p]={"state":segsWithState[p].state,"name":o,"value":f[p]};}m=ifAssSeg.substring(0,ifAssSeg.indexOf(","));}else{if(!Ext.isEmpty(ifAssSeg)&&ifAssSeg!=null&&ifAssSeg!=undefined){m=ifAssSeg;
}}}if(!Ext.isEmpty(selectedSegmentName)&&selectedSegmentName!=null&&selectedSegmentName!=undefined&&selectedSegmentName!="null"&&selectedSegmentName!="undefined"){m=selectedSegmentName;}var h=[];if(isSite!=null&&isSite=="true"&&hasTransactions!="true"){h.push({xtype:"button",text:"Configure Transactions",id:"service_trans_id",cls:"button20",action:"transactionsGridConfigureBtn"});
}if(c){h.push({xtype:"combo",cls:"dropdown",id:"stateCombo",name:"stateCombo",store:Ext.create("Ext.data.Store",{fields:["state","name","value"],data:k}),editable:false,labelWidth:60,width:305,margin:"0 0 0 0",displayField:"name",valueField:"value",value:m,fieldLabel:"Segment",listeners:{"render":function(){$("#stateCombo-inputEl").addClass("state_"+ifAssSegState);
},"change":function(s,e){var r="/final/monitor/EgServiceTopologyD3JS.jsp?physical_topology=0&type=monitor&treeFlag=null&zoneName=&currentTab=null&aggregateTab=null&openNode=null&treeFlag=null&dashboard_mapping="+d+"&fromHomepage="+isFromHomePage+"&serviceGroup=&iszoneName="+iszoneName+"&isFromZone="+isFromZone+"&parentZone="+parentZone+"&user_name="+user_name+"&action=service&serviceState=service20New_"+ifAssSegState+"&service="+n+"&segment="+e+"&site="+n+"&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isfromCitrix=true&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup+"&activeView=topology";
Ext.get("serTopologyMainCon").dom.src=r;for(var q=0;q<segsWithState.length;q++){var t=segsWithState[q].name;if(t==e){$("#stateCombo-inputEl").removeClass("state_GOOD");$("#stateCombo-inputEl").removeClass("state_HIGH");$("#stateCombo-inputEl").removeClass("state_INTERMEDIATE");$("#stateCombo-inputEl").removeClass("state_LOW");
$("#stateCombo-inputEl").removeClass("state_UNKNOWN");$("#stateCombo-inputEl").addClass("state_"+segsWithState[q].state);break;}}}},tpl:Ext.create("Ext.XTemplate",'<ul style="white-space:nowrap">','<tpl for=".">','<li class="x-boundlist-item"><img src="/final/images/spacer.gif" style="padding-left:18px;vertical-align:middle" class="state_{state}"/>{name}</li>',"</tpl>","</ul>")});
}l.add({xtype:"header",height:35,id:"topology_header_id",tools:h,listeners:{"afterrender":function(q){if(isFromHomePage){q.setTitle("TOPOLOGY");}else{q.setTitle("TOPOLOGY FOR Service : "+n);}}}});var g="/final/monitor/EgServiceTopologyD3JS.jsp?physical_topology=0&type=monitor&treeFlag=null&zoneName=&currentTab=null&aggregateTab=null&openNode=null&treeFlag=null&dashboard_mapping="+d+"&fromHomepage="+isFromHomePage+"&serviceGroup=&iszoneName="+iszoneName+"&isFromZone="+isFromZone+"&parentZone="+parentZone+"&user_name="+user_name+"&action=service&serviceState=service20New_"+ifAssSegState+"&service="+n+"&segment="+m+"&site="+n+"&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isfromCitrix=true&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup+"&activeView=topology"+"&isSerComboNeed="+c;
l.add({xtype:"container",ui:"eg-container",margin:"0 0 1 0",flex:1,id:"serTopologyMainCon",bodyPadding:0,padding:0,border:false,frame:false,layout:"fit",autoEl:{tag:"iframe",name:"perMainIframe",scrolling:"no",id:"serTopologyIframe",frameborder:"0",height:"100%",src:g}});}}});},addSegmentTopologyView:function(){var b=this,a=Ext.getCmp("citrix_ground");
a.add({xtype:"container",id:"cardID",layout:{type:"vbox",align:"stretch"},listeners:{"boxready":function(g){var d=this;var f="";if(!Ext.isEmpty(userMappingApplisTo)&&userMappingApplisTo!=null&&userMappingApplisTo!=undefined){if(userMappingApplisTo.indexOf(":")>0){f=userMappingApplisTo.substring(userMappingApplisTo.indexOf(":")+1);
}}d.add({xtype:"header",height:25,id:"topology_header_id",listeners:{"afterrender":function(h){if(isFromHomePage){h.setTitle("TOPOLOGY");}else{h.setTitle("TOPOLOGY FOR Segment : "+f);}}}});var c="/final/monitor/EgSegmentTopologyD3JS.jsp?segment="+f+"&physical_topology=1&fromHomepage="+isFromHomePage+"&type=segment&zoom=100&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+iszoneName+"&segmentState=segment20New_HIGH";
d.add({xtype:"container",ui:"eg-container",margin:"0 0 1 0",flex:1,id:"segTopologyMainCon",bodyPadding:0,padding:0,border:false,frame:false,layout:"fit",autoEl:{tag:"iframe",name:"perMainIframe",id:"segTopologyIframe",scrolling:"no",frameborder:"0",height:"100%",src:c}});}}});},addMetricsView:function(a){var c=this,b=Ext.getCmp("citrix_ground");
b.add({xtype:"container",id:"cardID",layout:"fit",listeners:{"boxready":function(k){var j=this;if(!Ext.isEmpty(userMappingApplisTo)&&userMappingApplisTo!=null&&userMappingApplisTo!=undefined){if(userMappingApplisTo.indexOf(":")>0){var f=userMappingApplisTo.substring(0,userMappingApplisTo.indexOf(":"));
var h=userMappingApplisTo.substring(userMappingApplisTo.indexOf(":")+1);if(f!=null&&f=="Service"){f="services";}}}var m=false;if(f.toLowerCase().indexOf("component")>-1){m=true;}var l="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){l=Ext.getCmp("dashListComId").getValue();
}var d="";if(Ext.getCmp("nickName")!=null&&Ext.getCmp("nickName")!=undefined&&Ext.getCmp("nickName").getValue()!=null&&Ext.getCmp("nickName").getValue()!="null"){d=Ext.getCmp("nickName").getValue();}if(componentNameSearch!=null&&componentNameSearch!="null"&&componentNameSearch!=undefined&&componentNameSearch!="undefined"){d=componentNameSearch;
}var g="/final/monitor/comparisonComponent.jsp?treeTitle=citrixcomponents&selectedState=&componentNameSearch="+d+"&fromPageView=CitrixDashboard&viewPageTitle=Components&action=component&fromHomepage=&userName=&filterBy="+f+"&subFilter="+h+"&timeline=null&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+l+"&dashboard_name="+dashboard+"&view_name="+selected_view_name+"&fromServiceHomePage="+isFromHomePage+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&firstTime=true&filter=service&serviceName="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup+"&isCitrixComp=true&fromSerComboChange="+fromSerComboChange;
if(typeof hasCitrix==="string"){if(hasCitrix=="true"){if(selected_CompType_st!=null&&selected_CompType_st!=""&&selected_CompType_st!="undefined"&&selected_CompType_st!=undefined){g+="&componentType="+selected_CompType_st;}else{if(((h!=null&&h.indexOf("Agg_")>=0)||(requestParams.serviceCombo!=null&&requestParams.serviceCombo[0].selected.indexOf("Agg_")>=0))&&isUserHaveDirector){g+="&componentType="+directorTypes;
}}}else{if(selected_CompType_st!=null&&selected_CompType_st!=""&&selected_CompType_st!="undefined"&&selected_CompType_st!=undefined){g+="&componentType="+selected_CompType_st;}else{if(((h!=null&&h.indexOf("Agg_")>=0)||(requestParams.serviceCombo!=null&&requestParams.serviceCombo[0].selected.indexOf("Agg_")>=0))&&isUserHaveDirector){g+="&componentType="+directorTypes;
}}}}else{if(hasCitrix){if(selected_CompType_st!=null&&selected_CompType_st!=""&&selected_CompType_st!="undefined"&&selected_CompType_st!=undefined){g+="&componentType="+selected_CompType_st;}else{if(((h!=null&&h.indexOf("Agg_")>=0)||(requestParams.serviceCombo!=null&&requestParams.serviceCombo[0].selected.indexOf("Agg_")>=0))&&isUserHaveDirector){g+="&componentType="+directorTypes;
}}}else{if(selected_CompType_st!=null&&selected_CompType_st!=""&&selected_CompType_st!="undefined"&&selected_CompType_st!=undefined){g+="&componentType="+selected_CompType_st;}else{if(((h!=null&&h.indexOf("Agg_")>=0)||(requestParams.serviceCombo!=null&&requestParams.serviceCombo[0].selected.indexOf("Agg_")>=0))&&isUserHaveDirector){g+="&componentType="+directorTypes;
}}}}if(!Ext.isEmpty(a)){g=a;}j.add({xtype:"container",ui:"eg-container",flex:1,margin:"8 0 0 0",id:"metrics_container",bodyPadding:0,padding:0,border:false,frame:false,layout:"fit",items:[{xtype:"metricscomponentlist",id:"metricscomponentlist_id",layout:"fit",compTypeComboNeeded:m,padding:0,metricsURL:g}]});
j.doLayout();}}});},addSystemsView:function(){var b=this,a=Ext.getCmp("citrix_ground");a.add({xtype:"container",id:"cardID",layout:"fit",listeners:{"boxready":function(d){var c=this;Ext.getCmp("settingIconId").show();var f="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){f=Ext.getCmp("dashListComId").getValue();
}var g="/final/monitor/serviceSystem.jsp?treeTitle=services";g+="&selectNode=Service$cap$"+encodeURIComponent(filterByParamFlag)+"&selectedParam="+encodeURIComponent(filterByParamFlag)+"&currentTab=Systems&isSite=true&aggregateTab=false&hasTransactions=true&hasEmulatedTransactions=false&fromHomepage=&hasLogonSimulations=true&refresh=true&action=Systems&topoSegment="+encodeURIComponent(filterByParamFlag)+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_name="+dashboard+"&dashboard_mapping="+f+"&view_name="+selected_view_name+"&fromServiceHomePage="+isFromHomePage+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
if(selectedSystemCompType!=null&&selectedSystemCompType!="null"&&selectedSystemCompType!=""){g=g+"&componentType="+selectedSystemCompType;}c.add({xtype:"container",ui:"eg-container",flex:1,margin:"8 0 0 0",id:"metrics_container",bodyPadding:0,padding:8,border:false,frame:false,layout:"fit",items:[{xtype:"dashboardgeneralmeasuresgridpanel",id:"systemViewMeasuresgridpanel",layout:"fit",itemId:"system",frame:false,border:true,flex:1,screenLabelPath:"monitor.serviceDashboard",url:g,listeners:{"afterrender":function(e){this.loadTab(e.url,"servicesSys",Reftot,RefpageVal,ReftotalPageno);
}}}]});}}});},addAggregatesView:function(){var b=this,a=Ext.getCmp("citrix_ground");a.add({xtype:"container",id:"cardID",layout:"fit",listeners:{"boxready":function(d){var c=this;var f="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){f=Ext.getCmp("dashListComId").getValue();
}var g="/final/monitor/serviceAggregate.jsp?treeTitle=services";g+="&selectNode=Service$cap$"+encodeURIComponent(filterByParamFlag)+"&selectedParam="+encodeURIComponent(filterByParamFlag)+"&currentTab=Systems&isSite=true&aggregateTab=true&hasTransactions=true&hasEmulatedTransactions=false&fromHomepage=&hasLogonSimulations=true&refresh=true&action=Systems&topoSegment="+encodeURIComponent(filterByParamFlag)+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_name="+dashboard+"&dashboard_mapping="+f+"&view_name="+selected_view_name+"&fromServiceHomePage="+isFromHomePage+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
c.add({xtype:"container",ui:"eg-container",flex:1,margin:"8 0 0 0",id:"metrics_container",bodyPadding:0,padding:8,border:false,frame:false,layout:"fit",items:[{xtype:"dashboardgeneralmeasuresaggregatepanel",id:"systemViewAggregatesgridpanel",cls:"gridHeadercenter",itemId:"aggregates",margin:"10 0 0 0",padding:0,frame:false,border:false,ui:"eg-x-panel",scroll:true,autoScroll:true,height:"100%",style:{"overflow":"auto"},screenLabelPath:"monitor.serviceDashboard",url:g,listeners:{"afterrender":function(e){this.loadTab(e.url,"servicesAgg");
}}}]});}}});},addWebTransactionSubView:function(){var b=this,a=Ext.getCmp("citrix_ground");a.add({xtype:"container",id:"cardID",listeners:{"boxready":function(d){var c=this;if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){selected_dash=Ext.getCmp("dashListComId").getValue();
}var f="/final/monitor/transactions.jsp?treeTitle=services&1=1&&selectNode=Service$cap$"+encodeURIComponent(filterByParamFlag)+"&selectedParam="+encodeURIComponent(filterByParamFlag)+"&currentTab=transactions&isSite=true&aggregateTab=false&hasTransactions=true&hasEmulatedTransactions=false&fromHomepage=&hasLogonSimulations=true&site="+encodeURIComponent(filterByParamFlag)+"&isSite=true&serviceName="+encodeURIComponent(filterByParamFlag)+"&fromLzayer=false&selectNode="+encodeURIComponent(filterByParamFlag)+"&currentTab=transactions&transTab=true&from=null&treeOpen=false&openNode=Services&refresh=true&action=service&topoSegment="+encodeURIComponent(filterByParamFlag)+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+selected_dash+"&dashboard_name="+dashboard+"&view_name="+selected_view_name+"&fromServiceHomePage="+isFromHomePage+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&fromLogonTab=true";
Ext.Ajax.request({url:f,timeout:280000,success:function(g){var G=g.responseText;if(!Ext.isEmpty(G)){var o=Ext.decode(G);var m=o.GridScreenLabels;var F=o.HiddenFields.compType;var z=o.HiddenFields.compName;var w=o.HiddenFields.siteName;if(w!=null&&w!=undefined){citrixDashboard.app.getController("Main").siteName=w;
}var B=(!Ext.isEmpty(m["emulBtnLabel"]))?true:false;var N=(!Ext.isEmpty(m["webBtnLabel"]))?true:false;var s=(!Ext.isEmpty(o["isTabChanged"]))?true:false;var K=(!Ext.isEmpty(o["fromRefresh"]))?true:false;var e=o.HiddenFields.isLogonSimul;var v=o.HiddenFields.Refreshing;var h=o.HiddenFields.innerActiveTab;
var O=o.HiddenFields.timelineParam;if(!Ext.isEmpty(o.HiddenFields)){serviceRefSortByLogon=o.HiddenFields.serviceRefSortByLogon;serviceRefSortByLogonType=o.HiddenFields.serviceRefSortByLogonType;serviceRefSortByLogonId=o.HiddenFields.serviceRefSortByLogonId;}var l=o.ComponentList;var D=o.externalAgents;
var p=o.logonComponentList;var k=o.componentListObj;var r="",A="",C="",q="",x="",I="",j="";var H=false;var J=true;var n,E,L;if(!Ext.isEmpty(k)&&k!=null&&k!=undefined&&(h=="logonSim"||(!B&&!N))){J=false;L=Ext.create("Ext.data.Store",{fields:["value","name","url"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:k});
q=k.label;I=k.selectedValue;selectedCompType=k.selectedValue;}if(!Ext.isEmpty(l)&&l!=null&&l!=undefined&&(h==null||h==undefined||h=="undefined")){n=Ext.create("Ext.data.Store",{fields:["value","name","comptype"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:l});H=false;r=l.label;A=l.selectedValue;
selectedCompTypeValue=l.selectedValue;}else{if(!Ext.isEmpty(D)&&D!=null&&D!=undefined&&(h=="logonSim"||(!B&&!N))){extAgentData=D;n=Ext.create("Ext.data.Store",{fields:["value","name"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:D});H=false;r=extAgentData.label;A=D.selectedValue;}else{H=true;
}}if(!Ext.isEmpty(p)&&p!=null&&p!=undefined){p=p[A];E=Ext.create("Ext.data.Store",{fields:["value","name","comptype"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:p});C=p.label;x=p.selectedValue;j=p.selectedOrgValue;}var u="GOOD";u=o.GridScreenLabels.siteState;var t=true;if(!Ext.isEmpty(h)&&h!=null&&h!=undefined&&h=="logonSim"){t=false;
}curViewTab=h;var y=[{xtype:"container",id:"tabBarHeader1",layout:{type:"hbox",align:"right"},margin:"10 0 0 0",style:{"float":"right"},items:[{xtype:"combo",id:"simulationCombo",itemId:"simulationCombo",editable:false,margin:"0 0 0 10",width:290,hidden:t,store:E,cls:"dropdown",displayField:"name",valueField:"value",trigerAction:"all",fieldLabel:""+C,labelWidth:80,value:x,queryMode:"local"},{xtype:"combo",id:"componentCombo",itemId:"componentCombo",editable:false,labelWidth:75,margin:"0 0 0 10",hidden:H,store:n,cls:"dropdown",width:290,displayField:"name",valueField:"value",trigerAction:"all",fieldLabel:""+r,value:A,queryMode:"local",listeners:{"change":function(P){citrixDashboard.app.getController("Main").onComponentChange(this,"webTrans",w);
}}}]}];c.add({xtype:"panel",ui:"eg-x-panel",style:{"padding":0,"background-color":"transparent !important","border":"none !important","box-shadow":"none"},header:{style:{"padding":"0px !important"}},height:26,id:"dashboard_view_header_id",tools:y,title:"USER EXPERIENCE - WEB TRANSACTIONS <img style='position: relative;left: 6px;top: 3px;' src='/final/images/clear.png' class='iconLayerstack mouse' data-qtip='Layer Model' onclick=\"DashboardToLayers('"+z+"','"+F+"','"+w+"','WebTransactions','"+selected_view_name+"','"+iniName+"','"+user_name+"','"+selected_dash+"')\" /> <img style='position: relative;left: 12px;top: 3px;' src='/final/images/clear.png' class='iconTopology mouse' data-qtip='Topology' onclick=\"loadView('Services_Topology_View')\"/>"});
c.add({xtype:"container",ui:"eg-container",margin:"8 1 0 0",id:"dashboard_view_container_grid",bodyPadding:0,padding:0,border:false,frame:false,items:[{xtype:"container",ui:"eg-container",margin:"0 0 0 0",padding:"0 10 10 10",items:[{xtype:"transactiongridpanel",ui:"newGridPanel",id:"transactiongridpanelid",jsonData:o,isEmuEnabled:B,id:"transGrid1",height:185,border:true}]}]});
try{c.add({xtype:"container",margin:"0 0 0 0",id:"dashboard_view_container_chart",bodyPadding:0,padding:0,border:false,frame:false,items:[{xtype:"container",margin:"10 2 8 0",items:[{xtype:"transactionschartpanel",id:"transactionschartpanelid",jsonData:o,padding:0,border:false,}]}]});}catch(M){}c.doLayout();
}}});}}});},addLogonSubView:function(){var b=this,a=Ext.getCmp("citrix_ground");a.add({xtype:"container",id:"cardID",listeners:{"boxready":function(d){var c=this;var f="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){f=Ext.getCmp("dashListComId").getValue();
}var g="/final/monitor/transactions.jsp?treeTitle=services&selectNode=Service$cap$"+encodeURIComponent(filterByParamFlag)+"&selectedParam="+encodeURIComponent(filterByParamFlag)+"&currentTab=logon&isSite=false&aggregateTab=false&hasTransactions=false&hasEmulatedTransactions=false&fromHomepage=&hasLogonSimulations=true&site="+encodeURIComponent(filterByParamFlag)+"&isSite=true&serviceName="+encodeURIComponent(filterByParamFlag)+"&fromLayer=false&selectNode="+encodeURIComponent(filterByParamFlag)+"&currentTab=logon&transTab=true&from=null&treeOpen=false&openNode=Services&refresh=true&action=service&topoSegment="+encodeURIComponent(filterByParamFlag)+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+f+"&dashboard_name="+dashboard+"&view_name="+selected_view_name+"&fromServiceHomePage="+isFromHomePage+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&fromLogonTab=true";
Ext.Ajax.request({url:g,timeout:280000,success:function(p){var t=p.responseText;if(!Ext.isEmpty(t)){var H=Ext.decode(t);var K=H.HiddenFields.siteName;if(K!=null&&K!=undefined){citrixDashboard.app.getController("Main").siteName=K;}var A=H.logonParam;var S=H.GridScreenLabels;var D=H.HiddenFields.compType;
var P=H.HiddenFields.compName;var K=H.HiddenFields.siteName;var R=(!Ext.isEmpty(S["emulBtnLabel"]))?true:false;var w=(!Ext.isEmpty(S["webBtnLabel"]))?true:false;var N=(!Ext.isEmpty(H["isTabChanged"]))?true:false;var E=(!Ext.isEmpty(H["fromRefresh"]))?true:false;var e=H.HiddenFields.isLogonSimul;var r=H.HiddenFields.Refreshing;
var z=H.HiddenFields.innerActiveTab;var B=H.HiddenFields.timelineParam;var C="";if(!Ext.isEmpty(B)&&B!=null&&B!=undefined){C="&mode="+B.mode+"&time_line="+B.time_line+"&starthr="+B.starthr+"&endhr="+B.endhr+"&starttime="+B.starttime+"&endtime="+B.endtime+"&startmin="+B.startmin+"&endmin="+B.endmin;}z="logonSim";
if(!Ext.isEmpty(H.HiddenFields)){serviceRefSortByLogon=H.HiddenFields.serviceRefSortByLogon;serviceRefSortByLogonType=H.HiddenFields.serviceRefSortByLogonType;serviceRefSortByLogonId=H.HiddenFields.serviceRefSortByLogonId;}var o=H.ComponentList;var h=H.externalAgents;var V=H.logonComponentList;var m=H.componentListObj;
var l=false;if(H.componentListObj!=null&&H.componentListObj["options"].length==1){l=true;singleComponentTypeValue=H.componentListObj["options"][0].value;singleComponentTypeName=H.componentListObj["options"][0].name;}var Q="",T="",n="",F="",J="",s="",L="";var u=false;var O=true;var M,U,x;if(!Ext.isEmpty(m)&&m!=null&&m!=undefined&&(z=="logonSim"||(!R&&!w))){O=false;
x=Ext.create("Ext.data.Store",{fields:["value","name","url"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:m});F=m.label;s=m.selectedValue;selectedCompType=m.selectedValue;}if(!Ext.isEmpty(o)&&o!=null&&o!=undefined&&(z==null||z==undefined||z=="undefined")){M=Ext.create("Ext.data.Store",{fields:["value","name","comptype"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:o});
u=false;Q=o.label;T=o.selectedValue;}else{if(!Ext.isEmpty(h)&&h!=null&&h!=undefined&&(z=="logonSim"||(!R&&!w))){extAgentData=h;M=Ext.create("Ext.data.Store",{fields:["value","name"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:h});u=false;Q=extAgentData.label;T=h.selectedValue;}else{u=true;
}}if(!Ext.isEmpty(V)&&V!=null&&V!=undefined){extSimData=V;V=V[T];U=Ext.create("Ext.data.Store",{fields:["value","name","comptype"],proxy:{type:"memory",reader:{type:"json",root:"options"}},data:V});n=V.label;J=V.selectedValue;L=V.selectedOrgValue;}if(l){O=true;}var y="GOOD";y=H.GridScreenLabels.siteState;
var q=true;if(!Ext.isEmpty(z)&&z!=null&&z!=undefined&&z=="logonSim"){q=false;}curViewTab=z;var G="";if(singleComponentTypeName!=""&&singleComponentTypeName!=null&&singleComponentTypeName!=undefined){singleComponentTypeName=singleComponentTypeName.toUpperCase();G="USER EXPERIENCE - "+singleComponentTypeName+" <img style='position: relative;left: 6px;top: 3px;' src='/final/images/clear.png' class='iconLayerstack mouse' data-qtip='Layer Model' onclick=\"DashboardToLayers('"+P+"','"+D+"','"+K+"','logonSim','"+selected_view_name+"','"+iniName+"','"+user_name+"','"+f+"')\" /> <img style='position: relative;left: 12px;top: 3px;' src='/final/images/clear.png' class='iconTopology mouse' data-qtip='Topology' onclick=\"loadView('Services_Topology_View')\"/>";
}else{G="USER EXPERIENCE - LOGON SIMULATIONS <img style='position: relative;left: 6px;top: 3px;' src='/final/images/clear.png' class='iconLayerstack mouse' data-qtip='Layer Model' onclick=\"DashboardToLayers('"+P+"','"+D+"','"+K+"','logonSim','"+selected_view_name+"','"+iniName+"','"+user_name+"','"+f+"')\" /> <img style='position: relative;left: 12px;top: 3px;' src='/final/images/clear.png' class='iconTopology mouse' data-qtip='Topology' onclick=\"loadView('Services_Topology_View')\"/>";
}var v=[];v.push({xtype:"container",id:"tabBarHeader1",layout:{type:"hbox",align:"right"},margin:"10 0 0 0",style:{"float":"right","border":"none !important"},items:[{xtype:"combo",id:"compTypeCombo",itemId:"compTypeCombo",labelAlign:"left",editable:false,store:x,hidden:O,labelSeparator:"",cls:"dropdown",displayField:"name",valueField:"value",url:"url",trigerAction:"all",fieldLabel:F+":",labelWidth:100,width:290,queryMode:"local",margin:"0 0 0 20",value:s,listeners:{"change":function(W){citrixDashboard.app.getController("Main").onComponentTypeChange(this,"logonSim",K,s,selected_view_name);
}}},{xtype:"combo",id:"componentCombo",itemId:"componentCombo",editable:false,margin:"0 0 0 20",hidden:u,store:M,cls:"dropdown",width:290,displayField:"name",valueField:"value",trigerAction:"all",fieldLabel:""+Q,labelWidth:100,value:T,queryMode:"local",listeners:{"change":function(W){citrixDashboard.app.getController("Main").onComponentChange(this,"logonSim",K,L,selected_view_name);
}}},{xtype:"combo",id:"simulationCombo",itemId:"simulationCombo",editable:false,margin:"0 0 0 20",width:270,hidden:q,store:U,cls:"dropdown",displayField:"name",valueField:"value",trigerAction:"all",fieldLabel:""+n,labelWidth:70,value:J,queryMode:"local",listeners:{"change":function(W){citrixDashboard.app.getController("Main").onSimulationChange(this,"logonSim",K,L,selected_view_name);
}}}]});c.add({xtype:"panel",ui:"eg-x-panel",style:{"padding":0,"background-color":"transparent !important","border":"none !important","box-shadow":"none"},header:{style:{"padding":"0px !important"}},height:26,id:"dashboard_header_id",tools:v,title:G});var k="";if(L!=null&&L.indexOf(":NULL")>-1){k=L.substring(0,L.indexOf(":NULL"));
}else{k=L;}var j="/final/monitor/comparisonLogonSimulator.jsp?"+logonParam+"&componentType=&selectedState=&subFilter=&simulationName="+k+"&externalAgent="+T+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+f+"&dashboard_name="+dashboard+"&view_name="+selected_view_name+"&fromServiceDashboard="+fromServiceDashboard+"&servicename="+K+"&fromSerComboChange="+fromSerComboChange+"&fromServiceHomePage="+isFromHomePage+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&isLogonType=true&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
if(A!=null&&A!=""){j="/final/monitor/comparisonLogonSimulator.jsp?"+A+"&componentType=&selectedState=&subFilter=&simulationName="+k+"&externalAgent="+T+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+f+"&dashboard_name="+dashboard+"&view_name="+selected_view_name+"&fromServiceDashboard="+fromServiceDashboard+"&servicename="+K+"&fromSerComboChange="+fromSerComboChange+"&fromServiceHomePage="+isFromHomePage+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&componentNameService="+L+"&isLogonType=true&filter=service&filterBy="+encodeURIComponent(filterByParamFlag)+"&isFromServiceMenu="+isFromServiceMenu+"&isFromZoneMain="+isFromZoneMain+"&isFromZoneMenu="+isFromZoneMenu+"&isFromServiceGroup="+isFromServiceGroup;
}var I="/final/monitor/simulationGraph.jsp?treeTitle=services&site=NULL&mHost="+T+"&simulationName="+k+"&componentNameService="+L;Ext.Ajax.request({url:I,scope:this,success:function(X){var Z=X.responseText;if(!Ext.isEmpty(Z)){var W=Ext.decode(Z);if(W!=null&&W!=undefined){var Y="gridHeadercenter iconGrid";
if(!Ext.isEmpty(logon_treeTitle)&&logon_treeTitle=="ExtTestDashboard"){Y="gridHeadercenter";}c.add({xtype:"container",margin:"8 1 0 0",id:"dashboard_container_grid",bodyPadding:0,padding:0,border:false,frame:false,items:[{xtype:"generalMeasuresGridPanel",plugins:Ext.create("Ext.ux.AutoColumnWithLockingPlugin"),cls:Y,itemId:"logonSimualtion",searchBoxCombo:false,margin:0,padding:3,id:"perPanel",height:185,frame:false,border:true,layout:{type:"vbox",align:"stretch"},flex:1,screenLabelPath:"monitor.Dashboard",url:j,listeners:{"afterrender":function(aa){this.loadTab(aa.url,null,null,null,null,true,"citrixDashBoard");
}}}]});c.add({xtype:"container",margin:"0 1 0 0",id:"dashboard_container_chart",bodyPadding:0,padding:0,layout:"fit",border:false,frame:false,items:[{xtype:"transactionschartpanel",id:"transactionschartpanelid",jsonData:W,margin:"10 1 0 0",padding:0,border:false,isNotAreaChart:false}]});}}}});}}});}}});
},addEmulatedTransactionSubView:function(){var b=this,a=Ext.getCmp("citrix_ground");a.add({xtype:"container",id:"cardID",layout:{type:"vbox",align:"stretch"},listeners:{"boxready":function(d){var c=this;var f="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){f=Ext.getCmp("dashListComId").getValue();
}var g="/final/monitor/transactions.jsp?treeTitle=services&1=1&&selectNode=Service$cap$"+encodeURIComponent(filterByParamFlag)+"&selectedParam="+encodeURIComponent(filterByParamFlag)+"&currentTab=transactions&isSite=false&aggregateTab=false&hasTransactions=false&hasEmulatedTransactions=true&fromHomepage=&hasLogonSimulations=false&site="+encodeURIComponent(filterByParamFlag)+"&isSite=true&serviceName="+encodeURIComponent(filterByParamFlag)+"&fromLayer=false&selectNode="+encodeURIComponent(filterByParamFlag)+"&selectedParam="+encodeURIComponent(filterByParamFlag)+"&currentTab=transactions&transTab=true&from=null&treeOpen=false&openNode=Services&refresh=true&action=service&topoSegment="+encodeURIComponent(filterByParamFlag)+"&isfromCitrix=true&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+f+"&dashboard_name="+dashboard+"&view_name="+selected_view_name+"&fromServiceHomePage="+isFromHomePage+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&fromLogonTab=true";
Ext.Ajax.request({url:g,timeout:280000,success:function(k){var h=k.responseText;if(!Ext.isEmpty(h)){var p=Ext.decode(h);this.siteName=p.HiddenFields.siteName;var o=p.GridScreenLabels;var e=p.HiddenFields.compType;var m=p.HiddenFields.compName;var q=p.HiddenFields.isWebTrans;var n=p.HiddenFields.siteName;
if(n!=null&&n!=undefined){citrixDashboard.app.getController("Main").siteName=n;}var j="NULL";if(q=="true"){j=filterByParamFlag;}if(sesCombo!=null&&sesCombo!=undefined&&sesCombo!="null"){m=sesCombo;}var l="";if(selAgent!=null&&selAgent!=undefined&&selAgent!="null"){l=selAgent;}c.add({xtype:"panel",ui:"eg-x-panel",style:{"padding":0,"background-color":"transparent !important","border":"none !important","box-shadow":"none"},header:{style:{"padding":"5px 0px 0px 0px !important"}},height:26,id:"dashboard_header_id_Emu",title:fullSessionSimulation+"<img style='position: relative;left: 6px;top: 3px;' src='/final/images/clear.png' onclick=\"DashboardToLayers('"+m+"','"+e+"','"+n+"','emulated','"+selected_view_name+"','"+iniName+"','"+user_name+"','"+f+"')\" class='iconLayerstack mouse' data-qtip='Layer Model'/> <img style='position: relative;left: 12px;top: 3px;' src='/final/images/clear.png' class='iconTopology mouse' data-qtip='Topology' onclick=\"loadView('Services_Topology_View')\"/>"});
c.add({xtype:"container",ui:"eg-container",flex:1,margin:"7 1 1 0",id:"sessionSimTopology",bodyPadding:0,padding:0,border:false,frame:false,layout:{type:"fit",align:"stretch"},autoEl:{tag:"iframe",name:"perMainIframe",id:"sessionSimTopologyIframe",frameborder:"0",scrolling:"no",height:"100%",width:"100%",src:"/final/monitor/sessionSimulation.jsp?scriptName="+selectedScript+"&site="+n+"&dashboard_name="+dashboard+"&compName="+m+"&site="+j+"&compType="+e+"&serviceName="+filterByParamFlag+"&iniName="+iniName+"&user_name="+user_name+"&dashboard_mapping="+f+"&view_name="+selected_view_name+"&fromServiceHomePage="+isFromHomePage+"&fromSerComboChange="+fromSerComboChange+"&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&isCitrix=true&msmt_host="+l}});
}}});}}});},addPage:function(a,j){window.clearInterval(timerId);timerId=window.setInterval("execute()",panelRefFreq);var p=this,e=Ext.getCmp("citrix_ground");for(var k=0;k<Ext.getCmp("citrix_ground").items.items[0].items.items.length;k++){Ext.destroy(e.items.items[0].items.items[k]);}e.removeAll(true);
Ext.getCmp("settingIconId").hide();isRefreshing=false;perVal=0;var f=Ext.getCmp("TimeLineId");var h=null;if(f!=null&&f!=undefined){h=f.getValue();}if(h==null||h==undefined||h==""){h="Current";}var n=Ext.getCmp("dashmenu_model_id");var q=n.forceClickKey;selected_view_name=requestParams.activeView;var b="/final/servlet/com.eg.EgCommonDashboardController?iniName="+iniName+"&user_name="+encodeURI(user_name)+"&action=loadViewData&subject="+encodeURI(dashboard)+"&time_line="+encodeURI(h)+"&isUserBased=true&view_name="+encodeURI(selected_view_name)+"&dashboard_mapping="+encodeURI(dashboard_mapping)+"&fromSerComboChange="+fromSerComboChange+"&dashboard_name="+dashboard;
if(isFromHomePage||isFromHomePage=="true"){b+="&fromServiceHomePage="+isFromHomePage+"&appliesTo="+userMappingApplisTo;}if(isFromZonePage||isFromZonePage=="true"){b+="&fromZonePage="+fromZonePage;}var o="/final/servlet/com.eg.EgCommonDashboardController?iniName="+iniName+"&user_name="+encodeURI(user_name)+"&action=loadViewData&subject="+encodeURI(dashboard)+"&time_line="+encodeURI(h)+"&isUserBased=true&view_name=Geo_View&filterName=World&filterViewName="+"&dashboard_mapping="+encodeURI(dashboard_mapping)+"&fromSerComboChange="+fromSerComboChange+"&dashboard_name="+dashboard;
var d="/final/servlet/com.eg.EgCommonDashboardController?iniName="+iniName+"&user_name="+encodeURI(user_name)+"&action=loadViewData&subject="+encodeURI(dashboard)+"&time_line="+encodeURI(h)+"&isUserBased=true&view_name=Geo_View&filterName="+countryCode+"&filterViewName=Geo_Country_View"+"&dashboard_mapping="+encodeURI(dashboard_mapping)+"&fromSerComboChange="+fromSerComboChange+"&dashboard_name="+dashboard;
var m="";var l=false;var g=false;var c=false;selected_CompType_st="";if((!isFromUED||isFromUED=="false")&&(q==null||q==undefined||q=="")){q="World";}if(!Ext.isEmpty(selected_view_name)&&(selected_view_name.trim()=="Geo_View"||selected_view_name.trim()=="Overview_View")&&q!=null&&q!=undefined&&q!=""){if(q=="World"){b=b+"&filterName="+encodeURI(q)+"&filterViewName=";
}else{b=b+"&filterName="+encodeURI(q)+"&filterViewName=Geo_Country_View";c=true;}}else{if((isFromUED==true||isFromUED=="true")&&!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Geo_View"){if(filterName!=null&&filterName!=undefined&&filterName=="World"){b=b+"&filterName=World&filterViewName=";
}else{if(filterName=="undefined"){b=b+"&filterName=World&filterViewName=";}else{b=b+"&filterName="+encodeURI(filterName)+"&filterViewName="+filterViewName;}}b+="&isFromUED=true";l=true;if(filterViewName!=null&&filterViewName!=undefined&&filterViewName=="Geo_Region_View"){g=true;}}else{if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Logon_View"){selected_CompType_st="";
b=b+"&filterName=Logon_View&filterViewName=";}else{if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Resources_View"){selected_CompType_st="";m=b;b=b+"&selectedVariable=Resources_Block_1_Title,Resources_Block_1_Value,Resources_Block_2_Title,Resources_Block_2_Value";}}}}if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Services_Topology_View"){p.addServiceTopologyView();
}else{if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Segments_Topology_View"){p.addSegmentTopologyView();}else{if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Metrics_View"){p.addMetricsView(j);}else{if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Systems_View"){p.addSystemsView();
}else{if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Aggregates_View"){p.addAggregatesView();}else{if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Web_Transaction_Sub_View"){p.addWebTransactionSubView();}else{if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Logon_Sub_View"){p.addLogonSubView();
}else{if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Emulated_Transaction_Sub_View"){p.addEmulatedTransactionSubView();}else{Ext.Ajax.request({url:b,method:"POST",scope:this,timeout:280000,success:function(t,r){var s=t.responseText;var z=true;if(s!=null&&s!=undefined){var x=Ext.decode(s);
if(x!=null&&x!=undefined){if(x.loadViewDetails!=null&&x.loadViewDetails!=undefined){var y=x.loadViewDetails;if(y!=null&&y!=undefined&&y.length>0){if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Geo_View"){p.addGeoPage(y,l,g,c,o,d);}else{if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Logon_View"){p.addLogonPage(y);
}else{if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="UserExperience_View"){p.addUxPage(y);}else{if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Broker_View"){p.addBrokerPage(y);}else{if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Sessions_View"){p.addSessionsPage(y);
}else{if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Applications_View"){p.addApplicationsPage(y);}else{if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Resources_View"){p.addResourcesPage(y,m);}else{if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Alerts_View"){p.addAlertsPage(y);
}else{if(!Ext.isEmpty(selected_view_name)&&selected_view_name.trim()=="Overview_View"){p.addOverviewPage(y);}}}}}}}}}}}try{var v=Ext.ComponentQuery.query('button[itemId="overviewtoggle"]')[0];if(!Ext.isEmpty(v)){if(toggleObjSpc!=null){var w=Ext.getCmp(toggleObjSpc);if(!Ext.isEmpty(w)&&!Ext.isEmpty(w.pressed)&&w.pressed){v.pressed=true;
p.toggleOverViewrefresh(v,true);}else{if(!Ext.isEmpty(w)){v.pressed=false;p.toggleOverViewrefresh(v,false);}}}}}catch(u){}}}}});}}}}}}}}},autoScrollTvMode:function(g){if(!Ext.isEmpty(window.parent.isTvMode)){$.fn.hasScrollBar=function(){return this.get(0).scrollHeight-40>this.height();};if(window.parent.isTvMode){var e=window.parent.Ext.getCmp("playBtn").ifScroll=true;
var k=Ext.get(g).dom.scrollHeight-Ext.get(g).dom.offsetHeight;var h=k*100;var d=k*70;var l=$("#"+g).hasScrollBar();var a=false;var j="";var c=function(){var n=window.parent.Ext.getCmp("tvmode").sliderAction;if(n=="pause"){Ext.get(g).getActiveAnimation().paused=false;a=true;}else{clearTimeout(j);Ext.get(g).getActiveAnimation().paused=true;
window.parent.Ext.getCmp("tvmode").sliderObj.pause();a=false;}};if(l){var f=Ext.get(g).getActiveAnimation().paused=true;window.parent.Ext.getCmp("tvmode").sliderObj.pause();Ext.get(g).scroll("b",h,{duration:d,listeners:{beforeanimate:function(o,n){isKioskModeScrollInProgress=true;},afteranimate:function(p,o,n){Ext.get(g).stopAnimation();
Ext.defer(function(){isKioskModeScrollInProgress=false;window.parent.Ext.getCmp("tvmode").sliderObj.play();if(!Ext.isEmpty(m)){m.destroy();}},1000);window.parent.Ext.getCmp("playBtn").ifScroll=false;}}},{scope:Ext.get(g)});}else{window.parent.Ext.getCmp("playBtn").ifScroll=false;window.parent.Ext.getCmp("tvmode").sliderObj.pause();
if(a==true){clearTimeout(j);window.parent.Ext.getCmp("tvmode").sliderObj.pause();}else{j=Ext.defer(function(){window.parent.Ext.getCmp("tvmode").sliderObj.play();},window.parent.Ext.getCmp("tvmode").getTimeFrequency);}}var m=new Ext.util.TaskRunner();var b=m.start({run:c,interval:1000});}}},overviewdetailsRender:function(){var c=this;
var b=Ext.ComponentQuery.query('button[itemId="overviewtoggle"]')[0];try{if(!Ext.isEmpty(b)){if(Ext.getCmp("geo_toggle").pressed){b.pressed=true;Ext.defer(function(){c.toggleOverView(b,true);},1);}else{b.pressed=false;c.toggleOverView(b,false);}}}catch(a){}},toggleOverView:function(a,b,e){var g=this,j=Ext.get(g.getOverviewdetails().el.id),f=60,c=140,k=200,d=Ext.get(g.getOverviewdetails().el.id).select(".s_box"),h=Ext.get(g.getOverviewdetails().el.id).select(".b_box");
if(b){a.setIconCls("toggle_p");g.getOverviewdetails().suspendLayouts();h.setStyle("display","none");d.setStyle("display","block");j.animate({duration:k,to:{height:f},listeners:{beforeanimate:function(){d.animate({to:{top:0}});},afteranimate:function(){g.getOverviewdetails().setHeight(f);}}});g.getOverviewdetails().resumeLayouts(true);
}else{a.setIconCls("toggle_m");g.getOverviewdetails().suspendLayouts();h.setStyle("display","block");j.animate({duration:k,to:{height:c},listeners:{beforeanimate:function(){g.getOverviewdetails().setHeight(c);d.animate({to:{top:500}});d.setStyle("display","none");},afteranimate:function(){}}});g.getOverviewdetails().resumeLayouts(true);
}this.getMain().doComponentLayout();},toggleOverViewrefresh:function(a,b,e){var g=this,j=Ext.get(g.getOverviewdetails().el.id),f=60,c=140,k=200,d=Ext.get(g.getOverviewdetails().el.id).select(".s_box"),h=Ext.get(g.getOverviewdetails().el.id).select(".b_box");if(b){a.setIconCls("toggle_p");g.getOverviewdetails().suspendLayouts();
h.setStyle("display","none");d.setStyle("display","block");j.animate({duration:k,to:{height:f},listeners:{beforeanimate:function(){d.setStyle("top","0");},afteranimate:function(){g.getOverviewdetails().setHeight(f);}}});g.getOverviewdetails().resumeLayouts(true);}else{a.setIconCls("toggle_m");g.getOverviewdetails().suspendLayouts();
h.setStyle("display","block");j.animate({duration:k,to:{height:c},listeners:{beforeanimate:function(){g.getOverviewdetails().setHeight(c);d.animate({to:{top:500}});d.setStyle("display","none");},afteranimate:function(){}}});g.getOverviewdetails().resumeLayouts(true);}this.getMain().doComponentLayout();
},loadListView:function(){Ext.Ajax.request({url:"/final/servlet/com.eg.EgCommonDashboardController?comesFrom=listViewPage&action=loadCtxDashList&isDisablePopupOption=true"+"&iniName="+iniName+"&fromSerComboChange="+fromSerComboChange+"&dashboard_name="+dashboard,method:"POST",scope:this,success:function(a){var b=a.responseText;
if(b!=null&&b!=""){publicJson=Ext.decode(b);this.loadListViewPage(publicJson);}b=null;delete b;}});},loadListViewPage:function(c){if(!Ext.isEmpty(c)&&c!=null&&c!=undefined){var j=this.getMain();if(!Ext.isEmpty(j)&&j!=null&&j!=undefined){j.removeAll();}var b=c["myDashboardsList"];var h=b["defaultMyDashboard"];
var a=b["personalSharingData"];var g=j.getWidth()-20;var f=j.getHeight()-75;var e=c["myDashboardsList"]["personalSharingData"];var d=c["myDashboardsList"]["errorMsg"];if(a!=null&&a!="-"){j.add({xtype:"mydashboardlistview",autoscroll:true,scroll:true,height:(j.getHeight()-55),dataforView:c["myDashboardsList"]["personalSharingData"]});
}else{j.add({xtype:"container",id:"errorContainer",autoscroll:true,scroll:true,width:(j.getWidth()-35),height:(j.getHeight()-55),listeners:{"resize":function(k){k.width=(k.getWidth()-35);}},html:'<div style="height:100%;width:100%;display:table"><div class="msgFont" style="display:table-cell;vertical-align:middle"> <div class="iconInformation" style="margin:0px auto"></div><div style="text-align:center">'+d+"</div></div></div>"});
}this.hideDashboardTools(j);j.doLayout();}},hideDashboardTools:function(a){if(!Ext.isEmpty(a)){a.setTitle("");}var d=Ext.create("Ext.data.Store",{fields:["valueField","displayField"],data:[]});var c=Ext.getBody().getViewSize().width-540;var e=Ext.create("Ext.toolbar.Toolbar",{items:[{xtype:"container",dock:"top",ui:"footer",id:"listPageHeaderMenu",layout:"hbox",align:"left",hidden:true,items:[{xtype:"checkbox",boxLabel:"",cls:"checkbt",margin:"2 0 0 0",name:"selectAllDashboards",inputValue:"selectAll",id:"selectAllDashboards",hidden:false,},{xtype:"button",width:16,height:16,padding:0,margin:"4 0 0 0",overCls:"buttonOver",id:"DeleteListOfDashboards",iconCls:"iconDelete",style:{"border":"0px !important","background":"transparent;"},hidden:true,listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",html:toolDelete,ghost:false,trackMouse:true});
}}},{xtype:"tbseparator",id:"deleteAllSeparator",hidden:true,height:22,},{xtype:"container",margin:"0px 0px 0 0px",html:'<div class="fontStyleRobot font_normal13" style="margin-top:3px">AVAILABLE DASHBOARDS VIEWS</div>',},{xtype:"button",cls:"buttonNew",margin:"0px 0 0px 5px",iconCls:"iconAddDashboardPlus",padding:0,text:"Add New",listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:addDashLbl});
}},action:"addNew"}]},{xtype:"tbspacer",width:c},{xtype:"container",items:[{xtype:"trigger",id:"searchMyDashboard",name:"searchMyDashboard",labelWidth:40,margin:"0px 10px 0px 0px",fieldLabel:"",cls:"whitedropdown_search",emptyText:searchDashLbl,listeners:{change:function(j,g,f,h){j.onTextFieldChange(j,g,f,h);
$(".textView").highlight(g);}},onTextFieldChange:function(l,k,g,h){var f=Ext.getCmp("dataViewId");if(!Ext.isEmpty(f)){if(k=="*"){f.store.clearFilter();}else{if(k.lastIndexOf("*")==(k.length-1)){k=k.substr(0,(k.length-1));}f.store.suspendEvents(true);f.store.clearFilter();f.store.resumeEvents();if(k){var j=new RegExp(Ext.String.escapeRegex(k),"i");
f.store.filter({filterFn:function(m){var p=m.get("dashboardName");var o=j.test(p);if(!o){var n=k;f.emptyText='<table width="100%" height="480px" style="margin:0% auto"><tr><td align="center" valign="middle"><div class="iconInformation"></div><div styel="margin:10px auto">'+dataViewNoDashboardExistMsg+" "+n+"</div></td></tr></table>";
}return o;}});}l.focus();}}Ext.getCmp("selectAllDashboards").setValue(false);}}]},{xtype:"container",margin:"0 5px 0 0px",itemId:"homeBtnContainer",cls:"iconBg",items:[{xtype:"button",iconCls:"dashboard_home",listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:homeTooltipLbl});
},"click":function(){var g="";if(!Ext.isEmpty(Ext.getCmp("dashListComId"))&&Ext.getCmp("dashListComId")!=null&&Ext.getCmp("dashListComId")!=undefined){g=Ext.getCmp("dashListComId").getValue();}var f="/final/monitor/citrixDashboard.jsp?&userBased=true&fromMenu=true&showConfig=true&iniName="+iniName+"&dashboard_mapping="+g+"&dashboard_name="+dashboard;
if(deletedDefaultView){Ext.Msg.show({title:ctxDashboardAlertLbl,msg:defaultDashboardAlertMsg,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});}else{citrixDashboard.app.getController("Main").goToCitrixDashboard(f);}}},id:"homeBtn",style:{background:"none",border:"0px"}}]}]});var b=Ext.getCmp("mainview_tbar_Id");
if(!Ext.isEmpty(b)&&b!=null&&b!=undefined){b.removeAll();b.add(e);Ext.getCmp("listPageHeaderMenu").show();}},createCtxCustomDashboard:function(a){var c=this;var j=Ext.getCmp("customConfigTemplateWindow");var d=j.getComponent("customdashconfigform").getForm();var n=d.findField("customDashbrdNam").getValue();
var s="";if(j.dashBoardAction=="Modify"){s=j.dashboardName;}a.setDisabled(true);if(this.checkBlankSpc(n)){Ext.Msg.show({title:ctxDashboardAlertLbl,msg:dashboardBlankNameAlertMsg,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});a.setDisabled(false);return;}if(n!=null&&n.length>32){Ext.Msg.show({title:ctxDashboardAlertLbl,msg:maxDashbrdLengthAlert,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
a.setDisabled(false);return;}if(this.checkSpecialCharacter(n)){Ext.Msg.show({title:ctxDashboardAlertLbl,msg:dashboardSplCharacterAlertMsg,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});a.setDisabled(false);return;}var e=d.findField("infraTypeCombo").getValue();var g=Ext.getCmp("compMultiSelect").getValue();
var l="";var h="";if(e!=null&&(e=="Zone"||e=="Segment"||e=="Service"||e=="ComponentType")){l=d.findField("subInfraTypeCombo").getValue();if(l=="-1"){var k="";if(e=="Zone"){k=noZoneSelectedAlertMsg;}else{if(e=="Segment"){k=noSegmentSelectedAlertMsg;}else{if(e=="Service"){k=noServiceSelectedAlertMsg;}else{if(e=="ComponentType"){k=noCompTypeSelectedAlertMsg;
}}}}Ext.Msg.show({title:ctxDashboardAlertLbl,msg:k,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});a.setDisabled(false);return;}}else{var b="";if(!Ext.isEmpty(g)&&g!=undefined&&g!=null){for(var o=0;o<g.length;o++){b=b+","+g[o];}if(!Ext.isEmpty(b)&&b!=null&&b!=undefined&&b.indexOf(",")==0){l=b.substring(1);
}}h=d.findField("subInfraTypeCombo").getValue();}var q=Ext.getCmp("aggregateTypeCombo").getValue();var m=Ext.getCmp("siteDirMultiSelect").getValue();var r="";if(!Ext.isEmpty(m)&&m!=undefined){for(var o=0;o<m.length;o++){r=r+","+m[o];}if(!Ext.isEmpty(r)&&r!=null&&r!=undefined&&r.indexOf(",")==0){r=r.substring(1);
}}if(!Ext.isEmpty(l)&&l!=null&&l!=undefined&&l.indexOf("None,")==0){l=l.substring(l.indexOf("None,")+5);}if(!Ext.isEmpty(r)&&r!=null&&r!=undefined&&r.indexOf("None,")==0){r=r.substring(r.indexOf("None,")+5);}l=(Ext.isEmpty(l)||l==null||l==undefined||l=="")?"None":l;q=(Ext.isEmpty(q)||q==null||q==undefined||q=="")?"None":q;
r=(Ext.isEmpty(r)||r==null||r==undefined||r=="")?"None":r;if(!Ext.isEmpty(Ext.getCmp("aggregateTypeCombo"))&&Ext.getCmp("aggregateTypeCombo")!=null&&Ext.getCmp("aggregateTypeCombo")!=undefined&&!Ext.getCmp("aggregateTypeCombo").isVisible()){q="";}if(!Ext.isEmpty(Ext.getCmp("siteDirMultiSelect"))&&Ext.getCmp("siteDirMultiSelect")!=null&&Ext.getCmp("siteDirMultiSelect")!=undefined&&!Ext.getCmp("siteDirMultiSelect").isVisible()){r="";
}if((!Ext.isEmpty(l)&&l=="None")){Ext.Msg.show({title:ctxDashboardAlertLbl,msg:noFilterTypeSelectedAlertMsg+" "+e,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});a.setDisabled(false);return;}if((!Ext.isEmpty(l)&&l=="None")&&(!Ext.isEmpty(q)&&q=="None")&&(!Ext.isEmpty(r)&&r=="None")){Ext.Msg.show({title:ctxDashboardAlertLbl,msg:noTypeSelectedAlertMsg,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
a.setDisabled(false);return;}if(!Ext.isEmpty(h)&&h!=null&&h!="undefined"){e=encodeURIComponent(e+"~^~"+h);}var p="addCtxDash";if(j.dashBoardAction=="Modify"){p="modifyCtxDash";}var f="&action="+p+"&dashboardName="+encodeURIComponent(n)+"&selectedType="+e+"&selected_value="+l+"&aggregateSelected="+q+"&siteAndDirVal="+r+"&dashboard_name="+dashboard;
if(j.dashBoardAction=="Modify"){f=f+"&prevDashboardName="+encodeURIComponent(s);}Ext.Ajax.request({url:"/final/servlet/com.eg.EgCommonDashboardController?comesFrom=listViewPage"+f+"&iniName="+iniName+"&fromSerComboChange="+fromSerComboChange+"&dashboard_name="+dashboard,method:"POST",scope:this,success:function(u){var x=u.responseText;
if(x!=null&&x!=""){var t=j.dashBoardAction;Ext.destroy(Ext.getCmp("customConfigTemplateWindow"));var v=Ext.decode(x);var w=v["myDashboardsList"]["dashboardExists"];if(!Ext.isEmpty(w)&&w!=undefined&&w!=null){Ext.Msg.show({title:ctxDashboardAlertLbl,msg:dashboardExistAlertMsg,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
}this.loadListViewPage(v);}},failure:function(t,u){a.setDisabled(false);}});},modifyCtxListDashboard:function(a,e,d){var c=this;var b=Ext.create("citrixDashboard.view.CustomConfigTemplateWindow",{modal:true,id:"customConfigTemplateWindow"});Ext.Ajax.request({url:"/final/servlet/com.eg.EgCommonDashboardController?comesFrom=listViewPage&selectedType=ComponentType&action="+e+"&dashboardName="+a+"&iniName="+iniName+"&loadModifyDashboardPopup=true&fromSerComboChange="+fromSerComboChange+"&dashboard_name="+dashboard,method:"POST",scope:this,success:function(f){var A=f.responseText;
if(A!=null&&A!=""){var o=Ext.decode(A);var k=o["myDashboardsList"];var v=o["screenLabels"]["monitor.common.Modify Dashboard"];b.suspendEvents(true);Ext.apply(b,{title:v});var q=b.getComponent("customdashconfigform").getForm();var w=q.findField("customDashbrdNam");w.setFieldLabel(o["screenLabels"]["monitor.dashboard.Dashboard Name"]);
var z=k["dashboardName"];if(!Ext.isEmpty(z)&&z!=null&&z!=undefined){w.setValue(z);w.readOnly=true;w.show();}var h=Ext.getCmp("customCreateDashboardBtn");if(!Ext.isEmpty(h)&&h!=null&&h!=undefined){h.setText(o["screenLabels"]["admin.mpolicy.Update"]);h.setDisabled(false);}var B=q.findField("infraTypeCombo");
B.setFieldLabel(o["screenLabels"]["monitor.common.View by"]);var s=k["listViewTypes"]["selectedType"];if(!Ext.isEmpty(B)&&B!=null&&B!=undefined){var t=k["listViewTypes"]["typeOptions"];c.setValueWithOptionInList(B,t,s,"");}var j=Ext.getCmp("subInfraTypeCombo");var m=Ext.getCmp("compMultiSelect");if(!Ext.isEmpty(s)&&s!=null&&s!=undefined&&s=="Components"){if(!Ext.isEmpty(m)&&m!=null&&m!=undefined&&!Ext.isEmpty(k["listViewCompValues"])&&k["listViewCompValues"]!=null&&k["listViewCompValues"]!=undefined){m.getStore().loadRawData(k["listViewCompValues"]["selectedOptions"]);
var y=k["listViewCompValues"]["selectedTypeValue"];m.setValue(y);var E=q.findField("infraTypeCombo").getRawValue();var l=Ext.getCmp("compMultiLbl");if(!Ext.isEmpty(l)&&l!=null&&l!=undefined){l.setText(E);}}else{m.hide();var l=Ext.getCmp("compMultiLbl");l.hide();}if(!Ext.isEmpty(j)&&j!=null&&j!=undefined){c.setValueWithOptionInList(j,k["listViewValues"]["selectedOptions"],k["listViewValues"]["selectedTypeValue"],"");
j.setFieldLabel(q.findField("infraTypeCombo").getRawValue());j.show();}}else{if(!Ext.isEmpty(j)&&j!=null&&j!=undefined){c.setValueWithOptionInList(j,k["listViewValues"]["selectedOptions"],k["listViewValues"]["selectedTypeValue"],"");j.setFieldLabel(q.findField("infraTypeCombo").getRawValue());m.hide();
j.show();}}if(!Ext.isEmpty(s)&&s!=null&&s!=undefined&&(s=="Zone"||s=="Segment"||s=="Service")){c.setValuesForSiteAndDirector("loadModifyDashboardPopup");}else{var r=Ext.getCmp("aggregateTypeCombo");var g=Ext.getCmp("subInfraTypeCombo").getValue();if(!Ext.isEmpty(s)&&s!=undefined&&s!=null&&(s=="ComponentType"||s=="Components")&&g!=null&&g!=undefined&&g.indexOf("Agg_")==0){var u=Ext.getCmp("aggregateTypeLbl");
if(!Ext.isEmpty(u)&&u!=null&&u!=undefined){u.setText("");}r.hide();}else{if(!Ext.isEmpty(r)&&r!=null&&r!=undefined&&k["listViewAggregates"]["selectedOptions"]!=null&&!Ext.isEmpty(k["listViewAggregates"]["selectedOptions"])&&(k["listViewAggregates"]["selectedOptions"]).length>1&&k["listViewAggregates"]["selectedTypeValue"]!="None"){var n=k["listViewAggregates"]["selectedOptions"];
r.getStore().loadRawData(n);var y=k["listViewAggregates"]["selectedTypeValue"];r.setValue(y);var F=(s!=null&&(s=="Components"||s=="ComponentType"))?"Select Aggregates for Graph (Optional)":"Aggregates";var u=Ext.getCmp("aggregateTypeLbl");if(!Ext.isEmpty(u)&&u!=null&&u!=undefined){u.setText(F);}}else{var u=Ext.getCmp("aggregateTypeLbl");
if(!Ext.isEmpty(u)&&u!=null&&u!=undefined){u.setText("");}r.hide();}}var p=Ext.getCmp("siteDirMultiSelect");if(!Ext.isEmpty(p)&&p!=null&&p!=undefined&&!Ext.isEmpty(k["listViewSiteAndDirector"])&&k["listViewSiteAndDirector"]!=null&&k["listViewSiteAndDirector"]!=undefined&&k["listViewSiteAndDirector"]["selectedOptions"].length>1&&k["listViewSiteAndDirector"]["selectedTypeValue"]!="None"){var x=k["listViewSiteAndDirector"]["selectedOptions"];
p.getStore().loadRawData(x);var y=k["listViewSiteAndDirector"]["selectedTypeValue"];p.setValue(y);var C=o["screenLabels"]["monitor.common.SitesAndDirector"];var D=Ext.getCmp("siteDirMultiLbl");if(!Ext.isEmpty(D)&&D!=null&&D!=undefined){D.setText(C);p.show();}}else{p.hide();var D=Ext.getCmp("siteDirMultiLbl");
D.hide();}}b.show();b.resumeEvents();}},failure:function(f,g){if(f.timedout){b.removeAll();b.suspendEvents(true);b.update('<table width="100%" height="'+(configtemplatewindow.getHeight()-20)+'"><tr><td align="center" valign="middle"><div class="requestTimeOut" style="z-index:19001;left:45%;top:35%;width:180px"><div style="position:relative">'+requestTimeoutMsg+"</div></div></td></tr></table>");
b.resumeEvents();b.doComponentLayout();}}});},loadAddDashboardPopup:function(){var b=this;var a=Ext.create("citrixDashboard.view.CustomConfigTemplateWindow",{modal:true,cls:"myDashboardwindow",id:"customConfigTemplateWindow"});Ext.Ajax.request({url:"/final/servlet/com.eg.EgCommonDashboardController?comesFrom=listViewPage&selectedType=ComponentType&action=loadAddDashboardPopup&iniName="+iniName+"&fromSerComboChange="+fromSerComboChange+"&dashboard_name="+dashboard,method:"POST",scope:this,success:function(c){var v=c.responseText;
if(v!=null&&v!=""){var j=Ext.decode(v);var t=j["screenLabels"]["monitor.common.Add Dashboard"];a.suspendEvents(true);Ext.apply(a,{title:t});var l=a.getComponent("customdashconfigform").getForm();var q=l.findField("customDashbrdNam");q.setFieldLabel(j["screenLabels"]["monitor.dashboard.Dashboard Name"]);
q.setValue("");q.show();var d=Ext.getCmp("customCreateDashboardBtn");if(!Ext.isEmpty(d)&&d!=null&&d!=undefined){d.setText(j["screenLabels"]["admin.mpolicy.Create"]);d.setDisabled(false);}var w=l.findField("infraTypeCombo");w.setFieldLabel(j["screenLabels"]["monitor.common.View by"]);var n=j["listViewTypes"]["selectedType"];
if(!Ext.isEmpty(w)&&w!=null&&w!=undefined){var o=j["listViewTypes"]["typeOptions"];b.setValueWithOptionInList(w,o,n,"");}var e=Ext.getCmp("subInfraTypeCombo");var g=Ext.getCmp("compMultiSelect");if(!Ext.isEmpty(n)&&n!=null&&n!=undefined&&n=="Components"){if(!Ext.isEmpty(g)&&g!=null&&g!=undefined){g.getStore().loadRawData(j["listViewValues"]["selectedOptions"]);
var u=j["listViewValues"]["selectedTypeValue"];g.setValue(u);var z=l.findField("infraTypeCombo").getRawValue();var f=Ext.getCmp("compMultiLbl");if(!Ext.isEmpty(f)&&f!=null&&f!=undefined){f.setText(z);}e.hide();g.show();}}else{if(!Ext.isEmpty(e)&&e!=null&&e!=undefined){b.setValueWithOptionInList(e,j["listViewValues"]["selectedOptions"],j["listViewValues"]["selectedTypeValue"],"");
e.setFieldLabel(l.findField("infraTypeCombo").getRawValue());g.hide();e.show();}}var m=Ext.getCmp("aggregateTypeCombo");if(!Ext.isEmpty(m)&&m!=null&&m!=undefined){var h=j["listViewAggregates"]["selectedOptions"];if(!Ext.isEmpty(j["listViewAggregates"])&&j["listViewAggregates"]!=null&&j["listViewAggregates"]!=undefined&&h.length>1){m.getStore().loadRawData(h);
var u=j["listViewAggregates"]["selectedTypeValue"];m.setValue(u);}else{m.hide();var p=Ext.getCmp("aggregateTypeLbl");p.hide();}}var k=Ext.getCmp("siteDirMultiSelect");if(!Ext.isEmpty(k)&&k!=null&&k!=undefined){var r=j["listViewSiteAndDirector"]["selectedOptions"];k.getStore().loadRawData(r);var u=j["listViewSiteAndDirector"]["selectedTypeValue"];
k.setValue(u);var x=j["screenLabels"]["monitor.common.SitesAndDirector"];var y=Ext.getCmp("siteDirMultiLbl");var s=Ext.getCmp("siteDirContainer");if(!Ext.isEmpty(y)&&y!=null&&y!=undefined){y.setText(x);if(Ext.getCmp("compMultiSelect")!=null&&!Ext.isEmpty(Ext.getCmp("compMultiSelect"))&&(Ext.getCmp("compMultiSelect")).isVisible){$("siteDirMultiLbl").css("margin-left","-10px");
$("aggregateTypeCombo").css("margin-left","-10px");}k.show();}}a.show();a.dashBoardAction="Add";a.resumeEvents();j=null;delete j;}v=null;delete v;},failure:function(c,d){if(c.timedout){a.removeAll();a.suspendEvents(true);a.update('<table width="100%" height="'+(configtemplatewindow.getHeight()-20)+'"><tr><td align="center" valign="middle"><div class="requestTimeOut" style="z-index:19001;left:45%;top:35%;width:180px"><div style="position:relative">'+requestTimeoutMsg+"</div></div></td></tr></table>");
a.resumeEvents();a.doComponentLayout();}}});},setValueWithOptionInList:function(g,e,d,f){var c=g.getStore();if(!Ext.isEmpty(c)){c.removeAll();g.suspendEvents(false);c.loadRawData(e);if(f!=null&&f!=""){c.insert(0,{displayField:f,valueField:"-1"});g.setValue(d);}else{var a=false;for(var b=0;b<e.length;
b++){if(e[b].valueField==d&&d!=""&&d!=null){g.setValue(d);a=true;}}if(!a){g.setValue(e[0].valueField);}}g.resumeEvents();}},getCustomOptionsForType:function(){var c=this.getCustomConfigTemplateWindow();if(Ext.isEmpty(c)){c=Ext.widget("customConfigTemplateWindow");}var b=c.getComponent("customdashconfigform").getForm();
var g=Ext.getCmp("infraTypeCombo").getValue();var a=b.findField("subInfraTypeCombo");var d=null;if(!Ext.isEmpty(g)&&g!=undefined&&g!=null){d=Ext.getCmp("subInfraTypeCombo").getValue();}var f=Ext.getCmp("compMultiSelect");c.width=500;if(g!=null&&g=="Components"){}else{f.hide();a.show();}var h="";if(!Ext.isEmpty(Ext.getCmp("customDashbrdNam"))&&Ext.getCmp("customDashbrdNam")!=null&&Ext.getCmp("customDashbrdNam")!=undefined){h=Ext.getCmp("customDashbrdNam").getValue();
}var e=this;Ext.Ajax.request({url:"/final/servlet/com.eg.EgCommonDashboardController?comesFrom=listViewPage&action=loadAddDashboardPopup&selectedType="+g+"&iniName="+iniName+"&selected_value="+d+"&dashboardName="+h+"&fromSerComboChange="+fromSerComboChange+"&dashboard_name="+dashboard,method:"POST",scope:this,async:true,success:function(n){var k=n.responseText;
if(k!=null&&k!=""){var q=Ext.decode(k);var l=b.findField("subInfraTypeCombo");e.setValueWithOptionInList(l,q["listViewValues"]["selectedOptions"],q["listViewValues"]["selectedTypeValue"],"");var r=(g!=null&&g=="Components"&&d=="None")?"Component Type":b.findField("infraTypeCombo").getRawValue();l.setFieldLabel(r);
f.hide();var p=Ext.getCmp("compMultiLbl");if(!Ext.isEmpty(p)&&p!=null&&p!=undefined){p.hide();}l.show();var m=Ext.getCmp("aggregateTypeCombo");m.hide();var s=Ext.getCmp("aggregateTypeLbl");s.hide();var o=Ext.getCmp("siteDirMultiSelect");o.hide();var j=Ext.getCmp("siteDirMultiLbl");j.hide();q=null;delete q;
}k=null;delete k;}});},setValuesForSiteAndDirector:function(e){var c=Ext.getCmp("infraTypeCombo").getValue();var a=null;if(!Ext.isEmpty(c)&&c!=undefined&&c!=null){a=Ext.getCmp("subInfraTypeCombo").getValue();}var b="modifyCtxDash&loadModifyDashboardPopup=true";var d="";if(!Ext.isEmpty(Ext.getCmp("customDashbrdNam"))&&Ext.getCmp("customDashbrdNam")!=null&&Ext.getCmp("customDashbrdNam")!=undefined){d=Ext.getCmp("customDashbrdNam").getValue();
}Ext.Ajax.request({url:"/final/servlet/com.eg.EgCommonDashboardController?comesFrom=listViewPage&action="+b+"&selectedType="+c+"&iniName="+iniName+"&selected_value="+a+"&dashboardName="+d+"&fromSerComboChange="+fromSerComboChange+"&dashboard_name="+dashboard,method:"POST",scope:this,async:true,success:function(f){var t=f.responseText;
if(t!=null&&t!=""){var k=Ext.decode(t);var l=k["screenLabels"];if(!Ext.isEmpty(k["myDashboardsList"]&&k["myDashboardsList"]!=undefined&&k["myDashboardsList"]!=null)){k=k["myDashboardsList"];}if(k["listViewCompValues"]!=null&&!Ext.isEmpty(k["listViewCompValues"])&&(k["listViewCompValues"]["selectedOptions"]).length>1){var u=this.getCustomConfigTemplateWindow();
if(Ext.isEmpty(u)){u=Ext.widget("customConfigTemplateWindow");}var n=u.getComponent("customdashconfigform").getForm();var h=Ext.getCmp("compMultiSelect");if(!Ext.isEmpty(h)&&h!=null&&h!=undefined){h.getStore().loadRawData(k["listViewCompValues"]["selectedOptions"]);var s=k["listViewCompValues"]["selectedTypeValue"];
h.setValue(s);var g=Ext.getCmp("compMultiLbl");if(!Ext.isEmpty(g)&&g!=null&&g!=undefined){g.setText("Components");g.show();}h.show();}}else{var h=Ext.getCmp("compMultiSelect");h.hide();var g=Ext.getCmp("compMultiLbl");g.hide();}var o=Ext.getCmp("aggregateTypeCombo");var m=Ext.getCmp("siteDirMultiSelect");
var r=Ext.getCmp("siteDirContainer");var y=Ext.getCmp("aggregatesContainer");var x=Ext.getCmp("compMultiselectContainer");if(r){r.getEl().setStyle({"margin-top":"-10px","margin-left":"-30px","width":"268px"});r.doLayout();}if(!Ext.isEmpty(c)&&c!=undefined&&c!=null&&(c=="ComponentType"||c=="Components")&&a.indexOf("Agg_")==0){var p=Ext.getCmp("aggregateTypeLbl");
if(!Ext.isEmpty(p)&&p!=null&&p!=undefined){p.setText("");}o.hide();if((Ext.getCmp("aggregateTypeCombo")).isVisible&&(Ext.getCmp("compMultiSelect")).isVisible){r.getEl().setStyle({"margin-top":"-10px","margin-left":"-30px","width":"273px"});y.getEl().setStyle({"margin-top":"10px","margin-left":"-17px","width":"215px"});
r.doLayout();}if((Ext.getCmp("aggregateTypeCombo")).isVisible&&(Ext.getCmp("compMultiSelect")).isVisible){r.getEl().setStyle({"margin-top":"-10px","margin-left":"-30px","width":"273px"});y.getEl().setStyle({"margin-top":"10px","margin-left":"-17px","width":"215px"});r.doLayout();}if((Ext.getCmp("siteDirMultiSelect")).isVisible||(Ext.getCmp("compMultiSelect")).isVisible){r.getEl().setStyle({"margin-top":"-10px","margin-left":"-33px","width":"273px"});
r.doLayout();}if(r){r.getEl().setStyle({"margin-top":"-10px","margin-left":"-30px","width":"273px"});x.getEl().setStyle({"width":"217px"});r.doLayout();}if((Ext.getCmp("siteDirMultiSelect")).isVisible||(Ext.getCmp("compMultiSelect")).isVisible){o.getEl().setStyle({"margin-left":"16px","width":"215px"});
o.doLayout();}if((Ext.getCmp("compMultiSelect")).isVisible){y.getEl().setStyle({"margin-left":"0px","width":"215px"});o.doLayout();}}else{if(!Ext.isEmpty(o)&&o!=null&&o!=undefined&&!Ext.isEmpty(k["listViewAggregates"])&&k["listViewAggregates"]!=null&&k["listViewAggregates"]!=undefined&&(k["listViewAggregates"]["selectedOptions"]).length>1&&k["listViewAggregates"]["selectedTypeValue"]!="None"){var j=k["listViewAggregates"]["selectedOptions"];
o.getStore().loadRawData(j);var s=k["listViewAggregates"]["selectedTypeValue"];o.setValue(s);if(Ext.getCmp("compMultiSelect")!=null&&!Ext.isEmpty(Ext.getCmp("compMultiSelect"))&&(Ext.getCmp("compMultiSelect")).isVisible){o.getEl().setStyle({"margin-right":"30px"});if(!Ext.isEmpty(u)&&u!=null&&u!=undefined){u.doLayout();
}}o.show();var p=Ext.getCmp("aggregateTypeLbl");var w=Ext.getCmp("siteDirMultiLbl");var m=Ext.getCmp("siteDirMultiSelect");var z=(c!=null&&(c=="Components"||c=="ComponentType"))?"Select Aggregates for Graph (Optional)":"Aggregates";if(!Ext.isEmpty(p)&&p!=null&&p!=undefined){p.setText(z);if(Ext.getCmp("compMultiSelect")!=null&&!Ext.isEmpty(Ext.getCmp("compMultiSelect"))&&(Ext.getCmp("compMultiSelect")).isVisible){p.getEl().setStyle({"margin-left":"17px"});
o.getEl().setStyle({"margin-left":"17px"});y.getEl().setStyle({"width":"207px","margin-top":"10px"});if(!Ext.isEmpty(u)&&u!=null&&u!=undefined){u.doLayout();}}if((Ext.getCmp("aggregateTypeCombo")).isVisible&&(Ext.getCmp("compMultiSelect")).isVisible){r.getEl().setStyle({"margin-top":"0px","margin-left":"-26px","width":"268px"});
r.doLayout();}if((Ext.getCmp("siteDirMultiSelect")).isVisible||(Ext.getCmp("compMultiSelect")).isVisible){o.getEl().setStyle({"margin-left":"16px","width":"215px"});o.doLayout();}if((Ext.getCmp("compMultiSelect")).isVisible){r.getEl().setStyle({"margin-left":"-28px","width":"268px"});y.getEl().setStyle({"margin-left":"-15px","width":"215px"});
o.doLayout();r.doLayout();}if((Ext.getCmp("siteDirMultiSelect")).isVisible){r.getEl().setStyle({"margin-left":"-28px","width":"268px"});y.getEl().setStyle({"margin-left":"-15px","width":"215px"});o.doLayout();r.doLayout();}if((Ext.getCmp("compMultiSelect")).isVisible&&(Ext.getCmp("siteDirMultiSelect")).isVisible){r.getEl().setStyle({"margin-left":"-28px","width":"268px"});
y.getEl().setStyle({"margin-left":"-15px","width":"215px"});x.getEl().setStyle({"width":"220px"});y.doLayout();r.doLayout();}p.show();}}else{o.hide();var p=Ext.getCmp("aggregateTypeLbl");p.hide();}}var m=Ext.getCmp("siteDirMultiSelect");if(!Ext.isEmpty(m)&&m!=null&&m!=undefined&&!Ext.isEmpty(k["listViewSiteAndDirector"])&&(k["listViewSiteAndDirector"]!=null&&k["listViewSiteAndDirector"]!=undefined&&k["listViewSiteAndDirector"]["selectedOptions"]).length>1&&k["listViewSiteAndDirector"]["selectedTypeValue"]!="None"){var q=k["listViewSiteAndDirector"]["selectedOptions"];
m.getStore().loadRawData(q);var s=k["listViewSiteAndDirector"]["selectedTypeValue"];var y=Ext.getCmp("aggregatesContainer");m.setValue(s);var v=l["monitor.common.SitesAndDirector"];var w=Ext.getCmp("siteDirMultiLbl");if(!Ext.isEmpty(w)&&w!=null&&w!=undefined){w.setText(v);if(Ext.getCmp("compMultiSelect")!=null&&!Ext.isEmpty(Ext.getCmp("compMultiSelect"))&&(Ext.getCmp("compMultiSelect")).isVisible){m.getEl().setStyle({"margin-left":"20px"});
w.getEl().setStyle({"margin-left":"21px"});y.getEl().setStyle({"width":"235px"});if(!Ext.isEmpty(u)&&u!=null&&u!=undefined){u.doLayout();}}w.show();}m.show();}else{m.hide();var w=Ext.getCmp("siteDirMultiLbl");w.hide();}k=null;delete k;}t=null;delete t;}});},checkboxClick:function(d,b,a,f){var c=Ext.query("div.addCheckBox");
var h=d.getValue();if(h){Ext.getCmp("deleteAllSeparator").show();for(var e=0;e<c.length;e++){var j=Ext.getCmp("cc_"+e);if(!Ext.isEmpty(j.data)&&j.data!=null&&j.data!=undefined&&j.data=="DefaultDashboard"){continue;}var g=j.SharedData;if(g=="false"){j.setValue(true);j.show();}}Ext.getCmp("DeleteListOfDashboards").show();
}else{Ext.getCmp("deleteAllSeparator").hide();for(var e=0;e<c.length;e++){var j=Ext.getCmp("cc_"+e);j.setValue(false);j.hide();}Ext.getCmp("DeleteListOfDashboards").hide();}},deleteSelectedDashBoards:function(){var c=Ext.getCmp("myDashListPageView");var d=this;var e="";var a=Ext.query("div.addCheckBox");
deletedDefaultView=false;for(var b=0;b<a.length;b++){var f=Ext.getCmp("cc_"+b);if(f.checked){e+="$"+f.data;if(!Ext.isEmpty(f.data)&&!Ext.isEmpty(defaultView)&&f.data==defaultView){deletedDefaultView=true;}}if(e!=null&&e.indexOf("$")==0){e=e.substr(1);}}if(e.length>0){Ext.Msg.show({title:ctxDashboardAlertLbl,msg:deleteDashboardsMsg+"?",buttons:Ext.Msg.YESNO,icon:"iconConfirmation",fn:function(g){if(g=="yes"){Ext.Ajax.request({url:"/final/servlet/com.eg.EgCommonDashboardController?comesFrom=listViewPage&action=deleteCtxDashboard&dashboardNames="+encodeURIComponent(e)+"&iniName="+iniName+"&fromSerComboChange="+fromSerComboChange+"&dashboard_name="+dashboard,method:"POST",scope:this,success:function(h){var k=h.responseText;
var j="";if(!Ext.isEmpty(k)){j=Ext.decode(k);}Ext.getCmp("selectAllDashboards").setValue(false);c.removeAll();c.setLoading(false);c.doLayout();d.loadListViewPage(j);}});}}});}else{Ext.Msg.show({title:ctxDashboardAlertLbl,msg:deleteAlertMsg,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return;
}},deleteSingleDashboard:function(b){var c=this;var a=Ext.getCmp("dataViewId");var b=b;deletedDefaultView=false;Ext.Msg.show({title:ctxDashboardAlertLbl,msg:deleteDashboardMsg+"?",buttons:Ext.Msg.YESNO,modal:true,ghost:false,cls:"ctxWindowModal",icon:"iconConfirmation",listeners:{show:function(e){if(this.modal){var f=Ext.dom.Query.select(".x-mask");
var d=Ext.fly(f[f.length-1]);d.addCls("ctxWindowModal");}},hide:function(e){if(this.modal){var f=Ext.dom.Query.select(".x-mask");var d=Ext.fly(f[f.length-1]);d.removeCls("ctxWindowModal");}}},fn:function(d){if(d=="yes"){var e=b;Ext.Ajax.request({url:"/final/servlet/com.eg.EgCommonDashboardController?comesFrom=listViewPage&action=deleteCtxDashboard&dashboardNames="+encodeURIComponent(e)+"&iniName="+iniName+"&screenWidth="+(Ext.getBody().getViewSize().width)+"&screenHeight="+(Ext.getBody().getViewSize().height)+"&fromSerComboChange="+fromSerComboChange+"&dashboard_name="+dashboard,method:"POST",scope:this,success:function(f){var g=f.responseText;
if(!Ext.isEmpty(g)){ctxDashList=Ext.decode(g);}Ext.Msg.show({title:ctxDashboardAlertLbl,msg:singleDashboardDeleteMsg,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});if(!Ext.isEmpty(defaultView)&&!Ext.isEmpty(e)&&e==defaultView){deletedDefaultView=true;}c.loadListViewPage(ctxDashList);}});}}}).setHeight(120);
},setThisCtxDashboardAsHome:function(a){var b=this;Ext.Msg.show({title:ctxDashboardAlertLbl,msg:setasHome+"?",modal:true,ghost:false,cls:"ctxWindowModal",buttons:Ext.Msg.YESNO,icon:"iconConfirmation",listeners:{show:function(d){if(this.modal){var e=Ext.dom.Query.select(".x-mask");var c=Ext.fly(e[e.length-1]);
c.addCls("ctxWindowModal");}},hide:function(d){if(this.modal){var e=Ext.dom.Query.select(".x-mask");var c=Ext.fly(e[e.length-1]);c.removeCls("ctxWindowModal");}}},fn:function(c){if(c=="yes"){a=unescape(a);Ext.Ajax.request({url:"/final/servlet/com.eg.EgCommonDashboardController?comesFrom=listViewPage&action=setAsHomeDash&dashboardNames="+encodeURIComponent(a)+"&iniName="+iniName+"&fromSerComboChange="+fromSerComboChange+"&dashboard_name="+dashboard,method:"POST",scope:this,success:function(d){var f=d.responseText;
if(f!=null&&f!=""){var e=Ext.decode(f);defaultMyDashboard=a;defaultView=e["myDashboardsList"]["defaultMyDashboard"];b.loadListViewPage(e);}f=null;delete f;}});}}});},goToCitrixDashboard:function(a){document.location=a;},checkBlankSpc:function(a){a.replace(/^[\s]+/,"").replace(/[\s]+$/,"").replace(/[\s]{2,}/," ");
if(a.length==0||a==""){return true;}return false;},checkSpecialCharacter:function(b){var c='%&+="?#';for(var a=0;a<b.length;a++){check_char=c.indexOf(b.charAt(a));if(check_char>=0){return true;}}return false;}});