Show a throbber when the Angular view array still has hidden entries

This provides slightly better UI feedback to the user that more logs are incoming

Fixes #1881
This commit is contained in:
Joseph Schorr 2016-09-29 16:34:26 +02:00
parent 9def2cf055
commit 7380cf0ce0
2 changed files with 5 additions and 0 deletions

View file

@ -64,6 +64,9 @@
<span class="message" bo-html="processANSI(entry.message, container)"></span>
<span class="timestamp" bo-text="formatDatetime(entry.data.datetime)" ng-if="!useTimestamps"></span>
</div>
<div ng-if="container.logs.hasHiddenEntries">
<div class="cor-loader-inline"></div>
</div>
</div>
</div>
</div>

View file

@ -11,6 +11,7 @@ angular.module('quay').factory('AngularViewArray', ['$interval', function($inter
this.visibleEntries = null;
this.hasEntries = false;
this.entries = [];
this.hasHiddenEntries = false;
this.timerRef_ = null;
this.currentIndex_ = 0;
@ -58,6 +59,7 @@ angular.module('quay').factory('AngularViewArray', ['$interval', function($inter
}
this.currentIndex_ = i;
this.hasHiddenEntries = this.currentIndex_ < this.entries.length;
if (this.currentIndex_ >= this.entries.length) {
this.stopTimer_();
}