You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by kb...@apache.org on 2019/01/10 15:14:55 UTC

[3/3] atlas git commit: ATLAS-3025 : UI - If go to page is more/less then the available page limit then an error appears in the console

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/f397d1e1
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/f397d1e1
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/f397d1e1

Branch: refs/heads/branch-0.8
Commit: f397d1e1df61a27c002c52b247ad22054c31502c
Parents: a35379c
Author: kevalbhatt <kb...@apache.org>
Authored: Thu Jan 10 18:11:11 2019 +0530
Committer: kevalbhatt <kb...@apache.org>
Committed: Thu Jan 10 20:44:31 2019 +0530

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


http://git-wip-us.apache.org/repos/asf/atlas/blob/f397d1e1/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), {