var english=/^[\x20-\x7F]*$/;function setImageName(d,f){try{d=parent.filterEncode(d);}catch(c){try{d=parent.parent.filterEncode(d);}catch(a){}}var b="/final/monitor/sessionSimulationData.jsp?setImageValue=true&serviceName="+serviceName+"&compName="+compName+"&port="+port+"&info="+encodeURIComponent(d)+"&iconName="+f;
b=URLParamChange(b,false);try{parent.window.scriptNameSetImage=Ext.getCmp("scriptCombo").getValue();}catch(c){parent.window.scriptNameSetImage=null;}Ext.Ajax.request({url:b,method:"POST",async:false,success:function(e){var g=Ext.decode(e.responseText);Ext.getCmp("imgSelect").close();document.location.reload();
}});}function openLink(b,a){if(a){window.parent.location.href=b;}else{window.location.href=b;}}function URLParamChange(a,l){var f=a;if(f!=null){try{var c=Ext.getCmp("compCombo");var g="";if(!compComboHide&&c!=undefined&&c!="undefined"&&c!=null){g=c.getValue();if(g.indexOf(":NULL")!=-1){g=g.substring(0,g.indexOf(":NULL"));
}}else{if(compComboHide&&selComp!=null){g=selComp;if(g.indexOf(":NULL")!=-1){g=g.substring(0,g.indexOf(":NULL"));}}}if(f.indexOf("compName=")>-1){var k=f.substring(f.lastIndexOf("&")+1);if(k.indexOf("compName=")>-1){f=f.substring(0,f.lastIndexOf("&"));var i=f.split("?");var j=i[0]+"?"+"compName="+g+"&"+i[1];
f=j;}else{f=f.replace(/(compName=).*?(&)/,"$1"+g+"$2");}}else{var i=f.split("?");var j=i[0]+"?"+"compName="+g+"&"+i[1];f=j;}if(f.indexOf("compType=")>-1){var k=f.substring(f.lastIndexOf("&")+1);if(k.indexOf("compType=")>-1){f=f.substring(0,f.lastIndexOf("&"));var i=f.split("?");var j=i[0]+"?"+"compType="+compType+"&"+i[1];
f=j;}else{f=f.replace(/(compType=).*?(&)/,"$1"+compType+"$2");}}else{var i=f.split("?");var j=i[0]+"?"+"compType="+compType+"&"+i[1];f=j;}}catch(h){return f;}try{var b=Ext.getCmp("scriptCombo").getValue();if(b!=undefined&&b!=null&&b.trim().length>0){if(l){b=b+":";}if(f.indexOf("scriptName=")>-1){f=f.replace(/(scriptName=).*?(&)/,"$1"+b+"$2");
}else{var i=f.split("?");var j=i[0]+"?"+"scriptName="+b+"&"+i[1];f=j;}}}catch(d){return f;}}return f;}function wordTruncate(f,c,e){c=c||10;var b=f.length;if(b>c){e=e||"...";var d=e.length;if(d>c){return f.substr(b-c);}var g=-0.5*(c-b-d);var a=b/2;return f.substr(0,a-g)+e+f.substr(b-a+g);}return f;}function wrap(b,a){b.each(function(){var i=d3.select(this),e=i.text().split(/\s+/).reverse(),c,k=[],d=0,h=1.1,g=i.attr("y"),j=parseFloat(0.1),f=i.text(null).append("tspan").attr("x",0).attr("y",g).attr("dy",j+"em");
while(c=e.pop()){k.push(c);f.text(k.join(" "));if(f.node().getComputedTextLength()>a){k.pop();f.text(k.join(" "));k=[c];f=i.append("tspan").attr("x",0).attr("y",g).attr("dy",++d*h+j+"em").text(c);}}});}function openWindowGraph(){try{parent.document.getElementById("isSessionWindowOpen").value="true";}catch(a){}graphDataURL=URLParamChange(graphDataURL,true);
Ext.Ajax.request({url:graphDataURL,scope:this,async:true,success:function(c){var e=c.responseText;if(!Ext.isEmpty(e)){var b=Ext.decode(e);var d=Ext.getCmp("sessionSimulationGrapWindow");if(!Ext.isEmpty(d)){d.removeAll(true);}if(b!=null&&b!=undefined){Ext.create("Ext.window.Window",{title:graphTitle,height:"85%",cls:"logonWindowShadow",id:"sessionSimulationGrapWindow",modal:true,shadow:"sides",shadowOffset:50,padding:"0 10 10 10",header:{padding:"5 10 3 10",margin:5},resizable:false,width:"80%",layout:"fit",items:[{xtype:"transactionschartpanel",id:"transactionschartpanelid",jsonData:b,margin:"0 1 0 0",padding:0,border:true,isNotAreaChart:false}],listeners:{"close":function(g){try{parent.document.getElementById("isSessionWindowOpen").value="false";
}catch(f){}if(Ext.getCmp("timeWindow")){Ext.getCmp("timeWindow").hide();}}},}).show();}}},failure:function(){}});}function getScreenshotID(q,j,d,c){if(q==undefined||Ext.isEmpty(q)||j==undefined||Ext.isEmpty(j)||d==undefined){return"";}var g="";var l="";var f="";var t="";var k="";try{if(q=="Total"){var b=publicJsonData.Result;
g=publicJsonData.TestName;var h=b[1].Transactions;var p=h[0].ERROR;if(p==undefined||Ext.isEmpty(p)){for(var s in h){var r=h[s];if(r.Transaction_State!="GOOD"){q=r.Transaction_Name;break;}}}}l=publicJsonData.compType;f=publicJsonData.msmtHost;t=publicJsonData.lastInfoForSuccessSS;k=publicJsonData.isSuccessScreenshotRequired;
}catch(o){}if(d==="GOOD"){if(t!=q||!k){return"";}}try{q=parent.filterEncode(q);}catch(o){try{q=parent.parent.filterEncode(q);}catch(i){}}var m="";var n="/final/monitor/sessionSimulationData.jsp?getScreenshotID=true&info="+encodeURIComponent(q)+"&msmt="+j+"&compType="+l+"&msmtHost="+f;if(g!=""){n="/final/monitor/sessionSimulationData.jsp?getScreenshotID=true&info="+encodeURIComponent(q)+"&msmt="+j+"&test="+g+"&compType="+l+"&msmtHost="+f;
}Ext.Ajax.request({url:n,method:"POST",async:false,success:function(a){var e=Ext.decode(a.responseText);if(!Ext.isEmpty(e.ScreenshotID)&&e.ScreenshotID!=null&&e.ScreenshotID!=undefined){m=e.ScreenshotID;}}});return m;}function openScreenShot(g,a){if(Ext.isEmpty(a)||a==null||a==undefined){return;}var f="-";
if(a.indexOf("|")>0){f=a.substring(a.indexOf("|")+1);a=a.substring(0,a.indexOf("|"));}var b="Failure Screenshot";try{if(g.Transaction_State=="GOOD"){b="Success Screenshot";}}catch(c){if(g.State=="GOOD"){b="Success Screenshot";}}try{Ext.create("Ext.window.Window",{title:b,height:"80%",cls:"logonWindowShadow",modal:true,shadow:"sides",shadowOffset:50,padding:"0 10 10 10",header:{padding:"5 10 3 10",margin:5},resizable:false,width:"80%",items:[{xtype:"component",style:{"align":"center"},listeners:{"render":function(d){Ext.EventManager.onWindowResize(function(e,i){d.doComponentLayout();
});}},autoEl:{tag:"iframe",frameborder:false,width:"100%",height:"100%",style:{"align":"center"},src:"/final/monitor/screenshotDisplay.jsp?managerId="+encodeURI(f)+"&imageID="+encodeURI(a)+".jpg"}}]}).show();}catch(c){}}Ext.define("sessionSimulation.view.SessionSimulation",{extend:"Ext.panel.Panel",alias:"widget.sessionsimulation",margin:0,header:false,ui:"eg-x-panel",id:"main",flex:1,bodyPadding:"0 10 0 90",requires:["Ext.draw.Draw","Ext.draw.Sprite","Ext.draw.Matrix","Ext.Element","Ext.draw.CompositeSprite"],layout:{type:"fit"},width:Ext.getBody().getViewSize().width,height:Ext.getBody().getViewSize().height-10,style:{"overflow-x":"hidden !important"},autoScroll:true,scroll:false,listeners:{"boxready":function(a){loadSimulation(a);
},"resize":function(c,e,a,b,f,d){if(!Ext.isEmpty(b)){loadSimulation(c);}}}});function loadSimulation(s){try{var t=publicJsonData.Result;var j=false;var f=false;var P,D,F,J;try{P=t[0].DefaultTrans;D=t[1].Transactions;F=D;j=true;if(D[0].ERROR=="No data found"&&P.length>0){f=true;}if(D[0].ERROR=="No data found"){j=false;
}}catch(y){j=false;}if(j==true){var v="",a=$(window).width()-240;height=document.body.clientHeight;boxwidth=170;boxheight=150;chartarea=Math.round(a-(boxwidth*2)),diff=Math.round(chartarea/boxwidth);var g=_.chunk(F,diff);var d=_.forEach(g,function(e,x){if((x%2)==1){_.reverse(e);}});var r=[];var G=d3.select("#"+s.body.id).append("svg").attr("id","svgviewbox").attr("preserveAspectRatio","xMinYMin").data(d).attr("width",$("#"+s.body.id).width()).attr("height",function(R,x){R.x=boxwidth;
R.y=(x*(boxheight+67));R.width=boxwidth*R.length;R.height=boxheight;var e=0;if(P.length>=4){e=90;}calHeight=((((R.width*R.height)*d.length)-10)>($("#"+s.body.id).height()*$("#"+s.body.id).width())*d.length?$("#"+s.body.id).height():(((boxheight+67)*d.length)+10)+e);if(d.length==1){return(R.height*d.length)+350;
}else{if(F.length>10){return calHeight;}else{return calHeight;}}});var L=G.append("g").attr("id",(D.length<=diff)?"horizontalView":"verticalView");var N="";if(strSkin=="Light"){N="#f2f2f2";}else{N="#575757";}var k="",K=90,I=10;L.each(function(aj,ag){try{if(D.length<=diff){var Y=[],ad=0,ae=120;P.forEach(function(ap,ao){var an=ap.DispName.toUpperCase(),am=new Ext.util.TextMetrics(),aq=d3.max([am.getWidth(an),ae]);
Y.push(aq+I);});k=_.sum(Y);var ah=L.append("rect").attr("width",k).attr("height",K).attr("rx",10).attr("ry",10).attr("class","svgDefaultTransactions svgDefaultTransactionsOuter 1").attr("stroke-width",2).attr("transform","translate(0,0)");var V=ah.node().getBBox();var T=L.selectAll("g").data(P).enter().append("g").attr("transform",function(ao,am){if(am==0){return"translate(0,0)";
}else{var an=Y[am-1];ad=ad+an;return"translate("+ad+",0)";}}).attr("class","dataview");var R=T.append("rect").attr("width",function(an,am){return Y[am]-1;}).attr("height",90).attr("rx",10).attr("ry",10).attr("class","empty").attr("fill","transparent").attr("x",function(an,am){return 0;}).attr("y",function(an,am){return 0;
});T.append("line").attr("x1",0).attr("y1",10).attr("x2",0).attr("class","svgDivider").attr("stroke-width",function(an,am){return"1";}).attr("y2",(K-10)).attr("x",0).attr("transform",function(an,am){return"translate("+Y[am]+",0)";});T.append("text").attr("x",function(an,am){return Y[am]/2;}).attr("y",function(an,am){return V.y+30;
}).attr("text-anchor","middle").attr("class","newFont_bold13 svgBodyFontColor lbl").attr("data-qtip",function(am){return am.DispName;}).text(function(am){return am.DispName;}).attr("text-anchor","middle");var x=ah.node().getBBox().width;var e=T.append("text").attr("data-qtip",function(am){return am.Val;
}).attr("transform",function(an,am){return"translate(0,10)";}).attr("y",function(an,am){if(an.DispName=="Response time"||an.DispName=="Transaction processing time"){return(K/2)+10;}else{return(K/2)+6;}}).attr("x",function(an,am){if(an.DispName=="Response time"||an.DispName=="Transaction processing time"){return Y[am]/2-16;
}else{return Y[am]/2;}}).attr("text-anchor","middle").attr("class",function(ao,am){var an=ao.DispName.toLowerCase();if(an=="location"){return"newFont_normal12 svgBodyFontColor lbllocation";}else{if(an=="simulated by"||an=="simulation engine status"){return"newFont_normal12 svgBodyFontColor lbl";}else{if(an=="availability"||an=="transaction availability"){return"mouse newFont_normal20 svgTextState_"+ao.State;
}else{if(an=="response time"||an=="transaction processing time"){return"dynWidth mouse newFont_normal20 svgTextState_"+ao.State;}}}}}).text(function(ao,am){var an=ao.DispName.toLowerCase();if(an=="location"||an=="simulated by"||an=="simulation engine status"){var ap="";if(english.test(ao.Val)){ap=Ext.String.ellipsis(ao.Val,20,true);
}else{ap=Ext.String.ellipsis(ao.Val,9,true);}return ap;}else{if(an=="response time"||an=="transaction processing time"){if(ao.Val!="-"){return ao.Val+"s";}else{return ao.Val;}}}}).attr("text-anchor","middle").on("click",function(an,am){if(an.defaultTrans_link!=undefined&&an.defaultTrans_link!=null){return openLink(an.defaultTrans_link,toolBarHide);
}});T.append("svg:image").attr("width",function(an,am){if(an.DispName=="Location"){return 16;}else{if(an.DispName=="Response time"||an.DispName=="Simulated by"||an.DispName=="Transaction processing time"){return null;}else{return 20;}}}).attr("height",function(an,am){if(an.DispName=="Location"){return 16;
}else{if(an.DispName=="Response time"||an.DispName=="Simulated by"||an.DispName=="Transaction processing time"){return null;}else{return 20;}}}).attr("xlink:href",function(an,am){if(an.DispName=="Location"){return"/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/iconLocation.svg";}else{if(an.DispName=="Response time"||an.DispName=="Simulated by"||an.DispName=="Transaction processing time"||an.DispName=="Simulation engine status"){return"";
}else{return"/final/monitor/eg_scripts/sessionSimulation/svg/availability_"+an.State+".svg";}}}).attr("class","mouse stateicon 1").attr("x",function(ao,am){if(ao.DispName=="Location"){var an=d3.select(d3.select(this).node().parentNode).select(".lbllocation").node().getBBox();return(an.x-16);}else{return(Y[am]/2)-20;
}}).attr("y",function(ao,am){if(am==0){if(ao.DispName=="Location"){var an=d3.select(d3.select(this).node().parentNode).select(".lbllocation").node().getBBox();return(an.y+7);}}else{if(ao.DispName=="Response time"||ao.DispName=="Simulated by"||ao.DispName=="Transaction processing time"||ao.DispName=="Simulation engine status"){return 0;
}else{return(K/2)+3;}}}).on("click",function(an){var am=getScreenshotID(an.Info_Name,an.msmt_time,an.State);if(!Ext.isEmpty(an.State)&&an.State!=null&&an.State!=undefined){if(an.defaultTrans_link!=undefined&&an.defaultTrans_link!=null){return openLink(an.defaultTrans_link,toolBarHide);}else{if(am!=undefined&&am!=null&&am.trim().length>0&&am!="-"){return openScreenShot(an,am);
}else{return openWindowGraph();}}}});T.append("svg:image").attr("width",function(ao,am){var an=ao.DispName.toLowerCase();if(an=="availability"||an=="response time"||an=="transaction availability"||an=="transaction processing time"||an=="simulation engine status"){return 16;}else{return null;}}).attr("height",function(ao,am){var an=ao.DispName.toLowerCase();
if(an=="availability"||an=="response time"||an=="transaction availability"||an=="transaction processing time"||an=="simulation engine status"){return 16;}else{return null;}}).attr("xlink:href",function(ap,an){var ao=ap.DispName.toLowerCase();if(ao=="availability"||ao=="response time"||ao=="transaction availability"||ao=="transaction processing time"){if(!Ext.isEmpty(ap.State)&&ap.State!=null&&ap.State!=undefined){var am=getScreenshotID(ap.Info_Name,ap.msmt_time,ap.State);
if(am!=undefined&&am!=null&&am.trim().length>0&&am!="-"){return"/final/monitor/eg_scripts/sessionSimulation/svg/iconSnapshot.svg";}else{if(ap.State=="GOOD"){return"/final/monitor/eg_scripts/sessionSimulation/svg/iconGraph.svg";}}}}}).attr("class",function(ap,an){var ao=ap.DispName.toLowerCase();if(ao=="availability"||ao=="response time"||ao=="transaction availability"||ao=="transaction processing time"){if(!Ext.isEmpty(ap.State)&&ap.State!=null&&ap.State!=undefined){var am=getScreenshotID(ap.Info_Name,ap.msmt_time,ap.State);
if(am!=undefined&&am!=null&&am.trim().length>0&&am!="-"){return"mouse icon";}else{if(ap.State=="GOOD"){return"mouse icon";}}}}}).attr("x",function(ao,am){if(ao.DispName=="Response time"||ao.DispName=="Transaction processing time"){var an=d3.select(d3.select(this).node().parentNode).select(".dynWidth").node().getBBox();
return(an.x+an.width+16);}else{return(Y[am]/2)+14;}}).attr("y",function(an,am){return(K/2)+5;}).on("click",function(ao,an){var am=getScreenshotID(ao.Info_Name,ao.msmt_time,ao.State);if(!Ext.isEmpty(ao.State)&&ao.State!=null&&ao.State!=undefined){if(am!=undefined&&am!=null&&am.trim().length>0&&am!="-"){return openScreenShot(ao,am);
}else{if(ao.State=="GOOD"){return openWindowGraph();}}}});}else{var ah=L.append("rect").attr("rx",10).attr("ry",10).attr("class","svgDefaultTransactions svgDefaultTransactionsOuter 2").attr("stroke-width",2).attr("transform","translate(2,0)");var ac=0;var Y=119;var af=80;var ai=20;var Z=20;var T=L.selectAll("g").data(P).enter().append("g").attr("transform",function(an,am){return"translate("+Y/2+","+af*am+")";
});T.append("rect").attr("width",Y).attr("height",af).attr("fill","transparent").attr("transform",function(an,am){if(am==0){af=1;}return"translate("+(-Y/2+12)+","+af*am+")";});T.append("rect").attr("width",Y-20).attr("height",af).attr("class","vseparator").attr("transform",function(an,am){if(am==0){af=1;
}return"translate("+((-Y/2)+12)+","+af*am+")";});var U=T.append("text").attr("transform",function(ap,ao){var an=ap.DispName.toUpperCase(),am=new Ext.util.TextMetrics();if(Y>am.getWidth(an)){ap.yPosition=(ai+10);return"translate(0,"+(ai+10)+")";}else{ap.yPosition=ai;return"translate(0,"+(ai)+")";}}).attr("x",0).attr("y",0).attr("width",123).attr("text-anchor","middle").attr("class","newFont_bold13 svgBodyFontColor displayNameLabel").attr("data-qtip",function(am){return am.DispName;
}).text(function(am){return am.DispName;}).call(wrap,100);var X=3;T.append("text").attr("data-qtip",function(am){return am.Val;}).attr("transform",function(ao,am){var an=d3.select(d3.select(this).node().parentNode).select(".displayNameLabel").node().getBBox();if(P.length==4){if(ao.State){if(ao.DispName!="Transaction processing time"){return"translate("+X+","+(ai+an.height+Z+8)+")";
}else{return"translate(-10,"+(ai+an.height+20)+")";}}else{if(ao.DispName=="Location"){return"translate("+X+","+(ai+an.height+20)+")";}else{return"translate(0,"+(ai+an.height+20)+")";}}}else{if(ao.State){if(ao.DispName!="Transaction processing time"){if(an.height>20){return"translate("+X+","+(ai+an.height+(Z/2)+8)+")";
}else{return"translate("+X+","+(ai+an.height+Z+8)+")";}}else{return"translate(-10,"+(ai+an.height+20)+")";}}else{if(ao.DispName=="Location"){return"translate("+X+","+(ai+an.height+20)+")";}else{return"translate(0,"+(ai+an.height+20)+")";}}}}).attr("x",0).attr("y",0).attr("text-anchor","middle").attr("class",function(ao,am){var an=ao.DispName.toLowerCase();
if(an=="location"){return"newFont_normal12 svgBodyFontColor lbllocation";}else{if(an=="simulated by"||an=="simulation engine status"){return"newFont_normal12 stateText svgBodyFontColor";}else{if(an=="availability"||an=="transaction availability"){return"mouse newFont_normal20 stateText svgTextState_"+ao.State;
}else{if(an=="response time"||an=="transaction processing time"){return"dynWidth mouse stateText 2 newFont_normal20 svgTextState_"+ao.State;}}}}}).text(function(ao,am){var an=ao.DispName.toLowerCase();if(an=="location"||an=="simulated by"||an=="simulation engine status"){var ap="";if(english.test(ao.Val)){ap=Ext.String.ellipsis(ao.Val,20,true);
}else{ap=Ext.String.ellipsis(ao.Val,9,true);}return ap;}else{if(an=="response time"||an=="transaction processing time"){if(ao.Val!="-"){return ao.Val+"s";}else{return ao.Val;}}}}).on("click",function(an,am){if(am==1||am==2||am==3){return openLink(an.defaultTrans_link,toolBarHide);}else{return"";}});T.filter(function(an,am){return(an.State&&an.DispName!="Transaction processing time");
}).append("svg:image").attr("width",function(an,am){return 20;}).attr("height",function(an,am){return 20;}).attr("xlink:href",function(an,am){if(an.DispName=="Location"){return"/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/iconLocation.svg";}else{if(an.DispName=="Response time"||an.DispName=="Simulated by"||an.DispName=="Transaction processing time"||an.DispName=="Simulation engine status"){return"";
}else{return"/final/monitor/eg_scripts/sessionSimulation/svg/availability_"+an.State+".svg";}}}).attr("x",function(ap){var an=d3.select(d3.select(this).node().parentNode).select(".displayNameLabel").node().getBBox();try{var am=d3.select(d3.select(this).node().parentNode).select(".dynWidth").node().getBBox();
return(am.x-20);}catch(ao){return(an.x+10);}}).attr("y",function(an){var am=d3.select(d3.select(this).node().parentNode).select(".displayNameLabel").node().getBBox();if(an.State){if(an.DispName.length>15){return(ai+am.height);}else{return(ai+am.height+10);}}}).attr("class","mouse stateIcon 2").on("click",function(an){var am=getScreenshotID(an.Info_Name,an.msmt_time,an.State);
if(!Ext.isEmpty(an.State)&&an.State!=null&&an.State!=undefined){if(an.defaultTrans_link!=undefined&&an.defaultTrans_link!=null){return openLink(an.defaultTrans_link,toolBarHide);}else{if(an.State==="HIGH"){return openScreenShot(an,am);}else{return openWindowGraph();}}}});T.append("svg:image").attr("width",function(an,am){if(an.DispName=="Simulated by"||an.DispName=="Location"){return 16;
}else{return 18;}}).attr("height",function(an,am){if(an.DispName=="Simulated by"||an.DispName=="Location"){return 16;}else{return 16;}}).attr("xlink:href",function(ap,an){var ao=ap.DispName.toLowerCase();if(an==0){if(ao=="location"){return"/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/iconLocation.svg";
}}else{if(ao=="availability"||ao=="response time"||ao=="transaction availability"||ao=="transaction processing time"){if(!Ext.isEmpty(ap.State)&&ap.State!=null&&ap.State!=undefined){var am=getScreenshotID(ap.Info_Name,ap.msmt_time,ap.State);if(am!=undefined&&am!=null&&am.trim().length>0&&am!="-"){return"/final/monitor/eg_scripts/sessionSimulation/svg/iconSnapshot.svg";
}else{if(ap.State=="GOOD"){return"/final/monitor/eg_scripts/sessionSimulation/svg/iconGraph.svg";}}}}}}).attr("class","mouse").attr("x",function(aq,an){if(aq.DispName=="Location"){var ap=d3.select(d3.select(this).node().parentNode).select(".lbllocation").node().getBBox();return((ap.x+X)-18);}else{if(!Ext.isEmpty(aq.State)&&aq.State!=null&&aq.State!=undefined){var ao=d3.select(d3.select(this).node().parentNode).select(".stateText").node().getBBox();
var am=getScreenshotID(aq.Info_Name,aq.msmt_time,aq.State);if(am!=undefined&&am!=null&&am.trim().length>0&&am!="-"){return ao.width+8;}else{if(aq.DispName=="Transaction processing time"){return(ao.x+ao.width);}else{return(ao.x+ao.width)+8;}}}}}).attr("y",function(at,ao){if(ao==0){if(at.DispName=="Location"){var ar=d3.select(d3.select(this).node().parentNode).select(".lbllocation").node().getBBox();
return(ai+ar.height+6);}}else{if(!Ext.isEmpty(at.State)&&at.State!=null&&at.State!=undefined){var am=getScreenshotID(at.Info_Name,at.msmt_time,at.State);if(am!=undefined&&am!=null&&am.trim().length>0&&am!="-"){var an=d3.select(d3.select(this).node().parentNode).select(".stateIcon").node().getBBox();return an.y+2;
}else{if(at.State=="GOOD"){try{var an=d3.select(d3.select(this).node().parentNode).select(".stateIcon").node().getBBox();return an.y+2;}catch(aq){var ap=d3.select(d3.select(this).node().parentNode).select(".displayNameLabel").node().getBBox();return(ai+ap.height+Z)-16;}}}}}}).on("click",function(an){var am=getScreenshotID(an.Info_Name,an.msmt_time,an.State);
if(!Ext.isEmpty(an.State)&&an.State!=null&&an.State!=undefined){if(an.State==="HIGH"){return openScreenShot(an,am);}else{return openWindowGraph();}}});var ak=d3.select("#verticalView").node().getBBox();ah.attr("height",(ak.height+6)).attr("width",119);var aa=$("#svgviewbox").height();if(ak.height+180>aa){$("#svgviewbox").height(ak.height+180);
}}}catch(al){}var W=$("#main-body").width()/2-10;var S=$("#svgviewbox").height();var ab=(S-K)-40;d3.select(this).attr("transform",function(){if(D.length<=diff){if(screen.width<=1366){return"translate("+(a/2-k/2)+","+ab+")";}else{return"translate("+(((a/2)-(k/2))+30)+","+ab+")";}}else{return"translate(0,160)";
}});});var O=G.append("defs").append("marker").attr("id","arrow").attr("viewBox","0 0 3 6").attr("class","svgArrowColor").attr("refX",0).attr("refY",3).attr("markerWidth",3).attr("markerHeight",3).attr("orient","auto");O.append("path").attr("d","M0,0,3,3,0,6Z");var C=G.append("defs").append("marker").attr("id","arrowleft").attr("viewBox","0 0 3 6").attr("class","svgArrowColor").attr("refX",1).attr("refY",3).attr("markerWidth",3).attr("markerHeight",3).attr("orient","auto").append("path").attr("d","M3,6,0,3,3,0Z");
var u=G.append("defs").append("marker").attr("id","circle").attr("viewBox","0 0 19 19").attr("class","svgArrowColor").attr("refX",11).attr("refY",10).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("circle").attr("cx",10).attr("cy",10).attr("r",5);counter=1;bj=Math.round(boxwidth);
var E=d3.scaleLinear().range([bj,0]);var p=d3.scaleLinear().range([0,bj]);var i=G.append("g").attr("id","simulationView");var c=i.append("g").attr("id","transactions").attr("transform",function(x,e){if(D.length<=diff){if(D.length<=4){if(screen.width<=1365){return"translate(0,-60)";}else{if(screen.width==1366){return"translate(0,-60)";
}else{return"translate(0,-60)";}}}else{if(screen.width<=1366){if(D.length<=5&&!toolBarHide){return"translate(0,-60)";}else{return"translate(0,0)";}}else{return"translate(0,0)";}}}else{if(D.length<=4){if(screen.width<=1366){return"translate(0,0)";}else{return"translate(0,0)";}}else{if(screen.width<=1366){if(D.length<=5&&!toolBarHide){return"translate(0,-60)";
}else{return"translate(0,0)";}}else{return"translate(0,0)";}}}}).each(function(){d3.select(this).append("svg:image").attr("width",64).attr("height",64).attr("transform",function(T,S){if(D.length<=diff){return"translate("+50+","+182+")";}else{return"translate(45,35)";}}).attr("xlink:href",function(S){return"/final/monitor/eg_scripts/sessionSimulation/svg/transactions.svg";
});var R=d3.select(this).append("path").attr("class","svgLineColor").style("stroke-width","4").style("opacity",1).attr("d","M70,125L176,125").attr("transform",function(T,S){if(D.length<=diff){return"translate("+10+","+150+")";}else{return"translate(10,0)";}}).attr("marker-end","url(#arrow)");var e=d3.select(this).append("path").attr("class","svgLineColor").style("stroke-width","4").style("opacity",1).attr("d","M31 0 v5 5").attr("transform",function(T,S){if(D.length<=diff){return"translate("+51+","+265+")";
}else{return"translate(51,115)";}});var x=d3.select(this).append("text").attr("x","40").attr("y","110").attr("class","newFont_normal12 svgBodyFontColor").attr("transform",function(T,S){if(D.length<=diff){return"translate("+6+","+150+")";}else{return"translate(6,0)";}}).text(function(T,S){return"Transactions";
});});var q=i.selectAll(".row").data(d).enter();var w=q.append("g").attr("class",function(x,e){return"row"+e;}).attr("transform",function(x,e){x.x=boxwidth;x.y=(e*(boxheight+67));x.width=boxwidth*x.length;x.height=boxheight;if(D.length<=diff){if(D.length<=4){if(screen.width<=1366){return"translate("+x.x+","+(x.y+90)+")";
}else{return"translate("+x.x+","+(x.y+90)+")";}}else{if(screen.width<=1366){return"translate("+x.x+","+(x.y+90)+")";}else{return"translate("+x.x+","+(x.y+150)+")";}}}else{return"translate("+x.x+","+x.y+")";}});var o=chartarea;w.each(function(x,e){if(e==0){o=x.width-x.x;}x.forEach(function(R,S){if((e%2)==1){R.direction="left";
R.id="columnID"+S;R.x=o-boxwidth*((x.length)-S)+x.x;R.id=e;R.y=boxheight/2;if(diff>=x.length){if(R.x<diff){R.first=true;}}r.push({x:R.x,y:R.y});}else{R.x=boxwidth*S;R.id="columnID"+S;R.direction="right";R.y=boxheight/2;if(diff>=x.length){if(R.x==o){R.last=true;}else{if(R.x==0){R.jfirst=true;}}}r.push({x:R.x,y:R.y});
}if(R.x>=(chartarea-boxwidth)){R.collast=true;}});counter=1;});d3.selection.prototype.moveUp=function(){return this.each(function(){this.parentNode.appendChild(this);});};var H=w.selectAll(".square").data(function(x,e){return x;}).enter();var b=H.insert("g",":first-child").attr("class","square").attr("transform",function(x,e){return"translate("+(x.x+40)+",0)";
}).attr("id",function(x,e){return x.id;});b.append("rect").attr("height",function(x,e){return boxwidth;}).attr("width",function(x,e){return boxheight;}).attr("fill","none");b.append("circle").attr("r",function(x,e){return 43;}).attr("cx",function(x,e){return 75;}).attr("cy",function(x,e){return x.y+8;
}).attr("class","svgLineColor").attr("stroke-width","4").attr("fill","none");var z=b.append("g").attr("transform",function(x,e){return"translate("+100+","+110+")";});b.append("rect").attr("width",22).attr("height",8).attr("class","svgCircleOvercolor").attr("transform",function(x,e){if(x.direction=="right"){return"translate(90, 117)";
}else{return"translate(45, 117)";}});var z=b.append("g").attr("transform",function(x,e){return"translate("+80+","+155+")";}).attr("class","g_text");z.append("text").attr("text-anchor","middle").attr("data-qtip",function(e){return e.Transaction_Name;}).text(function(x){if(x.Transaction_Name.length>16){var e="";
if(english.test(x.Transaction_Name)){if(x.Transaction_Name.length>20){e=wordTruncate(x.Transaction_Name,20);}else{e=x.Transaction_Name;}}else{e=wordTruncate(x.Transaction_Name,16);}return e;}return x.Transaction_Name;}).attr("y","0").attr("class",function(x,e){return"mouse newFont_normal12 svgBodyFontColor";
}).on("click",function(e){if(d3.event.defaultPrevented){return;}if(timer){clearTimeout(timer);}timer=setTimeout(function(){if(toolBarHide){window.parent.location.href=e.Transaction_link;}else{window.location.href=e.Transaction_link;}},250);});var m=z.append("a").attr("class",function(x,e){return"mouse";
});m.append("svg:image").attr("width",20).attr("height",20).attr("xlink:href",function(e){if(!Ext.isEmpty(e.Transaction_Avail_State)&&e.Transaction_Avail_State!=null&&e.Transaction_Avail_State!=undefined){return"/final/monitor/eg_scripts/sessionSimulation/svg/state_symbol_"+e.Transaction_Avail_State+".svg";
}}).attr("transform",function(x,e){return"translate(-36,6)";}).on("click",function(e){return openLink(e.Transaction_link,toolBarHide);});m.append("text").attr("text-anchor","middle").attr("class",function(x,e){if(x.Transaction_Avail_State=="GOOD"){return"newFont_normal12 svgBodyFontColor";}else{return"newFont_normal12 svgBodyFontColor";
}}).text(function(e){if(e.sta_val=="Yes"){return"Success";}else{return"Failed";}}).attr("transform",function(x,e){if(x.Transaction_Avail_State=="GOOD"){return"translate(4,20)";}else{return"translate(-2,20)";}}).on("click",function(e){return openLink(e.Transaction_link,toolBarHide);});m.append("svg:image").attr("width",16).attr("height",16).attr("xlink:href",function(R,x){var e=getScreenshotID(R.Info_Name,R.msmt_time,R.Transaction_Avail_State);
if(e!=undefined&&e!=null&&e.trim().length>0&&e!="-"){return"/final/monitor/eg_scripts/sessionSimulation/svg/iconSnapshot.svg";}}).attr("transform",function(x,e){if(x.Transaction_Avail_State=="GOOD"){return"translate(30,8)";}else{return"translate(20,8)";}}).attr("class","mouse").on("click",function(x){var e=getScreenshotID(x.Info_Name,x.msmt_time,x.Transaction_Avail_State);
return openScreenShot(x,e);});var n=m.append("g").attr("transform",function(x,e){return"translate(-35,0)";});n.append("svg:image").attr("class","transval").attr("width",20).attr("height",20).attr("xlink:href",function(x,e){if(!Ext.isEmpty(x.Transaction_Val_State)&&x.Transaction_Val_State!=null&&x.Transaction_Val_State!=undefined){return"/final/monitor/eg_scripts/sessionSimulation/svg/state_symbol_"+x.Transaction_Val_State+".svg";
}}).attr("transform",function(x,e){return"translate(-2,26)";}).on("click",function(e){return openLink(e.Transaction_link,toolBarHide);});n.append("text").attr("text-anchor","start").attr("class",function(x,e){return"newFont_bold12 svgBodyFontColor transval";}).text(function(e){return e.Transaction_Val+e.Transaction_Val_Unit;
}).attr("transform",function(x,e){return"translate(16,40)";}).on("click",function(e){return openLink(e.Transaction_link,toolBarHide);});var l=d3.line();var A=d3.select("#curve");function Q(R,e){var x=e?0:1;return"M0 217 A75 75 0 1 "+x+" 0,0";}var h=d3.linkRadial().angle(function(e){return e.x;}).radius(function(e){return e.y;
});b.filter(function(x,e){return(x.first||x.last);}).each(function(S,x){var e=d3.select(this).append("path").attr("fill","none").attr("id",function(){return"curve"+S.index;}).attr("class","svgLineColor line").attr("stroke-width","4px").attr("refX","2").attr("refY","6").attr("pathLength",250).attr("d",function(U,T){return Q([U],U.last);
}).attr("transform",function(U,T){if(U.last==true){if(U.collast==true){return"translate("+(boxwidth-35)+","+125+")";}else{return"translate("+(boxwidth-35)+","+125+")";}}else{return"translate("+(67)+","+125+")";}});if(S.index!=F.length){if(S.direction=="right"){d3.select(this).append("path").attr("d","M13,0,6.5,6.5,0,0Z").attr("class","svgBreakColor").attr("transform","translate(236.8, 220)");
var R=d3.select(this).append("path").attr("d","M13,0,6.5,6.5,0,0Z").attr("class","svgArrowColor curvearrow").attr("transform","translate(236, 219) rotate(-2)");}else{d3.select(this).append("path").attr("d","M13,0,6.5,6.5,0,0Z").attr("class","svgBreakColor").attr("transform","translate(-48, 223)");var R=d3.select(this).append("path").attr("d","M13,0,6.5,6.5,0,0Z").attr("class","svgArrowColor curvearrow").attr("transform","translate(-47, 220) rotate(3)");
}}});var B=d3.line();b.each(function(S,R){var x=d3.select(this).append("path").attr("class","svgLineColor").style("stroke-width","4").style("opacity",1).attr("d",function(T){if(T.direction=="right"){x1=(boxwidth/2)-82;p=T.y+boxwidth-80;y1=boxheight-25;y2=boxheight-25;if(T.collast){x1=(boxwidth/2)-45;
p=T.y+boxwidth-90;}}else{x1=(boxwidth/2)-45;p=T.y+boxwidth-131;y1=boxheight-25;y2=boxheight-25;if(T.collast){x1=(boxwidth/2)-45;p=T.y+boxwidth-190;}}return B([[x1,y1],[p,y2]]);});if(S.direction=="right"){if(S.collast==true&&S.last==true){if(S.index==F.length){x.attr("d","M3,125L165,125");x.attr("marker-end","url(#circle)");
d3.select("#curve"+S.index).style("display","none");}else{x.attr("d","M3,125L145,125");x.attr("marker-start","");}}else{if(S.last==true){if(S.index==F.length){if(F.length==1){x.attr("d","M-15,125L165,125");}else{x.attr("d","M3,125L165,125");}x.attr("marker-end","url(#circle)");d3.select("#curve"+S.index).style("display","none");
}else{x.attr("d","M42,125L175,125");x.attr("transform","translate(-40, 0)");x.attr("marker-start","");}}else{if(S.index==F.length){x.attr("d","M3,125L125,125");if(S.jfirst==true){x.attr("transform","translate(50, 0)");}else{x.attr("transform","translate(0, 0)");}x.attr("marker-end","url(#circle)");}else{x.attr("marker-end","url(#arrow)");
if(d.length>2){if(S.index==1){x.attr("d","M-15,125L165,125");}else{if(S.jfirst==true){x.attr("d","M55,125L175,125");}}}else{if(S.index==1){x.attr("d","M-16,125L165,125");}}}}}}else{if(S.collast==true&&S.last==true){if(S.index==F.length){x.attr("d","M3,125L165,125");x.attr("marker-end","url(#circle)");
}else{x.attr("d","M40,125L145,125");x.attr("marker-end","");}}else{if(S.last==true){if(S.index==F.length){x.attr("d","M3,125L165,125");x.attr("marker-end","url(#circle)");}else{x.attr("d","M45,125L145,125");x.attr("marker-end","");}}else{if(S.first==true){if(S.index==F.length){x.attr("d","M-20,125L146,125");
x.attr("marker-start","url(#circle)");d3.select("#curve"+S.index).style("display","none");}else{x.attr("d","M56,125L145,125");x.attr("marker-start","");}}else{if(S.index==F.length){x.attr("d","M-20,125L146,125");x.attr("marker-start","url(#circle)");}else{x.attr("d","M-21,125L145,125");x.attr("marker-start","url(#arrowleft)");
}}}}}var e=getScreenshotID(S.Info_Name,S.msmt_time,S.Transaction_State);d3.select(this).append("svg:image").attr("width",27).attr("height",27).attr("transform",function(W,U){var V=d3.select(this.parentNode).select("circle").node().getBBox();var T=(45+18);var X=V.height+25;return"translate("+T+","+X+")";
}).attr("class",function(){return"mouse stateIcon 3";}).attr("xlink:href",function(T){return"/final/monitor/eg_scripts/sessionSimulation/svg/state_"+T.Transaction_State+".svg";}).on("click",function(T){return openLink(T.Transaction_link,toolBarHide);});d3.select(this).append("svg:image").attr("width",30).attr("height",30).attr("class","mouse transactionImages").attr("transform",function(V,U){var T=(45+15);
var W=(45+18);return"translate("+T+","+W+")";}).attr("xlink:href",function(T){return"/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/"+T.Transaction_Image+".svg";}).on("click",function(T){return popupWindow(T.Info_Name);});});}else{if(f){var v="",a=$(window).width()-240;height=document.body.clientHeight;
boxwidth=170;boxheight=150;chartarea=Math.round(a-(boxwidth*2)),diff=Math.round(chartarea/boxwidth);var g=_.chunk(F,diff);var d=_.forEach(g,function(e,x){if((x%2)==1){_.reverse(e);}});var r=[];var G=d3.select("#"+s.body.id).append("svg").attr("id","svgviewbox").attr("preserveAspectRatio","xMinYMin").data(d).attr("width",$("#"+s.body.id).width()).attr("height",function(x,e){x.x=boxwidth;
x.y=(e*(boxheight+67));x.width=boxwidth*x.length;x.height=boxheight;if(d.length==1){return(x.height*d.length)+330;}else{if(F.length>10){return(x.height*d.length)+330;}else{return(x.height*d.length)+250;}}});var L=G.append("g").attr("id",(D.length<=diff)?"horizontalView":"verticalView");var N="";if(strSkin=="Light"){N="#f2f2f2";
}else{N="#575757";}var k="",K=90,I=10;L.each(function(ai,af){try{if(D.length<=diff){var Y=[],ac=0,ad=120;P.forEach(function(ao,an){var am=ao.DispName.toUpperCase(),al=new Ext.util.TextMetrics(),ap=d3.max([al.getWidth(am),ad]);Y.push(ap+I);});k=_.sum(Y);var ag=L.append("rect").attr("width",k).attr("height",K).attr("rx",10).attr("ry",10).attr("class","svgDefaultTransactions svgDefaultTransactionsOuter 3").attr("stroke-width",2).attr("transform","translate(0,0)");
var V=ag.node().getBBox();var T=L.selectAll("g").data(P).enter().append("g").attr("transform",function(an,al){if(al==0){return"translate(0,0)";}else{var am=Y[al-1];ac=ac+am;return"translate("+ac+",0)";}}).attr("class","dataview");var R=T.append("rect").attr("width",function(am,al){return Y[al]-1;}).attr("height",90).attr("rx",10).attr("ry",10).attr("class","empty").attr("fill","transparent").attr("x",function(am,al){return 0;
}).attr("y",function(am,al){return 0;});T.append("line").attr("x1",0).attr("y1",10).attr("x2",0).attr("class","svgDivider").attr("stroke-width",function(am,al){return"1";}).attr("y2",(K-10)).attr("x",0).attr("transform",function(am,al){return"translate("+Y[al]+",0)";});T.append("text").attr("x",function(am,al){return Y[al]/2;
}).attr("y",function(am,al){return V.y+30;}).attr("text-anchor","middle").attr("class","newFont_bold13 svgBodyFontColor lbl").attr("data-qtip",function(al){return al.DispName;}).text(function(al){return al.DispName;}).attr("text-anchor","middle");var x=ag.node().getBBox().width;var e=T.append("text").attr("data-qtip",function(al){return al.Val;
}).attr("transform",function(am,al){return"translate(0,10)";}).attr("y",function(am,al){if(am.DispName=="Response time"||am.DispName=="Transaction processing time"){return(K/2)+10;}else{return(K/2)+6;}}).attr("x",function(am,al){if(am.DispName=="Response time"||am.DispName=="Transaction processing time"){return Y[al]/2-16;
}else{return Y[al]/2;}}).attr("text-anchor","middle").attr("class",function(an,al){var am=an.DispName.toLowerCase();if(am=="location"){return"newFont_normal12 svgBodyFontColor lbllocation";}else{if(am=="simulated by"||am=="simulation engine status"){return"newFont_normal12 svgBodyFontColor lbl";}else{if(am=="availability"||am=="transaction availability"){return"mouse newFont_normal20 svgTextState_"+an.State;
}else{if(am=="response time"||am=="transaction processing time"){return"dynWidth mouse newFont_normal20 svgTextState_"+an.State;}}}}}).text(function(an,al){var am=an.DispName.toLowerCase();if(am=="location"||am=="simulated by"||am=="simulation engine status"){var ao="";if(english.test(an.Val)){ao=Ext.String.ellipsis(an.Val,20,true);
}else{ao=Ext.String.ellipsis(an.Val,9,true);}return ao;}else{if(am=="response time"||am=="transaction processing time"){if(an.Val!="-"){return an.Val+"s";}else{return an.Val;}}}}).attr("text-anchor","middle").on("click",function(am,al){if(am.defaultTrans_link!=undefined&&am.defaultTrans_link!=null){return openLink(am.defaultTrans_link,toolBarHide);
}});T.append("svg:image").attr("width",function(an,al){var am=an.DispName.toLowerCase();if(am=="location"){return 16;}else{if(am=="availability"||am=="transaction availability"){return 24;}else{return null;}}}).attr("height",function(an,al){var am=an.DispName.toLowerCase();if(am=="location"){return 16;
}else{if(am=="availability"||am=="transaction availability"){return 22;}else{return null;}}}).attr("xlink:href",function(an,al){var am=an.DispName.toLowerCase();if(am=="location"){return"/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/iconLocation.svg";}else{if(am=="availability"||am=="transaction availability"){return"/final/monitor/eg_scripts/sessionSimulation/svg/availability_"+an.State+".svg";
}else{return null;}}}).attr("class",function(an,al){var am=an.DispName.toLowerCase();if(am=="availability"||am=="transaction availability"){return"mouse stateicon 4";}else{return null;}}).attr("x",function(ao,am){if(ao.DispName=="Location"){var an=d3.select(d3.select(this).node().parentNode).select(".lbllocation").node().getBBox();
return(an.x-16);}else{if(!Ext.isEmpty(ao.State)&&ao.State!=null&&ao.State!=undefined){var al=getScreenshotID(ao.Info_Name,ao.msmt_time,ao.State);if(al!=undefined&&al!=null&&al.trim().length>0&&al!="-"){return(Y[am]/2)-22;}else{return(Y[am]/2)-22;}}}}).attr("y",function(an,al){if(al==0){if(an.DispName=="Location"){var am=d3.select(d3.select(this).node().parentNode).select(".lbllocation").node().getBBox();
return(am.y+7);}}else{if(an.DispName=="Response time"||an.DispName=="Simulated by"||an.DispName=="Transaction processing time"){return null;}else{return(K/2)+3;}}}).on("click",function(am){var al=getScreenshotID(am.Info_Name,am.msmt_time,am.State);if(!Ext.isEmpty(am.State)&&am.State!=null&&am.State!=undefined){if(am.defaultTrans_link!=undefined&&am.defaultTrans_link!=null){return openLink(am.defaultTrans_link,toolBarHide);
}else{if(al!=undefined&&al!=null&&al.trim().length>0&&al!="-"){return openScreenShot(am,al);}else{return openWindowGraph();}}}});T.append("svg:image").attr("width",function(an,al){var am=an.DispName.toLowerCase();if(am=="availability"||am=="response time"||am=="transaction availability"||am=="transaction processing time"){return 16;
}else{return null;}}).attr("height",function(an,al){var am=an.DispName.toLowerCase();if(am=="availability"||am=="response time"||am=="transaction availability"||am=="transaction processing time"){return 16;}else{return null;}}).attr("xlink:href",function(ao,am){var an=ao.DispName.toLowerCase();if(an=="availability"||an=="response time"||an=="transaction availability"||an=="transaction processing time"){if(!Ext.isEmpty(ao.State)&&ao.State!=null&&ao.State!=undefined){var al=getScreenshotID(ao.Info_Name,ao.msmt_time,ao.State);
if(al!=undefined&&al!=null&&al.trim().length>0&&al!="-"){return"/final/monitor/eg_scripts/sessionSimulation/svg/iconSnapshot.svg";}else{if(ao.State=="GOOD"){return"/final/monitor/eg_scripts/sessionSimulation/svg/iconGraph.svg";}}}}else{return null;}}).attr("class",function(ao,am){var an=ao.DispName.toLowerCase();
if(an=="availability"||an=="response time"||an=="transaction availability"||an=="transaction processing time"){if(!Ext.isEmpty(ao.State)&&ao.State!=null&&ao.State!=undefined){var al=getScreenshotID(ao.Info_Name,ao.msmt_time,ao.State);if(al!=undefined&&al!=null&&al.trim().length>0&&al!="-"){return"mouse icon";
}else{if(ao.State=="GOOD"){return"mouse icon";}}}}}).attr("x",function(an,al){if(an.DispName=="Response time"||an.DispName=="Transaction processing time"){var am=d3.select(d3.select(this).node().parentNode).select(".dynWidth").node().getBBox();return(am.x+am.width+16);}else{return(Y[al]/2)+14;}}).attr("y",function(am,al){return(K/2)+5;
}).on("click",function(an,am){var al=getScreenshotID(an.Info_Name,an.msmt_time,an.State);if(!Ext.isEmpty(an.State)&&an.State!=null&&an.State!=undefined){if(al!=undefined&&al!=null&&al.trim().length>0&&al!="-"){return openScreenShot(an,al);}else{if(an.State=="GOOD"){return openWindowGraph();}}}});}else{var ag=L.append("rect").attr("rx",10).attr("ry",10).attr("class","svgDefaultTransactions svgDefaultTransactionsOuter").attr("stroke-width",2).attr("transform","translate(2,0)");
var ab=0;var Y=119;var ae=80;var ah=20;var Z=20;var T=L.selectAll("g").data(P).enter().append("g").attr("transform",function(am,al){return"translate("+Y/2+","+ae*al+")";});T.append("rect").attr("width",Y).attr("height",ae).attr("fill","transparent").attr("transform",function(am,al){if(al==0){ae=1;}return"translate("+(-Y/2+12)+","+ae*al+")";
});T.append("rect").attr("width",Y-20).attr("height",ae).attr("class","vseparator").attr("transform",function(am,al){if(al==0){ae=1;}return"translate("+((-Y/2)+12)+","+ae*al+")";});var U=T.append("text").attr("transform",function(ao,an){var am=ao.DispName.toUpperCase(),al=new Ext.util.TextMetrics();if(Y>al.getWidth(am)){ao.yPosition=(ah+10);
return"translate(0,"+(ah+10)+")";}else{ao.yPosition=ah;return"translate(0,"+(ah)+")";}}).attr("x",0).attr("y",0).attr("width",123).attr("text-anchor","middle").attr("class","newFont_bold13 svgBodyFontColor displayNameLabel").attr("data-qtip",function(al){return al.DispName;}).text(function(al){return al.DispName;
}).call(wrap,100);var X=3;T.append("text").attr("data-qtip",function(al){return al.Val;}).attr("transform",function(an,al){var am=d3.select(d3.select(this).node().parentNode).select(".displayNameLabel").node().getBBox();if(an.State){return"translate(-12,"+(ah+am.height+Z)+")";}else{if(an.DispName=="Location"){return"translate("+X+","+(ah+am.height+20)+")";
}else{return"translate(0,"+(ah+am.height+20)+")";}}}).attr("x",0).attr("y",0).attr("text-anchor","middle").attr("class",function(an,al){var am=an.DispName.toLowerCase();if(am=="location"){return"newFont_normal12 svgBodyFontColor lbllocation";}else{if(am=="simulated by"||am=="simulation engine status"){return"newFont_normal12 stateText svgBodyFontColor";
}else{if(am=="availability"||am=="transaction availability"){return"mouse newFont_normal20 stateText svgTextState_"+an.State;}else{if(am=="response time"||am=="transaction processing time"){return"dynWidth mouse stateText 2 newFont_normal20 svgTextState_"+an.State;}}}}}).text(function(an,al){var am=an.DispName.toLowerCase();
if(am=="location"||am=="simulated by"||am=="simulation engine status"){var ao="";if(english.test(an.Val)){ao=Ext.String.ellipsis(an.Val,20,true);}else{ao=Ext.String.ellipsis(an.Val,9,true);}return ao;}else{if(am=="response time"||am=="transaction processing time"){if(an.Val!="-"){return an.Val+"s";}else{return an.Val;
}}}}).on("click",function(am,al){if(al==1||al==2||al==3){return openLink(am.defaultTrans_link,toolBarHide);}else{return"";}});T.filter(function(am,al){return(am.State&&am.DispName!="Transaction processing time");}).append("svg:image").attr("width",function(am,al){return 20;}).attr("height",function(am,al){return 20;
}).attr("xlink:href",function(am,al){if(am.DispName=="Location"){return"/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/iconLocation.svg";}else{if(am.DispName=="Response time"||am.DispName=="Simulated by"||am.DispName=="Transaction processing time"||am.DispName=="Simulation engine status"){return"";
}else{return"/final/monitor/eg_scripts/sessionSimulation/svg/availability_"+am.State+".svg";}}}).attr("x",function(am){var al=d3.select(d3.select(this).node().parentNode).select(".displayNameLabel").node().getBBox();return(al.x+10);}).attr("y",function(am){var al=d3.select(d3.select(this).node().parentNode).select(".displayNameLabel").node().getBBox();
if(am.State){return(ah+al.height);}}).attr("class","mouse stateIcon 5").on("click",function(am){var al=getScreenshotID(am.Info_Name,am.msmt_time,am.State);if(!Ext.isEmpty(am.State)&&am.State!=null&&am.State!=undefined){if(am.defaultTrans_link!=undefined&&am.defaultTrans_link!=null){return openLink(am.defaultTrans_link,toolBarHide);
}else{if(am.State==="HIGH"){return openScreenShot(am,al);}else{return openWindowGraph();}}}});T.append("svg:image").attr("width",function(am,al){if(am.DispName=="Simulated by"||am.DispName=="Location"){return 16;}else{return 18;}}).attr("height",function(am,al){if(am.DispName=="Simulated by"||am.DispName=="Location"){return 16;
}else{return 16;}}).attr("xlink:href",function(ao,am){var an=ao.DispName.toLowerCase();if(am==0){if(ao.DispName=="Location"){return"/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/iconLocation.svg";}}else{if(an=="availability"||an=="response time"||an=="transaction availability"||an=="transaction processing time"){if(!Ext.isEmpty(ao.State)&&ao.State!=null&&ao.State!=undefined){var al=getScreenshotID(ao.Info_Name,ao.msmt_time,ao.State);
if(al!=undefined&&al!=null&&al.trim().length>0&&al!="-"){return"/final/monitor/eg_scripts/sessionSimulation/svg/iconSnapshot.svg";}else{if(ao.State=="GOOD"){return"/final/monitor/eg_scripts/sessionSimulation/svg/iconGraph.svg";}}}}}}).attr("class","mouse").attr("x",function(ap,am){if(ap.DispName=="Location"){var ao=d3.select(d3.select(this).node().parentNode).select(".lbllocation").node().getBBox();
return((ao.x+X)-18);}else{if(!Ext.isEmpty(ap.State)&&ap.State!=null&&ap.State!=undefined){var an=d3.select(d3.select(this).node().parentNode).select(".stateText").node().getBBox();var al=getScreenshotID(ap.Info_Name,ap.msmt_time,ap.State);if(al!=undefined&&al!=null&&al.trim().length>0&&al!="-"){return an.width+8;
}else{if(ap.DispName=="Transaction processing time"){return(an.x+an.width);}else{return(an.x+an.width)+8;}}}}}).attr("y",function(aq,an){if(an==0){if(aq.DispName=="Location"){var ap=d3.select(d3.select(this).node().parentNode).select(".lbllocation").node().getBBox();return(ah+ap.height+6);}}else{if(!Ext.isEmpty(aq.State)&&aq.State!=null&&aq.State!=undefined){var al=getScreenshotID(aq.Info_Name,aq.msmt_time,aq.State);
if(al!=undefined&&al!=null&&al.trim().length>0&&al!="-"){var am=d3.select(d3.select(this).node().parentNode).select(".stateIcon").node().getBBox();return am.y+2;}else{if(aq.State=="GOOD"){var ao=d3.select(d3.select(this).node().parentNode).select(".displayNameLabel").node().getBBox();return(ah+ao.height+Z)-16;
}}}}}).on("click",function(am){var al=getScreenshotID(am.Info_Name,am.msmt_time,am.State);if(!Ext.isEmpty(am.State)&&am.State!=null&&am.State!=undefined){if(am.State==="HIGH"){return openScreenShot(am,al);}else{return openWindowGraph();}}});var aj=d3.select("#verticalView").node().getBBox();ag.attr("height",(aj.height+6)).attr("width",119);
}}catch(ak){}var W=$("#main-body").width()/2-10;var S=$("#svgviewbox").height();var aa=(K/2)+(($("#svgviewbox").height()/2)-90);d3.select(this).attr("transform",function(){if(D.length<=diff){if(screen.width<=1366){return"translate("+(a/2-k/2)+","+aa+")";}else{return"translate("+(((a/2)-(k/2))+30)+","+aa+")";
}}else{return"translate(0,160)";}});});}else{s.add([{xtype:"container",layout:"fit",html:'<table width="100%" height="100%" align="center"><tr><td style="text-align:center"><img src="/final/images/clear.png" class="iconInformation"/></br><span class="newFont_bold11">No Simulation Data!</span></td></tr></table>'}]);
}}$(".x-textmetrics").remove();$("#"+s.body.id).append('<div style="position:fixed;font-size:11px;font-weight:500;bottom:20px;left:'+($("#"+s.body.id).width()-55)+'px">*All measures are in seconds</div>');if(fromKioskMode!=null&&fromKioskMode=="yes"){sessionSimulation.app.getController("Main").autoScrollSimulation();
}}catch(M){}}var itemsArry=[{"html":"<img src='/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/iconAccessDesktop.svg'/>","id":"iconAccessDesktop",},{"html":"<img src='/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/iconBrowseOpenItems.svg'/>","id":"iconBrowseOpenItems"},{"html":"<img src='/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/iconLogout.svg'/>","id":"iconLogout"},{"html":"<img src='/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/iconOpenFolder.svg'/>","id":"iconOpenFolder"},{"html":"<img src='/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/iconDownloadCatalog.svg'/>","id":"iconDownloadCatalog"},{"html":"<img src='/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/iconRegistration.svg'/>","id":"iconRegistration"},{"html":"<img src='/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/iconSubmitContacts.svg'/>","id":"iconSubmitContacts"},{"html":"<img src='/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/iconUserLogin.svg'/>","id":"iconUserLogin"},{"html":"<img src='/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/iconTradeAccess.svg'/>","id":"iconTradeAccess"},{"html":"<img src='/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/iconPerformTrade.svg'/>","id":"iconPerformTrade"},{"html":"<img src='/final/monitor/eg_scripts/sessionSimulation/svg/"+strSkin+"/iconTransaction.svg'/>","id":"iconTransaction"}];
function popupWindow(a){Ext.create("Ext.window.Window",{id:"imgSelect",title:"Image Selection",height:300,width:600,cls:"logonWindowShadow",shadow:"sides",shadowOffset:50,padding:"0 10",layout:{type:"vbox",align:"stretch"},resizable:false,buttonAlign:"center",floatable:true,ghost:false,header:{padding:"5 10 3 10",margin:0},bodyPadding:10,items:[{xtype:"container",flex:1,cls:"transNameContianer",layout:{type:"table",columns:10,tdAttrs:{style:{"text-align":"center"},},tableAttrs:{style:{width:"100%"}}},defaults:{xtype:"container",height:"100%",width:"100%",padding:10,listeners:{"render":function(b){b.getEl().on("click",function(){$(".transNameContianer tr td").removeClass("selected");
b.getEl().up("td").radioCls("selected");selectedIcon=b.id;});}}},id:"imageSelect",items:itemsArry}],dockedItems:[{xtype:"toolbar",dock:"bottom",padding:"5 0 5 0",items:["->",{xtype:"button",text:"Submit",cls:"button20",listeners:{"click":function(b){var c=this;setImageName(a,selectedIcon);}}},"->"]}],}).show();
}