Repository: qpid-dispatch
Updated Branches:
  refs/heads/master cf2cacd98 -> cca46e324


DISPATCH-348: Use deprecated flag to filter out deprecated entities and 
attributes


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/cca46e32
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/cca46e32
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/cca46e32

Branch: refs/heads/master
Commit: cca46e3244747c8a40c226dd0ef858fcaf4f80d5
Parents: cf2cacd
Author: Ernest Allen <eal...@redhat.com>
Authored: Fri Jun 17 13:37:13 2016 -0400
Committer: Ernest Allen <eal...@redhat.com>
Committed: Fri Jun 17 13:37:13 2016 -0400

----------------------------------------------------------------------
 .../hawtio/src/main/webapp/plugin/js/qdrService.js  | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/cca46e32/console/hawtio/src/main/webapp/plugin/js/qdrService.js
----------------------------------------------------------------------
diff --git a/console/hawtio/src/main/webapp/plugin/js/qdrService.js 
b/console/hawtio/src/main/webapp/plugin/js/qdrService.js
index 55b2f71..0c4dc98 100644
--- a/console/hawtio/src/main/webapp/plugin/js/qdrService.js
+++ b/console/hawtio/src/main/webapp/plugin/js/qdrService.js
@@ -590,6 +590,22 @@ var QDR = (function(QDR) {
             ret = self.sendMgmtQuery('GET-SCHEMA')
         ).then(ret.id, function(response) {
             //QDR.log.debug("Got schema response");
+                       // remove deprecated
+                       for (var entityName in response.entityTypes) {
+                               var entity = response.entityTypes[entityName]
+                               if (entity.deprecated) {
+                                       // deprecated entity
+                                   delete response.entityTypes[entityName]
+                               } else {
+                                       for (var attributeName in 
entity.attributes) {
+                                               var attribute = 
entity.attributes[attributeName]
+                                               if (attribute.deprecated) {
+                                                       // deprecated attribute
+                                                       delete 
response.entityTypes[entityName].attributes[attributeName]
+                                               }
+                                       }
+                               }
+                       }
                        self.schema = response;
             //self.schema = angular.copy(response);
             //self.topology.cleanUp(response);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to