var netflowMask;var interfaceSelectedView=null;var showVal=null;var globalTimeline=null;var intObj;Ext.define("componentDashboard.controller.NetflowController",{extend:"Ext.app.Controller",requires:["componentDashboard.view.netflow.NetflowMainPanel","Ext.ux.CheckCombo","utilities.GenericPieChartSlider","utilities.TimeLine"],refs:[{ref:"netflowmainpanel",selector:"netflowmainpanel"}],init:function(){intObj=this;
this.control({"netflowmainpanel":{"beforerender":this.netflowmainpanelBeforeRender,"afterrender":this.netflowmainpanelRender,"tabchange":this.netflowmainpanelTabChange,},'netflowmainpanel trigger[name="gridSearch"]':{"change":this.textFieldSearch}});},textFieldSearch:function(){var b=Ext.getCmp("gridSearch").getValue();
if(b==""||b.length==0){Ext.get("MyTrigger_0").setStyle("display","none");Ext.get("MyTrigger_1").setStyle("display","block");}else{Ext.get("MyTrigger_1").setStyle("display","none");Ext.get("MyTrigger_0").setStyle("display","block");}var d=Ext.getCmp("gridDisplay");if(Ext.String.trim(b).length>0&&(Ext.String.trim(b)!=""||Ext.String.trim(b)!=null)){var c=RegExp(b,"i");
var a=d.getStore();a.clearFilter(true);a.filter(new Ext.util.Filter({caseSensitive:true,filterFn:function(g){var e=0;var f=false;Ext.Object.each(g.data,function(i,h){f=f||c.test(String(h));e++;});return f;}}));}else{d.getStore().clearFilter();}},netflowmainpanelTabChange:function(e,a,c,b){var d=this;
if(c!=null&&c!=undefined&&c!="undefined"){c.removeAll();}if(a!=null&&a!=undefined&&a!="undefined"){a.removeAll();}a.add({items:[d.loadTabItems(a)]});},setValueWithOptionInList:function(d,c,b){if(!Ext.isEmpty(c)&&c!=null&&c!=undefined){Ext.getCmp(d).getStore().loadRawData(c);Ext.getCmp(d).suspendEvents(false);
if(!Ext.isEmpty(b)){if(d=="er_timeline"){var a=b[0];if(a=="Any"||a=="any"){Ext.getCmp(d).setValue(a);Ext.getCmp("er_stdate").setValue(b[1].anyStartDate);Ext.getCmp("er_sthr").setValue(b[1].anyStartHr);Ext.getCmp("er_stmin").setValue(b[1].anyStartMin);Ext.getCmp("er_enddate").setValue(b[1].anyEndDate);
Ext.getCmp("er_endhr").setValue(b[1].anyEndHr);Ext.getCmp("er_endmin").setValue(b[1].anyEndMin);}else{Ext.getCmp(d).setValue(a);}}else{Ext.getCmp(d).setRawValue(b);}}else{Ext.getCmp(d).setValue(c[0].valueField);}Ext.getCmp(d).resumeEvents();}},addNetflowTabtoolbar:function(a){var b=this;if(Ext.isEmpty(Ext.getCmp("netflowInnerTabsToolbarId"))){this.getNetflowmainpanel().getTabBar().add([{xtype:"toolbar",flex:1,align:"right",id:"netflowInnerTabsToolbarId",layout:{type:"hbox",pack:"right",},defaults:{margin:"0 0 0 20",labelAlign:"left",labelSeparator:"",},items:["->",{xtype:"container",id:"timelineTitle",margin:"0 20 1 0",html:'<div class="x-form-item-label" style="float:right;font-weight:normal;">'+a.timelineTitle+"</div>",},{xtype:"toolbar",width:27,height:21,dock:"right",cls:"iconBg",id:"settingsBtn",name:"settingsBtn",margin:0,items:[{xtype:"button",iconCls:"iconSettings",tooltip:"<b>"+settingsLbl+"</b>",style:{background:"none",border:"0px"},handler:function(c){intObj.showConfigDropdown(a);
if(!Ext.isEmpty(Ext.get("configMod_summary"))){Ext.get("configMod_summary").animate({to:{"top":"84px"},listeners:{afteranimate:function(){Ext.get("configMod_summary").setStyle("left","");Ext.getCmp("settingsBtn").setDisabled(true);}}}).show();}}}],}]}]);}},overviewTimelineSelect:function(f){var e=this;
globalTimeline=f;localStorage.setItem("timelineLastSelectedView",globalTimeline);var a=this.getNetflowmainpanel().getActiveTab();var c=a.data["AREACHART_URL"];if(!Ext.isEmpty(f)){if(netflowLastLoadedURL!=null&&netflowLastLoadedURL.indexOf("&selectedTimeline=")>0){netflowLastLoadedURL=netflowLastLoadedURL.replace(/(selectedTimeline=)[^\&]+/,"$1"+encodeURIComponent(f));
}else{netflowLastLoadedURL=netflowLastLoadedURL+"&selectedTimeline="+encodeURIComponent(f);}}a.removeAll();var b="";var d="";if(netflowLastLoadedURL!=null&&netflowLastLoadedURL.indexOf("?")>-1){d=netflowLastLoadedURL.substr(0,netflowLastLoadedURL.indexOf("?"));b=netflowLastLoadedURL.substr(netflowLastLoadedURL.indexOf("?")+1);
}Ext.Ajax.request({url:d,params:b,method:"POST",success:function(g){if(g.status==200&&!Ext.isEmpty(g.responseText)){var i=g.responseText;var h=Ext.decode(i);c=h["AREACHART_URL"];a.data["AREACHART_URL"]=c;a.selectedTimeline=f;a.add({items:[e.loadTabItems(a)]});if(!Ext.isEmpty(netflowMask)){Ext.destroy(netflowMask);
delete netflowMask;}}}});},interfaceComboLoad:function(e){var d=this;var a=Ext.getCmp("interfaceCombo").getValue();var f=Ext.getCmp("protocolsTimelineCombo").getValue();var c="/final/monitor/EgNetflowDashHelperJSON.jsp?tab=Network&hostName="+encodeURIComponent(requestParams.hostName)+"&compType="+encodeURIComponent(componentType)+"&ciscoSelectedType=Protocols&screenWidth=1012&screenHeight=570&subsystem=Protocols&blockType=Protocols";
if(c.indexOf("&selectedInterface")>0){c=c.replace(/(selectedInterface=)[^\&]+/,"$1"+encodeURIComponent(a));}else{c+="&selectedInterface="+encodeURIComponent(a);}if(c.indexOf("&protocolTimeline")>0){c=c.replace(/(protocolTimeline=)[^\&]+/,"$1"+encodeURIComponent(f));}else{c+="&protocolTimeline="+encodeURIComponent(f);
}netflowLastLoadedURL=c;var b=this.getNetflowmainpanel().getActiveTab();b.removeAll();b.DataURL=netflowLastLoadedURL;b.add({items:[d.loadTabItems(b)]});},selectFlowInterfaces:function(c){var a=this;var b=c.getValue();interfaceSelectedView=b;localStorage.setItem("interfaceLastSelectedView",interfaceSelectedView);
if(b!=null&&!Ext.isEmpty(b)&&b!=undefined){if(netflowLastLoadedURL!=null&&netflowLastLoadedURL.indexOf("interfaceToView")>0){netflowLastLoadedURL=netflowLastLoadedURL.replace(/(interfaceToView=)[^\&]+/,"$1"+encodeURIComponent(b));}else{netflowLastLoadedURL=netflowLastLoadedURL+"&interfaceToView="+encodeURIComponent(b);
}if(netflowLastLoadedURL!=null&&netflowLastLoadedURL.indexOf("infosToArea")>0){netflowLastLoadedURL=netflowLastLoadedURL.replace(/(infosToArea=)[^\&]+/,"$1"+b);}else{netflowLastLoadedURL=netflowLastLoadedURL+"&infosToArea="+encodeURIComponent(b);}if(netflowLastLoadedURL!=null&&netflowLastLoadedURL.indexOf("interfaceSelection")>0){netflowLastLoadedURL=netflowLastLoadedURL.replace(/(interfaceSelection=)[^\&]+/,"$1"+"true");
}else{netflowLastLoadedURL=netflowLastLoadedURL+"&interfaceSelection=true";}}},timelineSelect:function(c){var b=this;globalTimeline=c;localStorage.setItem("timelineLastSelectedView",globalTimeline);if(netflowLastLoadedURL.indexOf("timeline")>-1){netflowLastLoadedURL=netflowLastLoadedURL.replace(/(timeline=)[^\&]+/,"$1"+encodeURIComponent(c));
}else{netflowLastLoadedURL+="&timeline="+encodeURIComponent(c);}var a=this.getNetflowmainpanel().getActiveTab();a.removeAll();a.DataURL=netflowLastLoadedURL;a.add({items:[b.loadTabItems(a)]});if(!Ext.isEmpty(netflowMask)){Ext.destroy(netflowMask);delete netflowMask;}},showSelect:function(a){showVal=a.getValue();
localStorage.setItem("showLastSelectedView",showVal);if(netflowLastLoadedURL.indexOf("show")>-1){netflowLastLoadedURL=netflowLastLoadedURL.replace(/(show=)[^\&]+/,"$1"+encodeURIComponent(showVal));}else{netflowLastLoadedURL+="&show="+encodeURIComponent(showVal);}},eventsPerPageSelect:function(a){var b=a.getValue();
if(netflowLastLoadedURL.indexOf("eventsPerPage")>-1){netflowLastLoadedURL=netflowLastLoadedURL.replace(/(eventsPerPage=)[^\&]+/,"$1"+b);}else{netflowLastLoadedURL+="&eventsPerPage="+b;}},loadTabItems:function(Q){var l=Q.getId();localStorage.setItem("netflowactivetab",Q.getId());var n={};var o=this;if(!Ext.isEmpty(Ext.getCmp("netflowInnerTabsToolbarId"))){Ext.destroy(Ext.getCmp("netflowInnerTabsToolbarId"));
}if(!Ext.isEmpty(Ext.getCmp("netflowInnerTabsToolbarId1"))){Ext.destroy(Ext.getCmp("netflowInnerTabsToolbarId1"));}if(!Ext.isEmpty(Ext.getCmp("configMod_summary"))){Ext.getCmp("configMod_summary").destroy();}if(!Ext.isEmpty(Ext.getCmp("gridDisplay"))){Ext.destroy(Ext.getCmp("gridDisplay"));}if(l=="overview"){netflowLastLoadedURL="/final/monitor/EgNetflowDashboardJSON.jsp?tab=Network&hostName="+encodeURIComponent(requestParams.hostName)+"&compType="+encodeURIComponent(componentType)+"&ciscoSelectedType=overview&screenWidth=1012&screenHeight=570";
var r=Q.selectedTimeline;var F=localStorage.getItem("timelineLastSelectedView");if(F!=null&&!Ext.isEmpty(F)){globalTimeline=F;r=F;}var U=Q.data;dialChartData=U["FUSION-CHART"]["dialChartValues"];var V=[];if(!Ext.isEmpty(dialChartData)){for(var T=0;T<dialChartData.length;T++){V.push({xtype:"container",layout:{type:"vbox",align:"stretch",pack:"start"},margin:"10 10 0 10",items:[{xtype:"container",height:120,width:200,chartData:dialChartData[T]["dialXMLData"],listeners:{boxready:function(j){getHighChartsGuageforNetflow(j.id,j.chartData,"Netflow");
}}},{xtype:"container",margin:10,html:'<div style="text-align:center;" >'+dialChartData[T].dial_measureMapping+" ("+dialChartData[T].unit+")</div>"}]});}}else{V.push({xtype:"container",margin:10,height:640,flex:1,layout:{type:"fit",},html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+noMeasure+"!</div></td></tr></table>"});
}var w;var Y=[];var z=U["AREACHART_URL"];if(z!=null&&z.indexOf("&selectedDate=")>0){z=z.replace(/(selectedDate=)[^\&]+/,"$1"+encodeURIComponent(r));}else{z=z+"&selectedDate="+encodeURIComponent(r);}var B=U["TIMELINE_VALUES"];var b=U["selectedTimeline"];var e=U["GRAPH_TIMELINE_VALUES"];var v;if(!Ext.isEmpty(z)){var a="";
var t=z;if(t!=null&&t.indexOf("?")>-1){z=t.substr(0,t.indexOf("?"));a=t.substr(t.indexOf("?")+1);}Ext.Ajax.request({method:"POST",url:z,params:a,scope:this,async:false,success:function(aa){if(aa.status==200&&!Ext.isEmpty(aa.responseText)){var an=aa.responseText;var ae=Ext.decode(an);var am=ae["AREACHART_DATA"];
var ag=ae["NoMeasureMsg"];b=ae["selectedTimeline"];v=ae["timelineTitle"];for(var at in am){var ak=am[at]["NoTestMsg"];var al=am[at]["Title"];if(ak!=null&&ak=="-"){var ao=am[at]["areaChartURL"];var ah=am[at]["Timeline"];var ad=am[at]["startDate"];var aq=am[at]["startHr"];var ap=am[at]["endDate"];var ac=am[at]["endHr"];
var ai=am[at]["startMin"];var ab=am[at]["endMin"];var af=am[at]["Type"];var aj=am[at]["GRAPH_FORMAT"];var ar=ao;var j="";if(ar!=null&&ar.indexOf("?")>-1){ao=ar.substr(0,ar.indexOf("?"));j=ar.substr(ar.indexOf("?")+1);}Ext.Ajax.request({url:ao,method:"POST",params:j,scope:this,async:false,success:function(au){if(au.status==200&&!Ext.isEmpty(au.responseText)){var ax=au.responseText;
if(ax.indexOf("png")==-1&&ax.indexOf("PNG")==-1&&ax.indexOf("gif")==-1&&ax.indexOf("GIF")==-1&&(ax.indexOf("iconExclamation")==-1&&ax.indexOf("iconInformation")==-1)&&ax.indexOf("<div")==-1){var av=Ext.decode(ax);var aw=240;if(av!=null&&av.hasOwnProperty("DataSet")){Y.push({xtype:"panel",border:false,frame:false,padding:0,ui:"egGraphPanel",title:al,id:"lineChartId"+at,lineData:av,columnWidth:0.5,margin:"5 5 5 5",height:305,maxURL:ao,queryParams:j,layout:{type:"vbox",align:"stretch",pack:"start"},idNo:at,items:[{xtype:"container",id:"lineChartLegendId"+at,height:33,border:false,autoScroll:true,layout:"fit",margin:"10 30 0 60",style:{"border":"0px solid red"},},{xtype:"panel",id:"netlineChartId"+at,height:260,scroll:false,autoScroll:false,bodyStyle:{"border-top":"0px solid gray !important",},margin:"0 0 0 0",}],listeners:{"boxready":function(aK){var aL="";
var aJ=av["DataSet"];aL+='<table width="95%" ><tr ><td width="100%">';for(var aD in aJ){var aC=aJ[aD];if(aC!=null&&aC.hasOwnProperty("dispLegend")){var aA=aC["dispLegend"];var aN=aC["measVal"];if(aN!=null&&aN!="NA"){var aB=aC["layerModelUrl"];var az=aC["color"];var aE=aC["unit"];var aI=aA;if(aI.length>18){var aA=aA.substr(0,14)+"...";
}aL+='<div style="float:left;width:135px;">';if(aA!=null&&aA!="-"&&aN!=null&&aN!="-"&&aN!="NA"){aL+='<div style="float:left;width:8px;height:8px;margin:5px 4px;background:'+az+';"></div>';aL+='<div style="float:left;width:105px;height;20px;margin:2px 10px 2px 2px;" ><a href=\'javascript:wayToLayerModelForArea("'+encodeURIComponent(aB)+'")\'><span class="status font_normal10" data-qtip="'+aI+'">'+aA+"</span></a></div>";
}aL+="</div>";}}}aL+="</td></tr></table>";Ext.defer(function(){Ext.getCmp("lineChartLegendId"+aK.idNo).update(aL);},250);var aM=b[0];aw=aK.getHeight()-70;if(aM==undefined||aM=="undefined"||aM==""){aw=aK.getHeight()-50;}else{if((aM.indexOf("hour")>-1)&&((aM=="24 hours")==false)){aw=aK.getHeight()-50;}}var aG="netlineChartId"+aK.idNo+"-body";
try{var ay={};var aF=aK.getWidth()-50;ay=jQuery.extend(true,{},getHighCharts(aG,aw,aF,this.maxURL),ay);ay.setData(aK.lineData,currentDateFormat,this.maxURL,true,"center");ay.drawChart();}catch(aH){console.log("exception in highchart method::"+aH);}},"resize":function(aD){var aB=b[0];aw=aD.getHeight()-70;
if(aB==undefined||aB=="undefined"||aB==""){aw=aD.getHeight()-50;}else{if((aB.indexOf("hour")>-1)&&((aB=="24 hours")==false)){aw=aD.getHeight()-50;}}var az="netlineChartId"+aD.idNo+"-body";try{var ay={};var aA=aD.getWidth()-50;ay=jQuery.extend(true,{},getHighCharts(az,aw,aA,this.maxURL),ay);ay.setData(aD.lineData,currentDateFormat,this.maxURL,true,"center");
ay.drawChart();}catch(aC){console.log("exception in highchart method::"+aC);}}},tools:[{xtype:"button",iconCls:"iconMaximize",areaTitle:al,lineData:av,maxURL:ao,queryParams:j,style:{"background":"transparent","border":"1px solid transparent"},listeners:{"afterrender":function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:maximizeViewLbl});
}},handler:function(){var aD="";var ay="";var aC="";var aA="";var aB="";var az=Ext.create("utilities.GenericWindow",{title:this.areaTitle,lineData:this.lineData,maxURL:this.maxURL,queryParams:this.queryParams,width:"90%",height:"90%",cssMask:true,id:"idForGettingWidth",padding:"5 10 10 10",resizable:false,draggable:true,closeAction:"destroy",scroll:false,autoScroll:false,idNo:at,items:[{xtype:"container",layout:{type:"hbox",pack:"center",align:"center"},flex:1,height:60,defaults:{labelAlign:"top",},margin:"10 10 0 10",items:[{xtype:"timeline",cls:"timeline_left",id:"timelineNetflow"+at,name:"timelineNetflow"+at,margin:"10 0 0 10",hidden:false,width:650,hideMinutes:false,layout:{type:"hbox",pack:"center",align:"center"},},{xtype:"button",text:"Submit",margin:"31 0 0 10",text:"SUBMIT",cls:"button20",width:60,id:"submitNetflow"+at,name:"submitNetflow"+at,listeners:{"click":function(aG){var aI=Ext.getCmp("er_timeline").getValue();
var aE=Ext.getCmp("er_stdate").getValue();var aH=Ext.getCmp("er_sthr").getValue();var aL=Ext.getCmp("er_stmin").getValue();var aK=Ext.getCmp("er_enddate").getValue();var aF=Ext.getCmp("er_endhr").getValue();var aJ=Ext.getCmp("er_endmin").getValue();if(aI=="Any"){aE=Ext.Date.dateFormat(aE,"m/d/Y");aK=Ext.Date.dateFormat(aK,"m/d/Y");
}else{aE=Ext.Date.dateFormat(aE,"m/d/Y");aK=Ext.Date.dateFormat(aK,"m/d/Y");}if(aB!=null&&aB.indexOf("Timeline")>0){aB=aB.replace(/(Timeline=)[^\&]+/,"$1"+encodeURIComponent(aI));}else{aB=aB+"&Timeline="+encodeURIComponent(aI);}if(aB!=null&&aB.indexOf("TimePeriod")>0){aB=aB.replace(/(TimePeriod=)[^\&]+/,"$1"+encodeURIComponent(aE+" "+aH+":"+aL+"|"+aK+" "+aF+":"+aJ));
}else{aB=aB+"&TimePeriod="+encodeURIComponent(aE+" "+aH+":"+aL+"|"+aK+" "+aF+":"+aJ);}Ext.Ajax.request({url:aA,method:"POST",params:aB,scope:this,async:false,success:function(aU){if(aU.status==200&&!Ext.isEmpty(aU.responseText)){var aR=aU.responseText;if(aR.indexOf("png")==-1&&aR.indexOf("PNG")==-1&&aR.indexOf("gif")==-1&&aR.indexOf("GIF")==-1&&(aR.indexOf("iconExclamation")==-1||aR.indexOf("iconInformation")==-1)){var aQ=Ext.decode(aR);
if(aQ!=null&&aQ.hasOwnProperty("DataSet")){var a1="";var a0=aQ["DataSet"];a1+='<table width="100%" align="center"><tr><td width="100%" >';for(var aV in a0){a1+='<div style="float:left; width:33%;">';var aT=a0[aV];if(aT!=null&&aT.hasOwnProperty("dispLegend")){var aO=aT["dispLegend"];var a2=aT["measVal"];
if(a2!=null&&a2!="NA"){var aP=aT["layerModelUrl"];var aN=aT["color"];var aW=aT["unit"];var aZ=aO;a1+='<div style="position:relative;margin-right:10px;">';if(aO!=null&&aO!="-"&&a2!=null&&a2!="-"){a1+='<div style="float:left; top:0px;width:8px;height:8px;position:absolute;margin:5px 4px;background:'+aN+';"></div>';
a1+='<div style="padding: 0 0 0 15px;float:left;height;20px;width:100%;margin:2px 10px 2px 2px;" ><a href=\'javascript:wayToLayerModelForArea("'+encodeURIComponent(aP)+'")\'><span class="status font_normal10" data-qtip="'+aZ+'">'+aO+"</span></a></div>";}a1+="</div>";}}a1+="</div>";}a1+='<div style="clear:both" class="font_normal9">* All values are in percentage(%) </div></td></tr></table>';
Ext.defer(function(){Ext.getCmp(aD).update(a1);},250);var aS=Ext.get("idForGettingWidth");var aX=aS.getHeight()-180;if(aI==undefined||aI=="undefined"||aI==""){aX=aS.getHeight()-160;}else{if((aI.indexOf("hour")>-1)&&(aI=="24 hours"==false)){aX=aS.getHeight()-160;}}try{var aM={};aM=jQuery.extend(true,{},getHighCharts(ay,aX,aS.getWidth()-100,this.maxURL),aM);
aM.setData(aQ,currentDateFormat,this.maxURL,true,"center");aM.drawChart();}catch(aY){console.log("exception in highchart method::"+aY);}}else{Ext.getCmp(aD).update("");var aS=Ext.get("idForGettingWidth");var aX=aS.getHeight()-180;Ext.getCmp(aC).setHeight(aX);Ext.getCmp(aC).update('<div style="margin-top:115px;"><table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table></div>");
}}else{Ext.getCmp(aD).update("");var aS=Ext.get("idForGettingWidth");var aX=aS.getHeight()-180;Ext.getCmp(aC).setHeight(aX);Ext.getCmp(aC).update('<div style="margin-top:115px;"><table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table></div>");
}}}});}},}]},{xtype:"container",layout:{type:"vbox",pack:"center",align:"center"},style:{"border":"0px solid red"},items:[{xtype:"container",id:"maxviewlineChartLegendId"+at,autoScroll:true,scroll:true,height:40,width:"95%",padding:0,margin:0,}]},{xtype:"panel",id:"maxviewlineChartId"+at,scroll:false,autoScroll:false,margin:"0 0 0 0",},],listeners:{"boxready":function(aO){aA=aO.maxURL;
aB=aO.queryParams;var aI=aO.lineData;Ext.getCmp("er_timeline").getStore().loadRawData(B);Ext.getCmp("er_timeline").setValue(ah.valueField);if(ah.valueField=="Any"){Ext.getCmp("er_stdate").setValue(ad);Ext.getCmp("er_sthr").setValue(aq);Ext.getCmp("er_stmin").setValue(ai);Ext.getCmp("er_enddate").setValue(ap);
Ext.getCmp("er_endhr").setValue(ac);Ext.getCmp("er_endmin").setValue(ab);Ext.getCmp("er_timeline").fireEvent("select",Ext.getCmp("er_timeline"));}else{Ext.getCmp("er_timeline").fireEvent("select",Ext.getCmp("er_timeline"));}var aS="";var aR=aI["DataSet"];aS+='<table width="100%" align="center"><tr><td width="100%" >';
for(var aL in aR){aS+='<div style="float:left;width: 33%;display:inline-block;">';var aK=aR[aL];if(aK!=null&&aK.hasOwnProperty("dispLegend")){var aG=aK["dispLegend"];var aU=aK["measVal"];if(aU!=null&&aU!="NA"){var aH=aK["layerModelUrl"];var aF=aK["color"];var aM=aK["unit"];var aQ=aG;aS+='<div style="float:left;width:100%;margin-right:10px;position:relative">';
if(aG!=null&&aG!="-"&&aU!=null&&aU!="-"&&aU!="NA"){aS+='<div style="position:absolute;width:8px;height:8px;top:-2px;margin:5px 4px;display: inline-block;background:'+aF+';"></div>';aS+='<div style="height;20px;;width: 100%;padding: 0 15px 0 16px;display: inline-block;margin:0px 0px 4px 0px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" ><a href=\'javascript:wayToLayerModelForArea("'+encodeURIComponent(aH)+'")\'><span class="status font_normal10" data-qtip="'+aQ+'">'+aG+"</span></a></div>";
}aS+="</div>";}}aS+="</div>";}aS+='<div style="clear:both" class="font_normal9">* All values are in percentage(%) </div></td></tr></table>';aD="maxviewlineChartLegendId"+aO.idNo;Ext.defer(function(){Ext.getCmp(aD).update(aS);},250);aC="maxviewlineChartId"+aO.idNo;ay="maxviewlineChartId"+aO.idNo+"-body";
var aJ=Ext.get("idForGettingWidth");var aN=aJ.getHeight()-200;var aT=ah.valueField;if(aT==undefined||aT=="undefined"||aT==""){aN=aJ.getHeight()-180;}else{if((aT.indexOf("hour")>-1)&&(aT=="24 hours"==false)){aN=aJ.getHeight()-180;}}try{var aE={};aE=jQuery.extend(true,{},getHighCharts(ay,aN,aJ.getWidth()-100,this.maxURL),aE);
aE.setData(aO.lineData,currentDateFormat,this.maxURL,true,"center");aE.drawChart();}catch(aP){console.log("exception in highchart method::"+aP);}},"resize":function(aF){var aG=Ext.get("idForGettingWidth");var aI=aG.getHeight()-200;var aJ=ah.valueField;if(aJ==undefined||aJ=="undefined"||aJ==""){aI=aG.getHeight()-170;
}else{if((aJ.indexOf("hour")>-1)&&(aJ=="24 hours"==false)){aI=aG.getHeight()-170;}}try{var aE={};aE=jQuery.extend(true,{},getHighCharts(ay,aI,aG.getWidth()-100,this.maxURL),aE);aE.setData(aF.lineData,currentDateFormat,this.maxURL,true,"center");aE.drawChart();}catch(aH){console.log("exception in highchart method::"+aH);
}}},bodyStyle:{"overflow-y":"auto"},}).show();}}]});}else{Y.push({xtype:"panel",border:false,frame:false,padding:0,ui:"egGraphPanel",header:{cls:"netflow_panel_graph_header",style:{"border-bottom":"1px solid #cccccc !important"},},title:al,columnWidth:0.5,margin:"5 5 10 5",items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table>"}]});
}}else{Y.push({xtype:"panel",border:false,frame:false,padding:0,ui:"egGraphPanel",title:al,columnWidth:0.5,layout:{type:"fit",align:"stretch",},flex:1,margin:"5 5 5 5",items:[{xtype:"container",height:280,html:ax}]});}}}});}else{Y.push({xtype:"panel",border:false,frame:false,padding:0,ui:"egGraphPanel",header:{cls:"netflow_panel_graph_header",style:{"border-bottom":"1px solid #cccccc !important"},},title:al,columnWidth:0.5,margin:"5 5 10 5",items:[{xtype:"container",height:280,html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div style="font-size:12px">'+ak+"! </div></td></tr></table>"}]});
}}}}});}Q.timelineComboArray=B;Q.selectedTimelineCombo=b;Q.timelineTitle=v;this.addNetflowTabtoolbar(Q);n={autoScroll:false,scroll:false,layout:{type:"hbox",align:"stretch"},flex:1,frame:false,items:[{xtype:"container",defaults:{margin:"0 10 10 10",},layout:{type:"vbox",align:"stretch",},width:220,items:V,},{xtype:"panel",columnWidth:1,layout:{type:"column",pack:"start",},title:'<span style="text-transform:uppercase">'+networkInterfacesLbl+"</span>",header:{style:{"background":"transparent","border":"none","padding":"4px 0px 0px 10px"},},flex:1,margin:0,frame:false,items:[{xtype:"panel",border:false,frame:false,columnWidth:1,layout:{type:"column",align:"stretch"},margin:"0 5 5 5",items:Y},]}]};
}else{if(l=="protocols"){var p=Q.DataURL;var P=localStorage.getItem("interfaceLastSelectedView");if(P!=null&&!Ext.isEmpty(P)){interfaceSelectedView=P;}var y=localStorage.getItem("showLastSelectedView");if(y!=null&&!Ext.isEmpty(y)){showVal=y;}var F=localStorage.getItem("timelineLastSelectedView");if(F!=null&&!Ext.isEmpty(F)){globalTimeline=F;
}if(interfaceSelectedView!=null){if(p!=null&&p.indexOf("interfaceToView")>0){p=p.replace(/(interfaceToView=)[^\&]+/,"$1"+encodeURIComponent(interfaceSelectedView));}else{p=p+"&interfaceToView="+encodeURIComponent(interfaceSelectedView);}if(p!=null&&p.indexOf("infosToArea")>0){p=p.replace(/(infosToArea=)[^\&]+/,"$1"+interfaceSelectedView);
}else{p=p+"&infosToArea="+encodeURIComponent(interfaceSelectedView);}}if(showVal!=null){if(p.indexOf("show")>-1){p=p.replace(/(show=)[^\&]+/,"$1"+encodeURIComponent(showVal));}else{p+="&show="+encodeURIComponent(showVal);}}if(globalTimeline!=null){if(p.indexOf("selectedTimeline")>-1){p=p.replace(/(selectedTimeline=)[^\&]+/,"$1"+encodeURIComponent(globalTimeline));
}else{p+="&selectedTimeline="+encodeURIComponent(globalTimeline);}if(p.indexOf("timeline")>-1){p=p.replace(/(timeline=)[^\&]+/,"$1"+encodeURIComponent(globalTimeline));}else{p+="&timeline="+encodeURIComponent(globalTimeline);}}netflowLastLoadedURL=p;if(netflowLastLoadedURL!=null&&netflowLastLoadedURL.indexOf("&ciscoSelectedType=")>0){netflowLastLoadedURL=netflowLastLoadedURL.replace(/(ciscoSelectedType=)[^\&]+/,"$1"+"protocols");
}else{netflowLastLoadedURL=netflowLastLoadedURL+"&ciscoSelectedType=protocols";}var c=noMeasureExcl;var m=noMeasureExcl;var O="";var S="";var D="";var i="";var z="";var A="";var H="";var h="";var s="";var M=false;var f="";var W="";var d="";var J=false;var X="";var K=p;if(K!=null&&K.indexOf("?")>-1){p=K.substr(0,K.indexOf("?"));
X=K.substr(K.indexOf("?")+1);}Ext.Ajax.request({url:p,method:"POST",params:X,scope:this,async:false,success:function(aa){if(!Ext.isEmpty(aa.responseText)){var ad=aa.responseText;var az=Ext.decode(ad);var ay=az["showChart"];var aD=az["fromView"];if(ay!=null&&ay=="true"){J=true;}var ab=az["PROTOCOLSTABLE"];
W=ab["errorMsg"];D=az["CHARTNTABLE_DATA"];pieTitle=az["pieTitle"];i=az["protocolTimelineCombo"];s=i["selectedTimelineCombo"];H=i["protocolTimelineComboArray"];var am=az["showCombo"];var aE=am["showComboArray"];S=am["selectedShowCombo"];var aU=az["protocolInterfaceCombo"];O=az["selectedInterfaceCombo"];
c=az["NoMeasureMsg"];var aV=az["pieChart"];if(aV!=null){m=aV[0]["NOMSG"];}f=az["Data"];var aS=az["isfromInterfaceComboChange"];var aK=az["isInterfaceCountExceeded"];var aw=az["timelineTitle"];var ae=az["eventsPerPageCombo"];var aB="";var ag="";if(aw!=null){Q.timelineTitle=aw;}if(aU!=null){Q.flowsInterfaceCombo=aU;
Q.flowsInterfaceSelectedCombo=O;}Q.timelineComboArray=H;Q.selectedTimelineCombo=s;if(am!=null){Q.showComboArray=aE;Q.selectedShowCombo=S;}if(ae!=null){aB=ae["eventsPerPageArray"];ag=ae["selectedEventsPerPage"];Q.eventsPerPageArray=aB;Q.selectedEventsPerPage=ag;}this.addNetflowTabtoolbar(Q);if(f=="true"){if(aD!=null&&aD=="SummaryView"&&aK){var ai="";
if(!Ext.isEmpty(m)){ai={xtype:"panel",flex:0.5,height:300,margin:5,layout:{type:"fit",},ui:"egGraphPanel",title:pieTitle,items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+m+"</div></td></tr></table>"}]};
}else{ai={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",title:pieTitle,id:"piechart",pieChartData:aV,listeners:{afterrender:function(){var aY=this;if(!Ext.isEmpty(aY.pieChartData)){try{var aW={};Ext.defer(function(){var aZ=Ext.getCmp("piechart");var a0=aZ.getWidth();aW=jQuery.extend(true,{},getPieChartsforNetflow("piechart-body","290",a0),aW);
aW.setData(aY.pieChartData[0]["XML_DATA"],currentDateFormat,"","ProtocolPieNetflow");aW.drawChart();},500);}catch(aX){console.log(aX);}$(window).resize(function(){if(Ext.isEmpty(m)){if($("#"+"piechart-body").highcharts()!=undefined){$("#"+"piechart-body").highcharts().reflow();}}});}}}};}var au="";var aO=az["comparisonCharts"];
if(!Ext.isEmpty(aO["NoMeasure"])){au={xtype:"panel",flex:0.5,height:300,margin:5,layout:{type:"fit",},ui:"egGraphPanel",title:az["barTitle"],items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+aO["NoMeasure"]+"</div></td></tr></table>"}]};
}else{au={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",title:az["barTitle"],id:"barGraphPanel",barData:aO,listeners:{afterrender:function(){var aY=this;if(!Ext.isEmpty(aY.barData)){try{var aW={};aW=jQuery.extend(true,{},getHighChartsBarInstance("barGraphPanel-body",270,600),aW);aW.setData(aY.barData["XML_DATA"],currentDateFormat,"","netflowconversationbar");
aW.drawChart();}catch(aX){console.log(aX);}}}}};}var ab=az["tableData"];var an=ab["tableColumns"];var aN=ab["tableValues"];if(aN!=null&&aN.length>0){var aR=new Array();var ax=new Array();var ak=new Array();var aF=0;for(var ao in an){ax.push({name:"COLUMVal_"+aF,type:"FLOATORSTRING"});ak.push({header:an[ao],dataIndex:"COLUMVal_"+aF,align:"left",flex:1,sortable:true,renderer:function(a3,aX,a1,a5,aZ,a4,aW){var a0=aW.getHeaderAtIndex(aZ);
var aY=a0.dataIndex;if(aY!=null&&(aY=="COLUMVal_3")){if(a3!=null&&a3!="-"){if(a3>0){var a2='<table width="100%" cellpadding="0" cellspacing="0" border="0"  height="8" class="prog_border">';a2+="<tr>";a2+='<td align="left" width="100%" height="8" >';a2+='<table width="'+a3+'%" height="8"  cellpadding="0" cellspacing="0" border="0">';
a2+="<tr>";a2+='<td class="progress_GOOD" width="100%"> </td>';a2+="</tr>";a2+="</table>";a2+="</td>";a2+="</tr>";a2+="</table>";a3="<table width='100%' cellpadding='0' cellspacing='0'><tr><td style='width:50px'><span>"+a3+"</span></td><td >"+a2+"</td></tr></table>";}}}return a3;}});aF++;}var aM=Ext.data.Store({fields:ax,data:aN,});
A={xtype:"grid",id:"gridDisplay",store:aM,height:290,margin:"0 10 10 10",title:az["TABLE_TITLE"],cls:"gridSkin",header:{style:{"padding":"2px 10px 0px 10px"}},columns:ak,tools:[{xtype:"tbfill",},{xtype:"trigger",trigger1Cls:"x-form-clear-trigger",trigger2Cls:"x-form-search-trigger",name:"gridSearch",margin:"0 10 2 10",id:"gridSearch",cls:"whitedropdown_search",emptyText:"Search",labelAlign:"top",width:200,hidden:false,getTriggerMarkup:function(){var a0=this,aY=0,a3=(a0.readOnly||a0.hideTrigger),aW,a1=a0.triggerBaseCls,a2=[],aZ=Ext.dom.Element.unselectableCls,aX="width:"+a0.triggerWidth+"px;"+(a3?"display:none;":""),a4=a0.extraTriggerCls+" "+Ext.baseCSSPrefix+"trigger-cell "+aZ;
if(!a0.trigger1Cls){a0.trigger1Cls=a0.triggerCls;}for(aY=0;(aW=a0["trigger"+(aY+1)+"Cls"])||aY<1;aY++){if(aY==0){a2.push({tag:"td",role:"presentation",valign:"top",cls:a4,id:"MyTrigger_"+aY,style:aX+"display:none;",cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+aY,a1,aW].join(" "),role:"presentation"}});
}else{a2.push({tag:"td",role:"presentation",valign:"top",cls:a4,id:"MyTrigger_"+aY,style:aX,cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+aY,a1,aW].join(" "),role:"presentation"}});}}a2[0].cn.cls+=" "+a1+"-first";return Ext.DomHelper.markup(a2);},onTrigger1Click:function(){this.reset();},onTrigger2Click:function(){appCnt.textFieldSearch();
},},{xtype:"button",iconCls:"iconMaximize",style:{"background":"transparent","border":"none"},listeners:{"afterrender":function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"Maximize View"});}},handler:function(){var aX=Ext.create("Ext.data.Store",{fields:ax,pageSize:aJ,autoLoad:true,proxy:{type:"ajax",url:netflowLastLoadedURL+"&isFromGridPage=true",reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a0,aZ,a3,a1){var a2=Ext.getCmp("netflowmainpanel");
if(a3){a2.setLoading(false,false);}else{a2.setLoading(true,true);}}}});var aY;aX.on("load",function(a3,a2){var a0=aX.data.length;var a6=aX.pageSize;var a4=aX.totalCount;var a5="";if(aX.proxy.reader.rawData!=null){a5=aX.proxy.reader.rawData.page;}var a1=aX.pageSize;var aZ=a4/a1;aZ=aZ.toString();if(aZ.indexOf(".")>-1){aZ=parseInt(aZ);
aZ=aZ+1;}else{aZ=parseInt(aZ);}if(a5>aZ){a5=aZ;configPanl.setLoading(true,true);}if((a4-a0)==0||(a5==1&&a4<=a6)){Ext.getCmp("maxPagingtoolbar").hide();}else{Ext.getCmp("maxPagingtoolbar").show();}});var aW=Ext.create("utilities.GenericWindow",{title:az["TABLE_TITLE"],width:"90%",height:"90%",cssMask:true,padding:"5 10 10 10",resizable:false,draggable:true,closeAction:"destroy",layout:"fit",scroll:true,border:false,items:{xtype:"grid",store:aX,columns:ak,layout:"fit",cls:"gridSkin",bbar:new Ext.PagingToolbar({store:aX,id:"maxPagingtoolbar",cls:"pagingtoolbar",pageSize:aJ,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a0=Ext.getCmp("gridSearch");
if(a0!=null){var a1=a0.value;if(a1!=""){var aZ=Ext.getCmp("gridDisplay");if(aZ!=""){aZ.store.filters.clear();}a0.reset();}}}}}),},bodyStyle:{"overflow-y":"auto"},}).show();}}]};}else{A={xtype:"panel",height:220,margin:"0 10 10 10",layout:{type:"fit",},ui:"egGraphPanel",title:az["TABLE_TITLE"],items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+noMeasureExcl+"</div></td></tr></table>"}]};
}h={xtype:"panel",tab:"Protocols",header:false,margin:5,layout:{type:"hbox",align:"stretch",},flex:1,items:[ai,au]};}else{if(aS){var au="";var aO=az["comparisonCharts"];if(!Ext.isEmpty(aO["NoMeasure"])){au={xtype:"panel",flex:0.5,height:300,margin:5,layout:{type:"fit",},ui:"egGraphPanel",title:az["barTitle"],items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+aO["NoMeasure"]+"</div></td></tr></table>"}]};
}else{au={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",title:az["barTitle"],id:"barGraphPanel",barData:aO,listeners:{afterrender:function(){var aY=this;if(!Ext.isEmpty(aY.barData)){try{var aW={};aW=jQuery.extend(true,{},getHighChartsBarInstance("barGraphPanel-body",270,600),aW);aW.setData(aY.barData["XML_DATA"],currentDateFormat,"","netflowconversationbar");
aW.drawChart();}catch(aX){console.log(aX);}}}}};}var ai="";if(!Ext.isEmpty(m)){ai={xtype:"panel",flex:0.5,height:300,margin:5,layout:{type:"fit",},ui:"egGraphPanel",title:pieTitle,items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+m+"</div></td></tr></table>"}]};
}else{ai={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",title:pieTitle,id:"piechart",pieChartData:aV,listeners:{afterrender:function(){var aY=this;if(!Ext.isEmpty(aY.pieChartData)){try{var aW={};Ext.defer(function(){var aZ=Ext.getCmp("piechart");var a0=aZ.getWidth();aW=jQuery.extend(true,{},getPieChartsforNetflow("piechart-body","290",a0),aW);
aW.setData(aY.pieChartData[0]["XML_DATA"],currentDateFormat,"","ProtocolPieNetflow");aW.drawChart();},500);}catch(aX){console.log(aX);}$(window).resize(function(){if(Ext.isEmpty(m)){if($("#"+"piechart-body").highcharts()!=undefined){$("#"+"piechart-body").highcharts().reflow();}}});}}}};}h={xtype:"panel",tab:"Protocols",header:false,margin:5,layout:{type:"hbox",align:"stretch",},flex:1,items:[ai,au]};
if(c=="undefined"||W=="-"){var an=ab["tableColumns"];var aN=ab["gridValues"];var aR=new Array();var ax=new Array();var ak=new Array();var aF=0;for(var ao in an){ax.push({name:"COLUMVal_"+aF,type:"string"});ak.push({header:an[ao],dataIndex:"COLUMVal_"+aF,align:"left",flex:1,sortable:true,renderer:function(a3,aX,a1,a5,aZ,a4,aW){var a0=aW.getHeaderAtIndex(aZ);
var aY=a0.dataIndex;if(aY!=null&&(aY=="COLUMVal_4"||aY=="COLUMVal_5")){if(a3!=null&&a3!="-"){if(a3>0){var a2='<table width="100%" cellpadding="0" cellspacing="0" border="0"  height="8" class="prog_border">';a2+="<tr>";a2+='<td align="left" width="100%" height="8" >';a2+='<table width="'+a3+'%" height="8"  cellpadding="0" cellspacing="0" border="0">';
a2+="<tr>";a2+='<td class="progress_GOOD" width="100%"> </td>';a2+="</tr>";a2+="</table>";a2+="</td>";a2+="</tr>";a2+="</table>";a3="<table width='100%' cellpadding='0' cellspacing='0'><tr><td style='width:50px'><span>"+a3+"</span></td><td >"+a2+"</td></tr></table>";}}}return a3;}});aF++;}var aJ;if(ag==undefined||ag=="undefined"){aJ=parseInt(aB[0].valueField);
}else{aJ=parseInt(ag);}var av="";var aA="";var aT={};if(netflowLastLoadedURL!=null&&netflowLastLoadedURL.indexOf("?")>-1){aA=netflowLastLoadedURL.substr(0,netflowLastLoadedURL.indexOf("?"));av=netflowLastLoadedURL.substr(netflowLastLoadedURL.indexOf("?")+1);if(!Ext.isEmpty(av)){var af=av.split("&");for(var aL in af){var aq=af[aL];
if(aq!=null&&aq.indexOf("=")>-1){var aC=aq.substr(0,aq.indexOf("="));var aj=aq.substr(aq.indexOf("=")+1);if(aC.toLowerCase()=="timeline"){aj=aj.replace(/\+/g,"%20");}aT[aC]=decodeURIComponent(aj);}}aT["isFromGridPage"]="true";}}var aM=Ext.create("Ext.data.Store",{fields:ax,pageSize:aJ,autoLoad:true,proxy:{type:"ajax",actionMethods:{create:"POST",read:"POST",update:"POST",destroy:"POST"},url:aA,extraParams:aT,reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(aX,aW,a0,aY){var aZ=Ext.getCmp("netflowmainpanel");
if(a0){aZ.setLoading(false,false);}else{aZ.setLoading(true,true);}}}});var j;aM.on("load",function(a0,aZ){var aX=aM.data.length;var a3=aM.pageSize;var a1=aM.totalCount;var a2="";if(aM.proxy.reader.rawData!=null){a2=aM.proxy.reader.rawData.page;}var aY=aM.pageSize;var aW=a1/aY;aW=aW.toString();if(aW.indexOf(".")>-1){aW=parseInt(aW);
aW=aW+1;}else{aW=parseInt(aW);}if(a2>aW){a2=aW;configPanl.setLoading(true,true);}if((a1-aX)==0||(a2==1&&a1<=a3)){if(Ext.getCmp("pagingtoolbar")!=null){Ext.getCmp("pagingtoolbar").hide();}}else{if(Ext.getCmp("pagingtoolbar")!=null){Ext.getCmp("pagingtoolbar").show();}}});A={xtype:"grid",id:"gridDisplay",store:aM,height:290,margin:"0 10 10 10",title:ab["TABLE_TITLE"],cls:"gridSkin",header:{style:{"padding":"2px 10px 0px 10px"}},columns:ak,bbar:new Ext.PagingToolbar({store:aM,id:"pagingtoolbar",cls:"pagingtoolbar",pageSize:aJ,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var aX=Ext.getCmp("gridSearch");
if(aX!=null){var aY=aX.value;if(aY!=""){var aW=Ext.getCmp("gridDisplay");if(aW!=""){aW.store.filters.clear();}aX.reset();}}}}}),tools:[{xtype:"tbfill",},{xtype:"trigger",trigger1Cls:"x-form-clear-trigger",trigger2Cls:"x-form-search-trigger",name:"gridSearch",margin:"0 10 2 10",id:"gridSearch",cls:"whitedropdown_search",emptyText:searchLbl,labelAlign:"top",width:200,hidden:false,getTriggerMarkup:function(){var a0=this,aY=0,a3=(a0.readOnly||a0.hideTrigger),aW,a1=a0.triggerBaseCls,a2=[],aZ=Ext.dom.Element.unselectableCls,aX="width:"+a0.triggerWidth+"px;"+(a3?"display:none;":""),a4=a0.extraTriggerCls+" "+Ext.baseCSSPrefix+"trigger-cell "+aZ;
if(!a0.trigger1Cls){a0.trigger1Cls=a0.triggerCls;}for(aY=0;(aW=a0["trigger"+(aY+1)+"Cls"])||aY<1;aY++){if(aY==0){a2.push({tag:"td",role:"presentation",valign:"top",cls:a4,id:"MyTrigger_"+aY,style:aX+"display:none;",cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+aY,a1,aW].join(" "),role:"presentation"}});
}else{a2.push({tag:"td",role:"presentation",valign:"top",cls:a4,id:"MyTrigger_"+aY,style:aX,cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+aY,a1,aW].join(" "),role:"presentation"}});}}a2[0].cn.cls+=" "+a1+"-first";return Ext.DomHelper.markup(a2);},onTrigger1Click:function(){this.reset();},onTrigger2Click:function(){appCnt.textFieldSearch();
},},{xtype:"button",iconCls:"iconMaximize",style:{"background":"transparent","border":"none"},listeners:{"afterrender":function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:maximizeViewLbl});}},handler:function(){var aX=Ext.create("Ext.data.Store",{fields:ax,pageSize:aJ,autoLoad:true,proxy:{type:"ajax",url:netflowLastLoadedURL+"&isFromGridPage=true",reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a0,aZ,a3,a1){var a2=Ext.getCmp("netflowmainpanel");
if(a3){a2.setLoading(false,false);}else{a2.setLoading(true,true);}}}});var aY;aX.on("load",function(a3,a2){var a0=aX.data.length;var a6=aX.pageSize;var a4=aX.totalCount;var a5="";if(aX.proxy.reader.rawData!=null){a5=aX.proxy.reader.rawData.page;}var a1=aX.pageSize;var aZ=a4/a1;aZ=aZ.toString();if(aZ.indexOf(".")>-1){aZ=parseInt(aZ);
aZ=aZ+1;}else{aZ=parseInt(aZ);}if(a5>aZ){a5=aZ;configPanl.setLoading(true,true);}if((a4-a0)==0||(a5==1&&a4<=a6)){Ext.getCmp("maxPagingtoolbar").hide();}else{Ext.getCmp("maxPagingtoolbar").show();}});var aW=Ext.create("utilities.GenericWindow",{title:ab["TABLE_TITLE"],width:"90%",height:"90%",cssMask:true,padding:"5 10 10 10",resizable:false,draggable:true,closeAction:"destroy",layout:"fit",scroll:true,border:false,items:{xtype:"grid",store:aX,columns:ak,layout:"fit",cls:"gridSkin",bbar:new Ext.PagingToolbar({store:aX,id:"maxPagingtoolbar",cls:"pagingtoolbar",pageSize:aJ,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a0=Ext.getCmp("gridSearch");
if(a0!=null){var a1=a0.value;if(a1!=""){var aZ=Ext.getCmp("gridDisplay");if(aZ!=""){aZ.store.filters.clear();}a0.reset();}}}}}),},bodyStyle:{"overflow-y":"auto"},}).show();}}]};}else{A={xtype:"panel",height:260,cls:"block1 ",header:{cls:"netflow_panel_graph_header",style:{"border-bottom":"1px solid #cccccc !important"},},margin:"0 10 10 10",title:protocolsLbl,layout:{type:"fit",align:"stretch",},items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+c+"</div></td></tr></table>"}]};
}}else{if(pieTitle!=null&&pieTitle!="undefined"){if(pieTitle.length>90){pieTitle=pieTitle.substr(0,90)+"...";}}var aP=400;if(aV.length==1){aP=410;}h={xtype:"genericpiechartslider",template:function(){var aX=this;var aW={};if(c==undefined||c=="undefined"){aW=new Ext.XTemplate("<ul>",'<tpl for=".">','<li ><div  class="netFlowPieChartRightBorder" style="margin:0 auto 10px 0"><div style="text-align:center;margin:10px 5px 0px 5px;">{XML_DATA.title}</div><div id="chartholder{#}" ></div></div></li>',"</tpl>","</ul>");
}else{aW=new Ext.XTemplate("<ul >",'<li align="center" ><table width="100%" height="200px" align = "center" ><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div > '+noMeasureExcl+"</div></td></tr></table></li>","</ul>");}return aW;doComponentLayout();},data:aV,loadChart:function(a3){var a2=this;
if(!Ext.isEmpty(a3)){var a1=1;for(var aY in a3){var aX=a1++;try{var aZ={};var aW=Ext.get("chartholder"+aX).dom;aZ=jQuery.extend(true,{},getPieChartsforNetflow("chartholder"+aX,250,410),aZ);aZ.setData(a3[aY]["XML_DATA"],currentDateFormat,"","ProtocolPieNetflow");aZ.drawChart();}catch(a0){console.log(a0);
}$(window).resize(function(){if(Ext.isEmpty(m)){if($("#"+"chartholder"+aX).highcharts()!=undefined){$("#"+"chartholder"+aX).highcharts().reflow();}}});}}},tab:"Protocols",title:pieTitle,margin:10,};if(c=="undefined"||W=="-"){var an=ab["tableColumns"];var aN=ab["gridValues"];var aR=new Array();var ax=new Array();
var ak=new Array();var aF=0;for(var ao in an){ax.push({name:"COLUMVal_"+aF,type:"string"});ak.push({header:an[ao],dataIndex:"COLUMVal_"+aF,align:"left",flex:1,sortable:true,renderer:function(a3,aX,a1,a5,aZ,a4,aW){var a0=aW.getHeaderAtIndex(aZ);var aY=a0.dataIndex;if(aY!=null&&(aY=="COLUMVal_4"||aY=="COLUMVal_5")){if(a3!=null&&a3!="-"){if(a3>0){var a2='<table width="100%" cellpadding="0" cellspacing="0" border="0"  height="8" class="prog_border">';
a2+="<tr>";a2+='<td align="left" width="100%" height="8" >';a2+='<table width="'+a3+'%" height="8"  cellpadding="0" cellspacing="0" border="0">';a2+="<tr>";a2+='<td class="progress_GOOD" width="100%"> </td>';a2+="</tr>";a2+="</table>";a2+="</td>";a2+="</tr>";a2+="</table>";a3="<table width='100%' cellpadding='0' cellspacing='0'><tr><td style='width:50px'><span>"+a3+"</span></td><td >"+a2+"</td></tr></table>";
}}}return a3;}});aF++;}var aJ;if(ag==undefined||ag=="undefined"){aJ=parseInt(aB[0].valueField);}else{aJ=parseInt(ag);}var av="";var aA="";var aT={};if(netflowLastLoadedURL!=null&&netflowLastLoadedURL.indexOf("?")>-1){aA=netflowLastLoadedURL.substr(0,netflowLastLoadedURL.indexOf("?"));av=netflowLastLoadedURL.substr(netflowLastLoadedURL.indexOf("?")+1);
if(!Ext.isEmpty(av)){var af=av.split("&");for(var aL in af){var aq=af[aL];if(aq!=null&&aq.indexOf("=")>-1){var aC=aq.substr(0,aq.indexOf("="));var aj=aq.substr(aq.indexOf("=")+1);if(aC.toLowerCase()=="timeline"){aj=aj.replace(/\+/g,"%20");}aT[aC]=decodeURIComponent(aj);}}aT["isFromGridPage"]="true";}}var aM=Ext.create("Ext.data.Store",{fields:ax,pageSize:aJ,autoLoad:true,proxy:{type:"ajax",actionMethods:{create:"POST",read:"POST",update:"POST",destroy:"POST"},url:aA,extraParams:aT,reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(aX,aW,a0,aY){var aZ=Ext.getCmp("netflowmainpanel");
if(a0){aZ.setLoading(false,false);}else{aZ.setLoading(true,true);}}}});var j;aM.on("load",function(a0,aZ){var aX=aM.data.length;var a3=aM.pageSize;var a1=aM.totalCount;var a2="";if(aM.proxy.reader.rawData!=null){a2=aM.proxy.reader.rawData.page;}var aY=aM.pageSize;var aW=a1/aY;aW=aW.toString();if(aW.indexOf(".")>-1){aW=parseInt(aW);
aW=aW+1;}else{aW=parseInt(aW);}if(a2>aW){a2=aW;configPanl.setLoading(true,true);}if((a1-aX)==0||(a2==1&&a1<=a3)){if(Ext.getCmp("pagingtoolbar")!=null){Ext.getCmp("pagingtoolbar").hide();}}else{if(Ext.getCmp("pagingtoolbar")!=null){Ext.getCmp("pagingtoolbar").show();}}});A={xtype:"grid",id:"gridDisplay",store:aM,height:300,margin:"0 10 10 10",title:ab["TABLE_TITLE"],cls:"gridSkin",header:{style:{"padding":"2px 10px 0px 10px"}},columns:ak,bbar:new Ext.PagingToolbar({store:aM,id:"pagingtoolbar",cls:"pagingtoolbar",pageSize:aJ,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var aX=Ext.getCmp("gridSearch");
if(aX!=null){var aY=aX.value;if(aY!=""){var aW=Ext.getCmp("gridDisplay");if(aW!=""){aW.store.filters.clear();}aX.reset();}}}}}),tools:[{xtype:"tbfill",},{xtype:"trigger",trigger1Cls:"x-form-clear-trigger",trigger2Cls:"x-form-search-trigger",name:"gridSearch",margin:"0 10 2 10",id:"gridSearch",cls:"whitedropdown_search",emptyText:searchLbl,labelAlign:"top",width:200,hidden:false,getTriggerMarkup:function(){var a0=this,aY=0,a3=(a0.readOnly||a0.hideTrigger),aW,a1=a0.triggerBaseCls,a2=[],aZ=Ext.dom.Element.unselectableCls,aX="width:"+a0.triggerWidth+"px;"+(a3?"display:none;":""),a4=a0.extraTriggerCls+" "+Ext.baseCSSPrefix+"trigger-cell "+aZ;
if(!a0.trigger1Cls){a0.trigger1Cls=a0.triggerCls;}for(aY=0;(aW=a0["trigger"+(aY+1)+"Cls"])||aY<1;aY++){if(aY==0){a2.push({tag:"td",role:"presentation",valign:"top",cls:a4,id:"MyTrigger_"+aY,style:aX+"display:none;",cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+aY,a1,aW].join(" "),role:"presentation"}});
}else{a2.push({tag:"td",role:"presentation",valign:"top",cls:a4,id:"MyTrigger_"+aY,style:aX,cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+aY,a1,aW].join(" "),role:"presentation"}});}}a2[0].cn.cls+=" "+a1+"-first";return Ext.DomHelper.markup(a2);},onTrigger1Click:function(){this.reset();},onTrigger2Click:function(){appCnt.textFieldSearch();
},},{xtype:"button",iconCls:"iconMaximize",style:{"background":"transparent","border":"none"},listeners:{"afterrender":function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:maximizeViewLbl});}},handler:function(){var aX=Ext.create("Ext.data.Store",{fields:ax,pageSize:aJ,autoLoad:true,proxy:{type:"ajax",url:netflowLastLoadedURL+"&isFromGridPage=true",reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a0,aZ,a3,a1){var a2=Ext.getCmp("netflowmainpanel");
if(a3){a2.setLoading(false,false);}else{a2.setLoading(true,true);}}}});var aY;aX.on("load",function(a3,a2){var a0=aX.data.length;var a6=aX.pageSize;var a4=aX.totalCount;var a5="";if(aX.proxy.reader.rawData!=null){a5=aX.proxy.reader.rawData.page;}var a1=aX.pageSize;var aZ=a4/a1;aZ=aZ.toString();if(aZ.indexOf(".")>-1){aZ=parseInt(aZ);
aZ=aZ+1;}else{aZ=parseInt(aZ);}if(a5>aZ){a5=aZ;configPanl.setLoading(true,true);}if((a4-a0)==0||(a5==1&&a4<=a6)){Ext.getCmp("maxPagingtoolbar").hide();}else{Ext.getCmp("maxPagingtoolbar").show();}});var aW=Ext.create("utilities.GenericWindow",{title:ab["TABLE_TITLE"],width:"90%",height:"90%",cssMask:true,padding:"5 10 10 10",resizable:false,draggable:true,closeAction:"destroy",layout:"fit",scroll:true,border:false,items:{xtype:"grid",store:aX,columns:ak,layout:"fit",cls:"gridSkin",bbar:new Ext.PagingToolbar({store:aX,id:"maxPagingtoolbar",cls:"pagingtoolbar",pageSize:aJ,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a0=Ext.getCmp("gridSearch");
if(a0!=null){var a1=a0.value;if(a1!=""){var aZ=Ext.getCmp("gridDisplay");if(aZ!=""){aZ.store.filters.clear();}a0.reset();}}}}}),},bodyStyle:{"overflow-y":"auto"},}).show();}}]};}else{A={xtype:"panel",height:260,cls:"block1 ",header:{cls:"netflow_panel_graph_header",style:{"border-bottom":"1px solid #cccccc !important"},},margin:"0 10 10 10",title:protocolsLbl,layout:{type:"fit",align:"stretch",},items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+c+"</div></td></tr></table>"}]};
}}}}if(J){if(c==null&&c=="undefined"||Ext.isEmpty(c)&&!Ext.isEmpty(D)&&D.length>0){var aG=D[0]["TITLE"];if(aG.length>90){aG=aG.substr(0,90)+"...";}var aI=i["monitor.dashboard.TimeLine"];z=D[0]["areaChartURL"];var ap=D[0]["Timeline"];var ac=D[0]["startDate"];var al=D[0]["startHr"];var at=D[0]["endDate"];
var ah=D[0]["endHr"];var ar=D[0]["startMin"];var aH=D[0]["endMin"];try{Ext.Ajax.request({url:"/final/servlet/com.egurkha.monitor.CustomTimelineMeasures",scope:this,params:z,async:false,method:"POST",success:function(aW){if(aW.status==200&&!Ext.isEmpty(aW.responseText)){var a0=aW.responseText;if(a0.indexOf("div")==-1&&a0.indexOf("png")==-1&&a0.indexOf("PNG")==-1&&a0.indexOf("gif")==-1&&a0.indexOf("GIF")==-1&&(a0.indexOf("iconExclamation")==-1||a0.indexOf("iconInformation")==-1)){var aY=Ext.decode(a0);
if(aY!=null&&aY.hasOwnProperty("DataSet")&&(aY["DataSet"].length>0)){var aX="";var aZ="";d={xtype:"panel",border:false,frame:false,margin:"0 10 10 10",padding:0,id:"ProtocolLineChart1",ui:"egGraphPanel",title:aG,lineData:aY,height:300,layout:{type:"column",align:"stretch",pack:"start"},items:[{xtype:"container",id:"ProtocolLineChartId",height:270,margin:"20 20 10 20",columnWidth:1,},{xtype:"container",id:"ProtocolLineChartLegendId",width:250,height:230,autoScroll:true,border:false,margin:"20 0 10 10",style:{"border":"0px solid red"},}],listeners:{"boxready":function(bf){var a7=netflowLastLoadedURL.substring(netflowLastLoadedURL.indexOf("&interfaceToView=")+17);
var bd="";var bc=aY["DataSet"];bd+='<table width="100%" ><tr><td>';for(var a6 in bc){var a5=bc[a6];if(a5!=null&&a5.hasOwnProperty("dispLegend")){var a3=a5["dispLegend"];var bg=a5["measVal"];if(bg!=null&&bg!="NA"){var a4=a5["layerModelUrl"];var a2=a5["color"];var a8=a5["unit"];var bb=a3;if(bb.length>25){var a3=a3.substr(0,24)+"...";
}if(a3!=null&&a3!="-"&&bg!=null&&bg!="-"){bd+='<div style="float:left;width:8px;height:8px;margin:5px 4px;background:'+a2+';"></div>';bd+='<div style="float:left;width:150px;height;20px;margin:2px;" ><a href=\'javascript:wayToLayerModelForArea("'+encodeURIComponent(a4)+'")\'><span class="status font_normal10" data-qtip="'+bb+'">'+a3+"</span></a>";
}bd+="</div>";if(bg!=null&&bg!="-"){bd+='<div style="float:left;width:60px;height;20px;margin:2px;" class="font_normal10" data-qtip="'+bb+"&nbsp("+a8+")&nbsp&nbsp"+bg+'"><a href=\'javascript:wayToLayerModelForArea("'+encodeURIComponent(a4)+"\")'>"+bg+"</a></div>";}bd+='<div style="clear:both"></div>';
}}}bd+='<div style="clear:both" class="font_normal9">* All values are in percentage(%) </div></td></tr></table>';Ext.defer(function(){Ext.getCmp("ProtocolLineChartLegendId").update(bd);},250);var be=ap.valueField;var a9=bf.getHeight()-50;if(be==undefined||be=="undefined"||be==""){a9=bf.getHeight()-20;
}else{if((be.indexOf("hour")>-1||be.indexOf("mins")>-1)&&(be=="24 hours"==false)){a9=bf.getHeight()-20;}}try{var a1={};a1=jQuery.extend(true,{},getHighCharts("ProtocolLineChartId",a9,bf.getWidth()-330,this.maxURL,false),a1);a1.setData(bf.lineData,currentDateFormat,this.maxURL,true,"right");a1.drawChart();
}catch(ba){console.log("exception in highchart method::"+ba);}},"resize":function(a2){try{var a1={};var a5=ap.valueField;var a4=a2.getHeight()-50;if(a5==undefined||a5=="undefined"){a4=a2.getHeight()-20;}else{if((a5.indexOf("hour")>-1||a5.indexOf("mins")>-1)&&(a5=="24 hours"==false)){a4=a2.getHeight()-20;
}}a1=jQuery.extend(true,{},getHighCharts("ProtocolLineChartId",a4,a2.getWidth()-330,this.maxURL,false),a1);a1.setData(a2.lineData,currentDateFormat,this.maxURL,true,"right");a1.drawChart();}catch(a3){console.log("exception in highchart method::"+a3);}}},tools:[{xtype:"button",iconCls:"iconMaximize",lineData:aY,margin:"0 0 0 20",style:{"background":"transparent","border":"none"},listeners:{"afterrender":function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:maximizeViewLbl});
}},handler:function(){var a1=Ext.create("utilities.GenericWindow",{xtype:"panel",title:aG,lineData:this.lineData,width:"90%",height:"90%",cssMask:true,padding:"5 10 10 10",id:"idForGettingWidthProtocol",resizable:false,draggable:true,closeAction:"destroy",scroll:true,layout:{type:"fit",pack:"center",align:"center"},items:[{xtype:"panel",layout:{type:"vbox",align:"center",pack:"start"},columnWidth:1,items:[{xtype:"container",id:"maxviewProtocolLineChartLegendId",height:60,autoScroll:true,border:true,layout:"fit",margin:"10 20 10 10",},{xtype:"container",id:"maxviewProtocolLineChartId",margin:10,}],tbar:[{xtype:"container",layout:{type:"hbox",pack:"center",align:"center"},flex:1,height:70,defaults:{labelAlign:"top",},margin:"10 10 0 10",items:[{xtype:"timeline",cls:"timeline_left",id:"protocolTimelineNetflow",name:"protocolTimelineNetflow",margin:"10 0 0 10",hidden:false,hideMinutes:false,layout:{type:"hbox",pack:"center",align:"center"},},{xtype:"button",text:"Submit",margin:"31 0 0 10",text:"SUBMIT",cls:"button20",width:60,id:"protocolSubmitNetflow",name:"protocolSubmitNetflow",listeners:{"click":function(a8){var a2=z.substring(0,z.indexOf("&Timeline"));
var bb=Ext.getCmp("er_timeline").getValue();var a4=Ext.getCmp("er_stdate").getValue();var a3=Ext.getCmp("er_sthr").getValue();var a5=Ext.getCmp("er_stmin").getValue();var a7=Ext.getCmp("er_enddate").getValue();var a6=Ext.getCmp("er_endhr").getValue();var a9=Ext.getCmp("er_endmin").getValue();if(bb=="Any"){a4=Ext.Date.dateFormat(a4,"m/d/Y");
a7=Ext.Date.dateFormat(a7,"m/d/Y");}else{a4=Ext.Date.dateFormat(a4,"m/d/Y");a7=Ext.Date.dateFormat(a7,"m/d/Y");}var ba=bb;if(bb=="30 mins"){bb="Any";}a2=a2+"&Timeline="+bb+"&TimePeriod="+encodeURIComponent(a4+" "+a3+":"+a5+"|"+a7+" "+a6+":"+a9);a2=a2+z.substring(z.indexOf("&components"));Ext.Ajax.request({url:a2,scope:this,async:false,success:function(bc){if(bc.status==200&&!Ext.isEmpty(bc.responseText)){var bq=bc.responseText;
if(bq.indexOf("png")==-1&&bq.indexOf("PNG")==-1&&bq.indexOf("gif")==-1&&bq.indexOf("GIF")==-1&&(bq.indexOf("iconExclamation")==-1||bq.indexOf("iconInformation")==-1)){var br=Ext.decode(bq);if(br!=null&&br.hasOwnProperty("DataSet")){var bf="";var bm=br["DataSet"];bf+='<table width="600px"><tr><td width="100%">';
for(var bn in bm){bf+='<div style="float:left;margin-right:10px">';var bh=bm[bn];if(bh!=null&&bh.hasOwnProperty("dispLegend")){var bk=bh["dispLegend"];var bd=bh["measVal"];if(bd!=null&&bd!="NA"){var bj=bh["layerModelUrl"];var be=bh["color"];var bl=bh["unit"];var bi=bk;if(bi.length>25){var bk=bk.substr(0,22)+"...";
}if(bk!=null&&bk!="-"&&bd!=null&&bd!="-"){bf+='<div style="float:left;width:8px;height:8px;margin:5px 4px;background:'+be+';"></div>';bf+='<div style="float:left;width:150px;height;20px;margin:2px 10px 2px 2px;" ><a href=\'javascript:wayToLayerModelForArea("'+encodeURIComponent(bj)+'")\'><span class="status font_normal10" data-qtip="'+bi+'">'+bk+"</span></a>";
}bf+="</div>";if(bd!=null&&bd!="-"){bf+='<div style="float:left;width:60px;height;20px;margin:2px;" class="font_normal10" data-qtip="'+bi+"&nbsp("+bl+")&nbsp&nbsp"+bd+'"><a href=\'javascript:wayToLayerModelForArea("'+encodeURIComponent(bj)+"\")'>"+bd+"</a></div>";}}}bf+="</div>";}bf+='<div style="clear:both" class="font_normal9">* All values are in percentage(%) </div></td></tr></table>';
Ext.defer(function(){Ext.getCmp("maxviewProtocolLineChartLegendId").update(bf);Ext.getCmp("maxviewProtocolLineChartLegendId").addCls("linesquare");},250);var bo="maxviewProtocolLineChartId";var bt=Ext.get("idForGettingWidthProtocol");var bg=bt.getHeight()-230;if(ba==undefined||ba=="undefined"||ba==""){bg=bt.getHeight()-200;
}else{if((ba.indexOf("hour")>-1||ba.indexOf("mins")>-1)&&(ba=="24 hours"==false)){bg=bt.getHeight()-200;}}try{var bs={};bs=jQuery.extend(true,{},getHighCharts(bo,bg,bt.getWidth()-100,this.maxURL,false),bs);bs.setData(br,currentDateFormat,"",true,"center");bs.drawChart();}catch(bp){console.log("exception in highchart method::"+bp);
}}else{Ext.getCmp("maxviewProtocolLineChartLegendId").update("");var bt=Ext.get("idForGettingWidthProtocol");Ext.getCmp("maxviewProtocolLineChartLegendId").removeCls("linesquare");var bg=bt.getHeight()-230;Ext.getCmp("maxviewProtocolLineChartId").setHeight(bg);Ext.getCmp("maxviewProtocolLineChartId").update('<div style="margin-top:85px;"><table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table></div>");
}}else{Ext.getCmp("maxviewProtocolLineChartLegendId").update("");var bt=Ext.get("idForGettingWidthProtocol");Ext.getCmp("maxviewProtocolLineChartLegendId").removeCls("linesquare");var bg=bt.getHeight()-230;Ext.getCmp("maxviewProtocolLineChartId").setHeight(bg);Ext.getCmp("maxviewProtocolLineChartId").update('<div style="margin-top:85px;"><table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div style="font-size:12px">'+noMeasure+"! </div></td></tr></table></div>");
}}}});}},}]}],}],listeners:{"boxready":function(a4){Ext.getCmp("er_timeline").getStore().loadRawData(H);var a5=s;var a6=a5[0];if(a6=="Any"){Ext.getCmp("er_timeline").setValue(a6);Ext.getCmp("er_stdate").setValue(a5[1].anyStartDate);Ext.getCmp("er_sthr").setValue(a5[1].anyStartHr);Ext.getCmp("er_stmin").setValue(a5[1].anyStartMin);
Ext.getCmp("er_enddate").setValue(a5[1].anyEndDate);Ext.getCmp("er_endhr").setValue(a5[1].anyEndHr);Ext.getCmp("er_endmin").setValue(a5[1].anyEndMin);}else{Ext.getCmp("er_timeline").setValue(a6);Ext.getCmp("er_timeline").fireEvent("select",Ext.getCmp("er_timeline"));}var a8="";var bf=aY["DataSet"];a8+='<table width="660px"><tr><td width="100%">';
for(var bg in bf){a8+='<div style="float:left;margin-right:30px">';var ba=bf[bg];if(ba!=null&&ba.hasOwnProperty("dispLegend")){var bd=ba["dispLegend"];var a2=ba["measVal"];if(a2!=null&&a2!="NA"){var bc=ba["layerModelUrl"];var a7=ba["color"];var be=ba["unit"];var bb=bd;if(bb.length>25){var bd=bd.substr(0,22)+"...";
}if(bd!=null&&bd!="-"&&a2!=null&&a2!="-"){a8+='<div style="float:left;width:8px;height:8px;margin:5px 4px;background:'+a7+';"></div>';a8+='<div style="float:left;width:150px;height;20px;margin:2px 10px 2px 2px;" ><a href=\'javascript:wayToLayerModelForArea("'+encodeURIComponent(bc)+'")\'><span class="status font_normal10" data-qtip="'+bb+'">'+bd+"</span></a>";
}a8+="</div>";if(a2!=null&&a2!="-"){a8+='<div style="float:left;width:60px;height;20px;margin:2px;" class="font_normal10" data-qtip="'+bb+"&nbsp("+be+")&nbsp&nbsp"+a2+'"><a href=\'javascript:wayToLayerModelForArea("'+encodeURIComponent(bc)+"\")'>"+a2+"</a></div>";}}}a8+="</div>";}a8+='<div style="clear:both" class="font_normal9">* All values are in percentage(%) </div></td></tr></table>';
Ext.defer(function(){Ext.getCmp("maxviewProtocolLineChartLegendId").update(a8);Ext.getCmp("maxviewProtocolLineChartLegendId").addCls("linesquare");},250);var bh="maxviewProtocolLineChartId";var bk=Ext.get("idForGettingWidthProtocol");var a9=bk.getHeight()-230;var a3=a6;if(a3==undefined||a3=="undefined"||a3==""){a9=bk.getHeight()-200;
}else{if((a3.indexOf("hour")>-1||a3.indexOf("mins")>-1)&&(a3=="24 hours"==false)){a9=bk.getHeight()-200;}}try{var bj={};bj=jQuery.extend(true,{},getHighCharts(bh,a9,bk.getWidth()-100,this.maxURL,false),bj);bj.setData(a4.lineData,currentDateFormat,"",true,"center");bj.drawChart();}catch(bi){console.log("exception in highchart method::"+bi);
}},"resize":function(a5){var a4="maxviewProtocolLineChartId";var a3=Ext.get("idForGettingWidthProtocol");var a7=a3.getHeight()-230;var a8=s[0];if(a8==undefined||a8=="undefined"||a8==""){a7=a3.getHeight()-200;}else{if((a8.indexOf("hour")>-1||a8.indexOf("mins")>-1)&&(a8=="24 hours"==false)){a7=a3.getHeight()-200;
}}try{var a2={};a2=jQuery.extend(true,{},getHighCharts(a4,a7,a3.getWidth()-100,this.maxURL,false),a2);a2.setData(a5.lineData,currentDateFormat,"",true,"center");a2.drawChart();}catch(a6){console.log("exception in highchart method::"+a6);}}},autoScroll:true,bodyStyle:{"overflow-y":"auto"},}).show();}}]};
}else{d={xtype:"panel",border:false,frame:false,height:200,margin:"0 10 10 10",padding:0,title:bandwidthAppLbl,ui:"egGraphPanel",layout:{type:"fit",align:"stretch",},items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+noMeasure+"!</div></td></tr></table>"}]};
}}else{d={xtype:"panel",border:false,frame:false,margin:"0 10 10 10",padding:0,height:200,title:bandwidthAppLbl,ui:"egGraphPanel",layout:{type:"fit",align:"stretch",},items:[{xtype:"container",html:'<table width="100%" height="100%" border="0"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div style="font-size:12px">'+noMeasure+"!</div></td></tr></table>"}]};
}}},failure:function(aW){console.log(aW);}});}catch(aQ){console.log("exception in loading charts::"+aQ);}}else{d={xtype:"panel",border:false,frame:false,padding:0,height:200,title:bandwidthAppLbl,ui:"egGraphPanel",margin:"0 10 10 10",layout:{type:"fit",align:"stretch",},items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+noMeasure+"!</div></td></tr></table>"}]};
}}}}});if(f=="true"){if(J){n={autoScroll:true,scroll:true,layout:{type:"auto",},flex:1,items:[{xtype:"panel",flex:1,layout:{type:"vbox",pack:"start",align:"stretch"},defaults:{margin:10,},items:[h,A,d]}]};}else{n={autoScroll:true,scroll:true,style:{},border:true,flex:1,layout:{type:"vbox",pack:"start",align:"stretch"},defaults:{margin:5,},items:[h,A]};
}}else{c=m;if(c=="undefined"||c==undefined){c=noMeasure+"!";}var L=Ext.getBody().getHeight()-100;n={autoScroll:false,scroll:false,height:L,layout:{type:"fit",align:"stretch"},scroll:false,autoScroll:false,flex:1,items:[{xtype:"panel",scroll:false,autoScroll:false,flex:1,layout:{type:"fit",align:"stretch",},defaults:{margin:0,},items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div>'+c+"</div></td></tr></table>"}]}]};
}}else{if(l=="topsources"){var Z=Q.DataURL;var P=localStorage.getItem("interfaceLastSelectedView");if(P!=null&&!Ext.isEmpty(P)){interfaceSelectedView=P;}var y=localStorage.getItem("showLastSelectedView");if(y!=null&&!Ext.isEmpty(y)){showVal=y;}var F=localStorage.getItem("timelineLastSelectedView");if(F!=null&&!Ext.isEmpty(F)){globalTimeline=F;
}if(interfaceSelectedView!=null){if(Z!=null&&Z.indexOf("interfaceToView")>0){Z=Z.replace(/(interfaceToView=)[^\&]+/,"$1"+encodeURIComponent(interfaceSelectedView));}else{Z=Z+"&interfaceToView="+encodeURIComponent(interfaceSelectedView);}if(Z!=null&&Z.indexOf("infosToArea")>0){Z=Z.replace(/(infosToArea=)[^\&]+/,"$1"+interfaceSelectedView);
}else{Z=Z+"&infosToArea="+encodeURIComponent(interfaceSelectedView);}}if(showVal!=null){if(Z.indexOf("show")>-1){Z=Z.replace(/(show=)[^\&]+/,"$1"+encodeURIComponent(showVal));}else{Z+="&show="+encodeURIComponent(showVal);}}if(globalTimeline!=null){if(Z.indexOf("selectedTimeline")>-1){Z=Z.replace(/(selectedTimeline=)[^\&]+/,"$1"+encodeURIComponent(globalTimeline));
}else{Z+="&selectedTimeline="+encodeURIComponent(globalTimeline);}if(Z.indexOf("timeline")>-1){Z=Z.replace(/(timeline=)[^\&]+/,"$1"+encodeURIComponent(globalTimeline));}else{Z+="&timeline="+encodeURIComponent(globalTimeline);}}netflowLastLoadedURL=Z;if(netflowLastLoadedURL!=null&&netflowLastLoadedURL.indexOf("&ciscoSelectedType=")>0){netflowLastLoadedURL=netflowLastLoadedURL.replace(/(ciscoSelectedType=)[^\&]+/,"$1"+"flows");
}else{netflowLastLoadedURL=netflowLastLoadedURL+"&ciscoSelectedType=flows";}var L=Ext.getBody().getHeight()-100;var I=[];var k="";var g="";var q="";var E="";if(Z!=null&&Z.indexOf("?")>-1){E=Z.substr(0,Z.indexOf("?"));q=Z.substr(Z.indexOf("?")+1);}Ext.Ajax.request({url:E,params:q+"&flowsTest=TopSourceTest",method:"POST",scope:this,async:false,success:function(aa){if(aa.status==200&&!Ext.isEmpty(aa.responseText)){var ad=aa.responseText;
var az=Ext.decode(ad);var ay=az["timelineCombo"];var aX=ay["selectedTimelineCombo"];var aY=ay["timelineComboArray"];var aE=ay["monitor.dashboard.TimeLine"];var aN=az["flowsInterfaceCombo"];var ab=az["flowsInterfaceSelectedCombo"];var am=az["showCombo"];var ae=az["eventsPerPageCombo"];var aD=az["fromView"];
var aB="";var ah="";var aF="";var aM="";var aP="";var aR="";if(az["flowsPieArr"]!=null&&az["flowsPieArr"].length>0){aP=az["flowsPieArr"][0]["DATA_0"];f=aP["Data"];aR=aP["ErrorMsg"];}if(aD!=null&&aD=="SummaryView"){f=az["Data"];}var au=az["timelineTitle"];if(au!=null){Q.timelineTitle=au;}var aZ=az["pieChart"];
if(aZ!=null){m=aZ[0]["NOMSG"];}var aw=az["pieTitle"];Q.timelineComboArray=aY;Q.selectedTimelineCombo=aX;if(aN!=null){Q.flowsInterfaceCombo=aN;Q.flowsInterfaceSelectedCombo=ab;}if(am!=null){aF=am["showComboArray"];aM=am["selectedShowCombo"];Q.showComboArray=aF;Q.selectedShowCombo=aM;}if(ae!=null){aB=ae["eventsPerPageArray"];
ah=ae["selectedEventsPerPage"];Q.eventsPerPageArray=aB;Q.selectedEventsPerPage=ah;}this.addNetflowTabtoolbar(Q);var aU=az["isfromInterfaceComboChange"];var aI=az["isInterfaceCountExceeded"];if(f!=null&&f=="true"){if(aD!=null&&aD=="SummaryView"&&aI){var ai="";if(!Ext.isEmpty(m)){ai={xtype:"panel",flex:0.5,height:300,margin:5,layout:{type:"fit",},ui:"egGraphPanel",title:aw,items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+m+"</div></td></tr></table>"}]};
}else{ai={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",title:aw,id:"topSourcepiechart",pieChartData:aZ,listeners:{afterrender:function(){var a2=this;if(!Ext.isEmpty(a2.pieChartData)){try{var a0={};Ext.defer(function(){var a3=Ext.getCmp("topSourcepiechart");var a4=a3.getWidth();a0=jQuery.extend(true,{},getPieChartsforNetflow("topSourcepiechart-body","290",a4),a0);
a0.setData(a2.pieChartData[0]["XML_DATA"],currentDateFormat,"","ProtocolPieNetflow");a0.drawChart();},500);}catch(a1){console.log(a1);}$(window).resize(function(){if(Ext.isEmpty(m)){if($("#"+"topSourcepiechart-body").highcharts()!=undefined){$("#"+"topSourcepiechart-body").highcharts().reflow();}}});
}}}};}var at="";var aQ=az["comparisonCharts"];if(!Ext.isEmpty(aQ["NoMeasure"])){at={xtype:"panel",flex:0.5,height:300,margin:5,layout:{type:"fit",},ui:"egGraphPanel",title:az["barTitle"],items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+aQ["NoMeasure"]+"</div></td></tr></table>"}]};
}else{at={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",title:az["barTitle"],id:"topSourcebarGraphPanel",barData:aQ,listeners:{afterrender:function(){var a2=this;if(!Ext.isEmpty(a2.barData)){try{var a0={};a0=jQuery.extend(true,{},getHighChartsBarInstance("topSourcebarGraphPanel-body",270,600),a0);
a0.setData(a2.barData["XML_DATA"],currentDateFormat,"","netflowconversationbar");a0.drawChart();}catch(a1){console.log(a1);}}}}};}var aq="";var ac=az["tableData"];var ag=ac["tableColumns"];var aO=ac["tableValues"];if(aO!=null&&aO.length>0){var aT=new Array();var av=new Array();var al=new Array();var aG=0;
for(var ao in ag){av.push({name:"COLUMVal_"+aG,type:"FLOATORSTRING"});al.push({header:ag[ao],dataIndex:"COLUMVal_"+aG,align:"left",flex:1,sortable:true,renderer:function(a7,a1,a5,a9,a3,a8,a0){var a4=a0.getHeaderAtIndex(a3);var a2=a4.dataIndex;if(a2!=null&&(a2=="COLUMVal_3")){if(a7!=null&&a7!="-"){if(a7>0){var a6='<table width="100%" cellpadding="0" cellspacing="0" border="0"  height="8" class="prog_border">';
a6+="<tr>";a6+='<td align="left" width="100%" height="8" >';a6+='<table width="'+a7+'%" height="8"  cellpadding="0" cellspacing="0" border="0">';a6+="<tr>";a6+='<td class="progress_GOOD" width="100%"> </td>';a6+="</tr>";a6+="</table>";a6+="</td>";a6+="</tr>";a6+="</table>";a7="<table width='100%' cellpadding='0' cellspacing='0'><tr><td style='width:50px'><span>"+a7+"</span></td><td >"+a6+"</td></tr></table>";
}}}return a7;}});aG++;}var aL=Ext.data.Store({fields:av,data:aO,sortOnLoad:true,});aq={xtype:"grid",id:"gridDisplay",store:aL,height:290,margin:"0 10 10 10",title:az["TABLE_TITLE"],cls:"gridSkin",header:{style:{"padding":"2px 10px 0px 10px"}},columns:al,tools:[{xtype:"tbfill",},{xtype:"trigger",trigger1Cls:"x-form-clear-trigger",trigger2Cls:"x-form-search-trigger",name:"gridSearch",margin:"0 10 2 10",id:"gridSearch",cls:"whitedropdown_search",emptyText:"Search",labelAlign:"top",width:200,hidden:false,getTriggerMarkup:function(){var a4=this,a2=0,a7=(a4.readOnly||a4.hideTrigger),a0,a5=a4.triggerBaseCls,a6=[],a3=Ext.dom.Element.unselectableCls,a1="width:"+a4.triggerWidth+"px;"+(a7?"display:none;":""),a8=a4.extraTriggerCls+" "+Ext.baseCSSPrefix+"trigger-cell "+a3;
if(!a4.trigger1Cls){a4.trigger1Cls=a4.triggerCls;}for(a2=0;(a0=a4["trigger"+(a2+1)+"Cls"])||a2<1;a2++){if(a2==0){a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1+"display:none;",cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});
}else{a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1,cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});}}a6[0].cn.cls+=" "+a5+"-first";return Ext.DomHelper.markup(a6);},onTrigger1Click:function(){this.reset();},onTrigger2Click:function(){appCnt.textFieldSearch();
},},{xtype:"button",iconCls:"iconMaximize",style:{"background":"transparent","border":"none"},listeners:{"afterrender":function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"Maximize View"});}},handler:function(){var a1=Ext.create("Ext.data.Store",{fields:av,pageSize:aH,autoLoad:true,proxy:{type:"ajax",url:netflowLastLoadedURL+"&tab=Top sources&flowsTest=TopSourceTest&isFromGridPage=true",reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a4,a3,a7,a5){var a6=Ext.getCmp("netflowmainpanel");
if(a7){a6.setLoading(false,false);}else{a6.setLoading(true,true);}}}});var a2;a1.on("load",function(a7,a6){var a4=a1.data.length;var ba=a1.pageSize;var a8=a1.totalCount;var a9="";if(a1.proxy.reader.rawData!=null){a9=a1.proxy.reader.rawData.page;}var a5=a1.pageSize;var a3=a8/a5;a3=a3.toString();if(a3.indexOf(".")>-1){a3=parseInt(a3);
a3=a3+1;}else{a3=parseInt(a3);}if(a9>a3){a9=a3;configPanl.setLoading(true,true);}if((a8-a4)==0||(a9==1&&a8<=ba)){Ext.getCmp("maxPagingtoolbar").hide();}else{Ext.getCmp("maxPagingtoolbar").show();}});var a0=Ext.create("utilities.GenericWindow",{title:az["TABLE_TITLE"],width:"90%",height:"90%",cssMask:true,padding:"5 10 10 10",resizable:false,draggable:true,closeAction:"destroy",layout:"fit",scroll:true,border:false,items:{xtype:"grid",store:a1,columns:al,layout:"fit",cls:"gridSkin",bbar:new Ext.PagingToolbar({store:a1,id:"maxPagingtoolbar",cls:"pagingtoolbar",pageSize:aH,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a4=Ext.getCmp("gridSearch");
if(a4!=null){var a5=a4.value;if(a5!=""){var a3=Ext.getCmp("gridDisplay");if(a3!=""){a3.store.filters.clear();}a4.reset();}}}}}),},bodyStyle:{"overflow-y":"auto"},}).show();}}]};}else{aq={xtype:"panel",height:220,margin:"0 10 10 10",layout:{type:"fit",},ui:"egGraphPanel",title:az["TABLE_TITLE"],items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+noMeasureExcl+"</div></td></tr></table>"}]};
}aj={xtype:"panel",tab:"Protocols",header:false,margin:5,layout:{type:"hbox",align:"stretch",},flex:1,items:[ai,at]};n={autoScroll:false,scroll:false,layout:{type:"fit",align:"stretch"},items:[{xtype:"panel",scroll:true,autoScroll:false,layout:{type:"auto",pack:"start",align:"stretch"},flex:1,defaults:{margin:10,},items:[aj,aq]}]};
}else{if(aU){var ax=aP["PIE_TITLE"];var aZ=aP["pieChart"];if(ax.length>110){ax=ax.substr(0,105)+"...";}var ai="";if(!Ext.isEmpty(m)){ai={xtype:"panel",flex:0.5,height:300,margin:5,layout:{type:"fit",},ui:"egGraphPanel",title:ax,items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+m+"</div></td></tr></table>"}]};
}else{ai={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",title:ax,id:"topSourcepiechart",pieChartData:aZ,listeners:{afterrender:function(){var a2=this;if(!Ext.isEmpty(a2.pieChartData)){try{var a0={};Ext.defer(function(){var a3=Ext.getCmp("topSourcepiechart");var a4=a3.getWidth();a0=jQuery.extend(true,{},getPieChartsforNetflow("topSourcepiechart-body","290",a4),a0);
a0.setData(a2.pieChartData[0]["XML_DATA"],currentDateFormat,"","ProtocolPieNetflow");a0.drawChart();},500);}catch(a1){console.log(a1);}$(window).resize(function(){if(Ext.isEmpty(m)){if($("#"+"topSourcepiechart-body").highcharts()!=undefined){$("#"+"topSourcepiechart-body").highcharts().reflow();}}});
}}}};}var at="";var aQ=az["comparisonCharts"];if(!Ext.isEmpty(aQ["NoMeasure"])){at={xtype:"panel",flex:0.5,height:300,margin:5,layout:{type:"fit",},ui:"egGraphPanel",title:az["barTitle"],items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+aQ["NoMeasure"]+"</div></td></tr></table>"}]};
}else{at={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",title:az["barTitle"],id:"topSourcebarGraphPanel",barData:aQ,listeners:{afterrender:function(){var a2=this;if(!Ext.isEmpty(a2.barData)){try{var a0={};a0=jQuery.extend(true,{},getHighChartsBarInstance("topSourcebarGraphPanel-body",270,600),a0);
a0.setData(a2.barData["XML_DATA"],currentDateFormat,"","netflowconversationbar");a0.drawChart();}catch(a1){console.log(a1);}}}}};}aj={xtype:"panel",tab:"Protocols",header:false,margin:5,layout:{type:"hbox",align:"stretch",},flex:1,items:[ai,at]};var ac=aP["tableData"];var aK=ac[0]["TABLE_TITLE"];var an=ac[0]["tableColumns"];
var aO=ac[0]["gridValues"];var av=new Array();var al=new Array();var aG=0;for(var ao in an){av.push({name:"COLUMVal_"+aG,type:"string"});al.push({header:an[ao],dataIndex:"COLUMVal_"+aG,align:"left",flex:1,sortable:true,renderer:function(a7,a1,a5,a9,a3,a8,a0){var a4=a0.getHeaderAtIndex(a3);var a2=a4.dataIndex;
if(a2!=null&&(a2=="COLUMVal_4"||a2=="COLUMVal_5")){if(a7!=null&&a7!="-"){if(a7>0){var a6='<table width="100%" cellpadding="0" cellspacing="0" border="0"  height="8" class="prog_border">';a6+="<tr>";a6+='<td align="left" width="100%" height="8" >';a6+='<table width="'+a7+'%" height="8"  cellpadding="0" cellspacing="0" border="0">';
a6+="<tr>";a6+='<td class="progress_GOOD" width="100%"> </td>';a6+="</tr>";a6+="</table>";a6+="</td>";a6+="</tr>";a6+="</table>";a7="<table width='100%' cellpadding='0' cellspacing='0'><tr><td style='width:50px'><span>"+a7+"</span></td><td >"+a6+"</td></tr></table>";}}}return a7;}});aG++;}var aH;if(ah==undefined||ah=="undefined"){aH=parseInt(aB[0].valueField);
}else{aH=parseInt(ah);}var ar="";var aA="";var aV={};if(netflowLastLoadedURL!=null&&netflowLastLoadedURL.indexOf("?")>-1){aA=netflowLastLoadedURL.substr(0,netflowLastLoadedURL.indexOf("?"));ar=netflowLastLoadedURL.substr(netflowLastLoadedURL.indexOf("?")+1);if(!Ext.isEmpty(ar)){var af=ar.split("&");for(var aJ in af){var ap=af[aJ];
if(ap!=null&&ap.indexOf("=")>-1){var aC=ap.substr(0,ap.indexOf("="));var ak=ap.substr(ap.indexOf("=")+1);if(aC.toLowerCase()=="timeline"){ak=ak.replace(/\+/g,"%20");}aV[aC]=decodeURIComponent(ak);}}aV["isFromGridPage"]="true";aV["flowsTest"]="TopSourceTest";}}var aL=Ext.create("Ext.data.Store",{fields:av,pageSize:aH,autoLoad:true,proxy:{type:"ajax",actionMethods:{create:"POST",read:"POST",update:"POST",destroy:"POST"},url:aA,extraParams:aV,reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a1,a0,a4,a2){var a3=Ext.getCmp("netflowmainpanel");
if(a4){a3.setLoading(false,false);}else{a3.setLoading(true,true);}}}});var j;aL.on("load",function(a4,a3){var a1=aL.data.length;var a7=aL.pageSize;var a5=aL.totalCount;var a6="";if(aL.proxy.reader.rawData!=null){a6=aL.proxy.reader.rawData.page;}var a2=aL.pageSize;var a0=a5/a2;a0=a0.toString();if(a0.indexOf(".")>-1){a0=parseInt(a0);
a0=a0+1;}else{a0=parseInt(a0);}if(a6>a0){a6=a0;configPanl.setLoading(true,true);}if((a5-a1)==0||(a6==1&&a5<=a7)){Ext.getCmp("pagingtoolbar").hide();}else{Ext.getCmp("pagingtoolbar").show();}});var aW=Ext.getBody().getHeight()-390;if(aW<350){aW=350;}g={xtype:"grid",id:"gridDisplay",store:aL,height:aW,margin:"0 10 10 10",title:aK,cls:"gridSkin",header:{style:{"padding":"2px 10px 0px 10px"}},columns:al,bbar:new Ext.PagingToolbar({store:aL,id:"pagingtoolbar",cls:"pagingtoolbar",pageSize:aH,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a1=Ext.getCmp("gridSearch");
if(a1!=null){var a2=a1.value;if(a2!=""){var a0=Ext.getCmp("gridDisplay");if(a0!=""){a0.store.filters.clear();}a1.reset();}}}}}),tools:[{xtype:"tbfill",},{xtype:"trigger",trigger1Cls:"x-form-clear-trigger",trigger2Cls:"x-form-search-trigger",name:"gridSearch",margin:"0 10 2 10",id:"gridSearch",cls:"whitedropdown_search",emptyText:searchLbl,labelAlign:"top",width:200,hidden:false,getTriggerMarkup:function(){var a4=this,a2=0,a7=(a4.readOnly||a4.hideTrigger),a0,a5=a4.triggerBaseCls,a6=[],a3=Ext.dom.Element.unselectableCls,a1="width:"+a4.triggerWidth+"px;"+(a7?"display:none;":""),a8=a4.extraTriggerCls+" "+Ext.baseCSSPrefix+"trigger-cell "+a3;
if(!a4.trigger1Cls){a4.trigger1Cls=a4.triggerCls;}for(a2=0;(a0=a4["trigger"+(a2+1)+"Cls"])||a2<1;a2++){if(a2==0){a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1+"display:none;",cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});
}else{a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1,cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});}}a6[0].cn.cls+=" "+a5+"-first";return Ext.DomHelper.markup(a6);},onTrigger1Click:function(){this.reset();},onTrigger2Click:function(){appCnt.textFieldSearch();
},},{xtype:"button",iconCls:"iconMaximize",style:{"background":"transparent","border":"none"},listeners:{"afterrender":function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:maximizeViewLbl});}},handler:function(){var a1=Ext.create("Ext.data.Store",{fields:av,pageSize:aH,autoLoad:true,proxy:{type:"ajax",url:netflowLastLoadedURL+"&flowsTest=TopSourceTest&isFromGridPage=true",reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a4,a3,a7,a5){var a6=Ext.getCmp("netflowmainpanel");
if(a7){a6.setLoading(false,false);}else{a6.setLoading(true,true);}}}});var a2;a1.on("load",function(a7,a6){var a4=a1.data.length;var ba=a1.pageSize;var a8=a1.totalCount;var a9="";if(a1.proxy.reader.rawData!=null){a9=a1.proxy.reader.rawData.page;}var a5=a1.pageSize;var a3=a8/a5;a3=a3.toString();if(a3.indexOf(".")>-1){a3=parseInt(a3);
a3=a3+1;}else{a3=parseInt(a3);}if(a9>a3){a9=a3;configPanl.setLoading(true,true);}if((a8-a4)==0||(a9==1&&a8<=ba)){Ext.getCmp("maxPagingtoolbar").hide();}else{Ext.getCmp("maxPagingtoolbar").show();}});var a0=Ext.create("utilities.GenericWindow",{title:aK,width:"90%",height:"90%",cssMask:true,padding:"5 10 10 10",resizable:false,draggable:true,closeAction:"destroy",scroll:true,layout:"fit",border:false,items:{xtype:"grid",store:a1,columns:al,cls:"gridSkin",layout:"fit",bbar:new Ext.PagingToolbar({store:a1,id:"maxPagingtoolbar",cls:"pagingtoolbar",pageSize:aH,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a4=Ext.getCmp("gridSearch");
if(a4!=null){var a5=a4.value;if(a5!=""){var a3=Ext.getCmp("gridDisplay");if(a3!=""){a3.store.filters.clear();}a4.reset();}}}}}),},autoScroll:true,bodyStyle:{"overflow-y":"auto"},}).show();}}]};n={autoScroll:false,scroll:false,layout:{type:"fit",align:"stretch"},items:[{xtype:"panel",scroll:true,autoScroll:false,layout:{type:"auto",pack:"start",align:"stretch"},flex:1,defaults:{margin:10,},items:[aj,g]}]};
}else{var ax=aP["PIE_TITLE"];var aZ=aP["pieChart"];if(ax.length>110){ax=ax.substr(0,105)+"...";}var aS=400;if(aZ.length==1){aS=950;}var aj={xtype:"genericpiechartslider",template:function(){var a1=this;var a0={};if(Ext.isEmpty(m)){a0=new Ext.XTemplate("<ul>",'<tpl for=".">','<li ><div  class="netFlowPieChartRightBorder" style="margin:5 auto 10px 0"><div style="text-align:center;margin:10px 5px 0px 5px;">{XML_DATA.title}</div><div id="chart2holder{#}"></div></div></li>',"</tpl>","</ul>");
}else{a0=new Ext.XTemplate("<ul>",'<li><table width="100%" height="200px"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div > '+noMeasureExcl+"</div></td></tr></table></li>","</ul>");}return a0;},data:aZ,loadChart:function(a6){var a5=this;if(!Ext.isEmpty(a6)){var a4=1;for(var a1 in a6){var a0=a4++;
try{var a2={};a2=jQuery.extend(true,{},getPieChartsforNetflow("chart2holder"+a0,250,aS),a2);a2.setData(a6[a1]["XML_DATA"],currentDateFormat,"","ProtocolPieNetflow");a2.drawChart();}catch(a3){console.log(a3);}$(window).resize(function(){if(Ext.isEmpty(m)){if($("#"+"chart2holder"+a0).highcharts()!=undefined){$("#"+"chart2holder"+a0).highcharts().reflow();
}}});}}},tab:"topSource",title:ax};var ac=aP["tableData"];var aK=ac[0]["TABLE_TITLE"];var an=ac[0]["tableColumns"];var aO=ac[0]["gridValues"];var av=new Array();var al=new Array();var aG=0;for(var ao in an){av.push({name:"COLUMVal_"+aG,type:"string"});al.push({header:an[ao],dataIndex:"COLUMVal_"+aG,align:"left",flex:1,sortable:true,renderer:function(a7,a1,a5,a9,a3,a8,a0){var a4=a0.getHeaderAtIndex(a3);
var a2=a4.dataIndex;if(a2!=null&&(a2=="COLUMVal_4"||a2=="COLUMVal_5")){if(a7!=null&&a7!="-"){if(a7>0){var a6='<table width="100%" cellpadding="0" cellspacing="0" border="0"  height="8" class="prog_border">';a6+="<tr>";a6+='<td align="left" width="100%" height="8" >';a6+='<table width="'+a7+'%" height="8"  cellpadding="0" cellspacing="0" border="0">';
a6+="<tr>";a6+='<td class="progress_GOOD" width="100%"> </td>';a6+="</tr>";a6+="</table>";a6+="</td>";a6+="</tr>";a6+="</table>";a7="<table width='100%' cellpadding='0' cellspacing='0'><tr><td style='width:50px'><span>"+a7+"</span></td><td >"+a6+"</td></tr></table>";}}}return a7;}});aG++;}var aH;if(ah==undefined||ah=="undefined"){aH=parseInt(aB[0].valueField);
}else{aH=parseInt(ah);}var ar="";var aA="";var aV={};if(netflowLastLoadedURL!=null&&netflowLastLoadedURL.indexOf("?")>-1){aA=netflowLastLoadedURL.substr(0,netflowLastLoadedURL.indexOf("?"));ar=netflowLastLoadedURL.substr(netflowLastLoadedURL.indexOf("?")+1);if(!Ext.isEmpty(ar)){var af=ar.split("&");for(var aJ in af){var ap=af[aJ];
if(ap!=null&&ap.indexOf("=")>-1){var aC=ap.substr(0,ap.indexOf("="));var ak=ap.substr(ap.indexOf("=")+1);if(aC.toLowerCase()=="timeline"){ak=ak.replace(/\+/g,"%20");}aV[aC]=decodeURIComponent(ak);}}aV["isFromGridPage"]="true";aV["flowsTest"]="TopSourceTest";}}var aL=Ext.create("Ext.data.Store",{fields:av,pageSize:aH,autoLoad:true,proxy:{type:"ajax",actionMethods:{create:"POST",read:"POST",update:"POST",destroy:"POST"},url:aA,extraParams:aV,reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a1,a0,a4,a2){var a3=Ext.getCmp("netflowmainpanel");
if(a4){a3.setLoading(false,false);}else{a3.setLoading(true,true);}}}});var j;aL.on("load",function(a4,a3){var a1=aL.data.length;var a7=aL.pageSize;var a5=aL.totalCount;var a6="";if(aL.proxy.reader.rawData!=null){a6=aL.proxy.reader.rawData.page;}var a2=aL.pageSize;var a0=a5/a2;a0=a0.toString();if(a0.indexOf(".")>-1){a0=parseInt(a0);
a0=a0+1;}else{a0=parseInt(a0);}if(a6>a0){a6=a0;configPanl.setLoading(true,true);}if((a5-a1)==0||(a6==1&&a5<=a7)){Ext.getCmp("pagingtoolbar").hide();}else{Ext.getCmp("pagingtoolbar").show();}});var aW=Ext.getBody().getHeight()-390;if(aW<350){aW=350;}g={xtype:"grid",id:"gridDisplay",store:aL,height:aW,margin:"0 10 10 10",title:aK,cls:"gridSkin",header:{style:{"padding":"2px 10px 0px 10px"}},columns:al,bbar:new Ext.PagingToolbar({store:aL,id:"pagingtoolbar",cls:"pagingtoolbar",pageSize:aH,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a1=Ext.getCmp("gridSearch");
if(a1!=null){var a2=a1.value;if(a2!=""){var a0=Ext.getCmp("gridDisplay");if(a0!=""){a0.store.filters.clear();}a1.reset();}}}}}),tools:[{xtype:"tbfill",},{xtype:"trigger",trigger1Cls:"x-form-clear-trigger",trigger2Cls:"x-form-search-trigger",name:"gridSearch",margin:"0 10 2 10",id:"gridSearch",cls:"whitedropdown_search",emptyText:searchLbl,labelAlign:"top",width:200,hidden:false,getTriggerMarkup:function(){var a4=this,a2=0,a7=(a4.readOnly||a4.hideTrigger),a0,a5=a4.triggerBaseCls,a6=[],a3=Ext.dom.Element.unselectableCls,a1="width:"+a4.triggerWidth+"px;"+(a7?"display:none;":""),a8=a4.extraTriggerCls+" "+Ext.baseCSSPrefix+"trigger-cell "+a3;
if(!a4.trigger1Cls){a4.trigger1Cls=a4.triggerCls;}for(a2=0;(a0=a4["trigger"+(a2+1)+"Cls"])||a2<1;a2++){if(a2==0){a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1+"display:none;",cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});
}else{a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1,cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});}}a6[0].cn.cls+=" "+a5+"-first";return Ext.DomHelper.markup(a6);},onTrigger1Click:function(){this.reset();},onTrigger2Click:function(){appCnt.textFieldSearch();
},},{xtype:"button",iconCls:"iconMaximize",style:{"background":"transparent","border":"none"},listeners:{"afterrender":function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:maximizeViewLbl});}},handler:function(){var a1=Ext.create("Ext.data.Store",{fields:av,pageSize:aH,autoLoad:true,proxy:{type:"ajax",url:netflowLastLoadedURL+"&tab=Top sources&flowsTest=TopSourceTest&isFromGridPage=true",reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a4,a3,a7,a5){var a6=Ext.getCmp("netflowmainpanel");
if(a7){a6.setLoading(false,false);}else{a6.setLoading(true,true);}}}});var a2;a1.on("load",function(a7,a6){var a4=a1.data.length;var ba=a1.pageSize;var a8=a1.totalCount;var a9="";if(a1.proxy.reader.rawData!=null){a9=a1.proxy.reader.rawData.page;}var a5=a1.pageSize;var a3=a8/a5;a3=a3.toString();if(a3.indexOf(".")>-1){a3=parseInt(a3);
a3=a3+1;}else{a3=parseInt(a3);}if(a9>a3){a9=a3;configPanl.setLoading(true,true);}if((a8-a4)==0||(a9==1&&a8<=ba)){Ext.getCmp("maxPagingtoolbar").hide();}else{Ext.getCmp("maxPagingtoolbar").show();}});var a0=Ext.create("utilities.GenericWindow",{title:aK,width:"90%",height:"90%",cssMask:true,padding:"5 10 10 10",resizable:false,draggable:true,closeAction:"destroy",scroll:true,layout:"fit",border:false,items:{xtype:"grid",store:a1,columns:al,cls:"gridSkin",layout:"fit",bbar:new Ext.PagingToolbar({store:a1,id:"maxPagingtoolbar",cls:"pagingtoolbar",pageSize:aH,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a4=Ext.getCmp("gridSearch");
if(a4!=null){var a5=a4.value;if(a5!=""){var a3=Ext.getCmp("gridDisplay");if(a3!=""){a3.store.filters.clear();}a4.reset();}}}}}),},autoScroll:true,bodyStyle:{"overflow-y":"auto"},}).show();}}]};n={autoScroll:false,scroll:false,layout:{type:"fit",align:"stretch"},items:[{xtype:"panel",scroll:true,autoScroll:false,layout:{type:"auto",pack:"start",align:"stretch"},flex:1,defaults:{margin:10,},items:[aj,g]}]};
}}}else{if(aR=="undefined"||aR==undefined||aR==""){aR=c+"!";}n={autoScroll:false,scroll:false,height:L,layout:{type:"fit",align:"stretch"},scroll:false,autoScroll:false,flex:1,items:[{xtype:"panel",scroll:false,autoScroll:false,flex:1,layout:{type:"fit",align:"stretch",},defaults:{margin:0,},items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div>'+aR+"</div></td></tr></table>"}]}]};
}}}});}else{if(l=="topdestinations"){var Z=Q.DataURL;var P=localStorage.getItem("interfaceLastSelectedView");if(P!=null&&!Ext.isEmpty(P)){interfaceSelectedView=P;}var y=localStorage.getItem("showLastSelectedView");if(y!=null&&!Ext.isEmpty(y)){showVal=y;}var F=localStorage.getItem("timelineLastSelectedView");
if(F!=null&&!Ext.isEmpty(F)){globalTimeline=F;}if(interfaceSelectedView!=null){if(Z!=null&&Z.indexOf("interfaceToView")>0){Z=Z.replace(/(interfaceToView=)[^\&]+/,"$1"+encodeURIComponent(interfaceSelectedView));}else{Z=Z+"&interfaceToView="+encodeURIComponent(interfaceSelectedView);}if(Z!=null&&Z.indexOf("infosToArea")>0){Z=Z.replace(/(infosToArea=)[^\&]+/,"$1"+interfaceSelectedView);
}else{Z=Z+"&infosToArea="+encodeURIComponent(interfaceSelectedView);}}if(showVal!=null){if(Z.indexOf("show")>-1){Z=Z.replace(/(show=)[^\&]+/,"$1"+encodeURIComponent(showVal));}else{Z+="&show="+encodeURIComponent(showVal);}}if(globalTimeline!=null){if(Z.indexOf("selectedTimeline")>-1){Z=Z.replace(/(selectedTimeline=)[^\&]+/,"$1"+encodeURIComponent(globalTimeline));
}else{Z+="&selectedTimeline="+encodeURIComponent(globalTimeline);}if(Z.indexOf("timeline")>-1){Z=Z.replace(/(timeline=)[^\&]+/,"$1"+encodeURIComponent(globalTimeline));}else{Z+="&timeline="+encodeURIComponent(globalTimeline);}}netflowLastLoadedURL=Z;if(netflowLastLoadedURL!=null&&netflowLastLoadedURL.indexOf("&ciscoSelectedType=")>0){netflowLastLoadedURL=netflowLastLoadedURL.replace(/(ciscoSelectedType=)[^\&]+/,"$1"+"flows");
}else{netflowLastLoadedURL=netflowLastLoadedURL+"&ciscoSelectedType=flows";}var L=Ext.getBody().getHeight()-100;var N=[];var G="";var C="";var q="";var E="";if(Z!=null&&Z.indexOf("?")>-1){E=Z.substr(0,Z.indexOf("?"));q=Z.substr(Z.indexOf("?")+1);}Ext.Ajax.request({url:E,method:"POST",params:q+"&flowsTest=TopDestTest",scope:this,async:false,success:function(aa){if(aa.status==200&&!Ext.isEmpty(aa.responseText)){var ae=aa.responseText;
var aA=Ext.decode(ae);var az=aA["timelineCombo"];var aX=az["selectedTimelineCombo"];var aY=az["timelineComboArray"];var aF=az["monitor.dashboard.TimeLine"];var aO=aA["flowsInterfaceCombo"];var an=aA["showCombo"];var aG=an["showComboArray"];var aN=an["selectedShowCombo"];var af=aA["eventsPerPageCombo"];
var aC="";var ah="";var aE=aA["fromView"];var av=aA["timelineTitle"];if(av!=null){Q.timelineTitle=av;}var aZ=aA["pieChart"];if(aZ!=null){m=aZ[0]["NOMSG"];}var ax=aA["pieTitle"];var at="";var ab="";var aR="";if(aA["flowsPieArr"]!=null&&aA["flowsPieArr"].length>0){at=aA["flowsPieArr"][0]["DATA_0"];ab=at["Data"];
aR=at["ErrorMsg"];}if(aE!=null&&aE=="SummaryView"){ab=aA["Data"];}var av=aA["timelineTitle"];if(av!=null){Q.timelineTitle=av;}var ac=aA["flowsInterfaceSelectedCombo"];Q.timelineComboArray=aY;Q.selectedTimelineCombo=aX;if(aO!=null){Q.flowsInterfaceCombo=aO;Q.flowsInterfaceSelectedCombo=ac;}if(an!=null){Q.showComboArray=aG;
Q.selectedShowCombo=aN;}if(af!=null){aC=af["eventsPerPageArray"];ah=af["selectedEventsPerPage"];Q.eventsPerPageArray=aC;Q.selectedEventsPerPage=ah;}var aU=aA["isfromInterfaceComboChange"];var aJ=aA["isInterfaceCountExceeded"];this.addNetflowTabtoolbar(Q);if(ab!=null&&ab=="true"){if(aE!=null&&aE=="SummaryView"&&aJ){var aj="";
if(!Ext.isEmpty(m)){aj={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",layout:{type:"fit",},title:ax,items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+m+"</div></td></tr></table>"}]};}else{aj={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",title:ax,id:"topdestpiechart",pieChartData:aZ,listeners:{afterrender:function(){var a2=this;
if(!Ext.isEmpty(a2.pieChartData)){try{var a0={};Ext.defer(function(){var a4=Ext.getCmp("topdestpiechart");var a3=a4.getWidth();a0=jQuery.extend(true,{},getPieChartsforNetflow("topdestpiechart-body","290",a3),a0);a0.setData(a2.pieChartData[0]["XML_DATA"],currentDateFormat,"","ProtocolPieNetflow");a0.drawChart();
},500);}catch(a1){console.log(a1);}$(window).resize(function(){if(Ext.isEmpty(m)){if($("#"+"topdestpiechart-body").highcharts()!=undefined){$("#"+"topdestpiechart-body").highcharts().reflow();}}});}}}};}var au="";var aQ=aA["comparisonCharts"];if(!Ext.isEmpty(aQ["NoMeasure"])){au={xtype:"panel",flex:0.5,height:300,margin:5,layout:{type:"fit",},ui:"egGraphPanel",title:aA["barTitle"],items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+aQ["NoMeasure"]+"</div></td></tr></table>"}]};
}else{au={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",title:aA["barTitle"],id:"topdestbarGraphPanel",barData:aQ,listeners:{afterrender:function(){var a2=this;if(!Ext.isEmpty(a2.barData)){try{var a0={};a0=jQuery.extend(true,{},getHighChartsBarInstance("topdestbarGraphPanel-body",270,600),a0);
a0.setData(a2.barData["XML_DATA"],currentDateFormat,"","netflowconversationbar");a0.drawChart();}catch(a1){console.log(a1);}}}}};}var ad=aA["tableData"];var ai=ad["tableColumns"];var aP=ad["tableValues"];if(aP!=null&&aP.length>0){var aT=new Array();var aw=new Array();var am=new Array();var aH=0;for(var ap in ai){aw.push({name:"COLUMVal_"+aH,type:"FLOATORSTRING"});
am.push({header:ai[ap],dataIndex:"COLUMVal_"+aH,align:"left",flex:1,sortable:true,renderer:function(a7,a1,a5,a9,a3,a8,a0){var a4=a0.getHeaderAtIndex(a3);var a2=a4.dataIndex;if(a2!=null&&(a2=="COLUMVal_3")){if(a7!=null&&a7!="-"){if(a7>0){var a6='<table width="100%" cellpadding="0" cellspacing="0" border="0"  height="8" class="prog_border">';
a6+="<tr>";a6+='<td align="left" width="100%" height="8" >';a6+='<table width="'+a7+'%" height="8"  cellpadding="0" cellspacing="0" border="0">';a6+="<tr>";a6+='<td class="progress_GOOD" width="100%"> </td>';a6+="</tr>";a6+="</table>";a6+="</td>";a6+="</tr>";a6+="</table>";a7="<table width='100%' cellpadding='0' cellspacing='0'><tr><td style='width:50px'><span>"+a7+"</span></td><td >"+a6+"</td></tr></table>";
}}}return a7;}});aH++;}var aM=Ext.data.Store({fields:aw,data:aP,});C={xtype:"grid",id:"gridDisplay",store:aM,height:290,margin:"0 10 10 10",title:aA["TABLE_TITLE"],cls:"gridSkin",header:{style:{"padding":"2px 10px 0px 10px"}},columns:am,tools:[{xtype:"tbfill",},{xtype:"trigger",trigger1Cls:"x-form-clear-trigger",trigger2Cls:"x-form-search-trigger",name:"gridSearch",margin:"0 10 2 10",id:"gridSearch",cls:"whitedropdown_search",emptyText:"Search",labelAlign:"top",width:200,hidden:false,getTriggerMarkup:function(){var a4=this,a2=0,a7=(a4.readOnly||a4.hideTrigger),a0,a5=a4.triggerBaseCls,a6=[],a3=Ext.dom.Element.unselectableCls,a1="width:"+a4.triggerWidth+"px;"+(a7?"display:none;":""),a8=a4.extraTriggerCls+" "+Ext.baseCSSPrefix+"trigger-cell "+a3;
if(!a4.trigger1Cls){a4.trigger1Cls=a4.triggerCls;}for(a2=0;(a0=a4["trigger"+(a2+1)+"Cls"])||a2<1;a2++){if(a2==0){a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1+"display:none;",cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});
}else{a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1,cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});}}a6[0].cn.cls+=" "+a5+"-first";return Ext.DomHelper.markup(a6);},onTrigger1Click:function(){this.reset();},onTrigger2Click:function(){appCnt.textFieldSearch();
},},{xtype:"button",iconCls:"iconMaximize",style:{"background":"transparent","border":"none"},listeners:{"afterrender":function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"Maximize View"});}},handler:function(){var a1=Ext.create("Ext.data.Store",{fields:aw,pageSize:aI,autoLoad:true,proxy:{type:"ajax",url:netflowLastLoadedURL+"&tab=Top Destinations&flowsTest=TopDestTest&isFromGridPage=true",reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a4,a3,a7,a5){var a6=Ext.getCmp("netflowmainpanel");
if(a7){a6.setLoading(false,false);}else{a6.setLoading(true,true);}}}});var a2;a1.on("load",function(a7,a6){var a4=a1.data.length;var ba=a1.pageSize;var a8=a1.totalCount;var a9="";if(a1.proxy.reader.rawData!=null){a9=a1.proxy.reader.rawData.page;}var a5=a1.pageSize;var a3=a8/a5;a3=a3.toString();if(a3.indexOf(".")>-1){a3=parseInt(a3);
a3=a3+1;}else{a3=parseInt(a3);}if(a9>a3){a9=a3;configPanl.setLoading(true,true);}if((a8-a4)==0||(a9==1&&a8<=ba)){Ext.getCmp("maxPagingtoolbar").hide();}else{Ext.getCmp("maxPagingtoolbar").show();}});var a0=Ext.create("utilities.GenericWindow",{title:aA["TABLE_TITLE"],width:"90%",height:"90%",cssMask:true,padding:"5 10 10 10",resizable:false,draggable:true,closeAction:"destroy",layout:"fit",scroll:true,border:false,items:{xtype:"grid",store:a1,columns:am,layout:"fit",cls:"gridSkin",bbar:new Ext.PagingToolbar({store:a1,id:"maxPagingtoolbar",cls:"pagingtoolbar",pageSize:aI,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a4=Ext.getCmp("gridSearch");
if(a4!=null){var a5=a4.value;if(a5!=""){var a3=Ext.getCmp("gridDisplay");if(a3!=""){a3.store.filters.clear();}a4.reset();}}}}}),},bodyStyle:{"overflow-y":"auto"},}).show();}}]};}else{C={xtype:"panel",height:220,margin:"0 10 10 10",layout:{type:"fit",},ui:"egGraphPanel",title:aA["TABLE_TITLE"],items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+noMeasureExcl+"</div></td></tr></table>"}]};
}ak={xtype:"panel",tab:"Protocols",header:false,margin:5,layout:{type:"hbox",align:"stretch",},flex:1,items:[aj,au]};n={autoScroll:false,scroll:false,layout:{type:"fit",align:"stretch"},items:[{xtype:"panel",scroll:true,autoScroll:false,layout:{type:"auto",pack:"start",align:"stretch"},flex:1,defaults:{margin:10,},items:[ak,C]}]};
}else{if(aU){var ay=at["PIE_TITLE"];var aZ=at["pieChart"];if(ay.length>110){ay=ay.substr(0,105)+"...";}var aj="";if(!Ext.isEmpty(m)){aj={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",layout:{type:"fit",},title:ay,items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+m+"</div></td></tr></table>"}]};
}else{aj={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",title:ay,id:"topdestpiechart",pieChartData:aZ,listeners:{afterrender:function(){var a2=this;if(!Ext.isEmpty(a2.pieChartData)){try{var a0={};Ext.defer(function(){var a4=Ext.getCmp("topdestpiechart");var a3=a4.getWidth();a0=jQuery.extend(true,{},getPieChartsforNetflow("topdestpiechart-body","290",a3),a0);
a0.setData(a2.pieChartData[0]["XML_DATA"],currentDateFormat,"","ProtocolPieNetflow");a0.drawChart();},500);}catch(a1){console.log(a1);}$(window).resize(function(){if(Ext.isEmpty(m)){if($("#"+"topdestpiechart-body").highcharts()!=undefined){$("#"+"topdestpiechart-body").highcharts().reflow();}}});}}}};
}var au="";var aQ=aA["comparisonCharts"];if(!Ext.isEmpty(aQ["NoMeasure"])){au={xtype:"panel",flex:0.5,height:300,margin:5,layout:{type:"fit",},ui:"egGraphPanel",title:aA["barTitle"],items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+aQ["NoMeasure"]+"</div></td></tr></table>"}]};
}else{au={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",title:aA["barTitle"],id:"topdestbarGraphPanel",barData:aQ,listeners:{afterrender:function(){var a2=this;if(!Ext.isEmpty(a2.barData)){try{var a0={};a0=jQuery.extend(true,{},getHighChartsBarInstance("topdestbarGraphPanel-body",270,600),a0);
a0.setData(a2.barData["XML_DATA"],currentDateFormat,"","netflowconversationbar");a0.drawChart();}catch(a1){console.log(a1);}}}}};}ak={xtype:"panel",tab:"Protocols",header:false,margin:5,layout:{type:"hbox",align:"stretch",},flex:1,items:[aj,au]};var ad=at["tableData"];var aL=ad[0]["TABLE_TITLE"];var ao=ad[0]["tableColumns"];
var aP=ad[0]["gridValues"];var aw=new Array();var am=new Array();var aH=0;for(var ap in ao){aw.push({name:"COLUMVal_"+aH,type:"string"});am.push({header:ao[ap],dataIndex:"COLUMVal_"+aH,align:"left",flex:1,sortable:true,renderer:function(a7,a1,a5,a9,a3,a8,a0){var a4=a0.getHeaderAtIndex(a3);var a2=a4.dataIndex;
if(a2!=null&&(a2=="COLUMVal_4"||a2=="COLUMVal_5")){if(a7!=null&&a7!="-"){if(a7>0){var a6='<table width="100%" cellpadding="0" cellspacing="0" border="0"  height="8" class="prog_border">';a6+="<tr>";a6+='<td align="left" width="100%" height="8" >';a6+='<table width="'+a7+'%" height="8"  cellpadding="0" cellspacing="0" border="0">';
a6+="<tr>";a6+='<td class="progress_GOOD" width="100%"> </td>';a6+="</tr>";a6+="</table>";a6+="</td>";a6+="</tr>";a6+="</table>";a7="<table width='100%' cellpadding='0' cellspacing='0'><tr><td style='width:50px'><span>"+a7+"</span></td><td >"+a6+"</td></tr></table>";}}}return a7;}});aH++;}var aI;if(ah==undefined||ah=="undefined"){aI=parseInt(aC[0].valueField);
}else{aI=parseInt(ah);}var ar="";var aB="";var aV={};if(netflowLastLoadedURL!=null&&netflowLastLoadedURL.indexOf("?")>-1){aB=netflowLastLoadedURL.substr(0,netflowLastLoadedURL.indexOf("?"));ar=netflowLastLoadedURL.substr(netflowLastLoadedURL.indexOf("?")+1);if(!Ext.isEmpty(ar)){var ag=ar.split("&");for(var aK in ag){var aq=ag[aK];
if(aq!=null&&aq.indexOf("=")>-1){var aD=aq.substr(0,aq.indexOf("="));var al=aq.substr(aq.indexOf("=")+1);if(aD.toLowerCase()=="timeline"){al=al.replace(/\+/g,"%20");}aV[aD]=decodeURIComponent(al);}}aV["isFromGridPage"]="true";aV["flowsTest"]="TopDestTest";}}var aM=Ext.create("Ext.data.Store",{fields:aw,pageSize:aI,autoLoad:true,proxy:{type:"ajax",actionMethods:{create:"POST",read:"POST",update:"POST",destroy:"POST"},url:aB,extraParams:aV,reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a1,a0,a4,a2){var a3=Ext.getCmp("netflowmainpanel");
if(a4){a3.setLoading(false,false);}else{a3.setLoading(true,true);}}}});var j;aM.on("load",function(a4,a3){var a1=aM.data.length;var a7=aM.pageSize;var a5=aM.totalCount;var a6="";if(aM.proxy.reader.rawData!=null){a6=aM.proxy.reader.rawData.page;}var a2=aM.pageSize;var a0=a5/a2;a0=a0.toString();if(a0.indexOf(".")>-1){a0=parseInt(a0);
a0=a0+1;}else{a0=parseInt(a0);}if(a6>a0){a6=a0;configPanl.setLoading(true,true);}if((a5-a1)==0||(a6==1&&a5<=a7)){Ext.getCmp("pagingtoolbar").hide();}else{Ext.getCmp("pagingtoolbar").show();}});var aW=Ext.getBody().getHeight()-390;if(aW<350){aW=350;}C={xtype:"grid",store:aM,id:"gridDisplay",autoScroll:true,scroll:true,title:aL,flex:1,height:aW,cls:"gridSkin",header:{style:{"padding":"2px 10px 0px 10px"}},columns:am,bbar:new Ext.PagingToolbar({store:aM,id:"pagingtoolbar",cls:"pagingtoolbar",pageSize:aI,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a1=Ext.getCmp("gridSearch");
if(a1!=null){var a2=a1.value;if(a2!=""){var a0=Ext.getCmp("gridDisplay");if(a0!=""){a0.store.filters.clear();}a1.reset();}}}}}),tools:[{xtype:"tbfill",},{xtype:"trigger",trigger1Cls:"x-form-clear-trigger",trigger2Cls:"x-form-search-trigger",name:"gridSearch",margin:"0 10 2 10",id:"gridSearch",cls:"whitedropdown_search",emptyText:searchLbl,labelAlign:"top",width:200,hidden:false,getTriggerMarkup:function(){var a4=this,a2=0,a7=(a4.readOnly||a4.hideTrigger),a0,a5=a4.triggerBaseCls,a6=[],a3=Ext.dom.Element.unselectableCls,a1="width:"+a4.triggerWidth+"px;"+(a7?"display:none;":""),a8=a4.extraTriggerCls+" "+Ext.baseCSSPrefix+"trigger-cell "+a3;
if(!a4.trigger1Cls){a4.trigger1Cls=a4.triggerCls;}for(a2=0;(a0=a4["trigger"+(a2+1)+"Cls"])||a2<1;a2++){if(a2==0){a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1+"display:none;",cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});
}else{a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1,cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});}}a6[0].cn.cls+=" "+a5+"-first";return Ext.DomHelper.markup(a6);},onTrigger1Click:function(){this.reset();},onTrigger2Click:function(){appCnt.textFieldSearch();
},},{xtype:"button",iconCls:"iconMaximize",style:{"background":"transparent","border":"none"},listeners:{"afterrender":function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:maximizeViewLbl});}},handler:function(){var a1=Ext.create("Ext.data.Store",{fields:aw,pageSize:aI,autoLoad:true,proxy:{type:"ajax",url:netflowLastLoadedURL+"&flowsTest=TopDestTest&isFromGridPage=true",reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a4,a3,a7,a5){var a6=Ext.getCmp("netflowmainpanel");
if(a7){a6.setLoading(false,false);}else{a6.setLoading(true,true);}}}});var a2;a1.on("load",function(a7,a6){var a4=a1.data.length;var ba=a1.pageSize;var a8=a1.totalCount;var a9="";if(a1.proxy.reader.rawData!=null){a9=a1.proxy.reader.rawData.page;}var a5=a1.pageSize;var a3=a8/a5;a3=a3.toString();if(a3.indexOf(".")>-1){a3=parseInt(a3);
a3=a3+1;}else{a3=parseInt(a3);}if(a9>a3){a9=a3;configPanl.setLoading(true,true);}if((a8-a4)==0||(a9==1&&a8<=ba)){Ext.getCmp("maxPagingtoolbar").hide();}else{Ext.getCmp("maxPagingtoolbar").show();}});var a0=Ext.create("utilities.GenericWindow",{title:aL,width:"90%",height:"90%",cssMask:true,padding:"5 10 10 10",resizable:false,draggable:true,closeAction:"destroy",scroll:true,layout:"fit",border:false,items:{xtype:"grid",store:a1,columns:am,cls:"gridSkin",layout:"fit",bbar:new Ext.PagingToolbar({store:a1,id:"maxPagingtoolbar",cls:"pagingtoolbar",pageSize:aI,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a4=Ext.getCmp("gridSearch");
if(a4!=null){var a5=a4.value;if(a5!=""){var a3=Ext.getCmp("gridDisplay");if(a3!=""){a3.store.filters.clear();}a4.reset();}}}}}),},autoScroll:true,bodyStyle:{"overflow-y":"auto"},}).show();}}]};n={autoScroll:false,scroll:false,layout:{type:"fit",align:"stretch"},items:[{xtype:"panel",scroll:true,autoScroll:false,layout:{type:"auto",pack:"start",align:"stretch"},flex:1,defaults:{margin:10,},items:[ak,C]}]};
}else{var ay=at["PIE_TITLE"];var aZ=at["pieChart"];if(ay.length>110){ay=ay.substr(0,105)+"...";}var aS=400;if(aZ.length==1){aS=950;}var ak={xtype:"genericpiechartslider",template:function(){var a1=this;var a0={};if(Ext.isEmpty(m)){a0=new Ext.XTemplate("<ul>",'<tpl for=".">','<li ><div  class="netFlowPieChartRightBorder" style="margin:5 auto 10px 0"><div style="text-align:center;margin:10px 5px 0px 5px;">{XML_DATA.title}</div><div id="chart3holder{#}" ></div></div></li>',"</tpl>","</ul>");
}else{a0=new Ext.XTemplate("<ul>",'<li><table width="100%" height="200px"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div > '+noMeasureExcl+"</div></td></tr></table></li>","</ul>");}return a0;},data:aZ,loadChart:function(a6){var a5=this;if(!Ext.isEmpty(a6)){var a4=1;for(var a1 in a6){var a0=a4++;
try{var a2={};a2=jQuery.extend(true,{},getPieChartsforNetflow("chart3holder"+a0,250,aS),a2);a2.setData(a6[a1]["XML_DATA"],currentDateFormat,"","ProtocolPieNetflow");a2.drawChart();}catch(a3){console.log(a3);}$(window).resize(function(){if(Ext.isEmpty(m)){if($("#"+"chart3holder"+a0).highcharts()!=undefined){$("#"+"chart3holder"+a0).highcharts().reflow();
}}});}}},tab:"TopDestinations",title:ay,};var ad=at["tableData"];var aL=ad[0]["TABLE_TITLE"];var ao=ad[0]["tableColumns"];var aP=ad[0]["gridValues"];var aw=new Array();var am=new Array();var aH=0;for(var ap in ao){aw.push({name:"COLUMVal_"+aH,type:"string"});am.push({header:ao[ap],dataIndex:"COLUMVal_"+aH,align:"left",flex:1,sortable:true,renderer:function(a7,a1,a5,a9,a3,a8,a0){var a4=a0.getHeaderAtIndex(a3);
var a2=a4.dataIndex;if(a2!=null&&(a2=="COLUMVal_4"||a2=="COLUMVal_5")){if(a7!=null&&a7!="-"){if(a7>0){var a6='<table width="100%" cellpadding="0" cellspacing="0" border="0"  height="8" class="prog_border">';a6+="<tr>";a6+='<td align="left" width="100%" height="8" >';a6+='<table width="'+a7+'%" height="8"  cellpadding="0" cellspacing="0" border="0">';
a6+="<tr>";a6+='<td class="progress_GOOD" width="100%"> </td>';a6+="</tr>";a6+="</table>";a6+="</td>";a6+="</tr>";a6+="</table>";a7="<table width='100%' cellpadding='0' cellspacing='0'><tr><td style='width:50px'><span>"+a7+"</span></td><td >"+a6+"</td></tr></table>";}}}return a7;}});aH++;}var aI;if(ah==undefined||ah=="undefined"){aI=parseInt(aC[0].valueField);
}else{aI=parseInt(ah);}var ar="";var aB="";var aV={};if(netflowLastLoadedURL!=null&&netflowLastLoadedURL.indexOf("?")>-1){aB=netflowLastLoadedURL.substr(0,netflowLastLoadedURL.indexOf("?"));ar=netflowLastLoadedURL.substr(netflowLastLoadedURL.indexOf("?")+1);if(!Ext.isEmpty(ar)){var ag=ar.split("&");for(var aK in ag){var aq=ag[aK];
if(aq!=null&&aq.indexOf("=")>-1){var aD=aq.substr(0,aq.indexOf("="));var al=aq.substr(aq.indexOf("=")+1);if(aD.toLowerCase()=="timeline"){al=al.replace(/\+/g,"%20");}aV[aD]=decodeURIComponent(al);}}aV["isFromGridPage"]="true";aV["flowsTest"]="TopDestTest";}}var aM=Ext.create("Ext.data.Store",{fields:aw,pageSize:aI,autoLoad:true,proxy:{type:"ajax",actionMethods:{create:"POST",read:"POST",update:"POST",destroy:"POST"},url:aB,extraParams:aV,reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a1,a0,a4,a2){var a3=Ext.getCmp("netflowmainpanel");
if(a4){a3.setLoading(false,false);}else{a3.setLoading(true,true);}}}});var j;aM.on("load",function(a4,a3){var a1=aM.data.length;var a7=aM.pageSize;var a5=aM.totalCount;var a6="";if(aM.proxy.reader.rawData!=null){a6=aM.proxy.reader.rawData.page;}var a2=aM.pageSize;var a0=a5/a2;a0=a0.toString();if(a0.indexOf(".")>-1){a0=parseInt(a0);
a0=a0+1;}else{a0=parseInt(a0);}if(a6>a0){a6=a0;configPanl.setLoading(true,true);}if((a5-a1)==0||(a6==1&&a5<=a7)){Ext.getCmp("pagingtoolbar").hide();}else{Ext.getCmp("pagingtoolbar").show();}});var aW=Ext.getBody().getHeight()-390;if(aW<350){aW=350;}C={xtype:"grid",store:aM,id:"gridDisplay",autoScroll:true,scroll:true,title:aL,flex:1,height:aW,cls:"gridSkin",header:{style:{"padding":"2px 10px 0px 10px"}},columns:am,bbar:new Ext.PagingToolbar({store:aM,id:"pagingtoolbar",cls:"pagingtoolbar",pageSize:aI,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a1=Ext.getCmp("gridSearch");
if(a1!=null){var a2=a1.value;if(a2!=""){var a0=Ext.getCmp("gridDisplay");if(a0!=""){a0.store.filters.clear();}a1.reset();}}}}}),tools:[{xtype:"tbfill",},{xtype:"trigger",trigger1Cls:"x-form-clear-trigger",trigger2Cls:"x-form-search-trigger",name:"gridSearch",margin:"0 10 2 10",id:"gridSearch",cls:"whitedropdown_search",emptyText:searchLbl,labelAlign:"top",width:200,hidden:false,getTriggerMarkup:function(){var a4=this,a2=0,a7=(a4.readOnly||a4.hideTrigger),a0,a5=a4.triggerBaseCls,a6=[],a3=Ext.dom.Element.unselectableCls,a1="width:"+a4.triggerWidth+"px;"+(a7?"display:none;":""),a8=a4.extraTriggerCls+" "+Ext.baseCSSPrefix+"trigger-cell "+a3;
if(!a4.trigger1Cls){a4.trigger1Cls=a4.triggerCls;}for(a2=0;(a0=a4["trigger"+(a2+1)+"Cls"])||a2<1;a2++){if(a2==0){a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1+"display:none;",cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});
}else{a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1,cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});}}a6[0].cn.cls+=" "+a5+"-first";return Ext.DomHelper.markup(a6);},onTrigger1Click:function(){this.reset();},onTrigger2Click:function(){appCnt.textFieldSearch();
},},{xtype:"button",iconCls:"iconMaximize",style:{"background":"transparent","border":"none"},listeners:{"afterrender":function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:maximizeViewLbl});}},handler:function(){var a1=Ext.create("Ext.data.Store",{fields:aw,pageSize:aI,autoLoad:true,proxy:{type:"ajax",url:netflowLastLoadedURL+"&tab=Top Destinations&flowsTest=TopDestTest&isFromGridPage=true",reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a4,a3,a7,a5){var a6=Ext.getCmp("netflowmainpanel");
if(a7){a6.setLoading(false,false);}else{a6.setLoading(true,true);}}}});var a2;a1.on("load",function(a7,a6){var a4=a1.data.length;var ba=a1.pageSize;var a8=a1.totalCount;var a9="";if(a1.proxy.reader.rawData!=null){a9=a1.proxy.reader.rawData.page;}var a5=a1.pageSize;var a3=a8/a5;a3=a3.toString();if(a3.indexOf(".")>-1){a3=parseInt(a3);
a3=a3+1;}else{a3=parseInt(a3);}if(a9>a3){a9=a3;configPanl.setLoading(true,true);}if((a8-a4)==0||(a9==1&&a8<=ba)){Ext.getCmp("maxPagingtoolbar").hide();}else{Ext.getCmp("maxPagingtoolbar").show();}});var a0=Ext.create("utilities.GenericWindow",{title:aL,width:"90%",height:"90%",cssMask:true,padding:"5 10 10 10",resizable:false,draggable:true,closeAction:"destroy",scroll:true,layout:"fit",border:false,items:{xtype:"grid",store:a1,columns:am,cls:"gridSkin",layout:"fit",bbar:new Ext.PagingToolbar({store:a1,id:"maxPagingtoolbar",cls:"pagingtoolbar",pageSize:aI,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a4=Ext.getCmp("gridSearch");
if(a4!=null){var a5=a4.value;if(a5!=""){var a3=Ext.getCmp("gridDisplay");if(a3!=""){a3.store.filters.clear();}a4.reset();}}}}}),},autoScroll:true,bodyStyle:{"overflow-y":"auto"},}).show();}}]};n={autoScroll:false,scroll:false,layout:{type:"fit",align:"stretch"},items:[{xtype:"panel",scroll:true,autoScroll:false,layout:{type:"auto",pack:"start",align:"stretch"},flex:1,defaults:{margin:10,},items:[ak,C]}]};
}}}else{if(aR=="undefined"||aR==undefined||aR==""){aR=c+"!";}n={autoScroll:false,scroll:false,height:L,layout:{type:"fit",align:"stretch"},scroll:false,autoScroll:false,flex:1,items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div>'+aR+"</div></td></tr></table>"}]};
}}}});}else{if(l=="topconversations"){var Z=Q.DataURL;var P=localStorage.getItem("interfaceLastSelectedView");if(P!=null&&!Ext.isEmpty(P)){interfaceSelectedView=P;}var y=localStorage.getItem("showLastSelectedView");if(y!=null&&!Ext.isEmpty(y)){showVal=y;}var F=localStorage.getItem("timelineLastSelectedView");
if(F!=null&&!Ext.isEmpty(F)){globalTimeline=F;}if(interfaceSelectedView!=null){if(Z!=null&&Z.indexOf("interfaceToView")>0){Z=Z.replace(/(interfaceToView=)[^\&]+/,"$1"+encodeURIComponent(interfaceSelectedView));}else{Z=Z+"&interfaceToView="+encodeURIComponent(interfaceSelectedView);}if(Z!=null&&Z.indexOf("infosToArea")>0){Z=Z.replace(/(infosToArea=)[^\&]+/,"$1"+interfaceSelectedView);
}else{Z=Z+"&infosToArea="+encodeURIComponent(interfaceSelectedView);}}if(showVal!=null){if(Z.indexOf("show")>-1){Z=Z.replace(/(show=)[^\&]+/,"$1"+encodeURIComponent(showVal));}else{Z+="&show="+encodeURIComponent(showVal);}}if(globalTimeline!=null){if(Z.indexOf("selectedTimeline")>-1){Z=Z.replace(/(selectedTimeline=)[^\&]+/,"$1"+encodeURIComponent(globalTimeline));
}else{Z+="&selectedTimeline="+encodeURIComponent(globalTimeline);}if(Z.indexOf("timeline")>-1){Z=Z.replace(/(timeline=)[^\&]+/,"$1"+encodeURIComponent(globalTimeline));}else{Z+="&timeline="+encodeURIComponent(globalTimeline);}}netflowLastLoadedURL=Z;if(netflowLastLoadedURL!=null&&netflowLastLoadedURL.indexOf("&ciscoSelectedType=")>0){netflowLastLoadedURL=netflowLastLoadedURL.replace(/(ciscoSelectedType=)[^\&]+/,"$1"+"flows");
}else{netflowLastLoadedURL=netflowLastLoadedURL+"&ciscoSelectedType=flows";}var L=Ext.getBody().getHeight()-100;var u=[];var R="";var x="";var q="";var E="";if(Z!=null&&Z.indexOf("?")>-1){E=Z.substr(0,Z.indexOf("?"));q=Z.substr(Z.indexOf("?")+1);}Ext.Ajax.request({url:E,params:q+"&flowsTest=TopConverTest",method:"POST",scope:this,async:false,success:function(aa){if(aa.status==200&&!Ext.isEmpty(aa.responseText)){var af=aa.responseText;
var aA=Ext.decode(af);var az=aA["timelineCombo"];var aX=az["selectedTimelineCombo"];var aY=az["timelineComboArray"];var aF=az["monitor.dashboard.TimeLine"];var aO=aA["flowsInterfaceCombo"];var ao=aA["showCombo"];var ag=aA["eventsPerPageCombo"];var aC="";var ai="";var av=aA["timelineTitle"];var aZ=aA["pieChart"];
if(aZ!=null){m=aZ[0]["NOMSG"];}var ax=aA["pieTitle"];var aj="";var ab="";var aR="";if(aA["flowsPieArr"]!=null&&aA["flowsPieArr"].length>0){var aj=aA["flowsPieArr"][0]["DATA_0"];ab=aj["Data"];aR=aj["ErrorMsg"];}var aE=aA["fromView"];if(aE!=null&&aE=="SummaryView"){ab=aA["Data"];}if(av!=null){Q.timelineTitle=av;
}var ac=aA["flowsInterfaceSelectedCombo"];Q.timelineComboArray=aY;Q.selectedTimelineCombo=aX;if(aO!=null){Q.flowsInterfaceCombo=aO;Q.flowsInterfaceSelectedCombo=ac;}if(ao!=null){var aG=ao["showComboArray"];var aN=ao["selectedShowCombo"];Q.showComboArray=aG;Q.selectedShowCombo=aN;}if(ag!=null){aC=ag["eventsPerPageArray"];
ai=ag["selectedEventsPerPage"];Q.eventsPerPageArray=aC;Q.selectedEventsPerPage=ai;}this.addNetflowTabtoolbar(Q);var aU=aA["isfromInterfaceComboChange"];var aJ=aA["isInterfaceCountExceeded"];if(ab!=null&&ab=="true"){if(aE!=null&&aE=="SummaryView"&&aJ){var ak="";if(!Ext.isEmpty(m)){ak={xtype:"panel",flex:0.5,height:300,margin:5,layout:{type:"fit",},ui:"egGraphPanel",title:ax,items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+m+"</div></td></tr></table>"}]};
}else{ak={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",title:ax,id:"topConvpiechart",pieChartData:aZ,listeners:{afterrender:function(){var a2=this;if(!Ext.isEmpty(a2.pieChartData)){try{var a0={};Ext.defer(function(){var a3=Ext.getCmp("topConvpiechart");var a4=a3.getWidth();a0=jQuery.extend(true,{},getPieChartsforNetflow("topConvpiechart-body","290",a4),a0);
a0.setData(a2.pieChartData[0]["XML_DATA"],currentDateFormat,"","ProtocolPieNetflow");a0.drawChart();},500);}catch(a1){console.log(a1);}$(window).resize(function(){if(Ext.isEmpty(m)){if($("#"+"topConvpiechart-body").highcharts()!=undefined){$("#"+"topConvpiechart-body").highcharts().reflow();}}});}}}};
}var au="";var aQ=aA["comparisonCharts"];if(!Ext.isEmpty(aQ["NoMeasure"])){au={xtype:"panel",flex:0.5,height:300,margin:5,layout:{type:"fit",},ui:"egGraphPanel",title:aA["barTitle"],items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+aQ["NoMeasure"]+"</div></td></tr></table>"}]};
}else{au={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",title:aA["barTitle"],id:"topConvbarGraphPanel",barData:aQ,listeners:{afterrender:function(){var a2=this;if(!Ext.isEmpty(a2.barData)){try{var a0={};a0=jQuery.extend(true,{},getHighChartsBarInstance("topConvbarGraphPanel-body",270,600),a0);
a0.setData(a2.barData["XML_DATA"],currentDateFormat,"","netflowconversationbar");a0.drawChart();}catch(a1){console.log(a1);}}}}};}var ae=aA["tableData"];var ad=ae["tableColumns"];var aP=ae["tableValues"];if(aP!=null&&aP.length>0){var aT=new Array();var aw=new Array();var an=new Array();var aH=0;for(var aq in ad){aw.push({name:"COLUMVal_"+aH,type:"FLOATORSTRING"});
an.push({header:ad[aq],dataIndex:"COLUMVal_"+aH,align:"left",flex:1,sortable:true,renderer:function(a7,a1,a5,a9,a3,a8,a0){var a4=a0.getHeaderAtIndex(a3);var a2=a4.dataIndex;if(a2!=null&&(a2=="COLUMVal_3")){if(a7!=null&&a7!="-"){if(a7>0){var a6='<table width="100%" cellpadding="0" cellspacing="0" border="0"  height="8" class="prog_border">';
a6+="<tr>";a6+='<td align="left" width="100%" height="8" >';a6+='<table width="'+a7+'%" height="8"  cellpadding="0" cellspacing="0" border="0">';a6+="<tr>";a6+='<td class="progress_GOOD" width="100%"> </td>';a6+="</tr>";a6+="</table>";a6+="</td>";a6+="</tr>";a6+="</table>";a7="<table width='100%' cellpadding='0' cellspacing='0'><tr><td style='width:50px'><span>"+a7+"</span></td><td >"+a6+"</td></tr></table>";
}}}return a7;}});aH++;}var aM=Ext.data.Store({fields:aw,data:aP,});x={xtype:"grid",id:"gridDisplay",store:aM,height:290,margin:"0 10 10 10",title:aA["TABLE_TITLE"],cls:"gridSkin",header:{style:{"padding":"2px 10px 0px 10px"}},columns:an,tools:[{xtype:"tbfill",},{xtype:"trigger",trigger1Cls:"x-form-clear-trigger",trigger2Cls:"x-form-search-trigger",name:"gridSearch",margin:"0 10 2 10",id:"gridSearch",cls:"whitedropdown_search",emptyText:"Search",labelAlign:"top",width:200,hidden:false,getTriggerMarkup:function(){var a4=this,a2=0,a7=(a4.readOnly||a4.hideTrigger),a0,a5=a4.triggerBaseCls,a6=[],a3=Ext.dom.Element.unselectableCls,a1="width:"+a4.triggerWidth+"px;"+(a7?"display:none;":""),a8=a4.extraTriggerCls+" "+Ext.baseCSSPrefix+"trigger-cell "+a3;
if(!a4.trigger1Cls){a4.trigger1Cls=a4.triggerCls;}for(a2=0;(a0=a4["trigger"+(a2+1)+"Cls"])||a2<1;a2++){if(a2==0){a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1+"display:none;",cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});
}else{a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1,cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});}}a6[0].cn.cls+=" "+a5+"-first";return Ext.DomHelper.markup(a6);},onTrigger1Click:function(){this.reset();},onTrigger2Click:function(){appCnt.textFieldSearch();
},},{xtype:"button",iconCls:"iconMaximize",style:{"background":"transparent","border":"none"},listeners:{"afterrender":function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"Maximize View"});}},handler:function(){var a1=Ext.create("Ext.data.Store",{fields:aw,pageSize:aI,autoLoad:true,proxy:{type:"ajax",url:netflowLastLoadedURL+"&tab=Top Conversations&flowsTest=TopConverTest&isFromGridPage=true",reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a4,a3,a7,a5){var a6=Ext.getCmp("netflowmainpanel");
if(a7){a6.setLoading(false,false);}else{a6.setLoading(true,true);}}}});var a2;a1.on("load",function(a7,a6){var a4=a1.data.length;var ba=a1.pageSize;var a8=a1.totalCount;var a9="";if(a1.proxy.reader.rawData!=null){a9=a1.proxy.reader.rawData.page;}var a5=a1.pageSize;var a3=a8/a5;a3=a3.toString();if(a3.indexOf(".")>-1){a3=parseInt(a3);
a3=a3+1;}else{a3=parseInt(a3);}if(a9>a3){a9=a3;configPanl.setLoading(true,true);}if((a8-a4)==0||(a9==1&&a8<=ba)){Ext.getCmp("maxPagingtoolbar").hide();}else{Ext.getCmp("maxPagingtoolbar").show();}});var a0=Ext.create("utilities.GenericWindow",{title:aA["TABLE_TITLE"],width:"90%",height:"90%",cssMask:true,padding:"5 10 10 10",resizable:false,draggable:true,closeAction:"destroy",layout:"fit",scroll:true,border:false,items:{xtype:"grid",store:a1,columns:an,layout:"fit",cls:"gridSkin",bbar:new Ext.PagingToolbar({store:a1,id:"maxPagingtoolbar",cls:"pagingtoolbar",pageSize:aI,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a4=Ext.getCmp("gridSearch");
if(a4!=null){var a5=a4.value;if(a5!=""){var a3=Ext.getCmp("gridDisplay");if(a3!=""){a3.store.filters.clear();}a4.reset();}}}}}),},bodyStyle:{"overflow-y":"auto"},}).show();}}]};}else{x={xtype:"panel",flex:0.5,height:220,margin:"0 10 10 10",margin:5,layout:{type:"fit",},ui:"egGraphPanel",title:aA["TABLE_TITLE"],items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+noMeasureExcl+"</div></td></tr></table>"}]};
}al={xtype:"panel",tab:"Protocols",header:false,margin:5,layout:{type:"hbox",align:"stretch",},flex:1,items:[ak,au]};n={autoScroll:false,scroll:false,layout:{type:"fit",align:"stretch"},items:[{xtype:"panel",scroll:true,autoScroll:false,layout:{type:"auto",pack:"start",align:"stretch"},flex:1,defaults:{margin:10,},items:[al,x]}]};
}else{if(aU){var ay=aj["PIE_TITLE"];var aZ=aj["pieChart"];var ak="";if(!Ext.isEmpty(m)){ak={xtype:"panel",flex:0.5,height:300,margin:5,layout:{type:"fit",},ui:"egGraphPanel",title:ay,items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+m+"</div></td></tr></table>"}]};
}else{ak={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",title:ay,id:"topConvpiechart",pieChartData:aZ,listeners:{afterrender:function(){var a2=this;if(!Ext.isEmpty(a2.pieChartData)){try{var a0={};Ext.defer(function(){var a3=Ext.getCmp("topConvpiechart");var a4=a3.getWidth();a0=jQuery.extend(true,{},getPieChartsforNetflow("topConvpiechart-body","290","topConvpiechartObj"),a0);
a0.setData(a2.pieChartData[0]["XML_DATA"],currentDateFormat,"","ProtocolPieNetflow");a0.drawChart();},500);}catch(a1){console.log(a1);}$(window).resize(function(){if(Ext.isEmpty(m)){if($("#"+"topConvpiechart-body").highcharts()!=undefined){$("#"+"topConvpiechart-body").highcharts().reflow();}}});}}}};
}var au="";var aQ=aA["comparisonCharts"];if(!Ext.isEmpty(aQ["NoMeasure"])){au={xtype:"panel",flex:0.5,height:300,margin:5,layout:{type:"fit",},ui:"egGraphPanel",title:aA["barTitle"],items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div >'+aQ["NoMeasure"]+"</div></td></tr></table>"}]};
}else{au={xtype:"panel",flex:0.5,height:300,margin:5,ui:"egGraphPanel",title:aA["barTitle"],id:"topConvbarGraphPanel",barData:aQ,listeners:{afterrender:function(){var a2=this;if(!Ext.isEmpty(a2.barData)){try{var a0={};a0=jQuery.extend(true,{},getHighChartsBarInstance("topConvbarGraphPanel-body",270,600),a0);
a0.setData(a2.barData["XML_DATA"],currentDateFormat,"","netflowconversationbar");a0.drawChart();}catch(a1){console.log(a1);}}}}};}al={xtype:"panel",tab:"Protocols",header:false,margin:5,layout:{type:"hbox",align:"stretch",},flex:1,items:[ak,au]};var ae=aj["tableData"];var aL=ae[0]["TABLE_TITLE"];var ap=ae[0]["tableColumns"];
var aP=ae[0]["gridValues"];var aw=new Array();var an=new Array();var aH=0;for(var aq in ap){aw.push({name:"COLUMVal_"+aH,type:"string"});an.push({header:ap[aq],dataIndex:"COLUMVal_"+aH,align:"left",flex:1,sortable:true,renderer:function(a7,a1,a5,a9,a3,a8,a0){var a4=a0.getHeaderAtIndex(a3);var a2=a4.dataIndex;
if(a2!=null&&(a2=="COLUMVal_4"||a2=="COLUMVal_5")){if(a7!=null&&a7!="-"){if(a7>0){var a6='<table width="100%" cellpadding="0" cellspacing="0" border="0"  height="8" class="prog_border">';a6+="<tr>";a6+='<td align="left" width="100%" height="8" >';a6+='<table width="'+a7+'%" height="8"  cellpadding="0" cellspacing="0" border="0">';
a6+="<tr>";a6+='<td class="progress_GOOD" width="100%"> </td>';a6+="</tr>";a6+="</table>";a6+="</td>";a6+="</tr>";a6+="</table>";a7="<table width='100%' cellpadding='0' cellspacing='0'><tr><td style='width:50px'><span>"+a7+"</span></td><td >"+a6+"</td></tr></table>";}}}return a7;}});aH++;}var aI;if(ai==undefined||ai=="undefined"){aI=parseInt(aC[0].valueField);
}else{aI=parseInt(ai);}var at="";var aB="";var aV={};if(netflowLastLoadedURL!=null&&netflowLastLoadedURL.indexOf("?")>-1){aB=netflowLastLoadedURL.substr(0,netflowLastLoadedURL.indexOf("?"));at=netflowLastLoadedURL.substr(netflowLastLoadedURL.indexOf("?")+1);if(!Ext.isEmpty(at)){var ah=at.split("&");for(var aK in ah){var ar=ah[aK];
if(ar!=null&&ar.indexOf("=")>-1){var aD=ar.substr(0,ar.indexOf("="));var am=ar.substr(ar.indexOf("=")+1);if(aD.toLowerCase()=="timeline"){am=am.replace(/\+/g,"%20");}aV[aD]=decodeURIComponent(am);}}aV["flowsTest"]="TopConverTest";aV["isFromGridPage"]="true";}}var aM=Ext.create("Ext.data.Store",{fields:aw,pageSize:aI,autoLoad:true,proxy:{type:"ajax",actionMethods:{create:"POST",read:"POST",update:"POST",destroy:"POST"},url:aB,extraParams:aV,reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a1,a0,a4,a2){var a3=Ext.getCmp("netflowmainpanel");
if(a4){a3.setLoading(false,false);}else{a3.setLoading(true,true);}}}});var j;aM.on("load",function(a4,a3){var a1=aM.data.length;var a7=aM.pageSize;var a5=aM.totalCount;var a6="";if(aM.proxy.reader.rawData!=null){a6=aM.proxy.reader.rawData.page;}var a2=aM.pageSize;var a0=a5/a2;a0=a0.toString();if(a0.indexOf(".")>-1){a0=parseInt(a0);
a0=a0+1;}else{a0=parseInt(a0);}if(a6>a0){a6=a0;configPanl.setLoading(true,true);}if((a5-a1)==0||(a6==1&&a5<=a7)){Ext.getCmp("pagingtoolbar").hide();}else{Ext.getCmp("pagingtoolbar").show();}});var aW=Ext.getBody().getHeight()-390;if(aW<350){aW=350;}x={xtype:"grid",id:"gridDisplay",store:aM,margin:"0 10 10 10",title:aL,flex:1,height:aW,cls:"gridSkin",header:{style:{"padding":"2px 10px 0px 10px"}},columns:an,bbar:new Ext.PagingToolbar({store:aM,id:"pagingtoolbar",cls:"pagingtoolbar",pageSize:aI,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a1=Ext.getCmp("gridSearch");
if(a1!=null){var a2=a1.value;if(a2!=""){var a0=Ext.getCmp("gridDisplay");if(a0!=""){a0.store.filters.clear();}a1.reset();}}}}}),tools:[{xtype:"tbfill",},{xtype:"trigger",trigger1Cls:"x-form-clear-trigger",trigger2Cls:"x-form-search-trigger",name:"gridSearch",margin:"0 10 2 10",id:"gridSearch",cls:"whitedropdown_search",emptyText:searchLbl,labelAlign:"top",width:200,hidden:false,getTriggerMarkup:function(){var a4=this,a2=0,a7=(a4.readOnly||a4.hideTrigger),a0,a5=a4.triggerBaseCls,a6=[],a3=Ext.dom.Element.unselectableCls,a1="width:"+a4.triggerWidth+"px;"+(a7?"display:none;":""),a8=a4.extraTriggerCls+" "+Ext.baseCSSPrefix+"trigger-cell "+a3;
if(!a4.trigger1Cls){a4.trigger1Cls=a4.triggerCls;}for(a2=0;(a0=a4["trigger"+(a2+1)+"Cls"])||a2<1;a2++){if(a2==0){a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1+"display:none;",cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});
}else{a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1,cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});}}a6[0].cn.cls+=" "+a5+"-first";return Ext.DomHelper.markup(a6);},onTrigger1Click:function(){this.reset();},onTrigger2Click:function(){appCnt.textFieldSearch();
},},{xtype:"button",iconCls:"iconMaximize",style:{"background":"transparent","border":"none"},listeners:{"afterrender":function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:maximizeViewLbl});}},handler:function(){var a1=Ext.create("Ext.data.Store",{fields:aw,pageSize:aI,autoLoad:true,proxy:{type:"ajax",url:netflowLastLoadedURL+"&flowsTest=TopConverTest&isFromGridPage=true",reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a4,a3,a7,a5){var a6=Ext.getCmp("netflowmainpanel");
if(a7){a6.setLoading(false,false);}else{a6.setLoading(true,true);}}}});var a2;a1.on("load",function(a7,a6){var a4=a1.data.length;var ba=a1.pageSize;var a8=a1.totalCount;var a9="";if(a1.proxy.reader.rawData!=null){a9=a1.proxy.reader.rawData.page;}var a5=a1.pageSize;var a3=a8/a5;a3=a3.toString();if(a3.indexOf(".")>-1){a3=parseInt(a3);
a3=a3+1;}else{a3=parseInt(a3);}if(a9>a3){a9=a3;configPanl.setLoading(true,true);}if((a8-a4)==0||(a9==1&&a8<=ba)){Ext.getCmp("maxPagingtoolbar").hide();}else{Ext.getCmp("maxPagingtoolbar").show();}});var a0=Ext.create("utilities.GenericWindow",{title:aL,width:"90%",height:"90%",cssMask:true,padding:"5 10 10 10",resizable:false,draggable:true,closeAction:"destroy",layout:"fit",scroll:true,border:false,items:{xtype:"grid",store:a1,columns:an,layout:"fit",cls:"gridSkin",bbar:new Ext.PagingToolbar({store:a1,id:"maxPagingtoolbar",cls:"pagingtoolbar",pageSize:aI,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a4=Ext.getCmp("gridSearch");
if(a4!=null){var a5=a4.value;if(a5!=""){var a3=Ext.getCmp("gridDisplay");if(a3!=""){a3.store.filters.clear();}a4.reset();}}}}}),},autoScroll:true,bodyStyle:{"overflow-y":"auto"},}).show();}}]};n={autoScroll:false,scroll:false,layout:{type:"fit",align:"stretch"},items:[{xtype:"panel",scroll:true,autoScroll:false,layout:{type:"auto",pack:"start",align:"stretch"},flex:1,defaults:{margin:10,},items:[al,x]}]};
}else{var ay=aj["PIE_TITLE"];var aZ=aj["pieChart"];var aS=400;if(aZ.length==1){aS=950;}if(ay.length>110){ay=ay.substr(0,105)+"...";}var al={xtype:"genericpiechartslider",data:aZ,template:function(){var a1=this;var a0={};if(Ext.isEmpty(m)){a0=new Ext.XTemplate("<ul>",'<tpl for=".">','<li ><div  class="netFlowPieChartRightBorder" style="margin:5 auto 10px 0"><div style="text-align:center;margin:10px 5px 0px 5px;">{XML_DATA.title}</div><div id="chart4holder{#}"></div></div></li>',"</tpl>","</ul>");
}else{a0=new Ext.XTemplate("<ul>",'<li><table width="100%" height="200px"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div > '+noMeasureExcl+"</div></td></tr></table></li>","</ul>");}return a0;},loadChart:function(a6){var a5=this;if(!Ext.isEmpty(a6)){var a4=1;for(var a1 in a6){var a0=a4++;
try{var a2={};a2=jQuery.extend(true,{},getPieChartsforNetflow("chart4holder"+a0,250,aS),a2);a2.setData(a6[a1]["XML_DATA"],currentDateFormat,"","ProtocolPieNetflow");a2.drawChart();}catch(a3){console.log(a3);}$(window).resize(function(){if(Ext.isEmpty(m)){if($("#"+"chart4holder"+a0).highcharts()!=undefined){$("#"+"chart4holder"+a0).highcharts().reflow();
}}});}}},tab:"TopConversations",title:ay};var ae=aj["tableData"];var aL=ae[0]["TABLE_TITLE"];var ap=ae[0]["tableColumns"];var aP=ae[0]["gridValues"];var aw=new Array();var an=new Array();var aH=0;for(var aq in ap){aw.push({name:"COLUMVal_"+aH,type:"string"});an.push({header:ap[aq],dataIndex:"COLUMVal_"+aH,align:"left",flex:1,sortable:true,renderer:function(a7,a1,a5,a9,a3,a8,a0){var a4=a0.getHeaderAtIndex(a3);
var a2=a4.dataIndex;if(a2!=null&&(a2=="COLUMVal_4"||a2=="COLUMVal_5")){if(a7!=null&&a7!="-"){if(a7>0){var a6='<table width="100%" cellpadding="0" cellspacing="0" border="0"  height="8" class="prog_border">';a6+="<tr>";a6+='<td align="left" width="100%" height="8" >';a6+='<table width="'+a7+'%" height="8"  cellpadding="0" cellspacing="0" border="0">';
a6+="<tr>";a6+='<td class="progress_GOOD" width="100%"> </td>';a6+="</tr>";a6+="</table>";a6+="</td>";a6+="</tr>";a6+="</table>";a7="<table width='100%' cellpadding='0' cellspacing='0'><tr><td style='width:50px'><span>"+a7+"</span></td><td >"+a6+"</td></tr></table>";}}}return a7;}});aH++;}var aI;if(ai==undefined||ai=="undefined"){aI=parseInt(aC[0].valueField);
}else{aI=parseInt(ai);}var at="";var aB="";var aV={};if(netflowLastLoadedURL!=null&&netflowLastLoadedURL.indexOf("?")>-1){aB=netflowLastLoadedURL.substr(0,netflowLastLoadedURL.indexOf("?"));at=netflowLastLoadedURL.substr(netflowLastLoadedURL.indexOf("?")+1);if(!Ext.isEmpty(at)){var ah=at.split("&");for(var aK in ah){var ar=ah[aK];
if(ar!=null&&ar.indexOf("=")>-1){var aD=ar.substr(0,ar.indexOf("="));var am=ar.substr(ar.indexOf("=")+1);if(aD.toLowerCase()=="timeline"){am=am.replace(/\+/g,"%20");}aV[aD]=decodeURIComponent(am);}}aV["flowsTest"]="TopConverTest";aV["isFromGridPage"]="true";}}var aM=Ext.create("Ext.data.Store",{fields:aw,pageSize:aI,autoLoad:true,proxy:{type:"ajax",actionMethods:{create:"POST",read:"POST",update:"POST",destroy:"POST"},url:aB,extraParams:aV,reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a1,a0,a4,a2){var a3=Ext.getCmp("netflowmainpanel");
if(a4){a3.setLoading(false,false);}else{a3.setLoading(true,true);}}}});var j;aM.on("load",function(a4,a3){var a1=aM.data.length;var a7=aM.pageSize;var a5=aM.totalCount;var a6="";if(aM.proxy.reader.rawData!=null){a6=aM.proxy.reader.rawData.page;}var a2=aM.pageSize;var a0=a5/a2;a0=a0.toString();if(a0.indexOf(".")>-1){a0=parseInt(a0);
a0=a0+1;}else{a0=parseInt(a0);}if(a6>a0){a6=a0;configPanl.setLoading(true,true);}if((a5-a1)==0||(a6==1&&a5<=a7)){Ext.getCmp("pagingtoolbar").hide();}else{Ext.getCmp("pagingtoolbar").show();}});var aW=Ext.getBody().getHeight()-390;if(aW<350){aW=350;}x={xtype:"grid",id:"gridDisplay",store:aM,margin:"0 10 10 10",title:aL,flex:1,height:aW,cls:"gridSkin",header:{style:{"padding":"2px 10px 0px 10px"}},columns:an,bbar:new Ext.PagingToolbar({store:aM,id:"pagingtoolbar",cls:"pagingtoolbar",pageSize:aI,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a1=Ext.getCmp("gridSearch");
if(a1!=null){var a2=a1.value;if(a2!=""){var a0=Ext.getCmp("gridDisplay");if(a0!=""){a0.store.filters.clear();}a1.reset();}}}}}),tools:[{xtype:"tbfill",},{xtype:"trigger",trigger1Cls:"x-form-clear-trigger",trigger2Cls:"x-form-search-trigger",name:"gridSearch",margin:"0 10 2 10",id:"gridSearch",cls:"whitedropdown_search",emptyText:searchLbl,labelAlign:"top",width:200,hidden:false,getTriggerMarkup:function(){var a4=this,a2=0,a7=(a4.readOnly||a4.hideTrigger),a0,a5=a4.triggerBaseCls,a6=[],a3=Ext.dom.Element.unselectableCls,a1="width:"+a4.triggerWidth+"px;"+(a7?"display:none;":""),a8=a4.extraTriggerCls+" "+Ext.baseCSSPrefix+"trigger-cell "+a3;
if(!a4.trigger1Cls){a4.trigger1Cls=a4.triggerCls;}for(a2=0;(a0=a4["trigger"+(a2+1)+"Cls"])||a2<1;a2++){if(a2==0){a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1+"display:none;",cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});
}else{a6.push({tag:"td",role:"presentation",valign:"top",cls:a8,id:"MyTrigger_"+a2,style:a1,cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+a2,a5,a0].join(" "),role:"presentation"}});}}a6[0].cn.cls+=" "+a5+"-first";return Ext.DomHelper.markup(a6);},onTrigger1Click:function(){this.reset();},onTrigger2Click:function(){appCnt.textFieldSearch();
},},{xtype:"button",iconCls:"iconMaximize",style:{"background":"transparent","border":"none"},listeners:{"afterrender":function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:maximizeViewLbl});}},handler:function(){var a1=Ext.create("Ext.data.Store",{fields:aw,pageSize:aI,autoLoad:true,proxy:{type:"ajax",url:netflowLastLoadedURL+"&tab=Top Conversations&flowsTest=TopConverTest&isFromGridPage=true",reader:{type:"json",root:"gridValues",page:"page",start:"start",limit:"limit",totalProperty:"totalCount"}},listeners:{load:function(a4,a3,a7,a5){var a6=Ext.getCmp("netflowmainpanel");
if(a7){a6.setLoading(false,false);}else{a6.setLoading(true,true);}}}});var a2;a1.on("load",function(a7,a6){var a4=a1.data.length;var ba=a1.pageSize;var a8=a1.totalCount;var a9="";if(a1.proxy.reader.rawData!=null){a9=a1.proxy.reader.rawData.page;}var a5=a1.pageSize;var a3=a8/a5;a3=a3.toString();if(a3.indexOf(".")>-1){a3=parseInt(a3);
a3=a3+1;}else{a3=parseInt(a3);}if(a9>a3){a9=a3;configPanl.setLoading(true,true);}if((a8-a4)==0||(a9==1&&a8<=ba)){Ext.getCmp("maxPagingtoolbar").hide();}else{Ext.getCmp("maxPagingtoolbar").show();}});var a0=Ext.create("utilities.GenericWindow",{title:aL,width:"90%",height:"90%",cssMask:true,padding:"5 10 10 10",resizable:false,draggable:true,closeAction:"destroy",layout:"fit",scroll:true,border:false,items:{xtype:"grid",store:a1,columns:an,layout:"fit",cls:"gridSkin",bbar:new Ext.PagingToolbar({store:a1,id:"maxPagingtoolbar",cls:"pagingtoolbar",pageSize:aI,displayInfo:true,displayMsg:"Displaying {0} - {1} of {2}",listeners:{beforechange:function(){var a4=Ext.getCmp("gridSearch");
if(a4!=null){var a5=a4.value;if(a5!=""){var a3=Ext.getCmp("gridDisplay");if(a3!=""){a3.store.filters.clear();}a4.reset();}}}}}),},autoScroll:true,bodyStyle:{"overflow-y":"auto"},}).show();}}]};n={autoScroll:false,scroll:false,layout:{type:"fit",align:"stretch"},items:[{xtype:"panel",scroll:true,autoScroll:false,layout:{type:"auto",pack:"start",align:"stretch"},flex:1,defaults:{margin:10,},items:[al,x]}]};
}}}else{if(aR=="undefined"||aR==undefined){aR=noMeasure+"!";}n={autoScroll:false,scroll:false,height:L,layout:{type:"fit",align:"stretch"},scroll:false,autoScroll:false,flex:1,items:[{xtype:"container",html:'<table width="100%" height="100%"><tr><td valign="middle" align="center"><div class="iconInformation" ></div><div>'+aR+"</div></td></tr></table>"}]};
}}}});}}}}}return n;},loadTabPanel:function(){var b=this;var a=["Overview","Protocols","Top Sources","Top Destinations","Top Conversations"];var c=[];netflowLastLoadedURL="/final/monitor/EgNetflowDashboardJSON.jsp?tab=Network&hostName="+encodeURIComponent(requestParams.hostName)+"&compType="+encodeURIComponent(componentType)+"&ciscoSelectedType=overview&screenWidth=1012&screenHeight=570";
Ext.Ajax.request({url:netflowLastLoadedURL,method:"POST",success:function(h){if(h.status==200&&!Ext.isEmpty(h.responseText)){var e=h.responseText;var o=Ext.decode(e);var n=o["interfaceArr"];var f=o["protocolsURL"];var l=o["flowsURL"];var d=localStorage.getItem("netflowactivetab");if(d==null||d=="null"||d==""){d="topconversations";
}for(var k=0;k<a.length;k++){var g="";var m="";var j=overviewLbl;if(a[k]=="Overview"){g=o;j=overviewLbl;}else{if(a[k]=="Protocols"){m=f;j=protocolsLbl;}else{if(a[k]=="Top Sources"){m=l;j=sourcesLbl;}else{if(a[k]=="Top Destinations"){m=l;j=destinationsLbl;}else{if(a[k]=="Top Conversations"){m=l;j=conversationsLbl;
}}}}}c.push({title:j,id:a[k].replace(/\s/g,"").toLowerCase(),data:g,DataURL:m,selectedTimeline:"",timelineComboArray:"",selectedTimelineCombo:"",flowsInterfaceCombo:"",flowsInterfaceSelectedCombo:"",showComboArray:"",selectedShowCombo:"",timelineTitle:"",eventsPerPageArray:"",selectedEventsPerPage:"",});
}b.getNetflowmainpanel().removeAll();b.getNetflowmainpanel().add(c);if(d=="topconversations"){b.getNetflowmainpanel().setActiveTab(4);}else{if(d=="topdestinations"){b.getNetflowmainpanel().setActiveTab(3);}else{if(d=="topsources"){b.getNetflowmainpanel().setActiveTab(2);}else{if(d=="protocols"){b.getNetflowmainpanel().setActiveTab(1);
}else{b.getNetflowmainpanel().setActiveTab(0);}}}}if(!Ext.isEmpty(netflowMask)){Ext.destroy(netflowMask);delete netflowMask;}}}});},netflowmainpanelRender:function(a){var b=this;b.loadTabPanel();},netflowmainpanelBeforeRender:function(a){netflowMask=new Ext.LoadMask(Ext.getCmp("ComponentTabPanelId"),{msg:loadingLbl+", please wait...",});
netflowMask.show();},showConfigDropdown:function(b){var g=false;var f=250;if(b.title=="Overview"){g=true;f=150;}var h=this;var e=new Ext.XTemplate('<div style="float:left;margin:0px 0px 0px 4px;color:#f7f7f7" class="settingsfont">'+settingLbl+'</div><div class="iconBg"><div style="text-align:right;float:right;"><div class="iconClose3" id="closeSettings" onclick="JavaScript:closeWin()"></div></div>');
var d=130;var c=200;var a=b.getId();if(a=="topdestinations"||a=="topconversations"){d=170;c=240;}Ext.create("Ext.container.Container",{width:650,height:f,padding:5,id:"configMod_summary",name:"configMod_summary",cls:"configMode_popup",closeAction:"destroy",items:[{xtype:"container",cls:"configMode_popupArrow",style:{"top":"-14px","left":"618px"}},{xtype:"container",html:e.apply(),style:{"top":"0px","margin":"2px"}},{xtype:"panel",cls:"configMode_popup_inner",header:false,border:false,frame:false,layout:{type:"vbox",pack:"center",align:"left"},flex:1,height:f-50,defaults:{labelAlign:"top",margin:"10 10 10 10",labelSeparator:"",editable:false},margin:"0 10 0 10",items:[{xtype:"container",margin:"0 20 10 20",layout:{type:"hbox"},items:[{xtype:"container",hidden:g,items:[{fieldLabel:interfacesLbl,labelAlign:"top",xtype:"scrollcombo",width:300,id:"flowInterfaces",name:"flowInterfaces",margin:"0 10 0 0",editable:false,labelWidth:80,baseCls:"emptyCls",queryMode:"local",labelSeparator:"",valueField:"valueField",displayField:"displayField",cls:"dropdown",store:new Ext.data.Store({fields:["valueField","displayField"],data:[]}),listeners:{"select":function(i){Ext.defer(function(){h.selectFlowInterfaces(i);
},500);}}},]},{xtype:"container",hidden:g,items:[{xtype:"scrollcombo",fieldLabel:showLbl,labelWidth:45,width:150,margin:"0 20 0 10",labelAlign:"top",queryMode:"local",displayField:"displayField",valueField:"valueField",labelSeparator:"",cls:"dropdown",id:"showCombo",name:"showCombo",editable:false,store:new Ext.data.Store({fields:["valueField","displayField"],data:[]}),listeners:{"select":function(i){Ext.defer(function(){h.showSelect(i);
},500);}}}]}]},{xtype:"splitter",height:2,margin:"2px 0px 0px 2px",draggable:false,hidden:g,style:{"cursor":"default"}},{xtype:"timeline",cls:"timeline_left",id:"timelineCombo",name:"timelineCombo",width:570,margin:"10 0 0 10",hidden:false,hideMinutes:false,layout:{type:"hbox",pack:"center",align:"center"},},{xtype:"splitter",height:2,margin:"2px 0px 0px 2px",draggable:false,hidden:g,style:{"cursor":"default"}},{xtype:"button",text:"Submit",style:{"margin-left":"250px"},text:submitLbl,cls:"button20",margin:"10 10 10 255",width:60,id:"submitSettings",name:"submitSettings",listeners:{"click":function(){var q=Ext.getCmp("er_timeline").getValue();
if(q=="Any"){var j=Ext.getCmp("er_stdate").getValue();var i=Ext.getCmp("er_sthr").getValue();var k=Ext.getCmp("er_stmin").getValue();var m=Ext.getCmp("er_enddate").getValue();var l=Ext.getCmp("er_endhr").getValue();var o=Ext.getCmp("er_endmin").getValue();j=Ext.Date.dateFormat(j,"m/d/Y");m=Ext.Date.dateFormat(m,"m/d/Y");
var n=j+" "+i+":"+k;var p=m+" "+l+":"+o;if(new Date(n).getTime()>=new Date(p).getTime()){Ext.Msg.show({title:alertLbl,msg:startDlessE+".",buttons:Ext.Msg.OK,width:400,icon:"iconExclamation"});return;}q="Any "+j+" "+i+":"+k+":00|"+m+" "+l+":"+o+":00";}Ext.getCmp("configMod_summary").destroy();netflowMask=new Ext.LoadMask(Ext.getCmp("ComponentTabPanelId"),{msg:loadingLbl+"...",});
netflowMask.show();if(g){h.overviewTimelineSelect(q);}else{Ext.defer(function(){h.timelineSelect(q);},500);}}}}]}],renderTo:"ComponentTabPanelId-body"});this.setValueWithOptionInList("er_timeline",b.timelineComboArray,b.selectedTimelineCombo);Ext.getCmp("er_timeline").fireEvent("select",Ext.getCmp("er_timeline"));
this.setValueWithOptionInList("flowInterfaces",b.flowsInterfaceCombo,b.flowsInterfaceSelectedCombo);this.setValueWithOptionInList("showCombo",b.showComboArray,b.selectedShowCombo);this.setValueWithOptionInList("eventsPerPage",b.eventsPerPageArray,b.selectedEventsPerPage);},});function closeWin(){Ext.getCmp("configMod_summary").destroy();
Ext.getCmp("settingsBtn").setDisabled(false);}