aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/code
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2017-01-16 10:13:42 +0100
committerStas Vilchik <vilchiks@gmail.com>2017-01-16 10:13:42 +0100
commitf419b7847f39d9d8e80d4a766904ccd4f5bd6010 (patch)
tree1ae1c9f5fc8ca6a93e2341809c319f9912b80e55 /server/sonar-web/src/main/js/apps/code
parentde182d525dfb298a9f98f808a776962ee3e350c1 (diff)
downloadsonarqube-f419b7847f39d9d8e80d4a766904ccd4f5bd6010.tar.gz
sonarqube-f419b7847f39d9d8e80d4a766904ccd4f5bd6010.zip
SONAR-8579 Pagination fails on project code page
Diffstat (limited to 'server/sonar-web/src/main/js/apps/code')
-rw-r--r--server/sonar-web/src/main/js/apps/code/bucket.js4
-rw-r--r--server/sonar-web/src/main/js/apps/code/utils.js7
2 files changed, 6 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/js/apps/code/bucket.js b/server/sonar-web/src/main/js/apps/code/bucket.js
index 66989f22cbf..e0cabfbb276 100644
--- a/server/sonar-web/src/main/js/apps/code/bucket.js
+++ b/server/sonar-web/src/main/js/apps/code/bucket.js
@@ -29,8 +29,8 @@ export function getComponent (componentKey) {
return bucket[componentKey];
}
-export function addComponentChildren (componentKey, children, total) {
- childrenBucket[componentKey] = { children, total };
+export function addComponentChildren (componentKey, children, total, page) {
+ childrenBucket[componentKey] = { children, total, page };
}
export function getComponentChildren (componentKey) {
diff --git a/server/sonar-web/src/main/js/apps/code/utils.js b/server/sonar-web/src/main/js/apps/code/utils.js
index a4b74f38e33..533c549bc78 100644
--- a/server/sonar-web/src/main/js/apps/code/utils.js
+++ b/server/sonar-web/src/main/js/apps/code/utils.js
@@ -142,7 +142,8 @@ export function retrieveComponentChildren (componentKey, isView) {
if (existing) {
return Promise.resolve({
components: existing.children,
- total: existing.total
+ total: existing.total,
+ page: existing.page
});
}
@@ -152,7 +153,7 @@ export function retrieveComponentChildren (componentKey, isView) {
.then(prepareChildren)
.then(expandRootDir(metrics))
.then(r => {
- addComponentChildren(componentKey, r.components, r.total);
+ addComponentChildren(componentKey, r.components, r.total, r.page);
storeChildrenBase(r.components);
storeChildrenBreadcrumbs(componentKey, r.components);
return r;
@@ -201,7 +202,7 @@ export function loadMoreChildren (componentKey, page, isView) {
.then(prepareChildren)
.then(expandRootDir(metrics))
.then(r => {
- addComponentChildren(componentKey, r.components, r.total);
+ addComponentChildren(componentKey, r.components, r.total, r.page);
storeChildrenBase(r.components);
storeChildrenBreadcrumbs(componentKey, r.components);
return r;