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 2017/11/03 09:13:23 UTC
[3/3] qpid-broker-j git commit: QPID-8009:[Broker-J][WMC] Clear grid
selection on invoking operations to move/delete/clear messages
QPID-8009:[Broker-J][WMC] Clear grid selection on invoking operations to move/delete/clear messages
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/10d49a71
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/10d49a71
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/10d49a71
Branch: refs/heads/master
Commit: 10d49a71d39bdfb02dbc984521a027bf01c96862
Parents: d22f7a5
Author: Alex Rudyy <or...@apache.org>
Authored: Thu Nov 2 21:33:56 2017 +0000
Committer: Alex Rudyy <or...@apache.org>
Committed: Fri Nov 3 09:13:11 2017 +0000
----------------------------------------------------------------------
.../java/resources/js/qpid/management/Queue.js | 26 ++++++++++++++------
1 file changed, 18 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/10d49a71/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Queue.js
----------------------------------------------------------------------
diff --git a/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Queue.js b/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Queue.js
index 35d24dd..2bbc4ec 100644
--- a/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Queue.js
+++ b/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Queue.js
@@ -269,11 +269,14 @@ define(["dojo/_base/declare",
var parameters = {messageIds: []};
for (var i = 0; i < data.length; i++)
{
- parameters.messageIds.push(data[i].id);
+ if (data[i])
+ {
+ parameters.messageIds.push(data[i].id);
+ }
}
this.management.update(modelObj, parameters)
- .then(lang.hitch(this, function (result)
+ .then(lang.hitch(this, function ()
{
this.grid.selection.deselectAll();
this.reloadGridData();
@@ -290,7 +293,11 @@ define(["dojo/_base/declare",
name: "clearQueue",
parent: this.modelObj
};
- this.management.update(modelObj, {}).then(lang.hitch(this, this.reloadGridData));
+ this.management.update(modelObj, {}).then(lang.hitch(this, function ()
+ {
+ this.grid.selection.deselectAll();
+ this.reloadGridData();
+ }));
}
};
Queue.prototype.refreshMessages = function ()
@@ -310,7 +317,6 @@ define(["dojo/_base/declare",
};
Queue.prototype.moveOrCopyMessages = function (obj)
{
- var that = this;
var move = obj.move;
var data = this.grid.selection.getSelected();
if (data.length)
@@ -322,15 +328,19 @@ define(["dojo/_base/declare",
}
for (i = 0; i < data.length; i++)
{
- putData.messages.push(data[i].id);
+ if (data[i])
+ {
+ putData.messages.push(data[i].id);
+ }
}
- moveMessages.show(that.management, that.modelObj, putData, function ()
+ moveMessages.show(this.management, this.modelObj, putData, lang.hitch(this, function ()
{
if (move)
{
- that.reloadGridData();
+ this.grid.selection.deselectAll();
+ this.reloadGridData();
}
- });
+ }));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org