ATLAS-3025 : UI - If go to page is more/less then the available page limit then 
an error appears in the console

(cherry picked from commit b455040d06be2c6330dfb0b11e34c6ea480a0b7c)


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/325f9da9
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/325f9da9
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/325f9da9

Branch: refs/heads/branch-1.0
Commit: 325f9da92fe21dbace562f15e79702e3e97b66b8
Parents: 6b81507
Author: kevalbhatt <kbh...@apache.org>
Authored: Thu Jan 10 18:11:11 2019 +0530
Committer: kevalbhatt <kbh...@apache.org>
Committed: Thu Jan 10 20:42:58 2019 +0530

----------------------------------------------------------------------
 dashboardv2/public/js/utils/TableLayout.js | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/325f9da9/dashboardv2/public/js/utils/TableLayout.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/utils/TableLayout.js 
b/dashboardv2/public/js/utils/TableLayout.js
index 9f5db6f..150d690 100644
--- a/dashboardv2/public/js/utils/TableLayout.js
+++ b/dashboardv2/public/js/utils/TableLayout.js
@@ -626,6 +626,14 @@ define(['require',
             gotoPagebtn: function(e) {
                 var that = this;
                 var goToPage = parseInt(this.ui.gotoPage.val());
+                if (!_.isNaN(goToPage) && ((goToPage == 0) || 
(this.collection.state.totalPages < goToPage))) {
+                    Utils.notifyInfo({
+                        content: Messages.search.noRecordForPage + "page " + 
goToPage
+                    });
+                    this.ui.gotoPage.val('')
+                    that.ui.gotoPagebtn.attr('disabled', true);
+                    return;
+                }
                 if (!(_.isNaN(goToPage) || goToPage <= -1)) {
                     if (this.collection.mode == "client") {
                         return this.collection.getPage((goToPage - 1), {

Reply via email to