Introduction
Introduction Statistics Contact Development Disclaimer Help
Move to highcharts - warvox - VoIP based wardialing tool, forked from rapid7/wa…
Log
Files
Refs
README
---
commit c58f920c7eee1f9f1d874ee8fb02f3204bb4dff0
parent 5432867e7d8c11ff0cfbe34966ae4f8880a35b1f
Author: HD Moore <[email protected]>
Date: Wed, 26 Dec 2012 15:34:08 -0600
Move to highcharts
Diffstat:
R web/app/assets/stylesheets/overlay… | 0
M web/app/assets/javascripts/applica… | 4 ++++
A web/app/assets/javascripts/highcha… | 246 +++++++++++++++++++++++++++…
A web/app/assets/stylesheets/applica… | 13 +++++++++++++
A web/app/assets/stylesheets/global.… | 555 +++++++++++++++++++++++++++…
D web/app/assets/stylesheets/global.… | 556 ---------------------------…
D web/app/assets/stylesheets/lightbo… | 27 ---------------------------
D web/app/assets/stylesheets/scaffol… | 54 ---------------------------…
M web/app/controllers/analyze_contro… | 17 +++++------------
M web/app/controllers/dial_results_c… | 48 ++++++++++++++-------------…
M web/app/models/dial_result.rb | 24 +++++++++++++-----------
M web/app/views/analyze/show.html.erb | 6 +++---
M web/app/views/analyze/view.html.erb | 16 +++++++++-------
M web/app/views/dial_results/analyze… | 4 +++-
M web/app/views/dial_results/view.ht… | 20 ++++++++++----------
M web/app/views/layouts/warvox.html.… | 8 ++++----
A web/app/views/shared/graphs/_call_… | 58 +++++++++++++++++++++++++++…
A web/app/views/shared/graphs/_lines… | 63 +++++++++++++++++++++++++++…
A web/app/views/shared/graphs/call_r… | 60 +++++++++++++++++++++++++++…
A web/app/views/shared/graphs/lines_… | 0
M web/db/migrate/20110801000001_add_… | 3 ++-
D web/vendor/plugins/ezgraphix/Fusio… | 49 ---------------------------…
D web/vendor/plugins/ezgraphix/READM… | 157 ---------------------------…
D web/vendor/plugins/ezgraphix/init.… | 3 ---
D web/vendor/plugins/ezgraphix/lib/e… | 199 ---------------------------…
D web/vendor/plugins/ezgraphix/lib/e… | 107 ---------------------------…
D web/vendor/plugins/ezgraphix/lib/t… | 20 --------------------
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 0
D web/vendor/plugins/ezgraphix/publi… | 362 ---------------------------…
D web/vendor/plugins/ezgraphix/spec/… | 85 ---------------------------…
51 files changed, 1069 insertions(+), 1695 deletions(-)
---
diff --git a/web/app/assets/stylesheets/overlay.png b/web/app/assets/images/ove…
Binary files differ.
diff --git a/web/app/assets/javascripts/application.js b/web/app/assets/javascr…
@@ -1,2 +1,6 @@
// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
+//= require jquery
+//= require jquery_ujs
+//= require highcharts
+// require_tree
diff --git a/web/app/assets/javascripts/highcharts.js b/web/app/assets/javascri…
@@ -0,0 +1,246 @@
+/*
+ Highcharts JS v2.3.3 (2012-10-04)
+
+ (c) 2009-2011 Torstein Hønsi
+
+ License: www.highcharts.com/license
+*/
+(function(){function r(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}func…
+b){a.splice(c,1);break}}function t(a){return a!==x&&a!==null}function z(a,b,c)…
+b&&r(a,b);e&&H(a,{padding:0,border:R,margin:0});c&&H(a,c);d&&d.appendChild(a);…
+"$1"+d)+(b?c+L(f-a).toFixed(b).slice(2):"")}function sa(a,b){return Array((b||…
+c[c.length-1],e=B[d[0]],f=d[1],g;for(g=0;g<c.length;g++)if(d=c[g],e=B[d[0]],f=…
+j));if(b>=B[oa])i[lb](b>=B[Ka]?1:j*T(i[La]()/j));b>=B[Ka]&&(i[Cb](b>=B[ta]?0:j…
+function Eb(){this.symbol=this.color=0}function Fb(a,b){var c=a.length,d,e;for…
+b){var c="Highcharts error #"+a+": www.highcharts.com/errors/"+a;if(b)throw c;…
+Db=c+"FullYear"}function va(){}function Pa(a,b,c){this.axis=a;this.pos=b;this.…
+0)};this.textAlign=b.textAlign||(g?c?"right":"left":"center")}function ob(){th…
+function qb(a,b){var c=U?"":b.chart.zoomType;this.zoomX=/x/.test(c);this.zoomY…
+!!e.click;this.callback=b;this.isResizing=0;this.options=c;this.axes=[];this.s…
+10)<4,U=!Z&&!Ca&&!!C.createElement("canvas").getContext,Ra,fa=C.documentElemen…
+k=M.lang,l=k.weekdays,b={a:l[g].substr(0,3),A:l[g],d:sa(h),e:h,b:k.shortMonths…
+oa,864E5,Va,6048E5,Ka,2592E6,ta,31556952E3);vb={init:function(a,b,c){var b=b||…
+1]),b=b.concat(d);h&&(b=b.concat(h),c=c.concat(i));return[b,c]},step:function(…
+d,k,l;b==="cur"?e=c.prototype:b==="_default"&&f&&(e=g[b],b="set");(k=e[b])&&(e…
+a[c],c,a)===!1)return c}},getScript:a.getScript,inArray:a.inArray,adapterRun:f…
+d)},fireEvent:function(b,c,d,e){var f=a.Event(c),g="detached"+c,h;!Ca&&d&&(del…
+a(b);if(c.d)b.toD=c.d,c.d=1;e.stop();e.animate(c,d)},stop:function(b){a(b).sto…
+symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading…
+canvasToolsURL:"http://code.highcharts.com/2.3.3/modules/canvas-tools.js",VMLR…
+position:{align:"right",x:-10,y:10}}},title:{text:"Chart title",align:"center"…
+verticalAlign:"bottom",y:0}),cropThreshold:300,pointRange:0,showInLegend:!0,st…
+itemHiddenStyle:{color:"#CCC"},itemCheckboxStyle:{position:"absolute",width:"1…
+hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",mon…
+style:{cursor:"pointer",color:"#909090",fontSize:"10px"}}};var W=M.plotOptions…
+b[3]:"rgba("+b.join(",")+")":a},brighten:function(a){if(Aa(a)&&a!==0){var c;fo…
+i=this.renderer,j,k=this.attrSetters,l=this.shadows,m,p,u=this;la(a)&&t(b)&&(c…
+z(f,"x",d);this.rotation&&z(g,"transform","rotate("+this.rotation+" "+d+" "+w(…
+"3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("lon…
+d;c==="strokeWidth"&&(c="stroke-width");tb&&c==="stroke-width"&&d===0&&(d=1.0E…
+j||z(g,c,d)}return u},symbolAttr:function(a){var b=this;n("x,y,r,start,end,wid…
+0)-2*i);h.height=T((e||this.height||0)-2*i);h.strokeWidth=a;for(f in h)this[f]…
+on:function(a,b){var c=b;fa&&a==="click"&&(a="touchstart",c=function(a){a.prev…
+a);H(this.element,a);return this},htmlGetBBox:function(){var a=this.element,b=…
+marginTop:d}),j&&n(j,function(a){H(a,{marginLeft:c+1,marginTop:d+1})});this.in…
+u,", M12=",-p,", M21=",p,", M22=",u,", sizingMethod='auto expand')"].join(""):…
+!0},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,c…
+this.renderer.alignedObjects.push(this)):(a=this.alignOptions,b=this.alignByTr…
+this.bBox,b=this.renderer,c,d=this.rotation,e=this.element,f=this.styles,g=d*a…
+hide:function(){return this.attr({visibility:"hidden"})},add:function(a){var b…
+a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,b=a.element||{…
+shadow:function(a,b,c){var d=[],e,f,g=this.element,h,i,j,k;if(a){i=o(a.width,3…
+arguments)};ra.prototype={Element:va,init:function(a,b,c,d){var e=location,f;f…
+b=function(){H(a,{left:0,top:0});g=a.getBoundingClientRect();H(a,{left:wa(g.le…
+a);return b},draw:function(){},buildText:function(a){for(var b=a.element,c=o(a…
+c[c.length-1]===""&&c.pop();n(c,function(c,d){var h,da=0,q,c=c.replace(/<span/…
+da?m.dx=3:m.x=g;if(!da){if(d){!Z&&a.renderer.forExport&&H(o,{display:"block"})…
+1?(c=t,t=[],c.length&&(o=C.createElementNS(pa,"tspan"),z(o,{dy:j||16,x:g}),n&&…
+delete e.style;f=A(e,ka("stroke","#68A","fill",ka("linearGradient",a,"stops",[…
+l))},crispLine:function(a,b){a[1]===a[4]&&(a[1]=a[4]=s(a[1])-b%2/2);a[2]===a[5…
+a.r:e;e=this.createElement("rect").attr({rx:e,ry:e,fill:R});return e.attr(X(a)…
+f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlin…
+height:0}),Q("img",{onload:function(){k(g,Jb[j]=[this.width,this.height])},src…
+c/2,b+d,a,b+d/2,"Z"]},arc:function(a,b,c,d,e){var f=e.start,c=e.r||c||d,g=e.en…
+g="linearGradient":a&&a.radialGradient&&(g="radialGradient");if(g){var c=a[g],…
+k=e.get("a")):(j=a[1],k=1);a=d.createElement("stop").attr({offset:a[0],"stop-c…
+f&&a.css({position:"absolute"});a.x=b;a.y=c;return a},html:function(a,b,c){var…
+c=h.box.parentNode,d=[];if(a){if(b=a.div,!b){for(;a;)d.push(a),a=a.parentGroup…
+w(a||11),a=a<24?a+4:s(a*1.2),b=s(a*0.8);return{h:a,b:b}},label:function(a,b,c,…
+I(p,"add",l);g.width=function(a){Ga=a;return!1};g.height=function(a){v=a;retur…
+p.height,0,fb["stroke-width"]),o.add(p);o.attr(A({width:p.width,height:p.heigh…
+{},a=A({},a);n("fontSize,fontWeight,fontFamily,color,lineHeight,width".split("…
+";"];(b==="shape"||b===ia)&&d.push("left:0;top:0;width:1px;height:1px;");Qa&&d…
+return this},updateTransform:va.prototype.htmlUpdateTransform,attr:function(a,…
+k=!0),m=!0;else if(c==="d"){d=d||[];this.d=d.join(" ");e=d.length;for(m=[];e--…
+g[c]=d,m=!0;else if(c==="x"||c==="y")this[c]=d,g[{x:"left",y:"top"}[c]]=d;else…
+else if(h==="shape"&&c==="rotation")this[c]=d,f.style.left=-s(Y(d*ab)+1)+"px",…
+b.destroyClip(),a={clip:Qa?"inherit":"rect(auto)"});return b.css(a)},css:va.pr…
+if(c===9||c===11)a[c-4]=a[c-2]=w(a[c-2])-10*b;return a.join(" ")},shadow:funct…
+o(a.offsetY,1)});if(c)h.cutOff=l+1;j=['<stroke color="',a.color||"black",'" op…
+"urn:schemas-microsoft-com:vml"),C.createStyleSheet().cssText="hcv\\:fill, hcv…
+s(b?e:f)+"px,"+s(b?c:d)+"px)"};!b&&Qa&&a.element.nodeName!=="IMG"&&r(c,{width:…
+Q(e.prepVML(h),null,null,b)};p=a[0];s=a[a.length-1];p[0]>0&&a.unshift([0,p[1]]…
+0.5,x+=(A[1]-w.y)/w.height-0.5,r*=A[2]/w.width,P*=A[2]/w.height);t='src="'+M.g…
+' xmlns="urn:schemas-microsoft-com:vml" />'),a=a.indexOf('style="')===-1?a.rep…
+a&&(b={className:"highcharts-"+a,"class":"highcharts-"+a});return this.createE…
+symbols:{arc:function(a,b,c,d,e){var f=e.start,g=e.end,h=e.r||c||d,c=V(f),d=Y(…
+arguments):(h=O(e.r,c,d),f=["M",a+h,b,"L",f-h,b,"wa",f-2*h,b,f,b+2*h,f-h,b,f,b…
+d){b.length===0&&Qb(d,a);b.push(c)}}}();Ra=ja||gb||ra;Pa.prototype={addLabel:f…
+chart:c,isFirst:i,isLast:j,dateTimeLabelFormat:l,value:a.isLog?ea(ba(k)):k});f…
+b=this.labelBBox.width,a=b*{left:0,center:0.5,right:1}[a.align]-a.x;return[-a,…
+f=e.chart,g=d&&f.oldChartHeight||f.chartHeight;return{x:a?e.translate(b+c,null…
+1)%i*16);return{x:a,y:b}},getMarkPath:function(a,b,c,d,e,f){return f.crispLine…
+r.x,r=r.y,y=c.staggerLines;if(p){i=c.getPlotLinePath(i+F,p,b);if(k===x){k={str…
+1)||this.isLast&&!o(d.showLastLabel,1)?v=!1:!y&&f&&j.overflow==="justify"&&!th…
+i=ma(i),l=ma(l));if(h){if(u=b.getPlotLinePath(l,h),d={stroke:q,"stroke-width":…
+t(f.text)&&u&&u.length&&b.width>0&&b.height>0){f=A({align:c&&k&&"center",x:c?!…
+Hb.prototype={destroy:function(){Ea(this,this.axis)},setTotal:function(a){this…
+1),c=c.translate(0),c=L(g-c),h=d.xAxis[0].translate(this.x)+a,i=d.plotHeight,f…
+labels:G,lineColor:"#C0D0E0",lineWidth:1,minPadding:0.01,maxPadding:0.01,minor…
+labels:{align:"right",x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,st…
+x:0,y:-5},title:{rotation:0}},init:function(a,b){var c=b.isX;this.horiz=a.inve…
+e==="logarithmic";this.isLinked=t(d.linkedTo);this.isDatetimeAxis=f;this.tickm…
+!0;this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;this.addP…
+this.axis,b=this.value,c=this.dateTimeLabelFormat,d=M.lang.numericSymbols,e=d&…
+i,j,k,l,m,p,u,n,q,D=h.threshold,s,r=[],v=0;a.hasVisibleSeries=!0;if(a.isLog&&D…
+for(f=0;f<s;f++)if(n=h[f],q=u[f],i&&(w=(F=q<D)?k:j,P=F?p:l,q=w[n]=t(w[n])?ea(w…
+D)a.dataMax=D,a.ignoreMaxPadding=!0}}})},translate:function(a,b,c,d,e,f){var g…
+null,null,c),j=c&&d.oldChartHeight||d.chartHeight,k=c&&d.oldChartWidth||d.char…
+b=ea(T(b/a)*a),c=ea(wa(c/a)*a),e=[];b<=c;){e.push(b);b=ea(b+a);if(b===d)break;…
+a=o(a==="auto"?null:a,this._minorAutoInterval,(c-b)*(e.tickPixelInterval/(d?5:…
+this.max;a+=b)c.push(a);return c},adjustForMinRange:function(){var a=this.opti…
+b=Da(d);c=[b+k,o(a.max,b+k)];if(e)c[2]=this.dataMax;c=Ma(c);c-b<k&&(d[0]=c-k,d…
+e,this.pointRange=b,this.closestPointRange=c;this.oldTransA=g;this.translation…
+b.min=o(c.min,c.dataMin),b.max=o(c.max,c.dataMax),d.type!==b.linkedParent.opti…
+c*k;if(!t(d.max)&&!t(b.userMax)&&j&&(b.dataMax>0||!b.ignoreMaxPadding))b.max+=…
+if(!l&&b.tickInterval<m)b.tickInterval=m;if(!f&&!e&&(a=J.pow(10,T(J.log(b.tick…
+b.min,b.max),b.tickPositions=i;if(!h)e=i[0],f=i[i.length-1],h=b.minPointOffset…
+!this.categories&&!this.isLinked&&this.options.alignTicks!==!1){var d=this.tic…
+!0});if(e||d||this.isLinked||this.userMin!==this.oldUserMin||this.userMax!==th…
+b;f.isDirtyExtremes=!0;c&&g.redraw(d)})},zoom:function(a,b){this.setExtremes(a…
+this.isLog;return{min:a?ea(ba(this.min)):this.min,max:a?ea(ba(this.max)):this.…
+f=a.ticks,g=a.horiz,h=a.side,i,j=0,k,l=0,m=d.title,p=d.labels,u=0,da=b.axisOff…
+3:"right"}[h]===p.align)u=y(f[a].getLabelSize(),u)}),a.staggerLines&&(u+=(a.st…
+da[h]);a.axisTitleMargin=o(k,u+l+(h!==2&&u&&q*d.labels[g?"y":"x"]));da[h]=y(da…
+f=a?b:c,g=this.opposite,h=this.offset,i=w(e.style.fontSize||12),d={low:f+(a?0:…
+o=d.lineWidth,q,D=b.hasRendered&&t(a.oldMin)&&!isNaN(a.oldMin),r=a.showAxis,s,…
+(l[b]=new nb(a)),s=b+u,v=g[c+1]!==x?g[c+1]+u:a.max,l[b].options={from:e?ba(s):…
+a.axisLine[r?"show":"hide"]();if(h&&r)h[h.isNew?"attr":"animate"](a.getTitlePo…
+d.title=A(d.title,a);this.axisTitle=e&&e.destroy();this.isDirty=!0;o(b,!0)&&c.…
+b=a.stacks,c;S(a);for(c in b)Ea(b[c]),b[c]=null;n([a.ticks,a.minorTicks,a.alte…
+b,anchorX:g?(2*f.anchorX+c)/3:c,anchorY:g?(f.anchorY+d)/2:d});e.label.attr(f);…
+0,g=0,h,a=na(a);c=a[0].tooltipPos;c||(n(a,function(a){h=a.series.yAxis;f+=a.pl…
+e+g&&(d-=d+a-(e+g),k=c-b+f-i,l=!0);k<f+5&&(k=f+5,l&&c>=k&&c<=k+b&&(k=c+f+i));k…
+d.hoverPoints,m,p=f.crosshairs;i=this.shared;h=this.getAnchor(a,b);g=h[0];h=h[…
+e.attr({stroke:m}),e=(f.positioner||this.getPosition).call(this,e.width,e.heig…
+d.renderer.path(i).attr(j).add()}}E(d,"tooltipRefresh",{text:k,x:g+d.plotLeft,…
+b[e?"xAxis":"yAxis"].push({axis:d,value:d.translate(((c.inverted?!e:e)?a.chart…
+c[i].options.enableMouseTracking!==!1&&!c[i].noSharedTooltip&&c[i].tooltipPoin…
+na(b)[0].plotX===x&&(a=!1);if(a)e.refresh(b);else{if(d)d.onMouseOut();if(c)c.o…
+0,1);!isNaN(e)&&!isNaN(d)&&(f[b?"xAxis":"yAxis"].push({axis:a,min:O(e,d),max:y…
+!c.isInsidePlot(a.pageX-b.chartPosition.left-c.plotLeft,a.pageY-b.chartPositio…
+!1;var d=a.chartX,h=a.chartY,l=!c.isInsidePlot(d-c.plotLeft,h-c.plotTop);fa&&a…
+c.plotLeft,b.mouseDownY-c.plotTop);if(c.hasCartesianSeries&&(b.zoomX||b.zoomY)…
+b.options.chart.panning&&c.pan(d)}if(!l)b.onmousemove(a);return l||!c.hasCarte…
+f=d.plotY,r(d,{pageX:b.chartPosition.left+c.plotLeft+(c.inverted?c.plotWidth-f…
+b.onclick=b.onmousedown=b.onmousemove=b.ontouchstart=b.ontouchend=b.ontouchmov…
+b.itemMarginTop=f;b.padding=e;b.initialItemX=e;b.initialItemY=e-5;b.maxItemWid…
+d!==x&&(i[j]=d);f.attr(i)}},positionItem:function(a){var b=this.options,c=b.sy…
+this;n(a.allItems,function(b){var c=b.checkbox,d=a.group.alignAttr;c&&H(c,{lef…
+t.drawLegendSymbol(b,a),a.legendItem=q=d.text(e.labelFormatter.call(a),l?g+h:-…
+a.visible),r&&s))a.checkbox=Q("input",{type:"checkbox",checked:a.selected,defa…
+y(g,b.lastLineHeight);a._legendItemPos=[b.itemX,b.itemY];f?b.itemX+=e:(b.itemY…
+a.clipRect=c.clipRect(0,0,9999,b.chartHeight),a.contentGroup.clip(a.clipRect);…
+0&&h>0)i[i.isNew?"attr":"animate"](i.crisp(null,null,null,g,h)),i.isNew=!1}els…
+(e.verticalAlign==="top"?-f:f)-this.padding,g=e.maxHeight,h=this.clipRect,i=e.…
+this.down=d.symbol("triangle-down",0,0,k,k).on("click",function(){b.scroll(1,j…
+1?f:g}).css({cursor:d===1?"default":"pointer"}),h.attr({text:d+"/"+this.pageCo…
+"addSeries",{options:a},function(){d=e.initSeries(a);e.isDirtyLegend=!0;b&&e.r…
+m=[];ua(a,this);for(l&&this.cloneRenderTo();j--;)if(a=c[j],a.isDirty&&a.option…
+"afterSetExtremes",a.getExtremes())});if(a.isDirty||h||g)a.redraw(),h=!0})}h&&…
+"px",height:this.plotHeight+"px",zIndex:10,display:R}),this.container),this.lo…
+c=this.series,d,e;for(d=0;d<b.length;d++)if(b[d].options.id===a)return b[d];fo…
+n(this.series,function(b){a=a.concat(Kb(b.points,function(a){return a.selected…
+this.resetZoomButton.alignTo=f},zoomOut:function(){var a=this,b=a.resetZoomBut…
+c=this.mouseDownX,d=b.pointRange/2,e=b.getExtremes(),f=b.translate(c-a,!0)+d,c…
+a[0],d=c[b],e=a[1],a=a[2];d&&e&&(c[b]=d=d.destroy());a&&a.text&&!d&&(c[b]=c.re…
+400)},cloneRenderTo:function(a){var b=this.renderToClone,c=this.container;a?b&…
+a.offsetWidth||this.cloneRenderTo();this.getChartSize();c=this.chartWidth;d=th…
+d=a.spacingBottom,a=a.spacingLeft,e,f=this.legend,g=this.optionsMarginTop,h=th…
+y(this.plotTop,l+o(k.margin,15)+b);if(f.display&&!m.floating)if(q==="right"){i…
+this.hasCartesianSeries&&n(this.axes,function(a){a.getOffset()});t(h)||(this.p…
+h}}var b=this,c=b.options.chart,d=b.renderTo,e;I(K,"resize",a);I(b,"destroy",f…
+d.plotHeight=f-d.plotTop-d.marginBottom;d.maxTicks=null;n(d.axes,function(a){a…
+f=d.spacingRight,g=d.spacingBottom,h=d.spacingLeft,i,j,k,l;this.plotLeft=i=s(t…
+resetMargins:function(){var a=this.options.chart,b=a.spacingRight,c=a.spacingB…
+0,j=a.backgroundColor,k=a.plotBackgroundColor,l=a.plotBackgroundImage,m=a.plot…
+if(l)h?h.animate(t):this.plotBGImage=b.image(l,o,n,q,r).add();s?s.animate({wid…
+e--;)(c=$[d[e].type])&&c.prototype[g]&&(f=!0);a[g]=f})},render:function(){var …
+a.setTooltipPoints();a.render()});e.items&&n(e.items,function(b){var d=r(e.sty…
+E(a,"destroy");S(a);for(e=b.length;e--;)b[e]=b[e].destroy();for(e=c.length;e--…
+U&&!K.canvg)U?Mb.push(function(){a.firstRender()},b.global.canvasToolsURL):C.a…
+b.scrollbar.enabled))a.scroller=new Highcharts.Scroller(a);a.tracker=new qb(a,…
+var Ta=function(){};Ta.prototype={init:function(a,b,c){var d=a.chart.counters;…
+a;if(a.dataLabels)c._hasPointLabels=!0;if(a.marker)c._hasPointMarkers=!0}else …
+"graphic,tracker,dataLabel,group,connector,shadowGroup".split(","),b,c=6;c--;)…
+a!==c)a.selected=!1,a.setState(""),a.firePointEvent("unselect")})})},onMouseOv…
+c=b.tooltipOptions,d=a.match(/\{(series|point)\.[a-zA-Z]+\}/g),e=/[{\.}]/,f,g,…
+return a},update:function(a,b,c){var d=this,e=d.series,f=d.graphic,g,h=e.data,…
+0;f<h;f++)if(g[f]===c){g.splice(f,1);d.options.data.splice(f,1);d.xData.splice…
+this.options).events,b;this.events=a;for(b in a)I(this,b,a[b]);this.hasImporte…
+{x:b-e,y:c-e,width:2*e,height:2*e}:{}));else{if(a&&h)e=h.radius,j?j.attr({x:b-…
+r(this,{name:b.name,state:"",pointAttr:{},visible:b.visible!==!1,selected:b.se…
+(b+1)})},bindAxes:function(){var a=this,b=a.options,c=a.chart,d;a.isCartesian&…
+e;c--;)d[c].y===null&&d.splice(c,1);d.length&&(b=[d])}else n(d,function(c,g){c…
+!a.colorByPoint&&b[c.color++]||"gray";c.wrapColor(b.length)},getSymbol:functio…
+0,a-4,"L",d,a-4]).attr(g).add(f)}if(c&&c.enabled)b=c.radius,this.legendSymbol=…
+(e.shift(),i.shift(),j.shift(),l.shift()));this.getAttribs();this.isDirtyData=…
+d=o(d.pointInterval,1);for(i=0;i<l;i++)e[i]=j,k[i]=a[i],j+=d;this.xIncrement=j…
+f.isDirtyBox=!0;o(b,!0)&&f.redraw(!1)},remove:function(a,b){var c=this,d=c.cha…
+i=a.min,k=a.max,b[d-1]<i||b[0]>k)b=[],c=[];else if(b[0]<i||b[d-1]>k){for(a=0;a…
+f=this.pointClass,g=d.length,h=this.cropStart||0,i,j=this.hasGroupedData,k,l=[…
+b=this.options,c=b.stacking,d=this.xAxis,e=d.categories,f=this.yAxis,g=this.po…
+n*100/p:0),k.percentage=p?k.y*100/p:0,k.total=k.stackTotal=p,k.stackY=n;k.yBot…
+null;n(this.segments||this.points,function(a){b=b.concat(a)});c&&c.reversed&&(…
+cb(c,a):a).replace("{series.name}",this.name).replace("{series.color}",this.co…
+this,c=b.chart,d=c.renderer,e;e=b.options.animation;var f=c.clipBox,g=c.invert…
+e.duration)}},afterAnimate:function(){var a=this.chart,b=this.sharedClipKey,c=…
+x||i.enabled,m=c.isInsidePlot(d,e,c.inverted),a&&e!==x&&!isNaN(e))if(a=g.point…
+for(f in e)g=e[f],h[f]=o(a[g],b[f],c[f],d[f]);return h},getAttribs:function(){…
+h.length;f--;){g=h[f];if((b=g.options&&g.options.marker||g.options)&&b.enabled…
+this,b=a.chart,c=/AppleWebKit\/533/.test(Fa),d,e,f=a.data||[],g,h,i;E(a,"destr…
+a);for(h in a)delete a[h]},drawDataLabels:function(){var a=this,b=a.options.da…
+a.color,"black");if(j)j.attr({text:f}),l=!1;else if(t(f)){j={fill:b.background…
+d=r({x:g?f.plotWidth-a:h,y:s(g?f.plotHeight-h:a),width:0,height:0},d);r(c,{wid…
+c.push(d.plotX,a[e-1].plotY),c.push(d.plotX,d.plotY))});return c},getGraphPath…
+invertGroups:function(){function a(){var a={width:b.yAxis.len,height:b.xAxis.l…
+this.chart,b,c=this.options,d=c.animation&&!!this.animate,e=this.visible?"visi…
+(b.clip(a.clipRect),this.trackerGroup&&this.trackerGroup.clip(a.clipRect));d?t…
+d=b.states,b=b.lineWidth,a=a||"";if(this.state!==a)this.state=a,d[a]&&d[a].ena…
+if(g)g[i]();d&&c.legend.colorizeItem(this,a);this.isDirty=!0;this.options.stac…
+e=d.length,f=a.chart,g=f.renderer,h=f.options.tooltip.snap,i=a.tracker,j=b.cur…
+visibility:a.visible?"visible":"hidden",stroke:wb,fill:c?wb:R,"stroke-width":b…
+a.length-1;d>=0;d--)d<a.length-1&&e.step&&c.push(a[d+1].plotX,a[d].yBottom),c.…
+qa(this.color).setOpacity(b.fillOpacity||0.75).get()),zIndex:0}).add(this.grou…
+k;i+=l;k+=l;i>a&&i>e?(i=y(a,e),k=2*e-i):i<a&&i<e&&(i=O(a,e),k=2*e-i);k>g&&k>e?…
+borderWidth:1,borderRadius:0,groupPadding:0.2,marker:null,pointPadding:0.1,min…
+a.chart;b.hasRendered&&n(b.series,function(b){if(b.type===a.type)b.isDirty=!0}…
+g.closestPointRange||1),m=g*c.groupPadding,p=(g-2*m)/f,u=c.pointWidth,r=t(u)?(…
+h;c.pointWidth=q;c.shapeType="rect";c.shapeArgs=f=b.renderer.Element.prototype…
+"select":""]).add(a.group).shadow(b.shadow,null,b.stacking&&!b.borderRadius);e…
+fill:wb,visibility:a.visible?"visible":"hidden"}).on(fa?"touchstart":"mouseove…
+if(a.shapeArgs&&(d=A(a.shapeArgs),g&&(d={x:f.plotWidth-d.y-d.height,y:f.plotHe…
+y:t(h)?g.getThreshold(h):g.translate(g.getExtremes().min,0,1,0,1)}),c.animate(…
+pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}});za=ca(N,{typ…
+function(b){a.onMouseOver();if(b.target._i!==x)c[b.target._i].onMouseOver()}).…
+{init:function(){Ta.prototype.init.apply(this,arguments);var a=this,b;r(a,{vis…
+!0,c.redraw()},slice:function(a,b,c){var d=this.series.chart,e=this.slicedTran…
+-xa/2;c&&(c.attr({r:0,start:d,end:d}),c.animate({r:b.r,start:b.start,end:b.end…
+var a=0,b=-0.25,c=this.options,d=c.slicedOffset,e=d+c.borderWidth,f,g=this.cha…
+end:i};j=(i+h)/2;q.slicedTranslation=Sa([V(j)*d+g.plotLeft,Y(j)*d+g.plotTop],s…
+this.isDirty=!1},drawPoints:function(){var a=this,b=a.chart,c=b.renderer,d,e,f…
+h);j.visible===!1&&j.setVisible(!1)})},drawDataLabels:function(){var a=this.da…
+21);y--;){var x=[],A=[],z=r[y],C=z.length,B;if(j>0){for(v=m-l-j;v<=m+l+j;v+=a)…
+s=h[1];if(j>0){if(q=A.pop(),B=q.i,q=q.y,s>q&&x[B+1]!==null||s<q&&x[B-1]!==null…
+b.connector=g=this.chart.renderer.path(h).attr({"stroke-width":f,stroke:d.conn…
+getOptions:function(){return M},hasBidiBug:Pb,numberFormat:Ia,seriesTypes:$,se…
diff --git a/web/app/assets/stylesheets/application.css.scss b/web/app/assets/s…
@@ -0,0 +1,13 @@
+/*
+ * This is a manifest file that'll be compiled into application.css, which wil…
+ * listed below.
+ *
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor…
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here usi…
+ *
+ * You're free to add application-wide styles to this file and they'll appear …
+ * compiled file, but it's generally better to create a new file per style sco…
+ *
+ *= require_self
+ *= require_tree .
+*/
diff --git a/web/app/assets/stylesheets/global.css b/web/app/assets/stylesheets…
@@ -0,0 +1,555 @@
+/* global element overrides */
+
+body {
+ height: 100%;
+ background: #fff;
+ margin: 0;
+ padding: 0;
+ font-family: Tahoma, sans-serif;
+ font-size: 12px;
+ color: #555;
+}
+
+img {
+ border: none;
+}
+
+table {
+ border: none;
+ padding: 0;
+ margin: 0;
+}
+
+a:link, a:visited {
+ color: #003366;
+ text-decoration: none;
+}
+
+a:hover, a:active {
+ color: #cc0033;
+ text-decoration: underline;
+}
+
+h1 {
+ color: #333;
+ margin-top: 0;
+ padding-top: 0;
+ font-weight: normal;
+ font-size: 36px;
+}
+
+h2 {
+ font-size: 1.4em;
+ margin-bottom: 4px;
+}
+
+h3 {
+ font-size: 1.05em;
+ font-weight: normal;
+ font-style: italic;
+}
+
+/* unique elements */
+
+#content {
+ padding: 0;
+ margin: 0 auto;
+ width: 800px;
+ line-height: 1.5;
+}
+
+#main {
+ border: 0;
+ padding: 0;
+ background-color: white;
+ padding-top: 6px;
+ padding-left: 18px;
+ padding-right: 20px;
+ margin-top: -3px;
+ margin-bottom: -3px;
+}
+
+#main img {
+ max-width: 530px;
+}
+
+#footer {
+
+ margin: 0;
+ text-align: center;
+}
+
+#quote {
+ font-size: 12px;
+ padding: 10px;
+ margin: 0 auto;
+ width: 70%;
+ background: #dddddd;
+ margin-bottom: 10px;
+}
+
+#copyright {
+ padding: 10px;
+ text-align: center;
+ font-size: 10px;
+ color: #cccccc;
+}
+
+#header {
+ width: 800px;
+ margin: 0 auto 10px;
+ color: white;
+
+}
+
+#logo {
+ float: left;
+ margin-top: 0px;
+}
+
+
+
+#warvox_stats {
+ margin-top: 5px;
+ border: 1px solid black;
+ font-size: 12px;
+ color: #555;
+}
+
+#warvox_stats td {
+ margin-left: 20px;
+ padding: 0 10px 0px 6px;
+}
+
+
+#warvox_conf {
+ margin-top: 5px;
+ border: 1px solid black;
+ font-size: 12px;
+ color: #555;
+}
+
+#warvox_conf td {
+ margin-left: 20px;
+ padding: 0 10px 0px 6px;
+}
+
+#warvox_blacklist {
+ margin-top: 5px;
+ border: 1px solid black;
+ font-size: 12px;
+ color: #555;
+}
+
+#warvox_blacklist td {
+ margin-left: 20px;
+ padding: 0 10px 0px 6px;
+}
+
+#home_logo {
+ border: 0;
+}
+
+#home_links {
+
+}
+
+#home_intro, #home_intro td {
+ border: 0;
+}
+
+#home_table {
+ border: 0;
+ margin-top: 0px;
+}
+
+#home_table td {
+ border: 0;
+}
+
+#home_text {
+ padding-left: 20px;
+}
+
+#navwrap {
+ margin-top: 10px;
+ padding-top: 10px;
+ text-align: center;
+}
+
+#nav {
+ margin: 0 0 0 0 auto;
+ padding: 10px;
+}
+
+#sections_container {
+ font-size: 14px;
+}
+
+#sections_ul {
+ margin: 0;
+ padding: 0;
+ white-space: nowrap;
+}
+
+#sections_ul li {
+ display: inline;
+ list-style-type: none;
+}
+
+#sections_container a {
+ padding: 5px 10px 5px 10px;
+ line-height: 28px;
+}
+
+#sections_container a:link, #sections_container a:visited {
+ color: #fff;
+ background: black repeat-x top;
+ text-decoration: none;
+ font-variant: small-caps;
+}
+
+#sections_container a:hover {
+ color: #fff;
+ background: red repeat-x top;
+ text-decoration: none;
+ font-variant: small-caps;
+}
+
+#sections_active {
+ font-weight: bold;
+}
+
+#subsections_active {
+ font-weight: bold;
+}
+
+#subsections_container {
+ font-size: 12px;
+ padding-top: 5px;
+}
+
+#subsections_ul {
+ margin: 0;
+ padding: 0;
+ white-space: nowrap;
+}
+
+#subsections_ul li {
+ display: inline;
+ list-style-type: none;
+}
+
+#subsections_container a {
+ padding: 5px 10px 5px 10px;
+ line-height: 20px;
+}
+
+#subsections_container a:link, #subsections_container a:visited {
+ color: #fff;
+ background: #333333 repeat-x top;
+ text-decoration: none;
+ font-variant: small-caps;
+}
+
+#subsections_container a:hover {
+ color: #fff;
+ background: #440000 repeat-x top;
+ text-decoration: none;
+ font-variant: small-caps;
+}
+
+
+#calls_pie1 {
+ text-align: center;
+}
+#calls_pie2 {
+ text-align: center;
+}
+#calls_pie3 {
+ text-align: center;
+}
+
+/* non-unique elements */
+
+
+.title {
+ font-size: 20px;
+ font-weight: bold;
+ color: black;
+ font-variant: small-caps;
+}
+
+.active_job_row {
+ background: yellow;
+}
+
+.table_scaffold {
+ margin-top: 5px;
+ border: 1px solid black;
+ font-size: 12px;
+ color: #555;
+}
+
+.table_scaffold th {
+ font-size: 14px;
+ text-decoration: underline;
+}
+
+.table_scaffold td {
+ margin-left: 20px;
+ padding: 0 10px 0px 6px;
+ border: 1px solid #cccccc;
+}
+
+.header_item {
+ font-weight: bold;
+}
+
+.date-header {
+ background: url('/assets/bluefade.jpg') #222222 repeat-x top;
+ color: white;
+ padding: 2px;
+ margin: 2px;
+ font-weight: bold;
+ padding-left: 8px;
+ font-variant: small-caps;
+ border: 0;
+}
+
+.date-header-center {
+ background: url('/assets/bluefade.jpg') #8c0000 repeat-x top;
+ color: white;
+ padding: 2px;
+ margin: 2px;
+ font-weight: bold;
+ padding-left: 8px;
+ font-variant: small-caps;
+ text-align: center;
+ border: 0;
+}
+
+
+.balloon {
+ background: url('/assets/balloon.jpg') repeat-x top;
+ width: 277px;
+ height: 98px;
+ color: white;
+ margin: 40px auto;
+}
+
+.balloon_links {
+ float: left;
+ margin-top: 10px;
+ margin-left: 6px;
+
+}
+
+.balloon_links p {
+ font-size: 14px;
+ font-weight: bold;
+ margin: 0;
+}
+
+.balloon_links a, .balloon_links a:link, .balloon_links a:visited {
+ font-size: 12px;
+ color: white;
+ text-decoration: none;
+ margin-left: 12px;
+}
+
+.balloon_links a:hover, .balloon_links a:active {
+ color: yellow;
+ text-decoration: underline;
+}
+
+.balloon_icon {
+ float: left;
+ padding-top: 25px;
+ padding-left: 14px;
+}
+
+.box_full {
+ position: relative;
+ clear: both;
+ width: 790px;
+}
+
+#round_top {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ height: 9px;
+ margin-bottom: -2px;
+ visibility: hidden;
+}
+
+#round_bot {
+ padding: 0;
+ border: 0;
+ margin-top: -2px;
+ height: 15px;
+ visibility: hidden;
+}
+
+.box_full p {
+ line-height: 1.5em;
+}
+
+
+.intro {
+ font-size: 14px;
+}
+
+.center {
+ text-align: center;
+}
+
+.code {
+ font-family: fixed, courier new;
+ color: black;
+ background: #dddddd;
+ padding: 0.25em 0.25em 0.25em 0.25em;
+}
+
+.fatp {
+ margin: 2.0em 0 0.5em;
+}
+
+.announce {
+ padding: 0px 20px 0px 20px;
+ line-height: 1.5;
+ font-size: 12px;
+ font-weight: bold;
+}
+
+.vulnTitle {
+ font-weight: bold;
+ font-size: 10pt;
+ padding-bottom: 2em;
+}
+
+.vulnHeader {
+ font-weight: bold;
+}
+
+.vulnText {
+ padding-bottom: 1em;
+}
+
+.vulnInfoTable {
+ background: #dddddd;
+
+}
+
+.vulnInfoHeader {
+ font-weight: bold;
+}
+
+.vulnInfoData {
+
+}
+
+.talk_title {
+ font-family: verdana, sans-serif, arial, helvetica;
+ font-size: 9pt;
+ padding: 0.1em 0.5em 0.15em .5em;
+ font-weight: bold;
+}
+
+.materials {
+ background: #dddddd;
+ padding: 10px 10px 10px 10px;
+ border: 1px solid black;
+}
+
+
+
+.level1
+{
+ list-style: none;
+ text-align: left;
+ padding: 0em 0em 1em 0em;
+ font-size: 16px;
+ font-weight: bold;
+}
+.level1 li
+{
+ padding: 1em .25em 0.25em 0.25em;
+}
+
+.level2
+{
+ list-style: circle;
+ text-align: left;
+ padding: 0em 0.25em 0.25em 4em;
+}
+.level2 li
+{
+ padding: 0.25em .25em 0.25em 0.25em;
+ font-size: 14px;
+ font-weight: bold;
+}
+
+.level3
+{
+ list-style: square;
+ text-align: left;
+ padding: 0em 0.25em 0.25em 4em;
+}
+.level3 li
+{
+ padding: 0.25em .25em 0.25em 0.25em;
+}
+
+
+
+.boxTable
+{
+ border-left-style: solid;
+ border-top-style: solid;
+ border-right-style: solid;
+ border-bottom-style: solid;
+ border-color: #dddddd;
+ font-family: verdana, sans-serif;
+ font-size: 8pt;
+ background-color: #dddddd;
+}
+.boxInnerTable
+{
+ font-family: verdana, sans-serif;
+ font-size: 8pt;
+}
+.boxTdHeader
+{
+ border-width: 0 0 0 0;
+ border-color: #dddddd;
+ border-left-style: solid;
+ border-top-style: solid;
+ border-right-style: solid;
+ border-bottom-style: solid;
+ background-color: #dddddd;
+ color: black;
+ height: 20px;
+ font-weight: bold
+}
+.boxTd
+{
+ border-width: 0 0 0 0;
+ border-left-style: solid;
+ border-top-style: solid;
+ border-right-style: solid;
+ border-bottom-style: solid;
+}
+.boxTd1
+{
+ background-color: #eeeeee;
+}
+.boxTd2
+{
+ background-color: #eeeeee;
+}
+.boxTh
+{
+ background-color: #dddddd;
+}
diff --git a/web/app/assets/stylesheets/global.css.erb b/web/app/assets/stylesh…
@@ -1,556 +0,0 @@
-/* global element overrides */
-
-body {
- height: 100%;
- background: #fff;
- margin: 0;
- padding: 0;
- font-family: Tahoma, sans-serif;
- font-size: 12px;
- color: #555;
-}
-
-img {
- border: none;
-}
-
-table {
- border: none;
- padding: 0;
- margin: 0;
-}
-
-a:link, a:visited {
- color: #003366;
- text-decoration: none;
-}
-
-a:hover, a:active {
- color: #cc0033;
- text-decoration: underline;
-}
-
-h1 {
- color: #333;
- margin-top: 0;
- padding-top: 0;
- font-weight: normal;
- font-size: 36px;
-}
-
-h2 {
- font-size: 1.4em;
- margin-bottom: 4px;
-}
-
-h3 {
- font-size: 1.05em;
- font-weight: normal;
- font-style: italic;
-}
-
-/* unique elements */
-
-#content {
- padding: 0;
- margin: 0 auto;
- width: 800px;
- line-height: 1.5;
-}
-
-#main {
- border: 0;
- padding: 0;
- background-color: white;
- padding-top: 6px;
- padding-left: 18px;
- padding-right: 20px;
- margin-top: -3px;
- margin-bottom: -3px;
-}
-
-#main img {
- max-width: 530px;
-}
-
-#footer {
-
- margin: 0;
- text-align: center;
-}
-
-#quote {
- font-size: 12px;
- padding: 10px;
- margin: 0 auto;
- width: 70%;
- background: #dddddd;
- margin-bottom: 10px;
-}
-
-#copyright {
- padding: 10px;
- text-align: center;
- font-size: 10px;
- color: #cccccc;
-}
-
-#header {
- width: 800px;
- margin: 0 auto 10px;
- color: white;
-
-}
-
-#logo {
- float: left;
- margin-top: 0px;
-}
-
-
-
-#warvox_stats {
- margin-top: 5px;
- border: 1px solid black;
- font-size: 12px;
- color: #555;
-}
-
-#warvox_stats td {
- margin-left: 20px;
- padding: 0 10px 0px 6px;
-}
-
-
-#warvox_conf {
- margin-top: 5px;
- border: 1px solid black;
- font-size: 12px;
- color: #555;
-}
-
-#warvox_conf td {
- margin-left: 20px;
- padding: 0 10px 0px 6px;
-}
-
-#warvox_blacklist {
- margin-top: 5px;
- border: 1px solid black;
- font-size: 12px;
- color: #555;
-}
-
-#warvox_blacklist td {
- margin-left: 20px;
- padding: 0 10px 0px 6px;
-}
-
-#home_logo {
- border: 0;
-}
-
-#home_links {
-
-}
-
-#home_intro, #home_intro td {
- border: 0;
-}
-
-#home_table {
- border: 0;
- margin-top: 0px;
-}
-
-#home_table td {
- border: 0;
-}
-
-#home_text {
- padding-left: 20px;
-}
-
-#navwrap {
- margin-top: 10px;
- padding-top: 10px;
- text-align: center;
-}
-
-#nav {
- margin: 0 0 0 0 auto;
- padding: 10px;
-}
-
-#sections_container {
- font-size: 14px;
-}
-
-#sections_ul {
- margin: 0;
- padding: 0;
- white-space: nowrap;
-}
-
-#sections_ul li {
- display: inline;
- list-style-type: none;
-}
-
-#sections_container a {
- padding: 5px 10px 5px 10px;
- line-height: 28px;
-}
-
-#sections_container a:link, #sections_container a:visited {
- color: #fff;
- background: black repeat-x top;
- text-decoration: none;
- font-variant: small-caps;
-}
-
-#sections_container a:hover {
- color: #fff;
- background: red repeat-x top;
- text-decoration: none;
- font-variant: small-caps;
-}
-
-#sections_active {
- font-weight: bold;
-}
-
-#subsections_active {
- font-weight: bold;
-}
-
-#subsections_container {
- font-size: 12px;
- padding-top: 5px;
-}
-
-#subsections_ul {
- margin: 0;
- padding: 0;
- white-space: nowrap;
-}
-
-#subsections_ul li {
- display: inline;
- list-style-type: none;
-}
-
-#subsections_container a {
- padding: 5px 10px 5px 10px;
- line-height: 20px;
-}
-
-#subsections_container a:link, #subsections_container a:visited {
- color: #fff;
- background: #333333 repeat-x top;
- text-decoration: none;
- font-variant: small-caps;
-}
-
-#subsections_container a:hover {
- color: #fff;
- background: #440000 repeat-x top;
- text-decoration: none;
- font-variant: small-caps;
-}
-
-
-#calls_pie1 {
- text-align: center;
-}
-#calls_pie2 {
- text-align: center;
-}
-#calls_pie3 {
- text-align: center;
-}
-
-/* non-unique elements */
-
-
-.title {
- font-size: 20px;
- font-weight: bold;
- color: black;
- font-variant: small-caps;
-}
-
-.active_job_row {
- background: yellow;
-}
-
-.table_scaffold {
- margin-top: 5px;
- border: 1px solid black;
- font-size: 12px;
- color: #555;
-}
-
-.table_scaffold th {
- font-size: 14px;
- text-decoration: underline;
-}
-
-.table_scaffold td {
- margin-left: 20px;
- padding: 0 10px 0px 6px;
- border: 1px solid #cccccc;
-}
-
-.header_item {
- font-weight: bold;
-}
-
-.date-header {
- background: url('<%= asset_path 'bluefade.jpg' %>') #222222 repeat-x t…
- color: white;
- padding: 2px;
- margin: 2px;
- font-weight: bold;
- padding-left: 8px;
- font-variant: small-caps;
- border: 0;
-}
-
-.date-header-center {
- background: url('<%= asset_path 'bluefade.jpg' %>') #8c0000 repeat-x t…
- color: white;
- padding: 2px;
- margin: 2px;
- font-weight: bold;
- padding-left: 8px;
- font-variant: small-caps;
- text-align: center;
- border: 0;
-}
-
-
-.balloon {
- background: url('<%= asset_path 'balloon.jpg' %>') repeat-x top;
- width: 277px;
- height: 98px;
- color: white;
- margin: 40px auto;
-}
-
-.balloon_links {
- float: left;
- margin-top: 10px;
- margin-left: 6px;
-
-}
-
-.balloon_links p {
- font-size: 14px;
- font-weight: bold;
- margin: 0;
-}
-
-.balloon_links a, .balloon_links a:link, .balloon_links a:visited {
- font-size: 12px;
- color: white;
- text-decoration: none;
- margin-left: 12px;
-}
-
-.balloon_links a:hover, .balloon_links a:active {
- color: yellow;
- text-decoration: underline;
-}
-
-.balloon_icon {
- float: left;
- padding-top: 25px;
- padding-left: 14px;
-}
-
-.box_full {
- position: relative;
- clear: both;
- width: 790px;
-}
-
-#round_top {
- padding: 0;
- border: 0;
- margin: 0;
- height: 9px;
- margin-bottom: -2px;
- visibility: hidden;
-}
-
-#round_bot {
- padding: 0;
- border: 0;
- margin-top: -2px;
- height: 15px;
- visibility: hidden;
-}
-
-.box_full p {
- line-height: 1.5em;
-}
-
-
-.intro {
- font-size: 14px;
-}
-
-.center {
- text-align: center;
-}
-
-.code {
- font-family: fixed, courier new;
- color: black;
- background: #dddddd;
- padding: 0.25em 0.25em 0.25em 0.25em;
-}
-
-.fatp {
- margin: 2.0em 0 0.5em;
-}
-
-.announce {
- padding: 0px 20px 0px 20px;
- line-height: 1.5;
- font-size: 12px;
- font-weight: bold;
-}
-
-.vulnTitle {
- font-weight: bold;
- font-size: 10pt;
- padding-bottom: 2em;
-}
-
-.vulnHeader {
- font-weight: bold;
-}
-
-.vulnText {
- padding-bottom: 1em;
-}
-
-.vulnInfoTable {
- background: #dddddd;
-
-}
-
-.vulnInfoHeader {
- font-weight: bold;
-}
-
-.vulnInfoData {
-
-}
-
-.talk_title {
- font-family: verdana, sans-serif, arial, helvetica;
- font-size: 9pt;
- padding: 0.1em 0.5em 0.15em .5em;
- font-weight: bold;
-}
-
-.materials {
- background: #dddddd;
- padding: 10px 10px 10px 10px;
- border: 1px solid black;
-}
-
-
-
-.level1
-{
- list-style: none;
- text-align: left;
- padding: 0em 0em 1em 0em;
- font-size: 16px;
- font-weight: bold;
-}
-.level1 li
-{
- padding: 1em .25em 0.25em 0.25em;
-}
-
-.level2
-{
- list-style: circle;
- text-align: left;
- padding: 0em 0.25em 0.25em 4em;
-}
-.level2 li
-{
- padding: 0.25em .25em 0.25em 0.25em;
- font-size: 14px;
- font-weight: bold;
-}
-
-.level3
-{
- list-style: square;
- text-align: left;
- padding: 0em 0.25em 0.25em 4em;
-}
-.level3 li
-{
- padding: 0.25em .25em 0.25em 0.25em;
-}
-
-
-
-.boxTable
-{
- border-left-style: solid;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-color: #dddddd;
- font-family: verdana, sans-serif;
- font-size: 8pt;
- background-color: #dddddd;
-}
-.boxInnerTable
-{
- font-family: verdana, sans-serif;
- font-size: 8pt;
-}
-.boxTdHeader
-{
- border-width: 0 0 0 0;
- border-color: #dddddd;
- border-left-style: solid;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- background-color: #dddddd;
- color: black;
- height: 20px;
- font-weight: bold
-}
-.boxTd
-{
- border-width: 0 0 0 0;
- border-left-style: solid;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
-}
-.boxTd1
-{
- background-color: #eeeeee;
-}
-.boxTd2
-{
- background-color: #eeeeee;
-}
-.boxTh
-{
- background-color: #dddddd;
-}
-
diff --git a/web/app/assets/stylesheets/lightbox.css b/web/app/assets/styleshee…
@@ -1,26 +0,0 @@
-#lightbox{
- background-color:#eee;
- padding: 10px;
- border-bottom: 2px solid #666;
- border-right: 2px solid #666;
- }
-#lightboxDetails{
- font-size: 0.8em;
- padding-top: 0.4em;
- }
-#lightboxCaption{ float: left; }
-#keyboardMsg{ float: right; }
-#closeButton{ top: 5px; right: 5px; }
-
-#lightbox img{ border: none; clear: both;}
-#overlay img{ border: none; }
-
-#overlay{ background-image: url(overlay.png); }
-
-* html #overlay{
- background-color: #333;
- back\ground-color: transparent;
- background-image: url(blank.gif);
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="overla…
- }
-
-\ No newline at end of file
diff --git a/web/app/assets/stylesheets/scaffold.css b/web/app/assets/styleshee…
@@ -1,54 +0,0 @@
-body { background-color: #fff; color: #333; }
-
-body, p, ol, ul, td {
- font-family: verdana, arial, helvetica, sans-serif;
- font-size: 13px;
- line-height: 18px;
-}
-
-pre {
- background-color: #eee;
- padding: 10px;
- font-size: 11px;
-}
-
-a { color: #000; }
-a:visited { color: #666; }
-a:hover { color: #fff; background-color:#000; }
-
-.fieldWithErrors {
- padding: 2px;
- background-color: red;
- display: table;
-}
-
-#errorExplanation {
- width: 400px;
- border: 2px solid red;
- padding: 7px;
- padding-bottom: 12px;
- margin-bottom: 20px;
- background-color: #f0f0f0;
-}
-
-#errorExplanation h2 {
- text-align: left;
- font-weight: bold;
- padding: 5px 5px 5px 15px;
- font-size: 12px;
- margin: -7px;
- background-color: #c00;
- color: #fff;
-}
-
-#errorExplanation p {
- color: #333;
- margin-bottom: 0;
- padding: 5px;
-}
-
-#errorExplanation ul li {
- font-size: 12px;
- list-style: square;
-}
-
diff --git a/web/app/controllers/analyze_controller.rb b/web/app/controllers/an…
@@ -14,9 +14,6 @@ class AnalyzeController < ApplicationController
@dial_job = DialJob.find(@job_id)
@shown = params[:show]
- @g1 = Ezgraphix::Graphic.new(:c_type => 'col3d', :div_name => 'calls_p…
- @g1.render_options(:caption => 'Detected Lines by Type', :y_name => 'L…
-
ltypes = DialResult.find( :all, :select => 'DISTINCT line_type', :cond…
res_types = {}
@@ -27,7 +24,7 @@ class AnalyzeController < ApplicationController
)
end
- @g1.data = res_types
+ @lines_by_type = res_types
if(@shown and @shown != 'all')
@results = DialResult.where(:dial_job_id => @job_id).paginate(
@@ -58,9 +55,6 @@ class AnalyzeController < ApplicationController
@dial_job = DialJob.find(@job_id)
@shown = params[:show]
- @g1 = Ezgraphix::Graphic.new(:c_type => 'col3d', :div_name => 'calls_p…
- @g1.render_options(:caption => 'Detected Lines by Type', :y_name => 'L…
-
ltypes = DialResult.find( :all, :select => 'DISTINCT line_type', :cond…
res_types = {}
@@ -71,7 +65,7 @@ class AnalyzeController < ApplicationController
)
end
- @g1.data = res_types
+ @lines_by_type = res_types
if(@shown and @shown != 'all')
@results = DialJob.where(:id => @job_id).paginate(
@@ -137,12 +131,11 @@ class AnalyzeController < ApplicationController
send_data(cdata, :type => ctype, :disposition => 'inline')
end
-
-
+
+
def view_matches
@result = DialResult.find(params[:dial_result_id])
@job_id = @result.dial_job_id
@results = @result.matches.select{|x| x.matchscore.to_f > 10.0 }
- end
+ end
end
-
diff --git a/web/app/controllers/dial_results_controller.rb b/web/app/controlle…
@@ -1,11 +1,11 @@
class DialResultsController < ApplicationController
layout 'warvox'
-
+
# GET /dial_results
# GET /dial_results.xml
def index
@completed_jobs = DialJob.where(:status => 'completed').paginate(
- :page => params[:page],
+ :page => params[:page],
:order => 'id DESC',
:per_page => 30
@@ -23,12 +23,12 @@ class DialResultsController < ApplicationController
j = DialJob.find(params[:id])
j.processed = false
j.save
-
+
redirect_to :action => 'analyze'
end
-
+
# GET /dial_results/1/process
- # GET /dial_results/1/process.xml
+ # GET /dial_results/1/process.xml
def analyze
@job_id = params[:id]
@job = DialJob.find(@job_id)
@@ -37,18 +37,15 @@ class DialResultsController < ApplicationController
redirect_to :controller => 'analyze', :action => 'view', :id =…
return
end
-
+
@dial_data_total = DialResult.count(
:conditions => [ 'dial_job_id = ? and completed = ?', @job_id,…
)
-
+
@dial_data_done = DialResult.count(
:conditions => [ 'dial_job_id = ? and processed = ?', @job_id,…
)
- @g1 = Ezgraphix::Graphic.new(:c_type => 'col3d', :div_name => 'calls_p…
- @g1.render_options(:caption => 'Detected Lines by Type', :y_name => 'L…
-
ltypes = DialResult.find( :all, :select => 'DISTINCT line_type', :cond…
res_types = {}
@@ -58,16 +55,16 @@ class DialResultsController < ApplicationController
:conditions => ['dial_job_id = ? and line_type = ?', @…
)
end
-
- @g1.data = res_types
+
+ @lines_by_type = res_types
@dial_data_todo = DialResult.where(:dial_job_id => @job_id).paginate(
- :page => params[:page],
+ :page => params[:page],
:order => 'number ASC',
:per_page => 50,
:conditions => [ 'completed = ? and processed = ? and busy = ?…
)
-
+
if(@dial_data_todo.length > 0)
WarVOX::JobManager.schedule(::WarVOX::Jobs::Analysis, @job_id)
end
@@ -77,16 +74,13 @@ class DialResultsController < ApplicationController
# GET /dial_results/1/view.xml
def view
@dial_results = DialResult.where(:dial_job_id => params[:id]).paginate(
- :page => params[:page],
+ :page => params[:page],
:order => 'number ASC',
:per_page => 30
- )
-
- if(@dial_results)
- @g1 = Ezgraphix::Graphic.new(:c_type => 'col3d', :div_name => …
- @g1.render_options(:caption => 'Call Results', :w => 700, :h =…
+ )
- @g1.data = {
+ if(@dial_results)
+ @call_results = {
:Timeout => DialResult.count(:conditions =>['dial_job…
:Busy => DialResult.count(:conditions =>['dial_job…
:Answered => DialResult.count(:conditions =>['dial_job…
@@ -98,7 +92,7 @@ class DialResultsController < ApplicationController
format.xml { render :xml => @dial_results }
end
end
-
+
# GET /dial_results/1
# GET /dial_results/1.xml
def show
@@ -163,13 +157,13 @@ class DialResultsController < ApplicationController
# DELETE /dial_results/1
# DELETE /dial_results/1.xml
def purge
-
+
@job = DialJob.find(params[:id])
@job.dial_results.each do |r|
r.destroy
end
@job.destroy
-
+
dir = nil
jid = @job.id
dfd = Dir.new(WarVOX::Config.data_path)
@@ -179,7 +173,7 @@ class DialResultsController < ApplicationController
dir = File.join(WarVOX::Config.data_path, ent)
end
end
-
+
FileUtils.rm_rf(dir) if dir
respond_to do |format|
@@ -187,7 +181,7 @@ class DialResultsController < ApplicationController
format.xml { head :ok }
end
end
-
+
# DELETE /dial_results/1
# DELETE /dial_results/1.xml
def delete
@@ -197,5 +191,5 @@ class DialResultsController < ApplicationController
format.html { redirect_to :action => 'index' }
format.xml { head :ok }
end
- end
+ end
end
diff --git a/web/app/models/dial_result.rb b/web/app/models/dial_result.rb
@@ -1,23 +1,25 @@
class DialResult < ActiveRecord::Base
belongs_to :provider
belongs_to :dial_job
-
-
- has_many :matches, :class_name => 'DialResult', :finder_sql =>
+
+
+ has_many :matches, :class_name => 'DialResult', :finder_sql => proc {
'SELECT dial_results.*, ' +
- ' (( icount(\'#{fprint}\'::int[] & dial_results.fprint:…
+ " (( icount(\'#{fprint}\'::int[] & dial_results.fprint:…
'FROM dial_results ' +
- 'WHERE icount(dial_results.fprint) > 0 AND ' +
- 'dial_results.dial_job_id = \'#{dial_job_id}\' AND ' +
- 'dial_results.id != \'#{id}\' ' +
+ 'WHERE icount(dial_results.fprint) > 0 AND ' +
+ "dial_results.dial_job_id = \'#{dial_job_id}\' AND " +
+ "dial_results.id != \'#{id}\' " +
'ORDER BY matchscore DESC'
+ }
- has_many :matches_all_jobs, :class_name => 'DialResult', :finder_sql =>
+ has_many :matches_all_jobs, :class_name => 'DialResult', :finder_sql =…
'SELECT dial_results.*, ' +
- ' (( icount(\'#{fprint}\'::int[] & dial_results.fprint:…
+ " (( icount(\'#{fprint}\'::int[] & dial_results.fprint:…
'FROM dial_results ' +
'WHERE icount(dial_results.fprint) > 0 AND ' +
- 'dial_results.id != \'#{id}\' ' +
+ "dial_results.id != \'#{id}\' " +
'ORDER BY matchscore DESC'
-
+ }
+
end
diff --git a/web/app/views/analyze/show.html.erb b/web/app/views/analyze/show.h…
@@ -2,8 +2,8 @@
<table width='100%' align='center' border=0 cellspacing=0 cellpadding=6>
<tr>
- <td align='center'><%= raw(render_ezgraphix @g1) %></td>
+ <td align='center'>
+ <%= render :partial => 'shared/graphs/lines_by_type' %>
+ </td>
</tr>
</table>
-
-
diff --git a/web/app/views/analyze/view.html.erb b/web/app/views/analyze/view.h…
@@ -4,7 +4,9 @@
<table width='100%' align='center' border=0 cellspacing=0 cellpadding=6>
<tr>
- <td align='center'><%= raw(render_ezgraphix @g1) %></td>
+ <td align='center'>
+ <%= render :partial => 'shared/graphs/lines_by_type' %>
+ </td>
</tr>
</table>
@@ -19,10 +21,10 @@
<% @results.each do |dial_result| %>
<tr>
<td align='center'>
-
+
<object
type="application/x-shockwave-flash"
- data="/assets/musicplayer.swf?song_url=<%=resource_ana…
+ data="/assets/musicplayer.swf?song_url=<%=resource_ana…
width="20"
height="17"
style="margin-bottom: -5px;"
@@ -41,22 +43,22 @@
<% end %>
<% if(dial_result.mf and dial_result.mf.length > 0) %>
MF: <%=h dial_result.mf %><br/>
- <% end %>
+ <% end %>
</td>
<td align='center'>
<b><%=h dial_result.line_type.upcase %></b><br/>
<a href="<%=resource_analyze_path(@job_id, dial_result.id, "bi…
<a href="<%=resource_analyze_path(@job_id, dial_result.id, "bi…
- <% (dial_result.signatures||"").split("\n").each do |s|
+ <% (dial_result.signatures||"").split("\n").each do |s|
sid,mat,name = s.split(':', 3)
str = [mat.to_i * 6.4, 255].min
col = ("%.2x" % (255 - str)) * 3
%>
<div style="color: #<%= col%>;"><%=h name%> (<%=h sid …
- <% end %>
+ <% end %>
<% if dial_result.fprint %>
<a href="<%=view_matches_path(dial_result.id)%>">View …
- <% end %>
+ <% end %>
</td>
</tr>
<% end %>
diff --git a/web/app/views/dial_results/analyze.html.erb b/web/app/views/dial_r…
@@ -7,7 +7,9 @@
<table width='100%' align='center' border=0 cellspacing=0 cellpadding=6>
<tr>
<% if @dial_data_done > 0 %>
- <td align='center'><%= raw(render_ezgraphix @g1) %></td>
+ <td align='center'>
+ <%= render :partial => 'shared/graphs/lines_by_type' %>
+ </td>
<% end %>
</tr>
</table>
diff --git a/web/app/views/dial_results/view.html.erb b/web/app/views/dial_resu…
@@ -6,7 +6,9 @@
<%= raw(will_paginate @dial_results) %>
<table width='100%' align='center' border=0 cellspacing=0 cellpadding=6>
<tr>
- <td align='center'><%= raw(render_ezgraphix @g1) %></td>
+ <td align='center'>
+ <%= render :partial => 'shared/graphs/call_results' %>
+ </td>
</tr>
</table>
@@ -20,17 +22,15 @@
<th>Seconds</th>
<th>Ring Time</th>
</tr>
-
-
<% for dial_result in @dial_results.sort{|a,b| a.number <=> b.number } %>
<tr>
- <td><%=h dial_result.number %></td>
- <td><%=h dial_result.cid %></td>
- <td><%=h dial_result.provider.name %></td>
- <td><%=h dial_result.completed %></td>
- <td><%=h dial_result.busy %></td>
- <td><%=h dial_result.seconds %></td>
- <td><%=h dial_result.ringtime.to_i %></td>
+ <td><%= dial_result.number %></td>
+ <td><%= dial_result.cid %></td>
+ <td><%= dial_result.provider.name %></td>
+ <td><%= dial_result.completed %></td>
+ <td><%= dial_result.busy %></td>
+ <td><%= dial_result.seconds %></td>
+ <td><%= dial_result.ringtime.to_i %></td>
</tr>
<% end %>
</table>
diff --git a/web/app/views/layouts/warvox.html.erb b/web/app/views/layouts/warv…
@@ -2,10 +2,9 @@
<html>
<head>
<title><%= @title || "WarVOX" %></title>
- <%= csrf_meta_tag %>
- <%= stylesheet_link_tag 'global' %>
- <!--[if IE 7]><%= stylesheet_link_tag 'ie7' %><![endif]-->
- <%= javascript_include_tag 'jquery' %>
+ <%= stylesheet_link_tag "application", :media => "all" %>
+ <%= javascript_include_tag "application" %>
+ <%= csrf_meta_tags %>
</head>
<body>
@@ -21,6 +20,7 @@
<div id="flash"></div>
<%= yield %>
+
<br/><br/>
<div id="footer">
diff --git a/web/app/views/shared/graphs/_call_results.html.erb b/web/app/views…
@@ -0,0 +1,58 @@
+<%
+
+graph_id = "g" + rand(0x1000000).to_s
+pie_data = raw("[ 'Timeout', #{@call_results[:Timeout].to_i.to_s} ], ['Busy', …
+
+%>
+
+<div id="<%= graph_id %>"></div>
+
+<%= javascript_tag do %>
+
+ $(function () {
+ var chart;
+ $(document).ready(function() {
+ chart = new Highcharts.Chart({
+ chart: {
+ renderTo: '<%= graph_id %>',
+ plotBackgroundColor: null,
+ plotBorderWidth: null,
+ plotShadow: false,
+ shadow: true,
+ width: 600,
+ height: 400
+ },
+ title: {
+ text: 'Dial Results'
+ },
+ tooltip: {
+ pointFormat: '{series.name}: <b>{point.percentage}%</b>',
+ percentageDecimals: 1
+ },
+ plotOptions: {
+ pie: {
+ allowPointSelect: true,
+ cursor: 'pointer',
+ dataLabels: {
+ enabled: true,
+ color: '#000000',
+ connectorColor: '#000000',
+ formatter: function() {
+ return '<b>'+ this.point.name +'</b>: '+ Math.roun…
+ }
+ }
+ }
+ },
+ series: [{
+ type: 'pie',
+ name: 'Result',
+ data: [<%= pie_data %>]
+ }]
+ });
+ });
+});
+
+
+<% end %>
+
+</div>
diff --git a/web/app/views/shared/graphs/_lines_by_type.html.erb b/web/app/view…
@@ -0,0 +1,63 @@
+<%
+
+graph_id = "g" + rand(0x1000000).to_s
+pie_data = raw("")
+
+
+@lines_by_type.keys.sort{|a,b| @lines_by_type[b] <=> @lines_by_type[a]}.each d…
+ pie_data << raw("[ '#{k.to_s.capitalize}', #{@lines_by_type[k].to_i.to…
+end
+
+%>
+
+<div id="<%= graph_id %>"></div>
+
+<%= javascript_tag do %>
+
+ $(function () {
+ var chart;
+ $(document).ready(function() {
+ chart = new Highcharts.Chart({
+ chart: {
+ renderTo: '<%= graph_id %>',
+ plotBackgroundColor: null,
+ plotBorderWidth: null,
+ plotShadow: false,
+ shadow: true,
+ width: 600,
+ height: 400
+ },
+ title: {
+ text: 'Line Classification'
+ },
+ tooltip: {
+ pointFormat: '{series.name}: <b>{point.percentage}%</b>',
+ percentageDecimals: 1
+ },
+ plotOptions: {
+ pie: {
+ allowPointSelect: true,
+ cursor: 'pointer',
+ dataLabels: {
+ enabled: true,
+ color: '#000000',
+ connectorColor: '#000000',
+ formatter: function() {
+ return '<b>'+ this.point.name +'</b>: '+ Math.roun…
+ }
+ }
+ }
+ },
+ series: [{
+ type: 'pie',
+ name: 'Result',
+ data: [<%= pie_data %>]
+ }]
+ });
+ });
+});
+
+
+<% end %>
+
+</div>
diff --git a/web/app/views/shared/graphs/call_results.html.erb b/web/app/views/…
@@ -0,0 +1,60 @@
+<%
+
+
+graph_id = "g" + rand(0x1000000).to_s
+pie_data = ""
+
+
+
+%>
+
+<div id="<%= graph_id %>"></div>
+
+
+<%= javascript_tag do %>
+
+ $(function () {
+ var chart;
+ $(document).ready(function() {
+ chart = new Highcharts.Chart({
+ chart: {
+ renderTo: '<%= graph_id %>',
+ plotBackgroundColor: null,
+ plotBorderWidth: null,
+ plotShadow: false,
+ shadow: true
+ },
+ title: {
+ text: 'Calls by Type'
+ },
+ tooltip: {
+ pointFormat: '{series.name}: <b>{point.percentage}%</b>',
+ percentageDecimals: 1
+ },
+ plotOptions: {
+ pie: {
+ allowPointSelect: true,
+ cursor: 'pointer',
+ dataLabels: {
+ enabled: true,
+ color: '#000000',
+ connectorColor: '#000000',
+ formatter: function() {
+ return '<b>'+ this.point.name +'</b>: '+ Math.roun…
+ }
+ }
+ }
+ },
+ series: [{
+ type: 'pie',
+ name: 'Result Type',
+ data: [<%= pie_data %>]
+ }]
+ });
+ });
+});
+
+
+<% end %>
+
+</div>
diff --git a/web/app/views/shared/graphs/lines_by_type.html.erb b/web/app/views…
diff --git a/web/db/migrate/20110801000001_add_fprint_to_dial_result.rb b/web/d…
@@ -1,10 +1,11 @@
class AddFprintToDialResult < ActiveRecord::Migration
def self.up
+ execute "CREATE EXTENSION intarray"
add_column :dial_results, :fprint, 'int[]'
end
def self.down
remove_column :dial_results, :fprint
+ execute "DROP EXTENSION intarray"
end
end
-
diff --git a/web/vendor/plugins/ezgraphix/FusionChartsFreeLICENSE.textile b/web…
@@ -1,48 +0,0 @@
-h2. FusionCharts Free License Agreement
-
-InfoSoft Global grants you a nonexclusive right to use FusionCharts Free, subj…
-
-FusionCharts Free can be used for free if you are a individual/research/commer…
-FusionCharts Free can be distributed for free with your free or commercial sof…
-You must not sell FusionCharts Free as a component in itself. However, your co…
-You must not represent in any way that you're the author of FusionCharts Free.
-
-h3. RE-DISTRIBUTION AS A PART OF A PRODUCT/SOFTWARE/APPLICATION
-
-FusionCharts Free is completely free to OEM and distributed with your open or …
-Send us an email at [email protected] with the following information:
-Your company name & address
-Name and description of your product with which you'll be re-distributing "Fus…
-Mention "FusionCharts Free" with relevant link back to www.fusioncharts.com/fr…
-We would also appreciate a link back from your product website to our website …
-
-h3. AS-IS DISTRIBUTION
-
-InfoSoft Global allows and encourages 3rd parties to distribute and make as ma…
-Exact copies of the complete software package, and that it is unmodified and i…
-The Software may not be made available on any site, CD-ROM, or with any packag…
-Nothing may be charged for the software other than a nominal fee for the distr…
-You must disclose that this product is copyrighted by InfoSoft Global
-You must not represent in any way that you are selling the software itself
-
-InfoSoft Global would be thankful to be notified of your distribution efforts:…
-
-h3. RESTRICTIONS
-
-You agree not to modify, adapt, translate, reverse engineer, decompile, disass…
-
-h3. OWNERSHIP & COPYRIGHT
-
-The Software is owned by InfoSoft Global and is protected by international cop…
-
-h3. WARRANTY
-
-InfoSoft Global expressly disclaims any warranty for the software. THE SOFTWAR…
-
-h3. INDEMNIFICATION
-
-You hereby imdemnify and hold harmless InfoSoft Global and its affiliates agai…
-
-h3. TERM AND TERMINATION.
-
-This Agreement shall commence on the Effective Date of installation of softwar…
-\ No newline at end of file
diff --git a/web/vendor/plugins/ezgraphix/README.textile b/web/vendor/plugins/e…
@@ -1,157 +0,0 @@
-h2. EZGraphix
-
-h3. Documentation
-
-"API Documentation (generated with RDoc)":http://ezgraphix.rubyforge.org
-
-h3. Demo
-
-"Online Demo (hosted by Heroku)":http://ezgraphixdemo.heroku.com/
-
-h3. Installation Notes
-
-<b>Install the plugin:</b>
-
-<pre>script/plugin install git://github.com/jpemberthy/ezgraphix.git</pre>
-
-<b>Run the tasks:</b> (it will move the necessary files to use the plugin)
-
-<pre>rake ezgraphix:setup # run from your project's root </pre>
-
-After the installation <b>include the FusionCharts.js</b> in each layout that …
-
-<pre><%= javascript_include_tag "FusionCharts" %></pre>
-
-and that's it!.
-
-h3. Usage
-
-<b> In your Controller: </b>
-
-For single series charts:
-
-<pre>
-def index
- @g = Ezgraphix::Graphic.new
- @g.data = {:ruby => 1, :perl => 2, :smalltalk => 3}
-end
-</pre>
-
-or you can specify the data directly in the constructor:
-
-<pre>
-def index
- @g = Ezgraphix::Graphic.new(:data => {:ruby => 1, :perl => 2, :smalltalk => …
-end
-</pre>
-
-
-For multiseries charts:
-
-In this case you have multiple values for each serie. Also you need to specify…
-
-<pre>
-def index
- @g = Ezgraphix::Graphic.new(:c_type => 'mscol3d')
- @g.data = { "Registrations" => [4,2,12,7,0,3,6], "Payments" => [7,3,5,2,1,0,…
- @g.labels = ["March", "April", "May", "June", "July", "August", "September"]
-end
-</pre>
-
-You can also pass the data collection to the constructor:
-
-<pre>
- @g = Ezgraphix::Graphic.new(:data => {:ruby => 1, :perl => 2, :smalltalk => …
-</pre>
-
-There are 2 ways to <b> pass render options: </b>
-
-<b>1.</b> When the Graphic object is created, you can define it also as:
-
-<pre>@g = Ezgraphix::Graphic.new(:w => 200, :h => 300, :c_type => 'bar3d', :di…
-
-The defaults are: <pre>{:c_type => 'col3d', :w => 300, :h => 300, :div_name =>…
-At the moment, you can render the following graphics:
-
-<b> Single Series </b>
-
-<pre>
-Column 2D => :c_type => 'col2d'
-Column 3D => :c_type => 'col3d'
-Bar 2D => :c_type => 'bar2d'
-Pie 2D => :c_type => 'pie2d'
-Pie 3D => :c_type => 'pie3d'
-Line => :c_type => 'line'
-Doughnut 2D => :c_type => 'doug2d'
-</pre>
-
-<b> Multi Series </b>
-
-<pre>
-MultiSeriesLine => :ctype => 'msline'
-MultiSeriesColumn3D => :ctype => 'mscol3d'
-MultiSeriesColumn2D => :ctype => 'mscol2d'
-MultiSeriesArea2D => :ctype => 'msarea2d'
-MultiSeriesBar2D => :ctype => 'msbar2d'
-</pre>
-
-<b>2.</b> Anytime you want, by accessing the render_options attribute.
-
-<pre>@g.render_options(:caption => 'cool languages', :w => 400) #Merges new o…
-
-<b> In your view. </b>
-
-Add the following line wherever you want to render the graphic.
-
-<pre><%= render_ezgraphix @g %></pre>
-
-or just
-
-<pre><%= @g %></pre>
-
-<b> Tests </b>
-
-<pre> rake spec #run from the plugin's </pre>
-
-<b> Note.</b>
-
-Full set of render_options are specified in the rdoc, and <b>more chart's supp…
-
-<b> Pending </b>
-
-Full and detailed specs.
-
-h3. EZGraphix
-
-A Ruby gem to generate flash based graphics for rails applications using a fre…
-
-Copyright (c) 2008 Juan Esteban Pemberthy, released under the MIT License.
-
-EzGraphix uses FusionCharts Free, It's license is specified in the FusionChart…
-
-Fork and feel free to contribute!
-
-h3. LICENSE:
-
-(The MIT License)
-
-Copyright (c) 2008 Juan Esteban Pemberthy
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/web/vendor/plugins/ezgraphix/init.rb b/web/vendor/plugins/ezgraphi…
@@ -1,2 +0,0 @@
-require 'ezgraphix'
-ActionView::Base.send :include, EzgraphixHelper
-\ No newline at end of file
diff --git a/web/vendor/plugins/ezgraphix/lib/ezgraphix.rb b/web/vendor/plugins…
@@ -1,199 +0,0 @@
-# == ezgraphix.rb
-# This file contains the Ezgraphix module, and the Ezgraphix::Graphic class.
-#
-# == Summary
-# A rails plugin to generate flash based graphics
-# for rails applications using a free and customizable chart's set.
-#
-# == Installation
-# Instructions are listed in the respository's README[http://github.com/jpembe…
-#
-# == Online demo
-# Online demo[http://ezgraphixdemo.heroku.com/] Hosted by Heroku!
-#
-# == Contact
-#
-# Author:: Juan E Pemberthy
-# Mail:: [email protected]
-# Copyright:: Copyright (c) 2008
-# License:: Distributes under MIT License.
-
-unless defined? Ezgraphix
- module Ezgraphix
- require File.dirname(__FILE__) + '/ezgraphix/ezgraphix_helper'
- require 'builder'
-
- # This class contains the neccesary methods and attributes to render a Grap…
- # most of time you will be playing with the render_options and _data_ attri…
- # define the graphic's properties, also you can re-define those properties …
- # at any time.
- #
- # == Example
- # Define the Graphic in your controller.
- # @g = Ezgraphix::Graphic.new # render_options can also be passed from h…
- # # @g = Ezgraphix::Graphic.new(:div_name =>…
- #
- # @g.defaults
- # => {:c_type=>'col3d', :div_name=>'ez_graphic', :w=>300, :h=>300}
- #
- # @g.render_options #equals to defaults if not options were passed to the…
- # => {:c_type=>'col3d', :div_name=>'ez_graphic', :w=>300, :h=>300}
- #
- # It's always a good idea to change the div_name if your planning to render…
- # than one Graphic in the same page, this makes the graphic unique.
- # @g.render_options(:div_name => 'my_graph')
- # => {:c_type=>'col3d', :div_name=>'my_graph', :w=>300, :h=>300}
- #
- # In order to render, you have to feed the graphic with data you want to sh…
- # a Hash to represent that data where the keys represents names, for exampl…
- # @g.data = {:ruby => 1, :perl => 2, :smalltalk => 3}
- # => {:smalltalk => 3, :ruby => 1, :perl => 2}
- #
- # With this information, the graphic will be a column 3D, with a size of 30…
- # "my_graph" name, with 3 columns containing the names: 'ruby', 'perl', and…
- #
- # To render the graphic, from a view call the render_ezgraphix method defin…
- # <%= render_ezgraphix @g %>
- #
- class Graphic
- include EzgraphixHelper
-
- #Hash containing the names and values to render.
- attr_accessor :data
-
- # Array containing the categories to render multi series charts
- attr_accessor :labels
-
- # Hash containing all the render options. basic options are:
- # * <tt> :c_type</tt> -- Chart type to render.
- # * <tt> :div_name</tt> -- Name for the graphic, should be unique.
- # * <tt> :w </tt> -- Width in pixels.
- # * <tt> :h </tt> -- Height in pixels.
- # Full list of options are listed below render_options
- attr_accessor :render_options
-
- COLORS = ['AFD8f6', '8E468E', '588526', 'B3A000', 'B2FF66',
- 'F984A1', 'A66EDD', 'B20000', '3300CC', '000033',
- '66FF33', '000000', 'FFFF00', '669966', 'FF3300',
- 'F19CBB', '9966CC', '00FFFF', '4B5320', '007FFF',
- '0000FF', '66FF00', 'CD7F32', '964B00', 'CC5500']
-
- #Creates a new Graphic with the given _options_, if no _options_ are spe…
- #the new Graphic will be initalized with the Graphic#defaults options.
- def initialize(options={})
- @render_options = defaults.merge!(options)
- @data = options[:data] || Hash.new
- end
-
- #Returns defaults render options.
- def defaults
- {:c_type => 'col3d', :w => 300, :h => 300, :div_name => 'ez_graphic'}
- end
-
- # Receives a Hash containing a set of render options that will be merged…
- #
- # ==== Options
- # Basics:
- # * <tt>:c_type</tt></tt> -- Chart type to render, default: "col3d" for …
- # :c_type => "col3d"
- # :c_type => "bar3d" #Bar3D
- # :c_type => "bar2d" #Bar2D
- # :c_type => "pie2d" #Pie2D
- # :c_type => "pie3D" #Pie3D
- # :c_type => "line" #Line
- # :c_type => "doug2d" #Doughnut2D
- # * <tt>:div_name</tt></tt> -- Name for the graphic, would be unique, de…
- # * <tt>:w</tt></tt> -- Width in pixels, default: 300
- # * <tt>:h</tt></tt> -- Height in pixels, default: 300
- # * <tt> :caption</tt> -- Graphic's caption, default: ""
- # * <tt> :subcaption</tt> -- Graphic's subcaption, default: ""
- # * <tt> :y_name</tt> -- Y axis name, default: ""
- # * <tt> :x_name</tt> -- X axis name, default: ""
- # Numbers:
- # * <tt> :prefix</tt> -- Prefix to values defined in the _data_ attribut…
- # :prefix => "$" or :prefix => "€"
- # * <tt> :precision</tt> -- Number of decimal places to which all number…
- # * <tt> :f_number</tt> -- Format number. if set to 0, numbers will not …
- # * <tt> :d_separator</tt> -- Decimal Separator, default: "."
- # * <tt> :t_separator</tt> -- Thousand Separator, default: ","
- # Design:
- # * <tt> :background</tt> -- Background Color
- # * <tt> :names</tt> -- Hide/Show(0/1) labels names, default: 1
- # * <tt> :values</tt> -- Hide/Show(0/1) Values, default: 1
- # * <tt> :limits</tt> -- Hide/Show(0/1) Limits.
- #
- def render_options(options={})
- @render_options.merge!(options)
- end
-
- #Returns the Graphic's type.
- def c_type
- self.render_options[:c_type]
- end
-
- #Returns the Graphic's width.
- def w
- self.render_options[:w]
- end
-
- #Returns the Graphic's height.
- def h
- self.render_options[:h]
- end
-
- #Returns the div's tag name would be unique if you want to render multip…
- def div_name
- self.render_options[:div_name]
- end
-
-
- #Returns a random color from the Graphic#COLORS collection.
- def rand_color
- @available_colors = COLORS.clone if @available_colors.to_a.empty?
- @available_colors.delete_at rand(@available_colors.size)
- end
-
- #Builds the xml to feed the chart.
- def to_xml
- options = parse_options(self.render_options)
- g_xml = Builder::XmlMarkup.new
- #For single series charts
- if ["area2d"].include? self.c_type
- # These graphics should be one color only
- escaped_xml = g_xml.graph(options) do
- self.data.each{ |k,v|
- g_xml.set :value => v, :name => k
- }
- end
- elsif !['msline', 'mscol2d', 'msbar2d', 'mscol3d'].include?(self.c_typ…
- escaped_xml = g_xml.graph(options) do
- self.data.each{ |k,v|
- g_xml.set :value => v, :name => k, :color => self.rand_color
- }
- end
- else
- #For multiseries charts
- escaped_xml = g_xml.graph(options) do
- g_xml.categories do
- for label in self.labels
- g_xml.category :name => label
- end
- end
- for d in self.data
- g_xml.dataset(:color => self.rand_color, :seriesName => d.first …
- d[1].each do |v|
- g_xml.set :value => v
- end
- end
- end
- end
- end
- escaped_xml.gsub("\"", "'")
- end
-
- def to_s
- render_ezgraphix self
- end
- end
- end
-end
diff --git a/web/vendor/plugins/ezgraphix/lib/ezgraphix/ezgraphix_helper.rb b/w…
@@ -1,107 +0,0 @@
-module EzgraphixHelper
- #method used in ActionView::Base to render graphics.
- def render_ezgraphix(g)
- result = ""
- html = Builder::XmlMarkup.new(:target => result)
- html.div("test", :id => g.div_name)
- html = Builder::XmlMarkup.new(:target => result)
- html.script(:type => 'text/javascript') do
- html << "var ezChart = new FusionCharts('#{f_type(g.c_type)}','#{g.div_n…
- html << "ezChart.setDataXML(\"#{g.to_xml}\");\n" unless g.data.is_a?(Str…
- html << "ezChart.setDataURL(\"#{g.data}\");\n" if g.data.is_a?(String)
- html << "ezChart.render(\"#{g.div_name}\");\n"
- end
- result
- end
-
- def f_type(c_type)
- case c_type
- when 'area2d'
- '/FusionCharts/FCF_Area2D.swf'
- when 'col3d'
- '/FusionCharts/FCF_Column3D.swf'
- when 'bar2d'
- '/FusionCharts/FCF_Bar2D.swf'
- when 'barline3d'
- '/FusionCharts/FCF_MSColumn3DLineDY.swf'
- when 'col2d'
- '/FusionCharts/FCF_Column2D.swf'
- when 'pie2d'
- '/FusionCharts/FCF_Pie2D.swf'
- when 'pie3d'
- '/FusionCharts/FCF_Pie3D.swf'
- when 'line'
- '/FusionCharts/FCF_Line.swf'
- when 'doug2d'
- '/FusionCharts/FCF_Doughnut2D.swf'
- when 'msline'
- '/FusionCharts/FCF_MSLine.swf'
- when 'mscol3d'
- '/FusionCharts/FCF_MSColumn3D.swf'
- when 'mscol2d'
- '/FusionCharts/FCF_MSColumn2D.swf'
- when 'msarea2d'
- '/FusionCharts/FCF_MSArea2D.swf'
- when 'msbar2d'
- '/FusionCharts/FCF_MSBar2D.swf'
- end
- end
-
- def parse_options(options)
- original_names = Hash.new
-
- options.each{|k,v|
- case k
- when :animation
- original_names['animation'] = v
- when :y_name
- original_names['yAxisName'] = v
- when :caption
- original_names['caption'] = v
- when :subcaption
- original_names['subCaption'] = v
- when :prefix
- original_names['numberPrefix'] = v
- when :precision
- original_names['decimalPrecision'] = v
- when :div_line_precision
- original_names['divlinedecimalPrecision'] = v
- when :limits_precision
- original_names['limitsdecimalPrecision'] = v
- when :f_number
- original_names['formatNumber'] = v
- when :f_number_scale
- original_names['formatNumberScale'] = v
- when :rotate
- original_names['rotateNames'] = v
- when :background
- original_names['bgColor'] = v
- when :line
- original_names['lineColor'] = v
- when :names
- original_names['showNames'] = v
- when :values
- original_names['showValues'] = v
- when :limits
- original_names['showLimits'] = v
- when :y_lines
- original_names['numdivlines'] = v
- when :p_y
- original_names['parentYAxis'] = v
- when :d_separator
- original_names['decimalSeparator'] = v
- when :t_separator
- original_name['thousandSeparator'] = v
- when :left_label_name
- original_names['PYAxisName'] = v
- when :right_label_name
- original_names['SYAxisName'] = v
- when :x_name
- original_names['xAxisName'] = v
- when :show_column_shadow
- original_names['showColumnShadow'] = v
- end
- }
- original_names
- end
-end
diff --git a/web/vendor/plugins/ezgraphix/lib/tasks/ezgraphix_tasks.rake b/web/…
@@ -1,19 +0,0 @@
- namespace :ezgraphix do
- task :dir_setup do
- Dir.mkdir("#{RAILS_ROOT}/public/FusionCharts", 0700)
- puts "Created FusionCharts directory in public/"
- end
-
- task :cp_charts do
- FileUtils.cp_r("#{RAILS_ROOT}/vendor/plugins/ezgraphix/public/FusionChar…
- puts "Charts copied."
- end
-
- task :cp_javascript do
- FileUtils.cp_r("#{RAILS_ROOT}/vendor/plugins/ezgraphix/public/javascript…
- puts "FusionCharts.js copied"
- end
-
- desc "Creates and copies all necessary files in order to use ezgraphix!"
- task :setup => [:dir_setup, :cp_charts, :cp_javascript]
- end
-\ No newline at end of file
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_Area2D.swf b/…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_Bar2D.swf b/w…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_Candlestick.s…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_Column2D.swf …
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_Column3D.swf …
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_Doughnut2D.sw…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_Funnel.swf b/…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_Gantt.swf b/w…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_Line.swf b/we…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_MSArea2D.swf …
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_MSBar2D.swf b…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_MSColumn2D.sw…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_MSColumn2DLin…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_MSColumn3D.sw…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_MSColumn3DLin…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_MSLine.swf b/…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_Pie2D.swf b/w…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_Pie3D.swf b/w…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_StackedArea2D…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_StackedBar2D.…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_StackedColumn…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/FusionCharts/FCF_StackedColumn…
Binary files differ.
diff --git a/web/vendor/plugins/ezgraphix/public/javascripts/FusionCharts.js b/…
@@ -1,361 +0,0 @@
-/**
- * FusionCharts: Flash Player detection and Chart embedding.
- * Version 1.2.3F ( 22 November 2008) - Specialized for FusionChartsFREE
- * Checking Flash Version >=6 and adde…
- * Version: 1.2.3 (1st September, 2008) - Added Fix for % and & characters, sc…
- * Version: 1.2.2 (10th July, 2008) - Added Fix for % scaled dimensions, fixes…
- * Version: 1.2.1 (21st December, 2007) - Added setting up Transparent/opaque …
- * Version: 1.2 (1st November, 2007) - Added FORM fixes for IE
- * Version: 1.1 (29th June, 2007) - Added Player detection, New conditional fi…
- *
- * Morphed from SWFObject (http://blog.deconcept.com/swfobject/) under MIT Lic…
- * http://www.opensource.org/licenses/mit-license.php
- *
- */
-if(typeof infosoftglobal == "undefined") var infosoftglobal = new Object();
-if(typeof infosoftglobal.FusionChartsUtil == "undefined") infosoftglobal.Fusio…
-infosoftglobal.FusionCharts = function(swf, id, w, h, debugMode, registerWithJ…
- if (!document.getElementById) { return; }
-
- //Flag to see whether data has been set initially
- this.initialDataSet = false;
-
- //Create container objects
- this.params = new Object();
- this.variables = new Object();
- this.attributes = new Array();
-
- //Set attributes for the SWF
- if(swf) { this.setAttribute('swf', swf); }
- if(id) { this.setAttribute('id', id); }
-
- w=w.toString().replace(/\%$/,"%25");
- if(w) { this.setAttribute('width', w); }
- h=h.toString().replace(/\%$/,"%25");
- if(h) { this.setAttribute('height', h); }
-
-
- //Set background color
- if(c) { this.addParam('bgcolor', c); }
-
- //Set Quality
- this.addParam('quality', 'high');
-
- //Add scripting access parameter
- this.addParam('allowScriptAccess', 'always');
-
- //Pass width and height to be appended as chartWidth and chartHeight
- this.addVariable('chartWidth', w);
- this.addVariable('chartHeight', h);
-
- //Whether in debug mode
- debugMode = debugMode ? debugMode : 0;
- this.addVariable('debugMode', debugMode);
- //Pass DOM ID to Chart
- this.addVariable('DOMId', id);
- //Whether to registed with JavaScript
- registerWithJS = registerWithJS ? registerWithJS : 0;
- this.addVariable('registerWithJS', registerWithJS);
-
- //Scale Mode of chart
- scaleMode = scaleMode ? scaleMode : 'noScale';
- this.addVariable('scaleMode', scaleMode);
-
- //Application Message Language
- lang = lang ? lang : 'EN';
- this.addVariable('lang', lang);
-
- //Whether to auto detect and re-direct to Flash Player installation
- this.detectFlashVersion = detectFlashVersion?detectFlashVersion:1;
- this.autoInstallRedirect = autoInstallRedirect?autoInstallRedirect:1;
-
- //Ger Flash Player version
- this.installedVer = infosoftglobal.FusionChartsUtil.getPlayerVersion();
-
- if (!window.opera && document.all && this.installedVer.major > 7) {
- // Only add the onunload cleanup if the Flash Player version s…
- infosoftglobal.FusionCharts.doPrepUnload = true;
- }
-}
-
-infosoftglobal.FusionCharts.prototype = {
- setAttribute: function(name, value){
- this.attributes[name] = value;
- },
- getAttribute: function(name){
- return this.attributes[name];
- },
- addParam: function(name, value){
- this.params[name] = value;
- },
- getParams: function(){
- return this.params;
- },
- addVariable: function(name, value){
- this.variables[name] = value;
- },
- getVariable: function(name){
- return this.variables[name];
- },
- getVariables: function(){
- return this.variables;
- },
- getVariablePairs: function(){
- var variablePairs = new Array();
- var key;
- var variables = this.getVariables();
- for(key in variables){
- variablePairs.push(key +"="+ variables[key]);
- }
- return variablePairs;
- },
- getSWFHTML: function() {
- var swfNode = "";
- if (navigator.plugins && navigator.mimeTypes && navigator.mime…
- // netscape plugin architecture
- swfNode = '<embed type="application/x-shockwave-flash"…
- swfNode += ' id="'+ this.getAttribute('id') +'" name="…
- var params = this.getParams();
- for(var key in params){ swfNode += [key] +'="'+ param…
- var pairs = this.getVariablePairs().join("&");
- if (pairs.length > 0){ swfNode += 'flashvars="'+ pair…
- swfNode += '/>';
- } else { // PC IE
- swfNode = '<object id="'+ this.getAttribute('id') +'" …
- swfNode += '<param name="movie" value="'+ this.getAttr…
- var params = this.getParams();
- for(var key in params) {
- swfNode += '<param name="'+ key +'" value="'+ params[…
- }
- var pairs = this.getVariablePairs().join("&"); …
- if(pairs.length > 0) {swfNode += '<param name="flashva…
- swfNode += "</object>";
- }
- return swfNode;
- },
- setDataURL: function(strDataURL){
- //This method sets the data URL for the chart.
- //If being set initially
- if (this.initialDataSet==false){
- this.addVariable('dataURL',strDataURL);
- //Update flag
- this.initialDataSet = true;
- }else{
- //Else, we update the chart data using External Interf…
- //Get reference to chart object
- var chartObj = infosoftglobal.FusionChartsUtil.getChar…
-
- if (!chartObj.setDataURL)
- {
- __flash__addCallback(chartObj, "setDataURL");
- }
-
- chartObj.setDataURL(strDataURL);
- }
- },
- //This function :
- //fixes the double quoted attributes to single quotes
- //Encodes all quotes inside attribute values
- //Encodes % to %25 and & to %26;
- encodeDataXML: function(strDataXML){
-
- var regExpReservedCharacters=["\\$","\\+"];
- var arrDQAtt=strDataXML.match(/=\s*\".*?\"/g);
- if (arrDQAtt){
- for(var i=0;i<arrDQAtt.length;i++){
- var repStr=arrDQAtt[i].replace(/^=\s*\…
- repStr=repStr.replace(/\'/g,"%26apos;"…
- var strTo=strDataXML.indexOf(arrDQAtt[…
- var repStrr="='"+repStr+"'";
- var strStart=strDataXML.substring(0,st…
- var strEnd=strDataXML.substring(strTo+…
- var strDataXML=strStart+repStrr+strEnd;
- }
- }
-
- strDataXML=strDataXML.replace(/\"/g,"%26quot;");
- strDataXML=strDataXML.replace(/%(?![\da-f]{2}|[\da-f]{…
- strDataXML=strDataXML.replace(/\&/g,"%26");
-
- return strDataXML;
-
- },
- setDataXML: function(strDataXML){
- //If being set initially
- if (this.initialDataSet==false){
- //This method sets the data XML for the chart INITIALL…
- this.addVariable('dataXML',this.encodeDataXML(strDataX…
- //Update flag
- this.initialDataSet = true;
- }else{
- //Else, we update the chart data using External Interf…
- //Get reference to chart object
- var chartObj = infosoftglobal.FusionChartsUtil.getChar…
- chartObj.setDataXML(strDataXML);
- }
- },
- setTransparent: function(isTransparent){
- //Sets chart to transparent mode when isTransparent is true (d…
- //When no parameter is passed, we assume transparent to be tru…
- if(typeof isTransparent=="undefined") {
- isTransparent=true;
- }
- //Set the property
- if(isTransparent)
- this.addParam('WMode', 'transparent');
- else
- this.addParam('WMode', 'Opaque');
- },
-
- render: function(elementId){
- //First check for installed version of Flash Player - we need …
- if((this.detectFlashVersion==1) && (this.installedVer.major < …
- if (this.autoInstallRedirect==1){
- //If we can auto redirect to install the playe…
- var installationConfirm = window.confirm("You …
- if (installationConfirm){
- window.location = "http://www.adobe.co…
- }else{
- return false;
- }
- }else{
- //Else, do not take an action. It means the de…
- //So, expect the developers to provide a cours…
- //window.alert("You need Adobe Flash Player 8 …
- return false;
- }
- }else{
- //Render the chart
- var n = (typeof elementId == 'string') ? document.getE…
- n.innerHTML = this.getSWFHTML();
-
- //Added <FORM> compatibility
- //Check if it's added in Mozilla embed array or if alr…
- if(!document.embeds[this.getAttribute('id')] && !windo…
- window[this.getAttribute('id')]=document.getElem…
- //or else document.forms[formName/formIndex][c…
- return true;
- }
- }
-}
-
-/* ---- detection functions ---- */
-infosoftglobal.FusionChartsUtil.getPlayerVersion = function(){
- var PlayerVersion = new infosoftglobal.PlayerVersion([0,0,0]);
- if(navigator.plugins && navigator.mimeTypes.length){
- var x = navigator.plugins["Shockwave Flash"];
- if(x && x.description) {
- PlayerVersion = new infosoftglobal.PlayerVersion(x.des…
- }
- }else if (navigator.userAgent && navigator.userAgent.indexOf("Windows …
- //If Windows CE
- var axo = 1;
- var counter = 3;
- while(axo) {
- try {
- counter++;
- axo = new ActiveXObject("ShockwaveFlash.Shockw…
- PlayerVersion = new infosoftglobal.PlayerVersi…
- } catch (e) {
- axo = null;
- }
- }
- } else {
- // Win IE (non mobile)
- // Do minor version lookup in IE, but avoid Flash Player 6 cra…
- try{
- var axo = new ActiveXObject("ShockwaveFlash.ShockwaveF…
- }catch(e){
- try {
- var axo = new ActiveXObject("ShockwaveFlash.Sh…
- PlayerVersion = new infosoftglobal.PlayerVersi…
- axo.AllowScriptAccess = "always"; // error if …
- } catch(e) {
- if (PlayerVersion.major == 6) {
- return PlayerVersion;
- }
- }
- try {
- axo = new ActiveXObject("ShockwaveFlash.Shockw…
- } catch(e) {}
- }
- if (axo != null) {
- PlayerVersion = new infosoftglobal.PlayerVersion(axo.G…
- }
- }
- return PlayerVersion;
-}
-infosoftglobal.PlayerVersion = function(arrVersion){
- this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
- this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
- this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
-}
-// ------------ Fix for Out of Memory Bug in IE in FP9 ---------------//
-/* Fix for video streaming bug */
-infosoftglobal.FusionChartsUtil.cleanupSWFs = function() {
- var objects = document.getElementsByTagName("OBJECT");
- for (var i = objects.length - 1; i >= 0; i--) {
- objects[i].style.display = 'none';
- for (var x in objects[i]) {
- if (typeof objects[i][x] == 'function') {
- objects[i][x] = function(){};
- }
- }
- }
-}
-// Fixes bug in fp9
-if (infosoftglobal.FusionCharts.doPrepUnload) {
- if (!infosoftglobal.unloadSet) {
- infosoftglobal.FusionChartsUtil.prepUnload = function() {
- __flash_unloadHandler = function(){};
- __flash_savedUnloadHandler = function(){};
- window.attachEvent("onunload", infosoftglobal.FusionCh…
- }
- window.attachEvent("onbeforeunload", infosoftglobal.FusionChar…
- infosoftglobal.unloadSet = true;
- }
-}
-/* Add document.getElementById if needed (mobile IE < 5) */
-if (!document.getElementById && document.all) { document.getElementById = func…
-/* Add Array.push if needed (ie5) */
-if (Array.prototype.push == null) { Array.prototype.push = function(item) { th…
-
-/* Function to return Flash Object from ID */
-infosoftglobal.FusionChartsUtil.getChartObject = function(id)
-{
- var chartRef=null;
- if (navigator.appName.indexOf("Microsoft Internet")==-1) {
- if (document.embeds && document.embeds[id])
- chartRef = document.embeds[id];
- else
- chartRef = window.document[id];
- }
- else {
- chartRef = window[id];
- }
- if (!chartRef)
- chartRef = document.getElementById(id);
-
- return chartRef;
-}
-/*
- Function to update chart's data at client side (FOR FusionCharts vFREE and 2.x
-*/
-infosoftglobal.FusionChartsUtil.updateChartXML = function(chartId, strXML){
- //Get reference to chart object
- var chartObj = infosoftglobal.FusionChartsUtil.getChartObject(chartId)…
- //Set dataURL to null
- chartObj.SetVariable("_root.dataURL","");
- //Set the flag
- chartObj.SetVariable("_root.isNewData","1");
- //Set the actual data
- chartObj.SetVariable("_root.newData",strXML);
- //Go to the required frame
- chartObj.TGotoLabel("/", "JavaScriptHandler");
-}
-
-
-/* Aliases for easy usage */
-var getChartFromId = infosoftglobal.FusionChartsUtil.getChartObject;
-var updateChartXML = infosoftglobal.FusionChartsUtil.updateChartXML;
-var FusionCharts = infosoftglobal.FusionCharts;
-\ No newline at end of file
diff --git a/web/vendor/plugins/ezgraphix/spec/ezgraphix_spec.rb b/web/vendor/p…
@@ -1,85 +0,0 @@
-#using rspec 1.1.11
-require 'rubygems'
-require 'spec'
-require File.dirname(__FILE__) + '/../lib/ezgraphix'
-require File.dirname(__FILE__) + '/../lib/ezgraphix/ezgraphix_helper'
-
-include EzgraphixHelper
-include Ezgraphix
-
-describe Graphic do
-
- before do
- @g = Graphic.new
- end
-
- it do
- @g.should be_an_instance_of(Graphic)
- end
-
- it do
- @g.should have(4).defaults
- end
-
- it "should have right defaults" do
- @g.defaults.values_at(:c_type, :w, :h, :div_name).should == ['col3d', 300,…
- end
-
- before do
- @g = Graphic.new(:c_type => 'bar2d', :w => 200, :caption => 'ezgraphix spe…
- end
-
- it "should merge defaults and options" do
- @g.render_options.values_at(:c_type, :w, :h, :div_name, :caption).should =…
- end
-
- it "should have chart type, width, height and div_name" do
- @g.c_type.should == 'bar2d'
- @g.w.should == 200
- @g.h.should == 300
- @g.div_name.should == 'ez_graphic'
- end
-
- it "should have colors" do
- Graphic::COLORS.should_not be_empty
- end
-
- it "should have valid colors" do
- @g.rand_color.should be_instance_of(String)
- @g.rand_color.length.should == 6
- end
-
- specify "colors should not repeat" do
- Graphic::COLORS.inject([]){|used, color| used << @g.rand_color}.uniq.count…
- end
-
- before do
- @g.data = {:ruby => 1, :perl => 2, :smalltalk => 3}
- end
-
- it "should have valid data" do
- @g.data.values_at(:ruby, :perl, :smalltalk).should == [1,2,3]
- end
-
- before do
- @g.render_options(:y_name => 'score')
- end
-
- it "should update render options" do
- @g.render_options.values_at(:c_type, :w, :h, :div_name, :caption, :y_name…
- end
-
- it "should parse render options" do
- parsed = parse_options(@g.render_options)
- parsed.values_at('caption', 'yAxisName').should == ['ezgraphix spec', 'sco…
- end
-
- it "should have original filename/location" do
- f_type(@g.c_type).should == '/FusionCharts/FCF_Bar2D.swf'
- end
-
- it "should have style" do
- get_style(@g).should == 'render_simple'
- end
-
-end
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.