activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andytay...@apache.org
Subject [1/3] activemq-artemis git commit: ARTEMIS-2125 Queue preference changes to display columns not persistent through page refresh
Date Wed, 17 Oct 2018 09:15:40 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 0d89eb3c3 -> 66d5e4fbd


ARTEMIS-2125 Queue preference changes to display columns not persistent through page refresh


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/fe971a7a
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/fe971a7a
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/fe971a7a

Branch: refs/heads/master
Commit: fe971a7a976cf24c4fe1c05b976099e509ecde53
Parents: 0d89eb3
Author: Tadayoshi Sato <sato.tadayoshi@gmail.com>
Authored: Mon Oct 15 14:38:43 2018 +0900
Committer: Tadayoshi Sato <sato.tadayoshi@gmail.com>
Committed: Mon Oct 15 14:38:43 2018 +0900

----------------------------------------------------------------------
 .../src/main/webapp/plugin/js/queues.js          | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fe971a7a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/queues.js
----------------------------------------------------------------------
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 15f8bac..e43d88a 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
@@ -29,7 +29,7 @@ var ARTEMIS = (function(ARTEMIS) {
 
         var objectType = "queue";
         var method = 'listQueues(java.lang.String, int, int)';
-        var attributes = [
+        var defaultAttributes = [
             {
                 field: 'manage',
                 displayName: 'manage',
@@ -148,6 +148,23 @@ var ARTEMIS = (function(ARTEMIS) {
                 visible: false
             }
         ];
+        ARTEMIS.log.debug('sessionStorage: queuesColumnDefs =', sessionStorage.getItem('queuesColumnDefs'));
+        var attributes = defaultAttributes;
+        if (sessionStorage.getItem('queuesColumnDefs')) {
+            attributes = JSON.parse(sessionStorage.getItem('queuesColumnDefs'));
+        }
+        $scope.$on('ngGridEventColumns', function (newColumns) {
+            ARTEMIS.log.debug('ngGridEventColumns:', newColumns);
+            var visibles = newColumns.targetScope.columns.reduce(function (visibles, column)
{
+                visibles[column.field] = column.visible;
+                return visibles;
+            }, {});
+            ARTEMIS.log.debug('ngGridEventColumns: visibles =', visibles);
+            attributes.forEach(function (attribute) {
+                attribute.visible = visibles[attribute.field];
+            });
+            sessionStorage.setItem('queuesColumnDefs', JSON.stringify(attributes));
+        });
 
         $scope.filter = {
             fieldOptions: [


Mime
View raw message