");return this.tooltipOptions&&this.tooltipOptions.cssClass&&(b=a("."+this.tooltipOptions.cssClass),0===b.length&&(b=a("
").addClass(this.tooltipOptions.cssClass),b.appendTo("body").hide().css({position:"absolute"}),this.tooltipOptions.defaultTheme&&b.css({background:"#fff","z-index":"1040",padding:"0.4em 0.6em","border-radius":"0.5em","font-size":"0.8em",border:"1px solid #111",display:"none","white-space":"nowrap"}))),b},c.prototype.stringFormat=function(a,b){var c,d,e,f,g,h=/%p\.{0,1}(\d{0,})/,i=/%s/,j=/%c/,k=/%lx/,l=/%ly/,m=/%x\.{0,1}(\d{0,})/,n=/%y\.{0,1}(\d{0,})/,o="%x",p="%y",q="%ct",r="%n";if("undefined"!=typeof b.series.threshold?(c=b.datapoint[0],d=b.datapoint[1],e=b.datapoint[2]):"undefined"!=typeof b.series.curvedLines?(c=b.datapoint[0],d=b.datapoint[1]):"undefined"!=typeof b.series.lines&&b.series.lines.steps?(c=b.series.datapoints.points[2*b.dataIndex],d=b.series.datapoints.points[2*b.dataIndex+1],e=""):(c=b.series.data[b.dataIndex][0],d=b.series.data[b.dataIndex][1],e=b.series.data[b.dataIndex][2]),null===b.series.label&&b.series.originSeries&&(b.series.label=b.series.originSeries.label),"function"==typeof a&&(a=a(b.series.label,c,d,b)),"boolean"==typeof a&&!a)return"";if(e&&(a=a.replace(q,e)),"undefined"!=typeof b.series.percent?f=b.series.percent:"undefined"!=typeof b.series.percents&&(f=b.series.percents[b.dataIndex]),"number"==typeof f&&(a=this.adjustValPrecision(h,a,f)),b.series.hasOwnProperty("pie")&&"undefined"!=typeof b.series.data[0][1]&&(g=b.series.data[0][1]),"number"==typeof g&&(a=a.replace(r,g)),a="undefined"!=typeof b.series.label?a.replace(i,b.series.label):a.replace(i,""),a="undefined"!=typeof b.series.color?a.replace(j,b.series.color):a.replace(j,""),a=this.hasAxisLabel("xaxis",b)?a.replace(k,b.series.xaxis.options.axisLabel):a.replace(k,""),a=this.hasAxisLabel("yaxis",b)?a.replace(l,b.series.yaxis.options.axisLabel):a.replace(l,""),this.isTimeMode("xaxis",b)&&this.isXDateFormat(b)&&(a=a.replace(m,this.timestampToDate(c,this.tooltipOptions.xDateFormat,b.series.xaxis.options))),this.isTimeMode("yaxis",b)&&this.isYDateFormat(b)&&(a=a.replace(n,this.timestampToDate(d,this.tooltipOptions.yDateFormat,b.series.yaxis.options))),"number"==typeof c&&(a=this.adjustValPrecision(m,a,c)),"number"==typeof d&&(a=this.adjustValPrecision(n,a,d)),"undefined"!=typeof b.series.xaxis.ticks){var s;s=this.hasRotatedXAxisTicks(b)?"rotatedTicks":"ticks";var t=b.dataIndex+b.seriesIndex;for(var u in b.series.xaxis[s])if(b.series.xaxis[s].hasOwnProperty(t)&&!this.isTimeMode("xaxis",b)){var v=this.isCategoriesMode("xaxis",b)?b.series.xaxis[s][t].label:b.series.xaxis[s][t].v;v===c&&(a=a.replace(m,b.series.xaxis[s][t].label.replace(/\$/g,"$$$$")))}}if("undefined"!=typeof b.series.yaxis.ticks)for(var w in b.series.yaxis.ticks)if(b.series.yaxis.ticks.hasOwnProperty(w)){var x=this.isCategoriesMode("yaxis",b)?b.series.yaxis.ticks[w].label:b.series.yaxis.ticks[w].v;x===d&&(a=a.replace(n,b.series.yaxis.ticks[w].label.replace(/\$/g,"$$$$")))}return"undefined"!=typeof b.series.xaxis.tickFormatter&&(a=a.replace(o,b.series.xaxis.tickFormatter(c,b.series.xaxis).replace(/\$/g,"$$"))),"undefined"!=typeof b.series.yaxis.tickFormatter&&(a=a.replace(p,b.series.yaxis.tickFormatter(d,b.series.yaxis).replace(/\$/g,"$$"))),a},c.prototype.isTimeMode=function(a,b){return"undefined"!=typeof b.series[a].options.mode&&"time"===b.series[a].options.mode},c.prototype.isXDateFormat=function(a){return"undefined"!=typeof this.tooltipOptions.xDateFormat&&null!==this.tooltipOptions.xDateFormat},c.prototype.isYDateFormat=function(a){return"undefined"!=typeof this.tooltipOptions.yDateFormat&&null!==this.tooltipOptions.yDateFormat},c.prototype.isCategoriesMode=function(a,b){return"undefined"!=typeof b.series[a].options.mode&&"categories"===b.series[a].options.mode},c.prototype.timestampToDate=function(b,c,d){var e=a.plot.dateGenerator(b,d);return a.plot.formatDate(e,c,this.tooltipOptions.monthNames,this.tooltipOptions.dayNames)},c.prototype.adjustValPrecision=function(a,b,c){var d,e=b.match(a);return null!==e&&""!==RegExp.$1&&(d=RegExp.$1,c=c.toFixed(d),b=b.replace(a,c)),b},c.prototype.hasAxisLabel=function(b,c){return-1!==a.inArray("axisLabels",this.plotPlugins)&&"undefined"!=typeof c.series[b].options.axisLabel&&c.series[b].options.axisLabel.length>0},c.prototype.hasRotatedXAxisTicks=function(b){return-1!==a.inArray("tickRotor",this.plotPlugins)&&"undefined"!=typeof b.series.xaxis.rotatedTicks};var d=function(a){new c(a)};a.plot.plugins.push({init:d,options:b,name:"tooltip",version:"0.8.5"})}(jQuery);
--------------------------------------------------------------------------------
/public/vendor/animo.js/animo.js:
--------------------------------------------------------------------------------
1 | ;(function ( $, window, document, undefined ) {
2 |
3 | /**
4 | * animo is a powerful little tool that makes managing CSS animations extremely easy. Stack animations, set callbacks, make magic.
5 | * Modern browsers and almost all mobile browsers support CSS animations (http://caniuse.com/css-animation).
6 | *
7 | * @author Daniel Raftery : twitter/ThrivingKings
8 | * @version 1.0.2
9 | */
10 | function animo( element, options, callback, other_cb ) {
11 |
12 | // Default configuration
13 | var defaults = {
14 | duration: 1,
15 | animation: null,
16 | iterate: 1,
17 | timing: "linear",
18 | keep: false
19 | };
20 |
21 | // Browser prefixes for CSS
22 | this.prefixes = ["", "-moz-", "-o-animation-", "-webkit-"];
23 |
24 | // Cache the element
25 | this.element = $(element);
26 |
27 | this.bare = element;
28 |
29 | // For stacking of animations
30 | this.queue = [];
31 |
32 | // Hacky
33 | this.listening = false;
34 |
35 | // Figure out where the callback is
36 | var cb = (typeof callback == "function" ? callback : other_cb);
37 |
38 | // Options can sometimes be a command
39 | switch(options) {
40 |
41 | case "blur":
42 |
43 | defaults = {
44 | amount: 3,
45 | duration: 0.5,
46 | focusAfter: null
47 | };
48 |
49 | this.options = $.extend( defaults, callback );
50 |
51 | this._blur(cb);
52 |
53 | break;
54 |
55 | case "focus":
56 |
57 | this._focus();
58 |
59 | break;
60 |
61 | case "rotate":
62 |
63 | defaults = {
64 | degrees: 15,
65 | duration: 0.5
66 | };
67 |
68 | this.options = $.extend( defaults, callback );
69 |
70 | this._rotate(cb);
71 |
72 | break;
73 |
74 | case "cleanse":
75 |
76 | this.cleanse();
77 |
78 | break;
79 |
80 | default:
81 |
82 | this.options = $.extend( defaults, options );
83 |
84 | this.init(cb);
85 |
86 | break;
87 | }
88 | }
89 |
90 | animo.prototype = {
91 |
92 | // A standard CSS animation
93 | init: function(callback) {
94 |
95 | var $me = this;
96 |
97 | // Are we stacking animations?
98 | if(Object.prototype.toString.call( $me.options.animation ) === '[object Array]') {
99 | $.merge($me.queue, $me.options.animation);
100 | } else {
101 | $me.queue.push($me.options.animation);
102 | }
103 |
104 | $me.cleanse();
105 |
106 | $me.animate(callback);
107 |
108 | },
109 |
110 | // The actual adding of the class and listening for completion
111 | animate: function(callback) {
112 |
113 | this.element.addClass('animated');
114 |
115 | this.element.addClass(this.queue[0]);
116 |
117 | this.element.data("animo", this.queue[0]);
118 |
119 | var ai = this.prefixes.length;
120 |
121 | // Add the options for each prefix
122 | while(ai--) {
123 |
124 | this.element.css(this.prefixes[ai]+"animation-duration", this.options.duration+"s");
125 |
126 | this.element.css(this.prefixes[ai]+"animation-iteration-count", this.options.iterate);
127 |
128 | this.element.css(this.prefixes[ai]+"animation-timing-function", this.options.timing);
129 |
130 | }
131 |
132 | var $me = this, _cb = callback;
133 |
134 | if($me.queue.length>1) {
135 | _cb = null;
136 | }
137 |
138 | // Listen for the end of the animation
139 | this._end("AnimationEnd", function() {
140 |
141 | // If there are more, clean it up and move on
142 | if($me.element.hasClass($me.queue[0])) {
143 |
144 | if(!$me.options.keep) {
145 | $me.cleanse();
146 | }
147 |
148 | $me.queue.shift();
149 |
150 | if($me.queue.length) {
151 |
152 | $me.animate(callback);
153 | }
154 | }
155 | }, _cb);
156 | },
157 |
158 | cleanse: function() {
159 |
160 | this.element.removeClass('animated');
161 |
162 | this.element.removeClass(this.queue[0]);
163 |
164 | this.element.removeClass(this.element.data("animo"));
165 |
166 | var ai = this.prefixes.length;
167 |
168 | while(ai--) {
169 |
170 | this.element.css(this.prefixes[ai]+"animation-duration", "");
171 |
172 | this.element.css(this.prefixes[ai]+"animation-iteration-count", "");
173 |
174 | this.element.css(this.prefixes[ai]+"animation-timing-function", "");
175 |
176 | this.element.css(this.prefixes[ai]+"transition", "");
177 |
178 | this.element.css(this.prefixes[ai]+"transform", "");
179 |
180 | this.element.css(this.prefixes[ai]+"filter", "");
181 |
182 | }
183 | },
184 |
185 | _blur: function(callback) {
186 |
187 | if(this.element.is("img")) {
188 |
189 | var svg_id = "svg_" + (((1 + Math.random()) * 0x1000000) | 0).toString(16).substring(1);
190 | var filter_id = "filter_" + (((1 + Math.random()) * 0x1000000) | 0).toString(16).substring(1);
191 |
192 | $('body').append('
');
193 |
194 | var ai = this.prefixes.length;
195 |
196 | while(ai--) {
197 |
198 | this.element.css(this.prefixes[ai]+"filter", "blur("+this.options.amount+"px)");
199 |
200 | this.element.css(this.prefixes[ai]+"transition", this.options.duration+"s all linear");
201 |
202 | }
203 |
204 | this.element.css("filter", "url(#"+filter_id+")");
205 |
206 | this.element.data("svgid", svg_id);
207 |
208 | } else {
209 |
210 | var color = this.element.css('color');
211 |
212 | var ai = this.prefixes.length;
213 |
214 | // Add the options for each prefix
215 | while(ai--) {
216 |
217 | this.element.css(this.prefixes[ai]+"transition", "all "+this.options.duration+"s linear");
218 |
219 | }
220 |
221 | this.element.css("text-shadow", "0 0 "+this.options.amount+"px "+color);
222 | this.element.css("color", "transparent");
223 | }
224 |
225 | this._end("TransitionEnd", null, callback);
226 |
227 | var $me = this;
228 |
229 | if(this.options.focusAfter) {
230 |
231 | var focus_wait = window.setTimeout(function() {
232 |
233 | $me._focus();
234 |
235 | focus_wait = window.clearTimeout(focus_wait);
236 |
237 | }, (this.options.focusAfter*1000));
238 | }
239 |
240 | },
241 |
242 | _focus: function() {
243 |
244 | var ai = this.prefixes.length;
245 |
246 | if(this.element.is("img")) {
247 |
248 | while(ai--) {
249 |
250 | this.element.css(this.prefixes[ai]+"filter", "");
251 |
252 | this.element.css(this.prefixes[ai]+"transition", "");
253 |
254 | }
255 |
256 | var $svg = $('#'+this.element.data('svgid'));
257 |
258 | $svg.remove();
259 | } else {
260 |
261 | while(ai--) {
262 |
263 | this.element.css(this.prefixes[ai]+"transition", "");
264 |
265 | }
266 |
267 | this.element.css("text-shadow", "");
268 | this.element.css("color", "");
269 | }
270 | },
271 |
272 | _rotate: function(callback) {
273 |
274 | var ai = this.prefixes.length;
275 |
276 | // Add the options for each prefix
277 | while(ai--) {
278 |
279 | this.element.css(this.prefixes[ai]+"transition", "all "+this.options.duration+"s linear");
280 |
281 | this.element.css(this.prefixes[ai]+"transform", "rotate("+this.options.degrees+"deg)");
282 |
283 | }
284 |
285 | this._end("TransitionEnd", null, callback);
286 |
287 | },
288 |
289 | _end: function(type, todo, callback) {
290 |
291 | var $me = this;
292 |
293 | var binding = type.toLowerCase()+" webkit"+type+" o"+type+" MS"+type;
294 |
295 | this.element.bind(binding, function() {
296 |
297 | $me.element.unbind(binding);
298 |
299 | if(typeof todo == "function") {
300 |
301 | todo();
302 | }
303 |
304 | if(typeof callback == "function") {
305 |
306 | callback($me);
307 | }
308 | });
309 |
310 | }
311 | };
312 |
313 | $.fn.animo = function ( options, callback, other_cb ) {
314 |
315 | return this.each(function() {
316 |
317 | new animo( this, options, callback, other_cb );
318 |
319 | });
320 |
321 | };
322 |
323 | })( jQuery, window, document );
324 |
--------------------------------------------------------------------------------
/public/vendor/angular-ui-grid/fontello.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Copyright (C) 2017 by original authors @ fontello.com
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/public/vendor/angular-ui-grid/ui-grid.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Copyright (C) 2016 by original authors @ fontello.com
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/public/vendor/modernizr/modernizr.custom.js:
--------------------------------------------------------------------------------
1 | /*! modernizr 3.5.0 (Custom Build) | MIT *
2 | * https://modernizr.com/download/?-backgroundsize-bgpositionshorthand-bgpositionxy-bgrepeatspace_bgrepeatround-bgsizecover-borderradius-cssanimations-csscalc-csstransforms-csstransforms3d-csstransitions-flexboxtweener-fontface-inlinesvg-localstorage-multiplebgs-preserve3d-sessionstorage-smil-svgclippaths-svgfilters-svgforeignobject-todataurljpeg_todataurlpng_todataurlwebp-setclasses !*/
3 | !function(e,t,n){function r(e,t){return typeof e===t}function s(){var e,t,n,s,a,o,i;for(var d in w)if(w.hasOwnProperty(d)){if(e=[],t=w[d],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n
c;c++)if(m=e[c],v=k.style[m],o(m,"-")&&(m=p(m)),k.style[m]!==n){if(a||r(s,"undefined"))return d(),"pfx"==t?m:!0;try{k.style[m]=s}catch(y){}if(k.style[m]!=v)return d(),"pfx"==t?m:!0}return d(),!1}function m(e,t){return function(){return e.apply(t,arguments)}}function v(e,t,n){var s;for(var a in e)if(e[a]in t)return n===!1?e[a]:(s=t[e[a]],r(s,"function")?m(s,n||t):s);return!1}function h(e,t,n,s,a){var o=e.charAt(0).toUpperCase()+e.slice(1),i=(e+" "+E.join(o+" ")+o).split(" ");return r(t,"string")||r(t,"undefined")?g(i,t,s,a):(i=(e+" "+z.join(o+" ")+o).split(" "),v(i,t,n))}function y(e,t,r){return h(e,n,n,t,r)}var w=[],S={_version:"3.5.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){w.push({name:e,fn:t,options:n})},addAsyncTest:function(e){w.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=S,Modernizr=new Modernizr;var b=[],x=t.documentElement,T="svg"===x.nodeName.toLowerCase(),C="Moz O ms Webkit",E=S._config.usePrefixes?C.split(" "):[];S._cssomPrefixes=E;var _={elem:i("modernizr")};Modernizr._q.push(function(){delete _.elem});var k={style:_.elem.style};Modernizr._q.unshift(function(){delete k.style});var z=S._config.usePrefixes?C.toLowerCase().split(" "):[];S._domPrefixes=z,S.testAllProps=h,S.testAllProps=y,Modernizr.addTest("backgroundsize",y("backgroundSize","100%",!0)),Modernizr.addTest("bgpositionshorthand",function(){var e=i("a"),t=e.style,n="right 10px bottom 10px";return t.cssText="background-position: "+n+";",t.backgroundPosition===n}),Modernizr.addTest("bgpositionxy",function(){return y("backgroundPositionX","3px",!0)&&y("backgroundPositionY","5px",!0)}),Modernizr.addTest("bgrepeatround",y("backgroundRepeat","round")),Modernizr.addTest("bgrepeatspace",y("backgroundRepeat","space")),Modernizr.addTest("bgsizecover",y("backgroundSize","cover")),Modernizr.addTest("borderradius",y("borderRadius","0px",!0)),Modernizr.addTest("cssanimations",y("animationName","a",!0));var P=S._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];S._prefixes=P,Modernizr.addTest("csscalc",function(){var e="width:",t="calc(10px);",n=i("a");return n.style.cssText=e+P.join(t+e),!!n.style.length}),Modernizr.addTest("csstransforms",function(){return-1===navigator.userAgent.indexOf("Android 2.")&&y("transform","scale(1)",!0)});var R=S.testStyles=l,N="CSS"in e&&"supports"in e.CSS,j="supportsCSS"in e;Modernizr.addTest("supports",N||j),Modernizr.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=Modernizr._config.usePrefixes;if(e&&(!t||"webkitPerspective"in x.style)){var n,r="#modernizr{width:0;height:0}";Modernizr.supports?n="@supports (perspective: 1px)":(n="@media (transform-3d)",t&&(n+=",(-webkit-transform-3d)")),n+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}",R(r+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),Modernizr.addTest("csstransitions",y("transition","all",!0)),Modernizr.addTest("flexboxtweener",y("flexAlign","end",!0));var A=function(){var e=navigator.userAgent,t=e.match(/w(eb)?osbrowser/gi),n=e.match(/windows phone/gi)&&e.match(/iemobile\/([0-9])+/gi)&&parseFloat(RegExp.$1)>=9;return t||n}();A?Modernizr.addTest("fontface",!1):R('@font-face {font-family:"font";src:url("https://")}',function(e,n){var r=t.getElementById("smodernizr"),s=r.sheet||r.styleSheet,a=s?s.cssRules&&s.cssRules[0]?s.cssRules[0].cssText:s.cssText||"":"",o=/src/i.test(a)&&0===a.indexOf(n.split(" ")[0]);Modernizr.addTest("fontface",o)}),Modernizr.addTest("inlinesvg",function(){var e=i("div");return e.innerHTML=" ","http://www.w3.org/2000/svg"==("undefined"!=typeof SVGRect&&e.firstChild&&e.firstChild.namespaceURI)}),Modernizr.addTest("localstorage",function(){var e="modernizr";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(t){return!1}}),Modernizr.addTest("multiplebgs",function(){var e=i("a").style;return e.cssText="background:url(https://),url(https://),red url(https://)",/(url\s*\(.*?){3}/.test(e.background)}),Modernizr.addTest("preserve3d",function(){var t,n,r=e.CSS,s=!1;return r&&r.supports&&r.supports("(transform-style: preserve-3d)")?!0:(t=i("a"),n=i("a"),t.style.cssText="display: block; transform-style: preserve-3d; transform-origin: right; transform: rotateY(40deg);",n.style.cssText="display: block; width: 9px; height: 1px; background: #000; transform-origin: right; transform: rotateY(40deg);",t.appendChild(n),x.appendChild(t),s=n.getBoundingClientRect(),x.removeChild(t),s=s.width&&s.width<4)}),Modernizr.addTest("sessionstorage",function(){var e="modernizr";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(t){return!1}});var O={}.toString;Modernizr.addTest("smil",function(){return!!t.createElementNS&&/SVGAnimate/.test(O.call(t.createElementNS("http://www.w3.org/2000/svg","animate")))}),Modernizr.addTest("svgclippaths",function(){return!!t.createElementNS&&/SVGClipPath/.test(O.call(t.createElementNS("http://www.w3.org/2000/svg","clipPath")))}),Modernizr.addTest("svgfilters",function(){var t=!1;try{t="SVGFEColorMatrixElement"in e&&2==SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_SATURATE}catch(n){}return t}),Modernizr.addTest("svgforeignobject",function(){return!!t.createElementNS&&/SVGForeignObject/.test(O.call(t.createElementNS("http://www.w3.org/2000/svg","foreignObject")))}),Modernizr.addTest("canvas",function(){var e=i("canvas");return!(!e.getContext||!e.getContext("2d"))});var V=i("canvas");Modernizr.addTest("todataurljpeg",function(){return!!Modernizr.canvas&&0===V.toDataURL("image/jpeg").indexOf("data:image/jpeg")}),Modernizr.addTest("todataurlpng",function(){return!!Modernizr.canvas&&0===V.toDataURL("image/png").indexOf("data:image/png")}),Modernizr.addTest("todataurlwebp",function(){var e=!1;try{e=!!Modernizr.canvas&&0===V.toDataURL("image/webp").indexOf("data:image/webp")}catch(t){}return e}),s(),a(b),delete S.addTest,delete S.addAsyncTest;for(var L=0;L 0){
83 | var temp = {
84 | 'id': projectID
85 | }
86 | $http.post('/generate', temp).then(function (response) {
87 | if(response.data.status == 'True'){
88 | var temp = {
89 | filename: response.data.filename
90 | }
91 | $http.get('/download?filename='+temp.filename+'', {responseType: 'blob'}).then(function (response) {
92 | FileSaver.saveAs(response.data, temp.filename + '.docx');
93 | });
94 | }
95 | });
96 | }
97 | }
98 |
99 |
100 | vm.editRow = vulnRowEditor.editRow;
101 | vm.addRow = vulnRowEditor.addRow;
102 | vm.viewRow = vulnRowEditor.viewRow;
103 | vm.serviceGrid = {
104 | enableColumnMenus: false,
105 | enableRowSelection: false
106 | , enableRowHeaderSelection: false
107 | , rowTemplate: "
"
108 | };
109 | vm.serviceGrid.seltype = 'None';
110 | vm.serviceGrid.columnDefs = [{
111 | name: 'Vulnerability Name'
112 | , field: 'vulName'
113 | , enableSorting: false
114 | , enableCellEdit: false
115 | },
116 | {
117 | name: 'Owasp Name'
118 | , field: 'owaspName'
119 | , enableSorting: false
120 | , enableCellEdit: false
121 | },
122 | {
123 | name: 'Risk'
124 | , field: 'risk'
125 | , enableSorting: false
126 | , enableCellEdit: false
127 | },
128 | {
129 | field: "View",
130 | width: 100,
131 | displayName: "View",
132 | cellTemplate: 'View '
133 | },
134 | {
135 | field: "Edit",
136 | width: 100,
137 | displayName: "Edit",
138 | cellTemplate: 'Edit '
139 | }];
140 | vm.addVulnerability = function () {
141 | var rowTmp = {};
142 | var newService = {
143 | "projectID" : "",
144 | "vulName" : "",
145 | "appType" : "",
146 | "owaspName" : "",
147 | "vulDetail" : "",
148 | "vulRecommend" : "",
149 | "risk" : "",
150 | "severity" : "",
151 | "cvscore" : "",
152 | "cvtext" : "",
153 | "probability" : "",
154 | "remeffort" : "",
155 | "vector" : "",
156 | "occurrences" : "",
157 | "affcomp" : "",
158 | "retest" : "",
159 | "other" : "",
160 | "proofExploit": ""
161 | };
162 | rowTmp.entity = newService;
163 | vm.addRow(vm.serviceGrid, rowTmp);
164 | };
165 | }]);
166 | app.controller('vulnRowEditCtrl', ['$http', '$uibModalInstance', 'grid', 'row', '$window', '$state', 'Upload', '$scope', '$stateParams', 'Notify', function ($http, $uibModalInstance, grid, row, $window, $state, Upload, $scope,$stateParams, Notify) {
167 | var projectID = $stateParams.id;
168 | var appType = $stateParams.appType;
169 | if(projectID == undefined || projectID == ""){
170 | $state.go('app.project');
171 | }
172 | $scope.vul= {};
173 | $scope.vul = angular.copy(row.entity);
174 | $scope.vul.projectID=projectID;
175 | $scope.vul.appType = appType;
176 | $scope.vul.vulimgpath = [];
177 |
178 | $scope.getimage = function(vulID){
179 | var tempVulGetImg = {
180 | 'vid': vulID
181 | }
182 | $http.post('/viewVulGetImg', tempVulGetImg).then(function (response) {
183 | for (var i = 0; i < response.data.data.length; i++) {
184 | $scope.vul.vulimgpath.push(response.data.data[i].imgpath);
185 | }
186 | });
187 | }
188 | if($scope.vul.vulID != undefined){
189 | $scope.getimage($scope.vul.vulID);
190 | }
191 |
192 | var temp = {
193 | 'appType': $scope.vul.appType
194 | }
195 | $http.post('/viewOwasp', temp).then(function (response) {
196 | $scope.owaspData = response.data.data;
197 | });
198 |
199 | $scope.owaspSelect = function(data){
200 | for(var i =0; i<$scope.owaspData.length; i++){
201 | if($scope.owaspData[i].vulName == data){
202 | $scope.vul.owaspName = $scope.owaspData[i].owaspName;
203 | $scope.vul.vulDetail = $scope.owaspData[i].vulDetail;
204 | $scope.vul.vulRecommend = $scope.owaspData[i].vulRecommend;
205 |
206 | }
207 | }
208 | }
209 |
210 | var vm = this;
211 | vm.entity = angular.copy(row.entity);
212 | vm.save = save;
213 | vm.update = update;
214 | vm.remove = remove;
215 |
216 | function save(files) {
217 | Upload.upload({
218 | url: '/addVuln',
219 | arrayKey: '',
220 | data: {
221 | "projectID" : $scope.vul.projectID,
222 | "vulName" : $scope.vul.vulName,
223 | "appType" : $scope.vul.appType,
224 | "owaspName" : $scope.vul.owaspName,
225 | "vulDetail" : $scope.vul.vulDetail,
226 | "vulRecommend" : $scope.vul.vulRecommend,
227 | "risk" : $scope.vul.risk,
228 | "severity" : $scope.vul.severity,
229 | "cvscore" : $scope.vul.cvscore,
230 | "cvtext" : $scope.vul.cvtext,
231 | "probability" : $scope.vul.probability,
232 | "remeffort" : $scope.vul.remeffort,
233 | "vector" : $scope.vul.vector,
234 | "occurrences" : $scope.vul.occurrences,
235 | "affcomp" : $scope.vul.affcomp,
236 | "retest" : $scope.vul.retest,
237 | "other" : $scope.vul.other,
238 | "proofExploit": files
239 | }
240 | }).then(function (response) {
241 | if(response.data.status == 'True'){
242 | Notify.alert('Vulnerability Added Successful', { status: 'success' });
243 | }
244 | $scope.vul.vulID = response.data.vid;
245 | grid.data.push($scope.vul);
246 | $uibModalInstance.close(row.entity);
247 | }, function (response) {
248 |
249 | }, function (evt) {
250 |
251 | });
252 | }
253 |
254 | function update(files) {
255 | Upload.upload({
256 | url: '/editVuln',
257 | arrayKey: '',
258 | data: {
259 | "id": $scope.vul.vulID,
260 | "projectID" : $scope.vul.projectID,
261 | "vulName" : $scope.vul.vulName,
262 | "appType" : $scope.vul.appType,
263 | "owaspName" : $scope.vul.owaspName,
264 | "vulDetail" : $scope.vul.vulDetail,
265 | "vulRecommend" : $scope.vul.vulRecommend,
266 | "risk" : $scope.vul.risk,
267 | "severity" : $scope.vul.severity,
268 | "cvscore" : $scope.vul.cvscore,
269 | "cvtext" : $scope.vul.cvtext,
270 | "probability" : $scope.vul.probability,
271 | "remeffort" : $scope.vul.remeffort,
272 | "vector" : $scope.vul.vector,
273 | "occurrences" : $scope.vul.occurrences,
274 | "affcomp" : $scope.vul.affcomp,
275 | "retest" : $scope.vul.retest,
276 | "other" : $scope.vul.other,
277 | "proofExploit": files
278 | }
279 | }).then(function (response) {
280 | if(response.data.status == 'True'){
281 | Notify.alert('Vulnerability Update Successful', { status: 'success' });
282 | }
283 |
284 | row.entity.vulName = $scope.vul.vulName;
285 | row.entity.owaspName = $scope.vul.owaspName;
286 | row.entity.vulDetail = $scope.vul.vulDetail;
287 | row.entity.vulRecommend = $scope.vul.vulRecommend;
288 | row.entity.risk = $scope.vul.risk;
289 | row.entity.severity = $scope.vul.severity;
290 | row.entity.cvscore = $scope.vul.cvscore;
291 | row.entity.cvtext = $scope.vul.cvtext;
292 | row.entity.probability = $scope.vul.probability;
293 | row.entity.remeffort = $scope.vul.remeffort;
294 | row.entity.vector = $scope.vul.vector;
295 | row.entity.occurrences = $scope.vul.occurrences;
296 | row.entity.affcomp = $scope.vul.affcomp;
297 | row.entity.retest = $scope.vul.retest;
298 | row.entity.other = $scope.vul.other;
299 | $uibModalInstance.close(row.entity);
300 | }, function (response) {
301 |
302 | }, function (evt) {
303 |
304 | });
305 | }
306 |
307 | function remove() {
308 | var temp = {
309 | "id": vm.entity.vulID
310 | }
311 | $http.post('/deleteVuln', temp).then(function (response) {
312 | if(response.data.status == 'True'){
313 | Notify.alert('Vulnerability Deleted Successfully', { status: 'success' });
314 | }
315 | $state.go($state.current, {}, {
316 | reload: true
317 | });
318 | $uibModalInstance.close(row.entity);
319 | });
320 | }
321 | $scope.removeImage = function(image, index){
322 | temp = {
323 | "path": image
324 | }
325 | $http.post('/deleteProof', temp).then(function (response) {
326 | if(response.data.status == 'True'){
327 | $scope.vul.vulimgpath.splice(index, 1);
328 |
329 | Notify.alert('Image Removed Successful', { status: 'success' });
330 |
331 | }
332 |
333 | });
334 | }
335 | }]);
336 | })();
--------------------------------------------------------------------------------
/public/vendor/angularjs-toaster/toaster.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Toastr
3 | * Version 2.0.1
4 | * Copyright 2012 John Papa and Hans Fjallemark.
5 | * All Rights Reserved.
6 | * Use, reproduction, distribution, and modification of this code is subject to the terms and
7 | * conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php
8 | *
9 | * Author: John Papa and Hans Fjallemark
10 | * Project: https://github.com/CodeSeven/toastr
11 | */
12 | .toast-title {
13 | font-weight: bold;
14 | }
15 | .toast-message {
16 | -ms-word-wrap: break-word;
17 | word-wrap: break-word;
18 | }
19 | .toast-message a,
20 | .toast-message label {
21 | color: #ffffff;
22 | }
23 | .toast-message a:hover {
24 | color: #cccccc;
25 | text-decoration: none;
26 | }
27 |
28 | .toast-close-button {
29 | position: relative;
30 | right: -0.3em;
31 | top: -0.3em;
32 | float: right;
33 | font-size: 20px;
34 | font-weight: bold;
35 | color: #ffffff;
36 | -webkit-text-shadow: 0 1px 0 #ffffff;
37 | text-shadow: 0 1px 0 #ffffff;
38 | opacity: 0.8;
39 | -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
40 | filter: alpha(opacity=80);
41 | }
42 | .toast-close-button:hover,
43 | .toast-close-button:focus {
44 | color: #000000;
45 | text-decoration: none;
46 | cursor: pointer;
47 | opacity: 0.4;
48 | -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
49 | filter: alpha(opacity=40);
50 | }
51 |
52 | /*Additional properties for button version
53 | iOS requires the button element instead of an anchor tag.
54 | If you want the anchor version, it requires `href="#"`.*/
55 | button.toast-close-button {
56 | padding: 0;
57 | cursor: pointer;
58 | background: transparent;
59 | border: 0;
60 | -webkit-appearance: none;
61 | }
62 | .toast-top-full-width {
63 | top: 0;
64 | right: 0;
65 | width: 100%;
66 | }
67 | .toast-bottom-full-width {
68 | bottom: 0;
69 | right: 0;
70 | width: 100%;
71 | }
72 | .toast-top-left {
73 | top: 12px;
74 | left: 12px;
75 | }
76 | .toast-top-center {
77 | top: 12px;
78 | }
79 | .toast-top-right {
80 | top: 12px;
81 | right: 12px;
82 | }
83 | .toast-bottom-right {
84 | right: 12px;
85 | bottom: 12px;
86 | }
87 | .toast-bottom-center {
88 | bottom: 12px;
89 | }
90 | .toast-bottom-left {
91 | bottom: 12px;
92 | left: 12px;
93 | }
94 | .toast-center {
95 | top: 45%;
96 | }
97 | #toast-container {
98 | position: fixed;
99 | z-index: 999999;
100 | pointer-events: auto;
101 | /*overrides*/
102 |
103 | }
104 | #toast-container.toast-center,
105 | #toast-container.toast-top-center,
106 | #toast-container.toast-bottom-center{
107 | width: 100%;
108 | pointer-events: none;
109 | }
110 | #toast-container.toast-center > div,
111 | #toast-container.toast-top-center > div,
112 | #toast-container.toast-bottom-center > div{
113 | margin: auto;
114 | pointer-events: auto;
115 | }
116 | #toast-container.toast-center > button,
117 | #toast-container.toast-top-center > button,
118 | #toast-container.toast-bottom-center > button{
119 | pointer-events: auto;
120 | }
121 | #toast-container * {
122 | -moz-box-sizing: border-box;
123 | -webkit-box-sizing: border-box;
124 | box-sizing: border-box;
125 | }
126 | #toast-container > div {
127 | margin: 0 0 6px;
128 | padding: 15px 15px 15px 50px;
129 | width: 300px;
130 | -moz-border-radius: 3px 3px 3px 3px;
131 | -webkit-border-radius: 3px 3px 3px 3px;
132 | border-radius: 3px 3px 3px 3px;
133 | background-position: 15px center;
134 | background-repeat: no-repeat;
135 | -moz-box-shadow: 0 0 12px #999999;
136 | -webkit-box-shadow: 0 0 12px #999999;
137 | box-shadow: 0 0 12px #999999;
138 | color: #ffffff;
139 | opacity: 0.8;
140 | -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
141 | filter: alpha(opacity=80);
142 | }
143 | #toast-container > :hover {
144 | -moz-box-shadow: 0 0 12px #000000;
145 | -webkit-box-shadow: 0 0 12px #000000;
146 | box-shadow: 0 0 12px #000000;
147 | opacity: 1;
148 | -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
149 | filter: alpha(opacity=100);
150 | cursor: pointer;
151 | }
152 | #toast-container > .toast-info {
153 | background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important;
154 | }
155 | #toast-container > .toast-wait {
156 | background-image: url("data:image/gif;base64,R0lGODlhIAAgAIQAAAQCBISGhMzKzERCROTm5CQiJKyurHx+fPz+/ExOTOzu7Dw+PIyOjCwqLFRWVAwKDIyKjMzOzOzq7CQmJLy6vFRSVPTy9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCQAXACwAAAAAIAAgAAAF3eAljmRpnmh6VRSVqLDpIDTixOdUlFSNUDhSQUAT7ES9GnD0SFQAKWItMqr4bqKHVPDI+WiTkaOFFVlrFe83rDrT0qeIjwrT0iLdU0GOiBxhAA4VeSk6QYeIOAsQEAuJKgw+EI8nA18IA48JBAQvFxCXDI8SNAQikV+iiaQIpheWX5mJmxKeF6g0qpQmA4yOu8C7EwYWCgZswRcTFj4KyMAGlwYxDwcHhCXMXxYxBzQHKNo+3DDeCOAn0V/TddbYJA0K48gAEAFQicMWFsfwNA3JSgAIAAFfwIMIL4QAACH5BAkJABoALAAAAAAgACAAhAQCBIyKjERCRMzOzCQiJPTy9DQyNGRmZMTCxOTm5CwqLHx+fBQWFJyenNTW1Pz6/Dw6PGxubAwKDIyOjNTS1CQmJCwuLPz+/Dw+PH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dUlCzAL+CQODAwc9BtIMAQAOw==") !important;
157 | }
158 | #toast-container > .toast-error {
159 | background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important;
160 | }
161 | #toast-container > .toast-success {
162 | background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important;
163 | }
164 | #toast-container > .toast-warning {
165 | background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important;
166 | }
167 | #toast-container.toast-top-full-width > div,
168 | #toast-container.toast-bottom-full-width > div {
169 | width: 96%;
170 | margin: auto;
171 | }
172 | .toast {
173 | background-color: #030303;
174 | }
175 | .toast-success {
176 | background-color: #51a351;
177 | }
178 | .toast-error {
179 | background-color: #bd362f;
180 | }
181 | .toast-info {
182 | background-color: #2f96b4;
183 | }
184 | .toast-wait {
185 | background-color: #2f96b4;
186 | }
187 | .toast-warning {
188 | background-color: #f89406;
189 | }
190 | /*Responsive Design*/
191 | @media all and (max-width: 240px) {
192 | #toast-container > div {
193 | padding: 8px 8px 8px 50px;
194 | width: 11em;
195 | }
196 | #toast-container .toast-close-button {
197 | right: -0.2em;
198 | top: -0.2em;
199 | }
200 | }
201 | @media all and (min-width: 241px) and (max-width: 480px) {
202 | #toast-container > div {
203 | padding: 8px 8px 8px 50px;
204 | width: 18em;
205 | }
206 | #toast-container .toast-close-button {
207 | right: -0.2em;
208 | top: -0.2em;
209 | }
210 | }
211 | @media all and (min-width: 481px) and (max-width: 768px) {
212 | #toast-container > div {
213 | padding: 15px 15px 15px 50px;
214 | width: 25em;
215 | }
216 | }
217 |
218 | /*
219 | * AngularJS-Toaster
220 | * Version 0.3
221 | */
222 | :not(.no-enter)#toast-container > div.ng-enter,
223 | :not(.no-leave)#toast-container > div.ng-leave
224 | {
225 | -webkit-transition: 1000ms cubic-bezier(0.250, 0.250, 0.750, 0.750) all;
226 | -moz-transition: 1000ms cubic-bezier(0.250, 0.250, 0.750, 0.750) all;
227 | -ms-transition: 1000ms cubic-bezier(0.250, 0.250, 0.750, 0.750) all;
228 | -o-transition: 1000ms cubic-bezier(0.250, 0.250, 0.750, 0.750) all;
229 | transition: 1000ms cubic-bezier(0.250, 0.250, 0.750, 0.750) all;
230 | }
231 |
232 | :not(.no-enter)#toast-container > div.ng-enter.ng-enter-active,
233 | :not(.no-leave)#toast-container > div.ng-leave {
234 | opacity: 0.8;
235 | }
236 |
237 | :not(.no-leave)#toast-container > div.ng-leave.ng-leave-active,
238 | :not(.no-enter)#toast-container > div.ng-enter {
239 | opacity: 0;
240 | }
--------------------------------------------------------------------------------
/public/vendor/Flot/jquery.flot.time.js:
--------------------------------------------------------------------------------
1 | /* Pretty handling of time axes.
2 |
3 | Copyright (c) 2007-2014 IOLA and Ole Laursen.
4 | Licensed under the MIT license.
5 |
6 | Set axis.mode to "time" to enable. See the section "Time series data" in
7 | API.txt for details.
8 |
9 | */
10 |
11 | (function($) {
12 |
13 | var options = {
14 | xaxis: {
15 | timezone: null, // "browser" for local to the client or timezone for timezone-js
16 | timeformat: null, // format string to use
17 | twelveHourClock: false, // 12 or 24 time in time mode
18 | monthNames: null // list of names of months
19 | }
20 | };
21 |
22 | // round to nearby lower multiple of base
23 |
24 | function floorInBase(n, base) {
25 | return base * Math.floor(n / base);
26 | }
27 |
28 | // Returns a string with the date d formatted according to fmt.
29 | // A subset of the Open Group's strftime format is supported.
30 |
31 | function formatDate(d, fmt, monthNames, dayNames) {
32 |
33 | if (typeof d.strftime == "function") {
34 | return d.strftime(fmt);
35 | }
36 |
37 | var leftPad = function(n, pad) {
38 | n = "" + n;
39 | pad = "" + (pad == null ? "0" : pad);
40 | return n.length == 1 ? pad + n : n;
41 | };
42 |
43 | var r = [];
44 | var escape = false;
45 | var hours = d.getHours();
46 | var isAM = hours < 12;
47 |
48 | if (monthNames == null) {
49 | monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
50 | }
51 |
52 | if (dayNames == null) {
53 | dayNames = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
54 | }
55 |
56 | var hours12;
57 |
58 | if (hours > 12) {
59 | hours12 = hours - 12;
60 | } else if (hours == 0) {
61 | hours12 = 12;
62 | } else {
63 | hours12 = hours;
64 | }
65 |
66 | for (var i = 0; i < fmt.length; ++i) {
67 |
68 | var c = fmt.charAt(i);
69 |
70 | if (escape) {
71 | switch (c) {
72 | case 'a': c = "" + dayNames[d.getDay()]; break;
73 | case 'b': c = "" + monthNames[d.getMonth()]; break;
74 | case 'd': c = leftPad(d.getDate()); break;
75 | case 'e': c = leftPad(d.getDate(), " "); break;
76 | case 'h': // For back-compat with 0.7; remove in 1.0
77 | case 'H': c = leftPad(hours); break;
78 | case 'I': c = leftPad(hours12); break;
79 | case 'l': c = leftPad(hours12, " "); break;
80 | case 'm': c = leftPad(d.getMonth() + 1); break;
81 | case 'M': c = leftPad(d.getMinutes()); break;
82 | // quarters not in Open Group's strftime specification
83 | case 'q':
84 | c = "" + (Math.floor(d.getMonth() / 3) + 1); break;
85 | case 'S': c = leftPad(d.getSeconds()); break;
86 | case 'y': c = leftPad(d.getFullYear() % 100); break;
87 | case 'Y': c = "" + d.getFullYear(); break;
88 | case 'p': c = (isAM) ? ("" + "am") : ("" + "pm"); break;
89 | case 'P': c = (isAM) ? ("" + "AM") : ("" + "PM"); break;
90 | case 'w': c = "" + d.getDay(); break;
91 | }
92 | r.push(c);
93 | escape = false;
94 | } else {
95 | if (c == "%") {
96 | escape = true;
97 | } else {
98 | r.push(c);
99 | }
100 | }
101 | }
102 |
103 | return r.join("");
104 | }
105 |
106 | // To have a consistent view of time-based data independent of which time
107 | // zone the client happens to be in we need a date-like object independent
108 | // of time zones. This is done through a wrapper that only calls the UTC
109 | // versions of the accessor methods.
110 |
111 | function makeUtcWrapper(d) {
112 |
113 | function addProxyMethod(sourceObj, sourceMethod, targetObj, targetMethod) {
114 | sourceObj[sourceMethod] = function() {
115 | return targetObj[targetMethod].apply(targetObj, arguments);
116 | };
117 | };
118 |
119 | var utc = {
120 | date: d
121 | };
122 |
123 | // support strftime, if found
124 |
125 | if (d.strftime != undefined) {
126 | addProxyMethod(utc, "strftime", d, "strftime");
127 | }
128 |
129 | addProxyMethod(utc, "getTime", d, "getTime");
130 | addProxyMethod(utc, "setTime", d, "setTime");
131 |
132 | var props = ["Date", "Day", "FullYear", "Hours", "Milliseconds", "Minutes", "Month", "Seconds"];
133 |
134 | for (var p = 0; p < props.length; p++) {
135 | addProxyMethod(utc, "get" + props[p], d, "getUTC" + props[p]);
136 | addProxyMethod(utc, "set" + props[p], d, "setUTC" + props[p]);
137 | }
138 |
139 | return utc;
140 | };
141 |
142 | // select time zone strategy. This returns a date-like object tied to the
143 | // desired timezone
144 |
145 | function dateGenerator(ts, opts) {
146 | if (opts.timezone == "browser") {
147 | return new Date(ts);
148 | } else if (!opts.timezone || opts.timezone == "utc") {
149 | return makeUtcWrapper(new Date(ts));
150 | } else if (typeof timezoneJS != "undefined" && typeof timezoneJS.Date != "undefined") {
151 | var d = new timezoneJS.Date();
152 | // timezone-js is fickle, so be sure to set the time zone before
153 | // setting the time.
154 | d.setTimezone(opts.timezone);
155 | d.setTime(ts);
156 | return d;
157 | } else {
158 | return makeUtcWrapper(new Date(ts));
159 | }
160 | }
161 |
162 | // map of app. size of time units in milliseconds
163 |
164 | var timeUnitSize = {
165 | "second": 1000,
166 | "minute": 60 * 1000,
167 | "hour": 60 * 60 * 1000,
168 | "day": 24 * 60 * 60 * 1000,
169 | "month": 30 * 24 * 60 * 60 * 1000,
170 | "quarter": 3 * 30 * 24 * 60 * 60 * 1000,
171 | "year": 365.2425 * 24 * 60 * 60 * 1000
172 | };
173 |
174 | // the allowed tick sizes, after 1 year we use
175 | // an integer algorithm
176 |
177 | var baseSpec = [
178 | [1, "second"], [2, "second"], [5, "second"], [10, "second"],
179 | [30, "second"],
180 | [1, "minute"], [2, "minute"], [5, "minute"], [10, "minute"],
181 | [30, "minute"],
182 | [1, "hour"], [2, "hour"], [4, "hour"],
183 | [8, "hour"], [12, "hour"],
184 | [1, "day"], [2, "day"], [3, "day"],
185 | [0.25, "month"], [0.5, "month"], [1, "month"],
186 | [2, "month"]
187 | ];
188 |
189 | // we don't know which variant(s) we'll need yet, but generating both is
190 | // cheap
191 |
192 | var specMonths = baseSpec.concat([[3, "month"], [6, "month"],
193 | [1, "year"]]);
194 | var specQuarters = baseSpec.concat([[1, "quarter"], [2, "quarter"],
195 | [1, "year"]]);
196 |
197 | function init(plot) {
198 | plot.hooks.processOptions.push(function (plot, options) {
199 | $.each(plot.getAxes(), function(axisName, axis) {
200 |
201 | var opts = axis.options;
202 |
203 | if (opts.mode == "time") {
204 | axis.tickGenerator = function(axis) {
205 |
206 | var ticks = [];
207 | var d = dateGenerator(axis.min, opts);
208 | var minSize = 0;
209 |
210 | // make quarter use a possibility if quarters are
211 | // mentioned in either of these options
212 |
213 | var spec = (opts.tickSize && opts.tickSize[1] ===
214 | "quarter") ||
215 | (opts.minTickSize && opts.minTickSize[1] ===
216 | "quarter") ? specQuarters : specMonths;
217 |
218 | if (opts.minTickSize != null) {
219 | if (typeof opts.tickSize == "number") {
220 | minSize = opts.tickSize;
221 | } else {
222 | minSize = opts.minTickSize[0] * timeUnitSize[opts.minTickSize[1]];
223 | }
224 | }
225 |
226 | for (var i = 0; i < spec.length - 1; ++i) {
227 | if (axis.delta < (spec[i][0] * timeUnitSize[spec[i][1]]
228 | + spec[i + 1][0] * timeUnitSize[spec[i + 1][1]]) / 2
229 | && spec[i][0] * timeUnitSize[spec[i][1]] >= minSize) {
230 | break;
231 | }
232 | }
233 |
234 | var size = spec[i][0];
235 | var unit = spec[i][1];
236 |
237 | // special-case the possibility of several years
238 |
239 | if (unit == "year") {
240 |
241 | // if given a minTickSize in years, just use it,
242 | // ensuring that it's an integer
243 |
244 | if (opts.minTickSize != null && opts.minTickSize[1] == "year") {
245 | size = Math.floor(opts.minTickSize[0]);
246 | } else {
247 |
248 | var magn = Math.pow(10, Math.floor(Math.log(axis.delta / timeUnitSize.year) / Math.LN10));
249 | var norm = (axis.delta / timeUnitSize.year) / magn;
250 |
251 | if (norm < 1.5) {
252 | size = 1;
253 | } else if (norm < 3) {
254 | size = 2;
255 | } else if (norm < 7.5) {
256 | size = 5;
257 | } else {
258 | size = 10;
259 | }
260 |
261 | size *= magn;
262 | }
263 |
264 | // minimum size for years is 1
265 |
266 | if (size < 1) {
267 | size = 1;
268 | }
269 | }
270 |
271 | axis.tickSize = opts.tickSize || [size, unit];
272 | var tickSize = axis.tickSize[0];
273 | unit = axis.tickSize[1];
274 |
275 | var step = tickSize * timeUnitSize[unit];
276 |
277 | if (unit == "second") {
278 | d.setSeconds(floorInBase(d.getSeconds(), tickSize));
279 | } else if (unit == "minute") {
280 | d.setMinutes(floorInBase(d.getMinutes(), tickSize));
281 | } else if (unit == "hour") {
282 | d.setHours(floorInBase(d.getHours(), tickSize));
283 | } else if (unit == "month") {
284 | d.setMonth(floorInBase(d.getMonth(), tickSize));
285 | } else if (unit == "quarter") {
286 | d.setMonth(3 * floorInBase(d.getMonth() / 3,
287 | tickSize));
288 | } else if (unit == "year") {
289 | d.setFullYear(floorInBase(d.getFullYear(), tickSize));
290 | }
291 |
292 | // reset smaller components
293 |
294 | d.setMilliseconds(0);
295 |
296 | if (step >= timeUnitSize.minute) {
297 | d.setSeconds(0);
298 | }
299 | if (step >= timeUnitSize.hour) {
300 | d.setMinutes(0);
301 | }
302 | if (step >= timeUnitSize.day) {
303 | d.setHours(0);
304 | }
305 | if (step >= timeUnitSize.day * 4) {
306 | d.setDate(1);
307 | }
308 | if (step >= timeUnitSize.month * 2) {
309 | d.setMonth(floorInBase(d.getMonth(), 3));
310 | }
311 | if (step >= timeUnitSize.quarter * 2) {
312 | d.setMonth(floorInBase(d.getMonth(), 6));
313 | }
314 | if (step >= timeUnitSize.year) {
315 | d.setMonth(0);
316 | }
317 |
318 | var carry = 0;
319 | var v = Number.NaN;
320 | var prev;
321 |
322 | do {
323 |
324 | prev = v;
325 | v = d.getTime();
326 | ticks.push(v);
327 |
328 | if (unit == "month" || unit == "quarter") {
329 | if (tickSize < 1) {
330 |
331 | // a bit complicated - we'll divide the
332 | // month/quarter up but we need to take
333 | // care of fractions so we don't end up in
334 | // the middle of a day
335 |
336 | d.setDate(1);
337 | var start = d.getTime();
338 | d.setMonth(d.getMonth() +
339 | (unit == "quarter" ? 3 : 1));
340 | var end = d.getTime();
341 | d.setTime(v + carry * timeUnitSize.hour + (end - start) * tickSize);
342 | carry = d.getHours();
343 | d.setHours(0);
344 | } else {
345 | d.setMonth(d.getMonth() +
346 | tickSize * (unit == "quarter" ? 3 : 1));
347 | }
348 | } else if (unit == "year") {
349 | d.setFullYear(d.getFullYear() + tickSize);
350 | } else {
351 | d.setTime(v + step);
352 | }
353 | } while (v < axis.max && v != prev);
354 |
355 | return ticks;
356 | };
357 |
358 | axis.tickFormatter = function (v, axis) {
359 |
360 | var d = dateGenerator(v, axis.options);
361 |
362 | // first check global format
363 |
364 | if (opts.timeformat != null) {
365 | return formatDate(d, opts.timeformat, opts.monthNames, opts.dayNames);
366 | }
367 |
368 | // possibly use quarters if quarters are mentioned in
369 | // any of these places
370 |
371 | var useQuarters = (axis.options.tickSize &&
372 | axis.options.tickSize[1] == "quarter") ||
373 | (axis.options.minTickSize &&
374 | axis.options.minTickSize[1] == "quarter");
375 |
376 | var t = axis.tickSize[0] * timeUnitSize[axis.tickSize[1]];
377 | var span = axis.max - axis.min;
378 | var suffix = (opts.twelveHourClock) ? " %p" : "";
379 | var hourCode = (opts.twelveHourClock) ? "%I" : "%H";
380 | var fmt;
381 |
382 | if (t < timeUnitSize.minute) {
383 | fmt = hourCode + ":%M:%S" + suffix;
384 | } else if (t < timeUnitSize.day) {
385 | if (span < 2 * timeUnitSize.day) {
386 | fmt = hourCode + ":%M" + suffix;
387 | } else {
388 | fmt = "%b %d " + hourCode + ":%M" + suffix;
389 | }
390 | } else if (t < timeUnitSize.month) {
391 | fmt = "%b %d";
392 | } else if ((useQuarters && t < timeUnitSize.quarter) ||
393 | (!useQuarters && t < timeUnitSize.year)) {
394 | if (span < timeUnitSize.year) {
395 | fmt = "%b";
396 | } else {
397 | fmt = "%b %Y";
398 | }
399 | } else if (useQuarters && t < timeUnitSize.year) {
400 | if (span < timeUnitSize.year) {
401 | fmt = "Q%q";
402 | } else {
403 | fmt = "Q%q %Y";
404 | }
405 | } else {
406 | fmt = "%Y";
407 | }
408 |
409 | var rt = formatDate(d, fmt, opts.monthNames, opts.dayNames);
410 |
411 | return rt;
412 | };
413 | }
414 | });
415 | });
416 | }
417 |
418 | $.plot.plugins.push({
419 | init: init,
420 | options: options,
421 | name: 'time',
422 | version: '1.0'
423 | });
424 |
425 | // Time-axis support used to be in Flot core, which exposed the
426 | // formatDate function on the plot object. Various plugins depend
427 | // on the function, so we need to re-expose it here.
428 |
429 | $.plot.formatDate = formatDate;
430 | $.plot.dateGenerator = dateGenerator;
431 |
432 | })(jQuery);
433 |
--------------------------------------------------------------------------------