var defaultWidth=1099;var defaultHeight=655;var dualScreenLeft=window.screenLeft!=undefined?window.screenLeft:screen.left;var dualScreenTop=window.screenTop!=undefined?window.screenTop:screen.top;width=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width;
height=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height;var left=((width/2)-(defaultWidth/2))+dualScreenLeft;var top=((height/2)-(defaultHeight/2))+dualScreenTop;var chartTypeStore="";var backEndMetricVal="";var hidePanelLog=new Array();
var showPanelLog=new Array();Ext.define("endUserDashboardDetails.controller.Main",{extend:"Ext.app.Controller",views:["Main"],requires:["endUserDashboardDetails.view.SettingsForm","endUserDashboardDetails.view.AddWidgetWindow","endUserDashboardDetails.view.Gridster"],refs:[{selector:"main",ref:"main"},{selector:"userdesktopdata",ref:"userdesktopdata"},{selector:"maximizeview",ref:"maximizeview"},{selector:"settingsForm",ref:"settingsForm"},{selector:"settings",ref:"settings"},{selector:"utilitiestool",ref:"utilitiestool"},{selector:"userdesktopdata container[id=BaseContainer]",ref:"baseContainer"},{selector:"addwidgetwindow",ref:"addwidgetwindow"},{ref:"gridster",selector:"gridster"},],init:function(){appCnt=this;
this.control({"main textfield[id=searchString]":{specialkey:function(b,a){if(a.getKey()==a.ENTER){this.onSearchXenApp();}}},"main":{"afterrender":function(){this.loadUserCombo();this.loadUserCompsCombo();}},'main button[id="backbtn"]':{"click":this.onBackBtnClick},'main button[id="AddPanelbtn"]':{"click":this.onAddPanelBtnClick},'main button[name="publishDashboard"]':{"click":this.publishDashboard},'main button[id="ShowHideBtn"]':{"click":this.onShowHideBtnClick},"userdesktopdata":{"afterrender":function(){}},"settingsForm":{"afterrender":this.loadColorPalettes},'settingsForm combo[id="optionsCombo"]':{"select":this.loadConfigurationItems},'settingsForm radiogroup[id="metrics"]':{"change":this.loadMetricsItems},'settingsForm radiogroup[id="modifyOptions"]':{"change":this.loadModifyOptions},'settingsForm radiogroup[id="AddDelete"]':{"change":function(a){metricsData="";
this.hideProcessCombos();this.hideModifyingComponents();if(a.getValue().Config=="showHideRadio"){this.showOnlyItemSelector();}else{this.loadTests();}}},'settingsForm combo[id="ExistingNew"]':{"select":this.loadTests},'settingsForm combo[id="panelNo"]':{"select":this.showModifyOptions},'settingsForm combo[id="group"]':{"select":this.changeGroupCombo},'settingsForm combo[id="test"]':{"select":this.loadMeasureForTest},'settingsForm combo[id="measure"]':{"select":this.loadMeasureDisplay},'settingsForm combo[id="processName"]':{"select":this.loadProcessComboData},'settingsForm combo[id="process"]':{},'settingsForm button[id="update"]':{"click":this.updateConfiguration},'settingsForm button[id="add"]':{"click":this.appendMetrics},'settingsForm button[id="remove"]':{"click":this.appendRemoveMetrics},'settingsForm>container>button[id="modifyTestMeasure"]':{"click":this.loadTestsForModifying},'settingsForm combo[id="modifyTestCombo"]':{"select":this.loadMeasureForTest},'main combo[id="userCombo"]':{"select":this.loadComponentInTheApp},'main combo[id="userCompsCombo"]':{"select":this.loadUserComponentInTheApp},'addwidgetwindow button[chartType="Data Panel"]':{"click":this.createAddPanelBlock},'addwidgetwindow button[chartType="Area Chart"]':{"click":this.createAddPanelBlock},'addwidgetwindow button[chartType="Line Chart"]':{"click":this.createAddPanelBlock},'addwidgetwindow button[chartType="Bar Graph"]':{"click":this.createAddPanelBlock},'settingsForm combo[id="suppotedCmpType"]':{"select":this.loadsuppotedCmpTypesTest},});
},refreshSearchDetails:function(){var b=this;if(maxiView){if(!Ext.isEmpty(maximizedFunction)&&maximizedFunction!=null){if(maximizedFunction=="showMaximizedFusion"){if(maxChartName=="area"){}else{var a=defaultParams;Ext.Ajax.request({url:"/final/servlet/com.eg.EgMonitorResultDispatcher",params:a+"&resultpage=globalsearch&isEndUserDashboard=true",scope:this,method:"POST",timeout:280000,success:function(d){if(d.status==200&&!Ext.isEmpty(d.responseText)){var f=d.responseText;
publicJson=Ext.decode(f);var e=Ext.getCmp("endUserDetailsViewPort");e.removeAll();e.add({xtype:"main"});e.doLayout();if(maxChartId.length>9){maxChartId=maxChartId.substring(9);}if(!Ext.isEmpty(publicJson["RESULT"]["BAR_METRICS"])&&publicJson["RESULT"]["BAR_METRICS"].hasOwnProperty(maxChartId)){var c=FusionCharts.items["maxviewchart_"+maxChartId];
if(c!=null){c.setDataXML(publicJson["RESULT"]["BAR_METRICS"][maxChartId]["XML_DATA"]);}}}}});}}else{if(maximizedFunction=="showMaximizedView"){maxChartName="";}}}}else{var a=defaultParams;Ext.Ajax.request({url:"/final/servlet/com.eg.EgMonitorResultDispatcher",params:a+"&resultpage=globalsearch&isEndUserDashboard=true",scope:this,method:"POST",timeout:280000,success:function(c){if(c.status==200&&!Ext.isEmpty(c.responseText)){var e=c.responseText;
publicJson=Ext.decode(e);var d=Ext.getCmp("endUserDetailsViewPort");if(d!=null){d.removeAll();d.add(Ext.create("widget.main"));}}}});}},selectPriority:function(){var l=Ext.getCmp("er_timeline").dataArray;var b=formatDate(new Date(getDateFromFormat(Ext.getCmp("er_stdate").dataArray,mgrDisplayDateFormat)),"MM/dd/yyyy");
var a=Ext.getCmp("er_sthr").getValue();var f=formatDate(new Date(getDateFromFormat(Ext.getCmp("er_enddate").dataArray,mgrDisplayDateFormat)),"MM/dd/yyyy");var c=Ext.getCmp("er_endhr").dataArray;var k=encodeURIComponent(Ext.getCmp("er_timeline").getValue()+"#"+b+" "+a+":"+stmin+"#"+f+" "+c+":"+enmin);
var m=Ext.getCmp("Maximize").dataArray;var h=m[3];var e=h[0];var g=h[1];var j=h[2];var d=h[3];initLdgMask.show();Ext.Ajax.request({url:"/final/servlet/com.eg.EgMonitorResultDispatcher",params:defaultParams+"&resultpage=globalsearch&drilldown=true&drilldowncomp="+encodeURIComponent(e)+"&drilldowntest="+encodeURIComponent(g)+"&drilldownmeasure="+encodeURIComponent(j)+"&drilldowntestmeasure="+encodeURIComponent(d)+"&priority="+encodeURI(Ext.getCmp("priority").getValue())+"&graph=bar&timeline="+k,method:"POST",timeout:280000,success:function(o){if(o.status==200&&!Ext.isEmpty(o.responseText)){initLdgMask.hide();
var r=o.responseText;var q=Ext.decode(r);var p=q["XML_DATA"];if(p!="-"){var n=new FusionCharts("/final/FusionCharts/swf/Bar2D.swf","chart2","100%","100%","0","1");n.setXMLData(p);n.setTransparent(true);n.render("fusionChart");}else{Ext.select("#fusionChart").update('<table width="100%" height="100%" ><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}}}});},timelineSubmit:function(){var m=Ext.getCmp("er_timeline").getValue();var c=formatDate(new Date(getDateFromFormat(Ext.getCmp("er_stdate").dataArray,mgrDisplayDateFormat)),"MM/dd/yyyy");var b=Ext.getCmp("er_sthr").dataArray;var g=formatDate(new Date(getDateFromFormat(Ext.getCmp("er_enddate").dataArray,mgrDisplayDateFormat)),"MM/dd/yyyy");
var d=Ext.getCmp("er_endhr").dataArray;var l=Ext.getCmp("Maximize").dataArray;if(!Ext.isEmpty(l)){var j=l[2];if(j.toLowerCase()=="line_chart"){var h=l[1]+"&user="+userName;h=h.substring(0,h.indexOf("&endtime"));var a=Ext.getCmp("er_mode").getValue();h=h+"&endtime="+encodeURIComponent(g)+"&starttime="+encodeURIComponent(c)+"&starthr="+encodeURIComponent(b)+"&endhr="+encodeURIComponent(d)+"&height="+(Ext.getCmp("Maximize").getHeight()-50)+"&width="+(Ext.getCmp("Maximize").getWidth()-20)+"&mode="+a+"&tline="+m;
var e=getOption(m,Ext.getCmp("er_stdate").getValue(),b,Ext.getCmp("er_enddate").getValue(),d);if(!Ext.isEmpty(e)&&e.indexOf("easy")>-1){if(!Ext.isEmpty(Ext.get("chartMaximize"))){Ext.getCmp("chartMaximize").remove();}Ext.get("imgDiv").update('<img src="'+h+'" />');}else{setHighChart(h,"chartMaximize",Ext.getCmp("Maximize").getHeight()-20,Ext.getCmp("Maximize").getWidth()-20,"",true);
}Ext.get("configMod").animate({duration:700,to:{y:-200}});}else{if(j.toLowerCase()=="area_chart"){var k=encodeURIComponent(Ext.getCmp("er_timeline").getValue()+"#"+c+" "+b+":"+stmin+"#"+g+" "+d+":"+enmin);var f=l[3];Ext.Ajax.request({url:"/final/servlet/com.eg.EgMonitorResultDispatcher",params:defaultParams+"&resultpage=globalsearch&drilldown=true&drilldowncomp="+encodeURIComponent(f[0])+"&drilldowntestmeasure="+encodeURIComponent(f[3])+"&graph=area&timeline="+k,method:"POST",timeout:280000,success:function(o){if(o.status==200&&!Ext.isEmpty(o.responseText)){Ext.get("configMod").animate({duration:700,to:{y:-200}});
var s=o.responseText;var q=Ext.decode(s);var p=q["XML_DATA"];var r="chart2";if(FusionCharts(r)!=null){FusionCharts(r).dispose();}if(p!="-"){var n=new FusionCharts("/final/FusionCharts/swf/MSArea.swf",r,"100%","100%","0","1");n.setXMLData(p);n.setTransparent(true);n.render("fusionChart");}else{Ext.select("#fusionChart").update('<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}}}});}}}},afterMaximizedViewRendered:function(){this.showConfigDropdown();Ext.getBody().on("click",function(){Ext.get("configMod").animate({duration:500,to:{y:-500}});},null,{delegate:"#closeSettings"});Ext.Ajax.request({url:"/final/servlet/com.eg.EgMonitorRequestDispatcher",method:"POST",params:"comesFrom=globalsearch&period=H&time=1 hour&user="+userName,timeout:280000,success:function(b){if(b.status==200&&!Ext.isEmpty(b.responseText)){var e=b.responseText;
var d=Ext.decode(e);var c=d["timelinedetails"];var a=c["timelineSelections"];if(!Ext.isEmpty(d)){Ext.getCmp("er_timeline").suspendEvents(true);Ext.getCmp("er_timeline").getStore().loadRawData(c["timeline"]);Ext.getCmp("er_timeline").setValue(a["selectedTimeline"]);Ext.getCmp("er_timeline").resumeEvents();
Ext.getCmp("er_stdate").setValue(a["selectedStartDate"]);Ext.getCmp("er_sthr").setValue(a["selectedStartHour"]);Ext.getCmp("er_enddate").setValue(a["selectedEndDate"]);Ext.getCmp("er_endhr").setValue(a["selectedEndHour"]);Ext.getCmp("er_timeline").fireEvent("select",Ext.getCmp("er_timeline"));Ext.getCmp("er_mode").setValue("2D");
}}}});},showMaximizedGraphView:function(a,k,b){maxiView=true;maximizedFunction="showMaximizedView";var f=(b.indexOf("highchart")>-1)?true:false;var c=true;var h="right";var m=a;var l=this.getMain().getWidth();var n=this.getMain().getHeight();var e=k;var j=m+"&height="+(n-200)+"&width="+(l-50)+"&user="+userName;
var d=new Array();d[d.length]=e;d[d.length]=j;d[d.length]="LINE_CHART";d[d.length]="LINE_CHART";var g="";if(f){g='<div id="chartMaximize"></div>';}else{g='<div id="imgDiv" style="margin:6px"><img id="graphImage" src="'+j+'" /></div>';}Ext.widget("maximizeview",{title:e,width:l,height:n,id:"Maximize",dataArray:d,html:g,listeners:{show:function(){if(f){setHighChart(j,"chartMaximize",n-50,l-30,"",c,h,true);
}else{this.update('<table height="100%" width="100%"><tr><td><div align="center" valign="bottom" ><img src="'+j+'&height=190&width=400&mode=2D" /></div></td</tr</table>');}}}}).show();},showMaximizedView:function(b,a){maxiView=true;maximizedFunction="showMaximizedView";maxChartId=b;var f=false;var c=true;
var h="right";if(a.indexOf("highchart")>-1){f=true;}var l=Ext.getCmp(b).dataArray;var k=this.getMain().getWidth();var m=this.getMain().getHeight();var e=l[0];var j=l[1]+"&height="+(m-200)+"&width="+(k-50)+"&user="+userName;var d=new Array();d[d.length]=e;d[d.length]=j;d[d.length]="LINE_CHART";d[d.length]="LINE_CHART";
var g="";if(f){g='<div id="chartMaximize"></div>';}else{g='<div id="imgDiv" style="margin:6px"><img id="graphImage" src="'+j+'" /></div>';}Ext.widget("maximizeview",{title:e,width:k,height:m,id:"Maximize",dataArray:d,html:g,listeners:{show:function(){if(f){setHighChart(j,"chartMaximize",m-50,k-30,"",c,h,true);
}else{this.update('<table height="100%" width="100%"><tr><td><div align="center" valign="bottom" ><img src="'+j+'&height=190&width=400&mode=2D" /></div></td</tr</table>');}}}}).show();},showDDMaximizedFusion:function(h,f,j){var l="maxviewddchart";if(FusionCharts(l)!=null){FusionCharts(l).dispose();}maxiView=true;
maximizedFunction="showMaximizedFusion";var c="";var e="";c="dd-bar-block-";e="/final/FusionCharts/swf/Bar2D.swf";var b=Ext.getCmp("grpData_"+j+"_"+h);var m=this.getMain().getWidth();var n=this.getMain().getHeight();var d=b.dataObjArray[f]["TITLE"];var a=b.dataObjArray[f]["XML_DATA"];Ext.widget("maximizeview",{title:d,width:m,height:n,dataArray:b,id:"Maximize",html:'<div style="margin:6px;border:0px solid red;width:'+(m-20)+"px;height:"+(n-200)+'px;" id="fusionChart" ></div>'}).show();
if(isFusion){if(a!="-"){var g=new FusionCharts(e,l,"100%","100%","0","1");g.setXMLData(a);g.setTransparent(true);g.render("fusionChart");}else{Ext.select("#fusionChart").update('<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}}else{var k={};k=jQuery.extend(true,{},createBar("fusionChart",(n-200),(m-20)),k);k.setData(a,"","","bar");k.drawChart();}isMaximizedView=true;},showMaximizedFusion:function(b,c){var j="maxviewchart_"+c;if(FusionCharts(j)!=null){FusionCharts(j).dispose();}maxiView=true;maximizedFunction="showMaximizedFusion";
maxChartName=b;maxChartId=c;var d="";var f="";if(b=="area"){d="area-block-"+c;f="/final/FusionCharts/swf/MSArea.swf";}else{d="bar-block-"+c;f="/final/FusionCharts/swf/Bar2D.swf";}var l=Ext.getCmp(d).dataArray;var k=this.getMain().getWidth();var m=this.getMain().getHeight();var e=l[0];var a=l[1];Ext.widget("maximizeview",{title:e,width:k,height:m,dataArray:l,id:"Maximize",html:'<div style="margin:6px;border:0px solid red;width:'+(k-20)+"px;height:"+(m-200)+'px;" id="fusionChart" ></div>'}).show();
if(isFusion){if(a!="-"){var g=new FusionCharts(f,j,"100%","100%","0","1");g.setXMLData(a);g.setTransparent(true);g.render("fusionChart");}else{Ext.select("#fusionChart").update('<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}}else{var h={};h=jQuery.extend(true,{},createBar("fusionChart",(m-200),(k-20)),h);h.setData(a,"","","bar");h.drawChart();}isMaximizedView=true;},showMaximizedAreaChart:function(c){var j="maxviewchart_"+c;if(FusionCharts(j)!=null){FusionCharts(j).dispose();}var d="area-block-"+c;var g="/final/FusionCharts/swf/MSArea.swf";
var h=Ext.getCmp(d);var l=h.dataArray;var b=h.chartType;var n=h.URL;var k=this.getMain().getWidth();var m=this.getMain().getHeight();var e=l[0];var a=l[1];var f;if(b.indexOf("highchart")>-1){f='<div id="chartId"></div>';}else{if(b.indexOf("easychart")>-1){f='<div id="chartId" style="margin:6px;border:0px solid red;width:'+(k-20)+"px;height:"+(m-200)+'px;"><img id="graphImage" src="'+n+"&height="+(m-50)+"&width="+(k-30)+'&mode=2D" /></div>';
}else{f='<div style="margin:6px;border:0px solid red;width:'+(k-20)+"px;height:"+(m-200)+'px;" id="chartId" ></div>';}}Ext.widget("maximizeview",{title:e,width:k,height:m,dataArray:l,id:"Maximize",html:f,listeners:{show:function(){if(b.indexOf("fusioncharts")>-1){if(a!="-"){var o=new FusionCharts(g,j,"100%","100%","0","1");
o.setXMLData(a);o.setTransparent(true);o.render("chartId");}else{Ext.select("#chartId").update('<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}}else{if(b.indexOf("highchart")>-1){setHighChart(n,"chartId",m-50,k-30,"",true,"right",false);}else{}}}}}).show();isMaximizedView=true;},loadDialCharts:function(){var b="DialPanel";if(!Ext.isEmpty(Ext.getCmp(b))){var e=Ext.getCmp(b).dataArray;if(!Ext.isEmpty(e)){for(var c in e){if(e[c]["XML_DATA"]!=undefined){var d=e[c]["XML_DATA"];
if(d!="-"){var f="dialchart-"+c;if(FusionCharts(f)!=null){FusionCharts(f).dispose();}var a=new FusionCharts("/final/FusionCharts/swf/AngularGauge.swf",f,"100%","100%","0","1");a.setXMLData(d);a.setTransparent(true);a.render("dial-block-"+c);}else{Ext.select("#dial-block-"+c).update('<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}}}}}},loadAreaCharts:function(){var c="AreaPanel";var h=Ext.getCmp(c).dataArray;if(!Ext.isEmpty(h)){for(var l in h){if(isFusion){if(h[l]["XML_DATA"]!=undefined){var j="areachart-"+l;if(FusionCharts(j)!=null){FusionCharts(j).dispose();}var a=h[l]["XML_DATA"];var k=Ext.getCmp("area-block-"+l).dataArray;
var m=new Array();m[m.length]=h[l]["COMPONENT_DETAILS"];m[m.length]=h[l]["TEST"];m[m.length]=h[l]["MEASURE"];m[m.length]=h[l]["COMBINED_TEST_MEASURES"];k[1]=a;k[2]="AREA_CHART";k[3]=m;if(a!="-"){var e=new FusionCharts("/final/FusionCharts/swf/MSArea.swf",j,"100%","100%","0","1");e.setXMLData(a);e.setTransparent(true);
e.render("areaChart-"+l);}else{Ext.select("#areaChart-"+l).update('<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");}Ext.getCmp("area-block-"+l).dataArray=k;
}}else{if(!Ext.isEmpty(h[l]["IMAGE_URL"])){var b=h[l]["IMAGE_URL"]+"&anonymousUser=true&dashboardUserId="+userName;var g=190;var f=430;var d="area-block-"+l;setHighChart(b,d,g,f,"",true,"right",false);}else{Ext.select("#areaChart-"+l).update('<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}}}}},loadBarCharts:function(b){var c="BarPanel";var k=Ext.getCmp(c).dataArray;if(!Ext.isEmpty(k)){for(var l in k){if(k[l]["XML_DATA"]!=undefined){var h="barchart-"+l;if(FusionCharts(h)!=null){FusionCharts(h).dispose();}var d=k[l]["XML_DATA"].chartHeight;var a=k[l]["XML_DATA"];var e=Ext.getCmp("bar-block-"+l);
var j=e.dataArray;var m=new Array();m[m.length]=k[l]["COMPONENT_DETAILS"];m[m.length]=k[l]["TEST"];m[m.length]=k[l]["MEASURE"];m[m.length]=k[l]["COMBINED_TEST_MEASURES"];j[1]=a;j[2]="BAR_CHART";j[3]=m;if(isFusion){if(a!="-"){Ext.getCmp("barMaximizedId"+l).setVisible(true);var f=new FusionCharts("/final/FusionCharts/swf/Bar2D.swf",h,"100%","100%","0","1");
f.setXMLData(a);f.setTransparent(true);f.render("barChart-"+l);}else{Ext.getCmp("barMaximizedId"+l).setVisible(false);Ext.select("#barChart-"+l).update('<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}Ext.getCmp("bar-block-"+l).dataArray=j;Ext.getCmp("bar-block-"+l).doLayout();}else{var g={};g=jQuery.extend(true,{},createBar("barChart-"+l,d,300),g);g.setData(a,"","","bar");g.drawChart();}}}}},beforeUserDesktopDataShow:function(){var a=publicJson["RESULT"]["screenLabels"];if(a!=undefined){Ext.getCmp("usersummarytitle").update("<b>"+a["monitor.common.User Summary"]+"</b>");
Ext.getCmp("ipAddressLbl").setText(a["monitor.common.ipAddres"]+":");Ext.getCmp("osTypeLbl").setText(a["monitor.common.OS"]+":");}},afterMainRendered:function(){var a=publicJson["RESULT"];if(a!=undefined){var c=a["TITLE"];var b=a["VIEW"];this.getMain().setTitle(c);this.showUserDesktop(a);}},showUserDesktop:function(c){var f=c["ORDER"];
if(!Ext.isEmpty(f)){this.getUserdesktopdata().show();this.updateSessionDetails(c["Session_Details"],"sessionDetails");this.updateLoginDetails(c["Login_Details"],"loginDetails");if(f.length>0){for(i=0;i<f.length;i++){var d=f[i];if(d=="Group_Metrics"){this.genGroupMetrics("GroupPanel",c["Group_Metrics"]);
}else{if(d=="Dial_Metrics"){}else{if(d=="Bar_Metrics"){this.loadBarMetrics("BarPanel",c);}else{if(d=="Line_Metrics"){this.loadLineMetrics("BarPanel",c);}else{if(d=="Area_Metrics"){this.loadAreaMetrics("BarPanel",c);}}}}}}}else{var a=c["ERROR"];if(!Ext.isEmpty(a)){var b=Ext.getCmp("ErrPanel");if(!Ext.isEmpty(b)){b.show();
}var e=Ext.getCmp("configWindow");if(!Ext.isEmpty(b)){e.hide();}}}}else{var a=c["ERROR"];if(!Ext.isEmpty(a)){var b=Ext.getCmp("ErrPanel");if(!Ext.isEmpty(b)){b.show();}var e=Ext.getCmp("configWindow");if(!Ext.isEmpty(b)){e.hide();}}}},genGroupMetrics:function(p,d){var A=d["GROUP_VALUES"];var g=d["GROUP_HEADER"];
var h=Ext.getCmp(p);var a;for(a in g){var D=false;var e="0 8 8 0";if(D){e="0 0 0 0";D=false;}else{D=true;}var j=g[a];if(!Ext.isEmpty(j)){var l=A[a][j];var q=A[a][j+"_STATE"];var x=A[a][j+"_STATE_TIP"];if(!Ext.isEmpty(l)){h.add({id:"grpColPanel"+a,itemId:"grpColPanel"+a,border:false,frame:false,scroll:false,autoScroll:true,margin:e,height:200,padding:0,title:'<table ><tr><td style="padding-left:6px">'+j+"</td></tr></table>",items:[{xtype:"container",id:"grpData_"+j+"_"+a,itemId:"grpData_"+j+"_"+a,idVal:a,autoScroll:true,border:1,dataObjArray:null,html:""}]});
var C;var w;var v='<table align="left" cellpadding="5" style="margin:4px 10px 0 5px;border:0px solid blue">';var t=new Array();for(C in l){var z=l[C];var B=z["TITLE"];var u=z["MEASURE_VALUE"];var y="";var n=z["UNIT"];var s=z["STATE"];var f=z["STATE_TIP"];var o=z["GRAPH_FORMAT"];if(Ext.isEmpty(s)||s=="-"){s="GOOD";
}var m='<td align="right" width="80"><b style="font-size:14px;text-align:left;">'+u+"</b></td>";if(!Ext.isEmpty(z["MEASURE_URL"])){y=z["MEASURE_URL"];m='<td align="right" width="80" ><b style="font-weight:bolder;text-align:left;"><a href="javascript:void(0);" onclick="javascript:openGraph(\''+y+"','"+B+n+"','"+o+"');\">"+u+"</a></b></td>";
}var k='<td align="right" width="20"><img src="/final/monitor/eg_images/spacer.gif" width="20"/></td>';if(!Ext.isEmpty(z["BAR_METRICS"])){var b=z["BAR_METRICS"];t[w]=b;var c="DIAGNOSIS";k='<td align="right" width="20"><a href="javascript:void(0);" onclick="javascript:openDDMaxBar(\''+a+"','"+w+"','"+j+'\');"><div class="iconDiagnosis" style="border:0px solid red;margin-left:9px" title="'+c+'"></div></a> </td>';
w++;}v=v+'<tr><td width="35"><div style="margin-right:5px;margin-left:3px;" class=stateSymbol_'+s+' title="'+f+'"></div></td><td align="left" style="font-weight:normal" width="90%">'+B+" "+n+"</td>"+m+k+"</tr>";}v=v+"</table>";var r=Ext.getCmp("grpData_"+j+"_"+a);r.update(v);r.dataObjArray=t;}}}h.doLayout();
},genDialCharts:function(c,d){var f=Ext.getCmp(c);var k=d["DIAL_METRICS"];if(!Ext.isEmpty(k)){f.add({xtype:"container",id:"dialpanel",cls:"datapanel",border:true,frame:true,style:{"border":"0px solid red"},layout:"column",margin:"0 0 0 0",defaults:{columnWidth:0.25}});var b=Ext.getCmp("dialpanel");for(var l in k){var j=k[l]["TITLE"];
var a=k[l]["XML_DATA"];b.add({xtype:"container",id:"dialblock"+l,itemId:"dialblock"+l,title:j,border:false,frame:true,height:130,defaults:{margin:4},items:[{xtype:"label",width:"100%",labelAlign:"center",html:"<b>"+j+"</b>",},{xtype:"container",html:'<div id="dial-block-'+l+'" style="border:0px solid green;height:100px;"></div>'}]});
}if(Ext.getCmp("dialblock"+l[0])){Ext.getCmp("dialblock"+l[0]).addCls("lastChild");}Ext.create;f.doLayout();var e=f.items.length;if((e/4)>1){var h=Math.ceil((e/4));var g=f.getHeight()*h;g=Math.round(g);f.setHeight(g);}f.dataArray=k;f.fireEvent("boxready",k);}},loadLineMetrics:function(q,d){var f=new Array();
var k=new Array();var h=new Array();var t=new Array();var l=new Array();var c=Ext.getCmp(q);var r=d["LINE_METRICS"];var x=false;var z="bottom";var v=0;if(!Ext.isEmpty(r)){var s=Ext.getCmp("BarPanel");for(var B in r){var g=r[B]["TITLE"];var w=r[B]["IMAGE_URL"]+"&user="+userName;var p=r[B]["GRAPH_FORMAT"];
var u=new Array();u[u.length]=r[B]["COMPONENT_DETAILS"];u[u.length]=r[B]["TEST"];u[u.length]=r[B]["MEASURE"];var y=190;var m=430;var A=new Array();A[0]=g;A[1]=w;A[2]=u;var e="",b=false;if(!Ext.isEmpty(p)){if(p.indexOf("highchart")>-1){e='<div id="desktopChart'+B+'"></div>';k.push("desktopChart"+B);f.push(w);
h.push(y);b=true;l.push("highchartlineblock"+B);}}s.add({xtype:"panel",id:"lineblock"+B,itemId:"lineblock"+B,cls:"datapanel",columnWidth:0.33,dataArray:A,border:true,frame:true,title:g,padding:"0 0 0 0",width:"33%",style:{"border":"0px solid blue"},height:240,tools:[{xtype:"button",cls:"iconMaximize",hidden:true,style:{"border":"none"},handler:function(){maximizedView(this.up("panel").id,p);
}}],items:[{xtype:"container",layout:"hbox",width:"100%",height:190,padding:"8 0 0 0",id:"desktopChart"+B,items:[{xtype:"container",id:"dh"+B,idVal:B,height:"100%",width:"100%",border:1,dataArray:w,listeners:{"afterrender":function(F){var j=this.dataArray;var D=jQuery(window).width();var C=jQuery(window).height();
var E=F.idVal;m=(Math.round(D/3)-20);if(!Ext.isEmpty(p)){if(p.indexOf("highchart")>-1){if(!Ext.isEmpty(f[v])){Ext.Ajax.request({url:f[v]+"&anonymousUser=true&dashboardUserId="+userName,scope:this,method:"POST",timeout:280000,success:function(H){if(H.status==200&&!Ext.isEmpty(H.responseText)){if(H.responseText.indexOf(".png")>=0){Ext.select("#"+F.id).update('<table width="100%" height="100%" ><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}else{var J=Ext.decode(H.responseText);var G="yes";var X="yes";if(!Ext.isEmpty(J)&&J!=""&&J.hasOwnProperty("DataSet")){try{var M=J.DataSet;var K=F.getHeight();var S=F.getWidth();if((M!=null&&!Ext.isEmpty(M))){var O='<div class="chartCount" style="border:0px solid red;width:300;overflow:auto;height:64px"><ul >';
for(var U in M){var P=M[U];if(P!=null&&P.hasOwnProperty("dispLegend")){var R=P["dispLegend"];var I=P["measVal"];var L=P["measState"];var Q=P["layerModelUrl"];var N=P["color"];var T=P["unit"];O+="<li>";if(G.toLowerCase()!="no"&&G.toLowerCase()=="yes"){if(P!=null&&Q!="-"){O+='<div class="uxGraphValue_WHITE">';
if((G.toLowerCase()!="no"&&X.toLowerCase()=="no")){O+='<div><span class="chartLegend" style="color:'+N+'">.</span>';}O+='<div style="margin-top:0px" class="uxGraphValue_WHITE" onclick=href=\'javascript:wayToLayerModel("'+Q+'")\'><img  class="stateSymbol_'+L+'" src="/final/images/clear.png" border="0" s/>'+I+"</div>";
}else{O+='<div style="margin-top:0px" class="uxGraphValue_WHITE" ><img  class="stateSymbol_'+L+'" src="/final/images/clear.png" border="0" />'+I+"</div>";}}if(X.toLowerCase()!="no"&&X.toLowerCase()=="yes"){O+='<div><span class="chartLegend" style="color:'+N+'">.</span>';if(I!=null&&(I!="-"&&Q!="-")){O+="<a href='javascript:wayToLayerModel(\""+Q+'")\'><span class="status">'+R+"</span></a>";
if(T!=null&&(T!="-"&&T!="undefined"&&T!="")){O+="<a href='javascript:wayToLayerModel(\""+Q+'")\'><span class="matric"> ('+T+")</span></a>";}}else{O+='<span class="uxGraphLabel" style="white-space:nowrap">'+R+"</span>";if(T!=null&&(T!="-"&&T!="undefined"&&T!="")){O+='<span class="matric"> ('+T+")</span>";
}}O+="</div>";}O+="</li>";}}O+="</ul></div>";if(O!=null&&O!=""){O="<div>"+O+'</div></div> <div id="measureLineGraph_'+E+'" class="timelineDiv" style="border:0px solid yellow;height:'+K+'px;width:100%">';this.update(O);var W={};W=jQuery.extend(true,{},getHighCharts("measureLineGraph_"+E,K,S,""),W);W.setData(J,mgrDateFormat,"",true,"right");
W.drawChart();}}else{Ext.select("#"+F.id).update('<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");}}catch(V){console.log("exception in highchart method::"+V);
}}else{Ext.select("#"+F.id).update('<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");}}}}});}}else{this.update('<table height="100%" width="100%"><tr><td><div align="center" valign="bottom" ><img src="'+j+"&height="+y+"&width="+m+'&mode=2D" /></div></td</tr</table>');
}}else{this.update('<table height="100%" width="100%" ><tr><td><div align="center" valign="bottom" ><img src="'+j+"&height="+y+"&width="+m+'&mode=2D" /></div></td</tr</table>');}v=v+1;}}}]}]});}c.doLayout();var a=c.items.length;if((a/2)>1){var n=Math.ceil((a/2));var o=250*n;o=Math.round(o);}}},loadBarMetrics:function(b,c){var f=Ext.getCmp(b);
var l=c["BAR_METRICS"];if(!Ext.isEmpty(l)){var n=Ext.getCmp("BarPanel");for(var m in l){var d=false;var a="0 8 8 0";if(d){a="0 0 8 0";d=false;}else{d=true;}var j=l[m]["TITLE"];var k=new Array();k[0]=j;n.add({xtype:"panel",id:"bar-block-"+m,autoScroll:true,itemId:"bar-block-"+m,cls:"datapanel",style:{"border":"0px solid orange"},dataArray:k,border:false,frame:true,title:j,barId:m,columnWidth:0.33,margin:a,height:240,tools:[{xtype:"button",cls:"iconMaximize",id:"barMaximizedId"+m,hidden:true,style:{"border":"none"},handler:function(){maximizedFusion("bar",this.up("panel").barId);
}}],items:[{xtype:"container",width:"100%",html:'<center><div style="margin-top:-10px"><div id="barChart-'+m+'" style="height:auto;border:0px solid red;"></div></div></center>'}]});}f.dataArray=l;f.fireEvent("boxready",l);f.doLayout();var e=f.items.length;if((e/2)>1){var h=Math.ceil((e/2));var g=500*h;
g=Math.round(g);f.setHeight(g);}}},loadAreaMetrics:function(a,c){var e=Ext.getCmp(a);var g=c["AREA_METRICS"];if(!Ext.isEmpty(g)){var b=Ext.getCmp("BarPanel");for(var j in g){var f=g[j]["GRAPH_FORMAT"];var d=g[j]["TITLE"];var k;if(!Ext.isEmpty(g[j]["IMAGE_URL"])){k=g[j]["IMAGE_URL"]+"&anonymousUser=true&dashboardUserId="+userName;
}var h=new Array();h[0]=d;h[2]="AREA_CHART";b.add({xtype:"panel",id:"area-block-"+j,itemId:"area-block-"+j,cls:"datapanel",dataArray:h,layout:"vbox",frame:true,border:false,style:{"border":"0px solid violet"},areaId:j,title:d,chartType:f,URL:k,height:240,columnWidth:0.33,tools:[{xtype:"button",cls:"iconMaximize",style:{"border":"none"},hidden:true,handler:function(){showMaximizedAreaChart(this.up("panel").areaId);
}}],items:[{xtype:"container",width:"100%",items:[{xtype:"container",id:"areaChart-"+j,chartId:"areaChartId-"+j,inKey:j,listeners:{"afterrender":function(o){var n=o.inKey;if(!Ext.isEmpty(g[n]["GRAPH_FORMAT"])&&g[n]["GRAPH_FORMAT"].indexOf("fusionchart")>-1){if(g[j]["XML_DATA"]!=undefined){var r=o.chartId;
if(FusionCharts(r)!=null){FusionCharts(r).dispose();}var l=g[n]["XML_DATA"];var t=Ext.getCmp("area-block-"+n).dataArray;var u=new Array();u[u.length]=g[n]["COMPONENT_DETAILS"];u[u.length]=g[n]["TEST"];u[u.length]=g[n]["MEASURE"];u[u.length]=g[n]["COMBINED_TEST_MEASURES"];t[1]=l;t[2]="AREA_CHART";t[3]=u;
if(l!="-"){var p=new FusionCharts("/final/FusionCharts/swf/MSArea.swf",r,"100%","100%","0","1");p.setXMLData(l);p.setTransparent(true);p.render(o.getId());}else{Ext.select("#"+o.getId()).update('<table width="100%" height="100%" ><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}}}else{if(!Ext.isEmpty(g[n]["IMAGE_URL"])&&g[n]["IMAGE_URL"]!="-"){var s=190;var q=430;var m=g[n]["IMAGE_URL"]+"&anonymousUser=true&dashboardUserId="+userName;if(g[n]["GRAPH_FORMAT"].indexOf("highchart")>-1){if(!Ext.isEmpty(m)){Ext.Ajax.request({url:m,scope:this,method:"POST",timeout:280000,success:function(w){if(w.status==200&&!Ext.isEmpty(w.responseText)){if(w.responseText.indexOf(".png")>=0){Ext.select("#"+o.getId()).update('<table width="100%" height="100%" ><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}else{var y=Ext.decode(w.responseText);var v="yes";var M="yes";if(!Ext.isEmpty(y)&&y!=""&&y.hasOwnProperty("DataSet")){try{var B=y.DataSet;var z=o.getHeight()-110;var H=o.getWidth()-15;if((B!=null&&!Ext.isEmpty(B))){var D='<div class="chartCount" style="height:64px;overflow:auto"><ul>';for(var J in B){var E=B[J];
if(E!=null&&E.hasOwnProperty("dispLegend")){var G=E["dispLegend"];var x=E["measVal"];var A=E["measState"];var F=E["layerModelUrl"];var C=E["color"];var I=E["unit"];D+="<li>";if(v.toLowerCase()!="no"&&v.toLowerCase()=="yes"){if(E!=null&&F!="-"){D+='<div class="uxGraphValue_WHITE">';if((v.toLowerCase()!="no"&&M.toLowerCase()=="no")){D+='<div><span class="chartLegend" style="color:'+C+'">.</span>';
}D+='<div style="margin-top:0px" class="uxGraphValue_WHITE" onclick=href=\'javascript:wayToLayerModel("'+F+'")\'><img  class="stateSymbol_'+A+'" src="/final/images/clear.png" border="0" />'+x+"</div>";}else{D+='<li><div class="uxGraphValue_WHITE">';D+='<div><span class="chartLegend" style="color:'+C+'">.</span>';
D+=x+"</div>";}}if(M.toLowerCase()!="no"&&M.toLowerCase()=="yes"){D+='<div><span class="chartLegend" style="color:'+C+'">.</span>';if(x!=null&&(x!="-"&&F!="-")){D+="<a href='javascript:wayToLayerModel(\""+F+'")\'><span class="status">'+G+"</span></a>";if(I!=null&&(I!="-"&&I!="undefined"&&I!="")){D+="<a href='javascript:wayToLayerModel(\""+F+'")\'><span class="matric"> ('+I+")</span></a>";
}}else{D+='<span class="status">'+G+"</span>";if(I!=null&&(I!="-"&&I!="undefined"&&I!="")){D+='<span class="matric"> ('+I+")</span>";}}D+="</div>";}D+="</li>";}}D+="</ul></div>";if(D!=null&&D!=""){D="<div>"+D+'</div></div> <div id="measuregraph_'+n+'" class="timelineDiv" style="border:0px solid yellow;height:'+z+'px;width:100%">';
o.update(D);var L={};L=jQuery.extend(true,{},getHighStockAreaChartForMyDashboard("measuregraph_"+n,z,H,"",y.DataSet),L);L.setData(y,mgrDateFormat,"",true,"right");L.drawChart();}}else{Ext.select("#"+o.getId()).update('<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}}catch(K){console.log("exception in highchart method::"+K);}}else{Ext.select("#"+o.getId()).update('<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}}}}});}}else{Ext.select("#"+o.getId()).update('<table width="100%" height="100%" ><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");}}else{Ext.select("#"+o.getId()).update('<table width="100%" height="100%" ><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}}}}}]}]});}}},userdetailsDefaultLoad:function(){},onBackBtnClick:function(){var a=userType;if(!Ext.isEmpty(treeSession)&&treeSession.indexOf("EgCitrixDashCloud.jsp")>-1){window.location.href=treeSession;}else{if(isNormalBack){if(!Ext.isEmpty(parent.window.location)){if(isFromGeo==true||isFromGeo=="true"){var b="";
if(isDirectLinkfromCtx||isDirectLinkfromCtx=="true"){if(!Ext.isEmpty(view_name)&&view_name=="Overview_View"){b="/final/monitor/citrixDashboard.jsp?iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&userBased="+isUserBased+"&fromMenu=true&fromUED=false&showConfig=true&dashboard_name="+dashboard_name+"&view_name="+view_name+"&filterName="+encodeURI(filterName.trim())+"&filterViewName="+filterViewName+"&dashboard_mapping="+dashboard_mapping;
if(!Ext.isEmpty(fromServiceHomePage)&&fromServiceHomePage!=null&&fromServiceHomePage!=undefined&&fromServiceHomePage!="null"&&fromServiceHomePage!="undefined"){b+="&fromServiceHomePage="+fromServiceHomePage;}if(!Ext.isEmpty(fromZonePage)&&fromZonePage!=null&&fromZonePage!=undefined&&fromZonePage!="null"&&fromZonePage!="undefined"){b+="&fromZonePage="+fromZonePage;
}}else{if(!Ext.isEmpty(filterName)&&filterName.indexOf("-")>-1){filterName=filterName.substring(filterName.indexOf("-")+1);}b="/final/monitor/citrixDashboard.jsp?iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&userBased="+isUserBased+"&fromMenu=true&fromUED=true&showConfig=true&dashboard_name="+dashboard_name+"&view_name="+view_name+"&filterName="+encodeURI(filterName.trim())+"&filterViewName="+filterViewName+"&dashboard_mapping="+dashboard_mapping;
if(!Ext.isEmpty(fromServiceHomePage)&&fromServiceHomePage!=null&&fromServiceHomePage!=undefined&&fromServiceHomePage!="null"&&fromServiceHomePage!="undefined"){b+="&fromServiceHomePage="+fromServiceHomePage;}if(!Ext.isEmpty(fromZonePage)&&fromZonePage!=null&&fromZonePage!=undefined&&fromZonePage!="null"&&fromZonePage!="undefined"){b+="&fromZonePage="+fromZonePage;
}}if(!Ext.isEmpty(countryCode)&&countryCode!=null&&countryCode!=undefined&&countryCode!="null"&&countryCode!="undefined"){b+="&countryCode="+countryCode;}if(!Ext.isEmpty(regionName)&&regionName!=null&&regionName!=undefined&&regionName!="null"&&regionName!="undefined"){b+="&regionName="+encodeURI(regionName);
}if(!Ext.isEmpty(selectedTest)&&selectedTest!=null&&selectedTest!=undefined){b+="&selectedTest="+selectedTest;}if(!Ext.isEmpty(selectedMeasure)&&selectedMeasure!=null&&selectedMeasure!=undefined){b+="&selectedMeasure="+selectedMeasure;}}else{b+="/final/monitor/endUserDashboard.jsp?access=allusers&userType="+a+"&fromGeo="+isFromGeo+"&enableBackButton=true&filterBy="+filterBy+"&filterFlag="+filterFlag+"&searchFilter="+encodeURI(searchFilter)+"&nextSearch="+encodeURI(nextSearch)+"&nextSubSearch="+encodeURI(nextSubSearch)+"&iniName="+iniName+"&user_name="+user_name+"&isUserBased="+isUserBased+"&dashboard_name="+dashboard_name+"&view_name="+view_name+"&dashboard_mapping="+dashboard_mapping+"&time_line="+encodeURI(time_line)+"&ginfo="+geoInfo+"&usercountval="+usercountval+"&showKeyUser="+showKeyUser+"&fromf5="+fromf5;
if(!Ext.isEmpty(detail)&&detail!=null&&detail!=undefined&&detail!="null"&&detail!="undefined"){b+="&detail="+encodeURI(detail);}if(!Ext.isEmpty(compCombo)&&compCombo!=null&&compCombo!=undefined&&compCombo!="null"&&compCombo!="undefined"){b+="&compCombo="+compCombo;}if(!Ext.isEmpty(fromServiceHomePage)&&fromServiceHomePage!=null&&fromServiceHomePage!=undefined&&fromServiceHomePage!="null"&&fromServiceHomePage!="undefined"){b+="&fromServiceHomePage="+fromServiceHomePage;
}if(!Ext.isEmpty(fromZonePage)&&fromZonePage!=null&&fromZonePage!=undefined&&fromZonePage!="null"&&fromZonePage!="undefined"){b+="&fromZonePage="+fromZonePage;}if(!Ext.isEmpty(selectedTest)&&selectedTest!=null&&selectedTest!=undefined){b+="&selectedTest="+selectedTest;}if(!Ext.isEmpty(selectedMeasure)&&selectedMeasure!=null&&selectedMeasure!=undefined){b+="&selectedMeasure="+selectedMeasure;
}}window.location.href=b;}else{var c="/final/monitor/endUserDashboard.jsp?access=allusers&userType="+a+"&fromMenu="+isFromMenu+"&filterBy="+filterBy+"&filterFlag="+filterFlag+"&searchFilter="+encodeURI(searchFilter)+"&nextSearch="+encodeURI(nextSearch)+"&nextSubSearch="+encodeURI(nextSubSearch)+"&enableBackButton="+showBackButon+"&isfromuedoverview="+isFromUEDOverview+"&overviewsearchstr="+overviewSearchStr+"&priorityFilter="+priorityFilter+"&showKeyUser="+showKeyUser+"&gatewayFilter="+gatewayFilter+"&fromf5="+fromf5;
if(!Ext.isEmpty(searchString)&&searchString!=undefined&&searchString!=null){c=c+"&searchString=";}if(!Ext.isEmpty(adtnlSearchStr)&&adtnlSearchStr!=undefined&&adtnlSearchStr!=null){c=c+"&adtnlSearchStr="+adtnlSearchStr;}window.location.href=c;}}else{if(!Ext.isEmpty(window.location)){if(isFromGeo==true||isFromGeo=="true"){var b="";
if(isDirectLinkfromCtx||isDirectLinkfromCtx=="true"){if(!Ext.isEmpty(view_name)&&view_name=="Overview_View"){b="/final/monitor/citrixDashboard.jsp?iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&userBased="+isUserBased+"&fromMenu=true&fromUED=false&showConfig=true&dashboard_name="+dashboard_name+"&view_name="+view_name+"&filterName="+encodeURI(filterName.trim())+"&filterViewName="+filterViewName+"&dashboard_mapping="+dashboard_mapping;
}if(!Ext.isEmpty(fromServiceHomePage)&&fromServiceHomePage!=null&&fromServiceHomePage!=undefined&&fromServiceHomePage!="null"&&fromServiceHomePage!="undefined"){b+="&fromServiceHomePage="+fromServiceHomePage;}if(!Ext.isEmpty(fromZonePage)&&fromZonePage!=null&&fromZonePage!=undefined&&fromZonePage!="null"&&fromZonePage!="undefined"){b+="&fromZonePage="+encodeURI(fromZonePage);
}else{if(!Ext.isEmpty(filterName)&&filterName.indexOf("-")>-1){filterName=filterName.substring(filterName.indexOf("-")+1);}b="/final/monitor/citrixDashboard.jsp?iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&userBased="+isUserBased+"&fromMenu=true&fromUED=true&showConfig=true&dashboard_name="+dashboard_name+"&view_name="+view_name+"&filterName="+encodeURI(filterName.trim())+"&filterViewName="+filterViewName+"&dashboard_mapping="+dashboard_mapping;
if(!Ext.isEmpty(fromServiceHomePage)&&fromServiceHomePage!=null&&fromServiceHomePage!=undefined&&fromServiceHomePage!="null"&&fromServiceHomePage!="undefined"){b+="&fromServiceHomePage="+fromServiceHomePage;}if(!Ext.isEmpty(fromZonePage)&&fromZonePage!=null&&fromZonePage!=undefined&&fromZonePage!="null"&&fromZonePage!="undefined"){b+="&fromZonePage="+encodeURI(fromZonePage);
}}if(!Ext.isEmpty(countryCode)&&countryCode!=null&&countryCode!=undefined&&countryCode!="null"&&countryCode!="undefined"){b+="&countryCode="+countryCode;}if(!Ext.isEmpty(regionName)&&regionName!=null&&regionName!=undefined&&regionName!="null"&&regionName!="undefined"){b+="&regionName="+encodeURI(regionName);
}if(!Ext.isEmpty(selectedTest)&&selectedTest!=null&&selectedTest!=undefined){b+="&selectedTest="+selectedTest;}if(!Ext.isEmpty(selectedMeasure)&&selectedMeasure!=null&&selectedMeasure!=undefined){b+="&selectedMeasure="+selectedMeasure;}}else{b+="/final/monitor/endUserDashboard.jsp?access=allusers&userType="+a+"&fromGeo="+isFromGeo+"&enableBackButton=true&filterBy="+filterBy+"&filterFlag="+filterFlag+"&searchFilter="+encodeURI(searchFilter)+"&nextSearch="+encodeURI(nextSearch)+"&nextSubSearch="+encodeURI(nextSubSearch)+"&iniName="+iniName+"&user_name="+user_name+"&isUserBased="+isUserBased+"&dashboard_name="+dashboard_name+"&view_name="+view_name+"&dashboard_mapping="+dashboard_mapping+"&time_line="+encodeURI(time_line)+"&ginfo="+geoInfo+"&usercountval="+usercountval+"&showKeyUser="+showKeyUser+"&fromf5="+fromf5;
if(!Ext.isEmpty(detail)&&detail!=null&&detail!=undefined&&detail!="null"&&detail!="undefined"){b+="&detail="+encodeURI(detail);}if(!Ext.isEmpty(compCombo)&&compCombo!=null&&compCombo!=undefined&&compCombo!="null"&&compCombo!="undefined"){b+="&compCombo="+compCombo;}if(!Ext.isEmpty(fromServiceHomePage)&&fromServiceHomePage!=null&&fromServiceHomePage!=undefined&&fromServiceHomePage!="null"&&fromServiceHomePage!="undefined"){b+="&fromServiceHomePage="+fromServiceHomePage;
}if(!Ext.isEmpty(fromZonePage)&&fromZonePage!=null&&fromZonePage!=undefined&&fromZonePage!="null"&&fromZonePage!="undefined"){b+="&fromZonePage="+encodeURI(fromZonePage);}if(!Ext.isEmpty(selectedTest)&&selectedTest!=null&&selectedTest!=undefined){b+="&selectedTest="+selectedTest;}if(!Ext.isEmpty(selectedMeasure)&&selectedMeasure!=null&&selectedMeasure!=undefined){b+="&selectedMeasure="+selectedMeasure;
}}window.location.href=b;}else{if(detail!=null&&detail!=undefined&&detail!=""){var c="";if(!Ext.isEmpty(parent.window.location)){c="/final/monitor/endUserDashboard.jsp?access=allusers&userType="+a+"&fromMenu="+isFromMenu+"&filterBy="+filterBy+"&enableBackButton="+enableBackButton+"&isfromuedoverview="+isFromUEDOverview+"&overviewsearchstr="+overviewSearchStr+"&filterFlag=true&searchFilter="+searchFilter+"&nextSearch="+nextSearch+"&priorityFilter="+priorityFilter+"&detail="+encodeURI(detail)+"&compCombo="+encodeURI(compCombo)+"&gatewayFilter="+gatewayFilter;
}else{if(!Ext.isEmpty(window.location)){c="/final/monitor/endUserDashboard.jsp?access=allusers&userType="+a+"&fromMenu="+isFromMenu+"&filterBy="+filterBy+"&enableBackButton="+enableBackButton+"&isfromuedoverview="+isFromUEDOverview+"&overviewsearchstr="+overviewSearchStr+"&filterFlag=true&searchFilter="+searchFilter+"&nextSearch="+nextSearch+"&priorityFilter="+priorityFilter+"&detail="+encodeURI(detail)+"&compCombo="+encodeURI(compCombo)+"&gatewayFilter="+gatewayFilter;
}}if(!Ext.isEmpty(adtnlSearchStr)&&adtnlSearchStr!=undefined&&adtnlSearchStr!=null){c=c+"&adtnlSearchStr="+adtnlSearchStr;}c+="&fromf5="+fromf5;window.location.href=c;}else{window.location.href="/final/monitor/endUserDashboard.jsp?access=allusers&userType="+a+"&fromMenu="+isFromMenu+"&filterBy="+filterBy+"&filterFlag="+filterFlag+"&searchFilter="+encodeURI(searchFilter)+"&nextSearch="+encodeURI(nextSearch)+"&nextSubSearch="+encodeURI(nextSubSearch)+"&showKeyUser="+showKeyUser+"&fromf5="+fromf5;
}}}else{window.history.back();}}}else{if(isUserSearch){document.location="/final/monitor/eGSearch.jsp?"+userSearchParams;}else{if(!Ext.isEmpty(fromVCDSDrilldown)&&fromVCDSDrilldown!=null&&fromVCDSDrilldown!=undefined&&(fromVCDSDrilldown==true||fromVCDSDrilldown=="yes")&&!Ext.isEmpty(orgUserType)&&orgUserType!=undefined&&orgUserType=="VDIESX"){if(detail!=null&&detail!=undefined&&detail!=""){window.location.href="/final/monitor/endUserDashboard.jsp?access=allusers&userType="+orgUserType+"&fromMenu="+isFromMenu+"&filterBy="+filterBy+"&enableBackButton="+enableBackButton+"&isfromuedoverview="+isFromUEDOverview+"&overviewsearchstr="+overviewSearchStr+"&filterFlag=true&searchFilter="+searchFilter+"&nextSearch="+nextSearch+"&priorityFilter="+priorityFilter+"&dscomp="+encodeURI(dscomp)+"&dscomptype="+dscomptype+"&dsInfo="+encodeURI(dsInfo)+"&dsmsmt_host="+encodeURI(dsmsmt_host)+"&isFromVCDS=true&detail="+encodeURI(detail)+"&compCombo="+encodeURI(compCombo)+"&gatewayFilter="+gatewayFilter+"&fromf5="+fromf5;
}else{window.location.href="/final/monitor/endUserDashboard.jsp?access=allusers&userType="+orgUserType+"&fromMenu="+isFromMenu+"&filterBy="+filterBy+"&enableBackButton="+enableBackButton+"&isfromuedoverview="+isFromUEDOverview+"&overviewsearchstr="+overviewSearchStr+"&filterFlag="+filterFlag+"&searchFilter="+searchFilter+"&nextSearch="+nextSearch+"&priorityFilter="+priorityFilter+"&dscomp="+encodeURI(dscomp)+"&dscomptype="+dscomptype+"&dsInfo="+encodeURI(dsInfo)+"&dsmsmt_host="+encodeURI(dsmsmt_host)+"&isFromVCDS=true&detail="+encodeURI(detail)+"&compCombo="+encodeURI(compCombo)+"&gatewayFilter="+gatewayFilter+"&fromf5="+fromf5;
}}else{if(!Ext.isEmpty(isFromUEDOverview)&&isFromUEDOverview!=null&&isFromUEDOverview!=undefined&&(isFromUEDOverview==true||isFromUEDOverview=="true")){window.location.href="/final/monitor/endUserDashboard.jsp?access=allusers&userType="+a+"&fromMenu="+isFromMenu+"&filterBy="+filterBy+"&enableBackButton="+enableBackButton+"&isfromuedoverview="+isFromUEDOverview+"&overviewsearchstr="+overviewSearchStr+"&filterFlag="+filterFlag+"&searchFilter="+encodeURI(searchFilter)+"&nextSearch="+encodeURI(nextSearch)+"&nextSubSearch="+encodeURI(nextSubSearch)+"&priorityFilter="+priorityFilter+"&showKeyUser="+showKeyUser+"&gatewayFilter="+gatewayFilter+"&fromf5="+fromf5;
}else{if(!Ext.isEmpty(parent.window.location)){if(isFromGeo==true||isFromGeo=="true"){var b="";if(isDirectLinkfromCtx||isDirectLinkfromCtx=="true"){if(!Ext.isEmpty(view_name)&&view_name=="Overview_View"){b="/final/monitor/citrixDashboard.jsp?iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&userBased="+isUserBased+"&fromMenu=true&fromUED=false&showConfig=true&dashboard_name="+dashboard_name+"&view_name="+view_name+"&filterName="+encodeURI(filterName.trim())+"&filterViewName="+filterViewName+"&dashboard_mapping="+dashboard_mapping;
if(!Ext.isEmpty(fromServiceHomePage)&&fromServiceHomePage!=null&&fromServiceHomePage!=undefined&&fromServiceHomePage!="null"&&fromServiceHomePage!="undefined"){b+="&fromServiceHomePage="+fromServiceHomePage;}if(!Ext.isEmpty(isFromServiceMenu)&&isFromServiceMenu!=null&&isFromServiceMenu!=undefined&&isFromServiceMenu!="null"&&isFromServiceMenu!="undefined"){b+="&isFromServiceMenu="+isFromServiceMenu;
}if(!Ext.isEmpty(isFromZone)&&isFromZone!=null&&isFromZone!=undefined&&isFromZone!="null"&&isFromZone!="undefined"){b+="&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&isFromZoneMenu="+isFromZoneMenu;}if(!Ext.isEmpty(fromZonePage)&&fromZonePage!=null&&fromZonePage!=undefined&&fromZonePage!="null"&&fromZonePage!="undefined"){b+="&fromZonePage="+fromZonePage;
}}else{b="/final/monitor/citrixDashboard.jsp?iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&userBased="+isUserBased+"&fromMenu=true&fromUED=true&showConfig=true&dashboard_name="+dashboard_name+"&view_name="+view_name+"&filterName="+encodeURI(filterName.trim())+"&filterViewName="+filterViewName+"&dashboard_mapping="+dashboard_mapping;
if(!Ext.isEmpty(fromServiceHomePage)&&fromServiceHomePage!=null&&fromServiceHomePage!=undefined&&fromServiceHomePage!="null"&&fromServiceHomePage!="undefined"){b+="&fromServiceHomePage="+fromServiceHomePage;}if(!Ext.isEmpty(isFromServiceMenu)&&isFromServiceMenu!=null&&isFromServiceMenu!=undefined&&isFromServiceMenu!="null"&&isFromServiceMenu!="undefined"){b+="&isFromServiceMenu="+isFromServiceMenu;
}if(!Ext.isEmpty(isFromZone)&&isFromZone!=null&&isFromZone!=undefined&&isFromZone!="null"&&isFromZone!="undefined"){b+="&isFromZone="+isFromZone+"&iszoneName="+iszoneName+"&parentZone="+parentZone+"&isFromZoneMenu="+isFromZoneMenu;}if(!Ext.isEmpty(fromZonePage)&&fromZonePage!=null&&fromZonePage!=undefined&&fromZonePage!="null"&&fromZonePage!="undefined"){b+="&fromZonePage="+fromZonePage;
}}if(!Ext.isEmpty(countryCode)&&countryCode!=null&&countryCode!=undefined&&countryCode!="null"&&countryCode!="undefined"){b+="&countryCode="+countryCode;}if(!Ext.isEmpty(regionName)&&regionName!=null&&regionName!=undefined&&regionName!="null"&&regionName!="undefined"){b+="&regionName="+encodeURI(regionName);
}if(!Ext.isEmpty(selectedTest)&&selectedTest!=null&&selectedTest!=undefined){b+="&selectedTest="+selectedTest;}if(!Ext.isEmpty(selectedMeasure)&&selectedMeasure!=null&&selectedMeasure!=undefined){b+="&selectedMeasure="+selectedMeasure;}}else{b+="/final/monitor/endUserDashboard.jsp?access=allusers&userType="+a+"&fromGeo="+isFromGeo+"&enableBackButton=true&filterBy="+filterBy+"&filterFlag="+filterFlag+"&searchFilter="+encodeURI(searchFilter)+"&nextSearch="+encodeURI(nextSearch)+"&nextSubSearch="+encodeURI(nextSubSearch)+"&iniName="+iniName+"&user_name="+user_name+"&isUserBased="+isUserBased+"&dashboard_name="+dashboard_name+"&view_name="+view_name+"&dashboard_mapping="+dashboard_mapping+"&time_line="+encodeURI(time_line)+"&ginfo="+geoInfo+"&usercountval="+usercountval+"&showKeyUser="+showKeyUser;
if(!Ext.isEmpty(detail)&&detail!=null&&detail!=undefined&&detail!="null"&&detail!="undefined"){b+="&detail="+encodeURI(detail);}if(!Ext.isEmpty(compCombo)&&compCombo!=null&&compCombo!=undefined&&compCombo!="null"&&compCombo!="undefined"){b+="&compCombo="+compCombo;}if(!Ext.isEmpty(fromServiceHomePage)&&fromServiceHomePage!=null&&fromServiceHomePage!=undefined&&fromServiceHomePage!="null"&&fromServiceHomePage!="undefined"){b+="&fromServiceHomePage="+fromServiceHomePage;
}if(!Ext.isEmpty(fromZonePage)&&fromZonePage!=null&&fromZonePage!=undefined&&fromZonePage!="null"&&fromZonePage!="undefined"){b+="&fromZonePage="+fromZonePage;}if(!Ext.isEmpty(selectedTest)&&selectedTest!=null&&selectedTest!=undefined){b+="&selectedTest="+selectedTest;}if(!Ext.isEmpty(selectedMeasure)&&selectedMeasure!=null&&selectedMeasure!=undefined){b+="&selectedMeasure="+selectedMeasure;
}b+="&fromf5="+fromf5;}window.location.href=b;}else{if(isFromLayerModel){var b="/final/monitor/EgSiteInfraView.jsp?qctr=2&fromalarm=&host="+encodeURI(fromCompName)+"&layer="+fromLayerName+"&site=NULL&msmt_host="+encodeURI(msmt_host)+"&comptype="+compType+"&prevPage=MainDashBoard&test="+fromTest;window.location.href=b;
}else{var c="/final/monitor/endUserDashboard.jsp?access=allusers&userType="+a+"&fromMenu="+isFromMenu+"&filterBy="+filterBy+"&filterFlag="+filterFlag+"&searchFilter="+encodeURI(searchFilter)+"&nextSearch="+encodeURI(nextSearch)+"&nextSubSearch="+encodeURI(nextSubSearch)+"&enableBackButton="+showBackButon+"&isfromuedoverview="+isFromUEDOverview+"&overviewsearchstr="+overviewSearchStr+"&priorityFilter="+priorityFilter+"&showKeyUser="+showKeyUser+"&gatewayFilter="+gatewayFilter;
if(!Ext.isEmpty(detail)){c+="&detail="+encodeURI(detail);}if(!Ext.isEmpty(compCombo)){c+="&compCombo="+compCombo;}if(!Ext.isEmpty(searchString)){c=c+"&searchString=";}if(!Ext.isEmpty(adtnlSearchStr)){c=c+"&adtnlSearchStr="+adtnlSearchStr;}c+="&fromf5="+fromf5;window.location.href=c;}}}else{if(!Ext.isEmpty(window.location)){if(isFromGeo==true||isFromGeo=="true"){var b="";
if(isDirectLinkfromCtx||isDirectLinkfromCtx=="true"){if(!Ext.isEmpty(view_name)&&view_name=="Overview_View"){b="/final/monitor/citrixDashboard.jsp?iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&userBased="+isUserBased+"&fromMenu=true&fromUED=false&showConfig=true&dashboard_name="+dashboard_name+"&view_name="+view_name+"&filterName="+encodeURI(filterName.trim())+"&filterViewName="+filterViewName+"&dashboard_mapping="+dashboard_mapping;
}if(!Ext.isEmpty(fromServiceHomePage)&&fromServiceHomePage!=null&&fromServiceHomePage!=undefined&&fromServiceHomePage!="null"&&fromServiceHomePage!="undefined"){b+="&fromServiceHomePage="+fromServiceHomePage;}if(!Ext.isEmpty(fromZonePage)&&fromZonePage!=null&&fromZonePage!=undefined&&fromZonePage!="null"&&fromZonePage!="undefined"){b+="&fromZonePage="+encodeURI(fromZonePage);
}else{if(!Ext.isEmpty(filterName)&&filterName.indexOf("-")>-1){filterName=filterName.substring(filterName.indexOf("-")+1);}b="/final/monitor/citrixDashboard.jsp?iniName="+iniName+"&action=loadViewData&user_name="+user_name+"&userBased="+isUserBased+"&fromMenu=true&fromUED=true&showConfig=true&dashboard_name="+dashboard_name+"&view_name="+view_name+"&filterName="+encodeURI(filterName.trim())+"&filterViewName="+filterViewName+"&dashboard_mapping="+dashboard_mapping;
if(!Ext.isEmpty(fromServiceHomePage)&&fromServiceHomePage!=null&&fromServiceHomePage!=undefined&&fromServiceHomePage!="null"&&fromServiceHomePage!="undefined"){b+="&fromServiceHomePage="+fromServiceHomePage;}if(!Ext.isEmpty(fromZonePage)&&fromZonePage!=null&&fromZonePage!=undefined&&fromZonePage!="null"&&fromZonePage!="undefined"){b+="&fromZonePage="+encodeURI(fromZonePage);
}}if(!Ext.isEmpty(countryCode)&&countryCode!=null&&countryCode!=undefined&&countryCode!="null"&&countryCode!="undefined"){b+="&countryCode="+countryCode;}if(!Ext.isEmpty(regionName)&&regionName!=null&&regionName!=undefined&&regionName!="null"&&regionName!="undefined"){b+="&regionName="+encodeURI(regionName);
}if(!Ext.isEmpty(selectedTest)&&selectedTest!=null&&selectedTest!=undefined){b+="&selectedTest="+selectedTest;}if(!Ext.isEmpty(selectedMeasure)&&selectedMeasure!=null&&selectedMeasure!=undefined){b+="&selectedMeasure="+selectedMeasure;}}else{b+="/final/monitor/endUserDashboard.jsp?access=allusers&userType="+a+"&fromGeo="+isFromGeo+"&enableBackButton=true&filterBy="+filterBy+"&filterFlag="+filterFlag+"&searchFilter="+encodeURI(searchFilter)+"&nextSearch="+encodeURI(nextSearch)+"&nextSubSearch="+encodeURI(nextSubSearch)+"&iniName="+iniName+"&user_name="+user_name+"&isUserBased="+isUserBased+"&dashboard_name="+dashboard_name+"&view_name="+view_name+"&dashboard_mapping="+dashboard_mapping+"&time_line="+encodeURI(time_line)+"&ginfo="+geoInfo+"&usercountval="+usercountval+"&showKeyUser="+showKeyUser;
if(!Ext.isEmpty(detail)&&detail!=null&&detail!=undefined&&detail!="null"&&detail!="undefined"){b+="&detail="+encodeURI(detail);}if(!Ext.isEmpty(compCombo)&&compCombo!=null&&compCombo!=undefined&&compCombo!="null"&&compCombo!="undefined"){b+="&compCombo="+compCombo;}if(!Ext.isEmpty(fromServiceHomePage)&&fromServiceHomePage!=null&&fromServiceHomePage!=undefined&&fromServiceHomePage!="null"&&fromServiceHomePage!="undefined"){b+="&fromServiceHomePage="+fromServiceHomePage;
}if(!Ext.isEmpty(fromZonePage)&&fromZonePage!=null&&fromZonePage!=undefined&&fromZonePage!="null"&&fromZonePage!="undefined"){b+="&fromZonePage="+encodeURI(fromZonePage);}if(!Ext.isEmpty(selectedTest)&&selectedTest!=null&&selectedTest!=undefined){b+="&selectedTest="+selectedTest;}if(!Ext.isEmpty(selectedMeasure)&&selectedMeasure!=null&&selectedMeasure!=undefined){b+="&selectedMeasure="+selectedMeasure;
}b+="&fromf5="+fromf5;}window.location.href=b;}else{if(detail!=null&&detail!=undefined&&detail!=""){var c="";if(!Ext.isEmpty(parent.window.location)){c="/final/monitor/endUserDashboard.jsp?access=allusers&userType="+a+"&fromMenu="+isFromMenu+"&filterBy="+filterBy+"&enableBackButton="+enableBackButton+"&isfromuedoverview="+isFromUEDOverview+"&overviewsearchstr="+overviewSearchStr+"&filterFlag=true&searchFilter="+searchFilter+"&nextSearch="+nextSearch+"&priorityFilter="+priorityFilter+"&detail="+encodeURI(detail)+"&compCombo="+encodeURI(compCombo)+"&gatewayFilter="+gatewayFilter;
}else{if(!Ext.isEmpty(window.location)){c="/final/monitor/endUserDashboard.jsp?access=allusers&userType="+a+"&fromMenu="+isFromMenu+"&filterBy="+filterBy+"&enableBackButton="+enableBackButton+"&isfromuedoverview="+isFromUEDOverview+"&overviewsearchstr="+overviewSearchStr+"&filterFlag=true&searchFilter="+searchFilter+"&nextSearch="+nextSearch+"&priorityFilter="+priorityFilter+"&detail="+encodeURI(detail)+"&compCombo="+encodeURI(compCombo)+"&gatewayFilter="+gatewayFilter;
}}if(!Ext.isEmpty(adtnlSearchStr)&&adtnlSearchStr!=undefined&&adtnlSearchStr!=null){c=c+"&adtnlSearchStr="+adtnlSearchStr;}c+="&fromf5="+fromf5;window.location.href=c;}else{window.location.href="/final/monitor/endUserDashboard.jsp?access=allusers&userType="+a+"&fromMenu="+isFromMenu+"&filterBy="+filterBy+"&filterFlag="+filterFlag+"&searchFilter="+encodeURI(searchFilter)+"&nextSearch="+encodeURI(nextSearch)+"&nextSubSearch="+encodeURI(nextSubSearch)+"&showKeyUser="+showKeyUser+"&fromf5="+fromf5;
}}}}}}}}}},maximizedView:function(){maxiView=true;maximizedFunction="maximizedView";var b=publicJsonData["urlForMaximize"];var c=this.getMain().getWidth(),a=this.getMain().getHeight();Ext.widget("maximizeview",{width:c-100,height:a-100,id:"Maximize",html:'<div style="margin:6px"><img src='+b+" width="+(c-20)+" height= "+(a-20)+" /></div>"}).show();
},BarOnclick:function(d){var f=publicJsonData["path"];var e=publicJsonData["BarGraph"];var c=publicJsonData["bartitle"];var g=this.getMain().getWidth(),a=this.getMain().getHeight();Ext.widget("maximizeview",{width:g,height:a,html:'<div style="margin:8px"><font size="5"><b><center>'+c[d]+'</center></b></font></div><div id="Maximize'+d+'" style="float:left;margin:4px;"></div>'}).show();
var b=new FusionCharts(f,"Gauge"+d,(g-20),(a-20),"0","1");b.setDataXML(e[d]);b.setTransparent(true);b.render("Maximize"+d);},AreaOnclick:function(c){var g=publicJsonData["areagraphdata"];var f=publicJsonData["a_path"];var b=publicJsonData["areatitle"];var e=this.getMain().getWidth(),a=this.getMain().getHeight();
Ext.widget("maximizeview",{width:e,height:a,html:'<div style="margin:8px"><font size="5"><b><center>'+b[c]+'</center></b></font></div><div id="areachart_max'+c+'" style="margin:4px;"></div>'}).show();var d=new FusionCharts(f,"ChartId"+c,(e-65),(a-65),"0","1");d.setDataXML(g[c]);d.setTransparent(true);
d.render("areachart_max"+c);},showConfigDropdown:function(){var a=new Ext.XTemplate('<div style="color:#fff;float:left;margin:4px 0px 0px 4px"><b>'+defaultSettings+'</b></div><div style="text-align:right;float:right;"><div class="iconClose3" id="closeSettings"></div></div>');Ext.create("Ext.container.Container",{width:580,padding:5,id:"configMod",cls:"configMode_popup",items:[{xtype:"container",cls:"configMode_popupArrow",style:{"top":"-14px","left":"526px"}},{xtype:"container",html:a.apply(),style:{"top":"0px","margin":"2px"}},{xtype:"panel",cls:"configMode_popup_inner",defaults:{labelAlign:"top",margin:"8 5 8 10",labelSeparator:""},items:[{xtype:"timeline",parent:this},{xtype:"button",cls:"button20",margin:"0px 0px 8px 250px",id:"timelinesubmit",text:goBtn,handler:function(){appCnt.timelineSubmit();
}}]}],renderTo:"Maximize-body",});},loadConfigurationItems:function(k){metricsData="";removeMetricsData="";var o=k.up().down("radiogroup[id=metrics]");var e=k.up().down("textfield[id=panelTitle]");var f=k.up().down("combo[id=chartTimeline]");var p=k.up().down("combo[id=test]");var q=k.up().down("combo[id=measure]");
var c=k.up().down("textfield[id=displayName]");var b=k.up().down("textfield[id=processName]");var m=k.up().down("textfield[id=process]");var n=k.up().up().down("button[id=add]");var h=k.up().down("combo[id=panelNo]");var g=k.up().down("itemselector[id=showHidePanels]");var s=k.up().down("multiselect[id=deleteCustomPanels]");
var r=k.up().down("radiogroup[id=modifyOptions]");var d=k.up().down("combo[id=sessionDetailsTimeline]");var l=k.up().down("combo[id=sessionDetailsTopN]");var j=k.up().down("combo[id=userAlertsNop]");var a=k.up().down("container[id=paletteContainer]");if(k.getValue()=="add"){o.show();h.hide();r.hide();
p.hide();q.hide();c.hide();n.hide();e.setValue("");e.hide();g.hide();s.hide();d.hide();l.hide();j.hide();a.hide();if(!Ext.isEmpty(o.getValue().metricsRadio)){this.loadMetricsItems(o);}}else{if(k.getValue()=="modify"){o.hide();e.hide();f.hide();p.hide();q.hide();c.hide();b.hide();m.hide();n.hide();g.hide();
s.hide();d.hide();l.hide();j.hide();a.hide();this.loadPanelsCombo(k);}else{if(k.getValue()=="delete"){o.hide();e.hide();f.hide();p.hide();q.hide();c.hide();b.hide();m.hide();n.hide();h.hide();r.hide();d.hide();l.hide();j.hide();a.hide();g.hide();s.show();}else{if(k.getValue()=="showHide"){o.hide();e.hide();
f.hide();p.hide();q.hide();c.hide();b.hide();m.hide();n.hide();h.hide();r.hide();d.hide();l.hide();j.hide();a.hide();s.hide();g.show();}else{o.hide();e.hide();f.hide();p.hide();q.hide();c.hide();b.hide();m.hide();n.hide();h.hide();r.hide();g.hide();s.hide();d.hide();l.hide();j.hide();a.hide();}}}}},loadConfigurationItems_Modify:function(l,f,q,o){metricsData="";
removeMetricsData="";var r=l.up().down("radiogroup[id=metrics]");var e=l.up().down("textfield[id=panelTitle]");var g=l.up().down("combo[id=chartTimeline]");var s=l.up().down("combo[id=test]");var t=l.up().down("combo[id=measure]");var c=l.up().down("textfield[id=displayName]");var b=l.up().down("textfield[id=processName]");
var n=l.up().down("textfield[id=process]");var p=l.up().up().down("button[id=add]");var j=l.up().down("combo[id=panelNo]");var h=l.up().down("itemselector[id=showHidePanels]");var v=l.up().down("multiselect[id=deleteCustomPanels]");var u=l.up().down("radiogroup[id=modifyOptions]");var d=l.up().down("combo[id=sessionDetailsTimeline]");
var m=l.up().down("combo[id=sessionDetailsTopN]");var k=l.up().down("combo[id=userAlertsNop]");var a=l.up().down("container[id=paletteContainer]");if(l.getValue()=="add"){r.show();j.hide();u.hide();s.hide();t.hide();c.hide();p.hide();e.setValue("");e.hide();h.hide();v.hide();d.hide();m.hide();k.hide();
a.hide();if(!Ext.isEmpty(r.getValue().metricsRadio)){this.loadMetricsItems(r);}}else{if(l.getValue()=="modify"){r.hide();e.hide();g.hide();s.hide();t.hide();c.hide();b.hide();n.hide();p.hide();h.hide();v.hide();d.hide();m.hide();k.hide();a.hide();this.loadPanelsCombo_Modify(l,f,q,o);}else{if(l.getValue()=="delete"){r.hide();
e.hide();g.hide();s.hide();t.hide();c.hide();b.hide();n.hide();p.hide();j.hide();u.hide();d.hide();m.hide();k.hide();a.hide();h.hide();v.show();}else{if(l.getValue()=="showHide"){r.hide();e.hide();g.hide();s.hide();t.hide();c.hide();b.hide();n.hide();p.hide();j.hide();u.hide();d.hide();m.hide();k.hide();
a.hide();v.hide();h.show();}else{r.hide();e.hide();g.hide();s.hide();t.hide();c.hide();b.hide();n.hide();p.hide();j.hide();u.hide();h.hide();v.hide();d.hide();m.hide();k.hide();a.hide();}}}}},loadMetricsItems:function(g){metricsData="";removeMetricsData="";var h=g.getValue().metricsRadio;var j=g.up().down("textfield[id=panelTitle]");
var b=g.up().down("combo[id=chartTimeline]");var a=g.up().down("combo[id=test]");var e=g.up().down("combo[id=measure]");var l=g.up().down("textfield[id=displayName]");var f=g.up().down("textfield[id=processName]");var c=g.up().down("textfield[id=process]");var k=g.up().up().down("button[id=add]");var m=g.up().down("container[id=paletteContainer]");
var d=g.up().down("displayfield[id=colorPalette]");this.resetTestMeasure(g);if(h!="Other_Metrics"){this.loadTestsForMetrics(g);j.show();if(h=="Area_Metrics"||h=="Line_Metrics"){b.show();}else{b.hide();}if(h=="Area_Metrics"||h=="Line_Metrics"||h=="Bar_Metrics"){m.show();d.setValue("Palette1");d.update('<div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#8399b0"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#ffd95a"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#a4ac91"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#98d980"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#d5b996"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#f48848"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#8b8cc2"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#eb4052"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#c4b3d0"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#b18651"></div>');
}else{m.hide();}if(h!="Bar_Metrics"){k.show();}else{k.hide();}}else{j.hide();b.hide();a.hide();e.hide();l.hide();f.hide();c.hide();k.hide();m.hide();}},loadMetricsItems_AddPanel:function(j,m){metricsData="";removeMetricsData="";var n=m;var o=j.up().down("textfield[id=panelTitle]");var b=j.up().down("combo[id=chartTimeline]");
var a=j.up().down("combo[id=test]");var g=j.up().down("combo[id=measure]");var q=j.up().down("textfield[id=displayName]");var f=j.up().down("textfield[id=processName]");var d=j.up().down("textfield[id=process]");var p=j.up().up().down("button[id=add]");var r=j.up().down("container[id=paletteContainer]");
var e=j.up().down("displayfield[id=colorPalette]");this.resetTestMeasure(j);var l=j.up().down("itemselector[id=showHidePanels]");var k=j.up().down("radiogroup[id=modifyOptions]");var c=j.up().down("textfield[id=panelNo]");var h=Ext.getCmp("panelTitle");if(n!="Other_Metrics"){this.loadTestsForMetrics_AddPanel(j,m);
h.setValue("");o.show();if(n=="Area_Metrics"||n=="Line_Metrics"){b.show();}else{b.hide();}if(n=="Area_Metrics"||n=="Line_Metrics"||n=="Bar_Metrics"){r.show();e.setValue("Palette1");e.update('<div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#8399b0"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#ffd95a"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#a4ac91"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#98d980"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#d5b996"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#f48848"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#8b8cc2"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#eb4052"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#c4b3d0"></div><div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:#b18651"></div>');
}else{r.hide();}if(n!="Bar_Metrics"){p.show();}else{p.hide();}if(!Ext.isEmpty(l)&&l!=undefined&&l!=null){l.hide();}if(!Ext.isEmpty(k)&&k!=undefined&&k!=null){k.hide();}if(!Ext.isEmpty(c)&&c!=undefined&&c!=null){c.hide();}}else{o.hide();b.hide();a.hide();g.hide();q.hide();f.hide();d.hide();p.hide();r.hide();
if(!Ext.isEmpty(l)&&l!=undefined&&l!=null){l.hide();}if(!Ext.isEmpty(k)&&k!=undefined&&k!=null){k.hide();}if(!Ext.isEmpty(c)&&c!=undefined&&c!=null){c.hide();}}},loadTestsForMetrics:function(e){var d=e.up().down("radiogroup[id=metrics]").getValue().metricsRadio;var c="/final/monitor/endUserDashboardDetailsConfigJson.jsp?";
var a="add";var b=c+"loadTest=true&addOrDelete="+a;b=b+"&metrics="+d;b=b+"&userType="+userType+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;Ext.Ajax.request({url:b,method:"POST",scope:this,timeout:280000,success:function(f,h){var j=f.responseText;var g=Ext.decode(j);var k=e.up().down("combo[id=test]");
if(!Ext.isEmpty(k)&&!Ext.isEmpty(g["TEST"])){k.getStore().loadRawData(g["TEST"]);k.setValue("-1");k.show();}},failure:function(){}});},loadTestsForMetrics_AddPanel:function(f,e){var d=e;var c="/final/monitor/endUserDashboardDetailsConfigJson.jsp?";var a="add";var b=c+"loadTest=true&addOrDelete="+a;b=b+"&metrics="+d;
b=b+"&userType="+userType+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;Ext.Ajax.request({url:b,method:"POST",scope:this,timeout:280000,success:function(g,k){var l=g.responseText;var h=Ext.decode(l);Ext.getCmp("showHidePanelNew").hide();var n=f.up().down("combo[id=test]");var o=f.up().down("combo[id=measure]");
var m=f.up().down("combo[id=processName]");var j=f.up().down("combo[id=process]");if(!Ext.isEmpty(n)&&!Ext.isEmpty(h["TEST"])){n.getStore().loadRawData(h["TEST"]);n.setValue("-1");n.show();if(!Ext.isEmpty(o)&&o.hidden==false){o.setValue("-1");o.hide();}if(!Ext.isEmpty(j)&&j.hidden==false){j.setValue("-1");
j.hide();}if(!Ext.isEmpty(m)&&m.hidden==false){m.setValue("-1");m.hide();}}},failure:function(){}});},loadTestsForModify:function(g,e,f){var c=g.up().down("combo[id=panelNo]");var a=g.up().down("combo[id=optionsCombo]").getValue();var d="/final/monitor/endUserDashboardDetailsConfigJson.jsp?";var b=d+"loadTest=true&addOrDelete="+a;
b=b+"&metrics="+e;b=b+"&userType="+userType;b=b+"&panelNo="+c.getValue();b=b+"&action="+f+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;Ext.Ajax.request({url:b,method:"POST",scope:this,timeout:280000,success:function(j,l){var n=j.responseText;var k=Ext.decode(n);var o=g.up().down("combo[id=test]");
var m=g.up().down("combo[id=chartTimeline]");if(!Ext.isEmpty(o)&&!Ext.isEmpty(k["TEST"])){o.getStore().loadRawData(k["TEST"]);o.setValue("-1");o.show();}if(f=="update"&&(e=="Area_Metrics"||e=="Line_Metrics")&&!Ext.isEmpty(k["TIMELINE"])){m.setValue(k["TIMELINE"]);m.show();}if(!Ext.isEmpty(k["PALETTE"])&&!Ext.isEmpty(k["PALETTE_COLORS"])&&f=="update"&&(e=="Area_Metrics"||e=="Line_Metrics")){var h=Ext.getCmp("colorPalette");
h.setValue(k["PALETTE"]);h.update(k["PALETTE_COLORS"]);}else{if(!Ext.isEmpty(k["PALETTE"])&&!Ext.isEmpty(k["PALETTE_COLORS"])&&e=="Bar_Metrics"){var h=Ext.getCmp("colorPalette");h.setValue(k["PALETTE"]);h.update(k["PALETTE_COLORS"]);}}},failure:function(){}});},createGridsterTags:function(){html='<div class="gridster"><ul class="gridsterul" style="border:1px solid red;width:1000px !important;margin:0px !important">'+'<li data-row="1" data-col="1" data-sizex="1" data-sizey="1"></li><li data-row="2" data-col="1" data-sizex="1" data-sizey="1"></li><li data-row="3" data-col="1" data-sizex="1" data-sizey="1"></li><li data-row="1" data-col="2" data-sizex="1" data-sizey="1"></li><li data-row="2" data-col="2" data-sizex="1" data-sizey="1"></li><li data-row="1" data-col="4" data-sizex="1" data-sizey="1"></li><li data-row="2" data-col="4" data-sizex="1" data-sizey="1"></li><li data-row="3" data-col="4" data-sizex="1" data-sizey="1"></li><li data-row="1" data-col="5" data-sizex="1" data-sizey="1"></li><li data-row="3" data-col="5" data-sizex="1" data-sizey="1"></li><li data-row="1" data-col="6" data-sizex="1" data-sizey="1"></li><li data-row="2" data-col="6" data-sizex="1" data-sizey="1"></li></ul></div>';
return html;},loadPanelsCombo:function(c){var b="/final/monitor/endUserDashboardDetailsConfigJson.jsp?";var a=b+"&userType="+userType+"&loadPanels=true"+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;Ext.Ajax.request({url:a,method:"POST",scope:this,timeout:280000,success:function(d,g){var h=d.responseText;
var f=Ext.decode(h);if(!Ext.isEmpty(f["PANELS"])){var e=c.up().down("combo[id=panelNo]");e.getStore().loadRawData(f["PANELS"]);e.setValue("-1");e.show();}},failure:function(){}});},loadPanelsCombo_Modify:function(d,a,f,e){var c="/final/monitor/endUserDashboardDetailsConfigJson.jsp?";var b=c+"&userType="+userType+"&loadPanels=true"+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;
Ext.Ajax.request({url:b,method:"POST",scope:this,timeout:280000,success:function(g,k){var l=g.responseText;var j=Ext.decode(l);if(!Ext.isEmpty(j["PANELS"])){var h=d.up().down("combo[id=panelNo]");h.getStore().loadRawData(j["PANELS"]);if(a!=null&&a!=undefined&&!Ext.isEmpty(a)){h.setValue(f);this.showModifyOptions_Modify(d.up().down("combo[id=panelNo]"),f,a,e);
}else{h.setValue("-1");}h.show();}},failure:function(){}});},loadColorPalettes:function(c){var b="/final/monitor/endUserDashboardDetailsConfigJson.jsp?";var a=b+"&loadColorPalettes=true"+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;Ext.Ajax.request({url:a,method:"POST",scope:this,timeout:280000,success:function(l,d){var g=l.responseText;
var n=Ext.decode(g);var o=new Array();if(!Ext.isEmpty(n["PALETTES"])){for(var h in n["PALETTES"]){var e=n["PALETTES"][h];var m="";for(i=0;i<e.length;i++){var f=e[i];m+='<div style="float:left;width:12px;height:12px;margin:1px 0px 0px 1px;border:1px solid #2c2c2c;background-color:'+f+'"></div>';}var k={xtype:"button",cls:"button20",id:"button_"+h,palette:h,htmlValue:m,html:m+"&nbsp;"+h,listeners:{"click":function(q){var p=Ext.getCmp("colorPalette");
p.setValue(q.palette);p.update(q.htmlValue);j.hide();}}};o.push(k);}var j=new Ext.Window({width:196,cls:"graphpalettewindow",height:116,x:1100,y:210,border:true,style:{"border":"none","position":"absolute"},frame:false,id:"paletteWindow",modal:false,autoScroll:false,closable:false,scroll:false,ghost:false,floatable:true,focusOnToFront:true,draggable:false,resizable:false,items:o});
}},failure:function(){}});},showModifyOptions:function(c){metricsData="";removeMetricsData="";var h=c.up().down("radiogroup[id=modifyOptions]");var j=c.up().down("combo[id=test]");var b=c.up().down("combo[id=measure]");var n=c.up().down("textfield[id=displayName]");var m=c.up().down("button[id=add]");
var e=c.up().down("button[id=remove]");var l=c.up().down("textfield[id=panelTitle]");var a=c.up().down("combo[id=chartTimeline]");var g=c.up().down("combo[id=sessionDetailsTimeline]");var q=c.up().down("combo[id=sessionDetailsTopN]");var p=c.up().down("combo[id=userAlertsNop]");var r=c.up().down("container[id=paletteContainer]");
var o=c.getValue();var d=c.findRecord(c.valueField||c.displayField,o);var f=c.store.indexOf(d);var k=c.getStore().getAt(f).get("metricsField");if(c.getValue()=="-1"){l.setValue("");l.hide();}if(c.getValue()!="-1"&&(k=="Group_Metrics"||k=="Area_Metrics"||k=="Line_Metrics")){h.show();if(h.getValue().modifyRadio=="add"){this.loadTestsForModify(c,k,"add");
r.hide();a.hide();m.show();e.hide();l.hide();}else{if(h.getValue().modifyRadio=="update"){e.hide();m.hide();l.setValue(c.getRawValue());l.show();if(k!="Group_Metrics"){a.show();r.show();}else{a.hide();r.hide();}this.loadTestsForModify(c,k,"update");}else{r.hide();e.show();m.hide();l.setValue("");l.hide();
a.hide();this.loadTestsForModify(c,k,"delete");}}g.hide();q.hide();p.hide();}else{if(c.getValue()!="-1"){h.hide();j.hide();b.hide();n.hide();m.hide();a.hide();e.hide();l.setValue(c.getRawValue());l.show();if(k=="Bar_Metrics"){r.show();this.loadTestsForModify(c,k,"update");}else{r.hide();}if(k=="SessionDetails"){g.show();
q.show();p.hide();}else{if(k=="User_Alerts"){p.show();g.hide();q.hide();}else{g.hide();q.hide();p.hide();}}}else{h.hide();j.hide();b.hide();n.hide();m.hide();a.hide();e.hide();g.hide();q.hide();p.hide();r.hide();}}},showModifyOptions_Modify:function(q,n,k,u){metricsData="";removeMetricsData="";var h=q.up().down("radiogroup[id=modifyOptions]");
var y=q.up().down("combo[id=test]");var d=q.up().down("combo[id=measure]");var e=q.up().down("textfield[id=displayName]");var w=q.up().down("button[id=add]");var z=q.up().down("button[id=remove]");var l=q.up().down("textfield[id=panelTitle]");var m=q.up().down("combo[id=chartTimeline]");var g=q.up().down("combo[id=sessionDetailsTimeline]");
var s=q.up().down("combo[id=sessionDetailsTopN]");var p=q.up().down("combo[id=userAlertsNop]");var b=q.up().down("container[id=paletteContainer]");var j=q.up().down("combo[id=optionsCombo]");j.hide();var t=q.up().down("combo[id=panelNo]");t.setDisabled(true);if(n!=null&&n!=undefined&&!Ext.isEmpty(n)){var o=n;
}else{var o=q.getValue();}q.displayField=o;var c=q.findRecord(q.valueField||q.displayField,o);var f=q.store.indexOf(c);var x=q.getStore().getAt(f).get("metricsField");if(q.getValue()=="-1"){l.setValue("");l.hide();}if(q.getValue()!="-1"&&(x=="Group_Metrics"||x=="Area_Metrics"||x=="Line_Metrics")){h.show();
if(h.getValue().modifyRadio=="add"){this.loadTestsForModify(q,x,"add");b.hide();m.hide();w.show();z.hide();l.hide();}else{if(h.getValue().modifyRadio=="update"){z.hide();w.hide();l.setValue(q.getRawValue());l.show();if(x!="Group_Metrics"){m.show();b.show();}else{m.hide();b.hide();}this.loadTestsForModify(q,x,"update");
}else{b.hide();z.show();w.hide();l.setValue("");l.hide();m.hide();this.loadTestsForModify(q,x,"delete");}}g.hide();s.hide();p.hide();}else{if(q.getValue()!="-1"){h.hide();y.hide();d.hide();e.hide();w.hide();m.hide();z.hide();l.setValue(q.getRawValue());l.show();if(x=="Bar_Metrics"){b.show();this.loadTestsForModify(q,x,"update");
}else{b.hide();}if(x=="SessionDetails"){g.show();s.show();p.hide();}else{if(x=="User_Alerts"){p.show();g.hide();s.hide();}else{if(u=="BackendApplicationStatus"){g.hide();s.hide();p.hide();var r=Ext.getCmp("modifyOptions");r.show();var a=Ext.getCmp("suppotedCmpType");a.show();backEndMetricVal=u;if(h.getValue().modifyRadio=="update"){this.loadSuppotedCmpTypes(a,r);
}}else{g.hide();s.hide();p.hide();}}}}else{h.hide();y.hide();d.hide();e.hide();w.hide();m.hide();z.hide();g.hide();s.hide();p.hide();b.hide();}}},loadModifyOptions:function(e){var p=e.up().down("button[id=add]");var g=e.up().down("button[id=remove]");var c=e.up().down("combo[id=panelNo]");var a=e.up().down("combo[id=chartTimeline]");
var m=e.up().down("textfield[id=panelTitle]");var k=e.up().down("combo[id=test]");var b=e.up().down("combo[id=measure]");var o=e.up().down("textfield[id=displayName]");var j=e.up().down("radiogroup[id=modifyOptions]").getValue().modifyRadio;var q=c.getValue();var f=c.findRecord(c.valueField||c.displayField,q);
var h=c.store.indexOf(f);var l=c.getStore().getAt(h).get("metricsField");var r=e.up().down("container[id=paletteContainer]");var d=e.up().down("radiogroup[id=modifyOptions]");if(e.getValue().modifyRadio=="add"){m.hide();p.show();g.hide();a.hide();r.hide();}else{if(e.getValue().modifyRadio=="update"){p.hide();
g.hide();m.setValue(c.getRawValue());m.show();if(l=="Area_Metrics"||l=="Line_Metrics"){a.show();}else{a.hide();}if(l=="Area_Metrics"||l=="Line_Metrics"||l=="Bar_Metrics"){r.show();}else{r.hide();}}else{if(e.getValue().modifyRadio=="delete"){m.hide();a.hide();p.hide();g.show();r.hide();}else{m.hide();
a.hide();p.hide();g.hide();r.hide();}}}k.hide();b.hide();o.hide();if(l=="Group_Metrics"||(l=="Area_Metrics"||l=="Line_Metrics"||l=="Bar_Metrics")){this.loadTestsForModify(e,l,j);}if(l=="BackendApplicationStatus"){if(e.getValue().modifyRadio!="update"){this.loadSuppotedCmpTypes(e,d);}else{if(e.getValue().modifyRadio=="update"){var n=Ext.getCmp("suppotedCmpType");
if(!Ext.isEmpty(n)&&n!=null&&n!=undefined){n.hide();}}}}},changeGroupCombo:function(){var a=Ext.getCmp("group");var c=Ext.getCmp("ExistingNew");var d=Ext.getCmp("AddDelete")!=null?Ext.getCmp("AddDelete").getValue().Config:"add";if(!Ext.isEmpty(a)){var e=a.getValue();if(d=="add"){this.loadTestsForGroup();
Ext.getCmp("displayName").setValue("");var b=Ext.getCmp("panelTitle");b.setValue(a.getRawValue());}else{this.loadTestsForGroup();Ext.getCmp("displayName").setValue("");var b=Ext.getCmp("panelTitle");b.setValue(a.getRawValue());if(d!="delete"){b.show();}}}},loadTestsForGroup:function(){var d="/final/monitor/endUserDashboardDetailsConfigJson.jsp?";
var g=Ext.getCmp("AddDelete")!=null?Ext.getCmp("AddDelete").getValue().Config:"add";var c=d+"loadTest=true&addOrDelete="+g;var e=Ext.getCmp("metrics").getValue().metricsRadio;c=c+"&metrics="+e;c=c+"&userType="+userType+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;var f=false;if(g=="add"||g=="modify"||g=="delete"){var a=Ext.getCmp("group");
if(!Ext.isEmpty(a)){var h=a.getValue();c=c+"&group="+h;f=true;if(g=="modify"){var b=Ext.getCmp("panelTitle");if(!Ext.isEmpty(b)&&b.isVisible()){b.setValue(a.getRawValue());}}}}Ext.Ajax.request({url:c,method:"POST",scope:this,timeout:280000,success:function(k,m){var n=k.responseText;var l=Ext.decode(n);
var o=Ext.getCmp("test");if(!Ext.isEmpty(o)&&!Ext.isEmpty(l["TEST"])){o.getStore().loadRawData(l["TEST"]);o.setValue("-1");}if(!Ext.isEmpty(e)&&e=="Group_Metrics"){if(g=="add"){}else{var j=Ext.getCmp("groupname");j.hide();}}},failure:function(){}});if(g=="add"||g=="modify"){Ext.getCmp("displayName").show();
}else{Ext.getCmp("displayName").hide();}},loadTests:function(){},hideProcessCombos:function(){var a=Ext.getCmp("processName");var b=Ext.getCmp("process");if(!Ext.isEmpty(a)){a.hide();a.setValue("-1");}if(!Ext.isEmpty(b)){b.hide();b.setValue("-1");}},hideModifyingComponents:function(){var b=Ext.getCmp("modifyTestMeasure");
var c=Ext.getCmp("modifyTestCombo");var d=Ext.getCmp("modifyMeasureCombo");if(!Ext.isEmpty(b)&&b.isVisible()){b.hide();}if(!Ext.isEmpty(c)&&c.isVisible()){c.hide();c.setValue("-1");}if(!Ext.isEmpty(d)&&d.isVisible()){d.hide();d.setValue("-1");}var a=Ext.getCmp("add");if(!Ext.isEmpty(a)&&a.isVisible()){a.hide();
}},showOnlyItemSelector:function(){Ext.getCmp("metrics").hide();Ext.getCmp("test").hide();Ext.getCmp("measure").hide();Ext.getCmp("displayName").hide();Ext.getCmp("group").hide();Ext.getCmp("groupname").hide();Ext.getCmp("panelNo").hide();Ext.getCmp("panelTitle").hide();Ext.getCmp("chartTimeline").hide();
Ext.getCmp("sessionDetailsTimeline").hide();Ext.getCmp("sessionDetailsTopN").hide();Ext.getCmp("userAlertsNop").hide();Ext.getCmp("ExistingNew").hide();Ext.getCmp("ShowHidePanels").show();},loadTestsForPanel:function(){var g="/final/monitor/endUserDashboardDetailsConfigJson.jsp?";var c=Ext.getCmp("AddDelete")!=null?Ext.getCmp("AddDelete").getValue().Config:"add";
var b=g+"loadTest=true&addOrDelete="+c;var k=Ext.getCmp("metrics").getValue().metricsRadio;b=b+"&metrics="+k;b=b+"&userType="+userType+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;var f=Ext.getCmp("panelNo");var d=Ext.getCmp("panelTitle");var a=Ext.getCmp("chartTimeline");var m=Ext.getCmp("ExistingNew");
if(!Ext.isEmpty(f)&&f.isVisible()){b=b+"&panelNo="+f.getValue();if(c=="modify"||(c=="add"&&m.getValue()=="-1")){if(m.isVisible()&&m.getValue()=="-1"){d.setValue("");}else{d.setValue(f.getRawValue());}d.show();if(c=="add"&&m.getValue()=="-1"&&(k=="Area_Metrics"||k=="Line_Metrics")){a.show();a.setValue("1 hour");
}else{if(c=="modify"&&f.getValue()!="-1"&&(k=="Area_Metrics"||k=="Line_Metrics")){a.show();}else{a.hide();}}if(c=="modify"){if(!Ext.isEmpty(f)&&!Ext.isEmpty(f.getValue())&&f.getValue()!=""){var l=f.getValue();var e=f.findRecord(f.valueField||f.displayField,l);var h=f.store.indexOf(e);var j=f.getStore().getAt(h).get("metricsField");
if(!Ext.isEmpty(j)&&j!=""){if(j=="User_Alerts"){Ext.getCmp("userAlertsNop").show();Ext.getCmp("sessionDetailsTimeline").hide();Ext.getCmp("sessionDetailsTopN").hide();}else{if(j=="SessionDetails"){Ext.getCmp("sessionDetailsTimeline").show();Ext.getCmp("sessionDetailsTopN").show();Ext.getCmp("userAlertsNop").hide();
}else{Ext.getCmp("userAlertsNop").hide();Ext.getCmp("sessionDetailsTimeline").hide();Ext.getCmp("sessionDetailsTopN").hide();}}}else{Ext.getCmp("userAlertsNop").hide();Ext.getCmp("sessionDetailsTimeline").hide();Ext.getCmp("sessionDetailsTopN").hide();}}}}else{d.hide();a.hide();}}var c=Ext.getCmp("AddDelete");
if(!Ext.isEmpty(c)&&c.getValue().Config!="add"){Ext.Ajax.request({url:b,method:"POST",scope:this,timeout:280000,success:function(n,p){var q=n.responseText;var o=Ext.decode(q);var r=Ext.getCmp("test");if(!Ext.isEmpty(r)&&!Ext.isEmpty(o["TEST"])){r.getStore().loadRawData(o["TEST"]);r.setValue("-1");}else{r.getStore().loadRawData("");
}if(!Ext.isEmpty(o["TIMELINE"])){a.setValue(o["TIMELINE"]);}},failure:function(){}});}},loadMetrics:function(){var a=Ext.getCmp("metrics");a.add({boxLabel:"Data",checked:true,name:"metricsRadio",id:"metricsRadio_Group_Metrics",inputValue:"Group_Metrics",width:65},{boxLabel:"Area",name:"metricsRadio",id:"metricsRadio_Area_Metrics",inputValue:"Area_Metrics",width:70},{boxLabel:"Line",name:"metricsRadio",id:"metricsRadio_Line_Metrics",inputValue:"Line_Metrics",width:60},{boxLabel:"Bar",name:"metricsRadio",id:"metricsRadio_Bar_Metrics",inputValue:"Bar_Metrics",width:60},{boxLabel:"Others",name:"metricsRadio",id:"metricsRadio_Other_Metrics",inputValue:"Other_Metrics",width:60,hidden:true});
a.show();this.loadTests();},loadMeasureForTest:function(g){var d=g.up().down("combo[id=optionsCombo]").getValue();var m=g.up().down("radiogroup[id=metrics]").getValue().metricsRadio;if(Ext.isEmpty(m)||m==null||m==undefined){if(!Ext.isEmpty(chartTypeStore)&&chartTypeStore!=null&&chartTypeStore!=undefined){m=chartTypeStore;
}}var l=g.up().down("combo[id=test]").getValue();var f=g.up().down("combo[id=processName]");var c=g.up().down("combo[id=process]");var b=g.up().down("combo[id=panelNo]");f.hide();c.hide();if(d!="add"){var n=b.getValue();var h=b.findRecord(b.valueField||b.displayField,n);var k=b.store.indexOf(h);m=b.getStore().getAt(k).get("metricsField");
}var j="/final/monitor/endUserDashboardDetailsConfigJson.jsp?";var a=j+"addOrDelete="+d;a=a+"&metrics="+m;a=a+"&userType="+userType;a+="&loadMeasure=true&test="+l+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;if(d!="add"){var o=g.up().down("radiogroup[id=modifyOptions]").getValue().modifyRadio;
a+="&action="+o;}if(d!="add"){a=a+"&panelNo="+b.getValue();}if(m=="BackendApplicationStatus"){var e=Ext.getCmp("suppotedCmpType");a=a+"&enduserBackendPanel=BackendAppStatus&loadData=loadMeasureTrue&suppotedCmpType="+e.getValue();}Ext.Ajax.request({url:a,method:"POST",scope:this,timeout:280000,success:function(p,r){var s=p.responseText;
var q=Ext.decode(s);var t=g.up().down("combo[id=measure]");t.getStore().loadRawData(q["MEASURE"]);t.setValue(q["MEASURE"][0]["valueField"]);t.show();},failure:function(){}});},loadTestsForModifying:function(){var d=Ext.getCmp("AddDelete").getValue().Config;var e=Ext.getCmp("test").getValue();var b="/final/monitor/endUserDashboardDetailsConfigJson.jsp?";
var a=b+"modifyTest=true&addOrDelete="+d+"&test="+e;var c=Ext.getCmp("metrics").getValue().metricsRadio;a=a+"&metrics="+c;a=a+"&userType="+userType+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;Ext.Ajax.request({url:a,method:"POST",scope:this,timeout:280000,success:function(f,j){var k=f.responseText;
var h=Ext.decode(k);var g=Ext.getCmp("modifyTestCombo");g.getStore().loadRawData(h["MODIFIED_TEST"]);g.setValue("-1");g.show();},failure:function(){}});},loadMeasureDisplay:function(f){var e=f.up().down("combo[id=optionsCombo]").getValue();var l=f.up().down("radiogroup[id=metrics]").getValue().metricsRadio;
if(Ext.isEmpty(l)||l==null||l==undefined){l=chartTypeStore;}if(Ext.isEmpty(l)){l=backEndMetricVal;}var m=f.up().down("textfield[id=displayName]");var o=f.up().down("radiogroup[id=modifyOptions]").getValue().modifyRadio;var d=f.up().down("combo[id=panelNo]");if(e!="add"){var n=d.getValue();var g=d.findRecord(d.valueField||d.displayField,n);
var j=d.store.indexOf(g);l=d.getStore().getAt(j).get("metricsField");}if((e=="add"||e=="modify")&&l=="Bar_Metrics"){var k=f.up().down("combo[id=test]").getValue();var c=f.up().down("combo[id=measure]").getValue();var h="/final/monitor/endUserDashboardDetailsConfigJson.jsp?";var b=h+"loadBarDDColumns=true&test="+k+"&measure="+c+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;
Ext.Ajax.request({url:b,method:"POST",scope:this,timeout:280000,success:function(q,t){var u=q.responseText;var r=Ext.decode(u);var s=f.up().down("combo[id=processName]");s.getStore().loadRawData(r["DD_COLUMNS"]);s.setValue("-1");s.show();},failure:function(){}});}if(e=="modify"&&o=="update"&&l=="BackendApplicationStatus"){var k=f.up().down("combo[id=test]").getValue();
var c=f.up().down("combo[id=measure]").getValue();var a=Ext.getCmp("suppotedCmpType").getValue();var p="/final/monitor/endUserDashboardDetailsConfigJson.jsp?loadData=loadmeasureDispName&enduserBackendPanel=BackendAppStatus&test="+k+"&measure="+c+"&userType="+userType+"&suppotedCmpType="+a+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;
Ext.Ajax.request({url:p,method:"POST",scope:this,timeout:280000,success:function(q,s){var t=q.responseText;var r=Ext.decode(t);m.setValue(r["usrTypeMeasureDisp"]);m.show();},failure:function(){}});}if(e=="add"&&l!="Bar_Metrics"){m.setValue(f.getRawValue());m.show();}else{if(e=="modify"&&(o=="add"||o=="update")&&(l=="Group_Metrics"||l=="Area_Metrics"||l=="Line_Metrics")){m.setValue(f.getRawValue());
m.show();}else{if(l=="BackendApplicationStatus"&&o=="add"){m.setValue(f.getRawValue());m.show();}else{m.setValue("");m.hide();}}}},loadMeasureDisplay_AddPanel:function(e,k){var d=e.up().down("combo[id=optionsCombo]").getValue();var l=k;var m=e.up().down("textfield[id=displayName]");var o=e.up().down("radiogroup[id=modifyOptions]").getValue().modifyRadio;
var c=e.up().down("combo[id=panelNo]");if(d!="add"){var n=c.getValue();var f=c.findRecord(c.valueField||c.displayField,n);var h=c.store.indexOf(f);l=c.getStore().getAt(h).get("metricsField");}if(d=="add"&&l=="Bar_Metrics"){var j=e.up().down("combo[id=test]").getValue();var b=e.up().down("combo[id=measure]").getValue();
var g="/final/monitor/endUserDashboardDetailsConfigJson.jsp?";var a=g+"loadBarDDColumns=true&test="+j+"&measure="+b+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;Ext.Ajax.request({url:a,method:"POST",scope:this,timeout:280000,success:function(p,s){var t=p.responseText;var q=Ext.decode(t);
var r=e.up().down("combo[id=processName]");r.getStore().loadRawData(q["DD_COLUMNS"]);r.setValue("-1");r.show();},failure:function(){}});}if(d=="add"&&l!="Bar_Metrics"){m.setValue(e.getRawValue());m.show();}else{if(d=="modify"&&(o=="add"||o=="update")&&(l=="Group_Metrics"||l=="Area_Metrics"||l=="Line_Metrics")){m.setValue(e.getRawValue());
m.show();}else{m.setValue("");m.hide();}}},loadProcessComboData:function(f){var g=f.up().down("combo[id=test]").getValue();var c=f.up().down("combo[id=measure]").getValue();var d=f.up().down("combo[id=processName]");var e=f.up().down("combo[id=process]");e.hide();var b="/final/monitor/endUserDashboardDetailsConfigJson.jsp?";
var a=b+"loadBarDDColumns=true&test="+g+"&measure="+c;a+="&processName="+d.getValue()+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;Ext.Ajax.request({url:a,method:"POST",scope:this,timeout:280000,success:function(h,k){var l=h.responseText;var j=Ext.decode(l);e.getStore().loadRawData(j["DD_COLUMNS"]);
e.setValue("-1");e.show();},failure:function(){}});},resetTestMeasure:function(c){var b=[{displayField:"Please choose a test",valueField:"-1"}];var d=c.up().down("combo[id=test]");d.getStore().loadRawData(b);d.setValue("-1");var f=[{displayField:"Please choose a measure",valueField:"-1"}];var e=c.up().down("combo[id=measure]");
e.getStore().loadRawData(f);e.setValue("-1");var a=c.up().down("textfield[id=displayName]").setValue("");},checkSpecialCharacter:function(a){var c='~`!@^&*;<>.?|#&+:,$="';for(var b=0;b<a.length;b++){check_char=c.indexOf(a.charAt(b));if(check_char>=0){return true;}}return false;},updateConfiguration:function(d){var Z=this;
var o=d.up().up();var r=o.down("combo[id=optionsCombo]").getValue();var Q=o.down("radiogroup[id=metrics]").getValue().metricsRadio;if(Ext.isEmpty(Q)||Q==null||Q==undefined){if(chartTypeStore!=null&&!Ext.isEmpty(chartTypeStore)&&chartTypeStore!=undefined){Q=chartTypeStore;}}var E=o.down("textfield[id=panelTitle]");
var D=o.down("combo[id=chartTimeline]");var j=o.down("combo[id=test]");var l=o.down("combo[id=measure]");var H=o.down("textfield[id=displayName]");var X=o.down("combo[id=processName]");var Y=o.down("combo[id=process]");var F=o.down("combo[id=panelNo]");var C=o.down("radiogroup[id=modifyOptions]");var e=o.down("itemselector[id=showHidePanels]");
var G=o.down("multiselect[id=deleteCustomPanels]");var s=o.down("combo[id=sessionDetailsTimeline]");var aa=o.down("combo[id=sessionDetailsTopN]");var b=o.down("combo[id=userAlertsNop]");var L=o.down("container[id=paletteContainer]");var m=o.down("displayfield[id=colorPalette]");var z=Ext.getCmp("suppotedCmpType");
var J=true;if(r=="-1"){Ext.Msg.alert("Error","Please choose an option");J=false;}if(r=="modify"){var P=F.getValue();var N=F.findRecord(F.valueField||F.displayField,P);var K=F.store.indexOf(N);Q=F.getStore().getAt(K).get("metricsField");}if(J&&r=="add"){if(Ext.isEmpty(Q)){Ext.Msg.alert("Error","Please select the Panel Type");
J=false;}else{if(E.getValue()==""){Ext.Msg.alert("Error","Please enter the Panel Title");J=false;}else{if(Q!="Group_Metrics"&&m.getValue().indexOf("Please select a palette")>-1){Ext.Msg.alert("Error","Please select a Colour Palette");J=false;}else{if(metricsData.length==0&&j.getValue()=="-1"){Ext.Msg.alert("Error","Please choose the test");
J=false;}else{if(metricsData.length==0&&l.getValue()=="-1"){Ext.Msg.alert("Error","Please choose the measure");J=false;}else{if(Q!="Bar_Metrics"&&metricsData.length==0&&H.getValue()=="-1"){Ext.Msg.alert("Error","Please enter the display name");J=false;}else{if(Q=="Bar_Metrics"&&X.getValue()=="-1"){Ext.Msg.alert("Error","Please choose the process name");
J=false;}else{if(Q=="Bar_Metrics"&&Y.getValue()=="-1"){Ext.Msg.alert("Error","Please choose the process");J=false;}else{if(metricsData.length==0&&Q=="BackendApplicationStatus"&&z.getValue()=="-1"){Ext.Msg.alert("Error","Please choose the Component Type");J=false;}}}}}}}}}}if(J&&r=="modify"){if(F.getValue()==-1){Ext.Msg.alert("Error","Please choose the Panel");
J=false;}else{if(Q!="Group_Metrics"&&Q!="Area_Metrics"&&Q!="Line_Metrics"&&E.getValue()==""){Ext.Msg.alert("Error","Please enter the Panel Title");J=false;}else{if(C.isVisible()){if(C.getValue().modifyRadio=="update"&&E.getValue()==""){Ext.Msg.alert("Error","Please enter the Panel Title");J=false;}else{if(removeMetricsData.length==0&&E.getValue()==""&&j.getValue()=="-1"){Ext.Msg.alert("Error","Please choose the test");
J=false;}else{if(removeMetricsData.length==0&&E.getValue()!=""&&(C.getValue().modifyRadio=="add"||C.getValue().modifyRadio=="delete")&&j.getValue()=="-1"){Ext.MessageBox.confirm("ALERT","Are you sure want to exit the settings?",function(p){if(p==="yes"){updateMetricsData();}else{J=false;}});return false;
}else{if(removeMetricsData.length==0&&j.getValue()!="-1"&&l.isVisible()&&l.getValue()=="-1"){Ext.Msg.alert("Error","Please choose the measure");J=false;}else{if(C.getValue().modifyRadio=="add"&&removeMetricsData.length==0&&j.getValue()!="-1"&&l.getValue()!="-1"&&H.getValue()==""){Ext.Msg.alert("Error","Please enter the display name");
J=false;}}}}}}}}}if(J&&r=="delete"){if(Ext.isEmpty(G.getValue())){Ext.Msg.alert("Error","Please select atleast one item");J=false;}}if(Q=="BackendApplicationStatus"&&C.getValue().modifyRadio=="modify"&&r=="modify"){r="modify";}else{if(Q=="BackendApplicationStatus"&&C.getValue().modifyRadio=="delete"&&r=="modify"){r="delete";
}else{if(Q=="BackendApplicationStatus"&&C.getValue().modifyRadio=="add"&&r=="modify"){r="add";}}}if(J){var W=E.getValue();if(!Ext.isEmpty(W)&&W!=undefined&&this.checkSpecialCharacter(W)){Ext.Msg.show({title:"Alert",msg:tipSpe,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});J=false;return false;}W=H.getValue();
if(!Ext.isEmpty(W)&&W!=undefined&&this.checkSpecialCharacter(W)){Ext.Msg.show({title:"Alert",msg:tipSpe,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});J=false;return false;}if(!Ext.isEmpty(metricsData)&&metricsData.length>0){if(j.getValue()!="-1"&&l.getValue()!="-1"&&H.getValue()!=""){var x="";if(Q=="Group_Metrics"){x+=",";
}else{x+="|hash|";}x+=j.getValue();x+=":";x+=l.getValue();x+=":";x+=H.getValue();metricsData+=x;}var f="/final/monitor/endUserDashboardDetailsConfigJson.jsp?isUpdate=true&&isMulti=true&metrics="+Q+"&addOrDelete="+r+"&userType="+userType+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;f=f+"&wholeValue="+encodeURI(metricsData);
f+="&panelTitle="+encodeURI(parent.filterEncode(E.getValue()));if(!Ext.isEmpty(D)&&D.isVisible()){f=f+"&chartTimeline="+D.getValue();}if(!Ext.isEmpty(F)&&F.isVisible()){f=f+"&panelNo="+F.getValue();}if(!Ext.isEmpty(F)&&F.isVisible()){f=f+"&panelNo="+F.getValue();}if(!Ext.isEmpty(C)&&C.isVisible()){f=f+"&action="+C.getValue().modifyRadio;
}if(L.isVisible()){f=f+"&colorPalette="+m.getValue();}if(z.getValue()!=null&&!Ext.isEmpty(z.getValue())){f=f+"&suppotedCmpType="+z.getValue();}Ext.Ajax.request({url:f,method:"POST",scope:this,timeout:280000,success:function(p,ad){var ae=p.responseText;var v=Ext.decode(ae);if(v["UPDATE"]=="FAILED"){Ext.Msg.alert("Error",UpdateError);
}if(v["UPDATE"]=="SUCCESS"){this.hideConfigWindow();refreshAfterUpdate();}},failure:function(){}});}else{if(!Ext.isEmpty(removeMetricsData)&&removeMetricsData.length>0){if(j.getValue()!="-1"&&l.getValue()!="-1"){var x="";if(Q=="Group_Metrics"){x+=",";}else{x+="|hash|";}x+=j.getValue();x+=":";x+=l.getValue();
removeMetricsData+=x;}var f="/final/monitor/endUserDashboardDetailsConfigJson.jsp?isUpdate=true&&isMulti=true&metrics="+Q+"&addOrDelete="+r+"&userType="+userType+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;f=f+"&removeWholeValue="+encodeURI(removeMetricsData);if(!Ext.isEmpty(F)&&F.isVisible()){f=f+"&panelNo="+F.getValue();
}if(z.getValue()!=null&&!Ext.isEmpty(z.getValue())){f=f+"&suppotedCmpType="+z.getValue();}var U=j.getValue();var y=l.getValue();try{var g=Ext.getCmp("test");var h=Ext.getCmp("measure");if(!Ext.isEmpty(g.getValue())){U=g.getValue();}if(!Ext.isEmpty(h.getValue())){y=h.getValue();}}catch(ac){}f+="&test="+U;
f+="&measure="+y;f+="&displayName="+encodeURI(H.getValue());if(!Ext.isEmpty(C)&&C.isVisible()){f=f+"&action="+C.getValue().modifyRadio;}Ext.Ajax.request({url:f,method:"POST",scope:this,timeout:280000,success:function(p,ad){var ae=p.responseText;var v=Ext.decode(ae);if(v["UPDATE"]=="FAILED"){Ext.Msg.alert("Error",UpdateError);
}if(v["UPDATE"]=="SUCCESS"){this.hideConfigWindow();refreshAfterUpdate();}},failure:function(){}});}else{var f="/final/monitor/endUserDashboardDetailsConfigJson.jsp?isUpdate=true&addOrDelete="+r+"&userType="+userType+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;if(r=="add"){f+="&metrics="+Q;
if(E.isVisible()){f+="&panelTitle="+encodeURI(parent.filterEncode(E.getValue()));}f+="&test="+j.getValue();f+="&measure="+l.getValue();if(Q!="Bar_Metrics"&&H.isVisible()){f+="&displayName="+encodeURI(H.getValue());}else{if(X.isVisible()&&Y.isVisible()){f+="&processName="+X.getValue()+"&process="+Y.getValue();
}}if((Q=="Area_Metrics"||Q=="Line_Metrics")&&D.isVisible()){f+="&chartTimeline="+D.getValue();}if((Q=="Area_Metrics"||Q=="Line_Metrics"||Q=="Bar_Metrics")&&m.isVisible()){if(L.isVisible()){f=f+"&colorPalette="+m.getValue();}}if(z.getValue()!=null&&!Ext.isEmpty(z.getValue())){f=f+"&suppotedCmpType="+z.getValue();
f=f+"&removeWholeValue="+encodeURI(removeMetricsData);}}else{if(r=="modify"){f+="&metrics="+Q;f+="&panelNo="+F.getValue();if(E.isVisible()){f+="&panelTitle="+encodeURI(parent.filterEncode(E.getValue()));}if(z.getValue()!=null&&!Ext.isEmpty(z.getValue())){f=f+"&suppotedCmpType="+z.getValue();}var U=j.getValue();
var y=l.getValue();try{var g=Ext.getCmp("test");var h=Ext.getCmp("measure");if(!Ext.isEmpty(g.getValue())){U=g.getValue();}if(!Ext.isEmpty(h.getValue())){y=h.getValue();}}catch(ac){}f+="&test="+U;f+="&measure="+y;f+="&displayName="+encodeURI(H.getValue());if(Q=="Group_Metrics"||Q=="Area_Metrics"||Q=="Line_Metrics"||Q=="Bar_Metrics"){if(Q!="Bar_Metrics"&&H.isVisible()){f+="&displayName="+encodeURI(H.getValue());
}else{if(X.isVisible()&&Y.isVisible()){f+="&processName="+X.getValue()+"&process="+Y.getValue();}}if((Q=="Area_Metrics"||Q=="Line_Metrics")&&D.isVisible()){f+="&chartTimeline="+D.getValue();}if((Q=="Area_Metrics"||Q=="Line_Metrics"||Q=="Bar_Metrics")&&m.isVisible()){if(L.isVisible()){f=f+"&colorPalette="+m.getValue();
}}if(!Ext.isEmpty(C)&&C.isVisible()){f=f+"&action="+C.getValue().modifyRadio;}if(!Ext.isEmpty(C)&&C.isVisible()&&C.getValue().modifyRadio=="delete"){f=f+"&isMulti=true&removeWholeValue="+encodeURI(j.getValue()+":"+l.getValue());}}else{if(!Ext.isEmpty(s)&&s.isVisible()){f+="&sessionDetailsTimeline="+s.getValue();
}if(!Ext.isEmpty(aa)&&aa.isVisible()){f+="&sessionDetailsTopN="+aa.getValue();}if(!Ext.isEmpty(b)&&b.isVisible()){f+="&userAlertsNop="+b.getValue();}}}else{if(r=="delete"){var ab=G.getValue();var a="";if(!Ext.isEmpty(ab)&&ab.length>0){for(i=0;i<ab.length;i++){if(i!=0){a+=",";}a+=ab[i];}}f=f+"&deleteCustomPanels="+a;
if(Q=="BackendApplicationStatus"){f+="&test="+j.getValue();f+="&measure="+l.getValue();f+="&displayName="+encodeURI(H.getValue());f+="&metrics="+Q;if(z.getValue()!=null&&!Ext.isEmpty(z.getValue())){f=f+"&suppotedCmpType="+z.getValue();}f=f+"&removeWholeValue="+encodeURI(removeMetricsData);}}else{var ab=e.getValue();
var a="";if(!Ext.isEmpty(ab)&&ab.length>0){for(i=0;i<ab.length;i++){if(i!=0){a+=",";}a+=ab[i];}}f=f+"&disabledDefaultPanels="+a;if(hidePanelLog!=null&&hidePanelLog!=undefined&&hidePanelLog.length>0){var R="";for(var T=0;T<hidePanelLog.length;T++){R=R+hidePanelLog[T];if(T+1!=hidePanelLog.length){R=R+",";
}}f=f+"&hidePanelLog="+encodeURI(parent.filterEncode(R));}if(showPanelLog!=null&&showPanelLog!=undefined&&showPanelLog.length>0){var u="";for(var T=0;T<showPanelLog.length;T++){u=u+showPanelLog[T];if(T+1!=showPanelLog.length){u=u+",";}}f=f+"&showPanelLog="+encodeURI(parent.filterEncode(u));}}}}if(r=="add"){var n=$(".gridster > ul.gridsterul"),S=n.gridster().data("gridster");
S.add_widget('<li tabindex="-1" class="gs_w" id="vijay" widgetname="vijay"/>',5,2,"","");var A=S.serialize();var B=A[V];var q="";for(var V in A){var B=A[V];var k=B["id"];if(k!=null&&k!=undefined&&k=="vijay"){var t=B["col"];var I=B["row"];var O=B["size_x"];var M=B["size_y"];var w=B["widthVal"];var c=B["heightVal"];
f=f+"&addPropsPos="+t+","+I+","+O+","+M;break;}}}Ext.Ajax.request({url:f,method:"POST",scope:this,timeout:280000,success:function(p,ad){var ae=p.responseText;var v=Ext.decode(ae);if((v["UPDATE"]=="FAILED")&&Ext.isEmpty(v.groupPanelTitle)){Ext.Msg.alert("Error",UpdateError);}else{if((v["UPDATE"]=="FAILED")&&!Ext.isEmpty(v.groupPanelTitle)){Ext.Msg.alert("Error",v.groupPanelTitle);
}}if(v["UPDATE"]=="SUCCESS"){this.hideConfigWindow();refreshAfterUpdate();}},failure:function(){}});}}}},appendMetrics:function(j){var n=j.up().up();var l=n.down("combo[id=optionsCombo]").getValue();var p=n.down("radiogroup[id=metrics]").getValue().metricsRadio;var e=n.down("textfield[id=panelTitle]");
var f=n.down("combo[id=chartTimeline]");var r=n.down("combo[id=test]");var b=n.down("combo[id=measure]");var c=n.down("textfield[id=displayName]");var g=n.down("combo[id=panelNo]");var m=Ext.getCmp("suppotedCmpType");var s=true;if(l=="add"||l=="modify"){if(e.getValue()==""){Ext.Msg.alert("Error","Please enter the Panel Title");
s=false;}else{if(r.getValue()=="-1"){Ext.Msg.alert("Error","Please choose the test");s=false;}else{if(b.getValue()=="-1"){Ext.Msg.alert("Error","Please choose the measure");s=false;}else{if(p!="Bar_Metrics"&&c.getValue()=="-1"){Ext.Msg.alert("Error","Please enter the display name");s=false;}else{if(p=="BackendApplicationStatus"&&m.getValue()=="-1"){Ext.Msg.alert("Error","Please choose the component type");
s=false;}else{if(p=="BackendApplicationStatus"&&r.getValue()=="-1"){Ext.Msg.alert("Error","Please choose the test");s=false;}else{if(p=="BackendApplicationStatus"&&b.getValue()=="-1"){Ext.Msg.alert("Error","Please choose the measure");s=false;}}}}}}}}if(s){if(l!="add"){var h=g.getValue();var a=g.findRecord(g.valueField||g.displayField,h);
var d=g.store.indexOf(a);p=g.getStore().getAt(d).get("metricsField");}var o=r.getValue()+":"+b.getValue()+":"+c.getValue();var q=c.getValue();var k="";if(p=="Group_Metrics"){if(!Ext.isEmpty(metricsData)){if(metricsData.indexOf(r.getValue()+":"+b.getValue())>-1){k="";}else{k=","+o;}}else{k=o;}}else{if(p=="BackendApplicationStatus"){k=o;
}else{if(!Ext.isEmpty(metricsData)){if(metricsData.indexOf(r.getValue()+":"+b.getValue())>-1){k="";}else{k="|hash|"+o;}}else{k=o;}}}if(!Ext.isEmpty(metricsData)&&metricsData.length>0){metricsData+="|hash|"+k;}else{metricsData+=k;}r.setValue("-1");b.setValue("-1");c.setValue("");if(metricsData!=null&&metricsData!=""){Ext.Msg.alert("ALERT","Settings added successfully -> "+q);
}}},appendRemoveMetrics:function(r){var w=r.up().up();var t=w.down("combo[id=optionsCombo]").getValue();var y=w.down("radiogroup[id=metrics]").getValue().metricsRadio;var m=w.down("textfield[id=panelTitle]");var n=w.down("combo[id=chartTimeline]");var B=w.down("combo[id=test]");var e=w.down("combo[id=measure]");
var g=w.down("textfield[id=displayName]");var p=w.down("combo[id=panelNo]");var u=Ext.getCmp("suppotedCmpType");var C=true;if(t=="modify"){if(B.getValue()=="-1"){Ext.Msg.alert("Error","Please choose the test");C=false;}else{if(e.getValue()=="-1"){Ext.Msg.alert("Error","Please choose the measure");C=false;
}else{if(y=="BackendApplicationStatus"&&u.getValue()=="-1"){Ext.Msg.alert("Error","Please choose the component type");C=false;}else{if(y=="BackendApplicationStatus"&&B.getValue()=="-1"){Ext.Msg.alert("Error","Please choose the test");C=false;}else{if(y=="BackendApplicationStatus"&&e.getValue()=="-1"){Ext.Msg.alert("Error","Please choose the measure");
C=false;}}}}}}if(C){var q=p.getValue();var d=p.findRecord(p.valueField||p.displayField,q);var k=p.store.indexOf(d);y=p.getStore().getAt(k).get("metricsField");var x=B.getValue()+":"+e.getValue();var a=B.getValue();var l=B.getStore();var h="";var o="";for(var A=0;A<l.getCount();A++){var f=l.getAt(A).data.valueField;
if(f==a){h=l.getAt(A).data.displayField;}}var E=e.getValue();var b=e.getStore();for(var z=0;z<b.getCount();z++){var D=b.getAt(z).data.valueField;if(D==E){o=b.getAt(z).data.displayField;}}var c=h+":"+o;var s="";if(y=="Group_Metrics"){if(!Ext.isEmpty(removeMetricsData)){if(removeMetricsData.indexOf(B.getValue()+":"+e.getValue())>-1){s="";
}else{s=","+x;}}else{s=x;}}else{if(y=="BackendApplicationStatus"){s=x;}else{if(!Ext.isEmpty(removeMetricsData)){if(removeMetricsData.indexOf(B.getValue()+":"+e.getValue())>-1){s="";}else{s="|hash|"+x;}}else{s=x;}}}if(!Ext.isEmpty(removeMetricsData)&&removeMetricsData.length>0){removeMetricsData+="|hash|"+s;
}else{removeMetricsData+=s;}B.setValue("-1");e.setValue("-1");if(removeMetricsData!=null&&removeMetricsData!=""){Ext.Msg.alert("ALERT","Removed successfully ->"+c);}}},loadComponentInTheApp:function(){var a=Ext.getCmp("userCombo").getValue();window.location.href=encodeURI("/final/monitor/endUserDashboardDetailsData.jsp"+a);
},loadUserCombo:function(){if(showBackBtn=="false"||showBackBtn==false){Ext.getCmp("backbtn").hide();}if(isHistory!=""&&isHistory=="true"){Ext.getCmp("searchString").hide();Ext.getCmp("publishDashboard_icon").hide();Ext.getCmp("AddPanelbtn").hide();Ext.getCmp("ShowHideBtn").hide();}if(!showUserCombo){var a=Ext.getCmp("userCombo");
if(!Ext.isEmpty(a)&&!Ext.isEmpty(requestParams.userCombo)){a.show();a.getStore().loadRawData(requestParams.userCombo[0].value);a.setValue(requestParams.userCombo[0].selected);}else{if(!Ext.isEmpty(a)){a.hide();}}}},loadUserComponentInTheApp:function(){var a=Ext.getCmp("userCompsCombo").getValue();window.location.href=encodeURI("/final/monitor/endUserDashboardDetailsData.jsp"+a);
},loadUserCompsCombo:function(){if(showBackBtn=="false"||showBackBtn==false){Ext.getCmp("backbtn").hide();}if(isHistory!=""&&isHistory=="true"){Ext.getCmp("searchString").hide();Ext.getCmp("publishDashboard_icon").hide();Ext.getCmp("AddPanelbtn").hide();Ext.getCmp("ShowHideBtn").hide();}if(!showUserCompsCombo){var a=Ext.getCmp("userCompsCombo");
if(!Ext.isEmpty(a)&&!Ext.isEmpty(requestParams.userCompsCombo)){a.show();a.getStore().loadRawData(requestParams.userCompsCombo[0].value);a.setValue(requestParams.userCompsCombo[0].selected);}else{if(!Ext.isEmpty(a)){a.hide();}}}},hideConfigWindow:function(){Ext.get("configMod").animate({duration:500,to:{y:-400}});
},updateSessionDetails:function(b,e){var a=Ext.getCmp(e);if(!Ext.isEmpty(b)&&b["Data"]!="NO_DATA"){var c=b["Timeline"];var d=b["Data"];d='<div class="x-table" style="box-shadow: 5px 5px 5px #ccc;"><table cellspacing="0" cellpadding="0" width="auto" class="x-grid-table x-grid-table-resizer" height="auto"><thead><tr class="x-grid-row  x-grid-row-column"><td class="x-grid-cell" style="width:40%;border-top:0px !important;"><div class="x-grid-cell-inner">Server</div></td><td class="x-grid-cell" style="border-top:0px !important;"><div class="x-grid-cell-inner">Last Accessed Time</div></td><td class="x-grid-cell" style="width:70px;border-top:0px !important;border-right:0px !important;"><div class="x-grid-cell-inner">&nbsp;</div></td></tr></thead><tbody><tr class="x-grid-row"><td class="x-grid-cell"><div class="x-grid-cell-inner">07/10/2014 11:02:01</div></td><td class="x-grid-cell"><div class="x-grid-cell-inner">CITRIXXENAPP_180_SV</div></td><td class="x-grid-cell"><div class = "x-grid-cell-inner"><img src="/final/images/spacer.gif" class="iconLineChart" style="cursor:pointer" hspace="3px" onClick="javascript:loadPopup("");" data-qtip="Graph" data-qclass="yellowTip"/><img src="/final/images/spacer.gif" class="iconDiagnosis"  hspace="3px" onClick="javascript:loadPopup("");" style="cursor:pointer" data-qtip="Diagnosis" data-qclass="yellowTip"/></div></td></tr><tr class="x-grid-row"><td class="x-grid-cell"><div class="x-grid-cell-inner">07/10/2014 11:02:01</div></td><td class="x-grid-cell"><div class="x-grid-cell-inner">CITRIXXENAPP_130_SV</div></td><td class="x-grid-cell"><div class = "x-grid-cell-inner"><img src="/final/images/spacer.gif" class="iconLineChart" style="cursor:pointer" hspace="3px" onClick="javascript:loadPopup("");" data-qtip="Graph" data-qclass="yellowTip"/><img src="/final/images/spacer.gif" class="iconDiagnosis"  hspace="3px" onClick="javascript:loadPopup("");" style="cursor:pointer" data-qtip="Diagnosis" data-qclass="yellowTip"/></div></td></tr></tbody></table></div>';
a.down("displayfield[id=sessionDetailsTimeline]").setValue(c);a.update(d);}else{a.update('<table width="100%" height="100%" style="margin:20% 0 auto 0"><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}},updateLoginDetails:function(c,e){var a=Ext.getCmp(e);if(c!="NO_DATA"){a.add({rowspan:2,margin:"0 10 0 10",html:'<div class="uxLoggedIn" style="margin-bottom:60px"></div>'});for(var b in c){var d=c[b];a.add({xtype:"displayfield",fieldBodyCls:"uxGraphLabel",margin:10,labelSeparator:"",fieldCls:"uxGraphValue_WHITE",labelAlign:"top",fieldLabel:b,value:d});
}}else{a.update('<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");}},loadPanels:function(){var o=this;var f=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});
f.show();for(var h=0;h<panelOrder.length;h++){var g=panelOrder[h].PanelId;var j=g+"_container";var m=panelOrder[h].Metrics;var l=panelOrder[h].Props;var n=panelOrder[h].ToolIcon;var d=panelOrder[h].ToolIconText;var a=panelOrder[h].ToolIconId;if(n==null||n==undefined||n=="undefined"){n="iconClose3";d="Remove Panel";
a="closeWinId";}var p=false;var e=false;var c=false;if(m.indexOf("Area_Metrics")>-1||m.indexOf("Line_Metrics")>-1||m.indexOf("Bar_Metrics")>-1||m.indexOf("Pie_Metrics")>-1){p=true;if(m.indexOf("Bar_Metrics")>-1){e=true;}else{if(m.indexOf("Pie_Metrics")>-1){c=true;}}}var b="/final/servlet/com.eg.EgMonitorResultDispatcher";
if(!Ext.isEmpty(b)){Ext.Ajax.request({url:b,scope:this,method:"POST",timeout:280000,params:parameters+"&panelId="+g+"&panelMetrics="+encodeURIComponent(m)+"&resultpage=globalsearch&isEndUserDashboard=true",panelId:g,containerId:j,panelMetrics:m,isGraph:p,isBarGraph:e,isPieGraph:c,panelProps:l,panelToolIcon:n,panelToolIconText:d,panelToolIconId:a,success:function(r){if(r.status==200&&!Ext.isEmpty(r.responseText)){var A=r.request.options.panelId;
var G=r.request.options.panelMetrics;var v=r.request.options.panelProps.split(",");var x=r.request.options.url;var N=r.request.options.params;var F=r.request.options.containerId;var z=r.request.options.panelToolIcon;var C=r.request.options.panelToolIconText;var E=r.request.options.panelToolIconId;var s=parseInt(v[0]);
var t=parseInt(v[1]);var I=parseInt(v[2]);var H=parseInt(v[3]);var P=true;var L=true;var D=false;var q=true;if(hideConfigFlag||isModifyEnable){P=false;L=false;q=false;D=true;}if(D){Ext.getCmp("AddPanelbtn").hide();Ext.getCmp("ShowHideBtn").hide();}var K=Ext.widget("window",{id:r.request.options.panelId,url:x,params:N,title:Q,cls:"uxfluidwindow",renderTo:"BaseContainer",metrics:G,constrainHeader:true,width:s,closable:L,closable:false,height:t,border:false,ghost:false,x:I,layout:{type:"vbox",align:"stretch"},y:H,isResized:false,resizeHandles:"all",style:{"border":"0px solid #020202;"},resizable:P,draggable:q,padding:0,bodyPadding:0,autoScroll:false,scroll:false,containerId:F,graphId:"graph_"+F,isGraph:r.request.options.isGraph,isBarGraph:r.request.options.isBarGraph,isPieGraph:r.request.options.isPieGraph,chartObj:null,barChartHeight:null,pieChartHeight:null,tools:[{xtype:"button",itemId:"settingId_"+F,winid:r.request.options.panelId,iconCls:"iconConfig",tooltip:"Edit Panel",style:{"background":"none","border":"none"},hidden:D,handler:function(){var R=Ext.getCmp(this.winid);
var S="";if(G.indexOf("~")>=0){S=G.substring(0,G.indexOf("~"));}Ext.get("configMod").setWidth(538);Ext.get("configMod").select(".configMode_popupArrow").hide();Ext.get("configMod").center();Ext.getCmp("optionsCombo").setValue("modify");o.loadConfigurationItems_Modify(Ext.getCmp("optionsCombo"),Q,R.id,S);
},},{xtype:"button",itemId:E,winid:r.request.options.panelId,iconCls:z,tooltip:C,style:{"background":"none","border":"none"},hidden:D,handler:function(){if(!Ext.isEmpty(this.itemId)&&this.itemId=="closeWinId"){var R=Ext.getCmp(this.winid);var S="close";if(!Ext.isEmpty(R)){Ext.MessageBox.confirm("Delete","Window and its configuration will be deleted permanently. Are you sure ?",function(T){if(T==="yes"){o.removeWindowDetails(R,S);
R.destroy();}});return false;}}else{if(!Ext.isEmpty(this.itemId)&&this.itemId=="hideWinId"){var R=Ext.getCmp(this.winid);var S="hide";if(!Ext.isEmpty(R)){Ext.MessageBox.confirm("Hide","Are you sure to hide ?",function(T){if(T==="yes"){o.removeWindowDetails(R,S);R.destroy();}});return false;}}}}}],items:[{xtype:"container",style:{"border":"0px solid red","overflow-x":"hidden !important"},baseStyle:{"background":"transparent !important","opacity":".5 !important"},bodyPadding:"10 0 0 20",padding:0,flex:1,id:F,layout:{type:"vbox",align:"stretch"},autoScroll:true,scroll:true,}],listeners:{"beforeclose":function(R){Ext.MessageBox.confirm("Delete","Window and its configuration will be deleted permanently. Are you sure ?",function(T){if(T==="yes"){var S="close";
o.removeWindowDetails(R,S);R.destroy();}});return false;},"resize":function(V){if(V.isGraph){var W=V.getHeight();var S=V.getWidth();var U=jQuery(V.graphId);var R=V.getComponent(0);if(V.chartObj!=null){var T=V.chartObj.highchart.chart;if(T.container){T.width=S;T.height=W;}T.width=S+40;if(V.isBarGraph){if(!Ext.isEmpty(V.barChartHeight)){if(parseInt(V.barChartHeight)>=(parseInt(W)-40)){T.height=V.barChartHeight;
R.setAutoScroll(true);}else{T.height=W-30;R.setAutoScroll(false);}}else{T.height=W-60;R.setAutoScroll(false);}}else{if(V.isPieGraph){if(!Ext.isEmpty(V.pieChartHeight)){T.height=W-50;R.setAutoScroll(false);}else{T.height=W-50;R.setAutoScroll(false);}}else{T.height=W-90;R.setAutoScroll(false);}}V.chartObj.drawChart();
}}if(V.isResized){o.saveWindowHeightWidth(V);}else{V.isResized=true;}V.syncShadow();},"afterrender":function(R){setInterval(function(){refreshPanelContent(R);},refreshFrequency);if(q){jQuery("#"+R.id).draggable({stop:function(){o.saveWindowPositions(R);},handle:".x-window-header",snapTolerance:4,grid:[4,4]});
}}}});o.getBaseContainer().add(K.show());var w=Ext.decode(r.responseText);var O=w["RESULT"];var Q=O["TITLE"];var y=K.id;if(Ext.isEmpty(Q)){Q=O["JSON_DATA"]["TITLE"];}if(r.responseText.indexOf(".png")>=0){K.setTitle(Q);K.getComponent(0).update('<table width="100%" height="100%" ><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}else{if(!Ext.isEmpty(O)&&O["JSON_DATA"]!="NO_DATA"){if(!Ext.isEmpty(Q)){K.setTitle(Q);}if(Ext.isEmpty(O["PANEL_TYPE"])){if(G.indexOf("LoginDetails")>-1){var u=O["JSON_DATA"];u=u.replace(/\bul\b/g,"div");u=u.replace(/\bli\b/g,"div");K.getComponent(0).update(u);}else{if(G.indexOf("Group_Metrics")>-1){Ext.getCmp(A+"_GroupMetrics").update(O["JSON_DATA"]);
}else{if(G.indexOf("LogonExperience")>-1&&O["JSON_DATA"]!="NO_DATA"){K.setTitle("<table style='margin-top:3px' width='"+(s-70)+"' border='0'><tr><td align='left'>"+Q+"</td><td align='right'>Last "+O["TIME_LINE"]+" Sessions</td></tr></table>");var k=O["JSON_DATA"];var J=Ext.create("Ext.data.Store",{autoLoad:true,fields:k["Fields"],data:k["Data"]});
var B=K.getHeight()-30;var M=K.getWidth();var k=Ext.create("Ext.grid.Panel",{id:A+"_LogonExperienceGrid",cls:"gridSkin",autoScroll:true,scroll:true,height:K.height-20,frame:false,padding:0,forceFit:true,store:J,style:{"border":"0px solid blue","border":"none !important"},margin:"0 0 8 0",collapsible:false,multiSelect:true,stripeRows:false,columns:{items:k["Columns"]},listeners:{resize:function(){var R=Ext.getCmp(A+"_LogonExperienceGrid");
R.setHeight(K.height-20);}}});K.getComponent(0).add(k);K.getComponent(0).setAutoScroll(false);}else{if(G.indexOf("SessionDetails")>-1&&O["JSON_DATA"]!="NO_DATA"){K.setTitle("<table style='margin-top:2px' id='sessionDetailsTitle' width='"+(s-70)+"' border='0'><tr><td align='left'>"+Q+"</td><td align='right'>"+O["TIME_LINE"]+"</td></tr></table>");
var J=Ext.create("Ext.data.Store",{autoLoad:true,fields:["server","lastAccessedTime","graphLinks"],data:O["JSON_DATA"]});var k=Ext.create("Ext.grid.Panel",{id:A+"_SessionDetailsGrid",cls:"gridSkin",autoScroll:true,scroll:true,height:150,frame:false,padding:0,layout:"fit",store:J,style:{"border":"none !important"},margin:"0 0 8 0",stateful:true,collapsible:false,multiSelect:true,stripeRows:true,columns:{defaults:{sortable:false,draggable:true,hideable:false,},items:[{text:"Server",dataIndex:"server",flex:2.1,style:{"border-left":"0px"},},{text:"Last Accessed Time",dataIndex:"lastAccessedTime",width:150},{dataIndex:"graphLinks",xtype:"actioncolumn",width:60,renderer:function(R){return"<div >"+R+"</div>";
}}]},listeners:{resize:function(){var R=Ext.getCmp(A+"_SessionDetailsGrid");R.setHeight(K.height-40);R.setWidth(K.width);},render:function(){var R=Ext.getCmp(A+"_SessionDetailsGrid");R.setHeight(K.height-40);R.setWidth(K.width);}}});K.getComponent(0).add(k);}else{if(G.indexOf("User_Alerts")>-1&&O["JSON_DATA"]!="NO_DATA"){K.setTitle("<table style='margin-top:2px' id='userAlertsTitle' width='"+(s-70)+"' border='0'><tr><td align='left'>"+Q+"</td><td align='right'>Recent "+O["TIME_LINE"]+"</td></tr></table>");
var k=O["JSON_DATA"];var J=Ext.create("Ext.data.Store",{fields:["STATE","COMPONENT","DESCRIPTION","START_TIME","DURATION"],data:O["JSON_DATA"],});var k=Ext.create("Ext.grid.Panel",{id:A+"_UserAlertsGrid",cls:"gridSkin",autoScroll:true,scroll:true,height:160,frame:false,padding:0,layout:"fit",store:J,style:{"border":"none !important"},margin:"0 0 8 0",stateful:true,collapsible:false,multiSelect:true,stripeRows:false,width:"100%",columns:{defaults:{sortable:false,draggable:true,hideable:false,},items:[{dataIndex:"STATE",width:30,style:{"border-left":"0px"},renderer:function(S){var R="<div style='margin-right:6px;margin-top:1px' class='state_"+S+"'></div>";
return R;}},{text:"Component",dataIndex:"COMPONENT",flex:1.5,sortable:true,},{text:"Description",dataIndex:"DESCRIPTION",flex:1.5,sortable:true,},{text:"StartTime",dataIndex:"START_TIME",width:140,sortable:true,},{text:"Duration",dataIndex:"DURATION",width:70,sortable:false,}]},listeners:{resize:function(){var R=Ext.getCmp(A+"_UserAlertsGrid");
R.setHeight(K.height-42);R.setWidth(K.width);},render:function(){var R=Ext.getCmp(A+"_UserAlertsGrid");R.setHeight(K.height-42);R.setWidth(K.width);}}});K.getComponent(0).add(k);}else{if(G.indexOf("BackendApplicationStatus")>-1&&O["JSON_DATA"]!="NO_DATA"){var k=O["JSON_DATA"];var J=Ext.create("Ext.data.Store",{autoLoad:true,fields:k["Fields"],data:k["Data"]});
var k=Ext.create("Ext.grid.Panel",{id:A+"_BackendApplicationStatusGrid",cls:"gridSkin",autoScroll:true,frame:false,padding:0,width:1000,maintainFlex:true,store:J,style:{"border":"0px solid blue"},margin:"0 0 8 0",stateful:true,collapsible:false,multiSelect:true,stripeRows:false,columns:{defaults:{flex:3},items:k["Columns"]}});
K.getComponent(0).add(k);}}}}}}}else{if(Ext.isEmpty(O["CHART_TYPE"])){if(O["JSON_DATA"]["IMAGE_URL"]!="-"){o.updateChartData(O["JSON_DATA"]["IMAGE_URL"],K.getComponent(0),K);}else{K.getComponent(0).update('<table width="100%" height="100%" ><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}}else{if(O["JSON_DATA"]["XML_DATA"]!="-"){if(O["CHART_TYPE"]=="PIE"){o.updatePieChartData(O["JSON_DATA"],K.getComponent(0),K);}else{o.updateBarChartData(O["JSON_DATA"]["XML_DATA"],K.getComponent(0),K);}}else{K.getComponent(0).update('<table width="100%" height="100%" ><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}}}}else{K.setTitle(Q);if(G.indexOf("User_Alerts")>-1){K.getComponent(0).update('<div style="height:100%;width:100%;display:table"><div class="msgFont" style="display:table-cell;vertical-align:middle"> <div class="iconNoalarms" style="margin:0px auto"></div><div style="text-align:center">No Alarms found! </div></div></div>');
}else{K.getComponent(0).update('<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">'+noMeasure+"!</div></div></div>");}}}if(h!=panelOrder.length-1){f.hide();
}}}});}}},updateChartData:function(a,c,b){if(!Ext.isEmpty(a)){c.setLoading();Ext.Ajax.request({url:a+"&anonymousUser=true&dashboardUserId="+userName,scope:this,method:"POST",timeout:280000,success:function(g){if(g.status==200&&!Ext.isEmpty(g.responseText)){c.setLoading(false);if((g.responseText.indexOf(".png")>=0||g.responseText.indexOf(".gif")>=0)){c.update('<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}else{var j=Ext.decode(g.responseText);var d="yes";var z="yes";if(!Ext.isEmpty(j)&&j!=""&&j.hasOwnProperty("DataSet")){try{var s="graph_"+c.id;if(b.chartObj!=null){jQuery("#"+s).highcharts().destroy();b.chartObj=null;}var m=j.DataSet;var k=c.getHeight();var v=c.getWidth();var f=b.getHeight();var o=b.getWidth();
if((m!=null&&!Ext.isEmpty(m))){var p='<div class="chartCount" style="border:0px solid red;height:90px;width:100%;overflow:auto"><div style="display:table;margin: 0 auto;width:auto"><ul style="border:0px solid green;align:center;margin-top:27px;width:auto;height:auto">';for(var w in m){var q=m[w];if(q!=null&&q.hasOwnProperty("dispLegend")){var t=q["dispLegend"];
var h=q["measVal"];var l=q["measState"];var r=q["layerModelUrl"];var n=q["color"];var u=q["unit"];p+='<li class="uxGraphValue_box">';p+='<div style="margin-top:0;padding-right:10px;margin-left:5px;border:0px solid violet;"><table style="margin:auto;"><tr><td valign="top"><span class="chartLegend" style="color:'+n+';margin-top:-10px">.</span></td><td>';
p+='<span class="uxGraphLabel" style="white-space:nowrap">'+t+"</span>";p+="</td></tr></table>";p+='<div style="border:0px solid red"><div>';if((d.toLowerCase()!="no"&&z.toLowerCase()=="no")){p+='<div><span class="chartLegend" style="color:'+n+'">.</span>';}if(isHistory!=""&&isHistory=="true"){if(h=="NA"||h=="-"){p+='<div style="margin-top:0px" class="uxGraphValue_WHITE"> - </div>';
}else{p+='<div style="margin-top:0px" class="uxGraphValue_WHITE">'+h+"</div>";}p+="</div></div>";}else{if(h=="NA"||h=="-"){p+='<div style="margin-top:0px" class="uxGraphValue_WHITE"> - </div>';}else{p+='<div style="margin-top:0px" class="uxGraphValue_WHITE"><img  class="stateSymbol_'+l+'" src="/final/images/clear.png" border="0" />'+h+"</div>";
}p+="</div></div>";}p+="</li>";}}p+="</ul></div>";if(p!=null&&p!=""){p="<div>"+p+'</div></div> <div id="'+s+'" class="timelineDiv" style="border:0px solid blue;height:auto;width:100%"></div></div>';c.update(p);var y={};y=jQuery.extend(true,{},getHighStockAreaChartForUserExperienceDashboard(s,(f-71),(v+10),""),y);
y.setData(j,mgrDateFormatTemp,"",true,"right");b.chartObj=y;y.drawChart();}}else{c.update('<table width="100%" height="100%"  ><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");}}catch(x){alert("exception in highchart method::"+x);
}}else{c.update('<table width="100%" height="100%"  ><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");}}}}});}},updateBarChartData:function(a,d,g){var c=a.chartHeight;var h=g.getHeight();
var j=g.getWidth();var b="graph_"+d.id;if(g.chartObj!=null){jQuery("#"+b).highcharts().destroy();g.chartObj=null;}var f=h;if(parseInt(h)<parseInt(c)){f=c;d.setAutoScroll(true);}else{d.setAutoScroll(false);}d.update('<center><div style="margin-top:0px;margin-left:0px"><div id="'+b+'" style="width:100%;height:auto;border:0px solid blue;"></div></div></center>');
var e={};e=jQuery.extend(true,{},getHighChartsBarInstanceForEndUserDashboard(b,(f),j-40),e);e.setData(a,"","","bar");g.chartObj=e;g.barChartHeight=c;e.drawChart();},updatePieChartData:function(b,g,j){var e=140;var a=(strSkin=="Dark")?"#9b9fa1":"#333333";if(b.pieChartData.title=="Total memory (MB),Free memory (MB)"){var f='<div class="f12-bold" style="text-align:center;"><div data-qtip="'+b.pieChartData.title+'" style="color:'+a+';">Memory (MB)</div></div>';
}else{var f='<div class="f12-bold" style="text-align:center;"><div data-qtip="'+b.pieChartData.title+'" style="color:'+a+';">Disk Space (GB)</div></div>';}b["useHtml"]=true;var k=j.getHeight();var l=j.getWidth();var c="pie_"+g.id;if(j.chartObj!=null){jQuery("#"+c).highcharts().destroy();j.chartObj=null;
}var h=k-10;if(parseInt(k)<parseInt(e)){h=e-10;g.setAutoScroll(true);}else{g.setAutoScroll(false);}g.update('<center><div style="margin-top:-10px;margin-left:5px"><div id="'+c+'" style="width:100%;height:'+(h)+'px;border:0px solid red;"></div></div></center>');var d={};d=jQuery.extend(true,{},createBar(c,h,l-40),d);
d.setData(b,"","","pie");d.drawChart();j.chartObj=d;j.pieChartHeight=e;},refreshPanelContent:function(a){var d=this;var c=a.id;var e=a.metrics;e=encodeURI(e);var g=false;if(e.indexOf("Area_Metrics")>-1||e.indexOf("Line_Metrics")>-1||e.indexOf("Bar_Metrics")>-1){g=true;}var b=a.url;var f=a.params;if(!Ext.isEmpty(b)){Ext.Ajax.request({url:b,scope:this,method:"POST",timeout:280000,params:f,panelId:c,panelMetrics:e,isGraph:g,success:function(k){if(k.status==200&&!Ext.isEmpty(k.responseText)){var q=k.request.options.panelId;
var n=k.request.options.panelMetrics;var o=Ext.decode(k.responseText);var m=o["RESULT"];if(k.responseText.indexOf(".png")>=0){a.getComponent(0).update('<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}else{if(!Ext.isEmpty(m)&&m["JSON_DATA"]!="NO_DATA"){if(Ext.isEmpty(m["PANEL_TYPE"])){if(n.indexOf("LoginDetails")>-1){var j=m["JSON_DATA"];j=j.replace(/\bul\b/g,"div");j=j.replace(/\bli\b/g,"div");a.getComponent(0).update(j);}else{if(n.indexOf("Group_Metrics")>-1){if(Ext.getCmp("groupmetrics")){Ext.getCmp("groupmetrics").update(m["JSON_DATA"]);
}}else{if(n.indexOf("LogonExperience")>-1&&m["JSON_DATA"]!="NO_DATA"){var h=Ext.getCmp(q+"_LogonExperienceGrid");if(!Ext.isEmpty(h)){var p=m["JSON_DATA"];var l=Ext.create("Ext.data.Store",{autoLoad:true,fields:p["Fields"],data:p["Data"]});h.reconfigure(l,p["Columns"]);}}else{if(n.indexOf("SessionDetails")>-1&&m["JSON_DATA"]!="NO_DATA"){var h=Ext.getCmp(q+"_SessionDetailsGrid");
if(!Ext.isEmpty(h)){h.getStore().loadData(m["JSON_DATA"]);}}else{if(n.indexOf("User_Alerts")>-1&&m["JSON_DATA"]!="NO_DATA"){var h=Ext.getCmp(q+"_UserAlertsGrid");if(!Ext.isEmpty(h)){h.getStore().loadData(m["JSON_DATA"]);}}else{if(n.indexOf("BackendApplicationStatus")>-1&&m["JSON_DATA"]!="NO_DATA"){var h=Ext.getCmp(q+"_BackendApplicationStatusGrid");
if(!Ext.isEmpty(h)){var p=m["JSON_DATA"];var l=Ext.create("Ext.data.Store",{autoLoad:true,fields:p["Fields"],data:p["Data"]});h.reconfigure(l,p["Columns"]);}}}}}}}}else{if(Ext.isEmpty(m["CHART_TYPE"])){if(m["JSON_DATA"]["IMAGE_URL"]!="-"){d.updateChartData(m["JSON_DATA"]["IMAGE_URL"],a.getComponent(0),a);
}else{a.getComponent(0).update('<table width="100%" height="100%" ><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");}}else{if(m["JSON_DATA"]["XML_DATA"]!="-"){if(m["CHART_TYPE"]=="PIE"){d.updatePieChartData(m["JSON_DATA"],a.getComponent(0),a);
}else{d.updateBarChartData(m["JSON_DATA"]["XML_DATA"],a.getComponent(0),a);}}else{a.getComponent(0).update('<table width="100%" height="100%" ><tr><td valign="middle" align="center"><div class="iconInformation" style="margin:15% 0 auto 0"></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>");
}}}}else{if(n.indexOf("User_Alerts")>-1){a.getComponent(0).update('<div style="height:100%;width:100%;display:table"><div class="msgFont" style="display:table-cell;vertical-align:middle"> <div class="iconNoalarms" style="margin:0px auto"></div><div style="text-align:center">No Alarms found! </div></div></div>');
}else{a.getComponent(0).update('<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">'+noMeasure+"! </div></div></div>");}}}}}});}},showDDWindow:function(a){Ext.Ajax.request({url:a,method:"POST",timeout:280000,success:function(b){if(b.status==200&&!Ext.isEmpty(b.responseText)){var d=b.responseText;
var c=Ext.decode(d);var f=c["DD_DATA"];var e=new Ext.Window({width:950,height:550,border:false,style:{"border":"none"},frame:false,modal:true,autoScroll:true,scroll:true,title:"Diagnosis Data",html:f});e.show();}}});},showNewDDWindow:function(a,b){parent.openWindow((a+"&newWindow=true"),b,"toolbar=no,menubar=no,location=no,status=no,width="+defaultWidth+", height="+defaultHeight+", top="+top+", left="+left,"screenx=0,screeny=0,scrollbars=yes,resizable=no");
},showMaxGraphWindow:function(a,h){var b=true;var e="right";var g=this.getMain().getWidth();var j=this.getMain().getHeight();var c=decodeURIComponent(h);c=c.split("+").join(" ");var f=a+"&height="+(j-200)+"&width="+(g-50)+"&anonymousUser=true&dashboardUserId="+userName+"&hideUnitInDispname=true";var d='<div id="chartMaximize" style="width:'+(g-20)+'px;display:block;" ></div>';
Ext.widget("maximizeview",{title:c,width:g,height:j,id:"Maximize",html:d,listeners:{show:function(){setHighChart(f,"chartMaximize",j-50,g-30,"",b,e,true,true);}}}).show();},showNewMaxGraphWindow:function(b,j,a){var c=true;var f="right";var h=this.getMain().getWidth();var k=this.getMain().getHeight();
var d=decodeURIComponent(j);d=d.split("+").join(" ");var g=b+"&height="+(k-200)+"&width="+h+"&anonymousUser=true&dashboardUserId="+userName+"&hideUnitInDispname=true";var e='<div id="chartMaximize" style="margin:0px 0px 0px 15px !important;width:'+h+'px;display:block;" ></div>';parent.openWindow((b+"&newWindow=true"),a,"toolbar=no,menubar=no,location=no,status=no,width="+defaultWidth+", height="+defaultHeight+", top="+top+", left="+left,"screenx=0,screeny=0,scrollbars=yes,resizable=no");
},saveWindowPositions:function(b){var a="/final/monitor/endUserDashboardDetailsConfigJson.jsp?isUpdatePanelProps=true"+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;Ext.Ajax.request({url:a,timeout:280000,params:{userType:userType,winId:b.id,winX:b.x,winY:b.y,},method:"POST",success:function(c){if(c.status==200&&!Ext.isEmpty(c.responseText)){var e=c.responseText;
var d=Ext.decode(e);}}});},saveWindowHeightWidth:function(b){var a="/final/monitor/endUserDashboardDetailsConfigJson.jsp?isUpdatePanelProps=true"+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;Ext.Ajax.request({url:a,params:{userType:userType,winId:b.id,winWidth:b.width,winHeight:b.height,},timeout:280000,method:"POST",success:function(c){if(c.status==200&&!Ext.isEmpty(c.responseText)){var e=c.responseText;
var d=Ext.decode(e);b.isResized=true;}}});},removeWindowDetails:function(c,b){var a="/final/monitor/endUserDashboardDetailsConfigJson.jsp?isRemovePanel=true"+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;if(!Ext.isEmpty(b)&&b!=undefined){a=a+"&winAct="+b;}Ext.Ajax.request({url:a,params:{userType:userType,winId:c.id},timeout:280000,method:"POST",success:function(d){if(d.status==200&&!Ext.isEmpty(d.responseText)){var f=d.responseText;
var e=Ext.decode(f);refreshAfterUpdate();}}});},updateMetricsData:function(){var n=this.getSettingsForm();var m=n.down("combo[id=optionsCombo]").getValue();var o=n.down("radiogroup[id=metrics]").getValue().metricsRadio;if(Ext.isEmpty(o)||o==null||o==undefined){if(chartTypeStore!=null&&!Ext.isEmpty(chartTypeStore)&&chartTypeStore!=undefined){o=chartTypeStore;
}}var h=n.down("textfield[id=panelTitle]");var j=n.down("combo[id=chartTimeline]");var q=n.down("combo[id=test]");var d=n.down("combo[id=measure]");var f=n.down("textfield[id=displayName]");var k=n.down("combo[id=panelNo]");var t=n.down("radiogroup[id=modifyOptions]");var b=n.down("container[id=paletteContainer]");
var p=n.down("displayfield[id=colorPalette]");var r=true;var a=Ext.getCmp("suppotedCmpType");if(m!="add"){var l=k.getValue();var c=k.findRecord(k.valueField||k.displayField,l);var g=k.store.indexOf(c);o=k.getStore().getAt(g).get("metricsField");}if(!Ext.isEmpty(metricsData)&&metricsData.length>0){if(q.getValue()!="-1"&&d.getValue()!="-1"&&f.getValue()!=""){var s="";
if(o=="Group_Metrics"){s+=",";}else{s+="|hash|";}s+=q.getValue();s+=":";s+=d.getValue();s+=":";s+=f.getValue();metricsData+=s;}var e="/final/monitor/endUserDashboardDetailsConfigJson.jsp?isUpdate=true&&isMulti=true&metrics="+o+"&addOrDelete="+m+"&userType="+userType+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;
e=e+"&wholeValue="+encodeURI(metricsData);e+="&panelTitle="+encodeURI(h.getValue());if(!Ext.isEmpty(j)&&j.isVisible()){e=e+"&chartTimeline="+j.getValue();}if(!Ext.isEmpty(k)&&k.isVisible()){e=e+"&panelNo="+k.getValue();}if(!Ext.isEmpty(k)&&k.isVisible()){e=e+"&panelNo="+k.getValue();}if(!Ext.isEmpty(t)&&t.isVisible()){e=e+"&action="+t.getValue().modifyRadio;
}if(b.isVisible()){e=e+"&colorPalette="+p.getValue();}if(a.getValue()!=null&&!Ext.isEmpty(a.getValue())){e=e+"&suppotedCmpType="+a.getValue();}Ext.Ajax.request({url:e,method:"POST",scope:this,timeout:280000,success:function(u,w){var x=u.responseText;var v=Ext.decode(x);if(v["UPDATE"]=="FAILED"){Ext.Msg.alert("Error",UpdateError);
}if(v["UPDATE"]=="SUCCESS"){this.hideConfigWindow();refreshAfterUpdate();}},failure:function(){}});}else{if(!Ext.isEmpty(removeMetricsData)&&removeMetricsData.length>0){if(q.getValue()!="-1"&&d.getValue()!="-1"){var s="";if(o=="Group_Metrics"){s+=",";}else{s+="|hash|";}s+=q.getValue();s+=":";s+=d.getValue();
removeMetricsData+=s;}var e="/final/monitor/endUserDashboardDetailsConfigJson.jsp?isUpdate=true&&isMulti=true&metrics="+o+"&addOrDelete="+m+"&userType="+userType+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;e=e+"&removeWholeValue="+encodeURI(removeMetricsData);if(!Ext.isEmpty(k)&&k.isVisible()){e=e+"&panelNo="+k.getValue();
}if(!Ext.isEmpty(t)&&t.isVisible()){e=e+"&action="+t.getValue().modifyRadio;}Ext.Ajax.request({url:e,method:"POST",scope:this,timeout:280000,success:function(u,w){var x=u.responseText;var v=Ext.decode(x);if(v["UPDATE"]=="FAILED"){Ext.Msg.alert("Error",UpdateError);}if(v["UPDATE"]=="SUCCESS"){this.hideConfigWindow();
refreshAfterUpdate();}},failure:function(){}});}}},onAddPanelBtnClick:function(){var a=this.getAddwidgetwindow();if(Ext.isEmpty(a)){a=Ext.widget("addwidgetwindow");}a.show();a=null;delete a;},createAddPanelBlock:function(c){var a=this.getAddwidgetwindow();isNewpanel="true";if(!Ext.isEmpty(a)){a.hide();
}a=null;delete a;Ext.getCmp("configMod").show();Ext.getCmp("optionsCombo").setValue("add");var b=c.chartType;if(b=="Data Panel"){b="Group_Metrics";}else{if(b=="Area Chart"){b="Area_Metrics";}else{if(b=="Line Chart"){b="Line_Metrics";}else{if(b=="Bar Graph"){b="Bar_Metrics";}}}}chartTypeStore=b;Ext.getCmp("optionsCombo").hide();
Ext.getCmp("metrics").setValue(b);this.loadMetricsItems_AddPanel(Ext.getCmp("metrics"),b);},onShowHideBtnClick:function(b){var a=this.getAddwidgetwindow();if(!Ext.isEmpty(a)){a.hide();}a=null;delete a;Ext.getCmp("configMod").show();Ext.getCmp("showHidePanelNew").show();Ext.getCmp("optionsCombo").setValue("showHide");
Ext.getCmp("optionsCombo").hide();this.loadConfigurationItems(Ext.getCmp("optionsCombo"));},loadSuppotedCmpTypes:function(b,c){var a="/final/monitor/endUserDashboardDetailsConfigJson.jsp?enduserBackendPanel=BackendAppStatus&loadData=loadCmpTypeTrue&userType="+userType+"&action="+c.getValue().modifyRadio+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;
Ext.Ajax.request({url:a,method:"POST",scope:this,timeout:280000,success:function(d,g){var h=d.responseText;var f=Ext.decode(h);var e=Ext.getCmp("suppotedCmpType");if(!Ext.isEmpty(e)&&!Ext.isEmpty(f["USER_BACKEND_APP"])){e.getStore().loadRawData(f["USER_BACKEND_APP"]);e.setValue(f["USER_BACKEND_APP"][0]["valueField"]);
e.show();}},failure:function(){}});},loadsuppotedCmpTypesTest:function(e){var b=Ext.getCmp("suppotedCmpType");var d=b.getValue();var f=Ext.getCmp("modifyOptions");if(f.getValue().modifyRadio=="add"){var c="C=true&F=getTestsForComponentJSON&P0={"+d+"}&calljson=true";Ext.Ajax.request({url:"/final/servlet/com.eg.EgMonRemoteScriptingServlet",method:"POST",params:c+"&screenWidth="+(Ext.getBody().getViewSize().width)+"&screenHeight="+(Ext.getBody().getViewSize().height),scope:this,timeout:280000,success:function(g){var j=g.responseText;
var h=Ext.decode(j);var k=Ext.getCmp("test");if(!Ext.isEmpty(k)&&!Ext.isEmpty(h["TEST_VALUES"])){k.getStore().loadRawData(h["TEST_VALUES"]);k.setValue(h["TEST_VALUES"][0]["valueField"]);k.show();}},failure:function(){}});}else{if(f.getValue().modifyRadio=="update"||f.getValue().modifyRadio=="delete"){var a="/final/monitor/endUserDashboardDetailsConfigJson.jsp?enduserBackendPanel=BackendAppStatus&loadData=loadTestTrue&userType="+userType+"&action="+f.getValue().modifyRadio+"&suppotedCmpType="+d+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;
Ext.Ajax.request({url:a,method:"POST",scope:this,timeout:280000,success:function(g,j){var k=g.responseText;var h=Ext.decode(k);var l=Ext.getCmp("test");if(!Ext.isEmpty(l)&&!Ext.isEmpty(h["TEST_VALUES"])){l.getStore().loadRawData(h["TEST_VALUES"]);l.setValue(h["TEST_VALUES"][0]["valueField"]);l.show();
}},failure:function(){}});}}},showApplications:function(){var b=this;var a=Ext.create("Ext.window.Window",{width:Ext.getBody().getWidth()-200,height:Ext.getBody().getHeight()-100,title:"Application Performance Statistics for "+desktopName+" Session",cls:"myDashboardwindow",header:{height:32,padding:"0 10",margin:0,},frame:true,padding:0,margin:0,resizable:false,border:true,modal:true,scroll:true,autoScroll:true,ghost:false,closeAction:"destroy",items:[{xtype:"panel",layout:{type:"column",align:"stretch"},items:[],listeners:{"afterrender":function(d){if(!Ext.isEmpty(grppanelData)){for(var c=0;
c<grppanelData.length;c++){if(!Ext.isEmpty(grppanelData[c])){d.add({xtype:"panel",margin:8,height:190,columnWidth:0.333,data:grppanelData[c],listeners:{boxready:function(f){f.body.mask("Loading...");},afterrender:function(g){var f=g.data["PanelId"];var h=filterEncode(g.data["Metrics"]);Ext.Ajax.request({url:"/final/servlet/com.eg.EgMonitorResultDispatcher",scope:this,timeout:1280000,params:parameters+"&panelId="+f+"&panelMetrics="+encodeURIComponent(h)+"&resultpage=globalsearch&isEndUserDashboard=true",success:function(j){if(j.status==200&&!Ext.isEmpty(j.responseText)){var m=JSON.parse(j.responseText);
console.log("jsonData=-=-=-=-=->",m);var n=m["RESULT"];var e=h.substring(h.indexOf("~!~")+3);if(!Ext.isEmpty(n)&&n["JSON_DATA"]!="NO_DATA"&&n["JSON_DATA"].Login_Info!="NO_DATA"){var l=n["JSON_DATA"];var k=Ext.create("Ext.data.Store",{autoLoad:true,fields:l["fields"],data:l["data"]});var l=Ext.create("Ext.grid.Panel",{ui:"newGridPanel whiteHeader",autoScroll:true,frame:false,padding:0,minHeight:180,defaults:{flex:1},layout:"fit",title:e,store:k,margin:8,stateful:true,collapsible:false,multiSelect:true,stripeRows:false,columns:{defaults:{flex:3},items:l["columns"]}});
g.add(l);}else{g.add({xtype:"panel",ui:"newGridPanel",layout:"fit",minHeight:180,title:e,header:{border:false},margin:8,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">No data found!</div></div></div>'});
}}g.body.unmask();}});}}});}}}else{d.add({xtype:"panel",height:Ext.getBody().getHeight()-180,columnWidth:1,layout:"fit",margin:8,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">Panels not configured!</div></div></div>'});
}}}}]});a.show();},publishDashboard:function(){desktopName=parent.filterEncode(desktopName);var a="/final/monitor/endUserDashboardDetailsConfigJson.jsp?publishDashboard=true&userType="+userType+"&desktop_Name="+encodeURI(desktopName)+"&isVDISessionTopologyEnabled="+isVDISessionTopologyEnabled;Ext.Ajax.request({url:a,method:"POST",scope:this,timeout:280000,success:function(c,f){var g=c.responseText;
var d=Ext.decode(g);a=d["serverUrl"];var e=this;var b=Ext.create("Ext.window.Window",{width:480,title:"Publish URL",cls:"myDashboardwindow",header:{height:32,padding:"0 10",margin:0,},frame:true,padding:0,margin:0,resizable:false,border:true,modal:true,ghost:false,items:[{xtype:"panel",margin:"10",layout:{type:"vbox",align:"stretch"},buttonAlign:"center",items:[{xtype:"label",id:"publishUrl",name:"publishUrl",padding:"12 0 0 0",width:100,html:'<div style="font-weight:bold;color:#bebebe">Publish Url</div>'},{xtype:"container",html:'<div class="arrow-container" style="overflow:auto;">'+a+'</div><div style="clear:both"></div></div>'}],}]});
b.show();},failure:function(){}});},onSearchXenApp:function(){var c=Ext.getCmp("searchString")!=null?Ext.getCmp("searchString").value:"";c=c.trim();desktopName=parent.filterEncode(desktopName);c=parent.filterEncode(c);var b="/final/monitor/endUserDashboardData.jsp?access=allusers&searchFrom=InsideEndUserDashboard&userType="+userType+"&username="+encodeURIComponent(desktopName)+"&searchStringData="+encodeURIComponent(c)+"&enableBackButton=true&fromMenu="+isFromMenu;
var a=new Ext.LoadMask(Ext.getBody(),{msg:"Please wait..."});a.show();Ext.Ajax.request({url:b,method:"POST",scope:this,timeout:280000,success:function(d,f){var g=d.responseText;Ext.destroy(a);var e=Ext.decode(g);if(!Ext.isEmpty(e)&&!Ext.isEmpty(e["REDIRECT_URL"])&&e["REDIRECT_URL"]!=null&&e["REDIRECT_URL"]!=undefined&&e["REDIRECT_URL"]!=""){window.document.location=e["REDIRECT_URL"];
}else{Ext.Msg.show({title:"Alert",msg:"No details found",buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});}},failure:function(){}});}});