var rootComponentArray=null;var compLength="";var splitLen=50;var startcount="";var curServiceName="";Ext.define("services.controller.Main",{extend:"Ext.app.Controller",requires:["services.view.serviceUser","services.view.ServicesDashboard","services.view.TransactionsMainPanel","services.view.TransactionsMainTabPanelAll"],views:["services.view.Main","services.view.ListPanel","services.view.ListComponent"],stores:["SortRetain"],refs:[{ref:"listPanel",selector:"listpanel"},{ref:"listPanelToolbar",selector:"listpanel>toolbar"},{ref:"optionalListPanel",selector:"optionallistpanel"},{ref:"optionalListPanelToolbar",selector:"optionallistpanel>toolbar"},{ref:"servicesDashboard",selector:"servicesdashboard"},{ref:"servicesTreePanel",selector:"servicestreepanel"},{ref:"main",selector:"main"},{ref:"zoomGraphPanel",selector:"zoomgraphpanel"},{ref:"serviceUser",selector:"serviceuser"},{ref:"listComponent",selector:"listcomponent"},{ref:"optionalListComponent",selector:"optionallistcomponent"},{ref:"listPanelTrigger",selector:"listpanel trigger"},{ref:"optionalListPanelTrigger",selector:"optionallistpanel trigger"},{ref:"configWindow",selector:"configwindow"},{ref:"topologyCombo",selector:"servicestopology combo"},{ref:"componentsPanelCombo",selector:'dashboardgeneralmeasuresgridpanel[itemId="components"] combo'},{ref:"aggregatesPanelCombo",selector:'dashboardgeneralmeasuresaggregatepanel[itemId="aggregates"] combo'},{ref:"serviceTransactionPanel",selector:"servicetransactionpanel"},{ref:"serviceTree",selector:"servicestreepanel > panel"},{ref:"dashboardMaintainanceButton",selector:'tabbar > button[action="maintainance"]'},{ref:"configureTransactionsPanel",selector:"configuretransactions"},{ref:"transactionsChartPanel",selector:"transactionschartpanel"},{ref:"transactionsMainPanel",selector:"transactionsmainpanel"},{ref:"transactionCompCombo",selector:'transactionsmainpanel combo[itemId="componentCombo"]'},{ref:"myTimeWindow",selector:"floatingContainer"},{ref:"myTimelinePanel",selector:"floatingContainer > panel"},{ref:"transactionChartComboMode",selector:'floatingContainer > panel > combo[itemId= "mode"]'},{ref:"transactionChartComboTimeline",selector:'floatingContainer > panel > combo[itemId= "timeline"]'},{ref:"transactionChartComboFromhr",selector:'floatingContainer > panel > combo[itemId= "fromhr"]'},{ref:"transactionChartComboTohr",selector:'floatingContainer > panel > combo[itemId= "tohr"]'},{ref:"transactionChartFromDate",selector:'floatingContainer > panel > datefield[itemId= "from"]'},{ref:"transactionChartToDate",selector:'floatingContainer > panel > datefield[itemId= "to"]'},{ref:"transactionComboFrommin",selector:'floatingContainer > panel > combo[itemId= "frommin"]'},{ref:"transactionComboTomin",selector:'floatingContainer > panel > combo[itemId= "tomin"]'},{ref:"transactionsMainTabPanelAll",selector:"transactionsmaintabpanelall"}],init:function(){setInterval("execute()",refreshFrequency);
this.control({"listpanel trigger":{specialkey:this.servicesSearchKeyPress,click:this.servicesSearch},"optionallistpanel trigger":{specialkey:this.servicesSearchKeyPress,click:this.servicesSearch},"listpanel button[action=association]":{click:this.displayListPanelAssociations},"listcomponent > container > button[action=servicedetail]":{click:this.citrixDashboard},"optionallistcomponent button[action=servicedetail]":{click:this.citrixDashboard},"optionallistpanel button[action=association]":{click:this.displayOptionalListAssociations},"listpanel button[action=back]":{click:this.backButtonHandler},"optionallistpanel button[action=back]":{click:this.backButtonHandler},"servicestreepanel":{beforerender:function(){if(requestParams.refresh!==true){Ext.state.Manager.clear("services-tree-panel-stateId");
}},expand:function(){window.parent.servicetreeOpenval=true;},collapse:function(){window.parent.servicetreeOpenval=false;}},"servicestreepanel > panel":{"afterrender":this.treeLoad,"itemclick":this.treeItemClick},"configwindow":{"render":this.itemset}});},citrixDashboard:function(b){var a=b.linkUrl;document.location=a;
},servicesSearchKeyPress:function(c,b){if(b.getKey()==b.ENTER){servicesSearchText=c.getValue();var a="/final/servlet/com.eg.EgMonitorController?from=serviceList&monCmd=serviceList&action=search&treeFlag=false&Go.x=0&Go.y=0&searchString="+encodeURIComponent(filterEncode(c.getValue()))+"&treeOpen="+!this.getServicesTreePanel().getCollapsed();
this.showResultData(a);}},servicesSearch:function(b){servicesSearchText=b.getValue();var a="/final/servlet/com.eg.EgMonitorController?from=serviceList&monCmd=serviceList&action=search&treeFlag=false&Go.x=0&Go.y=0&searchString="+encodeURIComponent(filterEncode(b.getValue()))+"&treeOpen="+!this.getServicesTreePanel().getCollapsed();
this.showResultData(a);},treeItemClick:function(b,a,e,c,d){getDiv=0;gettingComponentDivId=0;scrollFlag=false;stopScroll();if(!Ext.isEmpty(a.raw.link)){var f=a.raw.link;if(!Ext.isEmpty(f)&&((f.indexOf("monCmd=serviceList")>-1)&&(f.indexOf("action=service")>-1))){this.showResultData(f);}else{document.location=a.raw.link;
}}else{var g=a.data.text;this.getServicesTreePanel().currentNode=g;this.getServiceTree().expandNode(a);this.displayServiceDetails(b,a.raw);}parent.parent.closeDiv();},treeLoad:function(f){var g=this.getServicesTreePanel().currentNode;if(!Ext.isEmpty(requestParams)&&requestParams.refresh=="true"){g=requestParams.selectedTreeNode;
this.getServicesTreePanel().currentNode=requestParams.selectedTreeNode;}if(!Ext.isEmpty(g)){var e;var b=f.getRootNode();if(b.raw.text===g){e=b;if(!Ext.isEmpty(e)&&e!=undefined){f.getSelectionModel().select(e);}}else{e=b.findChild("text",g);if(!Ext.isEmpty(e)&&e!=undefined){f.getSelectionModel().select(e);
}}if(!Ext.isEmpty(e)&&e!=undefined){var a=e.getDepth();var d=e;for(var c=0;c<a;c++){if(d.isLeaf()){d.parentNode.expand();}else{d.expand();}d=d.parentNode;}}}},renewSortState:function(b,a){this.getSortRetainStore().getProxy().clear();},itemset:function(a,b){this.getConfigWindow().controllername=this.self.getName();
},backButtonHandler:function(a){var b=requestParams.treeSession;var c="";b=(!Ext.isEmpty(b))?b:"";if(fromPage=="MyDashboard"){document.location=myDashboardBackUrl;}else{if(b.indexOf("showDashboard")>0){c=b;}if(this.getServiceUser()){window.history.go(0);return;}if(c.length>0){document.location=c;}else{if(!Ext.isEmpty(requestParams.refresh)&&requestParams.refresh=="true"){window.history.go(-2);
}else{window.history.go(-1);}}}},displayListPanelAssociations:function(){this.getListPanel().removeAll();Ext.Ajax.request({url:"/final/servlet/com.eg.EgMonitorController?monCmd=userServices&selectNode=Services&selectedParam=Services&openNode=Service&treeFlag=false&currentTab=association&transTab=null&setAssociate=&frompage=egTreeUserServices",scope:this,timeout:280000,success:function(a){var c=a.responseText;
var b=Ext.decode(c);Ext.getCmp("servicelistpanelsearch").hide();Ext.getCmp("assSepartorId").hide();Ext.getCmp("associationId").hide();Ext.getCmp("servicelistpanelbackbtn").show();if(!Ext.isEmpty(b.error)){this.getListPanel().add({xtype:"errorpanel",errorMsg:b.error});}else{this.getListPanel().setTitle("User and Service Associations");
this.getListPanelToolbar().hide();this.getListPanel().add({xtype:"serviceuser",screenLabels:b.screenLabels,data:b});}},failure:function(){}});},displayOptionalListAssociations:function(){this.getOptionalListPanel().removeAll();Ext.Ajax.request({url:"/final/servlet/com.eg.EgMonitorController?monCmd=userServices&selectNode=Services&selectedParam=Services&openNode=Service&treeFlag=false&currentTab=association&transTab=null&setAssociate=&frompage=egTreeUserServices",scope:this,timeout:280000,success:function(a){var c=a.responseText;
var b=Ext.decode(c);Ext.getCmp("servicelistpanelsearch").hide();if(Ext.getCmp("serviceAssociationId")!=null){Ext.getCmp("serviceAssociationId").hide();}if(Ext.getCmp("associationId")!=null){Ext.getCmp("associationId").hide();}Ext.getCmp("servicelistpanelbackbtn").show();if(!Ext.isEmpty(b.error)){tempContPanel.add({xtype:"errorpanel",errorMsg:b.error});
}else{this.getOptionalListPanel().setTitle("User and Service Associations");this.getOptionalListPanel().add({xtype:"serviceuser",screenLabels:b.screenLabels,data:b});}},failure:function(){}});},displayServiceDetails:function(f,j){var k=null;var c=null;var d=null;var l=this.getCurrentListPanel();if(Ext.isEmpty(f)||f.getXType()=="treeview"){k=j.text;
c="system";var g=new Object();g.isSite=(j.isSite=="true")?true:false;g.aggregateTab=(j.aggregateTab=="true")?true:false;g.hasTransactions=(j.hasTransactions=="true")?true:false;g.hasEmulatedTransactions=(j.hasEmulatedTransactions=="true")?true:false;g.hasLogonSimulations=(j.hasLogonSimulations=="true")?true:false;
d=g;}else{if(f.getXType()=="button"){k=f.name;if((f.isSite&&(f.hasTransactions||f.hasTransactions=="true"))||(f.hasEmulatedTransactions||f.hasEmulatedTransactions=="true")){c="transactions";}else{if(rumServiceList!=null&&rumServiceList.indexOf(k)>-1){c="transactions";}else{if(f.hasLogonSimulations||f.hasLogonSimulations=="true"){c="logon";
}else{c="topology";}}}d=f;}}var h=this.getServicesTreePanel();var q="";if(!Ext.isEmpty(h)){q=!h.getCollapsed();}var e=false;var p;k=encodeURI(k);curServiceName=k;if(rumServiceList!=null&&rumServiceList.indexOf(k)>-1){for(var m=0;m<rumServiceListObject.length;m++){var o=rumServiceListObject[m];if(o.name==k){p=o.value;
if(p!=null&&p!="undefined"&&p!=undefined){e=true;}}}}var b="&treeOpen="+q;if(!Ext.isEmpty(h.currentNode)){b+="&openNode="+h.currentNode;}if(!Ext.isEmpty(l)){l.removeAll(true);var n=l.getDockedItems();if(!Ext.isEmpty(n)){for(i=0;i<n.length;i++){n[i].hide();}}l.hide();if(!Ext.isEmpty(l.up("main").down("servicesdashboard[id=serviceDashboardId]"))){l.up("main").down("servicesdashboard[id=serviceDashboardId]").destroy();
}l.up("main").add({xtype:"servicesdashboard",treeUrl:b,isSite:d.isSite,currentTab:c,currentService:k,aggregateTab:d.aggregateTab,hasTransactions:d.hasTransactions,hasEmulatedTransactions:d.hasEmulatedTransactions,hasLogonSimulations:d.hasLogonSimulations,region:"center",flex:4});}},displayServiceDetailsFromAssociation:function(d){var c=this.getServicesTreePanel();
var b=!c.getCollapsed();var a=d.get("link")+"&treeOpen="+b;return a;},refresh:function(l,d){try{var g=document.getElementById("isSessionWindowOpen").value;if(g=="true"||g==true){return;}}catch(C){}if(Ext.isEmpty(this.getConfigWindow())&&Ext.isEmpty(this.getConfigureTransactionsPanel())){var o=this.getCurrentListPanel();
var y=this.getServicesDashboard();var A=this.getServicesTreePanel();var f=!A.getCollapsed();var t=null;var a=null;if(!Ext.isEmpty(y)){a=y.aggregateTab;var c=y.getActiveTab();var h="";if(!Ext.isEmpty(c)){h=c.itemId;}var n="";var z="";var p="",j="";var x="";var w=false;var v=false;var u=0;switch(c.itemId){case"system":z="system";
break;case"components":z="components";if(!Ext.isEmpty(this.getComponentsPanelCombo())){p=this.getComponentsPanelCombo().getValue();}break;case"aggregates":z="aggregates";if(!Ext.isEmpty(this.getAggregatesPanelCombo())){j=this.getAggregatesPanelCombo().getValue();}break;case"topology":z="topology";if(!Ext.isEmpty(this.getTopologyCombo())){x=this.getTopologyCombo().getValue();
}break;case"transactions":z="transactions";w=true;var k=this.getServiceTransactionPanel().getLayout().getActiveItem();if(k.getXType()=="zoomgraphpanel"){v=true;u=k.graphId;}break;}var m=null;if(w){var B=false;if(rumServiceList!=null&&rumServiceList.indexOf(y.currentService)>-1){B=true;}if(B==true||B=="true"){return;
}var q=null;if(v){q=this.getZoomGraphPanel().child("#timelinePanel");}else{if(!Ext.isEmpty(this.getTransactionsChartPanel())){q=this.getTransactionsChartPanel().getDockedItems()[1];}}var s="";var b="";var m="";if(!Ext.isEmpty(q)){s=Ext.Date.format(q.child("#from").value,"M d, Y");b=Ext.Date.format(q.child("#to").value,"M d, Y");
m="&site="+y.currentService+"&gformat=graph&mode="+q.child("#mode").value+"&starttime="+s+"&endtime="+b+"&starthr="+q.child("#fromhr").value+"&endhr="+q.child("#tohr").value+"&time_line="+q.child("#timeline").value+"&zoomGraph="+v+"&graphId="+u;}}var D;if(!Ext.isEmpty(this.getServicesTreePanel().currentNode)){D=this.getServicesTreePanel().currentNode;
}else{D="";}var E="/final/monitor/serviceDashboard.jsp?selectNode="+y.currentService+"&selectedParam="+y.currentService+"&aggregateTab="+y.aggregateTab+"&currentTab="+z+"&appCurrentHost="+p+"&aggregateComp="+j+"&treeOpen="+f+"&openNode="+D+"&refresh=true&isSite="+y.isSite+"&serviceName="+y.currentService+"&fromPage=serviceTree&frompage=treedashboard&fromTab="+y.isSite+"&treeFlag=false&outsideService=true&action=service&serviceFromZone="+y.currentService+"&service="+x+"&hasTransactions="+y.hasTransactions+"&hasEmulatedTransactions="+y.hasEmulatedTransactions+"&refresh=true";
if(!Ext.isEmpty(m)){E+=m;}compSelectedValue=p;var r=this;Ext.Ajax.request({url:"/final/servlet/com.eg.EgMonitorController?from=MainDashboard&monCmd=serviceList&action=service",timeout:280000,success:function(e){var G=e.responseText;var R=y.currentService;var ad=ad;var F=y.aggregateTab;var I="";var Q=r.getCurrentListPanel();
var ag=r.getServicesTreePanel();var S=!ag.getCollapsed();var J="&treeOpen="+S;if(!Ext.isEmpty(ag.currentNode)){J+="&openNode="+ag.currentNode;}if(!Ext.isEmpty(Q)){Q.removeAll();var ak=Q.getDockedItems();if(!Ext.isEmpty(ak)){for(ae=0;ae<ak.length;ae++){ak[ae].hide();}}r.refreshTree();if(Ext.isEmpty(ad)){if(!Ext.isEmpty(h)){ad=h;
}}var T=r.getTransactionsMainTabPanelAll();if(!Ext.isEmpty(T)&&T!=null&&T!=undefined){innerActiveTab=T.getActiveTab();}if(!Ext.isEmpty(innerActiveTab)&&innerActiveTab!=null&&innerActiveTab!=undefined&&innerActiveTab.itemId=="logonSim"){ad="logon";}if(!Ext.isEmpty(ad)&&ad=="topology"){var X=Q.up("main").down("servicestopology");
if(!Ext.isEmpty(X)){urlForRefresh=urlForRefresh1;var aj=Ext.getCmp("topoTopCombo");if(aj!=null&&aj!=undefined&&aj!="undefined"){var Y=aj.getValue();urlForRefresh+="&topoSegCombo="+encodeURI(Y);}X.loadTab(urlForRefresh);}}else{if(!Ext.isEmpty(ad)&&ad=="transactions"){var X=r.getServiceTransactionPanel().down("transactionsmainpanel");
if(!Ext.isEmpty(urlForRefresh)&&urlForRefresh.indexOf("Refreshing=true")<0){urlForRefresh=urlForRefresh+"&Refreshing=true";}if(!Ext.isEmpty(urlForRefresh)&&urlForRefresh.indexOf("&mode=")>0){urlForRefresh=urlForRefresh.substring(0,urlForRefresh.indexOf("&mode="));}var V=r.getTransactionChartComboMode();
if(!Ext.isEmpty(V)){V=V.getValue();urlForRefresh+="&mode="+V;}var U=r.getTransactionChartComboTimeline();if(!Ext.isEmpty(U)){U=U.getValue();urlForRefresh+="&time_line="+U;}var aa=r.getTransactionChartComboFromhr();if(!Ext.isEmpty(aa)){aa=aa.getValue();urlForRefresh+="&starthr="+aa;}var ab=r.getTransactionChartComboTohr();
if(!Ext.isEmpty(ab)){ab=ab.getValue();urlForRefresh+="&endhr="+ab;}var L=r.getTransactionChartFromDate();if(!Ext.isEmpty(L)){L=L.getValue();L=Ext.Date.format(L,"M d, Y");urlForRefresh+="&starttime="+L;}var ai=r.getTransactionChartToDate();if(!Ext.isEmpty(ai)){ai=ai.getValue();ai=Ext.Date.format(ai,"M d, Y");
urlForRefresh+="&endtime="+ai;}refreshchart="refreshchart";var N=r.getTransactionCompCombo();if(!Ext.isEmpty(N)){var ah=N.getValue();urlForRefresh+="&transComp="+ah;}if(!isZoomMeasureGraph&&!isToggleForTrans){r.transactionsRefresh(urlForRefresh,X);}}else{if(!Ext.isEmpty(ad)&&ad=="logon"){var P=Ext.getCmp("simulationCombo").getValue();
if(!Ext.isEmpty(P)&&P!=null){refreshSimulation=P;}var O=P;if(!Ext.isEmpty(O)&&O!=null&&O.indexOf(":")>0){O=O.substring(0,O.indexOf(":"));}if(!Ext.isEmpty(urlForRefresh)&&urlForRefresh.indexOf("Refreshing=true")<0){urlForRefresh=urlForRefresh+"&Refreshing=true";}if(!Ext.isEmpty(urlForRefresh)&&urlForRefresh.indexOf("innerActiveTab=")<0){urlForRefresh=urlForRefresh+"&innerActiveTab=logonSim";
}if(!Ext.isEmpty(urlForRefresh)&&(urlForRefresh.indexOf("componentNameSearch=")<0||urlForRefresh.indexOf("externalAgent=")<0)){urlForRefresh=urlForRefresh+"&componentNameService="+refreshSimulation+"&componentNameSearch="+O+"&externalAgent="+selectedExtAgent;}else{var H=urlForRefresh;var af="";if(H!=null){var M=H.split("&");
for(var ae=0;ae<M.length;ae++){var K=M[ae];var Z=K.substr(0,K.indexOf("="));var ac=K.substr(K.indexOf("=")+1,K.length);if(!Ext.isEmpty(Z)&&Z!=null&&Z!=undefined){if(Z=="componentNameSearch"){ac=O;}else{if(Z=="externalAgent"){ac=selectedExtAgent;}else{if(Z=="componentNameService"){ac=refreshSimulation;
}}}af=af+Z+"="+ac+"&";}}urlForRefresh=af;}}var W=Ext.getCmp("logonSimCompId").timelineParamJson;if(!Ext.isEmpty(W)&&W!=null&&W!=undefined){if(urlForRefresh.indexOf("time_line=")<0){urlForRefresh+="&time_line="+W.time_line+"&starthr="+W.starthr+"&endhr="+W.endhr+"&starttime="+W.starttime+"&endtime="+W.endtime+"&startmin="+W.startmin+"&endmin="+W.endmin;
}else{var af="";var M=H.split("&");for(var ae=0;ae<M.length;ae++){var K=M[ae];var Z=K.substr(0,K.indexOf("="));var ac=K.substr(K.indexOf("=")+1,K.length);if(!Ext.isEmpty(Z)&&Z!=null&&Z!=undefined){if(Z=="time_line"){ac=W.time_line;}else{if(Z=="starthr"){ac=W.starthr;}else{if(Z=="endhr"){ac=W.endhr;}else{if(Z=="starttime"){ac=W.starttime;
}else{if(Z=="endtime"){ac=W.endtime;}else{if(Z=="startmin"){ac=W.startmin;}else{if(Z=="endmin"){ac=W.endmin;}}}}}}}af=af+Z+"="+ac+"&";}}urlForRefresh=af;}}if(urlForRefresh!=null&&urlForRefresh!=undefined){if(Ext.getCmp("logonSimCompId").service_RefSortByLogon!=null&&Ext.getCmp("logonSimCompId").service_RefSortByLogon!=undefined&&Ext.getCmp("logonSimCompId").service_RefSortByLogon!=""){urlForRefresh=urlForRefresh.replace(/(serviceRefSortByLogon=)[^\&]+/,"$1"+Ext.getCmp("logonSimCompId").service_RefSortByLogon);
if(urlForRefresh.indexOf("serviceRefSortByLogon")<0){urlForRefresh=urlForRefresh+"&serviceRefSortByLogon="+Ext.getCmp("logonSimCompId").service_RefSortByLogon;}urlForRefresh=urlForRefresh.replace(/(serviceRefSortByLogonType=)[^\&]+/,"$1"+Ext.getCmp("logonSimCompId").service_RefSortByLogonType);if(urlForRefresh.indexOf("serviceRefSortByLogonType")<0){urlForRefresh=urlForRefresh+"&serviceRefSortByLogonType="+Ext.getCmp("logonSimCompId").service_RefSortByLogonType;
}urlForRefresh=urlForRefresh.replace(/(serviceRefSortByLogonId=)[^\&]+/,"$1"+Ext.getCmp("logonSimCompId").service_RefSortByLogonId);if(urlForRefresh.indexOf("serviceRefSortByLogonId")<0){urlForRefresh=urlForRefresh+"&serviceRefSortByLogonId="+Ext.getCmp("logonSimCompId").service_RefSortByLogonId;}}}if(!isToggleForSimulator){var X=r.getServiceTransactionPanel().down("transactionsmainpanel");
r.transactionsRefresh(urlForRefresh,X);}}else{if(!Ext.isEmpty(urlForRefresh)&&urlForRefresh.indexOf("Refreshing=true")<0){urlForRefresh=urlForRefresh+"&Refreshing=true";}if(!Ext.isEmpty(ad)&&ad=="aggregates"){Q.up("main").down("servicesdashboard[id=serviceDashboardId]").down("dashboardgeneralmeasuresaggregatepanel[itemId="+ad+"]").loadTab(urlForRefresh,"servicesAgg");
}else{if(!Ext.isEmpty(ad)&&ad=="components"){Q.up("main").down("servicesdashboard[id=serviceDashboardId]").down("dashboardgeneralmeasuresgridpanel[itemId="+ad+"]").loadTab(urlForRefresh,"servicesComp");}else{if(!Ext.isEmpty(ad)&&ad=="system"){Q.up("main").down("servicesdashboard[id=serviceDashboardId]").down("dashboardgeneralmeasuresgridpanel[itemId="+ad+"]").loadTab(urlForRefresh,"servicesSys");
}}}}}}}G=null;Ext.destroy(G);},failure:function(){}});}else{if(!Ext.isEmpty(o)){if(o.getXType()=="listpanel"){t=this.getListPanelTrigger();}else{t=this.getOptionalListPanelTrigger();}this.refreshListPanel(l,o,t);t=null;delete t;}}}},transactionsRefresh:function(c,b){try{var a=document.getElementById("isSessionWindowOpen").value;
if(a=="true"||a==true){return;}}catch(f){}var d=this;Ext.Ajax.request({url:c,scope:this,timeout:280000,success:function(e){var h=e.responseText;if(!Ext.isEmpty(h)){var g=Ext.decode(h);d.siteName=g.HiddenFields.siteName;d.loadTransaction(g,b);}},failure:function(){}});},loadTransaction:function(b,a){this.getTransactionsMainPanel().removeAll();
if(!Ext.isEmpty(b.GridScreenLabels.TransactionHeaders)){a.displayGrid(b);a.showGrid(b);}if(b.HiddenFields.selectedTab!="EmulatedClients"){a.updateLabels(b.GridScreenLabels,b.ComponentList);}a.showTransactionGridPanel(b.GridScreenLabels,b);},refreshListPanel:function(d,c,b){var e=this.getServicesTreePanel();
var g=!e.getCollapsed();if(c.child("serviceuser")){if(c===this.getListPanel()){this.displayListPanelAssociations();}else{if(c===this.getOptionalListPanel()){this.displayOptionalListAssociations();}}}else{var f=b.value;if(!Ext.isEmpty(f)&&requestParams.action==="search"){a="/final/servlet/com.eg.EgMonitorController?from=serviceList&monCmd=serviceList&action=search&treeFlag=false&Go.x=0&Go.y=0&searchString="+f+"&treeOpen="+g+"&refresh=true";
}else{var a=d+"&searchString="+f+"&treeOpen="+g+"&refresh=true";}this.showResultData(a);}e=null;delete e;a=null;delete a;},showResultData:function(b){var d=this.getListPanel();if(Ext.isEmpty(d)){d=this.getOptionalListPanel();}var n=d;d=d.xtype;var h=this.getServicesDashboard();var l=Ext.getCmp("listPanelContents");
var c=Ext.getCmp("servicestreepanel");var p="services.view.ListComponent";if(!Ext.isEmpty(d)&&d=="optionallistpanel"){p="services.view.OptionalListComponent";l=Ext.getCmp("componentPanel");}var e=Ext.getCmp("serviceDashboardId");if(!Ext.isEmpty(e)){e.destroy();}if(Ext.isEmpty(l)){Ext.Ajax.request({url:b,timeout:280000,success:function(s){var r=Ext.getCmp("serviceMain");
var q=Ext.getCmp("listpanel");if(!Ext.isEmpty(q)){r.remove(q);}var t=Ext.getCmp("optionallistpanel");if(!Ext.isEmpty(t)){r.remove(t);}if(!Ext.isEmpty(h)){r.remove(h);}var u={xtype:"listpanel",showDashboard:false,header:{padding:"5 5 5 5",margin:0},id:"listpanel",region:"center",flex:4,url:"/final/monitor/Services.jsp?"+requestParams.sessionURL+"&refresh=true"};
r.add(u);},failure:function(){}});}else{if(!Ext.isEmpty(b)&&b.indexOf("searchString")<0){Ext.getCmp("servicelistpanelsearch").setValue("");}else{var f=b.split("&");var g="";for(var j=0;j<f.length;j++){var a=f[j]+"&";if(!Ext.isEmpty(a)&&a.indexOf("action")>-1){var k=a.substring(0,a.indexOf("="));var o=a.substring(a.indexOf("=")+1,a.length);
a=k+"=search&";}g=g+a;}if(!Ext.isEmpty(g)){b=g;}}var m=this;Ext.Ajax.request({url:b,timeout:280000,success:function(q){var r=q.responseText;Ext.Ajax.request({url:"/final/monitor/Services.jsp?"+requestParams.sessionURL+"&refresh=true",success:function(t){var w=t.responseText;var y=Ext.decode(w);rootComponentArray=y["RootItem"];
if(!Ext.isEmpty(rootComponentArray)){compLength=rootComponentArray.length;var A=l.items.items;l.removeAll();m.refreshTree();var v=m.getCurrentListPanel().getXType();var C=null;if(v=="listpanel"){C=m.getListPanel().getDockedItems();if(!Ext.isEmpty(C)){for(j=0;j<C.length;j++){if(j==1){C[j].show();}}}}Ext.suspendLayouts();
if(compLength>splitLen){for(var B=0;B<splitLen;B++){var s=Ext.create(p,{rootComponent:rootComponentArray[B]});l.add(s);}m.getMain().doLayout();isScroll=true;}else{for(var B=0;B<rootComponentArray.length;B++){var s=Ext.create(p,{rootComponent:rootComponentArray[B]});l.add(s);m.getMain().doLayout();s=null;
delete s;}}Ext.resumeLayouts(true);A=null;delete A;}else{var v=m.getCurrentListPanel().getXType();var x=null;var C=null;if(!Ext.isEmpty(v)){if(v=="listpanel"){C=m.getListPanel().getDockedItems();if(!Ext.isEmpty(C)){for(j=0;j<C.length;j++){if(j==1){C[j].hide();}}}}var A=l.items.items;for(var z=A.length-1;
z>-1;z--){A[z].destroy();}l.removeAll();}var u="";if(strSkin=="Dark"){var u="#252525";}l.add({xtype:"errorpanel",cls:"error-panel",margin:"20% 0 auto 0",layout:"fit",width:"100%",height:Ext.getBody().getViewSize().height-80,scroll:false,autoScroll:false,border:false,frame:false,imageCls:"iconInformation",padding:"0",style:{"text-align":"center","background-color":u+"!important"},errorMsg:y.SearchNoListFoundText});
v=null;delete v;x=null;delete x;C=null;delete C;}w=null;Ext.destroy(w);y=null;Ext.destroy(y);}});r=null;Ext.destroy(r);},failure:function(){}});}d=null;delete d;h=null;delete h;c=null;delete c;e=null;delete e;},refreshTree:function(){try{var a=document.getElementById("isSessionWindowOpen").value;if(a=="true"||a==true){return;
}}catch(g){}var f=this;var c=Ext.getCmp("servicestreepanel");var h=c.items.items;for(var d=h.length-1;d>-1;d--){h[d].destroy();}var b=null;Ext.Ajax.request({url:"/final/monitor/serviceTree.jsp?tree=ServicesTreeModel&width=208&str=sessionID&node=Service&treeTitle=Services",method:"POST",timeout:280000,success:function(e,m){var n=e.responseText;
var k=Ext.decode(n);k["expanded"]=true;k["cls"]="list-tree-root-expand-collapse";var j=Ext.create("Ext.data.TreeStore",{id:"treestore",clearOnLoad:true,root:k,autoDestroy:true,});var l=Ext.create("utilities.ScrollableTreePanel",{store:j,cls:"treePanelDesign",margin:"0 0 0 8",iconCls:"service22_GRAY",autoDestroy:true,border:true,frame:true,layout:{align:"stretch",type:"vbox"},scroll:true,containerScroll:false,autoScroll:false,overflowY:"scroll",frame:true,flex:1,maxWidth:350,minWidth:150,width:250,title:"SERVICES NAVIGATION",useArrows:true,rootVisible:true,stateId:"services-tree-panel-stateId",id:"select",});
Ext.suspendLayouts();c.add(l);Ext.resumeLayouts(true);j=null;Ext.destroy(j);n=null;delete n;k=null;delete k;},failure:function(){}});},getCurrentListPanel:function(){var a=null;if(!Ext.isEmpty(this.getListPanel())){a=this.getListPanel();}else{if(!Ext.isEmpty(this.getOptionalListPanel())){a=this.getOptionalListPanel();
}}return a;},bulkDataLoad:function(c,b,a){var g=rootComponentArray;isScroll=false;var f="",e="";if(a!=null&&a!=""&&a=="services.view.ListComponent"){f=Ext.getCmp("listpanel");e=Ext.getCmp("listPanelContents");}else{f=Ext.getCmp("optionallistpanel");e=Ext.getCmp("componentPanel");}Ext.suspendLayouts();
for(var d=c;d<b;d++){var h=Ext.create(a,{rootComponent:g[d]});e.add(h);}f.add(e);Ext.resumeLayouts(true);if(b!=compLength&&b<compLength){isScroll=true;startcount=b;}else{rootComponentArray=null;delete rootComponentArray;compLength=null;startcount=null;}}});