har 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/lib/har/version.rb +1 -1
  3. data/lib/har/viewer/ReleaseNotes.txt +177 -0
  4. data/lib/har/viewer/build.txt +232 -0
  5. data/lib/har/viewer/css/SyntaxHighlighter.css +1 -1
  6. data/lib/har/viewer/css/aboutTab.css +1 -1
  7. data/lib/har/viewer/css/domTab.css +1 -1
  8. data/lib/har/viewer/css/domTree.css +1 -1
  9. data/lib/har/viewer/css/dragdrop.css +1 -1
  10. data/lib/har/viewer/css/harPreview.css +1 -1
  11. data/lib/har/viewer/css/harStats.css +1 -0
  12. data/lib/har/viewer/css/harView.css +1 -1
  13. data/lib/har/viewer/css/harViewer.css +1 -1
  14. data/lib/har/viewer/css/homeTab.css +1 -1
  15. data/lib/har/viewer/css/infoTip.css +1 -1
  16. data/lib/har/viewer/css/pageList.css +1 -1
  17. data/lib/har/viewer/css/pageTimeline.css +1 -1
  18. data/lib/har/viewer/css/popupMenu.css +1 -1
  19. data/lib/har/viewer/css/previewMenu.css +1 -1
  20. data/lib/har/viewer/css/previewTab.css +1 -1
  21. data/lib/har/viewer/css/requestBody.css +1 -1
  22. data/lib/har/viewer/css/requestList.css +1 -1
  23. data/lib/har/viewer/css/schemaTab.css +1 -1
  24. data/lib/har/viewer/css/search.css +1 -1
  25. data/lib/har/viewer/css/tabView.css +1 -1
  26. data/lib/har/viewer/css/tableView.css +1 -1
  27. data/lib/har/viewer/css/toolTip.css +1 -1
  28. data/lib/har/viewer/css/toolbar.css +1 -1
  29. data/lib/har/viewer/css/validationError.css +1 -1
  30. data/lib/har/viewer/css/xhrSpy.css +1 -1
  31. data/lib/har/viewer/har.js +3 -1
  32. data/lib/har/viewer/index.html +5 -6
  33. data/lib/har/viewer/scripts/app.build.js +1 -1
  34. data/lib/har/viewer/scripts/core/cookies.js +3 -1
  35. data/lib/har/viewer/scripts/core/dragdrop.js +3 -1
  36. data/lib/har/viewer/scripts/core/lib.js +3 -1
  37. data/lib/har/viewer/scripts/core/trace.js +26 -26
  38. data/lib/har/viewer/scripts/domplate/domTree.js +3 -1
  39. data/lib/har/viewer/scripts/domplate/domplate.js +5 -7
  40. data/lib/har/viewer/scripts/domplate/infoTip.js +3 -1
  41. data/lib/har/viewer/scripts/domplate/popupMenu.js +3 -1
  42. data/lib/har/viewer/scripts/domplate/tabView.js +3 -1
  43. data/lib/har/viewer/scripts/domplate/tableView.js +3 -1
  44. data/lib/har/viewer/scripts/domplate/toolTip.js +3 -1
  45. data/lib/har/viewer/scripts/domplate/toolbar.js +3 -1
  46. data/lib/har/viewer/scripts/downloadify/js/downloadify.min.js +5 -1
  47. data/lib/har/viewer/scripts/downloadify/js/swfobject.js +6 -1
  48. data/lib/har/viewer/scripts/downloadify/src/downloadify.js +28 -1
  49. data/lib/har/viewer/scripts/excanvas/excanvas.js +15 -1
  50. data/lib/har/viewer/scripts/harPreview.js +43 -1
  51. data/lib/har/viewer/scripts/harViewer.js +86 -1
  52. data/lib/har/viewer/scripts/i18n.js +7 -1
  53. data/lib/har/viewer/scripts/jquery.js +26 -1
  54. data/lib/har/viewer/scripts/json-query/JSONQuery.js +6 -1
  55. data/lib/har/viewer/scripts/nls/domTab.js +3 -1
  56. data/lib/har/viewer/scripts/nls/harModel.js +3 -1
  57. data/lib/har/viewer/scripts/nls/{pageStats.js → harStats.js} +3 -1
  58. data/lib/har/viewer/scripts/nls/harViewer.js +3 -1
  59. data/lib/har/viewer/scripts/nls/homeTab.js +3 -1
  60. data/lib/har/viewer/scripts/nls/pageList.js +3 -1
  61. data/lib/har/viewer/scripts/nls/pageTimeline.js +3 -1
  62. data/lib/har/viewer/scripts/nls/previewTab.js +3 -1
  63. data/lib/har/viewer/scripts/nls/requestBody.js +3 -1
  64. data/lib/har/viewer/scripts/nls/requestList.js +3 -1
  65. data/lib/har/viewer/scripts/nls/search.js +3 -1
  66. data/lib/har/viewer/scripts/nls/tableView.js +3 -1
  67. data/lib/har/viewer/scripts/preview/harModel.js +3 -1
  68. data/lib/har/viewer/scripts/preview/harSchema.js +1 -1
  69. data/lib/har/viewer/scripts/preview/jsonSchema.js +17 -1
  70. data/lib/har/viewer/scripts/preview/menu.js +3 -1
  71. data/lib/har/viewer/scripts/preview/pageList.js +3 -1
  72. data/lib/har/viewer/scripts/preview/ref.js +1 -1
  73. data/lib/har/viewer/scripts/preview/requestBody.js +3 -1
  74. data/lib/har/viewer/scripts/preview/requestList.js +3 -1
  75. data/lib/har/viewer/scripts/preview/validationError.js +3 -1
  76. data/lib/har/viewer/scripts/require.js +7 -1
  77. data/lib/har/viewer/scripts/syntax-highlighter/shCore.js +19 -1
  78. data/lib/har/viewer/scripts/tabs/aboutTab.js +3 -1
  79. data/lib/har/viewer/scripts/tabs/domTab.js +3 -1
  80. data/lib/har/viewer/scripts/tabs/harStats.js +3 -0
  81. data/lib/har/viewer/scripts/tabs/homeTab.js +3 -1
  82. data/lib/har/viewer/scripts/tabs/pageTimeline.js +3 -1
  83. data/lib/har/viewer/scripts/tabs/previewTab.js +3 -1
  84. data/lib/har/viewer/scripts/tabs/schemaTab.js +3 -1
  85. data/lib/har/viewer/scripts/tabs/search.js +3 -1
  86. data/lib/har/viewer/scripts/text.js +7 -1
  87. metadata +27 -28
  88. data/lib/har/viewer/css/pageStats.css +0 -1
  89. data/lib/har/viewer/examples/www.coupons.com-analytics-log.har +0 -18253
  90. data/lib/har/viewer/scripts/jquery-plugins/jquery.json.js +0 -1
  91. data/lib/har/viewer/scripts/tabs/pageStats.js +0 -1
@@ -1 +0,0 @@
1
- (function($){if(!JSON)var JSON={};(function(){function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i==="object"&&typeof i.toJSON==="function"&&(i=i.toJSON(a)),typeof rep==="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g;return e}if(rep&&typeof rep==="object"){f=rep.length;for(c=0;c<f;c+=1)d=rep[c],typeof d==="string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Object.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g;return e}}function quote(a){escapable.lastIndex=0;return escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b==="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function f(a){return a<10?"0"+a:a}typeof Date.prototype.toJSON!=="function"&&(Date.prototype.toJSON=function(a){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!=="function"&&(JSON.stringify=function(a,b,c){var d;gap="",indent="";if(typeof c==="number")for(d=0;d<c;d+=1)indent+=" ";else typeof c==="string"&&(indent=c);rep=b;if(b&&typeof b!=="function"&&(typeof b!=="object"||typeof b.length!=="number"))throw new Error("JSON.stringify");return str("",{"":a})}),typeof JSON.parse!=="function"&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e==="object")for(c in e)Object.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")})})(),$.toJSON=function(a,b){typeof b=="undefined"&&(b=null);return JSON.parse(a,b)},$.jSONToString=function(a,b,c){typeof b=="undefined"&&(b=null),typeof c=="undefined"&&(c=null);return JSON.stringify(a,b,c)}})(jQuery)
@@ -1 +0,0 @@
1
- require.def("tabs/pageStats",["domplate/domplate","core/lib","i18n!nls/pageStats","preview/harSchema","preview/harModel","core/cookies","domplate/infoTip","core/trace"],function(Domplate,Lib,Strings,HarSchema,HarModel,Cookies,InfoTip,Trace){with(Domplate){function Pie(){}Pie.prototype={data:[],title:"",getLabelTooltipText:function(a){return a.label+": "+Lib.formatSize(a.value)},cleanUp:function(){for(var a=0;a<this.data.length;a++)this.data[a].value=0,this.data[a].count=0}};function TimingPie(){}TimingPie.prototype=Lib.extend(Pie.prototype,{title:"Summary of request times.",data:[{value:0,label:Strings.pieLabelBlocked,color:"rgb(228, 214, 193)"},{value:0,label:Strings.pieLabelDNS,color:"rgb(119, 192, 203)"},{value:0,label:Strings.pieLabelSSL,color:"rgb(168, 196, 173)"},{value:0,label:Strings.pieLabelConnect,color:"rgb(179, 222, 93)"},{value:0,label:Strings.pieLabelSend,color:"rgb(224, 171, 157)"},{value:0,label:Strings.pieLabelWait,color:"rgb(163, 150, 190)"},{value:0,label:Strings.pieLabelReceive,color:"rgb(194, 194, 194)"}],getLabelTooltipText:function(a){return a.label+": "+Lib.formatTime(a.value)}});function ContentPie(){}ContentPie.prototype=Lib.extend(Pie.prototype,{title:"Summary of content types.",data:[{value:0,label:Strings.pieLabelHTMLText,color:"rgb(174, 234, 218)"},{value:0,label:Strings.pieLabelJavaScript,color:"rgb(245, 230, 186)"},{value:0,label:Strings.pieLabelCSS,color:"rgb(212, 204, 219)"},{value:0,label:Strings.pieLabelImage,color:"rgb(220, 171, 181)"},{value:0,label:Strings.pieLabelFlash,color:"rgb(166, 156, 222)"},{value:0,label:Strings.pieLabelOthers,color:"rgb(229, 171, 255)"}],getLabelTooltipText:function(a){return a.count+"x "+a.label+": "+Lib.formatSize(a.value)}});function TrafficPie(){}TrafficPie.prototype=Lib.extend(Pie.prototype,{title:"Summary of sent and received bodies & headers.",data:[{value:0,label:Strings.pieLabelHeadersSent,color:"rgb(247, 179, 227)"},{value:0,label:Strings.pieLabelBodiesSent,color:"rgb(226, 160, 241)"},{value:0,label:Strings.pieLabelHeadersReceived,color:"rgb(166, 232, 166)"},{value:0,label:Strings.pieLabelBodiesReceived,color:"rgb(168, 196, 173)"}]});function CachePie(){}CachePie.prototype=Lib.extend(Pie.prototype,{title:"Comparison of downloaded data from the server and browser cache.",data:[{value:0,label:Strings.pieLabelDownloaded,color:"rgb(182, 182, 182)"},{value:0,label:Strings.pieLabelPartial,color:"rgb(218, 218, 218)"},{value:0,label:Strings.pieLabelFromCache,color:"rgb(239, 239, 239)"}],getLabelTooltipText:function(a){return a.count+"x "+a.label+": "+Lib.formatSize(a.value)}});var timingPie=new TimingPie,contentPie=new ContentPie,trafficPie=new TrafficPie,cachePie=new CachePie,jsTypes={"text/javascript":1,"text/jscript":1,"application/javascript":1,"application/x-javascript":1,"text/js":1},htmlTypes={"text/plain":1,"text/html":1},cssTypes={"text/css":1},imageTypes={"image/png":1,"image/jpeg":1,"image/gif":1},flashTypes={"application/x-shockwave-flash":1},jsonTypes={"text/x-json":1,"text/x-js":1,"application/json":1,"application/x-js":1},xmlTypes={"application/xml":1,"application/xhtml+xml":1,"application/vnd.mozilla.xul+xml":1,"text/xml":1,"text/xul":1,"application/rdf+xml":1},unknownTypes={"text/xsl":1,"text/sgml":1,"text/rtf":1,"text/x-setext":1,"text/richtext":1,"text/tab-separated-values":1,"text/rdf":1,"text/xif":1,"text/ecmascript":1,"text/vnd.curl":1,"text/vbscript":1,"view-source":1,"view-fragment":1,"application/x-httpd-php":1,"application/ecmascript":1,"application/http-index-format":1};function Stats(a,b){this.model=a,this.timeline=b,this.timeline.addListener(this)}Stats.prototype=domplate({element:null,tag:DIV({"class":"pageStatsBody",style:"height: auto; display: none"}),update:function(a){if(this.isVisible()){this.cleanUp();var b=HarSchema.timingsType.properties;a.length||a.push(null);for(var c=0;c<a.length;c++){var d=a[c],e=d?this.model.getPageEntries(d):this.model.getAllEntries();for(var f=0;f<e.length;f++){var g=e[f];if(!g.timings)continue;timingPie.data[0].value+=g.timings.blocked,timingPie.data[1].value+=g.timings.dns,timingPie.data[2].value+=g.timings.ssl>0?g.timings.ssl:0,timingPie.data[3].value+=g.timings.connect,timingPie.data[4].value+=g.timings.send,timingPie.data[5].value+=g.timings.wait,timingPie.data[6].value+=g.timings.receive,g.timings.ssl>0&&(timingPie.data[3].value-=g.timings.ssl);var h=g.response,i=h.bodySize>0?h.bodySize:0,j=h.content.mimeType,k=j?j.match(/^([^;]+)/)[1]:null,j=k?k:h.content.mimeType;htmlTypes[j]?(contentPie.data[0].value+=i,contentPie.data[0].count++):jsTypes[j]?(contentPie.data[1].value+=i,contentPie.data[1].count++):cssTypes[j]?(contentPie.data[2].value+=i,contentPie.data[2].count++):imageTypes[j]?(contentPie.data[3].value+=i,contentPie.data[3].count++):flashTypes[j]?(contentPie.data[4].value+=i,contentPie.data[4].count++):(contentPie.data[5].value+=i,contentPie.data[5].count++),trafficPie.data[0].value+=g.request.headersSize>0?g.request.headersSize:0,trafficPie.data[1].value+=g.request.bodySize>0?g.request.bodySize:0,trafficPie.data[2].value+=g.response.headersSize>0?g.response.headersSize:0,trafficPie.data[3].value+=i,g.response.status==206?(cachePie.data[1].value+=i,cachePie.data[1].count++):g.response.status==304?(cachePie.data[2].value+=i,cachePie.data[2].count++):i>0&&(cachePie.data[0].value+=i,cachePie.data[0].count++)}}Pie.draw(Lib.$(this.timingPie,"pieGraph"),timingPie),Pie.draw(Lib.$(this.contentPie,"pieGraph"),contentPie),Pie.draw(Lib.$(this.trafficPie,"pieGraph"),trafficPie),Pie.draw(Lib.$(this.cachePie,"pieGraph"),cachePie)}},cleanUp:function(){timingPie.cleanUp(),contentPie.cleanUp(),trafficPie.cleanUp(),cachePie.cleanUp()},showInfoTip:function(a,b,c,d){return Pie.showInfoTip(a,b,c,d)},onSelectionChange:function(a){this.update(a)},show:function(a){if(!this.isVisible()){InfoTip.addListener(this),Lib.setClass(this.element,"opened"),!a||$.browser.msie?this.element.style.display="block":$(this.element).slideDown();var b=this.timeline.getSelection();this.update(b)}},hide:function(a){this.isVisible()&&(InfoTip.removeListener(this),Lib.removeClass(this.element,"opened"),!a||$.browser.msie?this.element.style.display="none":$(this.element).slideUp())},isVisible:function(){return Lib.hasClass(this.element,"opened")},toggle:function(a){this.isVisible()?this.hide(a):this.show(a)},render:function(a){this.element=this.tag.replace({},a),this.timingPie=Pie.render(timingPie,this.element),this.contentPie=Pie.render(contentPie,this.element),this.trafficPie=Pie.render(trafficPie,this.element),this.cachePie=Pie.render(cachePie,this.element),this.cachePie.style.borderRight=0;return this.element}});var Pie=domplate({tag:TABLE({"class":"pagePieTable",cellpadding:0,cellspacing:0,_repObject:"$pie"},TBODY(TR(TD({"class":"pieBox",title:"$pie.title"}),TD(FOR("item","$pie.data",DIV({"class":"pieLabel",_repObject:"$item"},SPAN({"class":"box",style:"background-color: $item.color"},"&nbsp;"),SPAN({"class":"label"},"$item.label"))))))),render:function(a,b){var c=this.tag.append({pie:a},b),d=Lib.$(c,"pieBox"),e=document.createElement("canvas");e.setAttribute("class","pieGraph "),e.setAttribute("height","100"),e.setAttribute("width","100"),d.appendChild(e),typeof G_vmlCanvasManager!="undefined"&&G_vmlCanvasManager.initElement(e);return c},draw:function(a,b){if(a&&a.getContext){var c=a.getContext("2d"),d=Math.min(a.width,a.height)/2,e=[a.width/2,a.height/2];c.clearRect(0,0,a.width,a.height);var f=0,g=b.data,h=0;for(var i in g)h+=g[i].value;if(!h){c.beginPath(),c.moveTo(e[0],e[1]),c.arc(e[0],e[1],d,0,Math.PI*2,!1),c.closePath(),c.fillStyle="rgb(229,236,238)",c.lineStyle="lightgray",c.fill();return}for(var i=0;i<g.length;i++){var j=g[i].value/h;c.beginPath(),c.moveTo(e[0],e[1]),c.arc(e[0],e[1],d,Math.PI*(-.5+2*f),Math.PI*(-.5+2*(f+j)),!1),c.lineTo(e[0],e[1]),c.closePath(),c.fillStyle=g[i].color,c.fill(),f+=j}}},showInfoTip:function(a,b,c,d){var e=Lib.getAncestorByClass(b,"pagePieTable");if(!e)return!1;var f=Lib.getAncestorByClass(b,"pieLabel");if(f){PieInfoTip.render(e.repObject,f.repObject,a);return!0}}}),PieInfoTip=domplate({tag:DIV({"class":"pieLabelInfoTip"},"$text"),getText:function(a){return a.label+": "+formatTime(a.value)},render:function(a,b,c){var d=a.getLabelTooltipText(b);this.tag.replace({text:d},c)}});return Stats}})