ATLAS-3025 : UI - If go to page is more/less then the available page limit then an error appears in the console
Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/b455040d Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/b455040d Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/b455040d Branch: refs/heads/master Commit: b455040d06be2c6330dfb0b11e34c6ea480a0b7c Parents: e8b3277 Author: kevalbhatt <kbh...@apache.org> Authored: Thu Jan 10 18:11:11 2019 +0530 Committer: kevalbhatt <kbh...@apache.org> Committed: Thu Jan 10 19:26:35 2019 +0530 ---------------------------------------------------------------------- dashboardv2/public/js/utils/TableLayout.js | 8 ++++++++ 1 file changed, 8 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/atlas/blob/b455040d/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), {