Strip stashed-yet-merged debug detritus from history UI fixes.

This commit is contained in:
Dannon Baker
2017-02-20 17:16:27 -05:00
parent ce264f9542
commit a3a7e1001c
13 changed files with 17 additions and 24 deletions
@@ -201,8 +201,6 @@ var PaginatedCollection = ControlledFetchCollection.extend({
pageNum = self.constrainPageNum( pageNum );
self.currentPage = pageNum;
options = _.defaults( options || {}, self.getPageLimitOffset( pageNum ) );
console.log("fetchPage");
console.log(options);
self.trigger( 'fetching-more' );
return self.fetch( options )
@@ -177,8 +177,7 @@ var History = Backbone.Model
// if we don't flip this, then a fully-fetched list will not be re-checked via fetch
this.contents.allFetched = false;
var fetchFn = self.contents.currentPage !== 0
? function(){ console.log("FETCH PAGE PARTICULAR" + self.contents.currentPage);
return self.contents.fetchPage( self.contents.currentPage ); }
? function(){ return self.contents.fetchPage( self.contents.currentPage ); }
: function(){ return self.contents.fetchUpdated( lastUpdateTime ); };
// note: if there was no previous update time, all summary contents will be fetched
return fetchFn()
@@ -194,7 +193,6 @@ var History = Backbone.Model
/** continuously fetch updated contents every UPDATE_DELAY ms if this history's datasets or jobs are unfinished */
checkForUpdates : function( options ){
console.log("CHECK FOR UPDATES");
// console.log( this + '.checkForUpdates' );
options = options || {};
var delay = this.UPDATE_DELAY;
@@ -241,7 +241,6 @@ var HistoryView = _super.extend(
/** override to render pagination also */
renderItems: function( $whereTo ){
console.log("RENDER ITEMS");
// console.log( this + '.renderItems-----------------', new Date() );
$whereTo = $whereTo || this.$el;
var self = this;
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
define(["libs/underscore","libs/backbone","mvc/base-mvc"],function(a,b,c){"use strict";var d=b.Collection.extend({initialize:function(a,c){b.Collection.prototype.initialize.call(this,a,c),this.setOrder(c.order||this.order,{silent:!0})},_setUpListeners:function(){return this.on({"changed-order":this.sort})},fetch:function(a){return a=this._buildFetchOptions(a),b.Collection.prototype.fetch.call(this,a)},_buildFetchOptions:function(b){b=a.clone(b)||{};var c=this;b.traditional=!0,b.data=b.data||c._buildFetchData(b);var d=this._buildFetchFilters(b);return a.isEmpty(d)||a.extend(b.data,this._fetchFiltersToAjaxData(d)),b},_buildFetchData:function(b){var c={};return this.order&&(c.order=this.order),a.defaults(a.pick(b,this._fetchParams),c)},_fetchParams:["order","limit","offset","view","keys"],_buildFetchFilters:function(b){return a.clone(b.filters||{})},_fetchFiltersToAjaxData:function(b){var c={q:[],qv:[]};return a.each(b,function(a,b){void 0!==a&&""!==a&&(a===!0&&(a="True"),a===!1&&(a="False"),null===a&&(a="None"),c.q.push(b),c.qv.push(a))}),c},reset:function(a,c){return this.allFetched=!1,b.Collection.prototype.reset.call(this,a,c)},order:null,comparators:{update_time:c.buildComparator("update_time",{ascending:!1}),"update_time-asc":c.buildComparator("update_time",{ascending:!0}),create_time:c.buildComparator("create_time",{ascending:!1}),"create_time-asc":c.buildComparator("create_time",{ascending:!0})},setOrder:function(b,c){c=c||{};var d=this,e=d.comparators[b];if(a.isUndefined(e))throw new Error("unknown order: "+b);if(e!==d.comparator){{d.order}return d.order=b,d.comparator=e,c.silent||d.trigger("changed-order",c),d}}}),e=d.extend({limitPerPage:500,initialize:function(a,b){d.prototype.initialize.call(this,a,b),this.currentPage=b.currentPage||0},getTotalItemCount:function(){return this.length},shouldPaginate:function(){return this.getTotalItemCount()>=this.limitPerPage},getLastPage:function(){return Math.floor(this.getTotalItemCount()/this.limitPerPage)},getPageCount:function(){return this.getLastPage()+1},getPageLimitOffset:function(a){return a=this.constrainPageNum(a),{limit:this.limitPerPage,offset:a*this.limitPerPage}},constrainPageNum:function(a){return Math.max(0,Math.min(a,this.getLastPage()))},fetchPage:function(b,c){var d=this;return b=d.constrainPageNum(b),d.currentPage=b,c=a.defaults(c||{},d.getPageLimitOffset(b)),console.log("fetchPage"),console.log(c),d.trigger("fetching-more"),d.fetch(c).always(function(){d.trigger("fetching-more-done")})},fetchCurrentPage:function(a){return this.fetchPage(this.currentPage,a)},fetchPrevPage:function(a){return this.fetchPage(this.currentPage-1,a)},fetchNextPage:function(a){return this.fetchPage(this.currentPage+1,a)}}),f=d.extend({limitOnFirstFetch:null,limitPerFetch:100,initialize:function(a,b){d.prototype.initialize.call(this,a,b),this.limitOnFirstFetch=b.limitOnFirstFetch||this.limitOnFirstFetch,this.limitPerFetch=b.limitPerFetch||this.limitPerFetch,this.allFetched=!1,this.lastFetched=b.lastFetched||0},_buildFetchOptions:function(a){return a.remove=a.remove||!1,d.prototype._buildFetchOptions.call(this,a)},fetchFirst:function(b){return b=b?a.clone(b):{},this.allFetched=!1,this.lastFetched=0,this.fetchMore(a.defaults(b,{reset:!0,limit:this.limitOnFirstFetch}))},fetchMore:function(b){b=a.clone(b||{});var c=this;if(!b.reset&&c.allFetched)return jQuery.when();b.offset=b.reset?0:b.offset||c.lastFetched;var d=b.limit=b.limit||c.limitPerFetch||null;return c.trigger("fetching-more"),c.fetch(b).always(function(){c.trigger("fetching-more-done")}).done(function(b){var e=a.isArray(b)?b.length:0;c.lastFetched+=e,(!d||d>e)&&(c.allFetched=!0,c.trigger("all-fetched",this))})},fetchAll:function(b){b=b||{};var c=this;return b=a.pick(b,"silent"),b.filters={},c.fetch(b).done(function(){c.allFetched=!0,c.trigger("all-fetched",c)})}});return{ControlledFetchCollection:d,PaginatedCollection:e,InfinitelyScrollingCollection:f}});
define(["libs/underscore","libs/backbone","mvc/base-mvc"],function(a,b,c){"use strict";var d=b.Collection.extend({initialize:function(a,c){b.Collection.prototype.initialize.call(this,a,c),this.setOrder(c.order||this.order,{silent:!0})},_setUpListeners:function(){return this.on({"changed-order":this.sort})},fetch:function(a){return a=this._buildFetchOptions(a),b.Collection.prototype.fetch.call(this,a)},_buildFetchOptions:function(b){b=a.clone(b)||{};var c=this;b.traditional=!0,b.data=b.data||c._buildFetchData(b);var d=this._buildFetchFilters(b);return a.isEmpty(d)||a.extend(b.data,this._fetchFiltersToAjaxData(d)),b},_buildFetchData:function(b){var c={};return this.order&&(c.order=this.order),a.defaults(a.pick(b,this._fetchParams),c)},_fetchParams:["order","limit","offset","view","keys"],_buildFetchFilters:function(b){return a.clone(b.filters||{})},_fetchFiltersToAjaxData:function(b){var c={q:[],qv:[]};return a.each(b,function(a,b){void 0!==a&&""!==a&&(a===!0&&(a="True"),a===!1&&(a="False"),null===a&&(a="None"),c.q.push(b),c.qv.push(a))}),c},reset:function(a,c){return this.allFetched=!1,b.Collection.prototype.reset.call(this,a,c)},order:null,comparators:{update_time:c.buildComparator("update_time",{ascending:!1}),"update_time-asc":c.buildComparator("update_time",{ascending:!0}),create_time:c.buildComparator("create_time",{ascending:!1}),"create_time-asc":c.buildComparator("create_time",{ascending:!0})},setOrder:function(b,c){c=c||{};var d=this,e=d.comparators[b];if(a.isUndefined(e))throw new Error("unknown order: "+b);if(e!==d.comparator){{d.order}return d.order=b,d.comparator=e,c.silent||d.trigger("changed-order",c),d}}}),e=d.extend({limitPerPage:500,initialize:function(a,b){d.prototype.initialize.call(this,a,b),this.currentPage=b.currentPage||0},getTotalItemCount:function(){return this.length},shouldPaginate:function(){return this.getTotalItemCount()>=this.limitPerPage},getLastPage:function(){return Math.floor(this.getTotalItemCount()/this.limitPerPage)},getPageCount:function(){return this.getLastPage()+1},getPageLimitOffset:function(a){return a=this.constrainPageNum(a),{limit:this.limitPerPage,offset:a*this.limitPerPage}},constrainPageNum:function(a){return Math.max(0,Math.min(a,this.getLastPage()))},fetchPage:function(b,c){var d=this;return b=d.constrainPageNum(b),d.currentPage=b,c=a.defaults(c||{},d.getPageLimitOffset(b)),d.trigger("fetching-more"),d.fetch(c).always(function(){d.trigger("fetching-more-done")})},fetchCurrentPage:function(a){return this.fetchPage(this.currentPage,a)},fetchPrevPage:function(a){return this.fetchPage(this.currentPage-1,a)},fetchNextPage:function(a){return this.fetchPage(this.currentPage+1,a)}}),f=d.extend({limitOnFirstFetch:null,limitPerFetch:100,initialize:function(a,b){d.prototype.initialize.call(this,a,b),this.limitOnFirstFetch=b.limitOnFirstFetch||this.limitOnFirstFetch,this.limitPerFetch=b.limitPerFetch||this.limitPerFetch,this.allFetched=!1,this.lastFetched=b.lastFetched||0},_buildFetchOptions:function(a){return a.remove=a.remove||!1,d.prototype._buildFetchOptions.call(this,a)},fetchFirst:function(b){return b=b?a.clone(b):{},this.allFetched=!1,this.lastFetched=0,this.fetchMore(a.defaults(b,{reset:!0,limit:this.limitOnFirstFetch}))},fetchMore:function(b){b=a.clone(b||{});var c=this;if(!b.reset&&c.allFetched)return jQuery.when();b.offset=b.reset?0:b.offset||c.lastFetched;var d=b.limit=b.limit||c.limitPerFetch||null;return c.trigger("fetching-more"),c.fetch(b).always(function(){c.trigger("fetching-more-done")}).done(function(b){var e=a.isArray(b)?b.length:0;c.lastFetched+=e,(!d||d>e)&&(c.allFetched=!0,c.trigger("all-fetched",this))})},fetchAll:function(b){b=b||{};var c=this;return b=a.pick(b,"silent"),b.filters={},c.fetch(b).done(function(){c.allFetched=!0,c.trigger("all-fetched",c)})}});return{ControlledFetchCollection:d,PaginatedCollection:e,InfinitelyScrollingCollection:f}});
//# sourceMappingURL=../../../maps/mvc/base/controlled-fetch-collection.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-2
View File
@@ -29,8 +29,6 @@ def get_random( line_offsets, num_lines ):
def __main__():
import time
time.sleep(500000)
parser = optparse.OptionParser()
parser.add_option( '-s', '--seed', dest='seed', action='store', type="string", default=None, help='Set the random seed.' )
(options, args) = parser.parse_args()