qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eal...@apache.org
Subject qpid-dispatch git commit: DISPATCH-485 Use the new id attribute for router instead of routerId
Date Mon, 29 Aug 2016 20:09:24 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 4671aa0b4 -> 87cbf482f


DISPATCH-485 Use the new id attribute for router instead of routerId


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

Branch: refs/heads/master
Commit: 87cbf482f7521e0040408ff27c762b2d62bb93c2
Parents: 4671aa0
Author: Ernest Allen <eallen@redhat.com>
Authored: Mon Aug 29 16:09:04 2016 -0400
Committer: Ernest Allen <eallen@redhat.com>
Committed: Mon Aug 29 16:09:04 2016 -0400

----------------------------------------------------------------------
 .../src/main/webapp/plugin/js/dispatchPlugin.js |  2 +-
 console/stand-alone/plugin/css/plugin.css       |  4 ++++
 .../stand-alone/plugin/html/qdrOverview.html    |  8 +++----
 console/stand-alone/plugin/js/qdrList.js        |  6 ++++-
 console/stand-alone/plugin/js/qdrOverview.js    | 24 ++++++++------------
 console/stand-alone/plugin/js/qdrService.js     |  8 +++++++
 6 files changed, 32 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/87cbf482/console/hawtio/src/main/webapp/plugin/js/dispatchPlugin.js
----------------------------------------------------------------------
diff --git a/console/hawtio/src/main/webapp/plugin/js/dispatchPlugin.js b/console/hawtio/src/main/webapp/plugin/js/dispatchPlugin.js
index 9383f06..44ff2c6 100644
--- a/console/hawtio/src/main/webapp/plugin/js/dispatchPlugin.js
+++ b/console/hawtio/src/main/webapp/plugin/js/dispatchPlugin.js
@@ -179,8 +179,8 @@ var QDR = (function(QDR) {
 			if (lastLocation === '')
 				lastLocation = "overview"
 		}
-		$location.path(QDR.pluginRoot + "/connect");
 		if (curPath.startsWith(QDR.pluginRoot)) {
+			$location.path(QDR.pluginRoot + "/connect");
 			var org = curPath.substr(QDR.pluginRoot.length + 1)
 			if (org === '') {
 				org = lastLocation

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/87cbf482/console/stand-alone/plugin/css/plugin.css
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/css/plugin.css b/console/stand-alone/plugin/css/plugin.css
index c55a1a6..33d44ab 100644
--- a/console/stand-alone/plugin/css/plugin.css
+++ b/console/stand-alone/plugin/css/plugin.css
@@ -676,6 +676,10 @@ span:not(.dynatree-has-children).address.mobile .dynatree-icon:before,
 span:not(.dynatree-has-children).router\.address.mobile .dynatree-icon:before {
     content: "\f109";
 }
+span:not(.dynatree-has-children).address.internal.mobile .dynatree-icon:before,
+span:not(.dynatree-has-children).router\.address.internal.mobile .dynatree-icon:before {
+    content: "\f0ac";
+}
 span:not(.dynatree-has-children).address.router .dynatree-icon:before,
 span:not(.dynatree-has-children).router\.address.router .dynatree-icon:before {
     content: "\f047";

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/87cbf482/console/stand-alone/plugin/html/qdrOverview.html
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/html/qdrOverview.html b/console/stand-alone/plugin/html/qdrOverview.html
index f9ba6a5..a2430f0 100644
--- a/console/stand-alone/plugin/html/qdrOverview.html
+++ b/console/stand-alone/plugin/html/qdrOverview.html
@@ -52,11 +52,11 @@ under the License.
         <ul class="nav nav-tabs">
             <li ng-repeat="mode in gridModes" ng-click="selectMode(mode,'Address')" ng-class="{active
: isModeSelected(mode,'Address')}" title="{{mode.title}}" ng-bind-html-unsafe="mode.content">
</li>
         </ul>
-        <div ng-show="isModeVisible('Address','attributes')" class="selectedItems">
+        <div ng-if="isModeVisible('Address','attributes')" class="selectedItems">
             <h3>Address {{address.data.title}}</h3>
             <div class="gridStyle noHighlight" ng-grid="addressGrid"></div>
         </div>
-        <div ng-show="isModeVisible('Address','links')" class="selectedItems">
+        <div ng-if="isModeVisible('Address','links')" class="selectedItems">
             <h3>Links for address {{address.data.title}}</h3>
             <div class="gridStyle" ng-grid="linksGrid"></div>
         </div>
@@ -98,11 +98,11 @@ under the License.
         <ul class="nav nav-tabs">
             <li ng-repeat="mode in gridModes" ng-click="selectMode(mode,'Connection')"
ng-class="{active : isModeSelected(mode,'Connection')}" title="{{mode.title}}" ng-bind-html-unsafe="mode.content">
</li>
         </ul>
-        <div ng-show="isModeVisible('Connection','attributes')" class="selectedItems">
+        <div ng-if="isModeVisible('Connection','attributes')" class="selectedItems">
             <h3>Connection {{connection.data.title}}</h3>
             <div class="gridStyle noHighlight" ng-grid="connectionGrid"></div>
         </div>
-        <div ng-show="isModeVisible('Connection','links')" class="selectedItems">
+        <div ng-if="isModeVisible('Connection','links')" class="selectedItems">
             <h3>Links for connection {{connection.data.title}}</h3>
             <div class="gridStyle" ng-grid="linksGrid"></div>
         </div>

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/87cbf482/console/stand-alone/plugin/js/qdrList.js
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/js/qdrList.js b/console/stand-alone/plugin/js/qdrList.js
index 179159a..60107b7 100644
--- a/console/stand-alone/plugin/js/qdrList.js
+++ b/console/stand-alone/plugin/js/qdrList.js
@@ -166,7 +166,11 @@ var QDR = (function(QDR) {
 			},
 			"router.address": function (row) {
 				var identity = QDRService.identity_clean(row.identity.value)
-				return QDRService.addr_class(identity)
+				var address = QDRService.addr_text(identity)
+				var cls = QDRService.addr_class(identity)
+				if (address === "$management")
+					cls = "internal " + cls
+				return cls
 			}
 		}
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/87cbf482/console/stand-alone/plugin/js/qdrOverview.js
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/js/qdrOverview.js b/console/stand-alone/plugin/js/qdrOverview.js
index 3adb6a6..3312d9f 100644
--- a/console/stand-alone/plugin/js/qdrOverview.js
+++ b/console/stand-alone/plugin/js/qdrOverview.js
@@ -169,12 +169,13 @@ var QDR = (function (QDR) {
 					QDRService.getMultipleNodeInfo(nodeIds, "router", [], function (nodeIds, entity, responses)
{
 						for(var r in responses) {
 							var result = responses[r]
-							var routerId = QDRService.valFor(result.attributeNames, result.results[0], "routerId")
+							var routerId = QDRService.valFor(result.attributeNames, result.results[0], "id")
 							allRouterFields.some( function (connField) {
 								if (routerId === connField.routerId) {
 									result.attributeNames.forEach ( function (attrName) {
 										connField[attrName] = QDRService.valFor(result.attributeNames, result.results[0],
attrName)
 									})
+									connField['routerId'] = connField.id
 									return true
 								}
 								return false
@@ -220,8 +221,10 @@ var QDR = (function (QDR) {
 			$scope.allRouterFields.some( function (field) {
 				if (field.routerId === node.data.title) {
 					Object.keys(field).forEach ( function (key) {
-						if (key !== '$$hashKey')
-							$scope.routerFields.push({attribute: key, value: field[key]})
+						if (key !== '$$hashKey') {
+							var attr = (key === 'connections') ? 'External connections' : key
+							$scope.routerFields.push({attribute: attr, value: field[key]})
+						}
 					})
 					return true
 				}
@@ -322,15 +325,6 @@ var QDR = (function (QDR) {
 		        return "unknown: " + addr[0]
 			}
 
-			var addr_text = function (addr) {
-		        if (!addr)
-		            return "-"
-		        if (addr[0] == 'M')
-		            return addr.substring(2)
-		        else
-		            return addr.substring(1)
-			}
-
 			var addr_phase = function (addr) {
 		        if (!addr)
 		            return "-"
@@ -355,7 +349,7 @@ var QDR = (function (QDR) {
 					var identity = QDRService.identity_clean(uid)
 
 					addressFields.push({
-						address: addr_text(identity),
+						address: QDRService.addr_text(identity),
 						'class': QDRService.addr_class(identity),
 						phase:   addr_phase(identity),
 						inproc:  prettySum("inProcess"),
@@ -683,7 +677,7 @@ var QDR = (function (QDR) {
             afterSelectionChange: function(data) {
                 if (data.selected) {
                     var selItem = $scope.allConnectionSelections[0]
-                    var nodeId = selItem.host
+                    var nodeId = selItem.uid
                     // activate Routers->nodeId in the tree
                     $("#overtree").dynatree("getTree").activateKey(nodeId);
                 }
@@ -1150,6 +1144,8 @@ var QDR = (function (QDR) {
 				a.fields = address
 				a.type = "Address"
 				a.tooltip = address['class'] + " address"
+				if (address.address === '$management')
+					a.tooltip = "internal " + a.tooltip
 				a.addClass = a.tooltip
 				a.activate = lastKey === address.uid
 				a.parent = "Addresses"

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/87cbf482/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 e0d5ac2..d74baaa 100644
--- a/console/stand-alone/plugin/js/qdrService.js
+++ b/console/stand-alone/plugin/js/qdrService.js
@@ -352,6 +352,14 @@ var QDR = (function(QDR) {
 			var attributes = {adminStatus: 'disabled', name: name};
 			self.sendMethod(nodeId, "router.link", attributes, "UPDATE", gotMethodResponse)
 		},
+		addr_text: function (addr) {
+	        if (!addr)
+	            return "-"
+	        if (addr[0] == 'M')
+	            return addr.substring(2)
+	        else
+	            return addr.substring(1)
+		},
 		addr_class: function (addr) {
 			if (!addr) return "-"
 	        if (addr[0] == 'M')  return "mobile"


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


Mime
View raw message