You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ni...@apache.org on 2017/05/26 10:20:31 UTC
[5/5] incubator-atlas git commit: ATLAS-1817 : UI : n+1 pages are
created, even though only n*25 instances are retrieved
ATLAS-1817 : UI : n+1 pages are created, even though only n*25 instances are retrieved
Signed-off-by: nixonrodrigues <ni...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/e75984c4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/e75984c4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/e75984c4
Branch: refs/heads/master
Commit: e75984c483501f5c6325a1da91750c0f45d6c6fe
Parents: 64988b8
Author: Kalyani <ka...@freestoneinfotech.com>
Authored: Tue May 23 18:38:55 2017 +0530
Committer: nixonrodrigues <ni...@apache.org>
Committed: Fri May 26 15:48:48 2017 +0530
----------------------------------------------------------------------
.../public/js/views/search/SearchResultLayoutView.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/e75984c4/dashboardv2/public/js/views/search/SearchResultLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
index 25df9b5..1c9320c 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -255,7 +255,12 @@ define(['require',
if (!(that.ui.pageRecordText instanceof jQuery)) {
return;
}
-
+ if (that.searchCollection.models.length === 0) {
+ that.ui.nextData.attr('disabled', true);
+ that.offset = that.offset - that.limit;
+ that.hideLoader();
+ return;
+ }
if (that.searchCollection.models.length < that.limit) {
that.ui.nextData.attr('disabled', true);
} else {
@@ -272,7 +277,7 @@ define(['require',
that.pageTo = that.pageTo - that.limit;
that.pageFrom = (that.pageTo - that.limit) + 1;
}
- that.ui.pageRecordText.html("Showing <u>" + that.searchCollection.models.length + " records</u>, from " + that.pageFrom + " - " + that.pageTo);
+ that.ui.pageRecordText.html("Showing <u>" + that.searchCollection.models.length + " records</u> From " + that.pageFrom + " - " + that.pageTo);
if (that.offset < that.limit && that.pageFrom < 26) {
that.ui.previousData.attr('disabled', true);
}