From 2da8ee4d0fc851351f12f5facd7a4b1174a8e459 Mon Sep 17 00:00:00 2001 From: Alex Rudyy Date: Thu, 17 Oct 2013 16:36:11 +0000 Subject: QPID-5243: Upgrade dojo toolkit to 1.9.1 and fix the incompatibility issues in web management console git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1533143 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/resources/js/qpid/authorization/sasl.js | 15 +- .../java/resources/js/qpid/management/Queue.js | 6 +- .../src/main/java/resources/showExchange.html | 55 ++++--- .../src/main/java/resources/showQueue.html | 171 +++++++++++++-------- .../src/main/java/resources/showVirtualHost.html | 135 ++++++++++------ 5 files changed, 245 insertions(+), 137 deletions(-) (limited to 'qpid/java/broker-plugins/management-http') diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/authorization/sasl.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/authorization/sasl.js index 33e736322f..2d99f886ed 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/authorization/sasl.js +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/authorization/sasl.js @@ -18,7 +18,8 @@ * under the License. * */ -define(["dojo/_base/xhr", "dojox/encoding/base64", "dojox/encoding/digests/_base", "dojox/encoding/digests/MD5"], function () { +define(["dojo/_base/xhr", "dojox/encoding/base64", "dojox/encoding/digests/_base", "dojox/encoding/digests/MD5"], + function (xhr, base64, digestsBase, MD5) { var encodeUTF8 = function encodeUTF8(str) { var byteArray = []; @@ -65,7 +66,7 @@ var errorHandler = function errorHandler(error) var saslPlain = function saslPlain(user, password, callbackFunction) { var responseArray = [ 0 ].concat(encodeUTF8( user )).concat( [ 0 ] ).concat( encodeUTF8( password ) ); - var plainResponse = dojox.encoding.base64.encode(responseArray); + var plainResponse = base64.encode(responseArray); // Using dojo.xhrGet, as very little information is being sent dojo.xhrPost({ @@ -95,19 +96,19 @@ var saslCramMD5 = function saslCramMD5(user, password, saslMechanism, callbackFu }).then(function(data) { - var challengeBytes = dojox.encoding.base64.decode(data.challenge); + var challengeBytes = base64.decode(data.challenge); var wa=[]; var bitLength = challengeBytes.length*8; for(var i=0; i>5] |= (challengeBytes[i/8] & 0xFF)<<(i%32); } - var challengeStr = dojox.encoding.digests.wordToString(wa).substring(0,challengeBytes.length); + var challengeStr = digestsBase.wordToString(wa).substring(0,challengeBytes.length); - var digest = user + " " + dojox.encoding.digests.MD5._hmac(challengeStr, password, dojox.encoding.digests.outputTypes.Hex); + var digest = user + " " + MD5._hmac(challengeStr, password, digestsBase.outputTypes.Hex); var id = data.id; - var response = dojox.encoding.base64.encode(encodeUTF8( digest )); + var response = base64.encode(encodeUTF8( digest )); dojo.xhrPost({ // The URL of the request @@ -162,7 +163,7 @@ SaslClient.authenticate = function(username, password, callbackFunction) } else if (containsMechanism(mechMap, "CRAM-MD5-HEX")) { - var hashedPassword = dojox.encoding.digests.MD5(password, dojox.encoding.digests.outputTypes.Hex); + var hashedPassword = MD5(password, digestsBase.outputTypes.Hex); saslCramMD5(username, hashedPassword, "CRAM-MD5-HEX", callbackFunction); } else if (containsMechanism(mechMap, "PLAIN")) diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Queue.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Queue.js index 1a2283e07c..83974535a1 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Queue.js +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Queue.js @@ -390,10 +390,12 @@ define(["dojo/_base/xhr", var bindings = thisObj.queueData[ "bindings" ]; var consumers = thisObj.queueData[ "consumers" ]; - for(i=0; i < bindings.length; i++) { + if (bindings) + { + for(i=0; i < bindings.length; i++) { bindings[i].argumentString = json.stringify(bindings[i].arguments); + } } - thisObj.updateHeader(); diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/showExchange.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/showExchange.html index f33b029026..cdc88ece6a 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/showExchange.html +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/showExchange.html @@ -19,24 +19,43 @@ - -->
- Name: -
- State: -
- Durable: - Inbound: - - msg/s - - -
- Lifespan: - Dropped: - - msg/s - - -
+
+
+
Name:
+
+
+
+
State:
+
+
+
+
Durable:
+
+
+
+
Lifespan:
+
+
+
+
Inbound:
+
+ + msg/s + ( + ) +
+
+
+
Dropped:
+
+ + msg/s + ( + ) +
+
+
+

diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/showQueue.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/showQueue.html index c31cae6f8a..8d6741a981 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/showQueue.html +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/showQueue.html @@ -19,41 +19,81 @@ - -->
- Name: - Size: - - msgs - ( - ) -
- State: - Pre-fetched: - - msgs - - -
- Durable: - Inbound: - - msg/s - - -
- Lifespan: - Outbound: - - msg/s - - -
- AlternateExchange: - Type: - -
-
- Message Group Key: - Shared Message Groups: +
+
+
Name:
+
+
+
+
State:
+
+
+
+
Durable:
+
+
+
+
Lifespan:
+
+
+
+
Type:
+
+ + +
+
+
+
Size:
+
+ + msgs + ( + ) +
+
+
+
Pre-fetched:
+
+ + msgs + ( + ) +
+
+
+
Inbound:
+
+ + msg/s + ( + ) +
+
+
+
Outbound:
+
+ + msg/s + ( + ) +
+
+
+
AlternateExchange:
+
+
+
+
+
Message Group Key:
+
+
+
+
Shared Message Groups:
+
+
+
+

@@ -73,31 +113,42 @@

- Queue Depth: - - msgs - - Queue Depth: - - -
- Message Age: - - - - Message Size: - - -
-
- Alert frequency: - - +
+
Queue Depth:
+
+ + msgs +
+
+
+
Queue Depth:
+
+ + +
+
+
+
Message Age:
+
+ + +
+
+
+
Message Size:
+
+ + +
+
+
+
Alert frequency:
+
+ + +
+
+
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/showVirtualHost.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/showVirtualHost.html index 14833e0d2e..69856365db 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/showVirtualHost.html +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/showVirtualHost.html @@ -21,31 +21,55 @@ -->
- Name: -
- State: -
- Durable: - Inbound: - - msg/s - - -
- Lifespan: - Outbound: - - msg/s - - -
- Store Type: - Store Path: - -
- ConfigPath: -
- +
+
+
Name:
+
+
+
+
State:
+
+
+
+
Durable:
+
+
+
+
Lifespan:
+
+
+
+
Inbound:
+
+ + msg/s + + +
+
+
+
Outbound:
+
+ + msg/s + + +
+
+
+
Store Type:
+
+
+
+
Store Path:
+
+
+
+
Config Path:
+
+
+
+

@@ -64,31 +88,42 @@

- Queue Depth: - - msgs - - Queue Depth: - - -
- Message Age: - - - - Message Size: - - -
-
- Alert frequency: - - +
+
Queue Depth:
+
+ + msgs +
+
+
+
Queue Depth:
+
+ + +
+
+
+
Message Age:
+
+ + +
+
+
+
Message Size:
+
+ + +
+
+
+
Alert frequency:
+
+ + +
+
+
-- cgit v1.2.1