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-484 Upate console icons
Date Mon, 29 Aug 2016 15:09:01 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 5a632dac1 -> 3c2765ab7


DISPATCH-484 Upate console icons


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

Branch: refs/heads/master
Commit: 3c2765ab715ee3c01d1bd1eca39b7c151231b56a
Parents: 5a632da
Author: Ernest Allen <eallen@redhat.com>
Authored: Mon Aug 29 11:08:42 2016 -0400
Committer: Ernest Allen <eallen@redhat.com>
Committed: Mon Aug 29 11:08:42 2016 -0400

----------------------------------------------------------------------
 console/stand-alone/plugin/css/plugin.css    | 38 +++++++++++++++++------
 console/stand-alone/plugin/js/qdrList.js     | 18 ++++++++---
 console/stand-alone/plugin/js/qdrOverview.js | 29 ++++++++---------
 console/stand-alone/plugin/js/qdrService.js  | 20 +++++++++++-
 4 files changed, 75 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c2765ab/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 8baac19..c55a1a6 100644
--- a/console/stand-alone/plugin/css/plugin.css
+++ b/console/stand-alone/plugin/css/plugin.css
@@ -672,12 +672,22 @@ span:not(.dynatree-has-children).address .dynatree-icon:before,
 span:not(.dynatree-has-children).router\.address .dynatree-icon:before {
     content: "\f0ac";
 }
+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.router .dynatree-icon:before,
+span:not(.dynatree-has-children).router\.address.router .dynatree-icon:before {
+    content: "\f047";
+}
 
 span.address-link .dynatree-icon:before {
     content: "\f0ac";
 }
 
-span:not(.dynatree-has-children).connection.external .dynatree-icon:before,
+span:not(.dynatree-has-children).connection.external .dynatree-icon:before {
+    content: "\f109";
+}
 span:not(.dynatree-has-children).connection.normal .dynatree-icon:before {
     content: "\f08e";
 }
@@ -685,9 +695,8 @@ span:not(.dynatree-has-children).connection.external.quiesced .dynatree-icon:bef
 	content: "\f14c";
 	color: red;
 }
-
 span:not(.dynatree-has-children).connection.inter-router .dynatree-icon:before {
-     content: "\f152";
+     content: "\f07e";
 }
 span:not(.dynatree-has-children).no-data .dynatree-icon:before {
      content: "\f05e";
@@ -696,9 +705,6 @@ span:not(.dynatree-has-children).no-data .dynatree-icon:before {
 span:not(.dynatree-has-children).loading .dynatree-icon:before {
      content: "\f254";
 }
-span:not(.dynatree-has-children).router\.node .dynatree-icon:before {
-     content: "\f013";
-}
 span:not(.dynatree-has-children).connector .dynatree-icon:before {
      content: "\f126";
 }
@@ -708,11 +714,20 @@ span:not(.dynatree-has-children).container .dynatree-icon:before {
 span:not(.dynatree-has-children).log .dynatree-icon:before {
      content: "\f0f6";
 }
-span:not(.dynatree-has-children).router\.link.inter-router .dynatree-icon:before {
-     content: "\f04e";
+span:not(.dynatree-has-children).router\.node .dynatree-icon:before {
+     content: "\f013";
 }
-span:not(.dynatree-has-children).router\.link.endpoint .dynatree-icon:before {
-     content: "\f051";
+span:not(.dynatree-has-children).link.inter-router .dynatree-icon:before,
+span:not(.dynatree-has-children).router\.link.inter-router .dynatree-icon:before{
+     content: "\f07e";
+}
+span:not(.dynatree-has-children).link.endpoint .dynatree-icon:before,
+span:not(.dynatree-has-children).router\.link.endpoint .dynatree-icon:before{
+     content: "\f109";
+}
+span:not(.dynatree-has-children).link.console .dynatree-icon:before,
+span:not(.dynatree-has-children).router\.link.console .dynatree-icon:before {
+     content: "\f108";
 }
 span:not(.dynatree-has-children).listener .dynatree-icon:before {
      content: "\f025";
@@ -720,6 +735,9 @@ span:not(.dynatree-has-children).listener .dynatree-icon:before {
 span:not(.dynatree-has-children).connection .dynatree-icon:before {
      content: "\f07e";
 }
+span:not(.dynatree-has-children).connection.console .dynatree-icon:before {
+     content: "\f108";
+}
 span:not(.dynatree-has-children).waypoint .dynatree-icon:before {
      content: "\f0ec";
 }

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c2765ab/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 b65fe39..179159a 100644
--- a/console/stand-alone/plugin/js/qdrList.js
+++ b/console/stand-alone/plugin/js/qdrList.js
@@ -155,11 +155,18 @@ var QDR = (function(QDR) {
 		var excludedEntities = ["management", "org.amqp.management", "operationalEntity", "entity",
"configurationEntity", "dummy", "console"];
 		var aggregateEntities = ["router.address"];
 		var classOverrides = {
-			"connection": function (row) {
-				return row.role.value;
+			"connection": function (row, nodeId) {
+				var isConsole = QDRService.isAConsole (row.properties.value, row.identity.value, row.role.value,
nodeId)
+				return isConsole ? "console" : row.role.value === "inter-router" ? "inter-router" : "external";
 			},
-			"router.link": function (row) {
-				return row.linkType.value;
+			"router.link": function (row, nodeId) {
+				var link = {nodeId: nodeId, connectionId: row.connectionId.value}
+				var isConsole = QDRService.isConsoleLink(link)
+				return isConsole ? "console" : row.linkType.value;
+			},
+			"router.address": function (row) {
+				var identity = QDRService.identity_clean(row.identity.value)
+				return QDRService.addr_class(identity)
 			}
 		}
 
@@ -298,11 +305,12 @@ var QDR = (function(QDR) {
 				tableRows.forEach( function (row) {
 					var addClass = entity;
 					if (classOverrides[entity]) {
-						addClass += " " + classOverrides[entity](row);
+						addClass += " " + classOverrides[entity](row, $scope.currentNode.id);
 					}
 					var child = {
                         typeName:   "attribute",
                         addClass:   addClass,
+                        tooltip:    addClass,
                         key:        row.name.value,
                         title:      row.name.value,
                         details:    row

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c2765ab/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 2443de0..3adb6a6 100644
--- a/console/stand-alone/plugin/js/qdrOverview.js
+++ b/console/stand-alone/plugin/js/qdrOverview.js
@@ -339,15 +339,6 @@ var QDR = (function (QDR) {
 		        return ''
 			}
 
-			var identity_clean = function (identity) {
-		        if (!identity)
-		            return "-"
-		        var pos = identity.indexOf('/')
-		        if (pos >= 0)
-		            return identity.substring(pos + 1)
-		        return identity
-			}
-
 			var addressFields = []
 			QDRService.getMultipleNodeInfo(nodeIds, "router.address", [], function (nodeIds, entity,
response) {
 				response.aggregates.forEach( function (result) {
@@ -361,11 +352,11 @@ var QDR = (function (QDR) {
 					}
 
 					var uid = QDRService.valFor(response.attributeNames, result, "identity").sum
-					var identity = identity_clean(uid)
+					var identity = QDRService.identity_clean(uid)
 
 					addressFields.push({
 						address: addr_text(identity),
-						'class': addr_class(identity),
+						'class': QDRService.addr_class(identity),
 						phase:   addr_phase(identity),
 						inproc:  prettySum("inProcess"),
 						local:   prettySum("subscriberCount"),
@@ -1158,7 +1149,8 @@ var QDR = (function (QDR) {
 				a.key = address.uid
 				a.fields = address
 				a.type = "Address"
-				a.addClass = "address"
+				a.tooltip = address['class'] + " address"
+				a.addClass = a.tooltip
 				a.activate = lastKey === address.uid
 				a.parent = "Addresses"
 				return a;
@@ -1195,13 +1187,18 @@ var QDR = (function (QDR) {
 		var updateLinkTree = function (linkFields) {
 			var worker = function (link) {
 				var l = new Folder(link.title)
+				var isConsole = QDRService.isConsoleLink(link)
 				l.info = linkInfo
 				l.key = link.uid
 				l.fields = link
 				l.type = "Link"
 				l.parent = "Links"
 				l.activate = lastKey === link.uid
-				l.addClass = "link"
+				if (isConsole)
+					l.tooltip = "console link"
+				else
+					l.tooltip = link.linkType  + " link"
+				l.addClass = l.tooltip
 				return l;
 			}
 			updateLeaves(linkFields, "Links", links, worker)
@@ -1222,11 +1219,15 @@ var QDR = (function (QDR) {
 		updateConnectionTree = function (connectionFields) {
 			var worker = function (connection) {
 				var c = new Folder(connection.host)
+				var isConsole = QDRService.isAConsole (connection.properties, connection.identity, connection.role,
connection.routerId)
 				c.type = "Connection"
 				c.info = connectionInfo
 				c.key = connection.uid
 				c.fields = connection
-				c.tooltip = connection.role === "inter-router" ? "inter-router connection" : "external
connection"
+				if (isConsole)
+					c.tooltip = "console connection"
+				else
+					c.tooltip = connection.role === "inter-router" ? "inter-router connection" : "external
connection"
 				c.addClass = c.tooltip
 				c.parent = "Connections"
 				c.activate = lastKey === connection.uid

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3c2765ab/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 b219967..e0d5ac2 100644
--- a/console/stand-alone/plugin/js/qdrService.js
+++ b/console/stand-alone/plugin/js/qdrService.js
@@ -352,7 +352,25 @@ var QDR = (function(QDR) {
 			var attributes = {adminStatus: 'disabled', name: name};
 			self.sendMethod(nodeId, "router.link", attributes, "UPDATE", gotMethodResponse)
 		},
-
+		addr_class: function (addr) {
+			if (!addr) return "-"
+	        if (addr[0] == 'M')  return "mobile"
+	        if (addr[0] == 'R')  return "router"
+	        if (addr[0] == 'A')  return "area"
+	        if (addr[0] == 'L')  return "local"
+	        if (addr[0] == 'C')  return "link-incoming"
+	        if (addr[0] == 'D')  return "link-outgoing"
+	        if (addr[0] == 'T')  return "topo"
+	        return "unknown: " + addr[0]
+		},
+		identity_clean: function (identity) {
+	        if (!identity)
+	            return "-"
+	        var pos = identity.indexOf('/')
+	        if (pos >= 0)
+	            return identity.substring(pos + 1)
+	        return identity
+		},
 
       /*
        * send the management messages that build up the topology


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


Mime
View raw message