PolyGerrit: Implement support for /admin/project/<project>,branches

Change-Id: Ia1882c2831393f63c902965810fdaa72fc139391
This commit is contained in:
Paladox none
2017-06-14 20:32:59 +00:00
parent 902a181aa8
commit 0ab0300c3f
13 changed files with 388 additions and 13 deletions

View File

@@ -55,10 +55,10 @@
}, REQUEST_DEBOUNCE_INTERVAL_MS);
},
_computeNavLink(offset, direction, projectsPerPage, filter) {
_computeNavLink(offset, direction, itemsPerPage, filter) {
// Offset could be a string when passed from the router.
offset = +(offset || 0);
const newOffset = Math.max(0, offset + (projectsPerPage * direction));
const newOffset = Math.max(0, offset + (itemsPerPage * direction));
let href = this.getBaseUrl() + this.path;
if (filter) {
href += '/q/filter:' + filter;
@@ -73,12 +73,12 @@
return offset === 0;
},
_hideNextArrow(loading, projects) {
_hideNextArrow(loading, items) {
let lastPage = false;
if (projects.length < this.itemsPerPage + 1) {
if (items.length < this.itemsPerPage + 1) {
lastPage = true;
}
return loading || lastPage || !projects || !projects.length;
return loading || lastPage || !items || !items.length;
},
});
})();