You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2018/08/07 12:05:38 UTC

qpid-broker-j git commit: QPID-8224: [Broker-J][WMC] Add UI to configure exchange unroutable message behaviour for AMQP 1.0

Repository: qpid-broker-j
Updated Branches:
  refs/heads/7.0.x 603be3e7c -> 78748379f


QPID-8224: [Broker-J][WMC] Add UI to configure exchange unroutable message behaviour for AMQP 1.0

(cherry picked from commit c034522893685c8ee773c8600b6159b3f634138c)


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/78748379
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/78748379
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/78748379

Branch: refs/heads/7.0.x
Commit: 78748379fdc5f2d50003455cea2922e8f2a0aab8
Parents: 603be3e
Author: Alex Rudyy <or...@apache.org>
Authored: Sun Aug 5 22:21:43 2018 +0100
Committer: Alex Rudyy <or...@apache.org>
Committed: Tue Aug 7 12:51:37 2018 +0100

----------------------------------------------------------------------
 .../src/main/java/resources/addExchange.html      | 18 ++++++++++++++++--
 .../java/resources/js/qpid/management/Exchange.js |  4 +++-
 .../resources/js/qpid/management/addExchange.js   | 13 +++++++++++++
 .../src/main/java/resources/showExchange.html     |  4 ++++
 4 files changed, 36 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/78748379/broker-plugins/management-http/src/main/java/resources/addExchange.html
----------------------------------------------------------------------
diff --git a/broker-plugins/management-http/src/main/java/resources/addExchange.html b/broker-plugins/management-http/src/main/java/resources/addExchange.html
index e1e9461..bdbb6de 100644
--- a/broker-plugins/management-http/src/main/java/resources/addExchange.html
+++ b/broker-plugins/management-http/src/main/java/resources/addExchange.html
@@ -40,7 +40,7 @@
                 <div class="formLabel-labelCell">Exchange Type:</div>
                 <div class="formLabel-controlCell">
                     <select id="formAddExchange.type"
-                            dojoType="dijit.form.FilteringSelect"
+                            data-dojo-type="dijit.form.FilteringSelect"
                             data-dojo-props="
                               name: 'type',
                               promptMessage: 'Type of exchange - responsible for routing messages to queues'">
@@ -75,7 +75,21 @@
                                       title: 'Select an alternate binding to redirect messages to'"/>
                 </div>
             </div>
-
+            <div class="clear">
+                <div class="formLabel-labelCell">AMQP 1.0 Unroutable Message Behaviour:</div>
+                <div class="formLabel-controlCell">
+                    <select id="formAddExchange.unroutableMessageBehaviour"
+                            data-dojo-type="dijit.form.FilteringSelect"
+                            data-dojo-props="
+                              name: 'unroutableMessageBehaviour',
+                              required: false,
+                              value: null,
+                              promptMessage: 'Default behaviour to apply when a message is not routed to any queues'">
+                        <option value="DISCARD">DISCARD</option>
+                        <option value="REJECT">REJECT</option>
+                    </select>
+                </div>
+            </div>
             <div class="editorPanel clear"
                  data-dojo-type="dijit/TitlePane"
                  data-dojo-props="title: 'Context variables',  open: false">

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/78748379/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Exchange.js
----------------------------------------------------------------------
diff --git a/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Exchange.js b/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Exchange.js
index 7ddea2e..ced2a1f 100644
--- a/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Exchange.js
+++ b/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Exchange.js
@@ -211,7 +211,8 @@ define(["dojo/_base/xhr",
                         "state",
                         "durable",
                         "lifetimePolicy",
-                        "alternateBinding"]);
+                        "alternateBinding",
+                        "unroutableMessageBehaviour"]);
 
             that.exchangeData = {};
 
@@ -257,6 +258,7 @@ define(["dojo/_base/xhr",
             this.state.innerHTML = entities.encode(String(this.exchangeData["state"]));
             this.durable.innerHTML = entities.encode(String(this.exchangeData["durable"]));
             this.lifetimePolicy.innerHTML = entities.encode(String(this.exchangeData["lifetimePolicy"]));
+            this.unroutableMessageBehaviour.innerHTML = entities.encode(String(this.exchangeData["unroutableMessageBehaviour"]));
             this.alternateBinding.innerHTML =
                 this.exchangeData["alternateBinding"] && this.exchangeData["alternateBinding"]["destination"]
                     ? entities.encode(String(this.exchangeData["alternateBinding"]["destination"])) : "";

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/78748379/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addExchange.js
----------------------------------------------------------------------
diff --git a/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addExchange.js b/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addExchange.js
index 1a085ce..9ee592d 100644
--- a/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addExchange.js
+++ b/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addExchange.js
@@ -66,6 +66,7 @@ define(["dojo/dom",
             this.exchangeName.set("regExpGen", util.nameOrContextVarRegexp);
             this.exchangeType = registry.byId("formAddExchange.type");
             this.context = registry.byId("formAddExchange.context");
+            this.unroutableMessageBehaviour = registry.byId("formAddExchange.unroutableMessageBehaviour");
 
             registry.byId("formAddExchange.cancelButton")
                 .on("click", function (e)
@@ -116,6 +117,9 @@ define(["dojo/dom",
                 this.alternateBinding.loadData(management, effectiveData ? modelObj.parent : modelObj);
             this.form.reset();
 
+            var validUnroutableMessageBehaviourValues = this.management.metadata.getMetaData("Exchange","direct").attributes.unroutableMessageBehaviour.validValues;
+            var validUnroutableMessageBehaviourStore = util.makeTypeStore(validUnroutableMessageBehaviourValues);
+            this.unroutableMessageBehaviour.set("store", validUnroutableMessageBehaviourStore);
             if (effectiveData)
             {
                 this.effectiveData = effectiveData;
@@ -167,6 +171,15 @@ define(["dojo/dom",
                     this.alternateBinding.set("value", alternate.destination);
                 }
 
+                if (this.initialData && this.initialData.unroutableMessageBehaviour)
+                {
+                    this.unroutableMessageBehaviour.set("value", this.initialData.unroutableMessageBehaviour);
+                }
+                else
+                {
+                    this.unroutableMessageBehaviour.set("value", null);
+                }
+                this.unroutableMessageBehaviour.set("required", false);
                 registry.byId("addExchange").show();
             }));
         },

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/78748379/broker-plugins/management-http/src/main/java/resources/showExchange.html
----------------------------------------------------------------------
diff --git a/broker-plugins/management-http/src/main/java/resources/showExchange.html b/broker-plugins/management-http/src/main/java/resources/showExchange.html
index 1c2c9b5..0e57a40 100644
--- a/broker-plugins/management-http/src/main/java/resources/showExchange.html
+++ b/broker-plugins/management-http/src/main/java/resources/showExchange.html
@@ -42,6 +42,10 @@
                 <div class="formLabel-labelCell">Lifespan:</div>
                 <div class="lifetimePolicy formValue-valueCell"></div>
             </div>
+            <div class="clear">
+                <div class="formLabel-labelCell">AMQP 1.0 Unroutable Message Behaviour:</div>
+                <div class="unroutableMessageBehaviour formValue-valueCell"></div>
+            </div>
         </div>
         <div class="alignRight">
             <div class="clear">


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