diff -r 0386fb9efe27 -r 9f2334598088 client/annotviz/app/js/annotstimeline.js --- a/client/annotviz/app/js/annotstimeline.js Fri Jan 23 00:10:09 2015 +0100 +++ b/client/annotviz/app/js/annotstimeline.js Fri Jan 23 00:43:54 2015 +0100 @@ -20,7 +20,8 @@ serverUrl: 'http://127.0.0.1:8080', channel: 'ANNOT', maxPages: 1000, - showClockGraphics: true + showClockGraphics: true, + archive: false }; @@ -45,6 +46,7 @@ this.annotCategories = opts.annotCategories; this.startTs = options.startTs || Date.now(); this.showClockGraphics = opts.showClockGraphics; + this.archive = opts.archive; this.circleX = opts.circleX || (this.width/2); this.circleY = opts.circleY || (this.height/2); @@ -94,8 +96,6 @@ { name: 'event_code', op: '==', val: eventCode} //eventcode ]; - console.log(JSON.stringify({filters:filters})); - url = url + '?q=' + JSON.stringify({filters:filters}); var totalPage = 1; @@ -107,7 +107,6 @@ var data = res.target.json; /*jshint -W069 */ totalPage = Math.min(maxPages,parseInt(data['total_pages'])); - console.log('DATA', data); data.objects.forEach(function(annotation) { _this.addAnnot(annotation); }); @@ -234,15 +233,19 @@ } this.init = function() { - ws.message(function(data) { - _this.addAnnot(data); - }); + if (!this.archive){ + ws.message(function(data) { + _this.addAnnot(data); + }); + } if (this.showClockGraphics){this.initClockGraphics();} }; this.start = function() { + this.startTs = Date.now(); + loadArchives(); }; this.refresh = function() { @@ -250,7 +253,6 @@ }; this.stop = function(){ - console.log(this.cells); }; return this;