You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ea...@apache.org on 2017/01/11 15:40:02 UTC

qpid-dispatch git commit: DISPATCH-607 Handle case when GET-MGMT-NODES returns empty list

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 296834374 -> 52ddd4745


DISPATCH-607 Handle case when GET-MGMT-NODES returns empty list


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

Branch: refs/heads/master
Commit: 52ddd47452a4bae7a105284c975107751fe797db
Parents: 2968343
Author: Ernest Allen <ea...@redhat.com>
Authored: Wed Jan 11 10:39:46 2017 -0500
Committer: Ernest Allen <ea...@redhat.com>
Committed: Wed Jan 11 10:39:46 2017 -0500

----------------------------------------------------------------------
 console/stand-alone/plugin/js/qdrService.js | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/52ddd474/console/stand-alone/plugin/js/qdrService.js
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/js/qdrService.js b/console/stand-alone/plugin/js/qdrService.js
index 44128bc..426d3dc 100644
--- a/console/stand-alone/plugin/js/qdrService.js
+++ b/console/stand-alone/plugin/js/qdrService.js
@@ -536,6 +536,14 @@ console.dump(e)
                 }
               }
               // add any new nodes
+              // if there is only one node, it will not be returned
+              if (response.length === 0) {
+                var parts = self.receiver.remote.attach.source.address.split('/')
+                parts[4] = '$management'
+                response.push(parts.join('/'))
+                QDR.log.debug("GET-MGMT-NODES returned an empty list. Using ")
+                console.dump(response)
+              }
               for (var i=0; i<response.length; ++i) {
                 if (!angular.isDefined(self.topology._nodeInfo[response[i]])) {
                   self.topology._nodeInfo[angular.copy(response[i])] = {};


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