You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2017/09/18 15:09:17 UTC
qpid-broker-j git commit: QPID-7772: [Java Broker] Prevent
unintentional sharing of statistic value/previous value stores between
sibling objects
Repository: qpid-broker-j
Updated Branches:
refs/heads/master 857720328 -> 5d97850ba
QPID-7772: [Java Broker] Prevent unintentional sharing of statistic value/previous value stores between sibling objects
Also fixed display of data values within the msgBytePairPointInTimeStatisticsGrid
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/5d97850b
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/5d97850b
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/5d97850b
Branch: refs/heads/master
Commit: 5d97850ba3a048c3c6aa5a751827426f69af19ba
Parents: 8577203
Author: Keith Wall <kw...@apache.org>
Authored: Mon Sep 18 14:37:12 2017 +0100
Committer: Keith Wall <kw...@apache.org>
Committed: Mon Sep 18 16:09:09 2017 +0100
----------------------------------------------------------------------
.../resources/js/qpid/common/StatisticsWidget.js | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/5d97850b/broker-plugins/management-http/src/main/java/resources/js/qpid/common/StatisticsWidget.js
----------------------------------------------------------------------
diff --git a/broker-plugins/management-http/src/main/java/resources/js/qpid/common/StatisticsWidget.js b/broker-plugins/management-http/src/main/java/resources/js/qpid/common/StatisticsWidget.js
index 3f6fc74..44dc127 100644
--- a/broker-plugins/management-http/src/main/java/resources/js/qpid/common/StatisticsWidget.js
+++ b/broker-plugins/management-http/src/main/java/resources/js/qpid/common/StatisticsWidget.js
@@ -131,7 +131,7 @@ define(["dojox/lang/functional/object",
};
this._msgBytePairCumulativeStatisticsGrid =
- new Grid(lang.mixin(gridProps, {
+ new Grid(lang.mixin(lang.clone(gridProps), {
collection: this._pairedStatsStore.filter({statisticType : "CUMULATIVE"})
.filter(lang.hitch(this, defaultFilter)),
columns: [{
@@ -153,7 +153,7 @@ define(["dojox/lang/functional/object",
}), this.msgBytePairCumulativeStatisticsGridContainer);
this._otherCumulativeStatisticsGrid =
- new Grid(lang.mixin(gridProps, {
+ new Grid(lang.mixin(lang.clone(gridProps), {
collection: this._otherStatsStore.filter({statisticType: "CUMULATIVE"})
.filter(lang.hitch(this, defaultFilter)),
columns: [{
@@ -169,7 +169,7 @@ define(["dojox/lang/functional/object",
}), this.otherCumulativeStatisticsGridContainer);
this._msgBytePairPointInTimeStatisticsGrid =
- new Grid(lang.mixin(gridProps, {
+ new Grid(lang.mixin(lang.clone(gridProps), {
collection: this._pairedStatsStore.filter({statisticType : "POINT_IN_TIME"})
.filter(lang.hitch(this, defaultFilter)),
columns: [{
@@ -177,15 +177,15 @@ define(["dojox/lang/functional/object",
get: lang.hitch(this, function (obj) {return obj.msgItem.label})
}, {
label: "Message Value",
- get: lang.hitch(this, function(obj) {return this._formatValue(obj)})
+ get: lang.hitch(this, function(obj) {return this._formatValue(obj.msgItem)})
}, {
label: "Byte Value",
- get: lang.hitch(this, function(obj) {return this._formatValue(obj)})
+ get: lang.hitch(this, function(obj) {return this._formatValue(obj.byteItem)})
}]
}), this.msgBytePairPointInTimeStatisticsGridContainer);
this._otherPointInTimeStatisticsGrid =
- new Grid(lang.mixin(gridProps, {
+ new Grid(lang.mixin(lang.clone(gridProps), {
collection: this._otherStatsStore.filter({statisticType: "POINT_IN_TIME"})
.filter(lang.hitch(this, defaultFilter)),
columns: [{
@@ -385,11 +385,12 @@ define(["dojox/lang/functional/object",
{
var items = [];
fobject.forIn(statItems, function(statItem) {
- var item = lang.mixin(statItem,
- {id: statItem.name,
+ var copy = lang.clone(statItem);
+ var item = lang.mixin(copy,
+ {id: copy.name,
value: null,
previousValue: null,
- defaultItem: array.indexOf(this.defaultStatistics, statItem.name) > -1});
+ defaultItem: array.indexOf(this.defaultStatistics, copy.name) > -1});
items.push(item);
}, this);
items.sort(function(x,y) {return ((x.label === y.label) ? 0 : ((x.label > y.label) ? 1 : -1 ))});
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org