Fix mistake in split meta string
When trace meta include more than one dot "." such as: meta.raw_payload.Stack.state_set-start OSprofiler will display Stack section only. Change-Id: I53de736f9fbc3fd1fcd14aa975efdf8a60c6d126 Closes-Bug: #1657684
This commit is contained in:
parent
52f0df9428
commit
93aec6a99f
@ -152,7 +152,8 @@
|
|||||||
var metadata = {};
|
var metadata = {};
|
||||||
angular.forEach(info, function(value, key) {
|
angular.forEach(info, function(value, key) {
|
||||||
var parts = key.split('.');
|
var parts = key.split('.');
|
||||||
if (parts[0] == 'meta') {
|
var metaText = 'meta';
|
||||||
|
if (parts[0] == metaText) {
|
||||||
if (parts.length == 2) {
|
if (parts.length == 2) {
|
||||||
this[parts[1]] = value;
|
this[parts[1]] = value;
|
||||||
} else {
|
} else {
|
||||||
@ -160,8 +161,9 @@
|
|||||||
if (!(groupName in this)) {
|
if (!(groupName in this)) {
|
||||||
this[groupName] = {};
|
this[groupName] = {};
|
||||||
}
|
}
|
||||||
|
// Plus 2 for 2 dots such as: meta.raw_payload.heat.wsgi-start
|
||||||
this[groupName][parts[2]] = value;
|
var index = metaText.length + parts[1].length + 2;
|
||||||
|
this[groupName][key.slice(index)] = value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}, metadata);
|
}, metadata);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user