From 06d27b4045529bdd92fb395d1f7cc7a523a2b04a Mon Sep 17 00:00:00 2001 From: Stanislav Knot Date: Tue, 9 Jan 2018 17:17:49 +0100 Subject: [PATCH] ARTEMIS-1580 Browsing in hawtio console does not allow to show empty pages --- .../artemis-plugin/src/main/webapp/plugin/js/addresses.js | 3 +++ .../artemis-plugin/src/main/webapp/plugin/js/connections.js | 3 +++ .../artemis-plugin/src/main/webapp/plugin/js/consumers.js | 3 +++ .../artemis-plugin/src/main/webapp/plugin/js/producers.js | 3 +++ .../artemis-plugin/src/main/webapp/plugin/js/queues.js | 3 +++ .../artemis-plugin/src/main/webapp/plugin/js/sessions.js | 3 +++ 6 files changed, 18 insertions(+) diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/addresses.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/addresses.js index ea196aca7a..c321acb93a 100644 --- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/addresses.js +++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/addresses.js @@ -186,6 +186,9 @@ var ARTEMIS = (function(ARTEMIS) { if (parseInt(newVal.currentPage) && newVal !== oldVal && newVal.currentPage !== oldVal.currentPage) { $scope.loadTable(); } + if (parseInt(newVal.pageSize) && newVal !== oldVal && newVal.pageSize !== oldVal.pageSize) { + $scope.pagingOptions.currentPage = 1; + } }, true); function getBrokerMBean(jolokia) { diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/connections.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/connections.js index b6041c27d1..a63d58187a 100644 --- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/connections.js +++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/connections.js @@ -223,6 +223,9 @@ var ARTEMIS = (function(ARTEMIS) { if (parseInt(newVal.currentPage) && newVal !== oldVal && newVal.currentPage !== oldVal.currentPage) { $scope.loadTable(); } + if (parseInt(newVal.pageSize) && newVal !== oldVal && newVal.pageSize !== oldVal.pageSize) { + $scope.pagingOptions.currentPage = 1; + } }, true); function getBrokerMBean(jolokia) { diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/consumers.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/consumers.js index c0e27a2084..8273676aa2 100644 --- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/consumers.js +++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/consumers.js @@ -247,6 +247,9 @@ var ARTEMIS = (function(ARTEMIS) { if (parseInt(newVal.currentPage) && newVal !== oldVal && newVal.currentPage !== oldVal.currentPage) { $scope.loadTable(); } + if (parseInt(newVal.pageSize) && newVal !== oldVal && newVal.pageSize !== oldVal.pageSize) { + $scope.pagingOptions.currentPage = 1; + } }, true); function getBrokerMBean(jolokia) { diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/producers.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/producers.js index 33f8e3e01e..4f3037640d 100644 --- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/producers.js +++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/producers.js @@ -212,6 +212,9 @@ var ARTEMIS = (function(ARTEMIS) { if (parseInt(newVal.currentPage) && newVal !== oldVal && newVal.currentPage !== oldVal.currentPage) { $scope.loadTable(); } + if (parseInt(newVal.pageSize) && newVal !== oldVal && newVal.pageSize !== oldVal.pageSize) { + $scope.pagingOptions.currentPage = 1; + } }, true); function getBrokerMBean(jolokia) { diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/queues.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/queues.js index 241e0d788f..204b12d87d 100644 --- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/queues.js +++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/queues.js @@ -286,6 +286,9 @@ var ARTEMIS = (function(ARTEMIS) { if (parseInt(newVal.currentPage) && newVal !== oldVal && newVal.currentPage !== oldVal.currentPage) { $scope.loadTable(); } + if (parseInt(newVal.pageSize) && newVal !== oldVal && newVal.pageSize !== oldVal.pageSize) { + $scope.pagingOptions.currentPage = 1; + } }, true); function getBrokerMBean(jolokia) { diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/sessions.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/sessions.js index 20aa7525a2..199f1d6387 100644 --- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/sessions.js +++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/sessions.js @@ -242,6 +242,9 @@ var ARTEMIS = (function(ARTEMIS) { if (parseInt(newVal.currentPage) && newVal !== oldVal && newVal.currentPage !== oldVal.currentPage) { $scope.loadTable(); } + if (parseInt(newVal.pageSize) && newVal !== oldVal && newVal.pageSize !== oldVal.pageSize) { + $scope.pagingOptions.currentPage = 1; + } }, true); function getBrokerMBean(jolokia) {