qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject [2/2] qpid-broker-j git commit: QPID-8224: [Broker-J][WMC] Add UI to configure exchange unroutable message behaviour for AMQP 1.0
Date Sun, 05 Aug 2018 21:29:39 GMT
QPID-8224: [Broker-J][WMC] Add UI to configure exchange unroutable message behaviour for AMQP
1.0


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/c0345228
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/c0345228
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/c0345228

Branch: refs/heads/master
Commit: c034522893685c8ee773c8600b6159b3f634138c
Parents: 42bbdb6
Author: Alex Rudyy <orudyy@apache.org>
Authored: Sun Aug 5 22:21:43 2018 +0100
Committer: Alex Rudyy <orudyy@apache.org>
Committed: Sun Aug 5 22:21:43 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/c0345228/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/c0345228/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/c0345228/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/c0345228/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


Mime
View raw message