From b8e034a771994585028421e9c2781d7ad581c95a Mon Sep 17 00:00:00 2001 From: Robert Gemmell Date: Thu, 19 Jul 2012 11:23:15 +0000 Subject: QPID-4150: Display the name of queue type key(sortKey,priorities,lvqKey) and its value Applied patch from Oleksandr Rudyy git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1363297 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/resources/js/qpid/management/Queue.js | 27 ++++++++++++++++++++-- .../src/main/java/resources/showQueue.html | 2 ++ 2 files changed, 27 insertions(+), 2 deletions(-) (limited to 'java/broker-plugins') diff --git a/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Queue.js b/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Queue.js index 745ce07012..3ac8b0057d 100644 --- a/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Queue.js +++ b/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Queue.js @@ -232,6 +232,18 @@ define(["dojo/_base/xhr", updater.remove( this.queueUpdater ); }; + var queueTypeKeys = { + priority: "priorities", + lvq: "lvqKey", + sorted: "sortKey" + }; + + var queueTypeKeyNames = { + priority: "Number of priorities", + lvq: "LVQ key", + sorted: "Sort key" + }; + function QueueUpdater(containerNode, queueObj, controller) { var that = this; @@ -252,6 +264,8 @@ define(["dojo/_base/xhr", "durable", "lifetimePolicy", "type", + "keyName", + "keyValue", "alertRepeatGap", "alertRepeatGapUnits", "alertThresholdMessageAge", @@ -325,8 +339,17 @@ define(["dojo/_base/xhr", this.unacknowledgedMessages.innerHTML = this.queueData["unacknowledgedMessages"]; bytesDepth = formatter.formatBytes( this.queueData["unacknowledgedBytes"] ); this.unacknowledgedBytes.innerHTML = "(" + bytesDepth.value; - this.unacknowledgedBytesUnits.innerHTML = bytesDepth.units + ")" - + this.unacknowledgedBytesUnits.innerHTML = bytesDepth.units + ")"; + if (this.queueData.type == "standard") + { + this.keyName.style.display = "none"; + this.keyValue.style.display = "none"; + } + else + { + this.keyName.innerHTML = queueTypeKeyNames[this.queueData.type] + ":"; + this.keyValue.innerHTML = this.queueData[queueTypeKeys[this.queueData.type]]; + } }; diff --git a/java/broker-plugins/management-http/src/main/java/resources/showQueue.html b/java/broker-plugins/management-http/src/main/java/resources/showQueue.html index da607dea2f..3be53a45a2 100644 --- a/java/broker-plugins/management-http/src/main/java/resources/showQueue.html +++ b/java/broker-plugins/management-http/src/main/java/resources/showQueue.html @@ -48,6 +48,8 @@
Type: + +

-- cgit v1.2.1