Change the repo view page to minimize the number of API calls necessary until such time as the information is needed (lazy load everything). Also increase the build timer to 30s.
This commit is contained in:
parent
03481261e8
commit
c04cb4e988
9 changed files with 91 additions and 23 deletions
17
static/js/services/angular-poll-channel.js
vendored
17
static/js/services/angular-poll-channel.js
vendored
|
@ -17,6 +17,12 @@ angular.module('quay').factory('AngularPollChannel', ['ApiService', '$timeout',
|
|||
});
|
||||
};
|
||||
|
||||
_PollChannel.prototype.setSleepTime = function(sleepTime) {
|
||||
this.sleeptime_ = sleepTime;
|
||||
this.stop();
|
||||
this.start(true);
|
||||
};
|
||||
|
||||
_PollChannel.prototype.stop = function() {
|
||||
if (this.timer_) {
|
||||
$timeout.cancel(this.timer_);
|
||||
|
@ -27,11 +33,18 @@ angular.module('quay').factory('AngularPollChannel', ['ApiService', '$timeout',
|
|||
this.working = false;
|
||||
};
|
||||
|
||||
_PollChannel.prototype.start = function() {
|
||||
_PollChannel.prototype.start = function(opt_skipFirstCall) {
|
||||
// Make sure we invoke call outside the normal digest cycle, since
|
||||
// we'll call $scope.$apply ourselves.
|
||||
var that = this;
|
||||
setTimeout(function() { that.call_(); }, 0);
|
||||
setTimeout(function() {
|
||||
if (opt_skipFirstCall) {
|
||||
that.setupTimer_();
|
||||
return;
|
||||
}
|
||||
|
||||
that.call_();
|
||||
}, 0);
|
||||
};
|
||||
|
||||
_PollChannel.prototype.call_ = function() {
|
||||
|
|
Reference in a new issue