[유치수] [NOBTS] merged node의 라벨을 요청수가 많은 순서로정렬해서 보여줌.

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-web/trunk@1829 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Chisu Yu
2013-06-10 06:31:01 +00:00
parent afe9dd5b4c
commit 2c18e3727a
@@ -561,6 +561,7 @@ var mergeUnknown = function(data) {
newNode = {
"id" : newNodeKey,
"key" : newNodeKey,
"textArr" : [],
"text" : "",
"hosts" : [],
"category" : "UNKNOWN_GROUP",
@@ -585,7 +586,7 @@ var mergeUnknown = function(data) {
}
// fill the new node/link informations.
newNode.text += link.targetinfo.applicationName + " (" + link.text + ")\n";
newNode.textArr.push({ 'count' : link.text, 'applicationName' : link.targetinfo.applicationName});
newLink.text += link.text;
newLink.error += link.error;
@@ -608,6 +609,14 @@ var mergeUnknown = function(data) {
});
if (newNode) {
newNode.textArr.sort(function(e1, e2) {
return e2.count - e1.count;
});
$.each(newNode.textArr, function(i, e) {
newNode.text += e.applicationName + " (" + e.count + ")\n";
});
newNodeList.push(newNode);
}
@@ -617,7 +626,6 @@ var mergeUnknown = function(data) {
} else {
newLink.category = "default";
}
console.log(newLink);
newLinkList.push(newLink);
}
});